Reoder OBR and DG segments

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Reoder OBR and DG segments

  • Creator
    Topic
  • #50004
    Daniel Chibaya
    Participant

      I have a little project coming up and I’m hoping to get some help.  I have a need to re-order OBR and DG segments.  Currently I get

      OBR1

      DG1

      OBR2

      DG1

      OBR3

      DG1

      I would like to have the following

      OBR1

      OBR2

      OBR3

      DG1

      I have added an example actual message below.  Whats the best way to get this done?  screenshots etc will be helpful – newbie aleart  ðŸ˜¯

      MSH|^~&|SENDAPP|12345|SQT|LAB|20080430074508||ORM^O01|51693|P|2.3|||AL|

      PID|1|TEST17|17973||TOTALLY^CONFUSED^^||19730719|F||B|999 CONFUSED WAY^^YUBA CITY^CA^95991||(053)074-1025|||S||157057^^^P|568-95-6325|

      PV1|1|O|1|||||||||||||||||

      GT1|1|17974|TOTALLY^CONFUSED^^||999 CONFUSED WAY^^YUBA CITY^CA^95991|(053)074-1025|||||9999||||1|||||||||||||||||||||||||||||||||||||

      ORC|NW|3978|||||^^^^^R||200804300000|winadmin||E08826^GROSS D O^JERRY^^^^^UPIN||(530)671-2880|200804300000||1|

      OBR|1|3978||ASTRA^BASIC METABOLIC^98^|R|200804300745|200804300744||^||N|||||E08826^GROSS D O^JERRY^^^^^UPIN|(530)671-2880||P||||||||1^^^200804300745^^R|^^^^^^^UPIN||||||||||

      DG1|1|I9|250.11^DIABETES WITH KETOACIDOSIS INSULIN DEP||20080430|ACTIVE||||||||||E08826^GROSS D O^JERRY^^^^^UPIN|

      OBR|2|3978||CBC^COMPLETE BLOOD COUNT^98^|R|200804300745|200804300744||^||N|||||E08826^GROSS D O^JERRY^^^^^UPIN|(530)671-2880||P||||||||1^^^200804300745^^R|^^^^^^^UPIN||||||||||

      DG1|1|I9|250.11^DIABETES WITH KETOACIDOSIS INSULIN DEP||20080430|ACTIVE||||||||||E08826^GROSS D O^JERRY^^^^^UPIN|

      OBR|3|3978||HA1C^HEMOGLOBIN A1C ASSAY^98^|R|200804300745|200804300744||^||N|||||E08826^GROSS D O^JERRY^^^^^UPIN|(530)671-2880||P||||||||1^^^200804300745^^R|^^^^^^^UPIN||||||||||

      DG1|1|I9|250.11^DIABETES WITH KETOACIDOSIS INSULIN DEP||20080430|ACTIVE||||||||||E08826^GROSS D O^JERRY^^^^^UPIN|

      OBR|4|3978||HEPA^HEPATIC FUNCTION^98^|R|200804300745|200804300744||^||N|||||E08826^GROSS D O^JERRY^^^^^UPIN|(530)671-2880||P||||||||1^^^200804300745^^R|^^^^^^^UPIN||||||||||

      DG1|1|I9|250.11^DIABETES WITH KETOACIDOSIS INSULIN DEP||20080430|ACTIVE||||||||||E08826^GROSS D O^JERRY^^^^^UPIN|

      OBR|5|3978||HBSAG^HEPATITIS B SUR AG^98^|R|200804300745|200804300744||^||N|||||E08826^GROSS D O^JERRY^^^^^UPIN|(530)671-2880||P||||||||1^^^200804300745^^R|^^^^^^^UPIN||||||||||

      DG1|1|I9|250.11^DIABETES WITH KETOACIDOSIS INSULIN DEP||20080430|ACTIVE||||||||||E08826^GROSS D O^JERRY^^^^^UPIN|

    Viewing 1 reply thread
    • Author
      Replies
      • #64461
        Jim Kosloskey
        Participant

          Daniel,

          Welcome aboard.

          No screen shot I am afraid.

          Having the DG1 segment after all of the OBR segments is not standard (normally the DG1 segments exist where you see them for an ORM Message) but I am guessing the receiving system indicated this is the way they want it.

          What I would do is to modify the HL/7 variant for the Receiving system such that in the Messages Tab for ORM_O01 I move the DG1 definition out from being a part of the OBR group to the appropriate place in the message structure.

          Then while iterating through the OBR group, I would take the DG1 fields from the inbound (subordinate to the OBR group) and COPY them to the DG1 segment in the Outbound (at the new location) using the group counter from the OBR iteration in the segment reference position inside the DG1 address path.

          I realize that all of the above might seem overwhelming to you if you have just completed Level 1 but it really is not that daunting.

          If you would like to communicate off line about this, email me directly.

          You should take comfort in knowing this is likely doable inside an Xlate (and using the HL/7 configurator) with no need for Tcl.

          Thanks,

          Jim Kosloskey

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

        • #64462
          Daniel Chibaya
          Participant

            everything is clear  until the statement

            “Then while iterating through the OBR group, I would take the DG1 fields from the inbound (subordinate to the OBR group) and COPY them to the DG1 segment in the Outbound (at the new location) using the group counter from the OBR iteration in the segment reference position inside the DG1 address path.”

            I will email you offline

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