how can I get the classMethod name ?
like we get class name using "$CLASSNAME($THIS)", same way I need class Method ?
I have dynamic sql select query ,
Set resultset = ##class(%ResultSet).%New()
set sql = "SELECT COUNT(*) FROM "_tableName_" WHERE "_fieldName_">='"_fromDate_"' AND "_fieldName_"<='"_currentDate_"'"
SET SC = resultset.Prepare(sql)
SET SC = resultset.Execute(sql)
How can I print/view the count ?
Hi ,
I have a scheduler task and an 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 above task "CreateTask()" from an external function/Method/class ?
Hi All,
How can I customize the file path of my FTP outbound adapter.
I have a custom business operation that extends "EnsLib.FTP.InboundAdapter", in which I need to update the file path of my FTP server location.
Hi ,
I receive below JSON from a https outbound operation
{
"Link": "www.sample.com",
"Practice": [
{
"Node": "Record1"
}
]
}
I am able to read Link as - JSON.%Get("Link")
How can I read Node value ?
Hi ,
I am sending my DTL response (which is an xml stream) to an FTP out location.
My XML stream has CRLF , but after sending FTP'ing out , it displays as LF
before writing it to FTP
At FTP out location
.png)
What Chatset will do it ? Currently Charset is set as Binary.
Appreciate quick response.
I have below method , which receives a PDF ; this method throws error for a PDF file of 3MB size
<MAXSTRING>zBase64Encode+9 -- logged as '-' number - @' set encodedData = $system.Encryption.Base64Encode(content)'
How do I fix this.
----------------
ClassMethod Base64Encode(pStream As %Stream) As %Stream
{
set tSC = $$$OK
set tSC = pStream.Rewind()
s pEncoded=##class(%Stream.GlobalCharacter).%New()
while 'pStream.AtEnd {
Set tLen = pStream.Size
set content = pStream.Read(.tLen)
set encodedData = $system.Encryption.Base64Encode(content)
set encodedData=$tran
Hi All ,
I would like to add session ID to the fileName in an FTP out pass thru business operation.
How can I do that ?
<Setting Target="Host" Name="Filename">SessionID_%f_%Q.txt</Setting>
I am converting a HL7 msg to xml and one of the field is as below -
DTL = <assign value='"Message"' property='target.{req.ID.scope}' action='set' />
DTL response = <ID scope='Message'>3</ID>
my xsd has -
<xsd:element name="ID">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SimpleContent" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="scope"/>
</xsd:complexType>
</xsd:element>
I would like to get it DTL response as = <ID scope="Message">3</ID>
Message in double quotes as - "Message"
Is there a way to get xml attribute in double quotes ? How can I do that ?
I receive a number as input
length = ln = 7
if input = 25
I need to add zeros to make make it as - 0000025 (a total length of ln)
if input = 9
I need to add zeros to make make it as - 0000009 (a total length ofln)
..AppendTimestamp in FTP
what are the different values that can be passed to ..AppendTimestamp in FTP ?
Can we pass dynamic values to it ? if so how can we do that ?
I have an SQL table as below (columns - ID and Value)
I will get an ID number (first column) as an input from FTP inbound , and after that I have to query table taking ID as an input to get all the values for the ID
as -
if ID = 11 ; QRY output = aaa,bbb
if ID = 22 ; QRY output = xxx,yyy,zzz
can someone help me with query
ID Value
----------
11 aaa
22 xxx
22 yyy
11 bbb
22 zzz
-----------
Hi,
I am using this "$ZDATETIME($h,3,1,3)" and getting response as 2024-09-03 12:07:45.000
But I need proper values at the end instead of zeros (000)
Something like below -
2024-09-03 12:07:45.658
I have a requirement where in I had to read a HL7 message string ( which is a String )
from a SQL TBL to my Business Service.
and I need to convert that string to EnsLib.HL7.Message format and traverse through the PID segment.
I need some inputs please.
Hi All ,
I have a dateTime in the format = "2024-08-07 17:58:51.563"
I need the difference between current date time and above one
I need it in seconds.
How can I convert
From = 2024-07-04 13:21:16.477
To = 20240704132116
I receive request xml object as
pRequest =
<getURL>
<Url1><.png)
I receive dateTime in this format - yyyy-mm-ddThh:mm:ss+01:00
for ex : 2024-05-31T17:33:08+01:00
I wanted it to convert to yyyymmddhhmmss
desired output = 20240531173308
I would like to send bundle object to a router and then
perform a DTL with in the routing rule ( this BundleObject as a source to my DTL).
during this process , I get below exception
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 - @''
Hello Community,
I have below issue -
I have an ID with 123456.(ID as a dynamic value coming from request message)
I wanted it to be displayed as "123456" in Json Stream.
Code Example:
set object = ##class(%ZEN.proxyObject).%New()
set object.ID = ID
set x = ##class(%ZEN.Auxiliary.jsonArrayProvider).%WriteJSONStreamFromObject(.json,object)
Case:1
ID : 123456
Will output:
{
"ID": 123456
}
but I need :
{
"ID": "123456"
}
Case:2
ID : "123456" (adding double quotes)
Will output:
{
"ID": "\"123456\""
}
but I need :
{
"ID": "123456"
}
Thanks in advance.
I am receiving an XML input to my router and in the routing rule I need to traverse through the xml data , apply a for loop and fetch data.
How can I do that ?
Input :
<?xml version="1.0" encoding="UTF-8"?>
<Input>
<data>
<Ids>
<Id>
<Type>A</Type>
<Value>123</Value>
</Id>
<Id>
<Type>B</Type>
<Value>456</Value>
</Id>
</Ids>
</data>
</Input>
I would like to read 123 from above xml in a rule ..
How can I extract the sub-string before the last occurance of a delimeter in a string.
string = "aaDtext1Dtext2"
Delimeter = D
answer I need = aaDtext1
I need to convert dd/mm/yyyy --> yyyymmdd
example
Input = 25/03/1988
expected Output = 19880325
I need to convert "dd/MMM/yy" to "YYYYmmdd".
Input = dd/MMM/yy
Output = YYYYmmdd
example
Input = 13/Jun/23
Output = 20230613
I used below , I get 1923 as year but I need 2023.
$ZDATE($ZDATEH("13/Jun/23",8),8) = 19230613