go to post Utsavi Gajjar · May 4, 2021 Thanks Evgeny for your reply and also for sharing the links with useful content :) Regards
go to post Utsavi Gajjar · May 3, 2021 Hi there, Thank you for the video. It talks about using ZPM to package your code and publish on a registry. Are there any links available that talk about "How we can utilise ZPM for organization's internal build and deployment process? Thanks, Utsavi
go to post Utsavi Gajjar · Apr 18, 2021 I see what you mean. At this stage, the plan is not to store any data in IRIS. We are trying to implements Intersystems API Manager and it can only talk to IRIS hence using IRIS to write the APIs.
go to post Utsavi Gajjar · Apr 16, 2021 ah well, in our case IRIS is acting as an ESB. Data doesn't live in IRIS. We are calling out to other systems to get the data e.g. Patient Administration System or Health Provider Directory. In this case the other systems may or may not support APIs in which case we would query them using ODBC Adaptor, transform data to FHIR compliant json schema in IRIS and return to the client.
go to post Utsavi Gajjar · Apr 16, 2021 Hi Dmitry, Thank you for reply :) >>>Speaking about HealthCare application, why would you even decide to implement some own way, when FHIR already covers most of the things you would need? Would you mind elaborating on this last statement please? I am not sure what you mean. We are writing specifications for our API following the FHIR standard. Utsavi
go to post Utsavi Gajjar · Apr 15, 2021 I have posted a question for advise on best practices when developing REST APIs and Production using IRIS. https://community.intersystems.com/post/best-practices-implementing-rest... Would you mind providing your thoughts please? thanks
go to post Utsavi Gajjar · Apr 9, 2021 Hi Eduard, Firstly, thank you for sharing this article. Great information ! I am trying to work out best way of Error Handling within a REST Business Operation and Business Process. My Business Operation makes a call to the third party API to do certain things. I need to return the response I get back from the third party to the clinet. Possible repsonses are, - 200 in which case I return requested data e.g. Patient demographics - 404 Patient not found - 500 - Internal Server Error This is what my Business Operation currently looks like, Code Class rest.admin.bo.GetPatient Extends EnsLib.REST.Operation { Parameter INVOCATION = "Queue"; /// remove URL from SETTINGS Parameter SETTINGS = "-URL"; Method GetPatient(pRequest As rest.admin.msg.rq.Patient, Output pResponse As rest.admin.msg.rp.Patient) As %Status { set tSC = $$$OK try { set HTTPrequest=##class(%Net.HttpRequest).%New() set HTTPrequest.Https=1 set HTTPrequest.SSLConfiguration=..Adapter.SSLConfig do HTTPrequest.SetHeader("Accept","application/json") do HTTPrequest.SetHeader("Authorization","Bearer "_pRequest.AuthToken) // Set URL PArameters do HTTPrequest.InsertParam("urn",pRequest.urn) // Issue the call set tSC=..Adapter.SendFormData(.tHttpResponse, "GET", HTTPrequest) // Instantiate the interoperability response object set pResponse = ##class(rest.admin.msg.rp.Patient).%New() set pResponse.HttpStatusCode = tHttpResponse.StatusCode set pResponse.HttpStatusText = $$$StatusDisplayString(tSC) // Handle an error condition If $$$ISERR(tSC) { if $IsObject(tHttpResponse)&&$IsObject(tHttpResponse.Data)&&(tHttpResponse.Data.Size) { Set tSC=$$$ERROR($$$EnsErrGeneral,$$$StatusDisplayString(tSC)_":"_tHttpResponse.Data.Read()) } } else { // Status=200. If $IsObject(tHttpResponse)&&$IsObject(tHttpResponse.Data)&&tHttpResponse.Data.Size { // use JSON Import capabilities to correlate JSON stream to properties. do pResponse.%JSONImport(tHttpResponse.Data) // Set values additional properties here if needed } } } catch{ Set tSC=$$$SystemError } Quit tSC } XData MessageMap { <MapItems> <MapItem MessageType="rest.admin.msg.rp.Patient"> <Method>GetPatient</Method> </MapItem> </MapItems> } } Now, when the BO gets any sort of error, the operation shows an error and so does the process and same error goes back to the clinet e.g. in event of 503 client sees, JSON { "errors": [ { "code": "<Ens>ErrGeneral", "domain": "Ens", "error": "ERROR <Ens>ErrGeneral: ERROR <Ens>ErrHTTPStatus: Received non-OK status 503 from remote HTTP server: 'HTTP/1.1 503 Service Unavailable':<html><body><b>Http/1.1 Service Unavailable</b></body> </html>", "id": "EnsErrGeneral", "params": [ "ERROR <Ens>ErrHTTPStatus: Received non-OK status 503 from remote HTTP server: 'HTTP/1.1 503 Service Unavailable':<html><body><b>Http/1.1 Service Unavailable</b></body> </html>" ] } ], "summary": "ERROR <Ens>ErrGeneral: ERROR <Ens>ErrHTTPStatus: Received non-OK status 503 from remote HTTP server: 'HTTP/1.1 503 Service Unavailable':<html><body><b>Http/1.1 Service Unavailable</b></body> </html>" } I need to catch this exception and modify the json response that goes back to the client. But I am not sure what is the best way to do that. Is it something that is best done in BO or BP ? Any help or guidance on this will be much appreciated! Utsavi
go to post Utsavi Gajjar · Apr 8, 2021 Hi Eduard, I am looking for some examples of REST API served through production. Would you be able to point me to some, please? I am trying to implement a business service, process and operation that serves bundle of apis related to a domain and resource e.g Patient , Patient alerts, patient status . These will be 3 api urls served by single business service, process and operation. I am also looking for best practice to handle various http responses in BP and BO. Would greatly appreciate if you can direct me to relevant examples. Thank you, Utsavi
go to post Utsavi Gajjar · Dec 10, 2020 Thanks Vitaly Furman We enabled logging on receiving PACS and figured out that Ensemble was sending same ID for 2 different SOP classes. I had been using the "CreateAssociation" command with third argument as blank to create associations. When doing so , Ensemble adds all Abstract Syntaxes it knows about with default TransferSyntax of Implicit VR. I believe the receiving PACS didn't cater for one of the Abstract Syntax. To solve the problem, I removed the association. Created it using GUI so no default Presentation COntext is added. I then manually added a few Abstract Syntax with Basic Transfer syntax of Implicit VR and retested and this time the communication worked. I then created an Import file for the PACS based on Conformation Statement provided by PACS and imported in Ensmeble using the ImportAssociation command. Regards, Utsavi