EMIS published data transformation and mapping

From Endeavour Knowledge Base

This article describes the mapping of EMIS published data into the intermediate FHIR store.

Clinical Observations

Content dependent rules

CareRecord_Observation contains data which is mapped to multiple FHIR resource types. The target resource type is decided by the following rules, using the Read2 code and CodeType from the Coding_ClinicalCode file (looked up using the CodeId from CareRecord_Observation) and the Value field from CareRecord_Observation.

 

Code type Rule Target profile
If the Value is empty, and the CodeType is one of (Biochemistry, Cyology_Histology,Haematology,Immunology,Microbiology,Radiology, Health_Management) DiagnosticReport

If the Value is not empty OR the CodeType is one of

(Biochemistry,Biological_Values,Cytology_Histology, Haematology, Health_Management, Immunology,Microbiology,Radiology,Symptoms_Findings, Procedure (note, the codes is this category aren't actually "procedures"), Administration_Documents_Attachments, Body_Structure //dental structures,Care_Episode_Outcome, Dental_Finding,Diagnostics, Discharged_From_Service,EMIS_Qualifier,Ethnicity,HMP,Intervention_Category, Intervention_Target, KC60,;Marital_Status, Nationality,Nursing_Problem, Nursing_Problem_Domain, Obsteterics_Birth,Person_Health_Social, Planned_Dental, Problem_Rating_Scale, Reason_For_Care, Referral_Activity, Referral_Rejected, Referral_Withdrawn, Regiment, Religion, Trade_Branch, Unset)

Observation

 

 

If the CodeType is Conditions_Operations_Procedures and the Code is in (Preventive procedures, Operations, procedures, sites, Other therapeutic procedures) Procedure
If the CodeType is Conditions_Operations_Procedures and the Code is in (Infectious and parasitic diseases, Neoplasms,Endocrine, nutritional, metabolic and immunity disorders, Diseases of blood and blood-forming organs, Mental disorders, Nervous system and sense organ diseases, Circulatory system diseases, Respiratory system diseases, Digestive system diseases, Genitourinary system diseases, Skin and subcutaneous tissue diseases, Musculoskeletal and connective tissue diseases)

Condition

 

Else If the CodeType is Conditions_Operations_Procedures Observation
If the CodeType is any of (Allergy_Adverse_Drug_Reations, Allergy_Adverse_Reations) AllergyIntolerance
If the CodeType is any of (Dental_Disorder, Dental_Procedure) Conidition
If the CodeType is (Family_History) FamilyMemberHistory
 
f the CodeType is (Immunisations) Immunization
If code type is (Investigation_Requests) DiagnosticOrder
If code type is Pathology_Specimen Specimen
If code type is Referral Referral request

 

Structural Rule Target profile
the Condition resource uses the “problem” profile, otherwise it uses the “condition” profile.

In addition to the above mappings, if the target resource selects is not condition, but the CareRecord_Observation is linked to by a CareRecord_Problem record, then a condition resource will also be created, with the “problem” profile

Condition

 

Prescribing_DrugRecord End Dates

The Prescribing_DrugRecord file contains both a Boolean active indicator (IsActive) and the medication end date (CancellationDate). Within Emis Web, it’s the IsActive indicator that is used to determine whether medication is active or not, the CancellationDate just providing additional information for ended medication. Analysing the received data has highlighted that there are a number of cases where the CancellationDate doesn’t match what the IsActive flag states:

  1. IsActive = true but a CancellationDate is present;
  2. IsActive = false but a CancellationDate is absent.

From the dates of affected data, these appear to be related to either a service moving to Emis Web from another GP system, and are an artefact of that transfer.

To ensure consistency in the FHIR MedicationStatements created from this file, the Cancellation date will only be carried over if the DrugRecord is non-active. If no cancellation date is present, it will be derived from the medication start and course length (found from the associated Prescribing_IssueRecord file).