go to post Enrico Parisi · Aug 1, 2024 "...do I check the status for Prepare and Execute methods?" No, you don't, but you should.
go to post Enrico Parisi · Jul 31, 2024 Set dynOBJ={}.%FromJSONFile("c:\temp\BundleSample.json")Set firstResource=dynOBJ.entry.%Get(0).resourceWrite firstResource.resourceType
go to post Enrico Parisi · Jul 30, 2024 In the Management Portal go to Interoperability (choose namespace if asked) -> List -> Productions There, do you see the production you need to open?If yes, select the production line from the list and click the "Open" button below the title bar. What do you get?
go to post Enrico Parisi · Jul 26, 2024 USER>DO HELP^%G The %G utility displays global nodes. A "?" at the "Global ^" promptdisplays the global directory. If you enter just the name of a global,%G displays the entire global. You may also display a portion of theglobal at different subscript levels or specific nodes. A complete global reference, such as ^GLO(3,"BED",5) will displayonly that particular node. You may specify a subtree, such as^GLO(3,"BED", to display all descendants of that node. To displayboth the node and its descendants, do not end your entry with acomma or a right parenthesis. You can leave a subscript field empty when you specify the subtree andthe %G utility displays any nodes matching the other subscripts:^GLO(,"BED") will match any nodes with 'BED' as the second subscript. You can specify a range of subscripts for a particular subscriptlevel by inserting a colon between the first and last subscript in therange: ^PT(1,"ACC":"BIRTH" You can use variables and simple expressions in a subscriptspecification by assigning a value to the variable before calling %G.For example SET ID=214 and enter something like ^PT(ID,0).
go to post Enrico Parisi · Jul 26, 2024 You don't provide enough information to help you. Can you please provide some more detail on how you are "reading" "message_code"? What kind of object/class and how you load/populate "response" when you mention "response.message_code"? What product/version are you using?
go to post Enrico Parisi · Jul 25, 2024 The RoutineList query in %Routine class does offer ranges, try this: Set Query=##class(%Routine).RoutineListFunc("%D:%E")Do Query.%Display() EnricoP.S.: Tested in latest IRIS, I'm not sure that the "Func" query method is available in 2017, but you can use your old %ResultSet with same parameters.
go to post Enrico Parisi · Jul 18, 2024 It has happened to me a few time not having access to terminal (OS or IRIS). For this situation I developed a quick and dirty CSP class to allow me to execute IRIS or OS commands. Class SomePackege.Cmd Extends %CSP.Page { ClassMethod OnPage() As %Status { &html<<html> <head> </head> <body> <form> <input type="text" name="cmdOS" size="150" value='#(%request.Get("cmdOS"))#'> <input type="submit" value="runOS" onclick="this.form.submitted.value=this.value;" > <br/> <input type="text" name="cmd" size="150" value='#(%request.Get("cmd"))#'> <input type="submit" value="runCMD" onclick="this.form.submitted.value=this.value;" > <input type="hidden" name="submitted"> </form> > If (%request.Get("submitted")="runOS") && (%request.Get("cmdOS")'="") { Set cmdOS=%request.Get("cmdOS") Set io=$io Open cmdOS:"QR" Write "<tt>" Try { For Use cmdOS Read line Use io Write $replace(..EscapeHTML(line)," "," "),"<br>" } Catch CatchError { Set sc=CatchError.AsStatus() } Use io Write "</tt>" Close cmdOS Use io } ElseIf (%request.Get("submitted")="runCMD") && (%request.Get("cmd")'="") { Set cmd=%request.Get("cmd") Write "<pre>" x cmd Write "</pre>" } &html<</body> </html>> Quit $$$OK } } Once the class is loaded (say, from Studio or VS code) in one namespace, just call it from the default csp/web application, for example: http://yourhost:57772/csp/user/SomePackage.Cmd.cls Please note that the UI is very, very, VERY rudimental (ugly), but gets the job done in case of need.
go to post Enrico Parisi · Jul 4, 2024 I'm puzzled by the fact that the two $$$LOGINFO() are present in the trace when an exception should have raised BEFORE the $$$LOGINFO(). The code posted is not the code that generated that trace. And this is very confusing. Maybe the code was modified without restarting the Business Operation?
go to post Enrico Parisi · Jul 4, 2024 ..Adapter.Credentials.Username and ..Adapter.Credentials.Password Credentials property of EnsLib.FTP.InboundAdapter is %String, so I expect an <INVALID OREF> error. In general, I'd suggest to put your code inside a Try/Catch, something like: Set sc=$$$OK Try { ; your code here } Catch CatchError { #dim CatchError as %Exception.SystemException Set sc=CatchError.AsStatus() } Quit sc
go to post Enrico Parisi · Jul 2, 2024 Just tested using IRIS for Health 2022.2 installed in a temp VM and it works fine. Can you share the terminal output when you run that code?
go to post Enrico Parisi · Jul 2, 2024 Did you try from terminal using the EXACT code I posted? What product are you using? You mention "IRIS 2022.2" is it IRIS for Health?
go to post Enrico Parisi · Jul 2, 2024 Using your code (simplified by me) from terminal it works fine using a sample CCDA from here. set ccdaStream = ##class(%Stream.FileBinary).%OpenId("c:\temp\CCDA_CCD_b1_Ambulatory_v2.xml") write "Size of CCDA Stream: ", ccdaStream.Size,! set xsltTransform = "SDA3/CCDA-to-SDA.xsl" set tTransformer = ##class(HS.Util.XSLTTransformer).%New() set tSC = tTransformer.Transform(ccdaStream, xsltTransform, .sdaStream) if 'tSC write "Transformation to SDA3 failed with error ",$system.Status.GetErrorText(tSC),! set fhirStream = ##class(%Stream.TmpBinary).%New() set SDA3ToFHIRObject = ##class(HS.FHIR.DTL.Util.API.Transform.SDA3ToFHIR).TransformStream(sdaStream, "HS.SDA3.Container", "R4") if '$isobject(SDA3ToFHIRObject.bundle) write "Failed to transform SDA3 to FHIR",! do SDA3ToFHIRObject.bundle.%ToJSON() The result/output is a pretty long JSON FHIR bundle with CCDA data (I didn't check the content!) Does your code works with that sample CCDA? If not, then maybe there is something wrong in your CCDA. For my test I used: IRIS for Windows (x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:35:10 EDT
go to post Enrico Parisi · Jun 30, 2024 From %ResultSet.SQL Class Reference: This class has been superseded. It will remain for compatibility with existing code and samples. We recommend using %SQL.Statement.
go to post Enrico Parisi · Jun 30, 2024 To lock a persistent object (in different modes) use the second argument of the %OpenId() method as described in Object Concurrency Options documentation.
go to post Enrico Parisi · Jun 28, 2024 You need to pass each argument separately, this will work: d $ZF(-100,"/logcmd", "qpdf", "--encrypt", "test123", "test123", "256", "--", "C:\test\basement.pdf", "c:\test\basementenc.pdf")