go to post Steven Henry Su... · Sep 28, 2023 Hy @Arshiya Syeda Thank you for your help, but it doesn't work, I just try like this and it give an error
go to post Steven Henry Su... · Sep 28, 2023 Hy @AshokKum Thank you for your help, but it doesn't work, I just try like this and it give an error
go to post Steven Henry Su... · Aug 7, 2023 Thanks you but nothing I can get here no example or other way
go to post Steven Henry Su... · Aug 6, 2023 thanks for your help but not works, still I need some clue
go to post Steven Henry Su... · Aug 6, 2023 Dear Robert, this is my classname but it doesn't work when I try to put this, it display empty when I try to call it
go to post Steven Henry Su... · Aug 6, 2023 yes, that right, I look for a different return But I've no idea for that
go to post Steven Henry Su... · Aug 4, 2023 I've try but it doesn't work maybe I do something wrong I'm not using object, just an ordinary query
go to post Steven Henry Su... · Aug 4, 2023 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_DESCinto :ID,:OBSATParRef,:OBSATValue,:ATTRCode,:ATTRDescfrom SQLUser.MR_ObservationsAttribute Join SQLUser.MR_Observations on OBS_RowId = OBSAT_ParRefJoin SQLUser.MRC_ObservationItemAttribute on ATTR_RowId = OBSAT_ItemAttribute_DRwhere 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)=monquit $$$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_DESCinto :ID,:OBSATParRef,:OBSATValue,:ATTRCode,:ATTRDescfrom SQLUser.MR_ObservationsAttribute Join SQLUser.MR_Observations on OBS_RowId = OBSAT_ParRefJoin SQLUser.MRC_ObservationItemAttribute on ATTR_RowId = OBSAT_ItemAttribute_DRwhere 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)=monquit $$$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_StNameinto :ID,:PatientID,:PAPMIRowID,:PAPMINAME2,:PAPMINAME,:Age,:Addressfrom SQLUser.MR_Observations join SQLUser.PA_PatMas on PAPMI_RowId=PAADM_PAPMI_DRjoin SQLUser.PA_Person on PAPER_RowId=PAPMI_PAPER_DRwhere 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
go to post Steven Henry Su... · Aug 4, 2023 Dear Julius Kavay, sorry I'm not using Object script I'm still using Query in my script