Bukhtiar Ahmad · May 30, 2020 go to post

Hi Mark

i didn’t do any coding Or made any changes to the code , I simply installed and trying to add a patient and this message coming . I want add some patient so I can view them on clinical viewer that I also installed as separate instance.

we can connect so I can share my screen so you can help me finding the exact reason behind this error?

regards

Bukhtiar Ahmad · Jun 18, 2020 go to post

Thanks Robert, I was looking for InterSystems guidelines how we have implementation team and i will discuss about this complex sizing calculator to determine how many edge gateways we need to create/setup.

Bukhtiar Ahmad · Sep 2, 2020 go to post

Thanks instead of hard code date, can we put something like HL7.{PID:DateofBirth},"1","8")<today date -3 days. I want to check if coming msg DOB is within 3 days then its new born message so i can check validate fields, such as mother identifier should not be empty in case of new born patient date coming from external system. 

Bukhtiar Ahmad · Sep 3, 2020 go to post

Thanks for the guidance, i was able to run and test it, it worked. for the invalid date how can we handle it?

Bukhtiar Ahmad · Sep 3, 2020 go to post

Thanks, it worked. Actually i am putting all rules from the specs doc, and generating custom NACK msgs, for example here i have rule, for newborn mother identifier value should not be empty, so 1) DOB is valid,  2) Age is less than 3 days , 3) Mother MRN not empty, then process else send NACK ("For NewBorn Encounters, PID.21 Mother Identifier should not be empty"). Similarly I  have like  30 + rules from specs doc, so adding one by one, learning and getting help from community.  These rules I will put in Edge router before message routes to multiple edges. 

Bukhtiar Ahmad · Sep 3, 2020 go to post

Thanks, $zdate($horolog,3) gives system date?  and this $zdateh(pDob,3) converts DOB in the format as system date? can you refer me to some doc link where I can practice these programming basics?

Bukhtiar Ahmad · Sep 4, 2020 go to post

Hi thanks actually we don’t want to create multiple instance but on the same instance we will be creating multiple edges where some external systems sending data will have dedicated single edge where some systems will be combined together into a single edge. Not much documentation or best practices available so I reached to this community. So the question is how to design when discussing with external systems that we should create separate edge (SysEdgeA) for System A but for System B & C we should create combined edge (CombinedEdge1).

then later system C comes how we decide CombinedEdge1 is sufficient so include system C in this edge or create another CombinedEdge2, then system D comes we link it to also with CombinedEdge2. Then system E comes we link it to CombinedEdge2, but System F we create again dedicated edge SysEdgeF

so what parameters we use to take these decisions , any help will be appreciated 

Bukhtiar Ahmad · Sep 6, 2020 go to post

Thanks tor helping how to read the message,  I checked the documentation %ErrorStatus has below definitions and its type is %Status

property %ErrorStatus as %Status [ InitialExpression = $$$OK,Transient ];

Bukhtiar Ahmad · Sep 6, 2020 go to post

This is interesting, so in the init() method can I check the HL7 message sending facility field?  so assume

System A - > ADT Service Port 5100 -> Init(check MSH Sending Facility) - > EdgeProduction 1

System B - > ADT Service Port 5100 -> Init(check MSH Sending Facility) - > EdgeProduction 2

Bukhtiar Ahmad · Sep 7, 2020 go to post

@Jeffrey Drumm  any advice on this error,  the same code is working fine on IRIS for Health but on HealthShare giving error.

Class Training.HL7Validation.RoutingRule Extends Ens.Rule.Definition

If i change above statement with below, it compile in studio and error disappears but when i open rule editor  Ens.Rule.Definition comes back and the same error

Class Training.HL7Validation.RoutingRule Extends EnsLib.HL7.MsgRouter.RoutingEngine

Bukhtiar Ahmad · Sep 8, 2020 go to post

Hi Scott, need another help.  I have code that check a value in HL7 msg and send NACK msg. the code works fine for IRIS For Health but not for HealthShare as %ErrorStatus property not available in HealthShare. Any guidance to fix in the code 

Error coming in compiling the below rules.

/// 
Class Hospital.HospitalProd.RoutingRule Extends Ens.Rule.Definition
{
Parameter RuleAssistClass = "EnsLib.MsgRouter.RuleAssist";
XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule]
{
<ruleDefinition alias="" context="EnsLib.MsgRouter.RoutingEngine" production="Hospital.HospitalProd">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="Valid Facility Code Required">
<when condition="Lookup(&quot;OnboardedFacilities&quot;,HL7.{MSH:SendingFacility.NamespaceID},&quot;No&quot;,&quot;No&quot;)!=&quot;Yes&quot;">
<assign property="%ErrorStatus" value="GenerateNACK(&quot;Invalid Sending Facility Code&quot;,%ErrorStatus)"></assign>
</when>
</rule>

Below class compiling on HealthShare

Class Hospital.DHARule Extends Ens.Rule.FunctionSet
{

ClassMethod GenerateNACK(text As %String, status As %Status) As %Status [ CodeMode = expression, Final ]
{
$$$ERROR($$$GeneralError,$zstrip($piece($System.Status.GetErrorText(status),"#5001:",2),"*C")_"~"_text)
}

}

Error Msg

Bukhtiar Ahmad · Sep 8, 2020 go to post

Thanks, I did already like couple of days ago but no response came from anyone yet, fingers crossed. 

Bukhtiar Ahmad · Sep 9, 2020 go to post

Hi thanks, with routing rules it was easy to enable/disable a validation rule by end users, also the onboarding systems are huge list so better to validate inbound feed before routing msg to the edges productions. 

Response from WRC is 2020 version was HS yet to be updated with parsing mechanism thats why its working for I4H but not on HS.

can you please give some link where i can study building validation & NACK logic in BPL ?

Bukhtiar Ahmad · Sep 9, 2020 go to post

So basically from router we send to DTL (validate msg), if msg comes back as NACK send it back to BS, else send it to BP? Correct

is it possible to share one simple rule example like HL7.DOB  field is future date then generate NACK message from DTL and send back to the router.

Bukhtiar Ahmad · Sep 11, 2020 go to post

Yes client asked for monthly report on data quality KPIs against each facility.

Facility A - field 1 (% of good data vs % of bad data)

Bukhtiar Ahmad · Sep 30, 2020 go to post

no luck, this method should be in FunctionSet class? 

Class VALIDATION.RulesFunctionSet Extends Ens.Rule.FunctionSet
{
ClassMethod getEmiratesId(pHL7 As EnsLib.HL7.Message) As %String

Bukhtiar Ahmad · Sep 30, 2020 go to post

there must be something i am doing wrong, i removed all my code and simply wants to return message type value from the msg and debugging it to see the value but somehow its not coming.

Class VALIDATION.RulesFunctionSet Extends Ens.Rule.FunctionSet
{ClassMethod getPatientClass(pHL7 As EnsLib.HL7.Message) As %String [ Final ]
{
SET msgType = pHL7.GetValueAt("MSH:MessageType.TriggerEvent")
return msgType
}

Bukhtiar Ahmad · Oct 1, 2020 go to post

Thanks I think this might be the reason i am not able to get values, I tried numeric path but still not luck. What should i do in the MSH to set the document type. ORU^R01 is not sufficient?

Bukhtiar Ahmad · Oct 4, 2020 go to post

I think its not my lucky day, as i check message schema category and its says 2.5, may be i am running my rules . Also msg viewer shows blue font so message is correct but somehow method not able to parse HL7 values.

may be i am testing them from the rules editor thats why its not recognizing HL7 values ?

Bukhtiar Ahmad · Oct 25, 2020 go to post

Does it support with HS2020 version? I tried to import the xml but it giving error on the studio. Any steps to follow for installation

Bukhtiar Ahmad · Oct 27, 2020 go to post

Good question hope someone will attend it, actually I was also looking for something similar like PID.3 mapped with SDAX.FieldY