Custom HL7 Sub-Field Question

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Custom HL7 Sub-Field Question

  • Creator
    Topic
  • #53649
    santiago guzman
    Participant

      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’.

    Viewing 10 reply threads
    • Author
      Replies
      • #78429
        bill bearden
        Participant

          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.

        • #78430
          Jim Kosloskey
          Participant

            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.

          • #78431
            santiago guzman
            Participant

              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.  

              EX:

              CD1(0).#9(0).[1]

              CD1(0).#9(0).[2]

              CD1(0).#9(0).[3]

              etc..

              How do I do so?

            • #78432
              santiago guzman
              Participant

                Bill,

                I will be creating a xlate with the new variant that I’ll be creating. The translation will be between an .csv file to HL7.

              • #78433
                Levy Lazarre
                Participant

                  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 hope this helps.

                • #78434
                  santiago guzman
                  Participant

                    It does help.

                    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?

                  • #78435
                    Jim Kosloskey
                    Participant

                      No need to copy to your site. In the HL/7 Config gui, add the field then select the datatype from the pull-down.

                      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                    • #78436
                      santiago guzman
                      Participant

                        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?

                        Also, this is the line that I added:

                        {TYPE MT} {NAME {Message Type}} {SUBFIELDS {message type id} {trigger event id}}

                      • #78437
                        Levy Lazarre
                        Participant

                          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.

                        • #78438
                          santiago guzman
                          Participant

                            Can the database file be edited to add additional sub fields?

                          • #78439
                            Levy Lazarre
                            Participant

                              Typically, this is done using variants. The data types provided should be sufficient for any need.

                          Viewing 10 reply threads
                          • The forum ‘Cloverleaf’ is closed to new topics and replies.