Question isabella Barnes · Apr 24, 2024

SDA3 Container mapping with Diagnosis, Appointment, Procedure, Referral Patient resources

#Mapping
@Jenna Makin 
@Ashok Kumar T 
@AndreClaude Gendron 
@Saul Bloom 
@Anthony Filaski
Folks,

I need help mapping following JSON elements with HS.SDA3 Container. Could you please share if you have any mapping details.
Source ------->Target (SDA3)
Medication (Custom Persistent class with HS.SDA3.Medication)
Procedure(Custom Persistent class with HS.SDA3.Procedure)
Referral (Custom Persistent class with HS.SDA3.Referral)
Appointment (Custom Persistent class with HS.SDA3.Appointment)
Immunization (Custom Persistent class with HS.SDA3.Vaccination)
Diagnosis (Custom Persistent class with HS.SDA3.Diagnosis)
Any help would be really appreciated.
Regards,
Isabella Barnes

Product version: IRIS 2022.1

Comments

Ashok Kumar T · Apr 25, 2024

Hello @isabella Barnes 

I'd create some custom container. Check, modify and validate all the fields in payload by using some additional DTL's and Code from the and mapped into the custom container. Then I created a DTL mapping and map the custom container with the InterSystems intermediary format HS.SAD3.Container 

Finally use the container object to generate the FHIR resource.

/// custom conatiner classClass Test.project.CustomContainer Extends (Ens.Request, %JSON.Adaptor)
{

/// (Custom Persistent class with HS.SDA3.Medication)Property Medication As Medication;Property Procedure As Procedure;/// (Custom Persistent class with HS.SDA3.Procedure)Property Referral As Referral;/// (Custom Persistent class with HS.SDA3.Referral)Property Appointment As Appointment;/// (Custom Persistent class with HS.SDA3.Appointment)Property Immunization As Immunization;/// (Custom Persistent class with HS.SDA3.Vaccination)Property Diagnosis As Diagnosis;/// (Custom Persistent class with HS.SDA3.Diagnosis)
    
}

/// additional support classClass Test.project.Medication Extends (Ens.Request, %JSON.Adaptor)
{

/// Add your fields/// Property Context As%String(MAXLEN = 250);/// Relevant to Medication Requests, this represents whether a  request is a proposal, /// plan, or an original order./// VIEWERLIB: Not storedProperty RequestIntent As HS.SDA3.CodeTableDetail.MedicationRequestIntent;/// Indicates if this record was captured as a secondary 'reported' record rather than /// as an original primary source-of-truth record. /// VIEWERLIB: Not storedProperty IsReported As HS.SDA3.Boolean;/// etc........

}
Class Test.project.Procedure Extends (Ens.Request, %JSON.Adaptor)
{

/// Add your fields/// Property EnteredOn As HS.SDA3.TimeStamp;/// HL7:  PR1-19.1 : ProcedureIdentifier.EntityIdentifier<br>/// VIEWERLIB: User.HS.MRProcedures(PROCExternalId)Property ExternalId As%String(MAXLEN = 220);/// etc........
}

DTL Mapping

Class Test.project.DTL.CustomToFHIRMapping Extends Ens.DataTransformDTL [ DependsOn = (Test.project.CustomContainer, HS.SDA3.Container) ]
{

Parameter IGNOREMISSINGSOURCE = 1;Parameter REPORTERRORS = 1;Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='Test.project.CustomContainer' targetClass='HS.SDA3.Container' create='new' language='objectscript' >
<assign value='source.Medication' property='target.Medications.(1)' action='set' />
<assign value='source.Procedure' property='target.Procedures.(1)' action='set' />
<assign value='source.Referral' property='target.Referrals.(1)' action='set' />
<assign value='source.Appointment' property='target.Appointments.(1)' action='set' />
<assign value='source.Diagnosis' property='target.Diagnoses.(1)' action='set' />
</transform>
}

}

screenshot of DTL

This is how I approach the conversion.

Thanks!

0
isabella Barnes  Apr 28, 2024 to Ashok Kumar T

@Ashok Kumar T  Thanks for sharing the details. could you please share the further granular
level mapping that maps individual source with Target such as Properties in the Medication class to HS.SDA3.Medication (property level mapping in the DTL. I completely understood you mapping at source level but i need to do each source level mapping in the following DTLs.
source.diagnosis to HS.SDA3.Diagnosis

source.Immunization to HS.SDA3.Vaccination 
source.Medication to HS.SDA3.Medication

0
Ashok Kumar T  May 1, 2024 to isabella Barnes

I don't have any granular level samples right now. Generally speaking, it depends on our code implementation how we get the payload data from the system/upstream stream. There are certain validation based on the requirements. So, I hope there is no general mapping to convert our information into SDA. 

Thanks!

0