Use {FT1grp().FT1:TransactionCode.identifierST} as criteria in routing rule, where multiple FT1s exist

22 views
Skip to first unread message

Jennifer B.

unread,
Aug 2, 2018, 7:47:26 AM8/2/18
to InterSystems: Ensemble in Healthcare
Business request: For incoming DFTs, if '12345' exists in FT1-7.1 of any FT1 segment in the source message, send to Abc_DTL.

I'm working with incoming charge messages, and if a specific code is included in any FT1 segment in the message, it should be sent to a specific DTL. Is it possible to do this in the routing rule? Just the thought of working this logic into the already-too-complex DTL gives me a headache.

Thank you in advance for your help!
Jenn

Andy Picou

unread,
Aug 2, 2018, 9:14:21 AM8/2/18
to Ensemble-in...@googlegroups.com
Jennifer

Yes, by creating a Method in your Rule.FunctionSet and calling that method in your routing rule.

Something like:

RoutingRule:
<when condition='(TransactionCodeContains(HL7,"12345"))'>

Rule.FunctionSet
ClassMethod TransactionCodeContains(pSource As EnsLib.HL7.Message, pValue As %String) As %Integer
{
  set tSC=0
  Set k1=""
  For
  {
Set k1=pSource.GetNextIndex("FT1grp()",k1,.tSCTrans) Quit:k1=""
;$$$TRACE("FT1grp("_k1_").FT1:7.1="_pSource.GetValueAt("FT1grp("_k1_").FT1:7.1"))
if pSource.GetValueAt("FT1grp("_k1_").FT1:7.1")=pValue
{
set tSC=1
quit
}
}
  quit +(tSC)
}

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

J McHutch

unread,
Aug 2, 2018, 9:21:44 AM8/2/18
to Ensemble-in...@googlegroups.com
Just use parents instead of curly brackets: 

(FT1grp().FT1:TransactionCode.identifierST), and contains in the condition statement of your rule. 


Thanks, 
Nora

Sent from my iPhone, please excuse typos 
--

M.HajYasin

unread,
Aug 2, 2018, 9:32:07 AM8/2/18
to Ensemble-in...@googlegroups.com
use the parenthesis syntax .. Replace {} with () :
IF HL7.(FT1grp().FT1:7.1)
This should return all values in FT1.7.1 in all FT1 segments, bracketed in a single string... something like <12345><45677><78900>..
So to look for a specific value use the contains function and include <>. Using <> will guaranty finding the exact value (avoid cases like <12345><123456><1234567>:

IF HL7.(FT1grp().FT1:7.1) Contains "<12345>"


MH.




--
Reply all
Reply to author
Forward
0 new messages