go to post Thembelani Mlalazi · Jun 4 I have tried what you suggested but still getting the same error <INVALID OREF> have also checked to see if the JSON string is present and checked on the instantiated object can not pin point where the error is coming from had look here they had the same problem but my guess is we are using different versions as I don't have this class in my version HS.FHIR.Validation.ResourceValidator
go to post Thembelani Mlalazi · Jun 1, 2023 I will do it like so: set tObj = {}.%FromJSON(stream) set newObj=##class(HS.FHIR.DTL.vR4.Model.Resource.*).%New() set newObj.Property=tObj.SameProperty do newObj.%Save()
go to post Thembelani Mlalazi · Jun 1, 2023 Having tested this outside a restricted environment I realised my problem was the proxy server as the htttpResponse was not being instantiated, the work around was to use the proxy sever and running everything through the proxy tunnel. ClassMethod MyReq(){set tSC=$$$OKset req = ##class(%Net.HttpRequest).%New()set req.Server = "msedgewebdriverstorage.blob.core.windows.net"set req.ProxyPort=**set req.ProxyServer="*******"set req.ProxyHTTPS=1set req.ProxyTunnel=1set req.SSLConfiguration="Open" do:tSC req.Get("/edgewebdriver/?comp=list") Do $System.OBJ.Dump(req.HttpResponse)quit tSC}
go to post Thembelani Mlalazi · Mar 13, 2023 @Eduard Lebedyuk Looking at the unpacking method I am trying to unzip a directory and looking at that you are calling some methods outside the scope I would like to test this but the link you have at the top is broken can we please see how you implement the execute and getunzip methods
go to post Thembelani Mlalazi · Feb 28, 2023 @Sabit Issakhan did you final get your download working I am trying something similar would you mind showing how you call to the API
go to post Thembelani Mlalazi · Jan 11, 2023 @Wojciech Czyz Is it possible to add a new gateway binary to the installation if your target framework is not installed. If so where can I get the binaries from.
go to post Thembelani Mlalazi · Oct 27, 2022 looking at your error I suppose you have a scheme same as the above since your error is complaining about the source class MSH which does not exist within the XML document. tSC1=target.SetValueAt(source.MSH.EncodingCharacters,"MSH:EncodingCharacters","set","") do you have this class if not then that's where the problem is look at the bold
go to post Thembelani Mlalazi · Oct 16, 2022 @Smythe Smythee the problem you are having is that the property does not exist what does your class look like. The one that handles the incoming XML and what version of HL7 are you converting to.
go to post Thembelani Mlalazi · Sep 20, 2022 I have set up this service within Ensemble using the the "EnsLib.HTTP.InboundAdapter"; if any one has done this before please advice currently I have done everything as per advices and followed through the ENSDEMO namespace examples still can not pass a JSON request
go to post Thembelani Mlalazi · Jul 20, 2022 thank you everyone the problem I have been having is caused by the Describe column invoked by the Execute procedure method on the procedure if data passed is not the same type as the stored procedure parameters the method issues a warning which is then log to the event log to stop that from happen I had to add the "*" to the pIO parameter of the method
go to post Thembelani Mlalazi · Jul 16, 2020 @Eduard Lebedyuk @Cristiano Silva Sorry if I was not clear I still need the whole XML Serial B and SerialC if populated and if I populate One segment I do not need the Other to appear.
go to post Thembelani Mlalazi · Jul 15, 2020 @Eduard Lebedyuk I have classes with the similar structure in your test.Serial class I have Two properties Serial1 and Serial2 as test.Serial1 and 2 respectively and i would like to print out XML maybe populate Serial 1 and have Serial2 as an empty object and Leave it out when printing.How do I controll that ?,as it stands it prints out the empty elements even when ignore null is set.Please not all is the same as above so I am printing from a persistent Level.The difference being I have two serial objects properties In my test.Serial equavalent
go to post Thembelani Mlalazi · Dec 16, 2019 This will do exactly what you want any problems give us shout ClassMethod ImpCSV(fileName As %String = "C:\filepath where csv file is") { ;;Refresh globals data at the begin of proecess ;;globals hold the file being written to data and the count of lines each file has k ^ufile,^ufile2,^counter,^counter2 set Reader =##class(%Stream.FileCharacter).%New() ;;link to the file to read set status=Reader.LinkToFile(fileName) if $$$ISERR(status) { do $System.Status.DisplayError(status) } ;;initialise the counter for the file lines to write to one file set ^counter =0 set ^counter2 =0 set ^ufile="" set ^ufile2="" ;;the count for the lines read in set lineCount=0 ;;start process the lines while 'Reader.AtEnd { ;;read the incoming file set line=Reader.ReadLine() ;;increment the line count by one as you read the next line set lineCount=lineCount+1 ;;piece the column to check ;;one is for the first column and so on ;;string at after the equal sign is the value to check for if ($piece(line,",",1)="Religion") { ;;increment count for this file set ^counter=^counter+1 ;;the counter is at one to assign the file path to write to if (^counter=1) { ;;set the file name to write to the global set ^ufile=..writeFileOut("fileone",".csv",line,,^counter) } else { ;;check the count has no reached the limit for the number of lines to write to if (^counter=51) { ;;reset the count if limit reach set ^counter=1 ;;new file set ^ufile =..writeFileOut("fileone",".csv",line,,^counter) } else { ;;use the current file do ..writeFileOut(,,line,,^counter,"REG") } } } ;;second check for the next set of data if you have more than ;;two to check for copy the below and change accordingly to accommodate the next check ;;same as above if ($piece(line,",",1)="description") { ;;set attributes for the second file to write to set ^counter2=^counter2+1 if (^counter2=1) { set ^ufile2=..writeFileOut("fileTwo",".csv",line,,^counter2) }else { if (^counter2=51) { set ^counter2=1 ;;new file set ^ufile2= ..writeFileOut("fileTwo",".csv",line,,^counter2) }else { do ..writeFileOut(,,line,,^counter2,"DESC") } } } } kill ^ufile,^ufile2 } ClassMethod writeFileOut(filename, fileext As %String, line As %String, directory = "C:\directory to store files", linecount As %Integer, FileToUse) { set oLF = ##class(%Library.File).%New() if (linecount=1) { Set filenam=directory_filename_$i(^timmmy)_fileext set oLF.Name=filenam if (oLF.Open("wns")) { set linecount=linecount+1 do oLF.WriteLine(line) do oLF.Close() ;;w oLF.Name quit oLF.Name } }else { if (FileToUse="DESC") { if (^ufile2'="") { set oLF.Name=^ufile2 } }elseif(FileToUse="REG") { if (^ufile'="") { set oLF.Name=^ufile } } If (##class(%File).Exists(oLF.Name)) { Do oLF.Open("EWA") if (linecount'=51) { set linecount=linecount+1 do oLF.WriteLine(line) do oLF.Close() quit oLF.Name } } } }
go to post Thembelani Mlalazi · Nov 29, 2019 Hi Jenna Poindexter Yes %Populate exists but that's not what I am referring to the above is the correct answer by Alexander Koblov. I was referring to this class %Library.CachePopulate not what you are pointing me to
go to post Thembelani Mlalazi · Sep 27, 2019 @Suman Samanta Please have a look at this question I posted earlier if you still need more code let me know here
go to post Thembelani Mlalazi · Sep 27, 2019 @Tomas Vaverka Yes that right but I know that the question may be was not clear I have an object class which has two properties one a string and a stream and was trying to pass that object ,all I could do was pass a string and an empty stream but I have read around the stream and found out that I can pass a stream as a stream but not inside an object thanks again
go to post Thembelani Mlalazi · Sep 25, 2019 @Hansel Rudy Stange Gaete I am trying to send a pdf document encoded to base64 which means the size could vary depending on the document