go to post Jeffrey Drumm · Feb 16, 2019 @Eduard Lebedyuk requested that I change the answer to reference the ISC public on-line documentation rather than using a local URL. I assumed he meant that he wanted me to edit my answer, and discovered that I could not.
go to post Jeffrey Drumm · Feb 16, 2019 Modify how? I do not appear to have the ability to edit my answer.Regardless, Here is the on-line documentation link.
go to post Jeffrey Drumm · Feb 15, 2019 You can find information under "Enabling %ETN Logging" here, assuming you have Ensemble/HealthShare installed locally:Enabling %ETN Logging
go to post Jeffrey Drumm · Feb 11, 2019 The DocType is not automatically set by the ImportFromFile() method. You would need to set it to whatever DocType (i.e. DocTypeCategory:DocTypeName) is required to properly parse the message.In a Production, the Business Service that receives messages uses the value in the Message Schema Category field to set the DocType for subsequent processing, and if both a DocTypeCategory and DocTypeName are present it will override the automatic selection of the DiocTypeName determined by the HL7 message's MSH:9 value.
go to post Jeffrey Drumm · Feb 11, 2019 If the message you wish to test is saved in a separate file outside of Ensemble, you can create a new message object with the following: JEFF > set tMsg=##class(EnsLib.HL7.Message).ImportFromFile("/path/to/file/filename.ext") You'll need to set the DocType manually; for messages already received by Ensemble, that was likely taken care of by the business service: JEFF > set tMsg.DocType="2.3.1:ORU_R01" Something to keep in mind is that methods expecting a message class as an argument (ex. EnsLib.HL7.Message) work on message objects rather than strings. The tMsg variable created by both the %OpenId() and ImportFromFile() methods are such objects. These objects have a rich set of methods for inspecting, transforming and otherwise working with messages.
go to post Jeffrey Drumm · Feb 8, 2019 The easiest way is to use an existing message that's already in the Ensemble message store. Locate the MessageBodyId value in the header tab of the message viewer, and execute the following commands in the same namespace as the production: JEFF > Set tMsg = ##class(EnsLib.HL7.Message).%OpenId(BodyID) JEFF > Write ##class(Package.Name).MethodName(tMsg,"Identifier") Substitute the numeric Message Body ID for BodyID, the package name for your class for Package.Name, the method for MethodName and the identifier you want to test with for Identifier. The method you mentioned appears to return a string, so you should see the value displayed once you press enter on the 2nd command.
go to post Jeffrey Drumm · Feb 8, 2019 If you don't want to modify the existing class, write a new one that extends it: /// Custom functions for this installation Class User.Rule.MyFunctionSet Extends Ens.Rule.FunctionSet { /// Stupid, redundant method provided as an example /// Accepts a string <var>pString</var> and regular expression pattern <var>pPattern</var> /// as arguments; returns 0 for no match, and a positive integer indicating the match's /// position if there is a match. ClassMethod REMatch(pString As %String, pPattern As %String) As %Integer { Return $LOCATE(pString,pPattern) } }As long as you don't define a method that overrides a previous method, you're completely safe. EDIT: Eduard's example beat me to it and does exactly the same thing. The point, though, is that you're not adding methods to the existing class, you're creating new methods outside of it that are accessible from within your rule definitions.
go to post Jeffrey Drumm · Feb 8, 2019 If your PID:3 is not defined in your schema as a repeating field, you can obtain a $LIST with: JEFF > Set tLst = $LISTFROMSTRING(msg.GetValueAt("PID:3"),"^") JEFF > w $LISTGET(tLst,1) 043622 JEFF > zw tLst tLst=$lb("043622","","","ZZMC","MR","ZZMC")
go to post Jeffrey Drumm · Feb 8, 2019 Are you looking for the number of repetitions/components, or the string length for the PID:3 field?To get the number of repetitions: JEFF > w msg.GetValueAt("PID:3(*)") 2 To get the number of components in the first repetition: JEFF > w msg.GetValueAt("PID:3(1).*") 6 To get the string length of the entire field: JEFF > w $LENGTH(msg.GetValueAt("PID:3")) 46
go to post Jeffrey Drumm · Feb 8, 2019 I appear to be doing something wrong.EDIT: Nevermind. I guess Preview doesn't actually preview the final posting format ...
go to post Jeffrey Drumm · Feb 6, 2019 The answer above is significantly different from what I originally posted. the <foreach> action doesn't interpret a %List as a collection, so I went with an <until> instead. The condition for completion of the <until> is when the iterator equals the count of entries in the list (obtained by $LISTLENGTH()).
go to post Jeffrey Drumm · Feb 5, 2019 The conventional mechanism for generating multiple outbound messages from a single inbound is via a BPL. It can also be done in a custom BP using ObjectScript, and I've also seen it done using the rule editor (but wouldn't recommend it ... it's not exactly intuitive).In a BPL, you'd assign a context variable to the list of values extracted from ZCO:2 (using $LISTFROMSTRING()), then iterate over the list with an <until> action. You'll also need to create some other context variables for list length, iteration and element selection.Inside the <until> you would:Increment the iterator and obtain the current list value using <assign> actionsInvoke a DTL with a <transform> action that copies the relevant fields/segments from the source message to the targetIn the same DTL, use the current list iteration value to populate FT1:7.1Send the resulting message to the downstream Business Operation with a <call> action
go to post Jeffrey Drumm · Feb 4, 2019 Have you added the OnGetConnections() method I posted as an answer above to your BP?
go to post Jeffrey Drumm · Feb 4, 2019 @Nareev, you're correct when the BP is a BPL. I don't believe that's the case due to the fact that Stephen's BP has a TargetConfigName property. That's not normally generated when the BP is created as a BPL.
go to post Jeffrey Drumm · Feb 4, 2019 You'll need to override the OnGetConnections method by inserting the snippet below in your custom business process(es):ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item) { Do ##super(.pArray,pItem) If pItem.GetModifiedSetting("TargetConfigName",.tValue) { For i=1:1:$L(tValue,",") { Set tOne=$ZStrip($P(tValue,",",i),"<>W") Continue:""=tOne Set pArray(tOne)="" } } }
go to post Jeffrey Drumm · Jan 29, 2019 Have you tried exporting the production from the Management Portal's Production Configuration | Production Settings | Actions tab, then deploying it to the Test environment through Ensemble | Manage | Deployment Changes | Deploy?
go to post Jeffrey Drumm · Jan 22, 2019 Your best option for doing this is to create a new HL7 TCPIP Service Class that extends EnsLib.HL7.Service.TCPService that overrides the OnConstructReply() Method. The example below includes the necessary code, along with the convenience of being able to adjust the MSH:7 date format by supporting the reconfiguration of the value of MSH7AckDateFormat in the Production's configuration panel for the service. It uses well-known strftime() formatting conventions.This works with Ensemble version 2017.2.1:Class HICG.HL7.Service.TCPService Extends EnsLib.HL7.Service.TCPService{/// Allows Customization of the date format used in the ACK's MSH:7 field. Uses C strftime() tokens to construct/// the date in the desired format. Default is HL7 date/time format, yyyyMMddhhmmss.Property MSH7AckDateFormat As %String [ InitialExpression = "%Y%m%d%H%M%S" ];Parameter SETTINGS = "MSH7AckDateFormat";Method OnConstructReply(Output pReplyDoc As EnsLib.EDI.Document, pOriginalDoc As EnsLib.EDI.Document, ByRef pReplyCode As %String, ByRef pSC As %Status, pEarlyAck As %Boolean) As %Status { Set pReplyDoc=pOriginalDoc.NewReplyDocument(,..LocalFacilityApplication) Set pReplyDoc.Source = pOriginalDoc.%Id() Do:..#UseOriginalControlId pReplyDoc.SetValueAt(pOriginalDoc.GetValueAt("1:10"),"1:10") Do pReplyDoc.SetValueAt(##class(Ens.Util.Time).ConvertDateTime($H,"%q(3)",..MSH7AckDateFormat),"1:7") Set tMSA=##class(EnsLib.HL7.Segment).%New($LB("",1)) Set tMSA.Separators=pReplyDoc.Separators Do tMSA.SetValueAt("MSA",0) Do tMSA.SetValueAt(pReplyCode,1) Do tMSA.SetValueAt(pOriginalDoc.GetValueAt("1:10"),2) Do:$G($$$ExpectedSequenceNumber) tMSA.SetValueAt($$$ExpectedSequenceNumber,4) Do pReplyDoc.AppendSegment(tMSA) Set pReplyDoc.IsMutable = 0 Quit $$$OK }}
go to post Jeffrey Drumm · Dec 14, 2018 There's also the ^DATABASE routine in %SYS for creating databases, but it provides no options for creating/managing namespaces.%SYS>d ^DATABASE 1) Create a database 2) Edit a database 3) List databases 4) Delete a database 5) Mount a database 6) Dismount a database 7) Compact globals in a database 8) Show free space for a database 9) Show details for a database10) Recreate a database11) Manage database encryption12) Return unused space for a database13) Compact free space in a database14) Defragment globals in a database
go to post Jeffrey Drumm · Aug 3, 2018 It's possible that a proxy is in use for web access. Browsers can generally auto-discover and configure for those, but other web clients can't ... at least most of the time.
go to post Jeffrey Drumm · Aug 2, 2018 Does it happen if she logs into the management portal as herself from another workstation? Have you tried starting her browser(s) in Safe mode (no add-ins/plug-ins loaded)? Have you cleared the browser's cookies and cache? Disabled anti-virus? Is it possible that she has JavaScript disabled?