Krishnaveni Kapu · Mar 31, 2025 go to post

Is there a way to get the calling method name ?

If a methodB() is invoked in MethodA() ;

In MethodB() , I would like to print the calling method name i.e., MethodA()

Krishnaveni Kapu · Mar 28, 2025 go to post


Status OK

and the cnt as empty (I am expecting the count)

-------------------------------

Set resultset = ##class(%ResultSet).%New("%DynamicQuery:SQL")
set sql = "SELECT COUNT(*) AS CNT FROM "_tableName_" WHERE "_fieldName_">='"_fromDate_"' AND "_fieldName_"<='"_currentDate_"'"  
SET SC = resultset.Prepare(sql) 
$$$LOGSTATUS(SC)
SET SC = resultset.Execute(sql)
$$$LOGSTATUS(SC)   
if (resultset.GetData(1)>0)
$$$TRACE("cnt="_resultset.GetData(1))

-------------------------------

Krishnaveni Kapu · Mar 28, 2025 go to post

set sql = "SELECT COUNT(*) FROM "_tableName_" WHERE "_fieldName_">='"_fromDate_"' AND "_fieldName_"<='"_currentDate_"'"

   SET SC = resultset.Prepare(sql)

    SET SC = resultset.Execute(sql)
    Set recordsDeleted = resultset.GetData(1)
    $$$TRACE("recordsDeleted="_recordsDeleted)

Tried this , its not displaying the count ; 

Krishnaveni Kapu · Mar 4, 2025 go to post

Hi Eduard,

I have a scheduler task and associated class that works.

Class Sample.Util.CreateTask Extends (%SYS.Task.Definition, %Persistent)
{

Parameter PROPERTYVALIDATION = 1;

Parameter TaskName = "Sample.Util.CreateTask";

Method OnTask() As %Status
{
// Perform the logic
}

}

Is there a way to Enable or Disable the abbove task "CreateTask()" from an external function/Method/class ?

Krishnaveni Kapu · Sep 27, 2024 go to post

I tried using "w" also "wt" - no luck.

Below is the version that I am using

IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:13:58 EDT [HealthConnect:3.5.0] [HealthConnect:3.5.0]

Krishnaveni Kapu · Jun 17, 2024 go to post

It worked :

set status = pRequest.XMLExportToStream(.XmlStream)      

 Do httpRequest.EntityBody.CopyFrom(XmlStream)

Krishnaveni Kapu · Jun 17, 2024 go to post

Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")

This is removing CDATA from the xml.

Krishnaveni Kapu · Jun 17, 2024 go to post

Class TEST.pRequest Extends (%Persistent, %XML.Adaptor)
{

Property getURL As %String(MAXLEN = 10000000);

}

==================================

Class TEST.Operation.UrlOP Extends Ens.BusinessOperation
{

Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter";

Parameter INVOCATION = "Queue";

Method UrlApi(pRequest As TEST.pRequest, Output pResponse As TEST.pResponse) As %Status
{
    
        Set httpRequest= ##class(%Net.HttpRequest).%New()
        Set httpRequest.Server = ..Adapter.HTTPServer
        Set httpRequest.Location = ..Adapter.URL
        Set httpRequest.SSLConfiguration = ..Adapter.SSLConfig
        Set httpRequest.SSLCheckServerIdentity = 0
        Set httpRequest.Https = $$$YES
        Set httpRequest.ContentType = "application/xml"
        Set XmlStream = ##class(%Stream.GlobalCharacter).%New()
        Do XmlStream.Write("<?xml version=""1.0"" encoding=""UTF-8""?><getURL><Url1>"_pRequest.getURL_"</Url1></getURL>")
        //instead of above lines of code I would like to send pRequest into a stream 
        Do httpRequest.EntityBody.CopyFrom(XmlStream)
        Set sc = httpRequest.Post("", 2)
}    

QUIT $$$OK    

XData MessageMap        
{
<MapItems>
  <MapItem MessageType="TEST.pRequest">
    <Method>UrlApi</Method>
  </MapItem>
</MapItems>
}
}

=====================================

Krishnaveni Kapu · May 23, 2024 go to post

 This is how I am doing :

---------
 
Class PKG.ObservationWrapper Extends %Persistent
{

Property bundleReq As HS.FHIR.DTL.vR4.Model.Resource.Bundle;

}

-------

Set wrapperBundleObj =  ##class(PKG.ObservationWrapper).%New() 
Set wrapperBundleObj.bundleReq = ##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")
Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", wrapperBundleObj.bundleReq)

 expection :
 
 ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''
 
 =======================================

Krishnaveni Kapu · May 23, 2024 go to post

I have similar requirement ; I would like to send bundle object to a router and then
 perform a DTL with in the routing rule ( this BundleObject as a souce to my DTL).
 during this process , I get below expection 
 
 reqStream = json content in a stream
 
 Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(reqStream,"vR4")
 
 Set tSC = BusinessService.SendRequestSync("SAMPLE_ROUTER", BundleObj)
 
 expection :
 
 ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zNewRequestMessage+4^Ens.MessageHeader.1 *%GetSwizzleObject,HS.FHIR.DTL.vR4.Model.Resource.Bundle -- logged as '-' number - @''

Krishnaveni Kapu · May 15, 2024 go to post

Hi All ,

It is solved :

Using this earlier :

d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aelqtw")

using the below solved the issue :

d ##class(%ZEN.Auxiliary.jsonProvider).%WriteJSONStreamFromObject(pTarget.EntityBody,pRequest,,,1,"aeltw")