Announcement

Collapse
No announcement yet.

Split OBX help.

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

  • Split OBX help.

    MC v3.2.2.7694

    Issue: Outbound radiology message texts too long in OBX.5.1. Receiving vendor would like us to add line breaks or split up the segment into additional OBX.5.1 fields.

    Channel is attached.
    Sample Message (NO PHI):

    MSH|^~\&|TEST REGIONAL MEDICAL CENTER|TEST REGIONAL MEDICAL CENTER|SHARE|SHARE|20160517173509||ORU^R01|Q271952 156T346054078||2.3
    PID|1|1153386^^^TEST Health Medical Record Number^MRN^PATCOM|1153386^^^TEST Health Medical Record Number^MRN^PATCOM||MOUSE^MINNIE^^^^^Current||19500 617095400|F|MOUSE^MINNERS^^^^^Previous~MOUSE^MINNI E^^^^^Alternate|White|1821 DISNEY ST^^MOUNTAIN HOME^FL^32128^USA^home^^TEST|TEST|(555)555-2762^Home~(555)555-2762^Home||English|Married|Protestant|6197XXXX^^^T EST Health Financial Number^FIN NBR^PATCOM|123456789|||Not Hispanic or Latino|||0
    PV1|1|Outpatient|OPO^^^TEST REG^^Ambulatory(s)^TRMC|Elective|||8516 -NORRIS, CHUCK,^8516 -NORRIS, CHUCK,|||Mammography||||Clinic / Physician Referral|||8516 -NORRIS, CHUCK,^8516 -NORRIS, CHUCK,|Outpatient||Medicare Primary|||||||||||||||||||TEST REG||Active|||20160517105700
    ORC|RE
    OBR|1|299438766|00000MA160004677|51435820^Mammogra m Screen Tomo Bil w/CAD|||20160517112142|20160517112143|||||||Rad Type&Rad Type|jmccoy^Norris^CHUCK^A^^ANP^^^TEST Health Employee ID NBR^Personnel^^^PRSNLID~jmccoy^Norris^CHUCK^A^^ANP ^^^externeal^Personnel^^^External Identifier~^Norris^CHUCK^A^^ANP^^^^Personnel^^^Per sonnel Badge ID~1675515555^Norris^CHUCK^A^^ANP^^^^Personnel^^^N ational Provider Identifier~8516^Norris^CHUCK^A^^ANP^^^^Personnel^^ ^COMMUNITY DR NBR||||00000MA160004677|TRMC Mammo 1|20160517112142||Mammography|P||1^^^^^Routine|||A mbulatory|^Screening prev 1-11-08|ktester^Tester^Kyle^^^^^^externeal|||46261111^T ester^Connie^^^^^^PowerScribe PRSNL ID
    OBX|1|FT|Read^Read||Bilateral mammograms are performed. Previous studies are from 2008.There is an area of dense tissue in the lateral aspect of the rightbreast which has been worked up previously and is unchanged. There isdense tissue centrally in the left breast that is better seen todaythen it was in 2008.CAD and tomosynthesis were utilized. Tomosynthesis of the rightbreast reveals some irregular tissue in the upper outer aspect of thebreast but I do not see architectural distortion or a mass lesion.Left breast tomosynthesis reveals dense focus of tissue centrally inthe breast and I believe there are some tiny calcifications associatedwith this and I would recommend compression tomosynthesis and ifnecessary magnification views of this area of dense tissue centrallyin the breast. I believe it||||||P
    NTE|1|Signature Line| *** PRELIMINARY ***Interpreted By: Tester M.D., TTranscribed Date: 05/17/2016 17:34Transcribed By: CRDictated Date: 05/17/2016 16:45


    Searched forum for Split OBX and found code but it is not working for me. :
    http://www.mirthproject.org/communit...ight=split+obx
    Attached Files

  • #2
    Try something like this. It worked on your sample message.

    PHP Code:
    for each (seg in msg.children()) 
    {
        var 
    segName seg.name().toString();
        if (
    segName == 'OBX') {
            for 
    each (line in breakString(seg['OBX.5']['OBX.5.1'].toString(),60)) {
                var 
    newOBX createSegmentBefore('OBX'seg);
                
    newOBX['OBX.1']['OBX.1.1'] = '1';
                
    newOBX['OBX.2']['OBX.2.1'] = seg['OBX.2']['OBX.2.1'].toString();
                
    newOBX['OBX.3']['OBX.3.1'] = seg['OBX.3']['OBX.3.1'].toString();
                
    newOBX['OBX.4']['OBX.4.1'] = seg['OBX.4']['OBX.4.1'].toString();
                
    newOBX['OBX.5']['OBX.5.1'] = line;
            }
        }
    }

    for 
    each(obr in msg.OBR)
    {
        for 
    each(obx in msg.OBX)
            {
                var 
    obxGroup getSegmentsAfter(msg,obr,'OBX');
                for (var 
    0<= obxGroup.length-1o++)
                
    msg.children()[obxGroup[o].childIndex()]['OBX.1']['OBX.1.1'] = o+1;
            }

    Comment


    • #3
      Thank you for the assistance, really appreciated!

      I did not format the message as expected.

      Looking for it to format as:
      MSH|^~\&|TEST REGIONAL MEDICAL CENTER|TEST REGIONAL MEDICAL CENTER|SHARE|SHARE|20160517173509||ORU^R01|Q271952 156T346054078||2.3
      PID|1|1153386^^^TEST Health Medical Record Number^MRN^PATCOM|1153386^^^TEST Health Medical Record Number^MRN^PATCOM||MOUSE^MINNIE^^^^^Current||19500 617095400|F|MOUSE^MINNERS^^^^^Previous~MOUSE^MINNI E^^^^^Alternate|White|1821 DISNEY ST^^MOUNTAIN HOME^FL^32128^USA^home^^TEST|TEST|(555)555-2762^Home~(555)555-2762^Home||English|Married|Protestant|6197XXXX^^^T EST Health Financial Number^FIN NBR^PATCOM|123456789|||Not Hispanic or Latino|||0
      PV1|1|Outpatient|OPO^^^TEST REG^^Ambulatory(s)^TRMC|Elective|||8516 -NORRIS, CHUCK,^8516 -NORRIS, CHUCK,|||Mammography||||Clinic / Physician Referral|||8516 -NORRIS, CHUCK,^8516 -NORRIS, CHUCK,|Outpatient||Medicare Primary|||||||||||||||||||TEST REG||Active|||20160517105700
      ORC|RE
      OBR|1|299438766|00000MA160004677|51435820^Mammogra m Screen Tomo Bil w/CAD|||20160517112142|20160517112143|||||||Rad Type&Rad Type|jmccoy^Norris^CHUCK^A^^ANP^^^TEST Health Employee ID NBR^Personnel^^^PRSNLID~jmccoy^Norris^CHUCK^A^^ANP ^^^externeal^Personnel^^^External Identifier~^Norris^CHUCK^A^^ANP^^^^Personnel^^^Per sonnel Badge ID~1675515555^Norris^CHUCK^A^^ANP^^^^Personnel^^^N ational Provider Identifier~8516^Norris^CHUCK^A^^ANP^^^^Personnel^^ ^COMMUNITY DR NBR||||00000MA160004677|TRMC Mammo 1|20160517112142||Mammography|P||1^^^^^Routine|||A mbulatory|^Screening prev 1-11-08|ktester^Tester^Kyle^^^^^^externeal|||46261111^T ester^Connie^^^^^^PowerScribe PRSNL ID
      OBX|1|FT|Read^Read||Bilateral mammograms are performed.
      OBX|2|FT|Read^Read||Previous studies are from 2008.There is an area of dense tissue in the lateral aspect of the rightbreast which has been worked up previously and is unchanged.
      OBX|3|FT|Read^Read||There isdense tissue centrally in the left breast that is better seen todaythen it was in 2008.CAD and tomosynthesis were utilized. Tomosynthesis of the rightbreast reveals some irregular tissue in the upper outer aspect of thebreast but OBX|4|FT|Read^Read||I do not see architectural distortion or a mass lesion.Left breast tomosynthesis reveals dense focus of tissue centrally inthe breast and
      OBX|5|FT|Read^Read||I believe there are some tiny calcifications associatedwith this and I would recommend compression tomosynthesis and ifnecessary magnification views of this area of dense tissue centrallyin the breast. I believe it||||||P
      NTE|1|Signature Line| *** PRELIMINARY ***Interpreted By: Tester M.D., TTranscribed Date: 05/17/2016 17:34Transcribed By: CRDictated Date: 05/17/2016 16:45

      Instead it is formatted as:

      [CONTENT]
      ORU_R01|MSH|^~\&|RAD||||OPTUM|||||SHARE||||||532|| |||||20160517173509|||||||||ORU|R01|||||||||Q27195 2 156T346054078||2.3PID|1|1153386|||TEST Health Medical Record Number|||||MRN|PATCOM||||1153386|||TEST Health Medical Record Number|||||MRN|PATCOM||||||MOUSE|MINNIE|||||Curren t||19500 617095400||||||||F|MOUSE|MINNERS|||||Previous|||MO USE|MINNI E|||||Alternate||||White|1821 DISNEY ST||MOUNTAIN HOME|FL|32128|USA|home||TEST||||TEST|(555)555-2762|Home||||||||||||(555)555-2762|Home||||||||||||||English||||||||||||||||Marr ied|Protestant|6197XXXX|||T EST Health Financial Number|||||FIN NBR|PATCOM||||||||||||||||||||123456789|||Not Hispanic or Latino|||0PV1|1|Outpatient|OPO|||TEST REG||||||Ambulatory(s)|TRMC||Elective|||8516 -NORRIS, CHUCK,|8516 -NORRIS, CHUCK,|||||||||Mammography||||Clinic / Physician Referral|||8516 -NORRIS, CHUCK,|8516 -NORRIS, CHUCK,|||||||||||||||||Outpatient||Medicare Primary|||||||||||||||||||||||||||||||||||||||TEST REG||Active|||20160517105700|||ORC|REOBR|1|2994387 66|||00000MA160004677||||51435820|Mammogra m Screen Tomo Bil w/CAD||||||20160517112142||||||||20160517112143||||| ||||||||||Rad Type|Rad Type||||||||||||||||jmccoy|Norris|CHUCK|A||ANP|||T EST Health Employee ID NBR||||||||||Personnel|||PRSNLID||||jmccoy|Norris| CHUCK|A||ANP |||externeal||||||||||Personnel|||External Identifier||||Norris|CHUCK|A||ANP||||Personnel|||P er sonnel Badge ID||||1675515555|Norris|CHUCK|A||ANP||||Personnel| ||N ational Provider Identifier||||8516|Norris|CHUCK|A||ANP||||Personne l|||COMMUNITY DR NBR||||||||00000MA160004677|TRMC Mammo 1|20160517112142||||||||||||||||||||||||Mammograph y|P||1||||||Routine|||||||||||||||||||||||||A mbulatory|Screening prev 1-11-08|||||||||||||||||||||||||||||||ktester||Tester|| |Kyle|||||||||externeal||||||||||||||||||||||||||| 46261111||T ester|||Connie|||||||||PowerScribe PRSNL ID|OBX|1|FT|Read|Read||||Bilateral mammograms are performed. Previous studies are from 2008.There is an area of dense tissue in the lateral aspect of the rightbreast which has been worked up previously and is unchanged. There isdense tissue centrally in the left breast that is better seen todaythen it was in 2008.CAD and tomosynthesis were utilized. Tomosynthesis of the rightbreast reveals some irregular tissue in the upper outer aspect of thebreast but I do not see architectural distortion or a mass lesion.Left breast tomosynthesis reveals dense focus of tissue centrally inthe breast and I believe there are some tiny calcifications associatedwith this and I would recommend compression tomosynthesis and ifnecessary magnification views of this area of dense tissue centrallyin the breast. I believe it||||||PNTE|1|Signature Line|*** PRELIMINARY ***Interpreted By: Tester M.D., TTranscribed Date: 05/17/2016 17:34Transcribed By: CRDictated Date: 05/17/2016 16:45||
      MSH|||RAD

      Comment


      • #4
        Here is how it output in my test channel. Since I didn't use your channel it may be an end of line character config issue or something...

        PHP Code:
        MSH|^~\&|TEST REGIONAL MEDICAL CENTER|TEST REGIONAL MEDICAL CENTER|SHARE|SHARE|20160517173509||ORU^R01|Q271952 156T346054078||2.3
        PID
        |1|1153386^^^TEST Health Medical Record Number^MRN^PATCOM|1153386^^^TEST Health Medical Record Number^MRN^PATCOM||MOUSE^MINNIE^^^^^Current||19500 617095400|F|MOUSE^MINNERS^^^^^Previous~MOUSE^MINNI E^^^^^Alternate|White|1821 DISNEY ST^^MOUNTAIN HOME^FL^32128^USA^home^^TEST|TEST|(555)555-2762^Home~(555)555-2762^Home||English|Married|Protestant|6197XXXX^^^T EST Health Financial Number^FIN NBR^PATCOM|123456789|||Not Hispanic or Latino|||0
        PV1
        |1|Outpatient|OPO^^^TEST REG^^Ambulatory(s)^TRMC|Elective|||8516 -NORRISCHUCK,^8516 -NORRISCHUCK,|||Mammography||||Clinic Physician Referral|||8516 -NORRISCHUCK,^8516 -NORRISCHUCK,|Outpatient||Medicare Primary|||||||||||||||||||TEST REG||Active|||20160517105700
        ORC
        |RE
        OBR
        |1|299438766|00000MA160004677|51435820^Mammogra m Screen Tomo Bil w/CAD|||20160517112142|20160517112143|||||||Rad Type&Rad Type|jmccoy^Norris^CHUCK^A^^ANP^^^TEST Health Employee ID NBR^Personnel^^^PRSNLID~jmccoy^Norris^CHUCK^A^^ANP ^^^externeal^Personnel^^^External Identifier~^Norris^CHUCK^A^^ANP^^^^Personnel^^^Per sonnel Badge ID~1675515555^Norris^CHUCK^A^^ANP^^^^Personnel^^^N ational Provider Identifier~8516^Norris^CHUCK^A^^ANP^^^^Personnel^^ ^COMMUNITY DR NBR||||00000MA160004677|TRMC Mammo 1|20160517112142||Mammography|P||1^^^^^Routine|||A mbulatory|^Screening prev 1-11-08|ktester^Tester^Kyle^^^^^^externeal|||46261111^T ester^Connie^^^^^^PowerScribe PRSNL ID
        OBX
        |1|FT|Read||Bilateral mammograms are performedPrevious studies are 
        OBX
        |2|FT|Read||from 2008.There is an area of dense tissue in the lateral 
        OBX
        |3|FT|Read||aspect of the rightbreast which has been worked up 
        OBX
        |4|FT|Read||previously and is unchangedThere isdense tissue centrally 
        OBX
        |5|FT|Read||in the left breast that is better seen todaythen it was in 
        OBX
        |6|FT|Read||2008.CAD and tomosynthesis were utilizedTomosynthesis of 
        OBX
        |7|FT|Read||the rightbreast reveals some irregular tissue in the upper 
        OBX
        |8|FT|Read||outer aspect of thebreast but I do not see architectural 
        OBX
        |9|FT|Read||distortion or a mass lesion.Left breast tomosynthesis 
        OBX
        |10|FT|Read||reveals dense focus of tissue centrally inthe breast and 
        OBX
        |11|FT|Read||believe there are some tiny calcifications associatedwith 
        OBX
        |12|FT|Read||this and I would recommend compression tomosynthesis and 
        OBX|13|FT|Read||ifnecessary magnification views of this area of dense 
        OBX
        |14|FT|Read||tissue centrallyin the breastI believe it
        OBX
        |15|FT|Read^Read||Bilateral mammograms are performedPrevious studies are from 2008.There is an area of dense tissue in the lateral aspect of the rightbreast which has been worked up previously and is unchangedThere isdense tissue centrally in the left breast that is better seen todaythen it was in 2008.CAD and tomosynthesis were utilizedTomosynthesis of the rightbreast reveals some irregular tissue in the upper outer aspect of thebreast but I do not see architectural distortion or a mass lesion.Left breast tomosynthesis reveals dense focus of tissue centrally inthe breast and I believe there are some tiny calcifications associatedwith this and I would recommend compression tomosynthesis and ifnecessary magnification views of this area of dense tissue centrallyin the breastI believe it||||||P
        NTE
        |1|Signature Line| *** PRELIMINARY ***Interpreted ByTester M.D., TTranscribed Date05/17/2016 17:34Transcribed ByCRDictated Date05/17/2016 16:45 

        Comment


        • #5
          Found the issue in the channel's data type config. I restored defaults on the screen below and it corrected the output
          Attached Files

          Comment


          • #6
            Ok Yes Thank you, I unchecked the strict parser and re-deployed the channel but receiving breakstring error:

            Transformer error
            ERROR MESSAGE: Error evaluating transformer
            com.mirth.connect.server.MirthJavascriptTransforme rException:
            CHANNEL: OUTBOUND Greenway NCAMA RAD
            CONNECTOR: Destination 1
            SCRIPT SOURCE: TRANSFORMER
            SOURCE CODE:
            10098: if (segName == 'OBX') {
            10099: for each (line in breakString(seg['OBX.5']['OBX.5.1'].toString(),60)) {
            10100: var newOBX = createSegmentBefore('OBX', seg);
            10101: newOBX['OBX.1']['OBX.1.1'] = '1';
            10102: newOBX['OBX.2']['OBX.2.1'] = seg['OBX.2']['OBX.2.1'].toString();
            10103: newOBX['OBX.3']['OBX.3.1'] = seg['OBX.3']['OBX.3.1'].toString();
            10104: newOBX['OBX.4']['OBX.4.1'] = seg['OBX.4']['OBX.4.1'].toString();
            10105: newOBX['OBX.5']['OBX.5.1'] = line;
            10106: }
            10107: }
            LINE NUMBER: 10103
            DETAILS: ReferenceError: "breakString" is not defined.
            at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10103 (doTransform)
            at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10125 (doScript)
            at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10127
            at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:153)
            at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:118)
            at java.util.concurrent.FutureTask.run(FutureTask.jav a:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)


            And again, thank you for all of the help.

            Comment


            • #7
              Originally posted by mmonisky View Post
              Ok Yes Thank you, I unchecked the strict parser and re-deployed the channel but receiving breakstring error:

              Transformer error
              ERROR MESSAGE: Error evaluating transformer
              com.mirth.connect.server.MirthJavascriptTransforme rException:
              CHANNEL: OUTBOUND Greenway NCAMA RAD
              CONNECTOR: Destination 1
              SCRIPT SOURCE: TRANSFORMER
              SOURCE CODE:
              10098: if (segName == 'OBX') {
              10099: for each (line in breakString(seg['OBX.5']['OBX.5.1'].toString(),60)) {
              10100: var newOBX = createSegmentBefore('OBX', seg);
              10101: newOBX['OBX.1']['OBX.1.1'] = '1';
              10102: newOBX['OBX.2']['OBX.2.1'] = seg['OBX.2']['OBX.2.1'].toString();
              10103: newOBX['OBX.3']['OBX.3.1'] = seg['OBX.3']['OBX.3.1'].toString();
              10104: newOBX['OBX.4']['OBX.4.1'] = seg['OBX.4']['OBX.4.1'].toString();
              10105: newOBX['OBX.5']['OBX.5.1'] = line;
              10106: }
              10107: }
              LINE NUMBER: 10103
              DETAILS: ReferenceError: "breakString" is not defined.
              at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10103 (doTransform)
              at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10125 (doScript)
              at 7b1cc6d4-27cc-4668-afd8-66919ead0983:10127
              at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:153)
              at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:118)
              at java.util.concurrent.FutureTask.run(FutureTask.jav a:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)


              And again, thank you for all of the help.

              you need to load the breakstring function as a code template in your mirth.

              http://www.mirthproject.org/communit...98&postcount=2

              Comment


              • #8
                Yep, worked!

                Comment


                • #9
                  Is there an easyway to add a line break into the long text in OBX.5.1 ?

                  Comment

                  Working...
                  X