I’m new at creating a new HL7 Message but for the most part I understand how to do so in the HL7 tool. What’s been throwing me off is how do I create a sub field? In the HL7 tool it only allows you to create ‘Field’, ‘Segment’, & ‘Messages’.
Are you creating the message with an Xlate? If so, what variant are you using?
Or, are you talking about creating a variant? If so, I think subfields are defined when you choose the datatype for the field. It is the datatype that has the subfields. You have to know the datatypes. For example, PID-3 has the datatype CX. It is the CX datatype that has 10 subfields, ID Number, Identifier Check Digit, Check Digit Scheme, etc.
Frequently vendors describe a custom field which has the TX or ST data type but they want to deploy components or even (less frequently) sub-components.
Even though the field definition for a TX or ST data type does not present components you can still reference them with component/sub-component notation in the Xlate.
Something like this
…PID.#30.[0] <– first component of field PID-30 (assume PID-30 is the custom field)
…PID.#30.[1] <– secondcomponent of field PID-30 and so on.
For sub-component:
…PID.#30.[0].[0]
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
I did create a new variant and within that new variant I wanted to add a new Message Type (MADMUP) and with in the message use the MSH, MFI, CD1, CD2, & CD3 segments. Within the MSH I wanted to modify the sub fields to the MSH – Message type ID field. Also add the addition segments CD1, CD2, & CD3, which in some field would have sub fields.
An easy way to do this in your variant is to change the data type of the fields that will have subfields to a composite type, like CE (Coded Element), depending on the number of subfields you need. CE would allow your field to have up to 6 subfields.
You should also increase the length of this field to be able to hold the sum of all subfields it will receive, for example to 512 chars.
For example, you would change CD1 # 9 to data type CE and length 512.
I found the datatype file but it’s not under my specific site. If I add a new sub field type to that file what do I have to do in order for me to use it? and it there a way I copy the datatype file to my site so that only that particular site can use those new sub fields?
I was able to edit the datatypes file so that I could add my custom sub fields but I still don’t see it in the HL/7 configuration gui when I select the drop down box. Is there a command I need to us in order to reinitialize that file?
I am not sure I understand what you are attempting to do. I have never edited the datatype file to create a custom subfield. I just create a new variant in the GUI, “add” a new field in the variant, and select the datatype for the new field from the drop-down. All the datatypes defined in the HL7 standard are available in that drop-down.