go to post Sean Connelly · Aug 12, 2022 ClassMethod OnPage() As %Status [ ServerOnly = 1 ] { //just the query string... set qs=%request.CgiEnvs("QUERY_STRING") //SOLUTION 1: $piece only set externalCenterCode=$p(qs,":") set startDateRange=$p($p(qs,":authoredOn=le",2),":") set endDataRange=$p($p(qs,":authoredOn=ge",2),":") //SOLUTION 2: generic solution if params grow for i=1:1:$l(qs,":") { set nvp=$p(qs,":",i),name=$p(nvp,"=",1),value=$p(nvp,"=",2) //fix the quirks if value="" set value="name",name="ecc" if name="authoredOn" set name=$e(value,1,2),value=$e(value,3,*) set params(name)=value } //SOLUTION 3: regex(ish) solution set code=$p(qs,":") set loc=$locate(qs,"le\d{4}-\d{2}-\d{2}") set start=$e(qs,loc+2,loc+11) set loc=$locate(qs,"ge\d{4}-\d{2}-\d{2}") set end=$e(qs,loc+2,loc+11) //some helper code to dump the variables into the CSP page write !,"<pre>" zwrite //use this to take a good look at the request object... zwrite %request write !,"</pre>" quit $$$OK } Here are three solutions and a couple of inline tips, including your request for regex example I wouldn't worry too much about using $piece, its very common to use it in this way Eduards comment above also has a fourth suggestion to use $lfs (list from string) which is also commonly used as a way of piecing out data
go to post Sean Connelly · Jun 11, 2022 OK, this makes sense now, sounds like you have a handle on it then. For anyone elses reference, docs on adapterless services: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_adv#EGDV_busservice_invoke
go to post Sean Connelly · Jun 8, 2022 I think you might have missed my point about the adapter being non standard. E.g. what if the adapter has code like this... Method OnTask() As %Status{ //Set tSC = ..BusinessHost.ProcessInput($$$NULLOREF) Set tSC = ..BusinessHost.General($$$NULLOREF) Set ..BusinessHost.%WaitForNextCallInterval=1 Quit tSC} The normal sequence of OnTask() → ProcessInput() → OnProcessInput() becomes OnTask() → General() Of course this then raises the question, how does the interval then work as it would most likely only run once. Main point is to check if the adapter has hard wired it in directly. It's the only logical explanation outside of this being an observer error.
go to post Sean Connelly · May 23, 2022 The solution is to add the parameter STUDIO=1 http://localhost:52773/csp/healthshare/user/EnsPortal.DTLEditor.zen?DT=Foo.NewDTL1.dtl&STUDIO=1
go to post Sean Connelly · Apr 23, 2022 Hi Scott, My understanding is that search table classes are maintained in Ens.DocClassMap. When you do a purge the Ens.MessageHeader appears to have the responsibility for calling RemoveSearchTableEntries() on the Ens.SearchTableBase which uses indirection to call RemoveIndex() on the class name maintained in the DocClassMap. The docs briefly mention DocClassMap... The Ensemble classes use this class to remove search table entries when message bodies are deleted. https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EEDI_search_tables#EEDI_search_tables_mgmt Short answer, purges will automatically include new search tables even if you scheduled the purge before creating the search table.
go to post Sean Connelly · Sep 24, 2021 Maybe try... set ..ContentType="application/octet-stream; name="_name
go to post Sean Connelly · Sep 24, 2021 Hi Kurro, Some random suggestions without being able to see the implementation details... 1. Enable the SOAP log and compare the request and response headers to SOAP UI to see what is different https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAP_debug#GSOAP_debug_info_soap_log 2. Does changing the SOAP version make any difference https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25SOAP.WebClient#PROPERTY_SoapVersion 3. The error is probably raised in this block of code, might be worth working backwards from there, its at the end of DoSOAPRequest in %SOAP.WebClient Set responseContentType=$zcvt($piece(response.ContentType,";",1),"L") If ..SoapBinary { If (responseContentType'="application/octet-stream") Quit $$$ERROR($$$SOAPUnexpectedType,response.ContentType) } Else { If (responseContentType'="text/xml") && (responseContentType'="application/soap+xml") && (responseContentType'="multipart/related") { Quit $$$ERROR($$$SOAPUnexpectedType,response.ContentType) } } 4. If your running out of ideas then maybe reinstall / restart the server code (is it .NET by any chance)?
go to post Sean Connelly · Sep 17, 2021 > this is a very serious that I can't wait to resolve... Hi Thomas, if this is serious then you should raise a WRC with InterSystems.
go to post Sean Connelly · Sep 17, 2021 It depends what you really need. SYSTEM MODE There are existing global flags that are available through various classes. For instance SystemMode() will provide system wide constants for Live, Test and Dev... https://docs.intersystems.com/healthconnectlatest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.Version The SystemMode() is admin configured via the Memory and Startup screen on the management portal. LOOKUP TABLES For some global settings, particularly business related, it would be good practice to use lookup tables and not a global... https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=ENSLIB&PRIVATE=1&CLASSNAME=Ens.Util.LookupTable UTIL FUNCTIONSAlso, if you are not aware of them yet, you should take a look at creating your own Ens util functions which are automatically inherited into routers and DTL's and provide a good place to stash various levels of global and business value / logic... https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=ENSLIB&PRIVATE=1&CLASSNAME=Ens.Util.FunctionSet https://docs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=EBUS_utility_functions
go to post Sean Connelly · Sep 16, 2021 You will find a host of useful methods on the Director class, the director orchestrates the production. https://docs.intersystems.com/healthconnectlatest/csp/documatic/%25CSP.Documatic.cls?&LIBRARY=ENSLIB&CLASSNAME=Ens.Director