Question Christine Nyamu · Oct 22

Hello. I need to transform a message

FROM:

MSH|^~\&|
SCH||61490||
PID|1||
RGS|1||1
AIS|1||
AIS|2||
AIS|3||
AIL|1||
AIP|1||

TO:

MSH|^~\&|
SCH||61490||
PID|1||
RGS|1||1
AIS|1||
AIL|1||
AIP|1||
RGS|1||1
AIS|2||
AIL|1||
AIP|1||
RGS|1||1
AIS|3||
AIL|1||
AIP|1||

The RGS, AIS, AIL and AIP are all under the RGS group. The one RGS segment that comes in will be copied across the group. If 3 AIS segments come in then I need 3 RGS groups, if 2 I need 2 RGS groups etc.

0
0 0
Question Christine Nyamu · Oct 9, 2024

Hello all,

I need help with coming up with a SQL query that pulls only one value. I have a case where two providers share the exact same name. Each has a different NPI number and IdentityTypeId. I tried the below query - output is also below. 

SELECT *                        
FROM PhysTable                        
WHERE ProviderName = 'DOE, JOE' AND Type = 'NPI'                        
                        
UNION                        
                        
SELECT *                        
FROM PhysTable                        
WHERE IdentityId = '345678'                        
 

Output

0
0 0
Question Christine Nyamu · Mar 22, 2024

Is there a way to compare the content of two variables/ lists and if they share a common element/ value return 1?

Example the two below both have "Yellow":

Set y = "Red, Green, Orange, Yellow"

Set x = "Purple, Black, Yellow, Pink"

The lists I am working with have over 30 elements/values that vary so it is difficult to hard code it to say look for "Yellow". 

0
0 376
Question Christine Nyamu · Jan 25, 2024

I am able to capture two values in two separate contexts in the BPL. One through an API call and another by looking at the contents of PV1:7. These are context.Prov  and context.ProvName. I am checking to see if the values contained in the contexts are the same and if yes process further and if not stop.

In the IF statement I tried the below but none worked. Can someone please tell me what I am doing wrong. The trace does show that they are the same value so that's not it. 

1. context.Prov = context.ProvName

2.  "context.Prov" = "context.ProvName" and

3.  context.Prov [ context.ProvName

4
0 161
Question Christine Nyamu · Oct 9, 2023

I have a BPL that checks if at least one of the incoming OBX 5 values exists in TestTable. If the value exists it gets passed to Operation A and if it doesn't exist it gets passed to Operation B. The lookup table has keys that range between 10 to 70 characters. However, the incoming message sometimes has OBX 5 values that are greater than 510 characters which causes the BPL to terminate and the message does not get sent to any operation. So, my question is, how do I truncate the incoming OBX 5 values before they get passed to the BPL so that what is passed to the BPL is always between 10 and

9
0 254
Question Christine Nyamu · Sep 14, 2023

I need to run a SQL query and use the output to map PV1 7.1. The query is :

SELECT ID
FROM TestTable
WHERE ProviderName = 'TEST,PROVIDER' AND IDType= 'BPI'

When I run this query with the 'TEST PROVIDER'  I do pull the ID in question but I can't figure out how to do it from the DTL given that there are various providers sent in PV 1 7 . Any assistance will be greatly appreciated. 

8
0 448
Question Christine Nyamu · Aug 31, 2023

I need to search for the following values "SEDATION:  " and "Procedure" In consecutive OBX 5 as seen below. Note that sometimes the OBX 5 containing "Procedure" may be followed by other characters/text hence I am leaning towards using a contains statement. 

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:

Only when they appear consecutively do I want to process the message as an ORU using the BPL. Not sure how to go about it and would appreciate any assistance. Thanks 

8
0 421
Question Christine Nyamu · May 12, 2023

Hello,

I am quite new to the InterSystems world. I have one of my OBX 5 fields having this value "blood work was done<>tested positive for anemia<>tested negative for hepatitis". I have a lookup table "AnemiaResults" with a key of TESTED POSITIVE FOR ANEMIA. My issue is that since OBX 5 has other characters/text  (and OBX is a repeating segment) , I am unable to use the Exists function. Any idea how to tackle this? Any assistance will be greatly appreciated. 

8
0 606