notes interface specification hl7 format - medical · pdf file · 2018-03-03notes...

32
Release 5.5 P/N 2636-06 Notes Interface Specification HL7 format MedicaLogic’s Support for the Import and Export of Documents

Upload: buixuyen

Post on 18-Mar-2018

227 views

Category:

Documents


1 download

TRANSCRIPT

Release 5.5P/N 2636-06

Notes Interface SpecificationHL7 format

MedicaLogic’s Support for theImport and Export of Documents

Notes Interface Specification HL7 format

Version 5.5 i

Table of Contents

Abstract .................................................................................................................................... 1

HL7 Messages .......................................................................................................................... 2

Legend ...................................................................................................................................................... 2MDM – Document management .............................................................................................................. 3

HL7 Message segments........................................................................................................... 4

MSH – Message Header ........................................................................................................................... 4EVN – Event type..................................................................................................................................... 6PID – Patient Identification ...................................................................................................................... 7PV1 – Patient Visit ................................................................................................................................. 10TXA – Transcription Document Header ................................................................................................ 13OBX – Observation/Result ..................................................................................................................... 20MSA – Message Acknowledgement....................................................................................................... 22

Appendix A. Interpretation of HL7 Data Types..................................................................... 23

ST (string), TX (text ) and FT (formatted text) ...................................................................................... 23PN or XPN - Person name...................................................................................................................... 24CN or XCN - Composite ID number and name...................................................................................... 24PPN – Performing person timestamp...................................................................................................... 24

Appendix B. Matching algorithms......................................................................................... 25

Data-to-Patient matching algorithm........................................................................................................ 25

Appendix C. Cross-referencing field values ........................................................................ 27

Tips ......................................................................................................................................................... 27Cross-reference example ........................................................................................................................ 28

Appendix D. Data exchange protocols ................................................................................. 29

LinkLogic directory structure ................................................................................................................. 29Data transfer and reporting ..................................................................................................................... 30

Notes Interface Specification HL7 format

Version 5.5 1

Abstract

This HL7 based interface was developed by MedicaLogic to support the import and export of documents.It uses the HL7 MDM message defined within the HL7 specification. Support for the MDM message isconstrained to the following trigger events: T02, T04, and T06. Only the T02 and T04 trigger events aresupported for both the import and export of documents. T06 is supported for document import only.

We assume that you are familiar with HL7. This document is not intended to be used alone. It should becomplemented by the HL7 specification.

Note. HL7 standards committee members can acquire a free copy of the current HL7 specification fromthe Internet via the HL7 World Wide Web page (http://www.HL7.org). Non-members can order a copyfrom the same location or by contacting Health Level Seven, 3300 Washtenaw Ave., Suite 227, AnnArbor, MI 48104-4250; Phone: (313) 677-7777; Fax: (313) 677-6622.

This document has been updated to be consistent with LinkLogic version 5.5. The information in thisdocument may not apply to older or newer releases.

Notes Interface Specification HL7 format

Version 5.5 2

HL7 Messages

The abstract message definition syntax used to describe the supported HL7 messages is consistent withthe syntax used in the HL7 specification, version 2.3.

Although not required, it is preferred that Ignored or Not Used message segments not be included in asupported HL7 message. When present, Ignored message segments are ignored and LinkLogic’s parserperforms no data validation. When present, Not Used message segments are parsed and LinkLogicvalidates the data. If there is invalid data, LinkLogic generates an error and does not import the file or thesegment with the invalid data.

The following legend is used throughout the document.

Legend

R Required. This field is required to have valid data. Missing or invalid data causes LinkLogic togenerate an error and to not import the file or the segment with the missing or invalid data.

O Optional. This field is not required to have data. On import, if data is provided, it is validated. If thedata is invalid, LinkLogic generates an error and does not import the file or the segment with theinvalid data. On export, if Logician has data, it exports it.

C Conditional. Data may be either required or optional, depending on the condition. For furtherclarification, read the associated footnote.

I Ignored. Data is not required and it is not used in Logician. If there is data, LinkLogic does notvalidate it.

N Not Used. Data is not required and it is not used in Logician. However, if data is present, LinkLogicparses and validates the data. If the data is invalid, LinkLogic generates an error and does not importthe file or the segment with the invalid data.

U Used. LinkLogic exports data in this field.

Notes Interface Specification HL7 format

Version 5.5 3

MDM – Document management

Legend R = RequiredO = OptionalC = ConditionalI = IgnoredU = Used

MDM

T02 T04 T06

Message Segments Import Export Import Export Import

MSH R R R R REVN R R R R R

PID R R R R R

PV1 O [1] O O [1] O O [1]

TXA O [1] U [2] O [1] U [2] O [1]

{OBX} R [3] R R [3] R R [3]

MSH C C C C C

MSA C C C C C

[ERR] I I I I I

[1] Although the HL7 specification considers this message segment to be required, LinkLogic considersit optional.

[2] The TXA message segment is always exported as part of an MDM message.

[3] Multiple OBX message segments can be imported as individual documents, or concatenatedtogether to produce a single document, depending on how the relationship is configured in LogicianSetup.

Notes Interface Specification HL7 format

Version 5.5 4

HL7 Message segments

On import, LinkLogic limits any given file or batch transmission of HL7 messages to 4096 MSH and4096 PID message segments.

MSH – Message Header

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

MSH Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 1 ST Field Separator R U

2 4 ST Encoding Characters R U

3 40 HD Sending Application C [1] [2] U [3]

4 20 HD Sending Facility O [1] [2] U [4]

5 40 HD Receiving Application N U [5]

6 30 HD Receiving Facility N C [6]

7 26 TS Date/Time Of Message R [7] U

8 40 ST Security N N

9 7 CM 0076 Message Type R [8] U [8]

10 20 ST Message Control ID R U

11 3 PT 0103 Processing ID R [9] U

12 8 ID 0104 Version ID R [10] U

13 15 NM Sequence Number N N

14 180 ST Continuation Pointer N N

15 2 ID 0155 Accept Ack Type O [11] N

16 2 ID 0155 Application Ack Type N [12] N [12]

17 2 ID Country Code N N

18 6 ID 0211 Character Set N N

19 60 CE Principal Language Of Message N N

Notes Interface Specification HL7 format

Version 5.5 5

[1] Although MSH-3 is considered optional in the HL7 specification, LinkLogic requires a value ineither MSH-3 or MSH-4. LinkLogic identifies the data source for an interface (known in Logician asa relationship) by using the contents of MSH-3, MSH-4, or a combination of both separated by ahyphen. The Unique Name/ID in Logician’s New Relationship dialog box must match this datasource.

For example, if MSH-3 contains PracticeMgr and MSH-4 contains East, the data file would matchagainst a Logician relationship named PracticeMgr, East, or PracticeMgr-East. If either MSH-3 orMSH-4 contains more than the first component, the delimiters are converted to spaces and thecontents of the entire field are used.

LinkLogic uses the following logic to determine the correct relationship:

If MSH-3 or MSH-4 or the concatenation of MSH-3 and MSH-4, separated by a hyphenuniquely matches exactly one defined LinkLogic relationship name

Import the file using the matched relationship

Else if multiple matching relationship names were found

Issue an error indicating that multiple relationships were found (ambiguous match)

Else, no matching relationship name was found

Issue an error indicating that no relationship exists to import the data file

[2] Although the HL7 specification defines the maximum length of this field as 180, LinkLogic onlysupports the maximum length shown in the table. The combination of MSH-3 and MSH-4 must notexceed 40 characters.

[3] LinkLogic identifies itself with a string value derived by concatenating the string LinkLogic- withthe unique Logician Enterprise ID for the organization (for example, LinkLogic-ABCD). TheLogician Enterprise ID can be up to four alphanumeric characters.

[4] MSH-4 contains the patient’s (not a document’s) server-specific location of care in the form ofDatabaseID^LOC.

[5] MSH-5 contains the name of the LinkLogic relationship that created the output file.

[6] MSH-6 contains the patient’s (not a document’s) location of care. This differs from MSH-4 in thatthis field contains the location of care without the database ID.

[7] Although this field is not required in the HL7 specification, LinkLogic requires it. See note [6] forOBX-14 to understand how this field is used to determine the clinical date for the importeddocument.

[8] The supported values for Message Type include:

Value Description

MDM Medical document management message

ACK General acknowledgment message

The second component, trigger event, is ignored on import. Use the EVN message segment toidentify trigger event types.

On export, the second component is populated with a value identical to EVN-1, Event Type Code.

Notes Interface Specification HL7 format

Version 5.5 6

[9] The supported values for Processing ID include:

Value Description

D Debugging

P Production

T Training (treated same as Debugging)

Only messages with a Processing ID of P (Production) affect Logician’s database.

[10] The supported values for Version ID include:

Value Description

2.1 Release 2.1, March 1990

2.2 Release 2.2, December 1994

2.3 Release 2.3, April 1997

[11] The supported values for Accept Ack Type include:

Value Description

AL Always

NE Never (default)

[12] Application acknowledgment is currently unsupported on import and export. On export, the valueNE is used. The supported Ack types are still validated for import.

EVN – Event type

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

EVN Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 3 ID 0003 Event Type Code R [1] U [1] [3]

2 26 TS Recorded Date/Time I U [2]

3 26 TS Date/Time of Planned Event N N

4 3 IS 0062 Event Reason Code N N

5 60 XCN 0188 Operator ID N N

6 26 TS Event Occurred N N

Notes Interface Specification HL7 format

Version 5.5 7

[1] The supported values for Event Type Code include:

Value Definition

T02 Original document notification and content

T04 Document status change notification and content

T06 Document addendum notification and content

[2] EVN-2, Date/Time of Event, is populated with a date/time that is typically milliseconds later thanthe date/time exported in MSH-7, Date/Time of Message. EVN-2 is not the time the event occurred.

[3] Trigger event T02 is specified only if the document being exported has a creation date/timestampequal to its last updated date/timestamp. Otherwise, trigger event T04 is specified.

PID – Patient Identification

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

PID Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 4 SI Set ID - Patient ID O O

2 20 CX Patient ID (External ID) C [1] C [2]

3 20 CX Patient ID (Internal ID) R [1] U [2]

4 16 CX Alternate Patient ID-PID C [3] N

5 48 XPN Patient Name R U

6 48 XPN Mother’s Maiden Name N N

7 26 TS Date/Time of Birth O O

8 1 IS 0001 Sex O [4] O

9 48 XPN Patient Alias N N

10 1 IS 0005 Race O [5] O

11 106 XAD Patient Address O [6] O

12 4 IS County Code N N

13 20 XTN Phone Number - Home O [7] O

14 20 XTN Phone Number - Work O [7] O

15 60 CE 0296 Primary Language N N

16 1 IS 0002 Marital Status O [8] O

17 3 IS 0006 Religion N N

Notes Interface Specification HL7 format

Version 5.5 8

PID Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

18 20 CX Patient Account Number N N

19 11 ST SSN Number - Patient O [9] O

20 25 DLN Driver’s License Number-Patient N N

21 20 CX Mother’s Identifier N N

22 3 IS 0189 Ethnic Group N N

23 60 ST Birth Place N N

24 2 ID 0136 Multiple Birth Indicator N N

25 2 NM Birth Order N N

26 4 IS 0171 Citizenship N N

27 60 CE 0172 Veterans Military Status N N

28 80 CE Nationality N N

29 26 TS Patient Death Date and Time N N

30 1 ID 0136 Patient Death Indicator N N

[1] By default PID-3, Patient ID (Internal ID), is assumed to contain the patient identifier used to matchthe import data with a patient. Alternatively, you can use the Match Options dialog box in Logicianto use PID-2, Patient ID (External ID).

[2] PID-3, Patient ID (Internal ID), is always populated with the unique Logician Patient ID for thepatient and, if available, PID-2, Patient ID (External ID), is populated with the external identifier forthe relationship-specific external ID set.

Logician’s Patient ID is a globally unique identifier represented as a string value in the form123456789012-XXXX123 where:

• The 123456789012 prefix is a number with a maximum of 12 digits guaranteed to be uniquewithin the Logician database in which the patient’s chart was created.

• The XXXX123 suffix represents the concatenation of the unique Enterprise ID (XXXX) andthe Logician database ID (123). MedicaLogic’s Order Management department allocatesEnterprise IDs for every enterprise with Logician. Logician database IDs are allocated at thetime Logician is installed and specified by the system administrator performing theinstallation.

[3] If supplied, PID-4, Alternate Patient ID, is assumed to be the patient’s medical record number.Although the HL7 specification defines the maximum length of this field to be 20, LinkLogic onlysupports a maximum of 16 alphanumeric characters to describe Alternate Patient ID.

Notes Interface Specification HL7 format

Version 5.5 9

[4] The supported values for Sex include:

Value Definition

F Female

M Male

O Other (treated as Unknown)

U Unknown

[5] The supported values for Race include:

Value Definition

W White

B Black

N Native American

O Oriental/Asian

H Hispanic

T Other

U Undetermined (default)

[6] The state or province component accepts a two-character state code or any string up to 50 charactersin length. The zip code component accepts alpha characters to support foreign addresses. The zipcode component is restricted to 12 characters.

[7] Although the HL7 specification defines the maximum length of this field as 40, LinkLogic onlysupports a maximum of 20 characters for phone numbers. Digits beyond the 20-character limit aretruncated.

[8] The supported values for Marital Status include:

Value Description

A Separated

D Divorced

M Married

S Single

W Widowed

O Other

U Undetermined (default)

[9] Although the HL7 specification defines the maximum length of PID-19 to be 16 characters,LinkLogic only interprets the first 11 characters. Embedded dashes (-) are ignored.

Notes Interface Specification HL7 format

Version 5.5 10

PV1 – Patient Visit

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

PV1 Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 4 SI Set ID-PV1 O O

2 1 IS 0004 Patient Class N [0] N

3 80 PL Assigned Patient Location C [1] [7] O [2]

4 2 IS 0007 Admission Type N N

5 20 CX Preadmit Number N N

6 80 PL Prior Patient Location N N

7 60 XCN 0010 Attending Doctor C [3] [7] [9] O [4]

8 60 XCN 0010 Referring Doctor C [5] O [6]

9 60 XCN 0010 Consulting Doctor N N

10 3 IS 0069 Hospital Service N N

11 80 PL Temporary Location N N

12 2 IS 0087 Pre-admit Test Indicator N N

13 2 IS 0092 Readmission Indicator N N

14 3 IS 0023 Admit Source N N

15 2 IS 0009 Ambulatory Status N N

16 2 IS 0099 VIP Indicator N N

17 60 XCN 0010 Admitting Doctor N N

18 2 IS 0018 Patient Type N N

19 20 CX Visit Number O [8] O

20 50 FC 0064 Financial Class N N

21 2 IS 0032 Charge Price Indicator N N

22 2 IS 0045 Courtesy Code N N

23 2 IS 0046 Credit Rating N N

24 2 IS 0044 Contract Code N N

25 8 DT Contract Effective Date N N

26 12 NM Contract Amount N N

27 3 NM Contract Period N N

Notes Interface Specification HL7 format

Version 5.5 11

PV1 Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

28 2 IS 0073 Interest Code N N

29 1 IS 0110 Transfer to Bad Dept Code N N

30 8 DT Transfer to Bad Dept Date N N

31 10 IS 0021 Bad Debt Agency Code N N

32 12 NM Bad Debt Transfer Amount N N

33 12 NM Bad Debt Recovery Amount N N

34 1 IS 0111 Delete Account Indicator N N

35 8 DT Delete Account Date N N

36 3 IS 0112 Discharge Disposition N N

37 25 CM 0113 Discharged to Location N N

38 2 IS 0114 Diet Type N N

39 2 IS 0115 Servicing Facility N N

40 1 IS 0116 Bed Status N N

41 2 IS 0117 Account Status N N

42 80 PL Pending Location N N

43 80 PL Prior Temporary Location N N

44 26 TS Admit Date/Time N N

45 26 TS Discharge Date/Time N N

46 12 NM Current Patient Balance N N

47 12 NM Total Charges N N

48 12 NM Total Adjustments N N

49 12 NM Total Payments N N

50 20 CX 0192 Alternate Visit ID C [8] N

51 1 IS 0326 Visit Indicator N N

52 60 XCN 0010 Other Healthcare Provider N N

[0] Although this field is considered required or conditional in the HL7 specification, LinkLogic treatsthis field as optional.

Notes Interface Specification HL7 format

Version 5.5 12

[1] If the import of this message results in the creation of a new patient in Logician, the fourthcomponent (facility ID), if specified, is interpreted as the patient’s location of care. The valuesupplied as the facility ID is constrained to a maximum of 8 characters. All other components areignored.

This field should contain the abbreviation for the location, as defined in Logician. You can cross-reference the value in this field with location of care values in Logician. For more information, seeAppendix C. Cross-referencing field values on page 27.

[2] The fourth component is populated with the 8-character abbreviation for the patient’s home locationof care.

[3] See note [6] for TXA-5 to understand how this field is used to route the document to the correctprovider’s desktop.

[4] The Attending Doctor field is populated with the provider identified for the document, not thepatient’s responsible provider.

[5] If the import of this message results in the creation of a new patient in Logician, a new contact iscreated for the referring doctor, if specified. LinkLogic interprets the first component as thereferring doctor’s UPIN and requires that the second component, Family Name, be specified. Forthe purposes of displaying the referring physician in the document, LinkLogic interprets only thesecond and third components as the referring doctor’s last name and first name, respectively.

[6] The Referring Doctor field is populated with the patient’s referring physician if one has beenspecified.

[7] LinkLogic uses the following logic to determine the location of care for the document. This logiccan be configured through the Change Location of Care Options dialog box in Logician.

If PV1-3 component 4 (Assigned Patient Location) contains a value then

Location of care = PV1-3 component 4

Else If PV1-7 component 1 (Attending Doctor) contains a value

Location of care = Home location associated with Attending Doctor from PV1-7

Else

Location of care = Default location of care specified in the Change Location of CareOptions dialog box

This logic is only used to determine which field to use. It does not validate the data. If the selectedfield value is found to be invalid LinkLogic does not try to use the next field in the sequence shownabove. Instead, an exception file is generated and a user is required to correct and resolve the error.If the location of care value has been made obsolete in Logician, LinkLogic uses the root location ofcare and issues a warning.

[8] LinkLogic uses the following logic to determine the visit identifier for the imported document.

If PV1-19 (Visit Number) contains a value then

Visit ID = PV1-19

Else If PV1-50 (Alternate Visit ID) contains a value

Visit ID = PV1-50

Else

The imported document in Logician is not assigned a Visit ID

Notes Interface Specification HL7 format

Version 5.5 13

[9] If the import of this message results in the creation of a new patient in Logician, the AttendingDoctor, if specified, is assumed to be the patient’s responsible provider.

Note. If the value for Attending Doctor is visit specific, then you may not want to populate this fieldon import. The Attending doctor will become the patient’s responsible provider in Logician.

TXA – Transcription Document Header

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

TXA Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 4 SI Set ID – Document O [0] O

2 30 IS 0270 Document Type R [1] U [2]

3 2 ID 0191 Document Content Presentation C [3] C

4 26 TS Activity Date/Time O [4] [23] O [5]

5 60 XCN Primary Activity ProviderCode/Name

C [6] C [7]

6 26 TS Origination Date/Time O [4] N

7 26 TS Transcription Date/Time C [4] O

8 26 TS Edit Date/Time N U [8]

9 60 XCN Originator Code/Name O [6] N

10 60 XCN Assigned DocumentAuthenticator

O [6] N

11 48 XCN Transcriptionist Code/Name N [0] [9] N

12 30 EI Unique Document Number O [0] [23] U [10]

13 16 ST Parent Document Number C [11] [13][14]

N

14 22 EI Placer Order Number O [15] U [16]

15 8 EI Filler Order Number C [12] [13][14]

N

16 30 ST Unique Document File Name O [25] O [25]

17 2 ID 0271 Document Completion Status R [15] [17][24]

U

18 2 ID 0272 Document Confidentiality Status O [18] U [19]

19 2 ID 0273 Document Availability Status N [20] U [21]

Notes Interface Specification HL7 format

Version 5.5 14

TXA Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

20 2 ID 0275 Document Storage Status N N

21 30 ST Document Change Reason O [0] O

22 60 PPN Authentication Person, TimeStamp

O [0] [6] U [22]

23 60 XCN Distributed Copies (Code andName of Recipients)

O [26] O

[0] Although this field is considered required or conditional in the HL7 specification, LinkLogic treatsthis field as optional.

[1] LinkLogic uses the following mappings from HL7 Document Codes to Logician Document Types:

HL7Code Description Logician Document Type

AP Anatomic Pathology Pathology Report

AR Autopsy Report External Other

AS Admission Summary Hospital Admission

BB Blood Bank Lab Report

CC CardioDiagnostics Diagnostic Report Other

CL Clinic Letter Letter

CM Case Management Clinical Lists Update

CN Consult Consultation Report

CO Clinic Note Internal Other

CR Correction External Other

CS Clinical Summary Clinical Summary

CU Clinical Ultrasound Imaging Report

DH Discharge Instructions External Other

DI Diagnostic Imaging Imaging Report

DN Diagnostic Neurology Diagnostic Report Other

DR Diagnostic Report Other Diagnostic Report Other

DS Discharge Summary Hospital Discharge Summary

ED ER Discharge Summary Emergency Report

EK EKG Report EKG Report

ER Emergency Report Emergency Report

FE Filed in Error Filed in Error

Notes Interface Specification HL7 format

Version 5.5 15

HL7Code Description Logician Document Type

GC General Correspondence External Correspondence

HC Home Care Report Home Care Report

HP History and Physical Exam Hospital History & Physical

HS Heart Station Diagnostic Report Other

LD Labor and Delivery Report Hospital Procedure Report

LR Lab Report Lab Report

OP Operative Report Operative Report

OT Occupational Therapy Rehab Report

OV Office Visit Office Visit

PA Pathology Report Pathology Report

PC Psychiatric Consultation Consultation Report

PE Phone Encounter Phone Note

PH Psychiatric History External Other

PN Procedure Note External Other

PR Progress Note External Other

RA Radiology Imaging Report

RR Rehab Report Rehab Report

RX Rx Refill Rx Refill

SP Surgical Pathology Pathology Report

SR Social Worker Report Social Worker Report

SS Special Studies Diagnostic Report Other

TH Physical Therapy Rehab Report

TN Transcribed Note Lab Report

TS Transfer Summary External Other

ZZ Other External Other

[2] LinkLogic uses the following mappings from Logician Document Types to HL7 Document Codes:

Logician Document TypeHL7Code HL7 Description

Clinical Lists Update ZZ Other

Clinical Summary CS Clinical Summary

Consultation Report CN Consult

Diagnostic Report Other DR Diagnostic Report Other

EKG Report EK EKG Report

Notes Interface Specification HL7 format

Version 5.5 16

Logician Document TypeHL7Code HL7 Description

Emergency Report ER Emergency Report

External Correspondence GC General Correspondence

External Other ZZ Other

Filed in Error FE Filed in Error

Home Care Report HC Home Care Report

Hospital Admission AS Admission Summary

Hospital Discharge Summary DS Discharge Summary

Hospital History & Physical HP History & Physical Exam

Hospital Procedure Report PN Procedure Note

Imaging Report DI Diagnostic Imaging

Internal Correspondence GC General Correspondence

Internal Other ZZ Other

Lab Report LR Lab Report

Letter CL Clinic Letter

Office Procedure PN Procedure Note

Office Visit OV Office Visit

Operative Report OP Operative Report

Pathology Report PA Pathology Report

Phone Note PE Phone Encounter

Registration Update ZZ Other

Rehab Report RR Rehab Report

Rx Refill RX Rx Refill

Social Work Report SR Social Worker Report

Transcription LR Lab Report

[3] The supported values for Document Content Presentation are shown below. Any other valuegenerates an error.

Value Definition

TX Machine readable text document (default)

FT Formatted text

[4] See note [6] for OBX-14 to understand how this field is used to determine the clinical date for theimported document.

[5] TXA-4 is populated with the clinical date/time of the exported document.

Notes Interface Specification HL7 format

Version 5.5 17

[6] LinkLogic uses the following logic to assign the correct provider for the document.

If TXA-5 (Primary Activity Provider Code/Name) contains a value

Route document to provider defined in TXA-5

Else If TXA-9 (Originator Code/Name) contains a value

Route document to provider defined in TXA-9

Else If TXA-10 (Assigned Document Authenticator) contains a value

Route document to provider defined in TXA-10

Else If TXA-22 (Authenticating Person/Time Stamp) contains a value

Route document to provider defined in TXA-22

Else If OBX-16 (Responsible Observer) contains a value

Route document to provider defined in OBX-16

Else If PV1-7 (Attending Doctor) contains a value

Route document to provider defined in PV1-7

Else If Logician Registration specifies a responsible provider

Route document to the patient’s responsible provider

Else

Issue an error indicating that the document is orphaned and require a user to specify aresponsible provider

The document is routed to the desktop of the assigned provider. For authenticated (signed)documents, the document is also routed to the desktop of the Authenticating Person from TXA-22.

This logic is only used to determine which field to use. It does not validate the data. If the value isfound to be invalid LinkLogic does not try to use the next field in the sequence shown above.

[7] TXA-5, Primary Activity Provider Code/Name, is populated with the name of the person thatauthenticated (signed) the document.

[8] TXA-8, Edit Date/Time, is populated with the document’s signature date/time.

[9] TXA-11, Transcriptionist Code/Name, is ignored because Logician’s data schema does not currentlysupport this information.

[10] TXA-12, Unique Document Number, is populated with the internal Logician document identifier(SDID).

[11] TXA-13, Parent Document Number, is interpreted as the internal Logician document identifier(SDID) assigned to the Logician document. Although the maximum length is defined to be 30characters in the HL7 specification, if a supplied value exceeds 16 characters it is ignored.

[12] TXA-15 component 1, the Entity Identifier component of the Filler Order Number, is interpreted asthe externally visible Doc ID assigned by Logician. Although the maximum length is defined to be22 characters in the HL7 specification, if a supplied value exceeds 8 characters, then this field isignored.

[13] If TXA-13, Parent Document Number, and TXA-15, Filler Order Number, are both specified andboth values are valid, then TXA-15 takes precedence over TXA-13.

Notes Interface Specification HL7 format

Version 5.5 18

[14] If TXA-15 or TXA-13 has a valid document ID that matches an existing Logician document, thenthe imported (child) document is associated with the existing Logician (parent) document. Thisfeature is only supported for transcribed notes and external attachments where the value of TXA-2 isTN, otherwise a warning is issued and the field is ignored.

If the imported document is successfully associated with a parent document, the child document iseither appended to the parent or embedded in the parent at a specific placeholder when the childdocument is signed in Logician. Prior to signing, the child document in Logician is listed as aseparate and unique document.

Embedding the document requires a Dictation Placeholder ID in OBX-4 (see note [10] for OBX-4).If OBX-4 is not specified or does not match the ID in the parent document, the child document isappended to the parent identified by TXA-13 or TXA-15.

Embedded documents are not automatically signed on import, even though TXA-17 (DocumentCompletion Status) is AU and the Logician Setup option Import Authenticated documents as Signedis checked. Instead, LinkLogic issues a warning message and imports the document as unsigned.

[15] If TXA-14, Placer Order Number, and TXA-17, Document Completion Status, are both specifiedand field 17 is either DO or AU, then the Logician order specified by the first component of TXA-14 is marked To Be Completed.

Use commas to separate multiple Logician order numbers in the first component of TXA-14. Allother components of TXA-14 are ignored.

Additionally, if TXA-17 is AU and TXA-22, Authentication Person and Time Stamp, contains validvalues, then the Logician order is automatically completed and the document is automaticallysigned. If the document is not automatically signed, then the orders are marked complete when thedocument is signed.

[16] TXA-14, Placer Order Number, is populated with the externally visible Doc ID assigned to thedocument. The visible Doc ID assigned by Logician is only guaranteed to be unique for the set ofdocuments associated with a specific patient.

[17] The supported values for Document Completion Status are shown below. Any other value generatesan error.

Value Definition

AU Authenticated (signed)To be considered Authenticated on import, TXA-22, Authentication Person and TimeStamp, must have a valid value.

DO Documented (complete but not signed)

IP PreliminaryWhen document overlay is enabled, this value is used to indicate that the document ispreliminary. Otherwise it is ignored.

For more information about document overlay, see the Guide to Document Overlay onwww.medicalogic.com. You’ll need the password that MedicaLogic issued to your organization.

Notes Interface Specification HL7 format

Version 5.5 19

[18] The supported values for Document Confidentiality Status include:

Value Definition

V or VR Very restricted

R or RE Restricted

U or UC Usual control (not sensitive or confidential)

The two character codes (VR, RE and UC) are accepted for backward compatibility only. Use thesingle character code.

If TXA-18 is V or R, the imported document’s status is set to the confidentiality type configured inLogician’s Change Confidentiality Import Options dialog box. If TXA-18 is U, the confidentialitytype is Normal.

If the imported document is a transcription that specifies a parent document (see note [14] above),the transcription inherits the confidentiality type of the parent when it is signed and merged.

[19] TXA-18 is set to one of the following confidentiality codes:

Value Definition

V Confidential documents (regardless of chart sensitivity)

R Non-confidential documents from sensitive chart

U Non-confidential documents from non-sensitive chart

[20] TXA-19, Document Availability Status is ignored. I t is assumed that an imported document’sAvailability Status is AV, Available for Patient Care. If the document is not authenticated (signed)on import, its content can change.

[21] TXA-19 is always set to AV. Only signed documents can be exported.

[22] TXA-22 is populated with the authentication person’s name and the date/time it was authenticated inthe following format: name^^^^^^^^^^^^^^ yyyymmddhhmmss.

[23] If document overlay is enabled, TXA-4 and TXA-12 are required. If either TXA-4 or TXA-12 is notprovided then the imported document is processed as if document overlay was not enabled.

For more information about document overlay, see the Guide to Document Overlay onwww.medicalogic.com. You’ll need the password that MedicaLogic issued to your organization.

[24] If document overlay is enabled and TXA-17 is IP (Preliminary), the document is consideredpreliminary. A preliminary document can not replace an existing final document in the Logiciandatabase.

[25] On import the value in TXA-16, Unique Document File Name, is stored in Logician as an externaldocument identifier. On export, TXA-16 contains the document’s external identifier, if one exists.

[26] The imported document is routed to the desktops of all Logician users specified in TXA-23,Distributed Copies. To use this field with a cross-reference file, use a tilde (~) delimiter to separatemultiple user names/IDs. For more information, see Appendix C. Cross-referencing field values onpage 27. Otherwise, you can use commas to separate Logician user IDs.

Notes Interface Specification HL7 format

Version 5.5 20

OBX – Observation/Result

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

OBX Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 10 SI Set ID - Observation Simple O [0] N

2 2 ID 0125 Value Type R [1] U [2]

3 590 CE Observation Identifier N [3] N

4 20 ST Observation Sub-ID O [10] N

5 65536 ST Observation Value R [4] U

6 60 CE Units N N

7 60 ST Reference Range N N

8 10 ID 0078 Abnormal Flags O [5] O

9 5 NM Probability N N

10 5 ID 0080 Nature of Abnormal Test N N

11 2 ID 0085 Observation Result Status N N

12 26 TS Date Last Obs Normal Values N N

13 20 ST User Defined Access Checks N N

14 26 TS Date/Time of the Observation O [6] O [7]

15 200 CE Producer’s ID N [8] N

16 80 XCN Responsible Observer O [9] O

17 60 CE Observation method N N

[0] Although this field is considered required or conditional in the HL7 specification, LinkLogic treatsthis field as optional.

[1] The supported values for Value Type are shown below. Any other value generates an error.

Value Definition

ST String data

TX Text data

FT Formatted data

[2] OBX-2 is always populated with ST.

Notes Interface Specification HL7 format

Version 5.5 21

[3] OBX-3 is only used if the Documents Interface is configured to allow external attachments. Referto the ImageLink Interface Specification for details on the use of this field.

[4] Although OBX-5, Observation Value, is considered conditional in the HL7 specification, LinkLogicrequires it.

Use multiple OBX segments to create larger documents (up to 256K). Multiple OBX messagesegments can be imported as individual documents, or concatenated together to produce a singledocument, depending on how the relationship is configured in Logician Setup.

Refer to the ImageLink Interface Specification for details on the use of this field for externalattachments.

[5] If OBX-8 has the value A, the document is directed to the appropriate responsible provider with anurgent status. All other values are ignored.

[6] LinkLogic uses the following logic to determine the document’s clinical date:

If OBX-14 (Observation Date/Time) contains a value

The document’s clinical date = OBX-14

Else If TXA-4 (Activity Date/Time) contains a value

The document’s clinical date = TXA-4

Else If TXA-6 (Origination Date/Time) contains a value

The document’s clinical date = TXA-6

Else If TXA-7 (Transcription Date/Time) contains a value

The document’s clinical date = TXA-7

Else

The document’s clinical date = MSH-7 (Message Date/Time)

[7] OBX-14, Observation Date/Time, is populated with the clinical date/time of the document.

[8] If specified OBX-15, Producer’s ID, is assumed to be the Transcriptionist Code/Name, and the valueoverrides the value specified in the TXA-11 (Transcriptionist Code). However, this field is ignoredbecause Logician’s data schema does not currently provide support for this information.

[9] See note [6] for TXA-5 to understand how this field is used to determine the responsible providerfor the document.

[10] If OBX-4, Observation Sub-ID, has a value, LinkLogic assumes it contains the DictationPlaceholder ID for embedded transcription or an external attachment. The placeholder is the locationin the parent document where the embedded text or external attachment from OBX-5 is placed.OBX-4 must be 8 characters or less.

The parent document ID must be in either TXA-13 or TXA-15. For embedded transcription, TXA-2must be TN. The value in OBX-4 must match the Dictation Placeholder ID in the parent documentor the imported (child) document is appended to the parent document instead of embedded in it. Thechild document is listed in Logician as a separate document until it is signed.

Notes Interface Specification HL7 format

Version 5.5 22

MSA – Message Acknowledgement

Legend R = RequiredO = OptionalC = ConditionalN = Not UsedU = Used

MSA Segment

Data HL7 Logician Applicability

Seq Length Type Table Element Name Import Export

1 2 ID 0008 Acknowledgment Code R [1] U

2 20 ST Message Control ID R U

3 80 ST Text Message O N

4 15 NM Expected Sequence Number N N

5 1 ID 0102 Delayed Ack Type N N

6 100 CE Error Condition N N

[1] The supported values for Acknowledgment Code include:

Value Description

AA Original mode: Application AcceptEnhanced mode: Application Acknowledgment: Accept

AR Original mode: Application RejectEnhanced mode: Application Acknowledgment: Reject

AE Original mode: Application ErrorEnhanced mode: Application acknowledgment: Error

Note. Receipt of either AR or AE initiate message re-send events.

Notes Interface Specification HL7 format

Version 5.5 23

Appendix A. Interpretation of HL7 Data Types

• LinkLogic doesn’t interpret or otherwise support check digit schemes employed within compounddata types.

• LinkLogic only interprets the first 20 characters of applicable TN (telephone number) data type fields.

• LinkLogic doesn’t support 8-bit ASCII character encoding.

• On export, LinkLogic may truncate values to abide by the HL7 specification (for example, PersonName fields).

• On import, the NULL string (“”) can be used to replace an existing string field with a NULL value.This only works for optional fields. Required fields treat NULL as invalid data.

• The NULL string (“”) is distinctly different from a string containing a space (“ ”). Fields containingquoted white space are treated as if they were blank. For required fields, this results in an error. Foroptional fields, the data is ignored.

ST (string), TX (text ) and FT (formatted text)

These data types are treated identically. Leading and trailing spaces are removed from each field. Onimport, Logician wraps the text between repeat delimiters (~) in order to fit the display window. Any linebeginning with a repeat delimiter will always start on a new line.

The following escape sequences are defined, where \ represents the escape delimiter defined in MSH:

\H\ “Start highlighting” is removed from the data. Text is not highlighted in theresulting document.

\N\ Normal text (end highlighting)

\F\ Field separator

\S\ Component separator

\T\ Subcomponent separator

\R\ Repetition separator

\E\ Escape character

\.br\ Line break

Notes Interface Specification HL7 format

Version 5.5 24

PN or XPN - Person name

Components:

<family name (ST)> ^ <given name (ST)> ^ <middle initial or name (ST)> ^<suffix (e.g., JR or III) (ST)> ^ <prefix (e.g., DR) (ST)> ^ <degree (e.g., MD) (ST)>

The Middle Initial or Name component is only used for patient data. In all other situations, it is ignored.The Prefix component is interpreted in Logician as the title. If both the Suffix and the Degree componentsare specified, the suffix appears first, followed by a comma and a space, then the degree.

For example:

Somerfield^Robin^^II^Dr.^MD

In Logician, this shows as Dr. Robin Somerfield II, MD.

CN or XCN - Composite ID number and name

Components:

<ID number (ST)> ^ <family name (ST)> ^ <given name (ST)> ^<middle initial or name (ST)> ^ <suffix (e.g., JR or III) (ST)> ^ <prefix (e.g., DR) (ST)> ^<degree (e.g., MD) (ST)> ^ <source table (IS)> ^ <assigning authority (HD)>

Only ID number, family name, given name and middle initial or name are used. All other components areignored.

When a field of this type refers to a Logician user (for example, PV1: Attending Doctor, OBX:Responsible Observer, SCH: Filler Contact Person) then the ID field is used and all other components areignored. The ID may be cross-referenced to a valid Logician user ID. If the ID is not supplied, then theentire field may be cross-referenced to a valid Logician user ID. For more information on cross-references, see Appendix C. Cross-referencing field values on page 27.

PPN – Performing person timestamp

Components:

<ID number (ST)> ^ <family name (ST)> ^ <given name (ST)> ^<middle initial or name (ST)> ^ <suffix (e.g., JR or III) (ST)> ^ <prefix (e.g., DR) (ST)> ^<degree (e.g., MD) (ST)> ^ <source table (IS)> ^ <assigning authority (HD)> ^<name type code (ID)> ^ <identifier check digit (ST)> ^<code identifying the check digit scheme employed (ID)> ^ <identifier type code (IS)> ^<assigning facility (HD)> ^ <date/time action performed (TS)>

Only the ID Number and Date/Time Action Performed are used. All other components are ignored. Thisdata type is the equivalent of an XCN, extended composite ID, data type joined with a TS, time stamp,data type.

Notes Interface Specification HL7 format

Version 5.5 25

Appendix B. Matching algorithms

This section includes the matching algorithms used by LinkLogic to determine how data is imported intoLogician.

Data-to-Patient matching algorithm

The following algorithm is used by LinkLogic to determine to which existing patient chart (if any)imported lab results should be associated. Name matches are case insensitive.

The specific behavior of this algorithm is dependent on how the options are set in Logician’s LinkLogicmodule. For specific information, refer to the footnotes in the algorithm.

If ExternalID-only matching is enabled

If there’s exactly one match wheresource data PatientID1 MATCHES an existing patient’s ExternalID2

Then A UNIQUE MATCH EXISTSupdate the patient’s information with the information in the import file

Else If the First Match Attempt for selective matching is enabled

If there’s exactly one match wheresource data PatientID1 MATCHES an existing patient's ExternalID2

AND (source data Birthdate [PID-7] MATCHES that patient’s BirthdateOR source data LastName [PID-5] MATCHES that patient’s LastName)

AND source data Location of Care3 MATCHES that patient’s Home Location

Then A UNIQUE MATCH EXISTSupdate the patient’s information with the information in the import file

Else If the Second Match Attempt for selective matching is enabled

If there’s exactly one match wheresource data SSN [PID-19] MATCHES an existing patient’s SSNAND source data BirthDate [PID-7] MATCHES that patient’s BirthDateAND source data LastName [PID-5, component 1] MATCHES that patient’s LastNameAND source data FirstName [PID-5, component 2] MATCHES that patient’s FirstNameAND source data Location of Care3 MATCHES that patient’s Home Location

Then A UNIQUE MATCH EXISTSupdate the patient’s information with the information in the import file

1 The Match Options dialog box can be used to configure which field to use for External ID matching, PID-2 orPID-3.2 Data-to-Patient matches can be performed using a specified External ID set or the Logician Patient ID setdepending on how LinkLogic task options are set up.3 The location of care match is only included if it’s been enabled through the Match Options dialog box. The sourcedata used in the location of care match is configurable (PV1-3, PV1-7, or the specified default) in the ChangeLocation of Care Options dialog box.

Notes Interface Specification HL7 format

Version 5.5 26

Else If the Third Match Attempt for selective matching is enabled

If there’s exactly one match wheresource data LastName [PID-5, component 1] MATCHES an existing patient’s LastNameAND source data FirstName [PID-5, component 2] MATCHES that patient’s FirstNameAND source data BirthDate [PID-7] MATCHES that patient’s BirthDateAND source data Sex MATCHES [PID-8] that patient’s Sex4

AND source data Location of Care5 MATCHES that patient’s Home Location

Then A UNIQUE MATCH EXISTSupdate the patient’s information with the information in the import file

Else NOT MATCHEDgenerate an error or create a new patient6

The following diagram is a graphical representation of the Data-to-Patient matching algorithm whenselective matching is enabled.

4 Because the Sex field is not required, the match against Sex is only performed if the source data sex field is non-NULL.5 The location of care match is only included if it’s been enabled through the Match Options dialog box. The sourcedata used in the location of care match is configurable (PV1-3, PV1-7, or the specified default) in the ChangeLocation of Care Options dialog box.6 When no patient is found for the data, LinkLogic does one of the following:

• Issues an error in the LinkLogic Activity Log and creates an exception file• Creates a new patient (only for a DemographicsLink or ScheduLink interface)

Notes Interface Specification HL7 format

Version 5.5 27

Appendix C. Cross-referencing field values

LinkLogic uses cross-reference files to translate data values in the import file to values Logicianrecognizes or to translate data values in the export file to values the external system can recognize. Forexample, many practice management systems use initials to designate care providers. If Logician isn’t setup to use initials as the user ID, you’ll need a cross-reference file. If you import laboratory results, youneed a cross-reference file to translate laboratory test result codes to Logician observation terms.

There are five types of cross-reference files:

• User names/IDs

• Locations of Care

• Lab Result Codes

• Appointment Books

• Appointment Types

The contents of Appointment Book and Appointment Type cross-reference files are case sensitive. Allother cross-reference file contents are case insensitive.

The source cross-reference file must be an ASCII file with the following format:

other_value,Logician_value

You must include the comma. There is no space before or after the comma. If either value contains acomma, use double quotes around the value:

“other, value”,Logician_value

Save the file with an .XRS extension to K:\LLOGIC\CONFIG\LOCAL, where K:\ is the network location of theLinkLogic directories. To configure and use the cross-reference file in Logician, see “Use cross-referencefiles” in Chapter 2 of Planning for Logician.

In addition to the five types of cross-reference files listed above, you can cross-reference many other HL7data fields; except those in the MSH segment. For example, you can cross-reference external documenttypes and ordering physician. Consult with your technical systems consultant to see if cross-referencingfor a particular data field is available for your version of Logician.

Tips

• Use the MedicaLogic Cross-Reference Editor to create and maintain cross-reference files forlaboratory results. This tool provides an easy way to match your laboratory result test codeswith Logician’s observation terms. For more information, see Using Cross-Reference Editor.

• If you need to add or change entries in the cross-reference file, change the source text file (thefile with the .XRS extension). Then remove and reconfigure the new cross-reference file. Formore information, see “Use cross-reference files” in Chapter 2 of Planning for Logician.

Notes Interface Specification HL7 format

Version 5.5 28

• If there are multiple entries for one Logician value, do not use the same cross-reference file forimport and export relationships. For example, if you have a user ID cross-reference file thathas many entries for hwinston, as in the following example, LinkLogic won’t know whichvalue to use when exporting data with hwinston.

CAR,credfernHSW,hwinstonHarry Winston,hwinstonHarry S. Winston,hwinstonRCJ,rjanoff

Cross-reference example

The following is an example of a cross-reference (.XRS) source file:

upin123,wklinkBartlett Carla,cbartlett

When the source file is configured in Logician, a cross-reference file is created with an .XRF extension.The following is an example of the cross-reference (.XRF) file:

H,xrf,Care Provider ID Conversion Cross Reference,1.0,19971114144908F,provider,CareProvider,OrderingProvider,AttendingDoctor,FillerContactPerson,PrimActivityProvider,Originator,AuthenticationPersonTimeStamp,transcriptionist,ResponsibleObserver,DocAuthenticatorIX,upin123,wklinkIX,Bartlett Carla,cbartlett

When the source data in a user ID field is like the following example, the field aliases to wklink.

upin123^Klink^Wilhelm^C.

Likewise, when the source data in a user ID field is like the following example, the field aliases tocbartlet.

^Bartlett^Carla

Notes Interface Specification HL7 format

Version 5.5 29

Appendix D. Data exchange protocols

Data is exchanged between Logician and an external system using the local file system and the LinkLogicdirectory structure.

LinkLogic directory structure

The top LinkLogic directory is LLOGIC. It contains subdirectories to hold configuration, data, and errorfiles. The LLOGIC directory is typically located on the network as a shared resource and is defined duringLogician’s installation and setup. For more information about multiple Data Transfer Station’s and thechanges to the directory structure, see Planning for Logician.

For performance reasons, the LLOGIC directory should not be located on the Logician database server.

llogic

datainoutdemotutorial

error

configlocalstandardupgrade

kits

macros

save

Data files to be imported into Logician's database must be placed in the inbox sub-directory\LLOGIC\DATA\IN. Data files in this sub-directory are typed by their filename extensions as shown in thefollowing table. A data file’s full filename must be unique among all files found within the directory.

Interface Format Import Export

HL7 .hd .hdDemographicsLink

MLI∗ .ad

HL7 .ht .htNotesLink

MLI∗ .ot

HL7 .hr .hrLabLink

ASTM .lr

ScheduLink HL7 .sl

∗ This format is no longer supported.

Notes Interface Specification HL7 format

Version 5.5 30

Interface Format Import Export

ImageLink HL7 .ht

AllergiesLink HL7 .ha

Clinical Summary HL7 .hc

ProceduresLink HL7 .hp

ProblemsLink HL7 .hb

When exporting information, LinkLogic creates files of appropriate types in the outbox sub-directory\LLOGIC\DATA\OUT.

Sample data files used for demonstration and testing purposes reside within the sub-directory\LLOGIC\DATA\DEMO. Tutorial files used for Learning LinkLogic are in the sub-directory\LLOGIC\DATA\TUTORIAL.

Exception files produced by LinkLogic as a by-product of import or export activities reside within thesub-directory \LLOGIC\ERROR.

LinkLogic configuration files reside within the sub-directory \LLOGIC\CONFIG. Those provided byMedicaLogic exist within the sub-directory \LLOGIC\CONFIG\STANDARD; those specific to a givenLogician installation reside within the sub-directory \LLOGIC\CONFIG\LOCAL.

The KITS sub-directory contains the laboratory results interface kits that are used for importing lab results.

The MACRO sub-directory has the NotesLink macros transcriptionists can use to create error-freeNotesLink import files.

The SAVE sub-directory is available for storing import files after they have been imported or export filesafter they have been transferred. Transferring files to \LLOGIC\SAVE is set up in Logician.

Data transfer and reporting

LinkLogic’s Data Transfer Station (DTS) regularly polls the inbox for the existence of new files. Thecontent of each file is interpreted, based upon the file’s extension, and appropriately imported into thedatabase. Files with a “q” at the end of the file extension have been queued by the DTS and are waitingfor LinkLogic to process the file.

If an error is encountered while attempting to import the data, then an exception file is created in theERROR directory. Enterprise or clinic staff must address these exceptions. The list of pending exceptionscan be viewed at any time in the LinkLogic module’s Errors tab.

Appropriate entries are added to LinkLogic’s Activity Log as LinkLogic attempts to import, export,and/or transfer information. This activity log is not a file; it is contained in Logician’s database and canbe viewed at any time in the LinkLogic module’s Activity Log tab. The log shows what import, export,and/or transfer operations were performed during any given time period and the success or failure statusof each attempted operation.