BestRx APIs
Contact Us
  1. Realtime Data Feed Specification
  • Introduction - BestRx APIs
  • Patient API
    • Overview
    • Error Codes
    • Add Patient
      POST
    • Update Patient
      POST
    • Get Patient
      POST
    • Submit Charge Account Payment
      POST
  • Drug API
    • Overview
    • Error Codes
    • Get Drug Information
      POST
  • Prescription API
    • Overview
    • Error Codes
    • Submit Rx Transfer Request
      POST
    • Return to Stock
      POST
    • Save Rx Signature
      POST
  • Refill API
    • Overview
    • Error Codes
    • GetPatientProfile
      POST
    • Send Refill Request
      POST
  • BestPOS API
    • Overview
    • Error Codes
    • Create POS Transaction
      POST
    • Get POS Transaction Status
      POST
    • Get Item Details
      POST
  • Delivery/Shipping Provider API
    • Overview
    • Error Codes
    • Address Validation
    • Create Order
    • Update Order Status
    • Cancel Order
  • Realtime Data Feed Specification
    • Overview
    • Patient Update Callback
    • E-Prescription Notification Callback
    • Prescription Update Callback
  1. Realtime Data Feed Specification

Patient Update Callback

INFO
Used to sync patient data in BestRx with a TPP’s external environment. BestRx sends data to TPP anytime a patient is created, updated, or deleted in the BestRx system.

Root Fields#

Field NameTypeType
APIKeystringOptional field that can be used for authentication purposes. It’s up to the receiving partner whether this field will be required or not.
PharmacyNumberstringNumber to help identify the pharmacy the data is coming from. By default BestRx will send the NPI number, but that can be changed if requested by the receiving partner.
transaction_actionstringWhen a patient is created or updated, a value of “updated” will be sent. When a patient is deleted, a value of “deleted” will be sent.
transaction_datestringDate transaction is sent in YYYY-MM-DD format. This value is sent as the UTC date.
transaction_timestringTime transaction is sent in HH:MM:SS (24 hour) format. This value is sent as the UTC time.
unique_patient_idintegerUnique identifier of the patient in the BestRx system.
last_namestringPatient’s last name
middle_namestringPatient’s middle name
first_namestringPatient’s first name
name_prefixstringPrefix to patient’s name (ie Mr. Mrs., etc)
name_suffixstringSuffix to patient’s name (ie Jr, III, etc)
dobstringPatient date of birth in YYYY-MM-DD format
genderstringPatient’s gender (M/F/N) **N=Non-Binary
address1stringPatient street address line 1
address2stringPatient street address line 2 ( ie Unit Number or other identifying info)
citystringPatient’s city portion of address
statestringPatient’s state portion of address
zipcodestringPatient’s zip code
home_phonestringPatient’s home phone number
work_phonestringPatient’s work phone number
cell_phonestringPatient’s cell phone number
patient_emailstringPatient’s email address
family_emailstringFamily’s shared email address
social_security_numberstringPatient’s social security number
is_activestringIndicates whether this is an active patient within BestRx (true/false)
is_deceasedstringIndicates whether the patient is deceased or not (true/false)
is_petstringIndicates whether the patient is an animal (true/false)
languagestringIndicates the preferred language for the patient (English, Spanish, Russian, Chinese, etc)
nursing_home_unique_idintegerUnique ID in BestRx for Nursing home or LTC facility the patient is linked to
nursing_homestringNursing home or LTC facility the patient is linked to
nursing_home_facility_codestringNursing home or LTC facility’s code
nursing_home_facility_idstringNursing home or LTC facility’s ID
nursing_home_contact_namestringNursing home or LTC facility’s contact person
nursing_home_address1stringNursing home or LTC facility’s street address line 1
nursing_home_address2stringNursing home or LTC facility’s street address line 2
nursing_home_citystringNursing home or LTC facility’s city
nursing_home_statestringNursing home or LTC facility’s state
nursing_home_zipstringNursing home or LTC facility’s zip code
nursing_home_phonestringNursing home or LTC facility’s phone number
nursing_home_faxstringNursing home or LTC facility’s fax number
nursing_home_alt_phone1stringNursing home or LTC facility’s alternate phone number
nursing_home_alt_phone2stringNursing home or LTC facility’s alternate phone number
insurance_plansarrayArray of insurance plans linked to this patient. This is a repeating field. Please refer to the Insurance Plans section of this document for more info.
patient_grouparrayArray of groups that the patient is linked to. This is a repeating field. Please refer to the Groups section of this document for more info.
patient_short_remarkstringShort remark relating to the patient
patient_remarkstringLong remark relating to the patient
family_remarkstringShared remark relating to entire family
allergiesarrayArray of allergies linked to this patient. This is a repeating field. Please refer to the Allergies section of this document for more info.

Insurance Plans#

Field NameTypeNotes
ins_seq_nointegerSequence number of the insurance plans as they are listed in the BestRx system. First value will be 1.
ins_namestringThe name of the insurance plan
ins_codestringThe code of the insurance plan. The code is assigned by the pharmacy and has no significance in terms of actual billing purposes.
ins_is_primarybooleanIndicates if this is the patient’s primary plan (true/false)
ins_binstringThe BIN of the insurance plan
ins_pcnstringThe Processor Control Number of the insurance plan
ins_cardholder_idstringThe patient’s Cardholder ID for this plan
ins_person_codestringThe patient’s Person Code for this plan
ins_groupstringThe patient’s Group Number for this plan
ins_relation_codestringThe patient’s Relationship Code for this plan
ins_cardholder_first_namestringThe Cardholder First Name for this plan. Most of the time it will be the same as the Patient’s First Name, but could be different if the patient’s spouse, parent, or other family member is the primary account holder of the insurance plan.
ins_cardholder_last_namestringThe Cardholder Last Name for this plan. Most of the time it will be the same as the Patient’s Last Name, but could be different if the patient’s spouse, parent, or other family member is the primary account holder of the insurance plan.

Groups#

Field NameTypeNotes
group_codestringInternal code of the group in the BestRx system.
group_namestringName of the group.

Allergies#

Field NameTypeNotes
alg_codestringAllergy code from Compendia database (currently using MediSpan)
alg_descriptionstringUser-friendly allergy description

Example#

{
    "APIKey": "",
    "PharmacyNumber": "1234567890",
    "transaction_action": "update",
    "transaction_date": "2019-03-15",
    "transaction_time": "22:34:45",
    "unique_patient_id": 25731,
    "last_name": "DOE",
    "middle_name": "WAYNE",
    "first_name": "JOHN",
    "name_prefix": "",
    "name_suffix": "",
    "dob": "1980-04-23",
    "gender": "M",
    "address1": "167 W GRAND AVE",
    "address2": "UNIT 1408",
    "city": "CHICAGO",
    "state": "IL",
    "zipcode": "60654",
    "home_phone": "3129555555",
    "work_phone": "6308935555",
    "cell_phone": "6304005555",
    "patient_email": "johndoe@gmail.com",
    "family_email": "",
    "social_security_number": "111223333",
    "is_active": "true",
    "is_deceased": "false",
    "is_pet": "false",
    "language": "Spanish",
    "nursing_home": "JOSEPH REHABILITATION CENTER",
    "insurance_plans": [
        {
            "ins_seq_no": 1,
            "ins_name": "WORKCOMP",
            "ins_code": "WCOMP",
            "ins_is_primary": true,
            "ins_bin": "123456",
            "ins_pcn": "",
            "ins_cardholder_id": "44444444",
            "ins_person_code": "01",
            "ins_group": "ASD0W9U43",
            "ins_relation_code": "1 - Cardholder",
            "ins_cardholder_first_name": "JOHN",
            "ins_cardholder_last_name": "DOE"
        }
      ],
    "patient_group": [
        {
          "group_code": "1",
          "group_name": "TEST GROUP 1"
        },
        {
          "group_code": "2",
          "group_name": "TEST GROUP 2"
        }
      ],
    "patient_short_remark": "Test short remark",
    "patient_remark": "",
    "family_remark": ""
}
Modified at 2025-01-29 18:01:43
Previous
Overview
Next
E-Prescription Notification Callback