Skip to main content
category unique
Source Link

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. A structure is a unique combination of a child and a parent. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category 


category
PK   category_ID  statement_style      varchar  Whethernumber a symptom-style orAn discharge-style

autogenerated sequence
  UK category_unique      varchar  Uniquely identifies the purpose of a category.
PK   category_ID          number   An autogenerated sequence                 Values could be Discharge. Also, Chest Pain Symptom, 
                                   Chest Pain Discharge. 
     category_description varchar  The visible text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FKFKUK UKchild_category_IDchild_category_ID    number  foreign key to category
FKFKUK UKparent_category_IDparent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents.

I see from the reformatting edit that Chest Pain is both a symptom category and a discharge category. This would still work fine. One option is to make two categories for Chest Pain, one as a symptom, one as a discharge. They just happen to have the same name, but they contain different sets of statements. The other option (reflected in the table design) is to add a field to the statement table describing whether the statement is a symptom-style statement or a discharge-style statement. So the Chest Pain category has both symptom statements and discharge statements. The query would only show the appropriate subset based on the need.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. A structure is a unique combination of a child and a parent. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category
     statement_style      varchar  Whether a symptom-style or discharge-style


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK UKchild_category_ID    number  foreign key to category
FK UKparent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents.

I see from the reformatting edit that Chest Pain is both a symptom category and a discharge category. This would still work fine. One option is to make two categories for Chest Pain, one as a symptom, one as a discharge. They just happen to have the same name, but they contain different sets of statements. The other option (reflected in the table design) is to add a field to the statement table describing whether the statement is a symptom-style statement or a discharge-style statement. So the Chest Pain category has both symptom statements and discharge statements. The query would only show the appropriate subset based on the need.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. A structure is a unique combination of a child and a parent. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category 


category
PK   category_ID          number   An autogenerated sequence
  UK category_unique      varchar  Uniquely identifies the purpose of a category.
                                   Values could be Discharge. Also, Chest Pain Symptom, 
                                   Chest Pain Discharge. 
     category_description varchar  The visible text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FKUK child_category_ID    number  foreign key to category
FKUK parent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents.

I see from the reformatting edit that Chest Pain is both a symptom category and a discharge category. This would still work fine. One option is to make two categories for Chest Pain, one as a symptom, one as a discharge. They just happen to have the same name, but they contain different sets of statements. The other option (reflected in the table design) is to add a field to the statement table describing whether the statement is a symptom-style statement or a discharge-style statement. So the Chest Pain category has both symptom statements and discharge statements. The query would only show the appropriate subset based on the need.

edt after reformat. described category with two parents.
Source Link

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. A structure is a unique combination of a child and a parent. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category
     statement_style      varchar  Whether a symptom-style or discharge-style


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK   child_category_IDUKchild_category_ID    number  foreign key to category
FK   parent_category_IDUKparent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents. I

I see from the reformatting edit that CardioChest Pain is both a symptom category and a discharge category. This would still work fine. One option is to make two categories for Chest Pain, one as a symptom, one as a discharge. They just happen to have the same name, but they contain different sets of statements. The other option (reflected in the table design) is to add a field to the statement table describing whether the statement is a symptom-style statement or a discharge-style statement. So the Chest Pain category has both symptom statements and discharge statements. The query would only show the appropriate subset based on the need.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK   child_category_ID    number  foreign key to category
FK   parent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents. I see from the reformatting edit that Cardio is both a symptom category and a discharge category.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. A structure is a unique combination of a child and a parent. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category
     statement_style      varchar  Whether a symptom-style or discharge-style


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK UKchild_category_ID    number  foreign key to category
FK UKparent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents.

I see from the reformatting edit that Chest Pain is both a symptom category and a discharge category. This would still work fine. One option is to make two categories for Chest Pain, one as a symptom, one as a discharge. They just happen to have the same name, but they contain different sets of statements. The other option (reflected in the table design) is to add a field to the statement table describing whether the statement is a symptom-style statement or a discharge-style statement. So the Chest Pain category has both symptom statements and discharge statements. The query would only show the appropriate subset based on the need.

edt after reformat.
Source Link

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Recommendations, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK   child_category_ID    number  foreign key to category
FK   parent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The recommendationDischarge category would be the parent of all recommendationsdischarge. The structure table does not prevent a category from having both symptom and discharge as parents. I see from the reformatting edit that Cardio is both a symptom category and a discharge category.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Recommendations, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK   child_category_ID    number  foreign key to category
FK   parent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The recommendation category would be the parent of all recommendations.

A good way to do this in a relational database is with statement, category, and category_structure tables. The statement represents the line of text. Assume that each statement resides in a single category. A group of statements in a category have to appear in a certain order. Categories include the text groupings including Cardiovascular and Palpitations. The category_structure relates the hierarchy of categories. Each structure has a child_Category, parent_category, and sort_order. Here are the table definitions.

statement
PK   statement_ID         number   An autogenerated sequence
FK   category_ID          number   A foreign key to category table
     statement_text       varchar  The long description On a scale of one...
     statement_sort_order number   The order within a category


category
PK   category_ID          number   An autogenerated sequence
     category_description varchar  The text description of a category. The
              values would be Symptoms, Cardiovascular,
              Discharge, Chest Pain, Palpitations. 

category_structure
PK   structure_ID         number  An autogenerated sequence
FK   child_category_ID    number  foreign key to category
FK   parent_category_ID   number  foreign key to category. Optional. 
     category_sort_order  number  The order of categories or the order within 
                                  categories

Note the Symptoms category would be the parent of all symptoms. The Discharge category would be the parent of all discharge. The structure table does not prevent a category from having both symptom and discharge as parents. I see from the reformatting edit that Cardio is both a symptom category and a discharge category.

Source Link
Loading