Question
· Apr 18

HL7 DTL formatting

 

I need a DTL to handle this.

Any ideas appreciated.

For all Prosthetics orders:
when ORC-1(Order Control) is "NW" (New Order), need to update OBR-18(Placer Field 1) based on PV1-2 (Patient Class) value.
assumption is that the selection logic is that all prosthetics orders with OBR-18 field is always blank.
Description :
If PV1-2 is I, insert I in OBR-18
If PV1-2 is O, insert O in OBR-18
If PV1-2 is E, insert O in OBR-18
If PV1-2 is P, insert O in OBR-18
If PV1-2 is R, insert O in OBR-18
If PV1-2 is B, insert O in OBR-18

Product version: IRIS 2023.1
$ZV: 2023
Discussion (2)2
Log in or sign up to continue

Hi Gary, 

There are many ways to do it :)

For example, if you're using DTL you most likely have a single message level transform and multiple segment level transforms. 

In the message level transform you can add a code block and save a value of PV1:2 in a variable. Then you can pass that variable to a sub-transform (segment level transform) as Auxiliary value.  

Then in your OBX transform, you can use that aux variable as a condition to "if" or "switch" statement. 

Details for Other Actions | Developing DTL Transformations | InterSystems IRIS Data Platform 2025.1
 

Let me know how it went. :)

Hi, Gary.

Here is an idea to resolve this problem: You can use a lookup table; just insert the data of the Patient Class (PV1-2) you want to map into the final result in Placer Field 1(OBR-18).

Here is an example of the table:

You can check more about this topic: Defining Data Lookup Tables | Configuring Productions | InterSystems IRIS Data Platform 2025.1

And assuming you are using 2.3.1:ORM_O01 as Doc Type. You need to add a condition to check if ORC-1 is equal to "NW", and if it is, you need to add this action:

Action: set

Property: target.{ORCgrp(1).OBRuniongrp.OBRunion.OBR:PlacerField1}

Value: ..Lookup("Prosthetics.orders.PatientClass", source.{PIDgrp.PV1grp.PV1:PatientClass},"O",3)

I assume "ORCgrp(1)" that group has only one record; otherwise, you need to use a for each loop. 

I hope that solution can help you.