Skip to content
Partner Developer Portal

Definition

The drug_record_problem_link model documents links between medication records and problem observations for patients included in recruit studies. It captures the relationships between drug records and clinical problems for enrolled patients.

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_issue_guid (FK): Links to the associated problem record
  • pseudo_registration_guid (FK): Hashed registration identifier
  • pseudo_patient_id (FK): Hashed patient identifier
  • emis_registration_organisation_guid (FK): Organisation the registration belongs to
  • study_id (FK): Study cohort identifier

Get all drug-problem links for a study

SELECT *
FROM hive.explorer_recruit_anon.medication_drugrecord_problem_link
WHERE study_id = 'STUDY001'
LIMIT 100;

Find drug-problem links for an organisation

SELECT *
FROM hive.explorer_recruit_anon.medication_drugrecord_problem_link
WHERE organisation = 'CDB-0001'
LIMIT 100;

Find all drug records linked to a specific problem observation

SELECT
emis_observation_guid,
emis_drug_guid,
intent,
patient_id
FROM hive.explorer_recruit_anon.medication_drugrecord_problem_link
WHERE emis_observation_guid = 'OBS-GUID-123'
LIMIT 100;