go to post Chris Eslinger · May 31, 2022 Set QueryClass = "GMECC.DocmanConnect.Tables.vwNewGPs" Set QueryName = "GetRows" Set tResult = ##class(%Library.ResultSet).%New(QueryClass_":"_QueryName) Set tResult.RuntimeMode = 1 Set:Params="" status = tResult.Execute() Set:Params'="" status = tResult.Execute(Params)
go to post Chris Eslinger · Oct 29, 2021 Hi Chip, I believe you need to create a function that extends Ens.Rule.FunctionSet which should then give you the option to select this function within the UI or for usage within the DTL as well depending on your preference of course. Let me see if I can find an example for you. Note: I simplified my code to fit closer to your ask, but I did not test it. Thanks, Chris Appendix) Figure 1) SimplePid3Filter Function call within when clause Figure 2) SimplePid3Filter function being called via DTL where the return type is As %String (clipped from screenshot)
go to post Chris Eslinger · Aug 10, 2021 https://community.intersystems.com/post/temporary-online-documentation-s...
go to post Chris Eslinger · May 27, 2021 Within the %SYS namespace the OAuth2 package can be leveraged. I don't know if there is already a method within that package to accomplish a simple export and import. However, you can absolutely program the autocreation of the OAuth configurations. In one of my implementations I was asked to setup a framework to auto create everything via a JSON "settings" file. To implement I simply looped the OAuth portion of the settings file and then for each OAuth config I set the following p variables: Set tClient=##class(OAuth2.Client).Open(pApplicationName) If '$isobject(tClient) { Set tClient = ##class(OAuth2.Client).%New() Set tClient.ApplicationName = pApplicationName } Set tClient.AuthenticationType ="basic" Set tClient.ClientId=pClientID Set tClient.ClientSecret=pClientSecret Set tClient.ClientType="confidential" Set tClient.Enabled=1 Set tClient.EncryptionAlgorithm="" Set tClient.KeyAlgorithm="" Set tClient.RedirectionEndpoint.Host=pHostName Set tClient.SSLConfiguration=pSslConfiguration Set tClient.ServerDefinition=pServerConfig Set tClient.SigningAlgorithm="" Set tSC=tClient.%Save() If $$$ISERR(tSC) quit Set tClient=##class(OAuth2.Client).Open(pApplicationName) Set metadata = tClient.Metadata Set metadata."grant_types"=$lb("authorization_code") Set tClient.Metadata = metadata Set tSC=tClient.%Save()
go to post Chris Eslinger · Mar 8, 2021 When we save classes in studio or VSCode the files are automatically saved inside cache as well as the dev's local master folder. This is setup using TortoiseSVN. Based on Dmitriy's comment I imagine the export as .CLS.xml is setup via this source control setup, TortoiseSVN, instead of the way my individual settings are setup in VSCode. Here are my settings for reference:
go to post Chris Eslinger · Feb 17, 2021 I was able to run the following commands on my local HS 2018 %SYS namespace to create an application: Set tWebAppName = "/csp/healthshare/samples/myapp" Set tProperties("NameSpace") = "samples" Set tProperties("CookiePath") = "/csp/healthshare/samples/myapp/" Set tProperties("MatchRoles") = "%DB_CACHE:%All" Set tSC = ##class(Security.Applications).Create(tWebAppName, .tProperties) The above code works to assign the MatchRoles, but don't know if that answers your question. I'd suggest running the delete command between attempts via: Set tSC = ##class(Security.Applications).Delete(tWebAppName) until you programmatically get exactly what you are looking to create.
go to post Chris Eslinger · Oct 7, 2020 You need to have the inbound message sent to this function. Let's call it pRequest #dim tMshSeg As EnsLib.HL7.Segment #dim tPidSeg As EnsLib.HL7.Segment Set tNewMsg = ##class(EnsLib.HL7.Message).%New() Set tNewMsg.DocType = "2.3.1:DFT_P03" Set tMshSeg = pRequest.getSegmentByPath("MSH", .tStatus) $$$ThrowOnError(tStatus) Set tPidSeg = pRequest.getSegmentByPath("PID", .tStatus) $$$ThrowOnError(tStatus) Set tStatus = tNewMsg.setSegmentByPath(tMshSeg, "MSH") $$$ThrowOnError(tStatus) Set tStatus = tNewMsg.setSegmentByPath(tPidSeg, "PID") $$$ThrowOnError(tStatus)
go to post Chris Eslinger · Jul 29, 2020 Interesting. I see that $ZStrip works as expected outside of an X12 DTL. It must be behaving funky within the DTL as you mentioned. You could also try escaping the slash within the remchar field via "'/'", "//", or others?
go to post Chris Eslinger · Jul 29, 2020 Have you tried using *AP as your action to strip alphabetic and punctuation characters? I believe the ..Strip function points to the $ZStrip Objectscript function which has additional examples here: /csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzstrip
go to post Chris Eslinger · Apr 30, 2020 I believe you are missing parentheses for this particular field: <assign value='##class(ClassName.FunctionSet).illnessConv(source.{OBX():ObservationValue()})' property='target.{OBX():ObservationValue()}' action='set' /> Generally, I switch over the field names to numbers as that is easier for me to read: <assign value='##class(ClassName.FunctionSet).illnessConv(source.{OBX():5})' property='target.{OBX():5}' action='set' /> I'm not sure what schema you are using, but if you are using a schema with repeating OBR or OBX fields then you may also need to loop those as well, respectfully: <foreach property='source.{OBXgrp()}' key='k1' > <foreach property='source.{OBXgrp(k1).OBX()}' key='k2' > <assign value='source.{OBXgrp(k1).OBX(k2):5}' property='target.{OBXgrp(k1).OBX(k2):5}' action='set' /> </foreach> </foreach>
go to post Chris Eslinger · Jan 26, 2020 Try { $$$ThrowOnError(method_invocation()) { } Catch ex { $$$LOGSTATUS(ex.AsStatus()) }
go to post Chris Eslinger · Jan 9, 2020 You could create the complete SQL string prior to the prepare statement. There are similiar examples in the documentation here as well: https://docs.intersystems.com/csp/documatic/%25CSP.Documatic.cls?CLASSNAME=%25SQL.Statement set tStatement = ##class(%SQL.Statement).%New() set tTableName = "" for { set tTableName = $O(tCounterAry(tTableName)) quit:tTableName="" Set tSqlString = "SELECT COUNT(*) AS ObservedRowCount FROM "_tTableName set tSC = tStatement.%Prepare(.tSqlString) $$$ThrowOnError(tSC) set tResult = tStatement.%Execute() // ... }