go to post José Pereira · Feb 16 Hi Prashanth, I had a similar requirement once. The following is how I managed it: First, I setup a method in a CSP dispatch class, which respond to a REST endpoint, to invoke a Business Service in the current namespace working production: ClassMethod SomeRestEndpointCallback(body As %DynamicArray) As %DynamicObject { $$$TOE(st, ##class(Ens.Director).CreateBusinessService("BusinessServiceName", .service)) $$$ThrowOnError(service.ProcessInput(body, .output)) Return output } Then, I created a adapterless Business Service (https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...) in order to don't pooling for data but just wait for an external trigger instead: Class some.package.AdapterlessBS Extends Ens.BusinessService { /// Configuration item(s) to which to send file stream messages Property TargetConfigNames As Ens.DataType.ConfigName(MAXLEN = 1000); Parameter SETTINGS = "TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}"; Method OnProcessInput(request As %RegisteredObject, Output response As %RegisteredObject) As %Status { Set tSC = $$$OK Try { // Could be any message... adapter to your needs Set tMsg = ##class(Ens.StringResponse).%New() Set tMsg.StringValue = "some value" // Send the message to the targets Set targets = $LFS(..TargetConfigNames) For i=1:1:$LL(targets) { Set target = $LG(targets, i) // can be sync or async... it's up to you decide //Set tSC = ..SendRequestSync(target, tMsg) Set tSC = ..SendRequestAsync(target, tMsg) Quit:$$$ISERR(tSC) } } Catch (ex) { Set tSC = ex.AsStatus() } Quit tSC } Now, you can add this Business Service to a interoperability production and set the desired Business Process as its target. So, when your REST endpoint is accessed, it will call the BS and then the BP. HTH,José
go to post José Pereira · Jan 9, 2023 Hi! Don't know if it's your case, but if you are able to generate the global data, you could use the $INCREMENT() function, which automatically stores the array length into global's head: Set ^test($INCREMENT(^test)) = "aa" Set ^test($INCREMENT(^test)) = "aa" Set ^test($INCREMENT(^test)) = "aa" Set ^test($INCREMENT(^test)) = "aa" ZWrite ^test ^test=4 ^test(1)="aa" ^test(2)="aa" ^test(3)="aa" ^test(4)="aa" Write ^test 4 HTH, José
go to post José Pereira · Dec 11, 2022 Seems to be kind a controversial topic: Stack Overflow temporarily bans answers from OpenAI's ChatGPT chatbot
go to post José Pereira · Dec 6, 2022 Hi! Have you tried the _count parameter? (https://build.fhir.org/search.html#_count) For instance: https://testserver/csp/healthshare/hsods/fhir/r4/Practitioner?identifier... HTH, José
go to post José Pereira · Feb 28, 2022 Hi! Please, checkout this post: https://community.intersystems.com/node/498271 HTH
go to post José Pereira · Jan 7, 2022 For those who are looking for unziping features, Embedded Python (for IRIS 2021.2+) allows you to use zipfile Python lib. For instance: ClassMethod UnZip(pZipFileName As %String, pExtractToDir As %String) [ Language = python ] { #; solution based on this one: https://stackoverflow.com/a/3451150/345422 import zipfile with zipfile.ZipFile(pZipFileName, 'r') as zip_ref: zip_ref.extractall(pExtractToDir) } Or ClassMethod UnZip2(pZipFileName As %String, pExtractToDir As %String) { Set zipfile = $SYSTEM.Python.Import("zipfile") Do zipfile.ZipFile(pZipFileName, "r").extractall(pExtractToDir) } Tested on iris-ml-community:2021.2.0.617.0-zpm
go to post José Pereira · Dec 14, 2021 Hi! Please, check out if this answer from @Eduard Lebedyuk works for you: https://community.intersystems.com/post/query-result-save-csv#comment-11...
go to post José Pereira · Aug 11, 2021 Hi Shreya. This server is temporary down... Please, check this post for more information: https://community.intersystems.com/post/temporary-online-documentation-s...