we should make CLIF "SQL ready" because SQL databases have an explicit relational database structure that will help us achieve the goal of having each hospitalization represented coherently in CLIF.
patient: patient_id is the primary key
hospitalization: hospitalization_id is the primary key. patient_id is a foreign key to link hospitalizations to patients
vitals: hospitalization_id is a foreign key to link each set of vitals to a specific hospitalization.
labs: hospitalization_id also serves as a foreign key to associate lab results with the corresponding hospital stay.
I also like this:
Foreign Key Constraints: By using SQL, you can enforce foreign key constraints to maintain referential integrity. This ensures that every hospitalization_id in the vitals, labs, or medications tables must exist in the hospitalization table. It helps prevent orphaned records (e.g., vitals records that reference a non-existent hospitalization).
SQL queries will be a very efficient way to do things like identify sepsis, etc.
Let's add a running to do list to this issue. I think we are pretty close!
we should make CLIF "SQL ready" because SQL databases have an explicit relational database structure that will help us achieve the goal of having each hospitalization represented coherently in CLIF.
patient:
patient_id
is the primary key hospitalization:hospitalization_id
is the primary key.patient_id
is a foreign key to link hospitalizations to patients vitals:hospitalization_id
is a foreign key to link each set of vitals to a specific hospitalization. labs:hospitalization_id
also serves as a foreign key to associate lab results with the corresponding hospital stay.I also like this:
Foreign Key Constraints: By using SQL, you can enforce foreign key constraints to maintain referential integrity. This ensures that every
hospitalization_id
in the vitals, labs, or medications tables must exist in the hospitalization table. It helps prevent orphaned records (e.g., vitals records that reference a non-existent hospitalization).SQL queries will be a very efficient way to do things like identify sepsis, etc.
Let's add a running to do list to this issue. I think we are pretty close!