6 Replies Latest reply: May 15, 2014 10:07 AM by jerice _ RSS

    HL7 Data

    jerice _

      Hi all,

      I know in the past (and recently) there have been some discussion about HL7 formats.  My biggest trouble is how to seperate out the right information.  Converting to a database unfortunately isn't an option as many of these HL7 files contain embedded PDF's (garbage to me at this point) and the files are very lengthy.

       

      MSH|~\&|REDP|TESTGROUP|TESTConnect||20100516203741||GEAY01|FILETEST0001|P|2.3||||||||

      PID|1|00-00-000-00|00-00-000-00||TESTMONARCH||20011020|M||||||||||78945653|55423545|||||||||||

      ODR|||SF50008|||||44534634737347TESTPHYSICIAN^^^^^^^^^^RRR|||||||||||32459302893085|||||||||||||||||||||||||||||||||

      ODR|RR||45346346SURGERYTEST||F||||43637637657|||456346346436TESTMONARCHPHYS^^^^^^^^^^NPI||||||||||||||||||||||||

      TEST|1||45346346SURGERYTEST|05PMONARCHTESTING||200101100800|200101100800|200101100800||||||||44534634737347TESTMONARCHPHYS^^^^^^^^^NPI||||RRTEST|DS1|200101100800||GA|F|||||||||||

      OBX|1|ST|123456-3TESTINGMONARCHLN|1|See Below||||||F|||200101100800||||||

      NTE|1|L| |

      NTE|2|L|                          TEST MONARCH

      NTE|3|L|                           TESTING RRRRRRRRRRRRRR REPORT|

      NTE|4|L| |

      NTE|5|L|Patient Name: TEST, MONARCH ACCESSION #: 78945653|

      NTE|6|L| |

      NTE|7|L|   Procedure Date: 8/1/2010|

      NTE|8|L| |

      NTE|9|L|         Age: 10y   Sex:  M   DOB:  12/25/2001|

      NTE|10|L| |

      NTE|11|L|    Location:           MR#: 00-00-000-00    Pt Acct#: 5456456484|

      NTE|12|L| |

      NTE|13|L|Physician(s): TEST,MONARCHMED MD|

      NTE|14|L|              TEST, MONARCHPHYS MD|

      NTE|15|L|              TEST,MONARCHPHYSICIAN MD|

       


      There can be multiple NTE lines, and obviously, in the MSH and PID areas at the top, those can be varying lengths. Sometimes, there may be extra data for one patient like this

      342523523 | PALKE123 | TEST,MONARCH

      and sometimes the data could look like this:

      342523523 ||TEST,MONARCH

      .  Just looking for a little direction on how to proceed, or whether I should just use LSPLITS and functions to try and salvage the data, as I ran across very little actual information for HL7's.

       

      I'm using 10.5 Pro.  Thanks in advance....

       

      Thanks,

      Justin

        • HL7 Data
          Olly Bond

          Hello Justin,

           

          BTW

          needs square [] brackets not angled <>

          ones to work - like this:

           

          MSH|~\&|REDP|TESTGROUP|TESTConnect||2010051620374 1||GEAY01|FILETEST0001|P|2.3||||||||

          PID|1|00-00-000-00|00-00-000-00||TESTMONARCH||20011020|M||||||||||78945653|55 423545|||||||||||

          ODR|||SF50008|||||44534634737347TESTPHYSICIAN^^^ ^^^^^^^RRR|||||||||||32459302893085||||||||||||||| ||||||||||||||||||

          ODR|RR||45346346SURGERYTEST||F||||43637637657|||45 6346346436TESTMONARCHPHYS^^^^^^^^^^NPI|||||||||| ||||||||||||||

          TEST|1||45346346SURGERYTEST|05PMONARCHTESTING||20 0101100800|200101100800|200101100800||||||||445346 34737347TESTMONARCHPHYS^^^^^^^^^NPI||||RRTEST|D S1|200101100800||GA|F|||||||||||

          OBX|1|ST|123456-3TESTINGMONARCHLN|1|See Below||||||F|||200101100800||||||

          NTE|1|L| |

          NTE|2|L| TEST MONARCH

          NTE|3|L| TESTING RRRRRRRRRRRRRR REPORT|

          NTE|4|L| |

          NTE|5|L|Patient Name: TEST, MONARCH ACCESSION #: 78945653|

          NTE|6|L| |

          NTE|7|L| Procedure Date: 8/1/2010|

          NTE|8|L| |

          NTE|9|L| Age: 10y Sex: M DOB: 12/25/2001|

          NTE|10|L| |

          NTE|11|L| Location: MR#: 00-00-000-00 Pt Acct#: 5456456484|

          NTE|12|L| |

          NTE|13|L|Physician(s): TEST,MONARCHMED MD|

          NTE|14|L| TEST, MONARCHPHYS MD|

          NTE|15|L| TEST,MONARCHPHYSICIAN MD|

          /CODE

           

          There's usually many ways to solve problems in Monarch, and defining which one is best requires an understanding not just of the sample data to hand but the potential extreme limits of this data. For example, if the NTE lines could exceed 254, then you couldn't treat these as separate fields and would need to use a Memo field to capture the lot.

           

          Similarly, if there was a line with a critical field that might occur more than once that single line, then you might want to use multi-column regions - but note that these are limited to 40 columns.

           

          Other factors may affect your approach, especially the version of Monarch being used. Anything before v9 couldn't handle the | character in a literal trap, so records like yours which use this as a delimiter were tricky...

           

          Could you possibly post a CSV version of the desired Excel output from your sample data, with any notes on possible extreme conditions, so that we can give you the best advice we can?

           

          Best wishes,

           

          Olly

            • HL7 Data
              thompssc _

              "Just looking for a little direction on how to proceed, or whether I should just use LSPLITS and functions to try and salvage the data, as I ran across very little actual information for HL7's."

               

              That's pretty much how we did it. One template per line (trapping on the first 3 characters) and one field per template (set to the max width). We then created calculated fields using LSPLIT to get the columns that mattered to us.

            • HL7 Data
              jerice _

              In this example, I've tried setting the detail to multiple items.  Because all of this is one record, the ODR and OBX fields seem logical.  But, when those are the detail, it doesn't trap the information correctly for the 2nd set of ODR and OBX fields.  ODR and OBX fields can have varying lengths and information after the initial OBX.  Again, I'm using 10.5 Pro.

               

              MSH|~\&|REDP|TESTGROUP|TESTConnect||2010051620374 1||GEAY01|FILETEST0001|P|2.3||||||||

              PID|1|00-00-000-00|00-00-000-00||TESTMONARCH||20011020|M||||||||||78945653|55 423545|||||||||||

              ODR|||SF50008|||||44534634737347TESTPHYSICIAN^^^ ^^^^^^^RRR|||||||||||32459302893085||||||||||||||| ||||||||||||||||||

              ODR|RR||45346346SURGERYTEST||F||||43637637657|||45 6346346436TESTMONARCHPHYS^^^^^^^^^^NPI|||||||||| ||||||||||||||

              TEST|1||45346346SURGERYTEST|05PMONARCHTESTING||20 0101100800|200101100800|200101100800||||||||445346 34737347TESTMONARCHPHYS^^^^^^^^^NPI||||RRTEST|D S1|200101100800||GA|F|||||||||||

              OBX|1|ST|123456-3TESTINGMONARCHLN|1|See Below||||||F|||200101100800||||||

              NTE|1|L| |

              NTE|2|L| TEST MONARCH

              NTE|3|L| TESTING RRRRRRRRRRRRRR REPORT|

              NTE|4|L| |

              NTE|5|L|Patient Name: TEST, MONARCH ACCESSION #: 78945653|

              NTE|6|L| |

              NTE|7|L| Procedure Date: 8/1/2010|

              NTE|8|L| |

              NTE|9|L| Age: 10y Sex: M DOB: 12/25/2001|

              NTE|10|L| |

              NTE|11|L| Location: MR#: 00-00-000-00 Pt Acct#: 5456456484|

              NTE|12|L| |

              NTE|13|L|Physician(s): TEST,MONARCHMED MD|

              NTE|14|L| TEST, MONARCHPHYS MD|

              NTE|15|L| TEST,MONARCHPHYSICIAN MD|

              OBX|1|ST|123456-3TESTINGMONARCHLN|1|See Below||||||F|||200101100800||||||

              NTE|33|L|Physician(s):

              NTE|34|L|

              NTE|35|L|

              ODR|RR||45346346SURGERYTEST||F||||43637637657|||45 6346346436TESTMONARCHPHYS^^^^^^^^^^NPI|||||||||| ||||||||||||||

              /CODE

                • HL7 Data
                  elginreigner _

                  I deal with multiple clients who use HL7 format. I would not recommend going CSV or using the LSplit for an HL7 format. Your simplest solution will be multiple models, open the file as a database, use the '|' separator. Since your data grows, I also recommend you create a test file, place maximum length test data in each field. Have a final project that combines the results of the previous models into a final output file.

                  • HL7 Data
                    jerice _

                    thanks for the quick reply....

                    i'll try that tomorrow and see how it goes.