demog - theonesp/p_zero-code GitHub Wiki

Table source: Clinic Hospital HIS (based on SAP). Specific tables: demog_scope.

Table purpose: Contains basic demographic information on all patients and stays.

Links to:

  • diag_events, lab_events, monitor_eventsonpatient_deid`.

Brief summary

The p_zero.demog table captures basic demographic information related to patients and hospital admissions. The patient identifier (patient_deid) and hospital stay identifier (hosp_stay_deid) serve as unique keys, linking each record to a specific patient and hospital stay. The nation_ref column serves as a reference to the patient's nationality and is useful for understanding the diversity of the patient population. The age column represents the age of the patient at the time of each hospital admission, calculated individually for each admission. This approach allows for the tracking of age changes across multiple hospital admissions for the same patient.

For instance, consider a patient with two hospital admissions:

  • First Admission:

patient_deid: 123 hosp_stay_deid: 456 age: 40 (calculated for the first admission)

  • Second Admission:

patient_deid: 123 hosp_stay_deid: 789 age: 42 (calculated for the second admission)

In this example, the patient with patient_deid 123 has two hospital admissions (hosp_stay_deid 456 and 789) with different ages (40 and 42, respectively), showcasing the importance of unique identifiers in tracking demographic details across multiple admissions for the same individual.

Table columns

Column Name Data Type Description
patient_deid INTEGER Unique identifier for each patient.
hosp_stay_deid INTEGER Unique identifier for each hospital stay.
age VARCHAR Age of the patient.
sex VARCHAR Gender of the patient.
nation_ref VARCHAR Reference to the patient's nationality.