go to post Suman Samanta · Oct 2, 2018 Hang is not recommended to use in business component as the business component/adapter as the component or adapter will be blocked for that specified time.However I would suggest something else in your code, to use Read($zutil(96,39)) instead of fixed value. $zutil(96,39) contains the number of characters that a String can hold. If Intersystems increase the number of characters for a string in future it will automatically take that maximum characters .
go to post Suman Samanta · Oct 2, 2018 This thing happend with me before , i reported this in one WRC . This was solved automatically after few days. So i asked the engineer not to take any action on this as i thought it could be some connection issue from my end. I guess there is some issue with this but it was auto solved for me. I would suggest create one more connection with a different name the new connection should work.
go to post Suman Samanta · Aug 28, 2018 Thank you Eduard for the details, these are mostly Angular 1/Angular Js code which works in standard cache studio. I am looking for angular 2 or more , which does not work in standard cache studio.We are developing code in visual studio code then creating build using ng build.
go to post Suman Samanta · Mar 22, 2018 You can do it using below code.set strADT ="MSH|^~\&|MEDICO|JOE'S HOSPITAL^1.2.3.4.5|OCIEB2B|OCIEUHGB2BTEST|20130730072041|SECURITY|ADT^A01|MSG00001|P|2.7|||AL"_$c(13)_"EVN|A01|20130626044550||01|00968|20130626043902"_$c(13)set InputADT=##class(EnsLib.HL7.Message).ImportFromString(strADT) set InputADT.DocType="2.7:ADT_A01" w InputADT.%Save() In case you need to import it from a stream you can use ImportFromStream method to import the content from stream.
go to post Suman Samanta · Sep 5, 2017 You can manage performance by increasing the poolsize of the business process. Its a good thing to play with.
go to post Suman Samanta · Sep 5, 2017 Not sure if the solution is perfect or not , but this code should work ClassMethod ProcessJsonPayload(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object = {$$$NULLOREF}) As %Status { set tSC=$$$OK set oTempStream=##class(%GlobalBinaryStream).%New() set tSC=oTempStream.CopyFrom(%request.Content) set oCleanStream=##class(%GlobalBinaryStream).%New() while 'oTempStream.AtEnd { set content=oTempStream.Read() set content=$ztsrip(content,"*C") set tSC=oCleanStream.Write(content) } set tSC= ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(oCleanStream,"%DynamicObject",.oJsonDynamicObject) quit tSC } Please let me if this does not solve the issue.
go to post Suman Samanta · Aug 24, 2017 could please post the snippet of the code. looks like there is one undefined object.
go to post Suman Samanta · Dec 2, 2016 Create a table with below properties Class MessageStore Extends %Persistent { Property ReceivedTime as %TimeStamp; Property MessageContent as %GlobalBinaryStream; } Now in your WebMethod create one object of a stream object. Method GetHL7Message(Payload As %GlobalBinaryStream) As %Status[ WebMethod ] { set oStreamContent=##class( %GlobalBinaryStream).%New() set tSC=oStreamContent.CopyFrom(Payload) set oTable=##class(MessageStore).%New() set oTable.MessageContent .CopyFrom(oStreamContent) /// Sometime directly copying does not work not sure why. Try this when exactly it can copy set oTable.ReceivedTime=##class(%Library.UTC).NowLocal() set tSC=oTable.%Save() } Now in your zen page show the content in a text area. using textArea.value=OStream.Read() Let me know if you face any more problem with this.
go to post Suman Samanta · Dec 1, 2016 Does it support any of the Healthshare version . We tried to check with Ensemble 2016.2 which worked with Atelier. We are using 2016.1. healthshare , so not sure if we can use atelier with any of the healthshare versions.
go to post Suman Samanta · Dec 1, 2016 The best way would be to transfer the cache.dat of all the namespaces. That would transfer all data , including the code.Transfer from Com1 to Com2.Steps :1. Create same number namespaces in Com22. Unmount all databases , in Com1 and Com23. Copy all corrosponding Cache.dat to Com2.4. Mount all databases in Com2.You are ready to go. Open studio and verify the codes if they are present.
go to post Suman Samanta · Dec 1, 2016 When we are extedning EnsLib.REST.Service, if we set the response code in stream attribute it would send the reponse in that way.XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]{<Routes><Route Url="/test" Method="POST" Call="MyLib.Service.REST.TestRequestHandler:ProcessRequest"/></Routes>}-----------------And the class containsClass OCIELib.Service.REST.TestRequestHandler Extends %RegisteredObject{ClassMethod ProcessRequest(pStreamIn As %CharacterStream, Output pStreamOut As %Stream.Object) As %Status{// This method returns a test resonse that can be used to verify connectivity between client// and OCIE REST endpoint.Do pStreamOut.SetAttribute("Content-Type","application/text")Do pStreamOut.Write("THIS IS A TEST RESPONSE FROM THE SYSTEM")do pStreamOut.SetAttribute("ResponseCode","400 Bad Request")Quit $$$OK}Hope this helps. I was also stuck here , found the solution today itself.
go to post Suman Samanta · Nov 30, 2016 I have a class which extends EnsLib.REST.Serviceand my URL map is as belowXData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]{<Routes><Route Url="/test" Method="POST" Call="MyLib.Service.REST.TestRequestHandler:ProcessRequest"/></Routes>}----------------- And the class contains Class OCIELib.Service.REST.TestRequestHandler Extends %RegisteredObject{ClassMethod ProcessRequest(pStreamIn As %CharacterStream, Output pStreamOut As %Stream.Object) As %Status{// This method returns a test resonse that can be used to verify connectivity between client// and OCIE REST endpoint.Do pStreamOut.SetAttribute("Content-Type","application/text")Do pStreamOut.Write("THIS IS A TEST RESPONSE FROM THE SYSTEM")Quit $$$OK}}Here calling ReportHttpStatusCode(..#HTTP400BADREQUEST, sc) does not work it seems. Is there any specific way to call the method. I tried calling usinf ##class(%CSP.REST).ReportHttpStatusCode() it did not work..Any help is appreciated.