go to post Chris Eslinger · Feb 25, 2021 You can extract the values you want using $EXTRACT (or $E for short) where * represents the length of your string: Set tValue = "0003EMRNameC"Set tValueToLookup = $EXTRACT(tValue,5,*) https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... You should be able to put it on within the single function call if you prefer as well, but that's up to you. 00 0 Reply 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. 00 0 Reply 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) 00 0 Reply Followers:Chris has no followers yet.Following:show all 6VitalyRobertAntonDmitriyEduardEvgenyGlobal Masters badges:Chris has no Global Masters badges yet.