Skip to main content

Transforming Data

HealthShare Message Transformation Services can transform a subset of the message types defined in the HL7 Messaging Standard Version 2.5.1 (HL7v2) into FHIR R4 resources. To initiate a transformation, you provide the services with messages of supported types in character-delimited files. Each file may contain one or more messages and may have any extension.

The following sections describe the supported message types, how to initiate a transformation in more detail, and where to review the mapping between the input and output.

HL7 Message Validation and Transformation

HealthShare Message Transformation Services utilize the capabilities of other InterSystems technologies to validate HL7 messages.

The services ingest the HL7 message (located in an Amazon S3 bucket) using an S3 adapter. HealthShare Message Transformation Services then review MSH.9, the Message Type Field, and apply a schema for HL7 version 2.5.1. This allows the services to create an HL7 virtual document and perform the data transformation upon that virtual document, outputting FHIR R4 resources.

Unsupported HL7 Segments and Fields” describes how HealthShare Message Transformation Services handles unsupported fields and segments. If the services are unable to parse an HL7 message, they write to the error log describing how the mapping failed; View the Error Logs describes how to review this information.

For more details about how HealthShare Message Transformation Services performs this transformation, see Routing HL7 Version 2 Messages in ProductionsOpens in a new tab and Data Transformations in InterSystems Healthcare ProductsOpens in a new tab.

Supported HL7 Version 2 Message Types

The HL7 version 2 standard defines a range of message types and trigger events. A message type specifies the type of information contained in an HL7v2 message and is represented by a three-letter code. For example, the code ADT is used for admit, discharge, and transfer messages. A trigger event is a real-world event that triggers the transmission of a message and is represented by a three-digit alphanumeric code appended to a message type code. For example, the code ADT-A01 is used for patient admit messages, while the code ADT-A02 is used for patient transfer messages.

HealthShare Message Transformation Services can transform a subset of the message types and trigger events defined by the HL7v2 standard. “Unsupported HL7 Segments and Fields” describes how unsupported message types are handled.

The services can transform the following messages:

ADT

ADT_A01, ADT_A02, ADT_A03, ADT_A04, ADT_A05, ADT_A06, ADT_A07, ADT_A08, ADT_A09, ADT_A10, ADT_A11, ADT_A12, ADT_A13, ADT_A14, ADT_A16, ADT_A17, ADT_A18, ADT_A22, ADT_A23, ADT_A25, ADT_A26, ADT_A27, ADT_A28, ADT_A29, ADT_A30, ADT_A31, ADT_A32, ADT_A33, ADT_A34, ADT_A35, ADT_A36, ADT_A39, ADT_A40, ADT_A41, ADT_A42, ADT_A44, ADT_A45, ADT_A46, ADT_A47, ADT_A48, ADT_A49, ADT_A50, ADT_A51, ADT_A53, ADT_A55, ADT_A60, ADT_A62

BAR

BAR_P12

CRM

CRM_C01, CRM_C02, CRM_C03, CRM_C04, CRM_C05, CRM_C06, CRM_C07, CRM_C08

CSU

CSU_C10, CSU_C11, CSU_C12

LSR

LSR_U13

MDM

MDM_T02, MDM_T03, MDM_T04, MDM_T05, MDM_T06, MDM_T07, MDM_T08, MDM_T09, MDM_T10, MDM_T11

MFK

MFK_M02, MFK_M03, MFK_M04, MFK_M05, MFK_M06, MFK_M07, MFK_M08, MFK_M09, MFK_M10, MFK_M11, MFK_M12, MFK_M13, MFK_M14, MFK_M15

MFN

MFN_M14

MFQ

MFQ_M01, MFQ_M02, MFQ_M03, MFQ_M04, MFQ_M05, MFQ_M06, MFQ_M07, MFQ_M08, MFQ_M09, MFQ_M10, MFQ_M11, MFQ_M12, MFQ_M13, MFQ_M14

MFR

MFR_M02, MFR_M03, MFR_M08, MFR_M09, MFR_M10, MFR_M11, MFR_M12, MFR_M13, MFR_M14

NUL

NUL_RAR, NUL_RDR, NUL_RER, NUL_RGR, NUL_ROR

OMP

OMP_O09

ORM

ORM_O01

ORU

ORU_R01, ORU_R31, ORU_R32

PEX

PEX_P08

PGL

PGL_PC7, PGL_PC8

PMU

PMU_B02, PMU_B05, PMU_B06

PPG

PPG_PCH, PPG_PCJ

PPP

PPP_PCC, PPP_PCD

PPR

PPR_PC1, PPR_PC2, PPR_PC3

QBP

QBP_Q22, QBP_Q23, QBP_Q24, QBP_Q25, QBP_Q31, QBP_Z75, QBP_Z77, QBP_Z79, QBP_Z81, QBP_Z85, QBP_Z87, QBP_Z89, QBP_Z91, QBP_Z93, QBP_Z95, QBP_Z97, QBP_Z99

QRY

QRY_PC9, QRY_PCE, QRY_PCK, QRY_Q02, QRY_Q26, QRY_Q27, QRY_Q28, QRY_Q29, QRY_Q30, QRY_T12

QSB

QSB_Z83

QSX

QSX_J02

RDE

RDE_O11, RDE__O25

RDY

RDY_Z80, RDY_Z98

REF

REF_I13, REF_I14, REF_I15

RPA

RPA_I09, RPA_I10, RPA_I11

RQA

RQA_I09, RQA_I10, RQA_I11

RQC

RQC_I06

RQI

RQI_I02, RQI_I03

RRE

RRE_O26

RRI

RRI_I13, RRI_I14, RRI_I15

RSP

RSP_K24, RSP_Z84

RTB

RTB_Z76, RTB_Z78, RTB_Z92, RTB_Z94, RTB_Z96

SIU

SIU_S12, SIU_S13, SIU_S14, SIU_S15, SIU_S16, SIU_S17, SIU_S18, SIU_S19, SIU_S20, SIU_S21, SIU_S22, SIU_S23, SIU_S24, SIU_S26

SRM

SRM_S02, SRM_S03, SRM_S04, SRM_S05, SRM_S06, SRM_S07, SRM_S08, SRM_S09, SRM_S10, SRM_S11

SRR

SRR_S02, SRR_S03, SRR_S04, SRR_S05, SRR_S06, SRR_S07, SRR_S08, SRR_S09, SRR_S10, SRR_S11

TCR

TCR_U11

Unsupported HL7 Segments and Fields

When an unsupported HL7 segment or field is detected, HealthShare Message Transformation Services map the information to a DocumentReference FHIR resource. This behavior provides the following benefits:

  • HealtShare Message Transformation Services preserve the full clinical information from the original HL7 message in the corresponding FHIR resources.

  • Amazon HealthLake automatically integrates with natural language processing for the DocumentReference resource type.

The DocumentReference resource contains separate categories for different HL7 segments, which are described in the following table. Custom segments, known as Z segments, are sorted into the ZZ category of the DocumentReference resource.

HL7 Segment DocumentReference Category
AL1 ALL — Allergy Information
AIL, AIP, AIS, SCH APT — Appointment Information
DG1 DIA — Diagnosis Information
PV1, PV2 ENC — Encounter Information
GT1, IN1 INS — Insurance Information
OBR, OBX OBS — Observation/Result Information
ORC ORD — Order Information
NK1, PID PAT — Patient Information
XA, RXO, TQ1 PHA — Pharmacy Information
PR1 PRC — Procedure Information
All other segments ZZ — General Information

About FHIR Resources

FHIR is the acronym for “Fast Healthcare Interoperability Resources.” Developed by the HL7 organization, FHIR has become widely accepted as the next-generation standard for sharing health information across systems and organizations. FHIR solutions are built from a set of modular components called “Resources” (such as encounter, patients, observation, medications, and so on). These resources can easily be assembled into working systems that solve real world clinical and administrative problems at a fraction of the price of existing alternatives.

The output of HealthShare Message Transformation Services is FHIR R4.

Transform a Message

After you create a transformation pipeline, you can use the pipeline to transform data by performing the following steps:

  1. Ensure that the status of the transformation pipeline is Live.

    You can determine the status of a pipeline on the HealthShare Message Transformation Services home page.

  2. Upload a character-delimited text file containing the health care data you wish to transform to the pipeline input location.

    The file may have any extension.

    The services process the file, write any errors to error logs, and send a request to the target location to create the corresponding FHIR R4 resources.

Review the Mapping

Because it may be important for you to understand how HealthShare Message Transformation Services map the input data to FHIR R4 resources, the services enable you to download a document that outlines the mappings. To download and review the document, perform the following steps:

  1. In the HealthShare Message Transformation Services menu, click Field Mapping Reference.

    Your browser downloads the file.

  2. Open the downloaded file, and locate a row of interest.

    Each row contains data in the following columns:

    MessageType

    Supported HL7v2 message type

    Segment

    Supported HL7v2 segment for the corresponding message type

    Field

    Supported HL7v2 field for the corresponding segment

    Field Description

    Description of the corresponding field

    FHIR XPath

    XPath for the FHIR resource that the field maps to.

FeedbackOpens in a new tab