Question
· Apr 22

DTL help

New at DTL. I need some pointers on this DTL

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 2021.2
$ZV: IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST
Discussion (1)1
Log in or sign up to continue

It's slightly dependant on the HL7 Version and Message Type, but assuming you're working with ORM_O01 messages using HL7 V2.3, you have a few options:

Example 1, Multiple Ifs, one for each variation (I only did 2 in the screenshot to save time) :

Example 2, If/Else where we assume that we only want "I" in OBR:18 when PV1:2 is "I", and otherwise set to "O": 

Example 3, use the $CASE function:

All of these can be combined with the response you just got here HL7 DTL formatting | InterSystems Developer Community | Business Process for the same question, assuming you want to put them into a subtransform, but I'd start with what I have shared here first, and venture into subtransforms and auxiliary-based configs after you get this nailed down.