User bio
404 bio not found
Member since Jul 27, 2016
Replies:

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
}

}

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?KEY...

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