NAV
json

Patient Data Exchange API

This outlines the API to send PioneerRx patient data to vendor system for onboarding as well as updates and to receive data from vendor system to update PioneerRx patients.

Technology partners can implement web methods as described below for PioneerRx to consume.

Change Log

Version Date Change Comments
2.2 02/15/2017 Created API Document for New Format
2.2 04/05/2017 Added field “mpr” to Prescription Data Definition

Communication

The api will use HTTPS Web Services to communicate between the 2 systems. Insecure http traffic will not be allowed.

We will use “application/json; charset=utf-8” for the ContentType Header.

When we receive a Http Status Code of 200, we will treat the response as successful and everything else will be treated as an error or failure.

Endpoints

PioneerRx will connect to an endpoint for each api call with each endpoint having the same base url.

Examples:
https://mydomain.com/api/CreatePatient
https://mydomain.com/api/UpdatePatient
https://mydomain.com/api/GetPatient
https://mydomain.com/api/GetUnmatchedPatients

Authentication

PioneerRx supports the following methods for authentication for this service:

username (basic auth)
password (basic auth)
ApplicationKey(header)
LocationKey(header)

Data Definitions

Insurance

Field Name Data Type Always Present Description
insurance_id CHAR(36) Guid/Uniqueidentifier
insurance_name VARCHAR(100)
bin VARCHAR(50)
cardholder_id VARCHAR(50) Policy Number
group_number VARCHAR(50)
pcn VARCHAR(50)
payer_type INT

1: Cash
2: Medicaid
3: Commercial (Third Party)
4: Medicare
5: Other

coverage_type INT

1: Medical Coverage
2: Pharmaceutical Coverage
3: Patient Assistance (Free-drug) Program

Prescriber

Field Name Data Type Always Present Description
prescriber_id CHAR(36) Guid/Uniqueidentifier
dea_number VARCHAR(9)
npi_number VARCHAR(50)
specialty VARCHAR(100)
first_name VARCHAR(50)
last_name VARCHAR(50)
phone_number VARCHAR(15)
fax_number VARCHAR(15)
address_line_1 VARCHAR(200)
address_line_2 VARCHAR(200)
city VARCHAR(40)
state CHAR(2)
zip_code VARCHAR(15)

Prescription

Field Name Data Type Always Present Description
rx_number INT
refill_number INT
date_written Date Format: yyyyMMdd
date_filled Date Format: yyyyMMdd
amount_paid MONEY
number_of_refills_allowed INT Authorized Number of Fills
number_of_refills_remaining INT
directions_translated VARCHAR(MAX)
prescriber_id CHAR(36)

Prescriber Id associated with rx

Ties prescription to prescriber information from prescriber collection

Guid/Uniqueidentifier

prescribed_name VARCHAR(100)
prescribed_ndc VARCHAR(20)
prescribed_qty DECIMAL(15, 5)
dispensed_name VARCHAR(100)
dispensed_ndc VARCHAR(20)
dispensed_qty DECIMAL(15, 5)
dispensed_acquisition_cost MONEY
mpr DECIMAL(18, 6) Medication Possession Ratio
lot_number VARCHAR(50)
icd10_code VARCHAR(20) Primary ICD10 code on Rx
icd10_text VARCHAR(200) Primary ICD10 text
lot_expiration_date Date Format: yyyyMMdd
primary_insurance_id CHAR(36)

Ties prescription to primary insurance information

Guid/Uniqueidentifier

secondary_insurance_id CHAR(36)

Ties prescription to secondary insurance information

Guid/Uniqueidentifier

tertiary_insurance_id CHAR(36)

Ties prescription to tertiary insurance information

Guid/Uniqueidentifier

primary_amount_paid MONEY
secondary_amount_paid MONEY
tertiary_amount_paid MONEY
workflow_status_code INT

1: Waiting for Data Entry
2: Waiting for Pre-check
3: Waiting for Fill
4: Waiting for Check
5: To Be Put in Bin
6: Waiting for Pick up
7: Waiting for Delivery
8: Waiting to Transmit
9: Reject Third Party
10: Completed
11: Out for Delivery
12: Reversed
13: Reject Secondary Third Party
14: Reject Profit
15: Reversed Secondary
16: Cancelled
17: Waiting for Print

workflow_status_text VARCHAR(50)

Patient

Field Name Data Type Always Present Description
external_patient_id VARCHAR(36) Patient ID in vendor system or mutual identifier assigned by vendor
pioneerrx_patient_id CHAR(36) Y

PioneerRx Patient ID

Guid/Uniqueidentifier

legacy_id VARCHAR(50) Patient ID from legacy pharmacy system
pharmacy_id VARCHAR(30)
pharmacy_id_type INT 1: NPI, 2: NCPDP
first_name VARCHAR(50)
middle_name VARCHAR(30)
last_name VARCHAR(50) Y
gender CHAR(1)

M,F,U
U = Unknown

birth_date Date Format: yyyyMMdd
weight_oz INT
height_in INT
race INT

0: Not Specified
1: Caucasian
2: African American
3: Hispanic
4: Asian
5: American Indian
6: Pacific Islander
7: Other
8: Animal

ssn_last_four CHAR(4)
email VARCHAR(255)
primary_phone VARCHAR(15)
address_line_1 VARCHAR(200)
address_line_2 VARCHAR(200)
city VARCHAR(40)
state CHAR(2)
zip_code VARCHAR(15)
diagnosis_code VARCHAR(20) Future Support Diagnosis ICD10 Code
diagnosis_text VARCHAR(500) Diagnosis Code Text
disease_group INT
allergies VARCHAR(MAX) Concatenated list of allergies
primary_prescriber_id CHAR(36)

Ties patient to primary prescriber information from prescriber collection

Guid/Uniqueidentifier

profile_url VARCHAR(500) URL to link to patient’s profile in vendor system
created_on VARCHAR(50)

Date patient is created in vnedor system

Format:
yyyy-mm-ddThh:mi:ss.mmmZ

Example:
2016-03-15T14:27:01.093Z

status INT

Active status in vendor system

0: Disabled
1: Enabled

status_changed_date Date

Date patient’s status was changed in vendor system

Format: yyyyMMdd

insurances Insurance Array Array of Insurance Objects
prescribers Prescriber Array Array of Prescriber Objects
prescriptions Prescription Array Array of Prescription Objects

CreatePatient Request

Field Name Data Type Always Present Description
N/A Patient Y Serialization of Patient object

UpdatePatient Request

Field Name Data Type Always Present Description
N/A Patient Y Serialization of Patient object

GetPatient Request

Field Name Data Type Always Present Description
pharmacy_id VARCHAR(30)
pharmacy_id_type INT 1: NPI, 2: NCPDP
external_patient_id VARCHAR(36) Patient ID in vendor system or mutual identifier assigned by vendor
pioneerrx_patient_id CHAR(36) Y

PioneerRx Patient ID

Guid/Uniqueidentifier

GetUnmatchedPatients Request

Field Name Data Type Always Present Description
pharmacy_id VARCHAR(30)
pharmacy_id_type INT 1: NPI, 2: NCPDP

Response

Field Name Data Type Required Description
success INT Y

0: api action not successful
1: api action successful

error_message VARCHAR(MAX) When success = 0 displayed to user
debug_message VARCHAR(MAX) When success = 0 logged message (provide any identifying info if possible)
error_code VARCHAR(MAX)

01: Username/Password is incorrect
02: Patient does not exist in vendor system

results Patient/Patient Array When success = 1 Data Type will be a Patient list for GetUnmatchedPatients and a Patient for other API calls

Patient Profile URL

We recommend returning an endpoint for patient profile in vendor system (See Patient data field profile_url).

Example:
https://www.mydomain.com/api/ViewProfile?pharmacy_id=1174570840&pharmacy_id_type=1&external_patient_id=TestID

We have an extension to this api for token based single sign on for viewing the profile_url. Please visit http://www.pioneerrx.com/apidoc/PatientDataExchangeProfileSSO for this api document.

API Actions

CreatePatient

Add a patient to vendor system

Example Request

CreatePatient Request

{
    "external_patient_id": "TestID",
    "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625",
    "legacy_id": "1122",
    "pharmacy_id": "1174570840",
    "pharmacy_id_type": 1,
    "first_name": "John",
    "last_name": "Doe",
    "gender": "M",
    "birth_date": "19800101",
    "primary_phone": "5551112222",
    "address_line_1": "123 Main St.",
    "city": "Shreveport",
    "state": "LA",
    "zip_code": "71115",
    "primary_prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
    "insurances": [{
        "insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "insurance_name": "BC/BS Federal Employees",
        "bin": "610239",
        "cardholder_id": "R50622932",
        "group_number": "65006500",
        "pcn": "FEPRX",
        "payer_type": 3,
        "coverage_type": 1
    },
    {
        "insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "insurance_name": "Cigna",
        "bin": "017010",
        "cardholder_id": "10198667103",
        "group_number": "00608630",
        "payer_type": 3,
        "coverage_type": 1
    },
    {
        "insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "insurance_name": "North Carolina Medicaid",
        "bin": "610242",
        "cardholder_id": "938801283N",
        "group_number": "MAAQ",
        "payer_type": 2,
        "coverage_type": 1
    }],
    "prescribers": [{
        "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
        "dea_number": "AD2123824",
        "npi_number": "1611123525",
        "specialty": "Physician Assistant",
        "first_name": "James",
        "last_name": "Bond",
        "phone_number": "3184445555",
        "fax_number": "3185556666",
        "address_line_1": "12 abc St. ",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115"
    },
    {
        "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
        "dea_number": "MM1219319",
        "npi_number": "1601843708",
        "specialty": "Family Medicine",
        "first_name": "Jane",
        "last_name": "Bond",
        "phone_number": "3187775555",
        "fax_number": "3189993333",
        "address_line_1": "34 def St. ",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115"
    }],
    "prescriptions": [{
        "rx_number": 7324683,
        "refill_number": 0,
        "date_written": "20100405",
        "date_filled": "20100405",
        "amount_paid": 2.8000,
        "number_of_refills_allowed": 2,
        "number_of_refills_remaining": 2,
        "directions_translated": "TAKE ONE CAPSULE BY MOUTH TWO TIMES EACH DAY.",
        "prescriber_id": " A4DDA117-83ED-4D70-A814-001ED72B8EAB ",
        "prescribed_name": "Neurontin 300mg Capsule",
        "prescribed_ndc": "00071080524",
        "prescribed_qty": 10.00000,
        "dispensed_name": "Gabapentin 300 Mg Capsule",
        "dispensed_ndc": "59762502701",
        "dispensed_qty": 10.00000,
        "icd10_code": "G40",
        "icd10_text": "Epilepsy and recurrent seizures",
        "dispensed_acquisition_cost": 139.5973,
        "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "primary_amount_paid": 5.0000,
        "secondary_amount_paid": 5.0000,
        "tertiary_amount_paid": 3.0000,
        "workflow_status_code": 6,
        "workflow_status_text": "Waiting for Pick up"
    },
    {
        "rx_number": 7012283,
        "refill_number": 1,
        "date_written": "20120605",
        "date_filled": "20120821",
        "amount_paid": 30.00,
        "number_of_refills_allowed": 1,
        "number_of_refills_remaining": 0,
        "directions_translated": "TAKE ONE TABLET EVERY DAY",
        "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
        "prescribed_name": "Restasis 0.05% Eye Emulsion",
        "prescribed_ndc": "00023916330",
        "prescribed_qty": 60.00000,
        "dispensed_name": "Restasis 0.05% Eye Emulsion",
        "dispensed_ndc": "00023916330",
        "dispensed_qty": 60.00000,
        "dispensed_acquisition_cost": 139.5973,
        "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "primary_amount_paid": 100.0000,
        "workflow_status_code": 10,
        "workflow_status_text": "Completed"
    }]
}

Refer to JSON request on the right

Example Responses

CreatePatient Response 1

{
    "success": 1,
    "debug_message": "SUCCESS: Patient created successfully in vendor system.",
    "results": {
        "external_patient_id": "TestID",
        "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625"
    }
}

CreatePatient Response 2

{
    "success": 0,
    "debug_message": "pioneerrx_patient_id 'AA42980E-C383-43DD-9DCC-869AEFCA1625' already exists in vendor system.",
    "error_message": "Patient already exists in vendor system."
}

CreatePatient Response 3

{
    "success": 0,
    "debug_message": "Invalid credentials were provided.",
    "error_message": "Username/Password is incorrect.",
    "error_code": "01"
}

Refer to JSON responses on the right

UpdatePatient

Updates existing patient in vendor system

Example Request

UpdatePatient Request

{
    "external_patient_id": "TestID",
    "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625",
    "legacy_id": "1122",
    "pharmacy_id": "1174570840",
    "pharmacy_id_type": 1,
    "first_name": "John",
    "last_name": "Doe",
    "gender": "M",
    "birth_date": "19800101",
    "primary_phone": "5551112222",
    "address_line_1": "123 Main St.",
    "city": "Shreveport",
    "state": "LA",
    "zip_code": "71115",
    "primary_prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
    "insurances": [{
        "insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "insurance_name": "BC/BS Federal Employees",
        "bin": "610239",
        "cardholder_id": "R50622932",
        "group_number": "65006500",
        "pcn": "FEPRX",
        "payer_type": 3,
        "coverage_type": 1
    },
    {
        "insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "insurance_name": "Cigna",
        "bin": "017010",
        "cardholder_id": "10198667103",
        "group_number": "00608630",
        "payer_type": 3,
        "coverage_type": 1
    },
    {
        "insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "insurance_name": "North Carolina Medicaid",
        "bin": "610242",
        "cardholder_id": "938801283N",
        "group_number": "MAAQ",
        "payer_type": 2,
        "coverage_type": 1
    }],
    "prescribers": [{
        "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
        "dea_number": "AD2123824",
        "npi_number": "1611123525",
        "specialty": "Physician Assistant",
        "first_name": "James",
        "last_name": "Bond",
        "phone_number": "3184445555",
        "fax_number": "3185556666",
        "address_line_1": "12 abc St. ",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115"
    },
    {
        "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
        "dea_number": "MM1219319",
        "npi_number": "1601843708",
        "specialty": "Family Medicine",
        "first_name": "Jane",
        "last_name": "Bond",
        "phone_number": "3187775555",
        "fax_number": "3189993333",
        "address_line_1": "34 def St. ",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115"
    }],
    "prescriptions": [{
        "rx_number": 7324683,
        "refill_number": 0,
        "date_written": "20100405",
        "date_filled": "20100405",
        "amount_paid": 120.00,
        "number_of_refills_allowed": 2,
        "number_of_refills_remaining": 2,
        "directions_translated": "TAKE ONE CAPSULE BY MOUTH TWO TIMES EACH DAY.",
        "prescriber_id": " A4DDA117-83ED-4D70-A814-001ED72B8EAB ",
        "prescribed_name": "Neurontin 300mg Capsule",
        "prescribed_ndc": "00071080524",
        "prescribed_qty": 10.00000,
        "dispensed_name": "Gabapentin 300 Mg Capsule",
        "dispensed_ndc": "59762502701",
        "dispensed_qty": 10.00000,
        "icd10_code": "G40",
        "icd10_text": "Epilepsy and recurrent seizures",
        "dispensed_acquisition_cost": 139.5973,
        "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "primary_amount_paid": 5.0000,
        "secondary_amount_paid": 5.0000,
        "tertiary_amount_paid": 3.0000,
        "workflow_status_code": 6,
        "workflow_status_text": "Waiting for Pick up"
    },
    {
        "rx_number": 7012283,
        "refill_number": 1,
        "date_written": "20120605",
        "date_filled": "20120821",
        "amount_paid": 30.00,
        "number_of_refills_allowed": 1,
        "number_of_refills_remaining": 0,
        "directions_translated": "TAKE ONE TABLET EVERY DAY",
        "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
        "prescribed_name": "Restasis 0.05% Eye Emulsion",
        "prescribed_ndc": "00023916330",
        "prescribed_qty": 60.00000,
        "dispensed_name": "Restasis 0.05% Eye Emulsion",
        "dispensed_ndc": "00023916330",
        "dispensed_qty": 60.00000,
        "dispensed_acquisition_cost": 139.5973,
        "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
        "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
        "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
        "primary_amount_paid": 100.0000,
        "workflow_status_code": 10,
        "workflow_status_text": "Completed"
    }]
}

Refer to JSON request on the right

Example Response

UpdatePatient Response

{
    "success": 1,
    "debug_message": "SUCCESS: Patient updated successfully in vendor system.",
    "results": {
        "external_patient_id": "TestID",
        "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625"
    }
}

Refer to JSON response on the right

GetPatient

Retrieve patient from vendor system

Example Requests

GetPatient Request 1

{
    "pharmacy_id": "1174570840",
    "pharmacy_id_type": 1,
    "external_patient_id": "TestID"
}

GetPatient Request 2

{
    "pharmacy_id": "1174570840",
    "pharmacy_id_type": 1,
    "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625"
}

Refer to JSON requests on the right

Example Responses

GetPatient Response 1

{
    "success": 1,
    "debug_message": "SUCCESS: Patient retrieved successfully from vendor system.",
    "results": {
        "external_patient_id": "TestID",
        "legacy_id": "1122",
        "pioneerrx_patient_id": "AA42980E-C383-43DD-9DCC-869AEFCA1625",
        "pharmacy_id": "1174570840",
        "pharmacy_id_type": 1,
        "first_name": "John",
        "last_name": "Doe",
        "gender": "M",
        "birth_date": "19800101",
        "primary_phone": "5551112222",
        "address_line_1": "123 Main St.",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115",
        "primary_prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
        "insurances": [{
            "insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "insurance_name": "BC/BS Federal Employees",
            "bin": "610239",
            "cardholder_id": "R50622932",
            "group_number": "65006500",
            "pcn": "FEPRX",
            "payer_type": 3,
            "coverage_type": 1
        },
        {
            "insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "insurance_name": "Cigna",
            "bin": "017010",
            "cardholder_id": "10198667103",
            "group_number": "00608630",
            "payer_type": 3,
            "coverage_type": 1
        },
        {
            "insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "insurance_name": "North Carolina Medicaid",
            "bin": "610242",
            "cardholder_id": "938801283N",
            "group_number": "MAAQ",
            "payer_type": 2,
            "coverage_type": 1
        }],
        "prescribers": [{
            "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
            "dea_number": "AD2123824",
            "npi_number": "1611123525",
            "specialty": "Physician Assistant",
            "first_name": "James",
            "last_name": "Bond",
            "phone_number": "3184445555",
            "fax_number": "3185556666",
            "address_line_1": "12 abc St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        },
        {
            "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
            "dea_number": "MM1219319",
            "npi_number": "1601843708",
            "specialty": "Family Medicine",
            "first_name": "Jane",
            "last_name": "Bond",
            "phone_number": "3187775555",
            "fax_number": "3189993333",
            "address_line_1": "34 def St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        }],
        "prescriptions": [{
            "rx_number": 7324683,
            "refill_number": 0,
            "date_written": "20100405",
            "date_filled": "20100405",
            "amount_paid": 120.00,
            "number_of_refills_allowed": 2,
            "number_of_refills_remaining": 2,
            "directions_translated": "TAKE ONE CAPSULE BY MOUTH TWO TIMES EACH DAY.",
            "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
            "prescribed_name": "Neurontin 300mg Capsule",
            "prescribed_ndc": "00071080524",
            "prescribed_qty": 10.00000,
            "dispensed_name": "Gabapentin 300 Mg Capsule",
            "dispensed_ndc": "59762502701",
            "dispensed_qty": 10.00000,
            "icd10_code": "G40",
            "icd10_text": "Epilepsy and recurrent seizures",
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "primary_amount_paid": 5.0000,
            "secondary_amount_paid": 5.0000,
            "tertiary_amount_paid": 3.0000,
            "workflow_status_code": 6,
            "workflow_status_text": "Waiting for Pick up"
        },
        {
            "rx_number": 7012283,
            "refill_number": 1,
            "date_written": "20120605",
            "date_filled": "20120821",
            "amount_paid": 30.00,
            "number_of_refills_allowed": 1,
            "number_of_refills_remaining": 0,
            "directions_translated": "TAKE ONE TABLET EVERY DAY",
            "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
            "prescribed_name": "Restasis 0.05% Eye Emulsion",
            "prescribed_ndc": "00023916330",
            "prescribed_qty": 60.00000,
            "dispensed_name": "Restasis 0.05% Eye Emulsion",
            "dispensed_ndc": "00023916330",
            "dispensed_qty": 60.00000,
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "primary_amount_paid": 100.0000,
            "workflow_status_code": 10,
            "workflow_status_text": "Completed"
        }]
    }
}

GetPatient Response 2

{
    "success": 0,
    "debug_message": "pioneerrx_patient_id 'AA42980E-C383-43DD-9DCC-869AEFCA1625' does not exist in vendor system.",
    "error_message": "Patient does not exist in vendor system.",
    "error_code": "02"
}

Refer to JSON responses on the right

GetUnmatchedPatients

Gets list of unmatched patients (patients without a value for pioneerrx_patient_id) in vendor system for pharmacy

If no pharmacy ID provided, assumption is that all unmatched patients associated with PioneerRx pharmacies will be returned. PioneerRx will route data accordingly.

Patients matched within PioneerRx will be updated in vendor system with an UpdatePatient call, providing the external_patient_id and pioneerrx_patient_id.

Patients that cannot be matched will be placed into a queue for the pharmacy to handle manually.

The following criteria will be used for matching:

Example Request

GetUnmatchedPatients Request

{
    "pharmacy_id": "1174570840",
    "pharmacy_id_type": 1
}

Refer to JSON request on the right

Example Responses

GetUnmatchedPatients Response 1

{
    "success": 1,
    "debug_message": "SUCCESS: Unmatched Patients retrieved successfully from vendor system.",
    "results": []
}

GetUnmatchedPatients Response 2

{
    "success": 1,
    "debug_message": "SUCCESS: Unmatched Patients retrieved successfully from vendor system.",
    "results": [{
        "external_patient_id": "TestID2",
        "legacy_id": "1234",
        "pharmacy_id": "1174570840",
        "pharmacy_id_type": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "gender": "F",
        "birth_date": "19810101",
        "primary_phone": "5552223333",
        "address_line_1": "123 Main St.",
        "city": "Shreveport",
        "state": "LA",
        "zip_code": "71115",
        "primary_prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
        "insurances": [{
            "insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "insurance_name": "BC/BS Federal Employees",
            "bin": "610239",
            "cardholder_id": "R50622932",
            "group_number": "65006500",
            "pcn": "FEPRX",
            "payer_type": 3,
            "coverage_type": 1
        },
        {
            "insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "insurance_name": "Cigna",
            "bin": "017010",
            "cardholder_id": "10198667103",
            "group_number": "00608630",
            "payer_type": 3,
            "coverage_type": 1
        },
        {
            "insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "insurance_name": "North Carolina Medicaid",
            "bin": "610242",
            "cardholder_id": "938801283N",
            "group_number": "MAAQ",
            "payer_type": 2,
            "coverage_type": 1
        }],
        "prescribers": [{
            "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
            "dea_number": "AD2123824",
            "npi_number": "1611123525",
            "specialty": "Physician Assistant",
            "first_name": "James",
            "last_name": "Bond",
            "phone_number": "3184445555",
            "fax_number": "3185556666",
            "address_line_1": "12 abc St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        },
        {
            "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
            "dea_number": "MM1219319",
            "npi_number": "1601843708",
            "specialty": "Family Medicine",
            "first_name": "Jane",
            "last_name": "Bond",
            "phone_number": "3187775555",
            "fax_number": "3189993333",
            "address_line_1": "34 def St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        }],
        "prescriptions": [{
            "rx_number": 7324683,
            "refill_number": 0,
            "date_written": "20100405",
            "date_filled": "20100405",
            "amount_paid": 120.00,
            "number_of_refills_allowed": 2,
            "number_of_refills_remaining": 2,
            "directions_translated": "TAKE ONE CAPSULE BY MOUTH TWO TIMES EACH DAY.",
            "prescriber_id": "A4DDA117-83ED-4D70-A814-001ED72B8EAB",
            "prescribed_name": "Neurontin 300mg Capsule",
            "prescribed_ndc": "00071080524",
            "prescribed_qty": 10.00000,
            "dispensed_name": "Gabapentin 300 Mg Capsule",
            "dispensed_ndc": "59762502701",
            "dispensed_qty": 10.00000,
            "icd10_code": "G40",
            "icd10_text": "Epilepsy and recurrent seizures",
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978"
        },
        {
            "rx_number": 7012283,
            "refill_number": 1,
            "date_written": "20120605",
            "date_filled": "20120821",
            "amount_paid": 30.00,
            "number_of_refills_allowed": 1,
            "number_of_refills_remaining": 0,
            "directions_translated": "TAKE ONE TABLET EVERY DAY",
            "prescriber_id": "57BB2EAB-2662-44FE-B2CC-00911535B843",
            "prescribed_name": "Restasis 0.05% Eye Emulsion",
            "prescribed_ndc": "00023916330",
            "prescribed_qty": 60.00000,
            "dispensed_name": "Restasis 0.05% Eye Emulsion",
            "dispensed_ndc": "00023916330",
            "dispensed_qty": 60.00000,
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "35EB92F6-0C5B-48C6-BF02-8D40781ADAAE",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "tertiary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978"
        }]
    },
    {
        "external_patient_id": "TestID3",
        "legacy_id": "5678",
        "pharmacy_id": "1174570840",
        "pharmacy_id_type": 1,
        "first_name": "Jacob",
        "last_name": "Doe",
        "gender": "M",
        "birth_date": "19990101",
        "primary_phone": "5552223333",
        "address_line_1": "123 Main St.",
        "city": "Shreveport",
        "state": "LA",
        "zip": "71115",
        "primary_prescriber_id": "94160EA3-4A14-4899-A9BF-00CB8900135D",
        "Insurances": [{
            "insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "insurance_name": "North Carolina Medicaid",
            "bin": "610242",
            "cardholder_id": "947801283N",
            "payer_type": 2,
            "coverage_type": 1
        },
        {
            "insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC",
            "insurance_name": "Cigna",
            "bin": "017010",
            "cardholder_id": "10198667103",
            "group_number": "00608630",
            "payer_type": 3
        }],
        "prescribers": [{
            "prescriber_id": "94160EA3-4A14-4899-A9BF-00CB8900135D",
            "dea_number": "AL6853196",
            "npi_number": "1752317322",
            "specialty": "Internal Medicine",
            "first_name": "Gary",
            "last_name": "Larsen",
            "phone_number": "3181237890",
            "fax_number": "3185559876",
            "address_line_1": "56 hij St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        },
        {
            "prescriber_id": "8C7C3834-7029-4EDA-9580-00DCE7CFB869",
            "dea_number": "MH0579370",
            "npi_number": "1556427442",
            "specialty": "Urology",
            "first_name": "William",
            "last_name": "Jones",
            "phone_number": "3184563210",
            "fax_number": "3184446543",
            "address_line_1": "78 klm St. ",
            "city": "Shreveport",
            "state": "LA",
            "zip_code": "71115"
        }],
        "prescriptions": [{
            "rx_number": 7240341,
            "refill_number": 0,
            "date_written": "20120405",
            "date_filled": "20120405",
            "amount_paid": 200.00,
            "number_of_refills_allowed": 2,
            "number_of_refills_remaining": 2,
            "directions_translated": "TAKE ONE CAPSULE BY MOUTH TWO TIMES EACH DAY.",
            "prescriber_id": "94160EA3-4A14-4899-A9BF-00CB8900135D",
            "prescribed_name": "Simvastatin 10 Mg Tablet",
            "prescribed_ndc": "55111019890",
            "prescribed_qty": 10.00000,
            "dispensed_name": "Simvastatin 10 Mg Tablet",
            "dispensed_ndc": "55111019890",
            "dispensed_qty": 10.00000,
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC"
        },
        {
            "rx_number": 7332666,
            "refill_number": 1,
            "date_written": "20120605",
            "date_filled": "20120821",
            "amount_paid": 50.00,
            "number_of_refills_allowed": 1,
            "number_of_refills_remaining": 0,
            "directions_translated": "TAKE ONE TABLET EVERY DAY",
            "prescriber_id": "8C7C3834-7029-4EDA-9580-00DCE7CFB869",
            "prescribed_name": "Aripiprazole Tab 2 Mg 30 Teva",
            "prescribed_ndc": "00093761356",
            "prescribed_qty": 60.00000,
            "dispensed_name": "Aripiprazole Tab 2 Mg 30 Teva",
            "dispensed_ndc": "00093761356",
            "dispensed_qty": 60.00000,
            "dispensed_acquisition_cost": 139.5973,
            "primary_insurance_id": "2FB77D82-1664-42B9-A2A1-E5F7202B2978",
            "secondary_insurance_id": "EDD23D35-416A-49CA-8EB0-2BC60F60B9DC"
        }]
    }]
}

Refer to JSON responses on the right

Browser Support

If a profile_url is returned from GetPatient or GetUnmatchedPatients, the user has the ability to view the returned url. PioneerRx will either open the profile_url inside a popup window of the PioneerRx application, or open using the default browser of the workstation. PioneerRx may change between these based on the interactions made by the user and both should be assumed can occur at a pharmacy.

Due to technical requirements of the .net framework, Internet Explorer is used when PioneerRx opens the URL as a popup within the application. In addition, most pharmacies do not alter their workstation’s default browser, and being Windows based, the default is most commonly Internet Explorer. PioneerRx’s currently requires Internet Explorer 8 or higher. We do not support lower versions of IE.

If your product cannot support current versions of alternative browsers (such as Edge, Chrome, Firefox, Opera, etc), please notify PioneerRx Development during your onboarding so that we can discuss options for forcing Internet Explorer.

PioneerRx Contact Information

For all technical and business questions, concerns, or issues, please email PioneerRxDataPrograms@PioneerRx.com.

This email is monitored by our data integration team and someone will be in contact once reviewed. If a call is needed, please email us your topics and questions and we will setup a call with the appropriate individuals.

This is not meant to be given to users (ie, pharmacies). The most appropriate solution for them, if to use the PioneerRx Support Request features we have to ask for assistance.

If not contacted in the appropriate ways, persons may have to wait longer than necessary as requests then have to be internally re-routed at PioneerRx.

Questions To Answer for Integration

The following is a recap of the questions PioneerRx will need to have each Vendor answer for the integration to make sure they are configured correctly:

  1. What is the base POST URL that PioneerRx will call for the api actions (we will append the api action to this base url)? e.g. https://www.mydomain.com/api

  2. What authentication method(s) will we be utilizing? e.g. Basic Auth Only, ApplicationKey Only, LocationKey Only, or a combination of these 3 options

  3. If issues occur in vendor system, who should users contact for assistance (name, email, phone, etc)? e.g. Vendor Support, support@vendor.com, 1-555-555-1234

  4. Who is the technical contact for the integration with PioneerRx at the Vendor (name, email, phone, etc)? i.e. this is the person(s) that PioneerRx technical team can reach for future issues, this will not be shared with users.