thanks for your help, it works :)
- Log in to post comments
thanks for your help, it works :)
Hy @Arshiya Syeda
Thank you for your help, but it doesn't work, I just try like this and it give an error
Hy @AshokKum
Thank you for your help, but it doesn't work, I just try like this and it give an error
Thanks you but nothing I can get here
no example or other way
thanks for your help but not works, still I need some clue
Dear Robert,
this is my classname
.png)
but it doesn't work when I try to put this, it display empty when I try to call it
.png)
yes, that right, I look for a different return
But I've no idea for that
I've try but it doesn't work
maybe I do something wrong
I'm not using object, just an ordinary query
I've no idea how to call this method
ClassMethod GetSphereJauh(Id As %String) As %String ----this is the second method
{
set Id=$zstrip(Id,"*C")
set (ID,OBSATParRef,OBSATValue,ATTRCode,ATTRDesc)=""
// Query Data Encounter
&sql(declare adm cursor for
select
OBS_ParRef,
OBSAT_ParRef,
OBSAT_Value,
OBSAT_ItemAttribute_DR ->ATTR_Code,
OBSAT_ItemAttribute_DR ->ATTR_DESC
into :ID,:OBSATParRef,:OBSATValue,:ATTRCode,:ATTRDesc
from SQLUser.MR_ObservationsAttribute
Join SQLUser.MR_Observations on OBS_RowId = OBSAT_ParRef
Join SQLUser.MRC_ObservationItemAttribute on ATTR_RowId = OBSAT_ItemAttribute_DR
where OBSAT_ParRef =:Id and ATTR_Code ='EKA.Sphere.OD' )&sql(open adm)
for {
&sql(fetch adm)
quit:SQLCODE'=0
set ind=ind+1
set ^||IRISTemp("TRAK",repid,ind)=$lb(ind,ID,OBSATParRef,OBSATValue,ATTRCode,ATTRDesc)
}&sql(close adm)
// Build QHandle (AtEnd,ReportID,Index)
set QHandle=$listbuild(0,repid,0)
set QHandle(1)=mon
quit $$$OK
}ClassMethod GetSphereJauh(Id As %String) As %String
{
set Id=$zstrip(Id,"*C")
set (ID,OBSATParRef,OBSATValue,ATTRCode,ATTRDesc)=""
// Query Data Encounter
&sql(declare adm cursor for
select
OBS_ParRef,
OBSAT_ParRef,
OBSAT_Value,
OBSAT_ItemAttribute_DR ->ATTR_Code,
OBSAT_ItemAttribute_DR ->ATTR_DESC
into :ID,:OBSATParRef,:OBSATValue,:ATTRCode,:ATTRDesc
from SQLUser.MR_ObservationsAttribute
Join SQLUser.MR_Observations on OBS_RowId = OBSAT_ParRef
Join SQLUser.MRC_ObservationItemAttribute on ATTR_RowId = OBSAT_ItemAttribute_DR
where OBSAT_ParRef =:Id and ATTR_Code ='EKA.Sphere.OD' )&sql(open adm)
for {
&sql(fetch adm)
quit:SQLCODE'=0
set ind=ind+1
set ^||IRISTemp("TRAK",repid,ind)=$lb(ind,ID,OBSATParRef,OBSATValue,ATTRCode,ATTRDesc)
}&sql(close adm)
// Build QHandle (AtEnd,ReportID,Index)
set QHandle=$listbuild(0,repid,0)
set QHandle(1)=mon
quit $$$OK
}
And I want to call this method Inside this main method
ClassMethod GetDataExecute(ByRef QHandle As %Library.Binary, Id As %String) As %Library.Status
{
//Start Monitor (if configured to capture stats)
set mon=..MonitorBegin()
// Get reportid i.e. use $INCREMENT to add another node to ^IRISTemp global.
// We use ^IRISTemp global because it will always use memory before disk
// Use $Increment to get the next node
set repid=$increment(^||IRISTemp("TRAK"))
if $data(^||IRISTemp("TRAK",repid)) {
kill ^||IRISTemp("TRAK",repid)
}
set ind=0
// Build data into ^IRISTemp("TRAK",ReportID)
set Id=$zstrip(Id,"*C")
//set EpisodeId=$zstrip(EpisodeId,"*C")
//set PatientId=$zstrip(PatientId,"*C")
set (ID,EpisodeID,PatientID,PAPMINAME2,PAPMINAME,Age,Address)="" // Query Data Encounter
&sql(declare adm cursor for
select
DISTINCT(OBS_ParRef),
MRADM_ADM_DR->PAADM_RowID EpisodeId,
PAADM_PAPMI_DR->PAPMI_RowId PatientId,
PAADM_PAPMI_DR->PAPMI_Name2,
PAADM_PAPMI_DR->PAPMI_Name,
PAADM_PAPMI_DR->PAPMI_PAPER_DR->PAPER_AgeYr Age,
PAADM_PAPMI_DR->PAPMI_PAPER_DR->PAPER_StName
into :ID,:PatientID,:PAPMIRowID,:PAPMINAME2,:PAPMINAME,:Age,:Address
from SQLUser.MR_Observations
join SQLUser.PA_PatMas on PAPMI_RowId=PAADM_PAPMI_DR
join SQLUser.PA_Person on PAPER_RowId=PAPMI_PAPER_DR
where OBS_ParRef =:Id)
&sql(open adm)
for {
&sql(fetch adm)
quit:SQLCODE'=0
set ind=ind+1
//set SphereJauh=..GetSphereJauh(ATTRDesc) ----Here I try to call this method
set ^||IRISTemp("TRAK",repid,ind)=$lb(ind,ID,PatientID,PAPMIRowID,PAPMINAME2,PAPMINAME,Age,Address,SphereJauh) }
&sql(close adm)
// Build QHandle (AtEnd,ReportID,Index)
set QHandle=$listbuild(0,repid,0)
set QHandle(1)=mon
quit $$$OK
}
It will give me an empty row, there's no data when I try to call the second method, but if I comment the calling for second method, it will display the data
Dear Julius Kavay,
sorry I'm not using Object script
I'm still using Query in my script