Table List

Database Tables

Pages produced by a web-based metadata application,
which joins the database dictionary to
entity-level information entered by the analyst.
See the author's web page

Table Details :: MEDICATION

 

MEDICATION

Description:Medications that the patient took
What defines a unique row:The logical key is PATIENT_ID, CLINIC_ID, ADMINISTRATION_DATE, and DRUG_CODE. Only one row with LASTEST_ROW_IND='Y' is expected for each logical key. Multiple administrations of the same medication in a day are aggregated by the ETL process. The logical key and the INSERT_DATE consitute the database unique key.
Current rows:LATEST_ROW_IND = 'Y'
Historical rows:LATEST_ROW_IND = 'N'

 

Show less details

S.MEDICATION in DEMODB

 

view S.MEDICATION_VW in DEMODB

       
S.MEDICATION_VW  View Sources   
Column Name Type   Column Name Type   SourcesJoinsComments
CLINIC_ID NUMBER(22)  CLINIC_ID NUMBER(22)  Clinical System: clin.med.clinic_numberJoin to table S.CLINIC on:
CLINIC_ID = CLINIC_ID
Clinic number
PATIENT_ID NUMBER(22)      Join to table S.PATIENT on:
PATIENT_ID = PATIENT_ID
Patient record number
ADMINISTRATION_DATE NUMBER(22)  ADMINISTRATION_DATE NUMBER(22)  Clinical System: clin.med.med_administration_dateDate the patient took the medication
DIAGNOSIS_CODE VARCHAR2(9)  DIAGNOSIS_CODE VARCHAR2(9)  Clinical System: clin.med.med_diag_codeJoin to table S.DIAGNOSIS on:
DIAGNOSIS_CODE = DIAGNOSIS_CODE
Diagnosis for which the medication was taken
     DIAGNOSIS_DESCRIPTION VARCHAR2(75)  Available in the view based on join to the reference table
DRUG_CODE VARCHAR2(9)  DRUG_CODE VARCHAR2(9)  Clinical System: clin.med.med_drug_numberJoin to table S.DRUG on:
DRUG_CODE = DRUG_CODE (VARCHAR2 <==> NUMBER)
     DRUG_NAME VARCHAR2(80)  Available in the view based on join to the reference table
ROUTE_CODE VARCHAR2(9)  ROUTE_CODE VARCHAR2(9)  Clinical System: clin.med.med_route_codeJoin to table S.ROUTE on:
ROUTE_CODE = ROUTE_CODE
     ROUTE_DESCRIPTION VARCHAR2(60)  Available in the view based on join to the reference table
MEASUREMENT_CODE VARCHAR2(9)  MEASUREMENT_CODE VARCHAR2(9)  Clinical System: clin.med.med_qty_unitJoin to table S.MEASUREMENT on:
MEASUREMENT_CODE = MEASUREMENT_CODE
     MEASUREMENT_DESCRIPTION VARCHAR2(60)  Available in the view based on join to the reference table
QUANTITY NUMBER(22)  QUANTITY NUMBER(22)  Clinical System: clin.med.med_qty_numberQuantity of whatever the DOSE_CODE refers to
DOSE_CODE NUMBER(22)  DOSE_CODE NUMBER(22)  Clinical System: clin.med.med_doseJoin to table S.DOSE on:
DOSE_CODE = DOSE_CODE (NUMBER <==> VARCHAR2)
Values in the DOSE table
INSERT_DATE DATE(7)  INSERT_DATE DATE(7)  ETL: audit_columns.g.system_date_at_insert
UPDATE_DATE DATE(7)  UPDATE_DATE DATE(7)  ETL: audit_columns.g.system_date_at_update
LATEST_ROW_IND CHAR(1)  LATEST_ROW_IND CHAR(1)  ETL: audit_columns.g.process

 

Show sources for MEDICATION

Table Diagram:

Table diagram

Sample query script:

Highlight all, copy to clipboard, and paste as needed