Reminder: Create & find trunk-related issues here. Legacy Trac tickets are still available. Problems? Workflow feedback? Need a module project? Open a support ticket.

OpenMRS Trunk

Add ability to append data to an encounter vi hl7

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Could Could
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: OpenMRS 1.4.0
  • Component/s: None
  • Severity:
    3
  • Keywords:
  • Description:

    The hl7 processor assumes all ORUR01s coming in are for new encounters.

    If the pv1-1 segment has an integer in it, it should append the obs in the ORUR01 to that encounter.

Activity

Hide
Ben Wolfe added a comment - 2008-09-04 18:57:47 EDT

Fixed in rev:5438

Show
Ben Wolfe added a comment - 2008-09-04 18:57:47 EDT Fixed in rev:5438
Hide
Darius Jazayeri added a comment - 2008-09-04 21:30:42 EDT

Incidentally there's also a flag somewhere in the ORU-R01 message that specifies that the message is giving you "corrected" or "updated" data, or something like that. At some point we need to correctly handle that, and void/replace obs in the specified encounter, rather than just appending.

Show
Darius Jazayeri added a comment - 2008-09-04 21:30:42 EDT Incidentally there's also a flag somewhere in the ORU-R01 message that specifies that the message is giving you "corrected" or "updated" data, or something like that. At some point we need to correctly handle that, and void/replace obs in the specified encounter, rather than just appending.
Hide
Darius Jazayeri added a comment - 2008-12-15 15:41:23 EST

This is using the wrong field out of the PV1 segment. It's using field 1 (Set ID) instead of field 19 (Visit Number).

More comments in a sec.

Show
Darius Jazayeri added a comment - 2008-12-15 15:41:23 EST This is using the wrong field out of the PV1 segment. It's using field 1 (Set ID) instead of field 19 (Visit Number). More comments in a sec.
Hide
Darius Jazayeri added a comment - 2008-12-15 15:41:33 EST

You're correct, Darius. The set ID of HL7 segments (like PV1-1) is used for transaction numbering (usually sequential within a message or group of message) and is not the place for identifiers. Systems don't always depend on a set ID being filled, but in some cases this field can be used to ensure ordering of messages/segments as they're being processed.

An encounter identifier should go into a field like PV1-19 (Visit number).

Good catch, Darius. I smell a ticket coming.

-Burke

On Dec 13, 2008, at 6:15 PM, Darius Jazayeri wrote:

> Hi All,
>
> Our lab system's ability to send HL7 messages to OpenMRS broke when we upgraded to 1.4.x, and stepping through the code I came across a change I'm not sure I agree with.
>
> The changeset is rev:5438 at http://dev.openmrs.org/changeset/5438
>
> In this changeset we start treating the HL7 PV1 Set ID as an existing encounter ID, so if it's specified, then we append observations to that encounter, rather than create a new one.
>
> Here's the definition from chapter 3 of the HL7 manual:
>
> 3.4.3.1 PV1-1 Set ID - PV1 (SI) 00131
> Definition: This field contains the number that identifies this transaction. For the first occurrence of the
> segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two,
> etc.
>
>
> When I read this before I interpreted that to mean that the first PV1 in a message should be 1, the second is 2, etc. This is clearly wrong. But I'm not sure I buy that it means encounter id either.
>
> Anyone know the right usage for this?
>
> -Darius

Show
Darius Jazayeri added a comment - 2008-12-15 15:41:33 EST You're correct, Darius. The set ID of HL7 segments (like PV1-1) is used for transaction numbering (usually sequential within a message or group of message) and is not the place for identifiers. Systems don't always depend on a set ID being filled, but in some cases this field can be used to ensure ordering of messages/segments as they're being processed. An encounter identifier should go into a field like PV1-19 (Visit number). Good catch, Darius. I smell a ticket coming. -Burke On Dec 13, 2008, at 6:15 PM, Darius Jazayeri wrote: > Hi All, > > Our lab system's ability to send HL7 messages to OpenMRS broke when we upgraded to 1.4.x, and stepping through the code I came across a change I'm not sure I agree with. > > The changeset is rev:5438 at http://dev.openmrs.org/changeset/5438 > > In this changeset we start treating the HL7 PV1 Set ID as an existing encounter ID, so if it's specified, then we append observations to that encounter, rather than create a new one. > > Here's the definition from chapter 3 of the HL7 manual: > > 3.4.3.1 PV1-1 Set ID - PV1 (SI) 00131 > Definition: This field contains the number that identifies this transaction. For the first occurrence of the > segment, the sequence number shall be one, for the second occurrence, the sequence number shall be two, > etc. > > > When I read this before I interpreted that to mean that the first PV1 in a message should be 1, the second is 2, etc. This is clearly wrong. But I'm not sure I buy that it means encounter id either. > > Anyone know the right usage for this? > > -Darius
Hide
Ben Wolfe added a comment - 2009-01-21 16:46:58 EST

Fixed in trunk in rev:6665 and backported to 1.4.x in rev:6666

Show
Ben Wolfe added a comment - 2009-01-21 16:46:58 EST Fixed in trunk in rev:6665 and backported to 1.4.x in rev:6666

People

Dates

  • Created:
    2008-09-04 11:21:38 EDT
    Updated:
    2010-07-08 16:21:38 EDT
    Resolved:
    2010-07-01 22:42:26 EDT