简体   繁体   中英

HL7 ADT Message parsing: date ranges

Note:

This question is not asking for advice on which library to use; I'm rolling my own.


I'm reading through the HL7 v2.5.1 spec in order to make a parsing engine for iOS and Windows.

My question is related to the Name Validity Range component in the Patient Name field (PID-5). But I think it applies generally to all DR (Date Range) components.

In Chapter 3: Patient Administration , on page 75, the following information is listed:

Components: {...omitted...} ^ <Name Validity Range (DR)> ^ {...omitted...}

Subcomponents for Name Validity Range (DR): <Range Start Date/Time (TS)> & <Range End Date/Time (TS)>

Subcomponents for Range Start Date/Time (TS): <Time (DTM)> & <Degree of Precision (ID)>

Subcomponents for Range End Date/Time (TS): <Time (DTM)> & <Degree of Precision (ID)>

I understand how the fields, components and subcomponents are structured and how their separators are used... or at least I think I do. However, the above information confuses me as to how the data would be expressed. I have searched, but cannot find a suitable message sample for this kind of data. Based on my understanding of the HL7 data structures, here's how the data would be encoded:

PID|||01234||JONES^SUSIE^Q^^^^^^^199505011201&M&199505011201&M^199505011201&M&199505011201&M

The problem here, of course, is that having subcomponents embedded in subcomponents leaves you unsure exactly how to parse the data and what data goes where.

I did look into Chapter 2: Control, Appendix A and found this text on page 160:

Note: DR cannot be legally expressed when embedded within another data type. Its use is constrained to a segment field.

So, it appears that the standard listed for PID-5 is invalid. I haven't seen any messages from my system that even generate this information, so it may be a moot point for my particular case, but I don't like developing solutions with known holes. Has anybody encountered this "in the wild"?

An item with DR data type can be subdivided and have a precision subcomponent if the item is of type field .eg. ARQ/11 Requested start date/time range .

It can be subdivided in start and end of data range subcomponents but not precision subcomponent if the item with DR data type is already part of an other data type as in your example PID/5 .

Patient name is an XPN data type which is a composite data type. That basically mean it can have a combination of Primary (like ST) and other Composites, as shown here

Now, you are looking at XPN.10 which is 10th component which is DR Data type, and again DR is combination of 2 primary DTM - start and end - or 2 subcomponents. And subcomponents are seperated by &.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM