hl7 file format

  • Creator
    Topic
  • #49905
    Femina Jaffer
    Participant

    Hello everyone,

    If anyone gets a moment, could you give me some tips and /or examples on how I can format the following file from a translate into an HL7 File format?  The file that came in was not an HL7 file format, but an xml file, which I was able pickup, read and translate in the translator.  But, it doesn’t make it to the ob thread and sits in the Error DB.

    I have attaced a sample of the text file after the translation:

    MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0

    PID||20544286|||ACOSTA^JUAN|ACOSTA|200801220743|4

    OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-070908

    OBX|||T4|1|14.33|14.33  ug/dL|** Age Adjusted **

    OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|18.05|18.05  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|37.95|37.95  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547066T54183|||GARCIA|GARCIA|200801050156|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|19.43|19.43  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|18.79|18.79  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|25.51|25.51  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547071T54346|||SALINAS|SALINAS|200802050327|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|18.31|18.31  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|6.45|6.45  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|20.76|20.76  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547074T54783|||CAMPIAN|CAMPIAN|200802050455|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|18.09|18.09  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|7.54|7.54  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|26.18|26.18  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547078T54806|||THOMAS|THOMAS|200802050641|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|15.18|15.18  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|44.44|44.44  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|26.52|26.52  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547068T54345|||JARAMILLO|JARAMILLO|200802050234|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|18.5|18.5  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|17.74|17.74  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|15.57|15.57  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547062T54178|||GARCIA-SOLANO|GARCIA-SOLANO|200802050125|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|14.1|14.1  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|7.23|7.23  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|40.79|40.79  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||205471608036T588|||CORDOVA|CORDOVA|200802051239|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|16.45|16.45  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|28.9|28.9  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|29.83|29.83  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||020547138T57789|||BRUSUELASI|BRUSUELASI|200802051130|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|20.49|20.49  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|12.48|12.48  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|19.83|19.83  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547086T55341|||LUCERO|LUCERO|200802050744|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|17.79|17.79  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|19.09|19.09  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|21.09|21.09  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547125T57573|||ARELLANO|ARELLANO|200802051030|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|15.63|15.63  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|13.61|13.61  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|29.69|29.69  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||20547181T59536|||OLGUIN|OLGUIN|200802051407|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|19.38|19.38  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|8.28|8.28  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|64.32|64.32  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||4806078W58244|||MINGURA^BRIAN|MOLINA-PEREZ|200802050843|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|14.61|14.61  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|2.65|2.65  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|33.93|33.93  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||4806230W56008|||JOHNSTON^ISAIH|JOHNSTON|200802051447|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-081440 OBX|||T4|1|11.53|11.53  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|154.52|154.52  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|23.41|23.41  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||4806058W51552|||MUNOZ^SORAIDA|MARTINEZ|200802050610|6 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-110810 OBX|||T4|1|17.22|17.22  ug/dL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|8.49|8.49  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal OBX|||CF|1|24.02|24.02  ng/mL|** Age Adjusted ** MSH|^~&|Sunquest|TriCore|X|X|20080214144323||ORU||P|1.0 PID||4806270H30002|||ALMERAZ^EMMANUEL|ALMERAZ|200802051644|4 OBR|1|||MBSC1^Metabolic Screening 1^MBSC1|||2008-02-13|||||||2008-02-110810 OBX|||T4|1|12.12|12.12  ug/dL|** Age Adjusted ** OBX|||TSH|1|4.07|4.07  uIU/mL|** Age Adjusted ** OBX|||Phenylalanine|1|0|< 200 uM|Normal < 200 uM OBX|||Biotinidase|1||Has Color|Normal Has Color OBX|||Hemoglobin|1||FA|Normal = FA OBX|||CAH(17-OHP)|1|11.54|11.54  ng/mL|** Age Adjusted ** OBX|||GALT|1||Fluorescence|Normal=Fluorescence OBX|||Amino Acids|1||Normal|Normal OBX|||Acylcarnitines|1||Normal|Normal

Viewing 6 reply threads
  • Author
    Replies
    • #64051
      John Hamilton
      Participant

      What is the error code associated with it in the error database?

      That is what you need to solve. It is very hard without any information on the error to tell you how to fix it.

    • #64052
      Femina Jaffer
      Participant

      The log file indicates parsing errors:

      Xlate ‘SQ_R01_

      OREGON_XML.xlt’ failed: Input validation errors: Error generated during parsing.

      However, in the translation tool I receive no errors at all.

    • #64053
      Robert Milfajt
      Participant

      I think I understand your problem, but a few more details would be handy.  To clarify please answer the following:

      When you get an XML message from system A, do you read it in via a thread, which parses it to this format prior to sending to an Xlate, or do you read it in via some other mechanism and translate it to a text file read by a Fileset type thread?

      If the answer is the first, you should consider creating a DTD that mimics the XML and work on this in the translate using standard Cloverleaf tools.  

      If the answer is the latter, you need to modify your parsing to create distinct HL7 messages, and not one segment per line.  Myself, I prefer to use Perl for this type of string manipulation, but TCL will work just as well.

      Hope this helps,

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #64054
      Femina Jaffer
      Participant

      Thank you Robert and the option is the latter and you are exactly right I need to parse to create distinct HL7 messages.  This is where I need some assistance and ideas on how to start.

      I have a dtd/xml schema already and am able to translate field to field from xml to hl7, and I can see this working in the xlate testing tool.  But, that is as far as I get.  In order to produce an hl7 message, I need to test it via fileset from one thread to the other thread.

      Thank you again,

      Femina

    • #64055
      Robert Milfajt
      Participant

      Can you include a copy of the script you are using to parse the messages to this format?

      The answer is probably to include an additional line or two of code at that point to get the file to the proper format.

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

    • #64056
      Femina Jaffer
      Participant

      Robert,

      I actually don’t have the script as yet, and do not know where to begin.  I am not sure if it needs encapsulating and encoding characters, along with line feeds and carriage returns.  

      I don’t really have a problem with writing any code with tcl, but with this type of parsing, I haven’t a clue.

      Thanks

      Femina

    • #64057
      Robert Milfajt
      Participant

      Without knowing how you got from point A to point B, there is not enough information to get you to the desired result (point C).  You need to include more information regarding the inbound and outbound threads and tranlsation, because the solution inevitably depends on how you did things.

      Robert Milfajt
      Northwestern Medicine
      Chicago, IL

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,296
Replies
34,439
Topic Tags
287
Empty Topic Tags
10