EMIS published data transformation and mapping: Difference between revisions

From Endeavour Knowledge Base
No edit summary
No edit summary
Line 1: Line 1:


This article describes the mapping of EMIS published data into the intermediate FHIR store.
This article describes the mapping of EMIS published data into the intermediate FHIR store
 
= Admin location =
 
{| class="MsoTableGrid" style="border-collapse:collapse; border:solid windowtext 1.0pt"
|-
! style="width:162.8pt; background-color: rgb(239, 239, 239); border:solid windowtext 1.0pt" width="217" | Source
! style="width:318.6pt; background-color: rgb(239, 239, 239); border:solid windowtext 1.0pt; border-left:none" width="425" | Target
|-
| style="width:162.8pt; border:solid windowtext 1.0pt" width="217" |
Admin Location
 
| style="width:318.6pt; border:solid windowtext 1.0pt; border-left:none" width="425" |
Location  { .....
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">LocationGuid</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Id*</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">LocationName</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Name</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">LocationTypeDescription</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Type::Text</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">ParentLocationGuid</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">PartOf::Reference *</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">OpenDate</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">primarycare-activeperiod-extension::ValuePeriod::Start</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">CloseDate</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">primarycare-activeperiod-extension::ValuePeriod::End</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">MainContactName</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">primarycare-location-main-contact-extension::String</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">FaxNumber</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Telecom (use=work, system=fax)</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">EmailAddress</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Telecom (use=work, system=email)</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">PhoneNumber</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Telecom (use=work, system=phone)</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">HouseNameFlatNumber</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::Line</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">NumberAndStreet</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::Line</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">Village</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::Line</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">Town</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::City</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">County</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::District</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">Postcode</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">Address::PostalCode</span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">Deleted</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal"><If true, FHIR resource is deleted></span>
 
|-
| style="width:162.8pt; border:solid windowtext 1.0pt; border-top:none" width="217" |
<span style="line-height:normal">ProcessingId</span>
 
| style="width:318.6pt; border-top:none; border-left:none; border-bottom:solid windowtext 1.0pt; border-right:solid windowtext 1.0pt" width="425" |
<span style="line-height:normal">**</span>
 
|}


&nbsp;
&nbsp;

Revision as of 17:02, 5 May 2020

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

Admin location

Source Target

Admin Location

Location  { .....

LocationGuid

Id*

LocationName

Name

LocationTypeDescription

Type::Text

ParentLocationGuid

PartOf::Reference *

OpenDate

primarycare-activeperiod-extension::ValuePeriod::Start

CloseDate

primarycare-activeperiod-extension::ValuePeriod::End

MainContactName

primarycare-location-main-contact-extension::String

FaxNumber

Telecom (use=work, system=fax)

EmailAddress

Telecom (use=work, system=email)

PhoneNumber

Telecom (use=work, system=phone)

HouseNameFlatNumber

Address::Line

NumberAndStreet

Address::Line

Village

Address::Line

Town

Address::City

County

Address::District

Postcode

Address::PostalCode

Deleted

<If true, FHIR resource is deleted>

ProcessingId

**

 

Care record observations

Care record observations are a high level entity type. CareRecord_Observation contains data which is mapped to multiple FHIR resource types. Target FHIR profiles depend on content

Content dependent rules

The target resource type is decided by the following rules, using the 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).