The purpose of this document is to specify additional demographic data import to CAREWare’s existing HL7 Socket Interface. Currently CAREWare allows new clients to be added only into a surveillance provider. Updating CAREWare patients is only done with ADT message types with trigger events A34 and A35. Updating only consists of updating first name, last name, middle name, client account number, client ID value, gender, birth date, race, and the address fields.
In addition to A34 and A35, CAREWare would like to process trigger events A04 and A08. A04 will allow addition of new patients directly into the importing provider. A04, A08, A34, and A35 will be expanded to be able to update of any patient demographic data that are tied to CAREWare’s demographic fields (Table 1.0).
When processing A04 records, CAREWare will add the patient during the Map Client index and update the patient record during the Process Records Index. During the Map Client index, CAREWare will do a lookup for an existing patient record based on the matching patient value and do a secondary check based on the first name, last name, and date of birth. If it finds an existing patient, it will bypass the add and will only do the update. The HL7 file for A04 records should have a minimum of the patient’s first name, last name, date of birth, and gender. CAREWare needs these four fields in order to add a new patient record to CAREWare. During the Process Records index, CAREWare will update any field that is linked to a corresponding CAREWare field.
Table 1.0 CAREWare’s demographic fields
CAREWare Field | Description | Comments |
Enrl Status | Enrollment Status | |
ADAP Enrl Status | ADAP Enrollment Status | |
HIP Enrl Status | HIP Enrollment Status | |
State | American State | |
County | State’s County | Parish in Louisiana |
Hispanic | Ethnicity | |
Vtl Status | Vital Status | |
HIV Status | ||
Client ID | ||
STD Enrl Date | Enrollment Date for regular services | |
APA Enrl Date | ADAP Enrollment Date | |
HIP Enrl Date | HIP Enrollment Date | |
STD Date Closed | Enrollment close date for regular services | |
APA Date Close | ADAP Enrollment close date | |
HIP Date Close | HIP Enrollment close date | |
Notes | Patient Notes | |
URN | Patient’s unique identifier. Created by parsing first name, last name, date of birth and gender. | Updated when first name, last name, dob, or gender is changed |
eURN | Encrypted URN | Updated when first name, last name, dob, or gender is changed |
Last Name | Patient’s last name | |
First Name | Patient’s first name | |
Middle Name | Patient’s middle name | |
Address | Patient’s street address | |
City | Patient’s city | |
Zip | Patient’s zip code | |
Phone | Patient’s home phone | |
Dob | Patient’s date of birth | |
Gender | Patient’s gender | |
Patient Race | Patient’s race | |
HIV Risk Factor | Patient’s HIV risk factor | |
HIV Date | Patient’s HIV date | |
AIDS Date | Patient’s AIDS date | |
HIV Date Estimate | Sets whether the HIV date is estimated | |
AIDS Date Estimate | Sets whether the AIDS date is estimated | |
Household Income | ||
Household Size | ||
Insurance |
How CAREWare processes an HL7 message
Once the HL7 indexes are set to active, CAREWare will attempt to parse the incoming HL7 message into document stubs for processing. It is important to activate all three indexes for a particular import in order to get the data imported. CAREWare will determine whether the message is an immunization record by looking at the MSH 9 for the message type and MSH 9.1 for the trigger event. If the message type and trigger event match a message type and trigger event pair from a pre-defined list of possible importable messages, CAREWare will parse the incoming file. For demographic imports/updates, CAREWare will only look for the message type ADT with the trigger event of A04 (Register patient), A08 (Update patient information), A34 (merge patient info. Patient ID only), and A35 (Merge patient info – Account number only).
The MSH specifications can be found in table 1.1. During parsing, CAREWare will set the primary provider and client values based on the settings the user has set. CAREWare will also split the messages into multiple document stubs if more than one PID segment exists in the message. The PID specifications can be found in table 1.2. Once the document stubs are created, they will have a starting status of “Map Provider.”
Map Provider Index
This index is used to match the provider ID (MSH 6) to a domain in CAREWare. CAREWare will create a mapping record if none exists. CAREWare will delete the messages if the mappings are incomplete or the activation code is not entered. If a mapping is complete and an activation code is entered for the domain, CAREWare will proceed to update the status to Map Client. The Lab Test Mapping Tool’s Map Provider form will list out all provider mappings. The Lab Test Mapping Tool can only be accessed in the Central Administration domain. It is located in the Administrative Options Menu in the upper right-hand corner. The Map Provider records will indicate whether they are active or inactive. Active means that an activation code has already been registered by CAREWare. There are no field mappings for this index. The activation code will be generated by jProg and will be sent out when the site sends a request for one. The site must know the value in MSH 6 in order for jProg to create the activation code.
Map Client Index
This index will process client matching. It will use the matching criteria set in the provider mappings. If the patient record matches the HL7 value and meets threshold, then it will be updated to Process Records. If it doesn’t match or does not meet threshold, the HL7 document stub will be deleted. If any diagnosis, test, or generic conditions are set and matched, the patient will be added to the surveillance domain if they haven’t been added already.
Process Records Index
Once CAREWare extracts the data necessary for an import, it will then attempt to import this data as the patient record. For demographic updates, CAREWare will update the existing record with any field(s) that is link through the field mappings.
Table 1.1 MSH Specifications for HL7 socket interface
SEQ | LEN | OPT | ELEMENT NAME | CAREWare Field | Required For Import | Comments |
1 | 1 | R | Field Separator | Yes | Use to know what delimiter to use to separate components when parsing. | |
2 | 4 | R | Encoding Characters | Yes | ||
3 | 180 | O | Sending Application | Yes | Used in conjunction with MSH 6 to ensure that unique provider mapping record. CAREWare uses this value to determine where the data originated from. | |
4 | 180 | O | Sending Facility | No | User can set to this value instead of MSH 3. | |
5 | 180 | O | Receiving Application | Alternate Provider ID | Yes | User can set to this value instead of MSH 6. If user sets this as the default patient identifier, this value will override the value MSH 6. If this is set as the alternate value, it will override MSH 6 if MSH 6 is empty. |
6 | 180 | O | Receiving Facility | Primary Provider ID | No | Used in conjunction with MSH 3 to create a unique provider mapping record. CAREWare uses this value to link to a CAREWare provider. jProg will need this value to create an activation code. |
7 | 26 | O | Date/Time Of Message | No | ||
8 | 40 | O | Security | No | ||
9 | 7 | R | Message Type | Yes | CAREWare will use this field to determine the message type and trigger event. Message type will be in MSH 9.0 and trigger event will be in MSH 9.1 |
|
10 | 20 | R | Message Control ID | No | ||
11 | 3 | R | Processing ID | No | ||
12 | 8 | R | Version ID | No | ||
13 | 15 | O | Sequence Number | No | ||
14 | 180 | O | Continuation Pointer | No | ||
15 | 2 | O | Accept Acknowledgment Type |
No | ||
16 | 2 | O | Application Acknowledgment Type |
No | ||
17 | 2 | O | Country Code | No | ||
18 | 6 | O | Character Set | No | ||
19 | 60 | O | Principal Language Of Message | No |
Table 1.2 PID Specifications for HL7 Socket Interface
SEQ | LEN | OPT | ELEMENT NAME | CAREWare Field | Required For Import | Comments |
1 | 4 | O | Set ID - Patient ID | No | ||
2 | 20 | O | Patient ID (External ID) |
Primary Client ID | Yes | Default field where CAREWare looks for matching patient value. |
3 | 20 | R | Patient ID (Internal ID) |
Primary/Alternate Client ID | No | Can be used as matching patient identifier. If user sets this as the default patient identifier, this value will override the value PID 2. If this is set as the alternate value, it will override PID 2 if PID 2 is empty. |
4 | 20 | O | Alternate Patient ID - PID | Primary/Alternate Client ID | No | Can be used as matching patient identifier. If user sets this as the default patient identifier, this value will override the value in PID 2. If this is set as the alternate value, it will override PID 2 if PID 2 is empty. |
5 | 48 | R | Patient Name | Last Name, First Name, Middle Name |
No | If patient name is not set, CAREWare will match patients by matching patient value only. Users must set CAREWare’s threshold (secondary check) to 0, |
6 | 48 | O | Mother’s Maiden Name | No | Can be imported as a custom client field | |
7 | 26 | O | Date/Time of Birth | No | If date of birth is not set, make sure CAREWare’s threshold (secondary check) is low enough to account for this. YYYY | |
8 | 1 | O | Sex | Gender | No | Only mandatory if new patient is added. |
9 | 48 | O | Patient Alias | No | Can be imported as a custom client field | |
10 | 1 | O | Race | Patient Race | No | Single patient race |
11 | 106 | O | Patient Address | Address, Address Continued, City, State, Zip |
No | Address^Address Continued^City^State^Zip |
12 | 4 | B | County Code | County | No | |
13 | 40 | O | Phone Number - Home | Phone | No | |
14 | 40 | O | Phone Number - Business | No | Can be imported as a custom client field | |
15 | 60 | O | Primary Language | No | Can be imported as a custom client field | |
16 | 1 | O | Marital Status | No | Can be imported as a custom client field | |
17 | 3 | O | Religion | No | Can be imported as a custom client field | |
18 | 20 | O | Patient Account Number | acct | No | |
19 | 16 | O | SSN Number - Patient | No | Can be imported as a custom client field | |
20 | 25 | O | Driver's License Number - Patient | No | Can be imported as a custom client field | |
21 | 20 | O | Mother's Identifier | No | Can be imported as a custom client field | |
22 | 3 | O | Ethnic Group | Hispanic | No | |
23 | 60 | O | Birth Place | No | Can be imported as a custom client field | |
24 | 2 | O | Multiple Birth Indicator | No | Can be imported as a custom client field | |
25 | 2 | O | Birth Order | No | Can be imported as a custom client field | |
26 | 4 | O | Citizenship | No | Can be imported as a custom client field | |
27 | 60 | O | Veterans Military Status | No | Can be imported as a custom client field | |
28 | 80 | O | Nationality | No | Can be imported as a custom client field | |
29 | 26 | O | Patient Death | deathDate | No | Sets the date of death |
Date and Time | ||||||
30 | 1 | O | Patient Death Indicator | Vtl Status | No | Sets the enrollment status to decease |
Any fields not defined here can be imported if set to other segments. If they are set to other segments, those segments must exist in the HL7 message in order to be imported. If the fields are set and the segments do not exist, CAREWare will error out stating that it is trying to grab data from a segment that does not exist in the message.
Sample Update Patient Info Message (Minimum)
MSH|^~\&|SENDAPP| | |PROVIDERID|||ADT^A08
PID|1|123456
Sample Register Patient Info Message (Minimum)
MSH|^~\&|SENDAPP| | |PROVIDERID|||ADT^A04
PID|1|123456|||LASTNAME^FIRSTNAME||20010101|F