EMIS published data transformation and mapping: Difference between revisions

From Endeavour Knowledge Base
No edit summary
No edit summary
Line 48: Line 48:
|-
|-
| If the CodeType is any of (Dental_Disorder, Dental_Procedure)
| If the CodeType is any of (Dental_Disorder, Dental_Procedure)
| Conidition
| Condition
|-
|-
| If the CodeType is (Family_History)
| If the CodeType is (Family_History)
Line 66: Line 66:
|}
|}


 
There is a mismatch between EMIS observations and FHIR resource profiles


{| border="1" cellpadding="1" cellspacing="1" style="width: 800pt;"
{| border="1" cellpadding="1" cellspacing="1" style="width: 800pt;"
Line 73: Line 73:
! scope="col" style="width: 150px; background-color: rgb(239, 239, 239);" | Target profile
! scope="col" style="width: 150px; background-color: rgb(239, 239, 239);" | 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
IF target profile IS Condition
 
   IF CSV Care Record observation ID is in CSV Care Record Problem ID
 
| Combine problem and Condition into problem onset profile
|-
|
In addition to the above mappings
 
R1: IF  the target resource select from above ''is not'' condition
 
       R2: IF the CSV CareRecord_Observation ID  is in CSV CareRecord_Problem record ID
 
| Combine problem and other into Condition with "problem" profile
|-
|        R2: ELSE
| Observation
|-
| R1: Else    : See R3
|  
|-
|
R3: If the CSV Care Record Observation has PROBLEM ID


| Condition
        R4: IF the CSV care record Observation ID is NOT the PROBLEM ID
 
           R5: IF the CSV care record CODE = the linked problem ID CODE
 
| Condition with episode indicator = review
|-
| (R3,R4,R5 : Else
| No change 
|}
|}



Revision as of 16:50, 5 May 2020

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) Condition
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

There is a mismatch between EMIS observations and FHIR resource profiles

Structural Rule Target profile

IF target profile IS Condition

   IF CSV Care Record observation ID is in CSV Care Record Problem ID

Combine problem and Condition into problem onset profile

In addition to the above mappings

R1: IF  the target resource select from above is not condition

       R2: IF the CSV CareRecord_Observation ID  is in CSV CareRecord_Problem record ID

Combine problem and other into Condition with "problem" profile
       R2: ELSE Observation
R1: Else    : See R3  

R3: If the CSV Care Record Observation has PROBLEM ID

        R4: IF the CSV care record Observation ID is NOT the PROBLEM ID

           R5: IF the CSV care record CODE = the linked problem ID CODE

Condition with episode indicator = review
(R3,R4,R5 : Else No change 

 

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).