Ian Pears · Jan 31, 2025 go to post

you could try 

w $ZDATETIME(+$H_","_($p($h,",",2)-10800),3)

there will be many ways.

Ian Pears · Nov 29, 2024 go to post

hi Rochdi,

what version of ensemble/iris are you using?

I think it will work in ensemble (I tested in 2017.2) but I'm trying to find out how to configure in iris2022 (I think it's changed) .

the below is my 2017.2 - if I omit the foxit/adobe path then images are not shown on the pdf

Ian Pears · Sep 3, 2024 go to post

this may help

ClassMethod testCount() 
{ 
    s f=##class(%Stream.FileCharacter).%New() 
    s ff="C:\CACHEDB\ATEST.xml" d f.LinkToFile(ff) 
    s tDoc=##class(EnsLib.EDI.XML.Document).ImportFromFile(ff,,.pOutput) 
    w pOutput,! 
    q:pOutput'=1 
    s numDoc=tDoc.GetValueAt("/DocumentS/Document[*]") 
    w "numbers of Document "_numDoc,! 
}
Ian Pears · Dec 1, 2023 go to post

Hi Mary,
this may work for you.
It could do with a tidy up but should put you on the correct path.
You can use this for testing -
https://wiki.discoverydataservice.org/index.php?title=Dummy_NHS_numbers

ClassMethod ValidNHS(pNHS As %String = "", Output pFailReason) As %Boolean
{
IF pNHS'?10N {
set pFailReason = "Num"
Quit 0
}
set nCheckdigit = $Extract(pNHS,10,10)
set nChi9Digits = $Extract(pNHS,1,9)
set nMultFact = 2
set nCalcCheckdigit = 0

for i = 9 : -1 : 1
{
set nThisDigit = $Extract(nChi9Digits,i,i)
set nCalcCheckdigit = nCalcCheckdigit + (nThisDigit * nMultFact)
set nMultFact = nMultFact + 1
}
set nCalcCheckdigit = (nCalcCheckdigit # 11)
set nCalcCheckdigit = 11 - nCalcCheckdigit
if (nCalcCheckdigit = 10)
{
set pFailReason = "ChkDig"
Quit 0
}
if (nCalcCheckdigit = 11)
{
set nCalcCheckdigit = 0
}
if (nCheckdigit = nCalcCheckdigit)
{
set pFailReason = ""
Quit 1
}
Else
{
set pFailReason = "ChkDig match"
Quit 0
}
}

Ian Pears · Sep 22, 2023 go to post

hopefully this is what you mean.
$$$LOGINFO("this is the first line "_$c(13,10)_"this is second line"_$c(13,10)_" this is third line")

Ian Pears · Jun 7, 2023 go to post

hi Rochdi,

try adding at top of page (where you have the Properties)

Parameter JSINCLUDES = "js/BrowserPrint-3.1.250.min.js";

I've not used BrowserPrint.

Hopefully this works for you.

Ian Pears · Apr 18, 2023 go to post

hi Rochdi,
the following may work

zen('Asset').executeQuery('true');
zen("Asset").refreshContents(true);

Ian Pears · Sep 5, 2022 go to post

sorry, I should have read all the messages. I can see you have enough disk space.
Contact WRC

Ian Pears · Sep 5, 2022 go to post

hi Rochdi,
what purge have you got for the journals and when did you last perform a backup?
What space is available in yr journal and alt-journal directory?
Ian

Ian Pears · Sep 2, 2022 go to post

hi andy, it's in older cache/ensemble e.g. 2017 -- you'll find it in the samples namespace - class ZENDemo.home (open this in browser from studio and it's a good start). ZENApp.Helpdesk class is also a great help

Ian Pears · Jul 6, 2022 go to post

rushed this out but may help. Remember utc
you could extend the rules and then these would appear in the function dropdown. This would allow you to use objectscript to return the starttime and another method to return the enddatetime.
You'd need to focus on yr default values in case any "in" values are invalid and for the second method - the 'duration' is this always in seconds?

e.g
Class GEN.Transform.cusFunctions Extends Ens.Rule.FunctionSet [ ProcedureBlock ]
{

ClassMethod retStartTime(in1 As %String = "", in2 As %String = "") As %String
{
s ret="" //default value?
q:in1="" ret
q:in2="" ret
s ret=$zdt($zdth(in1_" "_in2,4),3,7)
q ret
}

ClassMethod retEndTime(in1 As %String = "", in2 As %String = "", in3 As %String = "") As %String
{
s ret="" //default value?
q:in1="" ret
q:in2="" ret
q:in3="" ret
//need to determine if in3 is always in seconds - if yes then following may work
s dt=$zdth(in1_" "_(in2),4)
s $p(dt,",",2)=$p(dt,",",2)+in3
s ret=$zdt(dt,3,7)
q ret
}

-------
test from terminal
BPTLIVE>w in1
07/05/2022
BPTLIVE>w in2
14:30
BPTLIVE>w in3
30
BPTLIVE>w ##Class(GEN.Transform.cusFunctions).retStartTime(in1,in2)
2022-05-07T13:30:00Z
BPTLIVE>w ##Class(GEN.Transform.cusFunctions).retEndTime(in1,in2,in3)
2022-05-07T13:30:30Z
BPTLIVE>

Ian Pears · Mar 22, 2022 go to post

hi Lewis,
Search for 'Handling the UTC Time Zone Indicator'' in the documentation.
This may help you.
Property TimeCollected As %Time(XMLTIMEZONE = "IGNORE");

Ian Pears · Nov 24, 2020 go to post

don't know if this is faster but it may help
Pass in your date

ClassMethod testD(inDate As %String = "") As %String
{
s dd=""
&SQL(SELECT TO_TIMESTAMP(:inDate,'YYYYMMDDHHMISS') INTO :dd)
q dd
}