Announcement

Collapse
No announcement yet.

XML Unique Particle Attribution

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

  • XML Unique Particle Attribution

    Hello everyone,
    When Mirth converts ER7 to XML, its native parser creates a "flat" structure, in which the same segment can appear multiple times, nonconsecutively, such as the ROL segment in the layout below.

    <MSH />
    <EVN />
    <PID />
    <PD1 />
    <ROL />
    <PV1 />
    <PV2 />
    <ROL />
    ...etc.

    In other words, this XML does not provide a way to programatically refer to the "patient level" ROL versus the "visit level" ROL.

    I need to figure out a way to wrap the XML with this context but I'm not sure what the best approach would be. I need to use Mirth to create XML, which rather than having the above structure, would, instead, look something like this.

    <MSH />
    <EVN />
    <Patient>
    <PID />
    <PD1 />
    <ROL />
    </Patient>
    <Visit>
    <PV1 />
    <PV2 />
    <ROL />
    </Visit>

    Mirth's native XML is perfect for what I'm doing, except for this one thing, so I would prefer to not completely abandon the native parser. Is there an XSLT or Javascript which could handle this?

    Thanks!
    Steve Metz

  • #2
    The "strict parser" does this. Select "Use Strict Parser" in the HL7 v2.x data type serialization properties.
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      Thanks for the reply. I'm not seeing any change when I use strict parser, though.

      Are you saying that by enabling strict parser that it will automatically create a <PATIENT> node and <VISIT> node? The only XML node I see which is not a segment name is <ADT_A01.INSURANCE>, in which the parser placed the IN1, IN2, and IN3 segments. I want to do something very similar, but for the Patient and Visit related segments.

      Any more thoughts? Thanks again.

      Steve

      Comment

      Working...
      X