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

Transform OBX.2 - Value Type (ID)

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

  • Transform OBX.2 - Value Type (ID)

    I want to create a transform to examine OBX.2 - Value Type (ID). If it is "TX" or "FT", change it to "ST".

    Below is my attempt to do this. Does this look correct? Or am I totally off base?

    <com.webreach.mirth.model.Transformer>
    <steps>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>0</sequenceNumber>
    <name>New Step</name>
    <script>//msg..OBX returns every segment that matches OBX
    for each (obx in msg..OBX){
    if (obx['OBX.2'].text() == 'FT') or (obx['OBX.2'].text() == 'TX'){
    logger.info('OBX-2 of ' + obx['OBX.2'].text() + ' changed to ST');
    obx['OBX.2'].text() = "ST";
    }
    }</script>
    <type>JavaScript</type>
    </com.webreach.mirth.model.Step>
    </steps>
    <template>MSH|^~\&amp;|LAB|CCF|||20040920080937||O RM^O01|42640000009|P|2.3|
    PID|||56797971||RESULTSREVIEW^TESTPATIENT^||196505 25|M||||||||||56797971|
    PV1||O|UNKO^|||||
    ORC|RE||A0203809||IP|||||||
    OBR|1|A0203809|A0203809|400090^Complete Blood Count|||200609240000|||||||200609240847||deleted^^ ^^MD^^^^^^||||||200609241055|||P
    OBX|1|ST|40010^White Blood Count (WBC) (x1000)||PENDING||||||P
    OBX|2|ST|40020^Red Blood Count (RBC)||PENDING||||||P
    ORC|RE||A0203809||CM|||||||
    OBR|2|A0203809|A0203809|650300^Depakene (Valproic Acid) Level|||200609240000|||||||200609240847||^deleted^ ^^^MD^^^^^^||||||200609241055|||F
    OBX|1|NM|65030^Depakene (Valproic Acid) Level||76.8|ug/ml|50-100||||F|||200609241054||</template>
    </com.webreach.mirth.model.Transformer>
Working...
X