Definition
Purpose
Section titled “Purpose”The drug_record_problem_link model documents links between medication records
and problem observations for patients included in recruit studies. It captures
relationships between drug records and clinical problems with personally
identifiable information preserved.
Information
Section titled “Information”This link table enables tracking of associations between medication observations and associated problem records. Each link record represents a single relationship between a drug record and a problem observation within a study cohort.
- emis_observation_guid (PK): The unique identifier for the link record
- emis_drug_guid (FK): Links to the associated medication record
- emis_registration_guid (FK): Hashed registration identifier
- patient_id (FK): Patient identifier with PII preserved
- organisation (FK): The organisation managing the link
- study_id (FK): Study cohort identifier
Examples
Section titled “Examples”Get all drug-problem links for a patient
SELECT *FROM hive.explorer_recruit.medication_drugrecord_problem_linkWHERE patient_id = 123456789LIMIT 100;Find drug-problem links for a study
SELECT *FROM hive.explorer_recruit.medication_drugrecord_problem_linkWHERE study_id = 'STUDY001'LIMIT 100;Find all drug records linked to a specific problem observation
SELECT emis_observation_guid, emis_drug_guid, intent, patient_idFROM hive.explorer_recruit.medication_drugrecord_problem_linkWHERE emis_observation_guid = 'OBS-GUID-123'LIMIT 100;