Matching Event Data to Patients

Webhook events don't contain protected health information (PHI). This guide will show you how to match event data to patients.

In an effort to secure protected health information (PHI), Honeybee Health's Partner API does not include PHI in webhook events. Typically there are 2 ways to match event data to patients in your system.

The first, is to include your EHR's patient ID in the ePrescription's patient segment. This is typically located at NewRx.Patient.HumanPatient.Identification.MedicalRecordIdentificationNumberEHR. This is the preferred method as it is the most reliable, however, many prescribing tools, such as DoseSpot, do not support this field.

When we receive an ePrescription with no data in the MedicalRecordIdentificationNumberEHR field, we will generate a unique patient ID, which will be included in the initial webhook event; RX_RECEIVED. This ID will also be included in all subsequent events for that patient.

The second method is to make a request to the GET /patients/{patient_id} endpoint, which will return the patient's data from which you can use 1 or more fields to match patients in your system. If we received an email in the ePrescription (more below), it can solely be used to match one of your patients. If we did not receive an email, you can use the patient's first_name, last_name and dob as matching criteria; this is less reliable and has the potential to match multiple patients in your system depending on the size of your patient population.

Including Email in ePrescriptions

Honeybee Health's Partner API prefers the inclusion of email addresses in ePrescriptions. We use the email as a primary identifier for patients and it allows matching patients to your system more reliably. Most EHRs and ePrescribing tools support the inclusion of email addresses in a dedicated field. On the most widely supported NCPDP standard, this is located at NewRx.Patient.HumanPatient.CommunicationNumbers.ElectronicMail.

Some older ePrescribing tools do not support this field, in which case, you can include the email in the Notes to Pharmacy or Address Line 2 fields as a workaround. Our system will parse the email from these fields and it will be returned in the GET /patients/{patient_id} endpoint.

Patient Matching Example

In this example, we will show you how to match a patient to your system using the patient's first_name, last_name and dob.

  1. You received an RX_RECEIVED event which includes patient_id: "ay87nt". e.g.

    {
        "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
        "patient_id": "ay87nt",
        "event_type": "RX_RECEIVED",
        "medication_requests": [
            {
                "id": 183601,
                "prescription_id": 183601,
                "active": true,
                "prescriber_name": "Jane Smith",
                "receive_date": "2019-09-14T13:17:54.906-07:00",
                "drug_name": "IBUPROFEN 800 MG TABLET",
                "ndc": "67877032105",
                "sig_text": "Take 2 tablets by mouth every 8 hours as needed for pain/discomfort.",
                "written_qty": 90,
                "refills_left": 2,
                "expire_date": "2020-09-13T17:00:00.000-07:00",
                "drug_schedule": "0"
            }
        ]
    }
    
  2. Make a request to the GET /patients/{patient_id} endpoint, which returns the patient's data. e.g.

    {
        "patient_id": "ay87nt",
        "first_name": "Anthony",
        "last_name": "Stark",
        "dob": "1970-05-29",
        "gender": "M",
        "email": "tony@starkindustries.com",
        "phone": "212-970-4133",
        "patient_safety": {
            "health_conditions": [],
            "medications": [],
            "allergies": []
        }
    }
    
  3. One 1 or more data points to match the patient in your system. In this example, we will use the patient's first_name, last_name and dob. e.g.

    {
        "first_name": "Anthony",
        "last_name": "Stark",
        "dob": "1970-05-29"
    }