Question Smythe Smythee · Oct 10, 2022

Converting XML message Type to HL7 Message

Hi ,

Still a newbie for ensemble, I am trying to convert XML message to HL7 Message. I am using Custom schema for XML structure which includes MSH and PID segments from HL7 Message.

These are the service, process, Operation classes i am using 

Business service-EnsLib.EDI.XML.Service.FileService

Business Process-EnsLib.MsgRouter.RoutingEngine

Business operation -EnsLib.HL7.Operation.FileOperation

I am using data transformation to convert XML message to HL7 message  and data transformation is working fine and im getting this in the business operation.

 

ERROR <Ens>ErrGeneral: Not routing to target(s) 'HL7Output' because of error in Transform 'CSTOM.TXML.XMLToHL7' : ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zTransform+7^CSTOM.TXML.XMLToHL7.1 *MSH,EnsLib.EDI.XML.Document -- logged as '-' number - @' Set tSC1=target.SetValueAt(source.MSH.EncodingCharacters,"MSH:EncodingCharacters","set","")'

Please let me know if i missed any thing in this process?

Thanks,

Smythee

Product version: Ensemble 2018.1
$ZV: Cache for Windows (x86-64) 2018.1.1 (Build 312_1_18937U) Fri Apr 26 2019 17:58:36 EDT

Comments

Thembelani Mlalazi · Oct 16, 2022

@Smythe Smythee 
the problem you are having is that the property does not exist what does your class look like. The one that handles the incoming XML and what version of HL7 are you converting to.

0
Smythe Smythee  Oct 17, 2022 to Thembelani Mlalazi

For incoming XML i have custom schema which looks like the below 

Class CUSTOM.TXML.MainSchema Extends (%Persistent, %XML.Adaptor)
{

Property FieldSeparator As %String;

Property EncodingCharacters As %String;

Property SendingApplication As %String;

Property SendingFacility As %String;

}

Let me know any mistakes that i have made in this class please?

Thanks,

Smythee

0
Kevin Koloska · Oct 17, 2022

I would say there is an error in your Transform.

What does your transform look like?

0
Smythe Smythee  Oct 17, 2022 to Kevin Koloska

Transformation is working fine. I am getting output from my transformation but when i am using same transformation in Business process.

Let me know any changes do i need to make in transformation 

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl]
{
<transform sourceClass='CUSTOM.TXML.MainSchema' targetClass='EnsLib.HL7.Message' targetDocType='2.5:ADT_A01' create='new' language='objectscript' >
<assign value='source.FieldSeparator' property='target.{MSH:FieldSeparator}' action='set' />
<assign value='source.EncodingCharacters' property='target.{MSH:EncodingCharacters}' action='set' />
<assign value='source.SendingApplication' property='target.{MSH:SendingApplication}' action='set' />
<assign value='source.PatientID' property='target.{PID:SetIDPID}' action='set' />
<assign value='source.FamilyName' property='target.{PID:PatientName().FamilyName}' action='set' />
<assign value='source.GivenName' property='target.{PID:PatientName().GivenName}' action='set' />
</transform>
}
 

0
Kevin Koloska  Oct 18, 2022 to Smythe Smythee

Check your message isnt asking for the segment. Click the 2.5:ADT_A01.

Then find the EVN type. 

Edit and check 

Hopefully should fix your issue. 

0
Smythe Smythee  Oct 18, 2022 to Kevin Koloska

Yes thank you 

but i am getting different error after transforming the message. I think the error is the way i defined the my custom schema and getting error in this class "EnsLib.EDI.XML.Document".let me know any mistake while defining the schema please

<PROPERTY DOES NOT EXIST>zTransform+7^CSTOM.TXML.XMLToHL7.1 *MSH,EnsLib.EDI.XML.Document -- logged as '-' number - @' Set tSC1=target.SetValueAt(source.MSH.EncodingCharacters,"MSH:EncodingCharacters","set","")'

0
Kevin Koloska  Oct 18, 2022 to Smythe Smythee

Glad the first part worked for you.

0
Thembelani Mlalazi  Oct 27, 2022 to Smythe Smythee

looking at your error I suppose you have a scheme same as the above since your error is complaining about the source class MSH which does not exist within the XML document.

tSC1=target.SetValueAt(source.MSH.EncodingCharacters,"MSH:EncodingCharacters","set","")

do you have this class if not then that's where the problem is look at the bold

0