Question
· Oct 17, 2023

Converting HL7 Message to Ens.Request: Best Practices

Hello,

First of all, thanks for your help, and time, reading this questions, and answering to this doubt.

We have the following use case: to convert a HL7 ER7 ORU_R01 v2.5 message, to a Ens.Request Message which represent it with a custom data structure (each segment is a group of Properties).

To be more precise, the target Ens.Request Message's structure looks like:

Class Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest Extends Ens.Request [ ProcedureBlock ]
{

Parameter RESPONSECLASSNAME = "Mensajes.Response.ConsentimientoInformado.HUC.ORUHL725OutResponse";
Property MSH As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.CONTENT;
Property SFT As list Of EsquemasDatos.ConsentimientoInformado.HUC.p2.SFT.CONTENT;
Property ORUR01PATIENTRESULT As list Of EsquemasDatos.ConsentimientoInformado.HUC.p2.ORUR01.PATIENTRESULT.CONTENT;
Property DSC As EsquemasDatos.ConsentimientoInformado.HUC.p2.DSC.CONTENT;

Being the MSH as:

Class EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.CONTENT Extends (%SerialObject, %XML.Adaptor) [ ProcedureBlock ]
{

Parameter ELEMENTQUALIFIED = 0;
Parameter NAMESPACE = "urn:hl7-org:v2xml";
Parameter XMLNAME = "MSH.CONTENT";
Parameter XMLSEQUENCE = 1;
Parameter XMLTYPE = "MSH.CONTENT";
Property MSH1 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X1.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.1", XMLREF = 1) [ Required ];
Property MSH2 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X2.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.2", XMLREF = 1) [ Required ];
Property MSH3 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X3.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.3", XMLREF = 1);
Property MSH4 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X4.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.4", XMLREF = 1);
Property MSH5 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X5.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.5", XMLREF = 1);
Property MSH6 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X6.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.6", XMLREF = 1);
Property MSH7 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X7.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.7", XMLREF = 1) [ Required ];
Property MSH8 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X8.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.8", XMLREF = 1);
Property MSH9 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X9.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.9", XMLREF = 1) [ Required ];
Property MSH10 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X10.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.10", XMLREF = 1) [ Required ];
Property MSH11 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X11.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.11", XMLREF = 1) [ Required ];
Property MSH12 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X12.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.12", XMLREF = 1) [ Required ];
Property MSH13 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X13.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.13", XMLREF = 1);
Property MSH14 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X14.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.14", XMLREF = 1);
Property MSH15 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X15.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.15", XMLREF = 1);
Property MSH16 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X16.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.16", XMLREF = 1);
Property MSH17 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X17.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.17", XMLREF = 1);
Property MSH18 As list Of EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X18.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.18", XMLPROJECTION = "ELEMENT", XMLREF = 1);
Property MSH19 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X19.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.19", XMLREF = 1);
Property MSH20 As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X20.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.20", XMLREF = 1);
Property MSH21 As list Of EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X21.CONTENT(CLASSNAME = 1, REFELEMENTQUALIFIED = 0, REFNAMESPACE = "urn:hl7-org:v2xml", XMLNAME = "MSH.21", XMLPROJECTION = "ELEMENT", XMLREF = 1);
Property any As %XML.String(XMLNAME = "any", XMLPROJECTION = "ANY") [ SqlFieldName = _any ];

So then the MSH1 is like this:

Class EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.X1.CONTENT Extends (%SerialObject, %XML.Adaptor) [ CompileAfter = EsquemasDatos.ConsentimientoInformado.HUC.p2.ST, ProcedureBlock ]
{

Parameter ELEMENTQUALIFIED = 0;
Parameter NAMESPACE = "urn:hl7-org:v2xml";
Parameter XMLNAME = "MSH.1.CONTENT";
Parameter XMLSEQUENCE = 1;
Parameter XMLTYPE = "MSH.1.CONTENT";
Property content As EsquemasDatos.ConsentimientoInformado.HUC.p2.ST(XMLNAME = "content", XMLPROJECTION = "CONTENT");
Property Item As %String(MAXLEN = "", XMLNAME = "Item", XMLPROJECTION = "ATTRIBUTE") [ InitialExpression = "1", ReadOnly ];
Property Type As %String(MAXLEN = "", XMLNAME = "Type", XMLPROJECTION = "ATTRIBUTE") [ InitialExpression = "ST", ReadOnly ];
Property LongName As %String(MAXLEN = "", XMLNAME = "LongName", XMLPROJECTION = "ATTRIBUTE") [ InitialExpression = "Field Separator", ReadOnly ];

We have started to develop a Data Transform as:

Being the .CLS as:

Class Transformaciones.ConsentimientoInformado.HUC.ORUR01toORUHL725OutRequest Extends Ens.DataTransformDTL [ DependsOn = (EnsLib.HL7.Message, Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest) ]
{

Parameter IGNOREMISSINGSOURCE = 1;
Parameter REPORTERRORS = 1;
Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;
XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='EnsLib.HL7.Message' targetClass='Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest' sourceDocType='2.5:ORU_R01' create='new' language='objectscript' >
<assign value='source.{MSH}' property='target.MSH' action='set' />
</transform>
}

}

 

However when we try it, with Tools > Test:

Input Message:

MSH|^~\&|CINFO|1419|DRAGOAE|380326|20231016114107|ZZZ=WWW|ORU^R01^ORU_R01|QM_cj59mfyr7j5fpa|P|2.5|||AL|ER|ESP|8859/1
PID|1||2001012731^^^HIS&NHC&L^PI^^^^380326&&99CENTROS_SCS~1021576^^^CACN&NEXPEDIENTE&L^PI^^^^380326&&99CENTROS_SCS||CON^RUWBMOSLHE|TARJETA|19840706|O
PV1|1|||||||||URG
ORC|SC|0001302828|22S_169537418382125767^CINFO||CM||||20231016114107||||||||||||HOSPITAL UNIVERSITARIO DE CANARIAS^^^^^^FI^^^380326
OBR|1|0001302828|22S_169537418382125767^CINFO||||20231016114107
OBX|1|ST|Estado||Completado||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS
OBX|2|ST|Procedimiento||Amniocentesis||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS
OBX|3|ST|Categor?a||Urgencias||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS
OBX|4|ST|Zona Anat?mica||||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS
OBX|5|ST|Anotaciones Espec?ficas||||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS
OBX|6|ST|Riesgos Personales||||||||F|||20231016114107||ACMANCINI^Castro Mancini^^^^^^^380326^^^^PN^^^^^^^^^380326&99CENTROS_SCS

The Output shows it empty:

Is there any recommended, suggested, proper, way to convert an HL7 message to an Ens.Request?

Thanks for your time.

 

To add context, we can not convert it all to an %XML.String because of the SOAP Operation which we loaded from the External System, requires each segment as:

Class Operaciones.SOAP.ConsentimientoInformado.HUC.HTTPPort Extends Ens.BusinessOperation [ ProcedureBlock ]
{

Parameter ADAPTER = "EnsLib.SOAP.OutboundAdapter";
Method ORUHL725Out(pRequest As Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest, Output pResponse As Mensajes.Response.ConsentimientoInformado.HUC.ORUHL725OutResponse) As %Library.Status
{
 Set ..Adapter.WebServiceClientClass = "WSCLIENTE.ConsentimientoInformado.HUC.HTTPPort"
 Set tSC = ..Adapter.InvokeMethod("ORUHL725Out",,pRequest.MSH,pRequest.SFT,pRequest.ORUR01PATIENTRESULT,pRequest.DSC)  Quit:$$$ISERR(tSC) tSC
 Set tSC = pRequest.NewResponse(.pResponse)  Quit:$$$ISERR(tSC) tSC
 Quit $$$OK
}

XData MessageMap
{
<MapItems>
	<MapItem MessageType="Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest">
		<Method>ORUHL725Out</Method>
	</MapItem>
</MapItems>
}

}

Being the Web Service Client Class:

Class WSCLIENTE.ConsentimientoInformado.HUC.HTTPPort Extends %SOAP.WebClient [ ProcedureBlock ]
{

/// Non-default elementFormQualified for types XML namespace.
Parameter ELEMENTQUALIFIED = 0;
/// This is the namespace used by the Service
Parameter NAMESPACE = "urn:huc.es:sapish:objetosComunes:hl7";
/// Use xsi:type attribute for literal types.
Parameter OUTPUTTYPEATTRIBUTE = 1;
/// Determines handling of Security header.
Parameter SECURITYIN = "ALLOW";
/// This is the name of the Service
Parameter SERVICENAME = "XI_552c39812f5d36e5a62bb2d1180d695d_Service";
/// This is the SOAP version supported by the service.
Parameter SOAPVERSION = 1.1;
/// This is the namespace used for types by the Service
Parameter TYPENAMESPACE = "urn:hl7-org:v2xml";
Method ORUHL725Out(MSH As EsquemasDatos.ConsentimientoInformado.HUC.p2.MSH.CONTENT(CLASSNAME=1,REFELEMENTQUALIFIED=0,REFNAMESPACE="urn:hl7-org:v2xml",XMLREF=1,REQUIRED=1), SFT As %ListOfObjects(ELEMENTTYPE="EsquemasDatos.ConsentimientoInformado.HUC.p2.SFT.CONTENT",XMLPROJECTION="element",CLASSNAME=1,REFELEMENTQUALIFIED=0,REFNAMESPACE="urn:hl7-org:v2xml",XMLNAME="SFT",XMLREF=1), ORUR01PATIENTRESULT As %ListOfObjects(ELEMENTTYPE="EsquemasDatos.ConsentimientoInformado.HUC.p2.ORUR01.PATIENTRESULT.CONTENT",XMLPROJECTION="element",CLASSNAME=1,REFELEMENTQUALIFIED=0,REFNAMESPACE="urn:hl7-org:v2xml",XMLNAME="ORU_R01.PATIENT_RESULT",XMLREF=1,REQUIRED=1), DSC As EsquemasDatos.ConsentimientoInformado.HUC.p2.DSC.CONTENT(CLASSNAME=1,REFELEMENTQUALIFIED=0,REFNAMESPACE="urn:hl7-org:v2xml",XMLREF=1)) As %SOAP.OneWay [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
 Do (..WebMethod("ORU_HL7_25_Out","ORU_R01")).Invoke($this,"http://sap.com/xi/WebService/soap1.1",.MSH,.SFT,.ORUR01PATIENTRESULT,.DSC)
}

}

 

What is the recommended way to do thys type of transformation?

Thanks for your time.

"Helping others is not only a wonderful way to give back but also the most effective way to learn and grow in software development." - Grace Hopper 👁👁

Product version: IRIS 2020.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2020.1.1 (Build 408U) Sun Mar 21 2021 22:21:14 EDT
Discussion (5)3
Log in or sign up to continue

Hello @Yone Moreno 
Just a thought. Convert the HL7 message into SDA. Create a clone class like SDA with extends of Ens.Request. Create a instance of the class and import the String into the object and finally store it like below.


ClassMethod HL7ToCustomEnsReq()
{
    #dim xml As %Stream.GlobalCharacter
    set hl7 = ##class(EnsLib.HL7.Message).%New()
    
    set tSC = ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(hl7,.xml)
    $$$ThrowOnError(tSC)
    
    set reqObj = ##class(Mensajes.Request.ConsentimientoInformado.HUC.ORUHL725OutRequest).%New()
    do reqObj.XMLImportSDAString(xml.Read())
    set tSC = reqObj.%Save()
    $$$ThrowOnError(tSC)
}

Thanks @Ashok Kumar , for your kind help.

We have developed it as follows:

ClassMethod HL7ToCustomEnsReq(request As EnsLib.HL7.Message) As Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest
{
    #dim xml As %Stream.GlobalCharacter
    set tSC = ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.xml)
    $$$ThrowOnError(tSC)
    
    set reqObj = ##class(Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest).%New()
    do reqObj.XMLImportSDAString(xml.Read())
    set tSC = reqObj.%Save()
    $$$ThrowOnError(tSC)
    
    $$$LOGINFO("reqObj.MSH.MSH1.content: "_reqObj.MSH.MSH1.content)
    quit reqObj
}

Where the Request is as follows:

Class Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest Extends (Ens.Request, HS.SDA3.QuickXML) [ ProcedureBlock ]
{

Parameter RESPONSECLASSNAME = "Mensajes.Response.Peticiones.Derivaciones.EnvioPeticiones.operacionResponse";
Property MSH As hl7.MSH.CONTENT;
Property NTE As list Of hl7.NTE.CONTENT;
Property ORMO01PATIENT As hl7.ORMO01.PATIENT.CONTENT;
Property ORMO01ORDER As list Of hl7.ORMO01.ORDER.CONTENT;
Property SFT As list Of hl7.SFT.CONTENT;
Property MSA As hl7.MSA.CONTENT;
Property ERR As list Of hl7.ERR.CONTENT;

And the Transformation invokes the HL7ToCustomEnsReq() functions like this:

Class Transformaciones.HL7.Peticiones.Derivacion.Mensaje.ORM01 Extends Ens.DataTransformDTL [ DependsOn = (EnsLib.HL7.Message, Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest) ]
{

Parameter IGNOREMISSINGSOURCE = 1;
Parameter REPORTERRORS = 1;
Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;
XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
{
<transform sourceClass='EnsLib.HL7.Message' targetClass='Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest' sourceDocType='2.5:ORM_O01' targetDocType='2.5:ORM_O01' create='new' language='objectscript' >
<assign value='##class(Util.FuncionesComunes).HL7ToCustomEnsReq(source)' property='target' action='set' />
</transform>
}

}

However we do see the $$$LOGINFO("reqObj.MSH.MSH1.content: "_reqObj.MSH.MSH1.content) totally empty:

  reqObj.MSH.MSH1.content:

Being a warning issued as:

Could not generate EncounterNumber, skipping Encounter

What have we done wrong?

How could we understand, improve and fix it?

Is this the recommended way to convert an official HL7 Message, to a Ens.Request which is similar to a HL7 message but where each segment and field is an Ensemble class?

Thanks for your time, help and effort.

We have also read carefully: https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP.D...

Again thanks @Ashok Kumar for your help.
 

Thanks @Ashok Kumar for your support and help.

How do we verify it? How do we get all the values whether the hl7 message is properly imported to the object after executing XMLImportSDAString() for all the properties?

We have written: xml.Read() to see which holds:

ClassMethod HL7ToCustomEnsReq(request As EnsLib.HL7.Message) As Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest
{
    #dim xml As %Stream.GlobalCharacter
    
    set tSC = ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.xml)
    $$$ThrowOnError(tSC)
    
    $$$LOGALERT("xml.Read(): "_xml.Read())
    do xml.Rewind()
    
    set reqObj = ##class(Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest).%New()
    do reqObj.XMLImportSDAString(xml.Read())
    set tSC = reqObj.%Save()
    $$$ThrowOnError(tSC)
    
    $$$LOGINFO("reqObj.MSH.MSH1.content: "_reqObj.MSH.MSH1.content)
    quit reqObj
}

We do observe:

xml.Read():

<?xml version="1.0" encoding="UTF-16"?>
<Container xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:isc="http://extension-functions.intersystems.com">
    <EventDescription>ORM_O01</EventDescription>
    <SendingFacility>12010410</SendingFacility>
    <Patient>
        <PatientNumbers>
            <PatientNumber>
                <Number>ZZZ</Number>
                <NumberType>MRN</NumberType>
                <Organization>
                    <Code>ZZZ</Code>
                </Organization>
            </PatientNumber>
            <PatientNumber>
                <Number>BCE</Number>
                <NumberType>BCE</NumberType>
                <Organization>
                    <Code>MPI</Code>
                </Organization>
                <ISOAssigningAuthority>MPI</ISOAssigningAuthority>
            </PatientNumber>
            <PatientNumber>
                <Number>ECX</Number>
                <NumberType>ECX</NumberType>
                <Organization>
                    <Code>TISR</Code>
                </Organization>
                <ISOAssigningAuthority>TISR</ISOAssigningAuthority>
            </PatientNumber>
            <PatientNumber>
                <Organization>
                    <Code>DNI</Code>
                </Organization>
                <ISOAssigningAuthority>DNI</ISOAssigningAuthority>
            </PatientNumber>
            <PatientNumber>
                <Number>ABC</Number>
                <Organization>
                    <Code>ABC</Code>
                </Organization>
            </PatientNumber>
        </PatientNumbers>
        <Name>
            <GivenName>AAA</GivenName>
            <FamilyName>BBB</FamilyName>
            <MiddleName>CCC</MiddleName>
        </Name>
        <BirthTime>1951-11-07T00:00:00Z</BirthTime>
        <Gender>
            <Code>F</Code>
        </Gender>
        <Addresses>
            <Address>
                <Street>C/; 87</Street>
                <State>
                    <Code>28</Code>
                </State>
                <Zip>
                    <Code>35500</Code>
                </Zip>
            </Address>
        </Addresses>
        <ContactInfo>
            <HomePhoneNumber>624508234</HomePhoneNumber>
        </ContactInfo>
        <IsDead>0</IsDead>
        <EnteredAt>
            <Code>12010410</Code>
        </EnteredAt>
    </Patient>
    <OtherOrders>
        <OtherOrder>
            <FillerId>00000000</FillerId>
            <Priority>
                <Code>1</Code>
            </Priority>
            <EnteredBy>
                <Code>32873705N</Code>
            </EnteredBy>
            <EnteringOrganization>
                <Code>CON</Code>
                <Organization>
                    <Code>12010410</Code>
                </Organization>
            </EnteringOrganization>
            <OrderItem>
                <Code>1</Code>
                <Description>Hemograma</Description>
            </OrderItem>
            <Comments>
                <![CDATA[Datos clínicos de interés%%%]]>
            </Comments>
        </OtherOrder>
    </OtherOrders>
    <Action>AddOrUpdate</Action>
</Container>

How do we convert this SDA to the Ens.Request needed, which holds an structure like this:

Class Mensajes.Request.Peticiones.Derivaciones.EnvioPeticiones.operacionRequest Extends (Ens.Request, HS.SDA3.QuickXML) [ ProcedureBlock ]
{

Parameter RESPONSECLASSNAME = "Mensajes.Response.Peticiones.Derivaciones.EnvioPeticiones.operacionResponse";

Property MSH As hl7.MSH.CONTENT;

Property NTE As list Of hl7.NTE.CONTENT;

Property ORMO01PATIENT As hl7.ORMO01.PATIENT.CONTENT;

Property ORMO01ORDER As list Of hl7.ORMO01.ORDER.CONTENT;

Property SFT As list Of hl7.SFT.CONTENT;

Property MSA As hl7.MSA.CONTENT;

Property ERR As list Of hl7.ERR.CONTENT;

How do we continue?

Thanks for your time, help, support and effort, and patience.