Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sample production to return custom HL7 message instead of ACK
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25" zv="Cache for Windows (x86-64) 2016.2.1 (Build 806_0_17136U)" ts="2017-11-15 11:07:09">
<Class name="Demo.BO.Test1">
<Super>Ens.BusinessOperation</Super>
<TimeChanged>64602,39900.713559</TimeChanged>
<TimeCreated>64602,39120.427823</TimeCreated>
<UDLText name="T">
<Content><![CDATA[
/*
*****************************************************
* ** N O T I C E ** *
* - TEST/DEMO SOFTWARE - *
* This and related items are not supported by *
* InterSystems as part of any released product. *
* It is supplied by InterSystems as a demo/test *
* tool for a specific product and version. *
* The user or customer is fully responsible for *
* the maintenance of this software after delivery, *
* and InterSystems shall bear no responsibility nor *
* liabilities for errors or misuse of this item. *
* *
*****************************************************
*/
]]></Content>
</UDLText>
<Parameter name="ADAPTER">
<Default>Ens.OutboundAdapter</Default>
</Parameter>
<Property name="Adapter">
<Type>Ens.OutboundAdapter</Type>
</Property>
<Parameter name="INVOCATION">
<Default>Queue</Default>
</Parameter>
<Method name="QueryEMR">
<FormalSpec>pRequest:Ens.StringRequest,*pResponse:Ens.StringResponse</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
//Pretend to query by ODBC
Set pResponse=##class(Ens.StringResponse).%New()
Set pResponse.StringValue="TestValue12345"
Quit $$$OK
]]></Implementation>
</Method>
<XData name="MessageMap">
<Data><![CDATA[
<MapItems>
<MapItem MessageType="Ens.StringRequest">
<Method>QueryEMR</Method>
</MapItem>
</MapItems>
]]></Data>
</XData>
</Class>
<Class name="Demo.BP.Test1">
<Description>
</Description>
<Super>Ens.BusinessProcessBPL</Super>
<TimeChanged>64602,39990.699273</TimeChanged>
<TimeCreated>64602,37192.690055</TimeCreated>
<UDLText name="T">
<Content><![CDATA[
/*
*****************************************************
* ** N O T I C E ** *
* - TEST/DEMO SOFTWARE - *
* This and related items are not supported by *
* InterSystems as part of any released product. *
* It is supplied by InterSystems as a demo/test *
* tool for a specific product and version. *
* The user or customer is fully responsible for *
* the maintenance of this software after delivery, *
* and InterSystems shall bear no responsibility nor *
* liabilities for errors or misuse of this item. *
* *
*****************************************************
*/
]]></Content>
</UDLText>
<XData name="BPL">
<Description>
BPL Definition</Description>
<XMLNamespace>http://www.intersystems.com/bpl</XMLNamespace>
<Data><![CDATA[
<process language='objectscript' request='EnsLib.HL7.Message' response='EnsLib.HL7.Message' height='2000' width='2000' >
<context>
<property name='MRN' type='%String' instantiate='0' >
<parameters>
<parameter name='MAXLEN' value='50' />
</parameters>
</property>
<property name='ValueFromEMR' type='Ens.StringResponse' instantiate='0' />
</context>
<sequence xend='200' yend='550' >
<assign name="Get MRN from request" property="context.MRN" value="request.{PID:PatientIdentifierList(1).ID}" action="set" xpos='200' ypos='250' />
<call name='Request data from EMR' target='QueryEMR' async='0' xpos='200' ypos='350' >
<request type='Ens.StringRequest' >
<assign property="callrequest.StringValue" value="context.MRN" action="set" />
</request>
<response type='Ens.StringResponse' >
<assign property="context.ValueFromEMR" value="callresponse" action="set" />
</response>
</call>
<transform name='Create RSP^K22' class='Demo.DTL.Test1' source='context.ValueFromEMR' target='response' xpos='200' ypos='450' />
</sequence>
</process>
]]></Data>
</XData>
<Storage name="Default">
<Type>%Library.CacheStorage</Type>
</Storage>
</Class>
<Class name="Demo.DTL.Test1">
<Super>Ens.DataTransformDTL</Super>
<TimeChanged>64602,39933.922625</TimeChanged>
<TimeCreated>64602,36865.153108</TimeCreated>
<DependsOn>Ens.StringResponse,EnsLib.HL7.Message</DependsOn>
<UDLText name="T">
<Content><![CDATA[
/*
*****************************************************
* ** N O T I C E ** *
* - TEST/DEMO SOFTWARE - *
* This and related items are not supported by *
* InterSystems as part of any released product. *
* It is supplied by InterSystems as a demo/test *
* tool for a specific product and version. *
* The user or customer is fully responsible for *
* the maintenance of this software after delivery, *
* and InterSystems shall bear no responsibility nor *
* liabilities for errors or misuse of this item. *
* *
*****************************************************
*/
]]></Content>
</UDLText>
<Parameter name="IGNOREMISSINGSOURCE">
<Default>1</Default>
</Parameter>
<Parameter name="REPORTERRORS">
<Default>1</Default>
</Parameter>
<Parameter name="TREATEMPTYREPEATINGFIELDASNULL">
<Default>0</Default>
</Parameter>
<XData name="DTL">
<XMLNamespace>http://www.intersystems.com/dtl</XMLNamespace>
<Data><![CDATA[
<transform sourceClass='Ens.StringResponse' targetClass='EnsLib.HL7.Message' targetDocType='2.4:RSP_K22' create='new' language='objectscript' >
<assign value='"RSP^K22"' property='target.{MSH:MessageType}' action='set' />
<assign value='"test"' property='target.{QAK:Thispayload}' action='set' />
<assign value='"test"' property='target.{QPD:MessageQueryName.identifierST}' action='set' />
<assign value='"test"' property='target.{MSA:MessageControlID}' action='set' />
<assign value='source.StringValue' property='target.{MSA:TextMessage}' action='set' />
</transform>
]]></Data>
</XData>
</Class>
<Class name="Demo.NewProduction">
<Super>Ens.Production</Super>
<TimeChanged>64602,39947.44182</TimeChanged>
<TimeCreated>64602,36644.45685</TimeCreated>
<UDLText name="T">
<Content><![CDATA[
/*
*****************************************************
* ** N O T I C E ** *
* - TEST/DEMO SOFTWARE - *
* This and related items are not supported by *
* InterSystems as part of any released product. *
* It is supplied by InterSystems as a demo/test *
* tool for a specific product and version. *
* The user or customer is fully responsible for *
* the maintenance of this software after delivery, *
* and InterSystems shall bear no responsibility nor *
* liabilities for errors or misuse of this item. *
* *
*****************************************************
*/
]]></Content>
</UDLText>
<XData name="ProductionDefinition">
<Data><![CDATA[
<Production Name="Demo.NewProduction" LogGeneralTraceEvents="false">
<Description></Description>
<ActorPoolSize>2</ActorPoolSize>
<Item Name="Demo.BP.Test1" Category="" ClassName="Demo.BP.Test1" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
</Item>
<Item Name="HL7.TCP.In.35111" Category="" ClassName="EnsLib.HL7.Service.TCPService" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
<Setting Target="Host" Name="MessageSchemaCategory">2.4</Setting>
<Setting Target="Host" Name="TargetConfigNames">Demo.BP.Test1</Setting>
<Setting Target="Adapter" Name="Port">35111</Setting>
<Setting Target="Host" Name="AckMode">App</Setting>
</Item>
<Item Name="QueryEMR" Category="" ClassName="Demo.BO.Test1" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule="">
</Item>
</Production>
]]></Data>
</XData>
</Class>
<Project name="EnsExportProduction_2017-11-15 11-06-52_189-5" LastModified="2017-11-15 11:07:09.797631">
<ProjectDescription>Studio Project generated from Ensemble Production 'Demo.NewProduction' at 2017-11-15 16:06:52.189 UTC</ProjectDescription>
<Items>
<ProjectItem name="Demo.BO.Test1" type="CLS"></ProjectItem>
<ProjectItem name="Demo.BP.Test1" type="CLS"></ProjectItem>
<ProjectItem name="Demo.DTL.Test1" type="CLS"></ProjectItem>
<ProjectItem name="Demo.NewProduction" type="CLS"></ProjectItem>
<ProjectItem name="EnsExportNotes.EnsExportProduction_2017-11-15 11-06-52_189-5.PTD" type="PTD"></ProjectItem>
</Items>
</Project>
<Document name="EnsExportNotes.EnsExportProduction_2017-11-15 11-06-52_189-5.PTD"><ProjectTextDocument name="EnsExportNotes.EnsExportProduction_2017-11-15 11-06-52_189-5" description="Export Notes for export EnsExportProduction_2017-11-15 11-06-52_189-5">
<![CDATA[<Deployment>
<Creation>
<Machine>MMUNDTWIN10VM.ISCINTERNAL.COM</Machine>
<Instance>HIE1502</Instance>
<Namespace>DEMO</Namespace>
<SourceProduction>Demo.NewProduction</SourceProduction>
<Username>SuperUser</Username>
<UTC>2017-11-15 16:07:09.786</UTC>
</Creation>
<Notes>
</Notes>
<Contents>
<ExportProject>EnsExportProduction_2017-11-15 11-06-52_189-5</ExportProject>
<Item num="1">Demo.BO.Test1.CLS</Item>
<Item num="2">Demo.BP.Test1.CLS</Item>
<Item num="3">Demo.DTL.Test1.CLS</Item>
<Item num="4">Demo.NewProduction.CLS</Item>
</Contents>
<ProductionClassInExport>Demo.NewProduction</ProductionClassInExport>
</Deployment>
]]></ProjectTextDocument>
</Document></Export>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.