Convert HL V2.x MFN, PPP, REF, SIU, and VXU message to FHIR

In our previous posts, we described the conversions between HL7 2.x ADT and ORU messages and FHIR STU3. This blog post explains how we convert other HL7 2.x messages to FHIR STU3 (3.0.1).  These “other” messages include the following:

  • MFN: master file – staff practitioner
  • PPP: patient pathway
  • REF: patient reference
  • SIU: scheduling information unsolicited
  • VXU: unsolicited vaccination record update

Below is a table that shows the mappings between the above HL7 2.x messages and all possible FHIR resources. Note that the section number can be changed in a different release.

HL7 2.x Message Type FHIR Resource URL Section
MFN Practitioner http://hl7.org/fhir/stu3/practitioner-mappings.html 8.4.9.2
PPP Patient http://hl7.org/fhir/stu3/patient-mappings.html 8.1.14.4
Condition http://hl7.org/fhir/stu3/condition-mappings.html 9.2.7.4
REF Patient http://hl7.org/fhir/stu3/patient-mappings.html 8.1.14.4
SIU Appointment http://hl7.org/fhir/stu3/appointment-mappings.html 12.10.9.2
Patient http://hl7.org/fhir/stu3/patient-mappings.html 8.1.14.4
VXU Patient http://hl7.org/fhir/stu3/patient-mappings.html 8.1.14.4
Immunization http://hl7.org/fhir/stu3/immunization-mappings.html 11.6.7.3
ImmunizationRecommendation http://hl7.org/fhir/stu3/immunizationrecommendation-mappings.html 11.7.7.2
MedicationAdministration http://hl7.org/fhir/stu3/medicationadministration-mappings.html 11.2.8.2

 

Some of the notes about this conversion:

  • Validates the input file. Only the file is validated, the file will be converted.
  • Generates FHIR in json format
  • Uses “bundle” as an FHIR resourceType
  • Uses “transaction” as type
  • Uses uuid for the “id” in each resource
  • Uses “urn:redix-fhir” for the identifier.system
  • Uses “PUT” method in the “request” collection. To make sure that the patient data is unique in the FHIR data server, “ifNoneExist” method is used.

You can test the conversion by going to Redix HIPAA Compliance and Conversions, and then select a file of the supported message type from your system by pressing the “Select File” button. After a file is selected, your file will be automatically converted to an FHIR message, providing the file is a valid HL7 2.x file. You will see the message type and the version number of your HL7 file. In the following example, it is SIU and V2.4, respectively.

After the conversion, you might want to upload the FHIR JSON message to your FHIR data server. The default FHIR data server is HAPI, http://fhirtest.uhn.ca/. You can press the button “Upload to FHIR Data Server” to upload your FHIR resources to the FHIR data server.

You can, of course, use your own FHIR data server. To do so, you will need to first signup and then define your data server as a default FHIR data server.

Example

Use the following SIU file as an example:

MSH|^~\&|app|sender|HL7API|PKB|201303080949||SIU^S12|ABC0000000001|P|2.4
SCH|ID123||||||^checkup^||||^^^201411201231^201411201232|||||||||||||||
NTE|||My comment|
PID|||5555555555^^^NHS^NH||Smith^John^Joe^^Mr||19700101|M|||My flat name^1, The Road^London^London^SW1A 1AA^GBR||john.smith@hotmail.com^NET~01234567890^PRN~07123456789^PRS|john.smith@company.com^NET~01234098765^WPN||||||||||||||||N|
PV1|||^^^^^^^^health centre

The above ADT message is converted to the following FHIR message in JSON, which includes three resources: Patient and Appointment.

{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "resource": {
        "resourceType": "Appointment",
        "id": "3AE29201-9255-442C-986D-104E2D261444",
        "identifier": [
          {
            "system": "urn:redix-fhir",
            "value": "ID123.2014-11-20T12:31:00.2014-11-20T12:32:00"
          },
          {
            "system": "urn:originator",
            "value": "ID123"
          }
        ],
        "appointmentType": {
          "coding": [
            {
              "system": "http://example.org/appointment-type",
              "code": "checkup"
            }
          ]
        },
        "description": "My comment",
        "participant": [
          {
            "actor": {
              "reference": "Patient/3AE29223-9255-442C-986D-115E2D260101"
            }
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "appointment?identifier=redix-fhir|ID123.2014-11-20T12:31:00.2014-11-20T12:32:00"
      }
    },
    {
      "resource": {
        "resourceType": "Patient",
        "id": "67713845-5E10-4E45-9FF4-1409BEB75540",
        "identifier": [
          {
            "system": "urn:redix-fhir",
            "value": "Smith.John.male"
          },
          {
            "system": "submit_mrn",
            "value": "5555555555"
          }
        ],
        "name": [
          {
            "use": "official",
            "family": "Smith",
            "given": [
              "John"
            ],
            "suffix": "Mr"
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "john.smith@hotmail.com",
            "use": "home"
          },
          {
            "system": "phone",
            "value": "john.smith@company.com",
            "use": "work"
          }
        ],
        "gender": "male",
        "birthDate": "1970-01-01",
        "deceasedBoolean": "false",
        "address": [
          {
            "use": "home",
            "line": "My flat name 1, The Road",
            "city": "London",
            "state": "London",
            "postalCode": "SW1A 1AA"
          }
        ],
        "link": [
          {
            "other": "5555555555"
          }
        ]
      },
      "request": {
        "method": "PUT",
        "url": "Patient?family=Smith&given=John&gender=male",
        "ifNoneExist": "identifier=redix-fhir|Smith.John.male"
      }
    }
  ]
}

Contact Us

We can help you to develop conversions for messages besides ADT, ORU, MFN, PPP, SIU, REF, and VXU. Feel free to reach out or connect with me at @redixfhir. We are sure that we help you to develop a conversion tool that will satisfy your requirements.