HL7 Validator and Parser RESTful API

Convert HL7v2 messages to a JSON format. Do not include any PHI or sensitive information in the HL7 message unless you trust the host in the URL. Here is an example using curl

API Request

         curl -X POST https://hdu.cdcmeta.com/labcheck/api/ -F "hl7_file=@path_to_your_hl7_file.hl7"
    

API Request Example Successful Response:


{
  "message": {
    "msg_type": "ADT",
    "sub_msg_type": "A01",
    "msg_description": "Admit/visit notification",
    "id": "934576120110613083617",
    "from_system": "SENDING_APPLICATION",
    "from_location": "SENDING_FACILITY",
    "to_system": "RECEIVING_APPLICATION",
    "to_location": "RECEIVING_FACILITY",
    "timestamp": "20110613083617"
  },
  "patient_identity": {
    "sub": "135769",
    "given_name": "MICKEY",
    "family_name": "MOUSE",
    "phone_number": "(407)939-1289",
    "language": "",
    "birthdate": "19281118",
    "address": [
      {
        "formatted": "123 Main St.  Lake Buena Vista FL 32830",
        "street_address": "123 Main St.",
        "locality": "Lake Buena Vista",
        "region": "FL",
        "postal_code": "32830"
      }
    ],
    "document": [
      {
        "number": "135769"
      },
      {
        "number": "99999999",
        "issuer": "Social Security Administration (SSA)",
        "issuer_meta": [
          {
            "name": "ssn",
            "verbose_name": "Social Secuirity Number"
          }
        ]
      }
    ]
  },
  "event_type": {
    "event_type_code": "A01",
    "recorded_date_time": "20110613083617",
    "date_time_planned_event": "",
    "event_reason_code": "",
    "operator_id": ""
  },
  "patient_visit": {
    "set_id": "1",
    "patient_class": "O",
    "assigned_patient_location": "",
    "admission_type": "",
    "preadmit_number": "",
    "prior_patient_location": ""
  }
}

API Request Example Error Response

{
  "hl7_input": "FMSH|^~\\&|SENDING_APPLICATION|SENDING_FACILITY|RECEIVING_APPLICATION|RECEIVING_FACILITY|20110613083617||ADT^A01|934576120110613083617|P|2.3||||\nEVN|A01|20110613083617|||\nPID|1||135769||MOUSE^MICKEY^||19281118|M|||123 Main St.^^Lake Buena Vista^FL^32830||(407)939-1289^^^theMainMouse@disney.com|||||1719|99999999||||||||||||||||||||\nPV1|1|O|||||^^^^^^^^|^^^^^^^^",
  "error": "Invalid HL7 message."
}