Question
Kyle M · Sep 21, 2020

suppressing a patient identifier

Hi all

Another newbie question.

A small percentage of our patients have an extra hospital number which was imported from the previous PAS but is no longer in use. We only need to send MRN and NHS number and would like to suppress CMRN. Could you please advise me how to do it in DTL?

 

PID|1|E05088888^^^RTPMRN^MRN^CD:14248745|00550972^^^RTPCMRN^CMRN^CD:4528185~E05088888^^^RTPMRN^MRN^CD:4528185~4449999999^^^NHSNBR^NHSNMBR|

 

 

00
0 5 97 1

Replies

Hey Kyle.

I would approach this by creating a separate count to what is created by the DTL for for each loops, and then iterate through the list of ID's and only move across the ones you want, while not leaving a blank entry in the target message (and remembering to increment the separate count for each ID you copy to the target message).

I have made an example within a common PID transform:

This then gave me:

Thank you for your prompt reply. It is complaining about the for each loop in my case. 

Don'r worry, this has caught me out too many times smiley

Your "if" is missing the k1 count in the ().

Should be:

source.{PatientIdentifierList(k1).identifiertypecodeID} '= "CMRN"

Edit - just seen why it's actually complaining. You need the change I suggested, and the "for each" needs to be:

source.{PatientIdentifierList()}

I corrected it but CMRN is still getting sent. I will need to come back to it later as have some urgent work to do but wanted to say that I really appreciate your help.

Hey Kyle - it looks like I gave you some bad advice. I have just noticed that you're working with a pre-2.4 HL7 schema, and my examples were all based on HL7 2.4 (even where I corrected myself in the second reply). Also in my corrections, I continued to provide examples for a common PID transform, whereas your screenshot shows you doing the transform at the whole message level.

This should work for you:

Sorry about that - hopefully it works for you now smiley