Christine Nyamu · May 12, 2023 go to post

Thanks for your reply. Will try it out 

Edited to add:

Would Set value = $Piece(obxValue, "<>", *) work?

Christine Nyamu · May 15, 2023 go to post

Hi @Alex Woodhead 

At which point do we actually specify the lookup table we are searching against in the function? In my case, the table is AnemiaResults 

Christine Nyamu · Sep 1, 2023 go to post

Hi Luis, thanks for your response. However, the interface in question doesn't have a rule, only BPL. All the routing gets determined by the BPL. 

Christine Nyamu · Sep 8, 2023 go to post

Hi @Luis Angel Pérez Ramos 
Thank you, the code worked perfectly in the BPL. How can I change it to work in the DTL?

I need to search for the following values "SEDATION:  " and "Procedure" In consecutive OBX 5 and if true set OBR 4.1 = "28014-9"

OBX|028|TX|OP^Operative Note^D4D^11504-8^Surgical operation note^XXX||SEDATION:  ||||||C|
OBX|029|TX|OP^Operative Note^D4D^11504-8^Surgical operation note^XXX||Procedure:
Christine Nyamu · Sep 20, 2023 go to post

@Arshiya Syeda 
Thanks for the reply. My greatest challenge is how to pull that PV1 7 value given that there are different providers e.g, 'TEST,PROVIDER', 'TEST,PROVIDER1', 'TEST,PROVIDER2', 'TEST,PROVIDER3' etc. so I can not hard code it to only use 'TEST,PROVIDER'

Christine Nyamu · Sep 20, 2023 go to post

@Ashok Kumar T Thanks for the reply. My greatest challenge is how to pull that PV1 7 value given that there are different providers e.g, 'TEST,PROVIDER', 'TEST,PROVIDER1', 'TEST,PROVIDER2', 'TEST,PROVIDER3' etc. I might be missing something in the code that you sent or might not be clearly understaning it. Thanks 

Christine Nyamu · Oct 10, 2023 go to post

Thanks for your response @LuisAngel.PérezRamos. I should have included in my post that this interface is designed not to have any rules. Only 1 BPL and DTLs. Any way I can use $EXTRACT within the BPL?

Christine Nyamu · Oct 10, 2023 go to post

I like the idea BUT I still want the original OBX 5 values to be received as is downstream without being truncated and my fear is that by truncating the OBX 5 values greater than 510 characters before passing on to subsequent DTLs I will pass on incomplete fields. Hope that makes sense 

Christine Nyamu · Oct 11, 2023 go to post

@Jeffrey Drumm please see below. 

Error 1:

ERROR <Ens>ErrException: <SUBSCRIPT>zExists+1^Ens.Util.FunctionSet.1 ^Ens.LookupTable("TestTable","The patient came in accompanied by their daughter.. Time-out was -- logged as '-' number - @''
 

Error 2:

ERROR <Ens>ErrBPTerminated: Terminating BP TestRsltRouter # due to error: ERROR <Ens>ErrException: <SUBSCRIPT>zExists+1^Ens.Util.FunctionSet.1 ^Ens.LookupTable("TestTable","The patient came in accompanied by their daughter.. Time-out was -- logged as '-' number - @''
> ERROR <Ens>ErrException: <SUBSCRIPT>zExists+1^Ens.Util.FunctionSet.1 ^Ens.LookupTable("TestTable","The patient came in accompanied by their daughter.. Time-out was -- logged as '-' number - @''
 

Christine Nyamu · Oct 13, 2023 go to post

Thank you @Luis Angel Pérez Ramos I used your suggestion and it worked.  Thank you @Jeffrey Drumm for showing me how to set the EXTRACT function. I used $EXTRACT(context.ObxTrunc,1,470) where context.OBxTrunc is the context variable holding the original message.  

In the BPL, I passed the message through the newly created DTL that was looking if the OBX 5 characters(bytes) were greater than 400, if so, I took the substring of the first 470. (I tried taking 480/ 490/ 500 but that would cause the message to error) then following Luis's suggestion, I defined another context variable with the same type than the original message as output. 

Christine Nyamu · Nov 27, 2023 go to post

@Enrico Parisi thank you for your response. However, I think it only works if the trace had been set up on the component and not in the BPL. I tried out your suggestion and it didn't work unfortunately as I could not select the BPL in the Source Config Item drop down menu. 

Christine Nyamu · Nov 28, 2023 go to post

Thank you @Enrico.Parisi. This also worked. I followed your instructions to type in the name of the router since it wasn't appearing in the drop-down menu. 

Christine Nyamu · Dec 8, 2023 go to post

@Enrico Parisi Thank you, sample message below. I would like that if PMP found, send only the first segment containing PMP and ignore the rest. 

MSH|^~\&|MESA_OP|XYZ_HOSPITAL|iFW|ABC_HOSPITAL|040112043835||BAR^P05|0000000001|T|2.3|
EVN||20200420134725||
PID|||3000222452||DOE^JOHN^E||19931114|M||||||||||1546740|666381774|
PV1||I|BRACKENRIDGE|||||023434|||||||||023434|||||||||||||||||||||||||||20031121||
PV2||||||||||||||||||||||||||||||||||||||
OBX|||||4100|
DG1|1||784.3^APHASIA^I9C||200750816|A
DG1|2||784.0^HEADACHE^I9C||200750816|A
DRG|640^^APP-DRG S43 (2024)^^^^I10||015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|Admission DRG|015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|PPC DRG|015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|PPC Admit DRG|015|.2017|||^^0|^^|0|||Completed|20231204085141|PMP, CODER|CODER||N
ABS|||||||20231204085141
DRG|555^^PMP S43 (2024)^^^^I10||015|.2017|3.1|3.1|^^97585.77|^^|1358.36|||Completed|20231204085141|PMP, CODER|CODER||Y
ABS|||||||20231204085141
DRG|555^^PMP S43 (2024)^^^^I10|HAC Dx Included|015|.2017|3.1|3.1|^^97585.77|^^|1358.36|||Completed|20231204085141|PMP, CODER|CODER||N
ABS|||||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10||015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|Admission DRG|015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|PPC DRG|015|.0944|1.8|1.7|^^0|^^|0|1|1|Completed|20231204085141|PMP, CODER|CODER||N
ABS|||1||||20231204085141
DRG|640^^APP-DRG S43 (2024)^^^^I10|PPC Admit DRG|015|.2017|||^^0|^^|0|||Completed|20231204085141|PMP, CODER|CODER||N
ABS|||||||20231204085141

Christine Nyamu · Jan 26, 2024 go to post

@Luis Angel Pérez Ramos Thank you for all your help. 

It seems like it did not like the context = context scenario. What worked was putting this in the IF condition in the Management Portal. I also opted to check if NOT equal to

context.Prov '= request.{PIDgrpgrp(1).ORCgrp(1).PV1:7(1).2.1}