User bio
404 bio not found
Member since Jul 27, 2016
Posts:
Replies:
Young Bae · Jul 11, 2019 go to post

Maybe you can try this Business opertion in Ensemble/HealthShare to a stored procedure in Cache.

BO:
Class User.TestSQLOperation Extends Ens.BusinessOperation
{
Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
Property Adapter As EnsLib.SQL.OutboundAdapter;
Parameter INVOCATION = "Queue";
Method OnMessage(pRequest As Ens.Request, Output pResponse As Ens.Response) As %Status
{
    set tSC = $$$OK
    SET sql="{?=call api.SimpleSP(?,?)}"
    set tSC=..Adapter.ExecuteProcedure(.rs,.out,sql,"oii",2,"Hello1")
    
    quit tSC
}
XData MessageMap
{
<MapItems>
                <MapItem MessageType="Ens.Request">
                                <Method>OnMessage</Method>
                </MapItem>
</MapItems>
}
}

SP:

Class api.TestSQL [ Abstract ]
{
ClassMethod SimpleMethod(Id As %String, Name As %String) As %Status [ SqlName = SimpleSP, SqlProc ]
{
                Set ^localData("Test")=$G(Id)_" "_$G(Name)
                If $L(Id) {
                                Set ^localData(Id)=$G(Name)
                }
                Quit $$$OK
}
}

Young Bae · Nov 14, 2018 go to post

@Wilber Tang, Thanks to your example, I have resolved my problem.

I was developing in a transformation in Ensemble, and could successfully remove an invalid OBX segment with the line below:

<assign value='' property='target.{PIDgrpgrp(k1).ORCgrp(k2).OBXgrp(k3).OBX}' action='remove' key='k3' />

Young Bae · Jul 25, 2018 go to post

It is a bit confusing when it comes to ORCgrp for XML Path. I have tried this one and it works well for OBR segment. Probably you can apply the similar path to OBX iteration to get what you want.

set msg = ##class(EnsLib.HL7.Message).%OpenId(id)

if (msg.GetValueAt("MSH:SendingApplication") [ "APOLLO") {

...

if (auth["AUSNATA") {

set un=msg.GetValueAt("PIDgrp.PID:PatientIDInternalID(1).ID")

set rq=msg.GetValueAt("ORCgrp(1).OBRuniongrp.OBRunion.OBR:FillerField1")

...

}

}

If you need more references for this XMLPath, try this one which I found the most useful: 
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Certifications & Credly badges:
Young has no Certifications & Credly badges yet.
Followers:
Young has no followers yet.
Following:
Young has not followed anybody yet.