go to post Dean White · Sep 27 Something like this operation should do it for you. Class Component.Outbound.JsonHttpsOut Extends Ens.BusinessOperation{ Parameter ADAPTER = "EnsLib.HTTP.OutboundAdapter"; Property Adapter As EnsLib.HTTP.OutboundAdapter; Method SendMessage(pMsgOut As %DynamicObject, Output pMsgIn As %Net.HttpResponse) As %Status{ S tSC=$$$OK Set tHttpRequest=##class(%Net.HttpRequest).%New(), tHttpRequest.WriteRawMode=1, token =##class(%DynamicObject).%New(), tSC=$$$OK Set tHttpRequest.SSLConfiguration=..Adapter.SSLConfig Set tSC = tHttpRequest.SetHeader("Content-Type", ..ContentType) d tHttpRequest.EntityBody.Write(pMsgOut.%ToJSON()) #dim tHttpResponse As %Net.HttpResponse Set tHttpResponse = ##class(%Net.HttpResponse).%New() S send="POST" Set tSC=..Adapter.SendFormDataArray(.tHttpResponse, send, tHttpRequest) if (tHttpResponse.StatusCode="200"){ set message=tHttpResponse.StatusCode_": "_tHttpResponse.StatusLine_". " if $IsObject(tHttpResponse.Data) { while 'tHttpResponse.Data.AtEnd { set message=message_tHttpResponse.Data.Read(,.tSC1) if 'tSC1 quit } $$$TRACE(message) s tSC=$$$ERROR("9999",message) } s tSC=$$$OK } else { set message=tHttpResponse.StatusCode_": "_tHttpResponse.StatusLine_". " if $IsObject(tHttpResponse.Data) { //set message="" while 'tHttpResponse.Data.AtEnd { set message=message_tHttpResponse.Data.Read(,.tSC1) if 'tSC1 quit } $$$TRACE(message) s tSC=$$$ERROR("9999",message) } Set ..Adapter.URL=$REPLACE(..Adapter.URL,..tmpurl,"") //sets adapter url back to standard if it was last used to remove an MRN } Q tSC}
go to post Dean White · Jun 28 #dim tResponse As HS.FHIRServer.Interop.ResponseSet tSC = ..SendRequestSync(..TargetConfigName, tRequest, .tResponse)if (($P(tResponse.Response.Status," ",1)>199) && ($P(tResponse.Response.Status," ",1)<399)){ Set tResponseQuickStream = ##class(HS.SDA3.QuickStream).%OpenId(tResponse.QuickStreamId)Set tSC = $$$ERROR($$$GeneralError, tResponseQuickStream.Read())//Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(tResponseQuickStream,"vR4")Set BundleObject=##class(%DynamicObject).%FromJSON(tResponseQuickStream)}
go to post Dean White · May 30 if (($P(tResponse.Response.Status," ",1)>199) && ($P(tResponse.Response.Status," ",1)<399)){Set tResponseQuickStream = ##class(HS.SDA3.QuickStream).%OpenId(tResponse.QuickStreamId)Set tSC = $$$ERROR($$$GeneralError, tResponseQuickStream.Read())Set BundleObject=##class(HS.FHIR.DTL.vR4.Model.Resource.Bundle).FromJSON(tResponseQuickStream,"vR4")Quit BundleObject} You can use the line similar to below instead of Bundle if you are unsure of the payload as well s BundleObject=##class(%DynamicObject).%FromJSON(tResponseQuickStream)
go to post Dean White · May 31, 2023 go into the terminal and the namespace you want to disable, then type Set ^%SYS("sql","sys","autotune") = 0