Is there a common way to write addresses of facilities in HL7 SIU/ADT messages? - hl7

I've found several references to SAD/AD/XAD data types in the HL7 spec, but don't see anything about this info being used to describe facilities, such as those described in the AIL segment (e.g. "2^BLUE HILL FACILITY"). But where, if anywhere, can I expect to get data about that facility, such as name, street address, etc.?

In the PV1 segment definition for HL7 2.x there isn't a dedicated field for Facility Address specifically. If you are the receiving system in this case, you may have to request that data be sent or added in from the sending system. This could be as simple as placing it in the PV1-5.X field (X being whatever subfield the sending system decides on), or adding in a custom Z segment (ZPV for example) to have this data transmitted.
Since there is no standard field for this kind of data in the PV1 segment though, you will have to confirm that the sending system can in fact send this data.

The facility name will be in a separate field. It varies from segment to segment. You just have to read the segment definition and pick the right field.

Related

Do we have standard for HL7 OBX-4 containment hierarchy

I am processing HL7 message. OBX-4field gives containment hierarchy.I see different dotted hierarchy in the message.
is there any standard for containment hierarchy dotted number?
For below example. will first dotted 1 always mean MDC_DEV_MON_PHYSIO_MULTI_PARAM_MDS and 2nd dot 5-always mean MDC_DEV_ECG_VMD.
are these number configurable in the medical device.I want to store data uniquely based using MDS/VMD/CHAN.
Right now I am getting HL7 from one source..will these hierarchy will always be same for that source.
is this would be valid if i get hl7 message from other source.
MDC_DEV_MON_PHYSIO_MULTI_PARAM_MDS/MDC_DEV_ECG_VMD/MDC_ECG_HEART_RATE
to Acehive
1.5.0.1
1-MDC_DEV_MON_PHYSIO_MULTI_PARAM_MDS
5-MDC_DEV_ECG_VMD
13-MDC_DEV_METER_PRESS_BLD_VMD
1-MDC_DEV_METER_PRESS_BLD_CHAN
OBX|1||69965^MDC_DEV_MON_PHYSIO_MULTI_PARAM_MDS^MDC|1.0.0.0|||||||X
OBX|2||69798^MDC_DEV_ECG_VMD^MDC|1.5.0.0|||||||X
OBX|3|NM|147842^MDC_ECG_HEART_RATE^MDC|1.5.0.1|88|{beat}/min^{beat}/min^UCUM|||||R|||20200508051804.8340+0530||||DFG~01^^Y71A57FFFE6188F3^EUI-64
OBX|4|NM|148066^MDC_ECG_V_P_C_RATE^MDC|1.5.0.2|7|{beat}/min^{beat}/min^UCUM|||||R|||20200508051804.8340+0530||||DFG~01^^Y71A57FFFE6188F3^EUI-64
OBX|17||69854^MDC_DEV_METER_PRESS_BLD_VMD^MDC|1.13.0.0|||||||X
OBX|18||69855^MDC_DEV_METER_PRESS_BLD_CHAN^MDC|1.13.1.0|||||||X OBX|19|NM|150018^MDC_PRESS_BLD_DIA^MDC|1.13.1.15|68|mm[Hg]^mm[Hg]^UCUM|||||X|||20200508051804.8340+0530||||DFG~01^^Y71A57FFFE6188F3^EUI-64||unknow
This particular HL7 ORU example is a more strict protocol within the HL7 format. It is defined by IHE, and the message type of this example is PCD (Patient Care Device) You can start searching for details of this message format here: https://wiki.ihe.net/index.php/Patient_Care_Device
You'll need to consider things:
HL7 event type of the message, found in MSH.9
If you have the specs of HL7 v2, then you can check on what the segments are usually use and the hierarchy of it.
If you don't have the HL7 spec directly from HL7.org, you'll need to ask the client sending the HL7 message their own spec. Their spec will guide you on how they structured their message. What are repeating, required and optional fields.
HL7 is a loose standard, some organizations don't strictly implement directly what the HL7 spec has, instead they repurpose some of the segments and fields, so it's best to have the client's own HL7 spec. That means other sources of HL7 may have a different approach.
I usually use this link to check on the HL7 definitions: https://hl7-definition.caristix.com/v2/HL7v2.5.1
Based from my experience, OBX segments are repeating and are usually under the OBR segment as child nodes. OBX.2 is the index, which is odd in your message since I see index 4 is followed by index 17.
So far after exploration i understood that those dotted numbers are not standard.Below is IHE documents.
Probably it depends on the profile. which can be different at different point.
https://www.hl7.org/documentcenter/public/wg/healthcaredevices/N0262_WG7_RCH.1g.pdf
I marking it is as answer. I will change this if something better explanation comes.

Does the order of segments in HL7 V2 matter?

I know that the order of fields and components matter, but what about the order of segments in an HL7 message?
They all obviously have to have the MSH at the beginning, but is there anything in the HL7 guides that explicitly state that hl7 Segments must be in a particular order.
Certainly, the documentation lists segments in a certain order when describing a message type, but isn't that just the order it was written down? Do you need to have your messages in the same order (other than the grouped items)?
I would have thought that the PID-1 would be irrelevant if the order was set by the order in the message.
I'm keen to hear any opinions, but I would particularly like to hear from someone that can reference some documentation that specifies this.
Yes it does matter -
There is a specific requirement that a required segment be in between two identical segments.
From version 2.5.1 chapter 2:
A named segment X may occur more than once in an abstract message
syntax. This differs from repetition described earlier in this
section.
When this occurs, the following rules must be adhered to:
If, within an abstract message syntax, a named segment X appears in two
individual or group locations, and a) Either appearance is optional or
repeating in an individual location; b) or, either appearance is
optional or repeating, in a group location then, the occurrences of
segment X must be separated by at least one required segment of a
different name so that no ambiguity can exist as to the individual or
group location of any occurrence of segment X in a message instance.
A real world example of this is ROL segments in ADT^A02, one follows PD1, and one follows PV2, but PV1 is required in between the two.
If you're writing some kind of parser though, I would be wary of anyone actually respecting this rule.
Absolutely. The order of segments is defined in the HL7 standard.
For example (I'm using version 2.4 International) section 4.4.1 ORM ‑ general order message (event O01) regarding Order Entry shows the following as the structure of an ORM order message (formatting is not ideal)
ORM^O01^ORM_O01
MSH
[{NTE}]
[
PID
[PD1]
[{NTE}]
[
PV1
[PV2]]
[{IN1
[IN2]
[IN3]
}]
[GT1]
[{AL1}]
]
{
ORC
[
<OBR|RQD|RQ1| RXO|ODS|ODT>
[{NTE}]
[CTD]
[{DG1}]
[{
OBX
[{NTE}]
}]
]
[{FT1}]
[{CTI}]
[BLG]
}
The square brackets indicate possible repetitions, and the curly brackets that segments are optional (for example directly after the MSH you could have 0, 1 or n NTE segments.)
To be a valid ORM message, an OBR segment should come after an ORC segment that itself should come after a PID etc. An OBR segment is thus for example not allowed to be sent before a PID segment (see this as a layer structure, the Observation Request comes under an Order Common segment that itself is related to a Patient Visit that is specific to a Patient.)
The PID-1 field you mentioned is not a good example, as most messages will only have one PID segment, and PID-1 thus be 1. (I'm not aware of messages containing more than one PID segment, please add to the comments if anyone knows concrete examples from the HL7 specs). But if you look at for example OBR-1, there can be multiple Observervation Requests in the same Order message, for example an order for a Kalium and a Natrium, there would thus be a sequence number sent in OBR-1 to ensure data from the different orders are not mixed up, e.g.:
ORC|...
OBR|1|12345||KA^Kalium|...
OBR|2|12346||NA^Natrium|...

How exactly do address lines work in QuickBooks?

Right now I'm only trying to read addresses and display them. Ignoring IPP right now, just inside QB, I'm not understanding the algorithm that manages the address lines.
Further, when accessing the customer address object via IPP, there are more differences, adding to my confusion. I'll call the three areas I'm looking at the freeform block, field block and IPP object. Here's an example where I typed the text into the field block and made the text match the field name:
The freeform block and IPP object took the City, State and Zip values and combined them into line 3. The IPP object has the Note value in Line 4. And the Country value ends up in the City field in IPP and field block.
Here's an example where I simply typed "line 1 ... line 5" in the freeform block:
Lines 1 - 4 look ok in the field block after the conversion, and put "line 5" into the City field. The IPP object is missing Line 4 field and value altogether.
Can someone share with us how this works? I'm trying to read these addresses and display them in my app in a consistent way.
I'm not familiar with Quickbooks. But I think you're looking for "address standardization" since you aren't sure in what format the address will come from Quickbooks.
Addresses are tricky (trust me, I work at SmartyStreets, where we have to be smart ... about streets) but there are services -- free and paid -- which will standardize addresses and put them into a consistent "componentized" format.
Take a look at LiveAddress API for starters... or you could use the batch/list service if you export your data into a file. Either way, it's free to use for a certain number of addresses.
(Tip: You can submit addresses for standardization and verification in two fields: "Street" and "Last Line" and still get good results -- so if you're not exactly sure where the city/state are, just put anything that's not the street address in the last line field.)

Can an attachment be split in an HL7 file and recreated after the message is transmitted?

I am using the HAPI parser to parse the HL7 files that come through my company. We are working on moving attachments through the OBX segment of the HL7 file. There are some validators that my stack uses that will not allow an attachment over 64k to pass. Is there a way to take multiple OBX segments and break an attachment up and then recreate it after it has passed through the wire to the other side?
HL7 identifies two possible cases and uses continuation pointer protocol for each. These cases are:
A single segment may be too large. HL7 uses the "ADD" segment to handle breaking a single segment into several smaller segments.
A single HL7 message may be too large. HL7 uses the DSC segment (in conjunction with the MSH-14 filed) and the continuation protocol to handle message fragmentation.
Chapter 2 “Controls” of the HL7v2 spec talks about it in more details.

How are Structured and Unstructured data distinguished?

What are the differences between structured data and unstructured data?
How that difference affect the respective data mining approaches?
The terms i am familiar with are structured and unstructured data(same as what's in your Q except for the suffix).
I work with both types of data in machine learning and I am not aware of any formal definition; however, i suspect that nearly everyone whose work requires a distinction between these two types of data has no trouble distinguishing them.
Examples of structured data: the date/time on which an email was sent; whether it has an attachment, or the email sender. Unstructured data: the body of the email.
Is there a stable rule or set of rules to distinguish these two types of data? I think so. First, if you can build a parser for the data element, then it's structured.
Another rule of thumb is to look at the data type for that field in your database required to store the data. If it is a text type--for MySQL, Tintext, Text, Mediumtext, or Longtext. Or less likely, VARCHAR(255)--then that data is probably unstrutured.
The principal significance of this distinction for data mining is probably this: structured data, once extracted from the document and parsed, can be used as variables in a statistical/machine learning model. Unstructured data, however, requires further parsing--i.e., before you can use it in modeling you first have to decompose it into a set of structured data elements--e.g., number of words, etc.
For instance, suppose you want to build a knowledge management (KM) system for a server group within a company that makes online MMORPGs. You might begin with the massive collection of email messages exchanged between the members of this group.
So you create a data model for this source--e.g., comprised of fields like 'sender', 'recipient', 'date/time sent', whether the recipient and sender were both employees of the server group, whether the message was was copied to others, etc. The rows of the databse are the individual emails.
Then you write a script comprised of a set of parsers to extract each field from each email message. For many fields, this is simple, e.g., for the 'cc:' field, you write a parser to scan that portion of the email message and check whether it is empty--if it is, then that field in your database for that row might be filled with 'False' (to indicate that no persons are copied), otherwise, 'True'. Likewise, data/time, which is probably in some form like: 16 Mar 2011 18:45:39.0319 (UTC). Extracting and parsing this data is likewise straightforward; in fact, your scripting language almost certainly has a module to do it.
But when you get to the body of the email, while it's not difficult to extract from the rest of the email message, parsing it is not straightforward. Your data model might have fields for "NumberOfWords", "Keywords", etc. and it's simple to build a parser to populate those fields. The most useful information is more difficult though--i.e., was the email message helpful to the recipient? What was the subject? Is it authoritative?
Data Mining of unstructured data usually falls under the category of "text mining". There are two different opinions on this. One opinion says that you need specialized tools to perform Natural Language Processing (NLP), since that is the only way you can derive semantic meaning. The other approach will transform the unstructured data into word matrices and then use standard statistical techniques to perform data mining ("bag of words"). In this case everything becomes data and order of words is not important.
-Ralph Winters
Structured Data
Structured data can be considered as a database of data. In structured data, each and every feature (field) is well documented. For example, bank_transaction data set or a class_attendance data set can be considered as structured data sets.
----------------------------------------------------------------------
| student_id | student_name | student_attendance |
|----------------------|---------------------|-----------------------|
| 2123 | Jo | 45 |
|----------------------|---------------------|-----------------------|
| 2175 | Mark | 10 |
|---------- -----------|---------------------|-----------------------|
Unstructured Data
Data type - such as images, audio/ video clips, text etc. - which is considered hard for a computer to interpret is called unstructured data. In normal terms, unstructured data is also called Raw data. It is hard for a computer to visualize such kind of data.

Resources