Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

Tag OBX saved with data in Database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tag OBX saved with data in Database

    Hii..I need some help!!

    I have a problem while saving the data into the database, read from HL7 File.
    Actually the problem comes with multiple <OBX> tags. I tried saving from a HL7 file which has only one <OBX> tag and data saved correctly in

    database. But when I tried with multiple <OBX> tags, the saved data was like this....

    <OBX.14.1>20060922152311</OBX.14.1>
    <OBX.14.1>20060922152301</OBX.14.1>
    <OBX.14.1>20060922152302</OBX.14.1>
    <OBX.14.1>20060922152300</OBX.14.1>
    <OBX.14.1>20060922152300</OBX.14.1>

    but it should be like this:

    20060922152311
    20060922152301
    20060922152302
    20060922152300

    The mapping I am using for the transformer variable is .. msg['OBX']['OBX.14']['OBX.14.1'].toString()

    I tried by specifying the index [i] at the end of msg ('i' represents the required row)...like msg['OBX']['OBX.14']['OBX.14.1'][2].toString(), it fetched

    second row and saved data correctly in database..but this does not serve my purpose as I require all the rows and taht too without <OBX> tags in

    database.

    Rest information is fetched correctly (like OBR,PID etc..)

    I am using File Reader as Source Connector and Database Writer as the Destination Connector. The HL7 text file I am using is :

    MSH|^~&|WEBREACH|WEBREACH|||200612131519||ORM^O01| 12345678|P|2.4|||AL|NE
    PID|1|4223161584^^^Mirth^PN|4223161584|4223161584| Hanso^Alvar^^^^||Aug 15, 1942|M|||815 Oceanic Way^^Santa

    Barbara^CA^93108||481 516-2342||||||815-16-2342|
    PV1|1|O|WebReach,

    Inc.|OP|||ShephardJ^Shephard^Jack^G^^^MD|BurkeJ^Bu rke^Juliet^F^^^MD||CARE||||PHYSICIAN||||CLINIC||BC |||||||||||||||||||WebReach,

    Inc.||REG|||Aug 14, 2004||||||
    ORC|XO|801887.001|||R|N||||||||||
    OBR|1|801887.001||MRS^Shephard^Jane MRI W/&W/O

    CONTRAST^70553||200612131230||||||||||ShephardJ^Sh ephard^Jack^G^^^MD||MR^20061213-0007|||||||||1^^^200612131230^^R||||||||
    OBX|1|NM|84295^SODIUM^GH|1|145|mmol/L|||||F|||20060922152311|GH
    OBX|2|NM|84132^POTASSIUM^GH|2|5.2|mmol/L|||||F|||20060922152301|GH
    OBX|3|NM|82435^CHLORIDE^GH|3|108|mmol/L|||||F|||20060922152302|GH
    OBX|4|NM|82374^CARBON DIOXIDE^GH|4|31|mmol/L|||||F|||20060922152300|GH
    OBX|5|NM|84520^BUN^GH|6|22|MG/DL|||||F|||20060922152300|GH

    Kindly help me out. Thanks in advance.

    Post edited by: ranbir.thind, at: 10/20/2007 02:53

    Post edited by: ranbir.thind, at: 10/20/2007 03:13

  • #2
    hi buddy use
    for each (seg in mgs.children())
    {
    if (seg.name()='OBX')
    {
    perform Your operation here
    }
    }

    Comment

    Working...
    X