Question
· Feb 18, 2021

I am having multiple data for SPM segment in HL7. I used a '~' sign for that. But HL7 doesn't show the '~' sign in DAT file. How can I tackle this issue?

Set SPMData= "SPM|1|A||^^^^^^^^||||ABDMN^ABDOMEN A^L|""_Modifier1_""^L~""_Modifier2_""^L~""_Modifier3_"

 

HL7 SPM:

SPM|1|A||^^^^^^^^||||ABDMN^ABDOMEN A^L|1^1^L10C^10:00^L11C^11:00^L|||||FREE TEXT NOTE 1|||202102152216||||||||||||

Product version: IRIS 2019.1
Discussion (5)0
Log in or sign up to continue

Are you inserting these values into an EnsLib.HL7.Message object? If yes, the standard way of doing this is to first make sure the SPM field you're working with is defined as repeating in the message schema (DocType), then iterate through your list of field values to be inserted.

Assuming your message object is tMsg:

Do tMsg.SetValueAt(Modifier1,"SPM:9(1)")
Do tMsg.SetValueAt(Modifier2,"SPM:9(2)")
Do tMsg.SetValueAt(Modifier3,"SPM:9(3)")

This will automatically use the repetition separator to delimit the values in SPM field 9. Note that the path supplied for the SPM segment/field will vary based on your specific schema definition.