API Documentation

Patients

API for Patients

List Patients

GET /api/ehr/v1/patients

List the patients in the given facility

Request Example


{
    "facility_id": "100000000000000179"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "patients": [
        {
            "patient_id": "100000000000002697",
            "first_name": "Subrahmanyan",
            "last_name": "Parameswaran",
            "full_name": "Subrahmanyan Parameswaran",
            "dob": "2015-01-01",
            "record_id": "cha0001",
            "created_time": "2015-04-01T10:06:51+0530",
            "created_date": "2015-04-01",
            "active": 1,
            "gender": "male",
            "email": "",
            "mobile": "",
            "home_phone": "",
            "work_phone": "",
            "work_phone_extn": "",
            "preferred_communication": "",
            "primary_phone": ""
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "applied_filter": "Status.Active",
        "sort_column": "created_time",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
facility_id required long Facility ID
filter_by optional string Filter by status of the patient record; Allowed values : Status.All, Status.Active and Status.Inactive.
full_name optional string search with name; Variants: full_name_startswith and full_name_contains
first_name optional string search with first_name; Variants: first_name_startswith and first_name_contains
last_name optional string search with last_name; Variants: last_name_startswith and last_name_contains
record_id optional string search with record_id; Variants: record_id_startswith and record_id_contains
created_date optional string search with created_date; Variants: created_date_start , created_date_end , created_date_before and created_date_after
home_phone optional string search with home_phone; Variants: home_phone_startswith and home_phone_contains
mobile optional string search with mobile; Variants: mobile_startswith and mobile_contains
email optional string search with email; Variants: email_startswith and email_contains
work_phone optional string search with work_phone; Variants: work_phone_startswith and work_phone_contains
sort_column optional string Sort patients; Allowed values: first_name, last_name, full_name, dob, record_id, created_time.

Get Patient

GET /patients/{patient_id}

Get the details of a patient

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "patient": {
        "patient_id": "100000000000002623",
        "record_id": "cha0001",
        "first_name": "Subrahmanyan",
        "last_name": "P",
        "full_name": "Subrahmanyan P",
        "gender": "male",
        "dob": "2015-01-01",
        "is_active": "true",
        "blood_group": "B-",
        "language": "Tamil",
        "ethnicity": "Declined to specify",
        "marital_status": "Married",
        "employment_status": "Full-Time Student",
        "smoking_status": "Current some day smoker",
        "about_patient": "from India",
        "referred_source": "Search Engine",
        "referred_specific_source": "Google",
        "emergency_contact_name": "Parameswaran",
        "emergency_contact_number": "9443130390",
        "emergency_contact_number_extn": "0920",
        "primary_contact_details": {
            "cargiver_first_name": "Parameswaran",
            "cargiver_last_name": "S",
            "preferred_communication": "Email",
            "email": "thilak@abcd.com",
            "primary_phone": "Mobile Phone",
            "home_phone": "9715277035",
            "mobile": "044270224",
            "work_phone": "044329232",
            "work_phone_extn": "8475",
            "fax": "1928392772",
            "address_line1": "1/485, Right choice appartments,",
            "address_line2": "Mugalivakkam",
            "city": "Chennai",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "614616-9102"
        },
        "facilities": [
            {
                "facility_id": "100000000000000179"
            }
        ]
    }
}

Query Parameters

Name Required Type Description

Add a Patient

POST /api/ehr/v1/patients

API to add a patient.

Request Example


{
    "first_name": "Subrahmanyan",
    "last_name": "Parameswaran",
    "dob": "2001-01-01",
    "gender": "male",
    "mobile": "9093809392",
    "home_phone": "8928392839",
    "email": "subrahmanyan.p@zohcorp.com",
    "record_id": "PAT002",
    "address": {
        "address_line1": "1/482, Right Choice Appartments",
        "address_line2": "Sabari Nagar 3rd Extn",
        "city": "Chennai",
        "state": "Tamil Nadu",
        "country": "in",
        "zip_code": "929302",
        "post_box": "0291"
    },
    "facilities": [
        {
            "facility_id": "100000000000000179"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Patient saved successfully.",
    "patient": {
        "patient_id": "100000000000052007",
        "record_id": "PAT002",
        "first_name": "Subrahmanyan",
        "last_name": "Parameswaran",
        "full_name": "Subrahmanyan Parameswaran",
        "gender": "male",
        "dob": "2001-01-01",
        "blood_group": "",
        "language": "",
        "ethnicity": "",
        "marital_status": "",
        "employment_status": "",
        "smoking_status": "",
        "about_patient": "",
        "referred_source": "",
        "referred_specific_source": "",
        "emergency_contact_name": "",
        "emergency_contact_number": "",
        "emergency_contact_number_extn": "",
        "primary_contact_details": {
            "cargiver_first_name": "",
            "cargiver_last_name": "",
            "preferred_communication": "",
            "email": "subrahmanyan.p@zohcorp.com",
            "primary_phone": "",
            "home_phone": "8928392839",
            "mobile": "9093809392",
            "work_phone": "",
            "work_phone_extn": "",
            "fax": "",
            "address_line1": "1/482, Right Choice Appartments",
            "address_line2": "Sabari Nagar 3rd Extn",
            "city": "Chennai",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "929302-291"
        },
        "facilities": [
            {
                "facility_id": "100000000000000179"
            }
        ]
    }
}

Request Attributes

Name
Description
first_name
required,    string
First Name of Patient
last_name
required,    string
Last Name of patient
dob
required,    string
Date of birth of patient
gender
required,    string
Gender; Allowed Values : male, female
facilities
Show Attributes
required,    list
Facilities to map patient
mobile
optional,    long
Mobile Phone
home_phone
optional,    long
Home Phone
email
optional,    string
Email Id
record_id
optional,    string
record id of the patient; if not given the Id will automatically be generated.
address
Show Attributes
optional,    list
Address of the patient

Update patient details

PUT /api/ehr/v1/patients/{patient_id}

Update the detials of the patient

Request Example


{
    "first_name": "Mary",
    "last_name": "J",
    "dob": "2001-01-01",
    "gender": "male",
    "mobile": "9093809392",
    "home_phone": "8928392839",
    "email": "subrahmanyan.p@zohcorp.com",
    "record_id": "PAT002",
    "address": {
        "address_line1": "1/482, Right Choice Appartments",
        "address_line2": "Sabari Nagar 3rd Extn",
        "city": "Chennai",
        "state": "Tamil Nadu",
        "country": "in",
        "zip_code": "929302",
        "post_box": "0291"
    },
    "facilities": [
        {
            "facility_id": "100000000000000179"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Patient details updated successfully",
    "patient": {
        "patient_id": "100000000000052007",
        "record_id": "PAT002",
        "first_name": "Mary",
        "last_name": "J",
        "full_name": "Mary J",
        "gender": "male",
        "dob": "2001-01-01",
        "blood_group": "",
        "language": "",
        "ethnicity": "",
        "marital_status": "",
        "employment_status": "",
        "smoking_status": "",
        "about_patient": "",
        "referred_source": "",
        "referred_specific_source": "",
        "emergency_contact_name": "",
        "emergency_contact_number": "",
        "emergency_contact_number_extn": "",
        "primary_contact_details": {
            "cargiver_first_name": "",
            "cargiver_last_name": "",
            "preferred_communication": "",
            "email": "subrahmanyan.p@zohcorp.com",
            "primary_phone": "",
            "home_phone": "8928392839",
            "mobile": "9093809392",
            "work_phone": "",
            "work_phone_extn": "",
            "fax": "",
            "address_line1": "1/482, Right Choice Appartments",
            "address_line2": "Sabari Nagar 3rd Extn",
            "city": "Chennai",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "929302-291"
        },
        "facilities": [
            {
                "facility_id": "100000000000000179"
            }
        ]
    }
}

Request Attributes

Name
Description
first_name
required,    string
First Name of Patient
last_name
required,    string
Last Name of patient
dob
required,    string
Date of birth of patient
gender
required,    string
male/female
facilities
Show Attributes
required,    list
Facilities to map patient
mobile
optional,    long
Mobile Phone
home_phone
optional,    long
Home Phone
email
optional,    string
Email Id
record_id
optional,    string
record id of the patient; if not given the Id will automatically be generated.
address
Show Attributes
optional,    list
Address of the patient

Deactivate a patient

POST /api/ehr/v1/patients/{patient_id}/inactive

Deactivate a patient record

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Patient has been inactivated successfully"
}

Activate a patient

POST /api/ehr/v1/patients/{patient_id}/active

Activate a patient record

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Patient has been activated successfully"
}

Medications

API for Medications

List Medications

GET /api/ehr/v1/patients/{patient_id}/medications

List the medications added for a patient

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "medications": [
        {
            "patient_medication_id": "100000000000052061",
            "patient_id": "100000000000002697",
            "date_of_entry": "2015-04-10",
            "dosage_unit": "",
            "intake_rounte": "oral",
            "dispense": "5",
            "refill": "PRN",
            "dispense_unit": "C53503",
            "drug_details_id": "100000000000052059",
            "generic_drug_name": "bismuth subsalicylate",
            "generic_product_name": "bismuth subsalicylate 262 mg/15 mL oral suspension",
            "trade_name": "Pink Bismuth",
            "strength_description": "262 mg/15 mL",
            "doseform_description": "suspension",
            "encounter_id": "100000000000002737",
            "directions": "1 ml every 4 hours while awake after a meal for 1 Day(s), oral and rectal route",
            "manufacturing_type": "Manufactured",
            "substitute_generic": 1
        },
        {
            "patient_medication_id": "100000000000047017",
            "patient_id": "100000000000002697",
            "date_of_entry": "2015-04-08",
            "dosage_unit": "",
            "intake_rounte": "intravenous",
            "dispense": "6",
            "refill": "PRN",
            "dispense_unit": "C28254",
            "drug_details_id": "100000000000047015",
            "generic_drug_name": "penicillin G potassium",
            "generic_product_name": "penicillin G potassium 2,000,000 units/50 mL intravenous solution",
            "trade_name": "Penicillin G Potassium",
            "strength_description": "2000000 units/50 mL",
            "doseform_description": "solution",
            "encounter_id": "100000000000002737",
            "directions": "1 ml once a day before a meal for 1 Day(s), 2 ml once a week after a meal for 2 Week(s), intravenous route",
            "manufacturing_type": "Manufactured",
            "substitute_generic": 1
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "date_of_entry",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description

Add Medication

POST /api/ehr/v1/patients/{patient_id}/medications

Add a medication to a patient

Request Example


[
    {
        "drug_name": "Genteal",
        "drug_erx_display_name": "Genteal",
        "csa": "10",
        "is_supplies": "true",
        "ndc": "00056018870",
        "primary_diagnosis_id": "2000000007261",
        "secondary_diagnosis_id": "2000000007441",
        "trade_name": "Genteal",
        "strength": "1.5",
        "strength_unit": "kit",
        "route": "injectable",
        "dose_form": "cream",
        "encounter_id": "100000000000003047",
        "rx_sig": [
            {
                "dosage": "1.5",
                "dosage_unit": "ml",
                "sig_route": "injectable",
                "sig_intake": "AC",
                "sig_frequency": "QD",
                "duration": "12",
                "duration_unit": "Day(s)"
            },
            {
                "dosage": "3",
                "dosage_unit": "ml",
                "sig_route": "injectable",
                "sig_intake": "AC",
                "sig_frequency": "QD",
                "duration": "12",
                "duration_unit": "Day(s)"
            }
        ],
        "directions": "1.5 ml once a day before a meal for 12 Day(s), 3 ml once a day before a meal for 12 Day(s)",
        "dispense": "1.2",
        "dispense_unit": "C48504",
        "refills": "PRN",
        "substitute_generic": "true",
        "manufacturing_type": "Manufactured",
        "prior_authorization_code": "02931",
        "prior_authorization_status": "A",
        "note_to_pharmacy": "notes"
    },
    {
        "drug_name": "Warfarin",
        "drug_erx_display_name": "Warfarin",
        "csa": "11",
        "is_supplies": "true",
        "ndc": "000560123870",
        "primary_diagnosis_id": "2000000007261",
        "secondary_diagnosis_id": "2000000007441",
        "trade_name": "Warfarin",
        "strength": "1.5",
        "strength_unit": "kit",
        "route": "injectable",
        "dose_form": "cream",
        "encounter_id": "100000000000003047",
        "rx_sig": [
            {
                "dosage": "1.5",
                "dosage_unit": "ml",
                "sig_route": "injectable",
                "sig_intake": "AC",
                "sig_frequency": "QD",
                "duration": "12",
                "duration_unit": "Day(s)"
            },
            {
                "dosage": "3",
                "dosage_unit": "ml",
                "sig_route": "injectable",
                "sig_intake": "AC",
                "sig_frequency": "QD",
                "duration": "12",
                "duration_unit": "Day(s)"
            }
        ],
        "directions": "1.5 ml once a day before a meal for 12 Day(s), 3 ml once a day before a meal for 12 Day(s)",
        "dispense": "1.2",
        "dispense_unit": "C48505",
        "refills": "10",
        "substitute_generic": "true",
        "manufacturing_type": "Compounded",
        "prior_authorization_code": "02031",
        "prior_authorization_status": "A",
        "note_to_pharmacy": "notes"
    }
]

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Medications added successfully"
}

Request Attributes

Name
Description
drug_name
optional,    string
Drug Name
trade_name
optional,    string
Trade Name
strength
optional,    float
Strength of the Drug
strength_unit
optional,    string
Strength Unit
is_custom_drug
optional,    boolean
If drug is added by practice, is_custom_drug should be true.
route
optional,    string
Route
dose_form
optional,    string
Dose Form
dosage_unit
optional,    string
Dosage Unit
drug_details_id
optional,    long
Drug Details ID from search Medications API
encounter_id
optional,    long
Encounter ID
optional,    list
Rx SIG
directions
optional,    string
Directions for the Medication
dispense
optional,    float
Dispense
drug_erx_display_name
optional,    string
Drug name to display in eRx
csa
optional,    int
CSA from Drug Search Query
is_supplies
optional,    boolean
is_supplies from Drug Search Query
ndc
optional,    string
NDC from Drug Search
primary_diagnosis_id
optional,    long
Primary Diagnosis ID
secondary_diagnosis_id
optional,    long
Secondary Diagnosis ID
dispense_unit
optional,    string
Dispense Unit
refills
optional,    float
Refills
substitute_generic
optional,    boolean
Is Substitute Generic allowed ?
manufacturing_type
optional,    string
manufacturing Type
prior_authorization_code
optional,    string
Prior Authorization Code
prior_authorization_status
optional,    string
Prior Authorization Code
note_to_pharmacy
optional,    string
Note to Pharmacy

Get a Medication

GET /api/ehr/v1/patients/{patient_id}/medications/{patient_medication_id}

Get a Medication

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "medications": [
        {
            "patient_medication_id": "100000000000008089",
            "generic_drug_name": "Genteal",
            "generic_product_name": "Genteal 1.5 kit injectable cream",
            "trade_name": "Genteal",
            "strength_description": "1.5",
            "route_description": "injectable",
            "doseform_description": "cream",
            "encounter_id": "100000000000003047",
            "date_of_entry": "2015-05-14",
            "drug_details_id": "100000000000008065",
            "patient_id": "100000000000003011",
            "start_date": "2015-05-13",
            "end_date": "",
            "dosage_unit": "",
            "intake_route": "injectable",
            "is_active": "true",
            "rx_sigs": [
                {
                    "dosage": "1.5",
                    "direction": "AC",
                    "intake": "QD",
                    "duration": 12,
                    "duration_unit": "Day(s)"
                },
                {
                    "dosage": "3",
                    "direction": "AC",
                    "intake": "QD",
                    "duration": 12,
                    "duration_unit": "Day(s)"
                }
            ],
            "directions": "1.5 ml once a day before a meal for 12 Day(s), 3 ml once a day before a meal for 12 Day(s)",
            "dispense": "1.2",
            "dispense_unit": "C48504",
            "refill": "PRN",
            "substitute_generic": "true",
            "manufacturing_type": "Manufactured",
            "prior_authorization_code": "02931",
            "prior_authorization_status": "A",
            "note_to_pharmacy": "notes"
        }
    ]
}

Query Parameters

Name Required Type Description

Update Medication

PUT /api/ehr/v1/patients/{patient_id}/medications/{patient_medication_id}

Update Medication

Request Example


{
    "encounter_id": "100000000000003047",
    "start_date": "2015-05-13",
    "end_date": "",
    "dosage_unit": "",
    "intake_route": "injectable",
    "is_active": "true",
    "rx_sig": [
        {
            "dosage": "1.5",
            "sig_intake": "AC",
            "sig_frequency": "QD",
            "duration": 12,
            "duration_unit": "Day(s)"
        },
        {
            "dosage": "3",
            "sig_intake": "AC",
            "sig_frequency": "QD",
            "duration": 12,
            "duration_unit": "Day(s)"
        }
    ],
    "directions": "1.5 ml once a day before a meal for 12 Day(s), 3 ml once a day before a meal for 12 Day(s)",
    "dispense": "1.2",
    "dispense_unit": "C48504",
    "refill": "PRN",
    "substitute_generic": "true",
    "manufacturing_type": "Manufactured",
    "prior_authorization_code": "02931",
    "prior_authorization_status": "A",
    "note_to_pharmacy": "notes"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Medication updated successfully",
    "medications": [
        {
            "patient_medication_id": "100000000000008089",
            "generic_drug_name": "Genteal",
            "generic_product_name": "Genteal 1.5 kit injectable cream",
            "trade_name": "Genteal",
            "strength_description": "1.5",
            "route_description": "injectable",
            "doseform_description": "cream",
            "encounter_id": "100000000000003047",
            "date_of_entry": "2015-05-14",
            "drug_details_id": "100000000000008065",
            "patient_id": "100000000000003011",
            "start_date": "2015-05-13",
            "end_date": "",
            "dosage_unit": "",
            "intake_route": "injectable",
            "is_active": "true",
            "rx_sigs": [
                {
                    "dosage": "1.5",
                    "direction": "AC",
                    "intake": "QD",
                    "duration": 12,
                    "duration_unit": "Day(s)"
                },
                {
                    "dosage": "3",
                    "direction": "AC",
                    "intake": "QD",
                    "duration": 12,
                    "duration_unit": "Day(s)"
                }
            ],
            "directions": "1.5 ml once a day before a meal for 12 Day(s), 3 ml once a day before a meal for 12 Day(s)",
            "dispense": "1.2",
            "dispense_unit": "C48504",
            "refill": "PRN",
            "substitute_generic": "true",
            "manufacturing_type": "Manufactured",
            "prior_authorization_code": "02931",
            "prior_authorization_status": "A",
            "note_to_pharmacy": "notes"
        }
    ]
}

Request Attributes

Name
Description
encounter_id
optional,    long
Encounter to be mapped
start_date
optional,    string
Start Date of prescription;
stop_date
optional,    string
Stop Date of prescription
is_active
optional,    boolean
Status of prescription
optional,    list
Rx SIG
directions
optional,    string
Directions to take medication
dispense
optional,    float
Dispense
dispense_unit
optional,    string
Dispense Unit
refills
optional,    float
Refills
substitute_generic
optional,    boolean
Is Substitute Generic allowed ?
manufacturing_type
optional,    string
manufacturing Type
prior_authorization_code
optional,    string
Prior Authorization Code
prior_authorization_status
optional,    string
Prior Authorization Code
note_to_pharmacy
optional,    string
Note to Pharmacy

Delete Medication

DELETE /api/ehr/v1/patients/{patient_id}/medications/{patient_medication_id}

Delete a Medication of a patient

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Medication deleted successfully."
}

Query Parameters

Name Required Type Description

List Medication Template Items

GET /api/ehr/v1/medications/template/{template_id}

List Medication Template Items

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "medicationtemplates": [
        {
            "drug_details_id": "100000000000042001",
            "generic_product_name": "bismuth subsalicylate 262 mg oral tablet",
            "trade_name": "Soothe Caplets",
            "dosage": "1",
            "dosage_unit": "tablet(s)",
            "duration": 2,
            "duration_unit": "Day(s)",
            "route": "oral",
            "sig_frequency": "QD",
            "sig_intake": "AC",
            "dispense": 2,
            "dispense_unit": "C48542",
            "refill": 1,
            "manufacturing_type": "Manufactured",
            "substitute_generic": 1,
            "directions": "1 tablet(s) once a day before a meal  for 2 Day(s), oral",
            "note_to_pharmacy": "test note to pharmacy",
            "position": 0
        },
        {
            "drug_details_id": "100000000000042003",
            "generic_product_name": "dinoprostone 20 mg vaginal suppository",
            "trade_name": "Prostin E2",
            "dosage": "4",
            "dosage_unit": "tablet(s)",
            "duration": 3,
            "duration_unit": "Day(s)",
            "route": "vaginal",
            "sig_frequency": "4X/W",
            "sig_intake": "PC",
            "dispense": 7,
            "dispense_unit": "C48473",
            "refill": "",
            "manufacturing_type": "Manufactured",
            "substitute_generic": 1,
            "directions": "4 tablet(s) 4 times a week after a meal  for 3 Day(s), vaginal route",
            "note_to_pharmacy": "1",
            "position": 1
        },
        {
            "drug_details_id": "100000000000042005",
            "generic_product_name": "pilocarpine 0.5% ophthalmic solution",
            "trade_name": "Pilostat",
            "dosage": "0.5",
            "dosage_unit": "ml",
            "duration": 2,
            "duration_unit": "Day(s)",
            "route": "ophthalmic",
            "sig_frequency": "QD",
            "sig_intake": "AC",
            "dispense": 1,
            "dispense_unit": "C28254",
            "refill": 10,
            "manufacturing_type": "Manufactured",
            "substitute_generic": 1,
            "directions": "0.5 ml once a day before a meal  for 2 Day(s), ophthalmic",
            "note_to_pharmacy": "sample comments",
            "position": 2
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "position",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description

Get Drug Interactions

GET /api/ehr/v1/patients/{patient_id}/medications/interactions

Get Drug Interactions for a drug

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "medications_interactions": [
        {
            "type": "drug",
            "interactions": [
                {
                    "drug1": "d00060",
                    "drugname1": "methotrexate",
                    "drug2": "d07729",
                    "drugname2": "penicillin G potassium",
                    "severity": "Major Drug Interaction",
                    "description": "MONITOR CLOSELY:  Concomitant use of large doses of penicillins may elevate serum methotrexate concentrations.  The mechanism may involve competitive inhibition of renal tubular secretion of methotrexate.  In one study, methotrexate clearance reductions were 35%, 40%,  and 66% with penicillin, ticarcillin, and piperacillin, respectively.  Serious adverse effects, primarily hematologic, have been described with concurrent penicillins and high or low-dose methotrexate regimens.  Fatalities have occurred with both types of methotrexate regimens.<br><br>MANAGEMENT:  If a penicillin must be used concurrently, close monitoring of methotrexate serum concentrations and of the patient for evidence of serious methotrexate toxicity are recommended.  Leucovorin rescue should be available.  Methotrexate dose reductions may be necessary.  If broad-spectrum antibiotic coverage is needed during high-dose methotrexate therapy, use of other antimicrobials may be preferable.  Patients should be advised to promptly report symptoms including fever, chills, sore throat, bruising, bleeding, stomatitis, or malaise to their physician."
                }
            ]
        },
        {
            "type": "food",
            "interactions": [
                {
                    "drug": "methotrexate",
                    "severity": "Moderate Drug Interaction",
                    "description": "MONITOR:  Limited data suggest that consumption of greater than 180 mg/day of caffeine may interfere with the efficacy of methotrexate (MTX) in patients with rheumatoid arthritis.  The exact mechanism of interaction is unknown but may be related to the antagonistic effect of caffeine on adenosine receptors, as anti-inflammatory properties of MTX is thought to result from the accumulation of adenosine.  In a study of 39 patients treated with MTX 7.5 mg/week (without folate supplementation) for 3 months, patients with high caffeine intake (more than 180 mg/day) experienced significantly less improvement in morning stiffness and joint pain from baseline than patients with low caffeine intake (more than 120 mg/day).  There were no significant differences between the responses of patients with moderate caffeine intake (120 to 180 mg/day) and those of the other 2 groups.  In an interview of 91 patients treated with MTX, 26% of patients who discontinued the drug were regular coffee drinkers compared to only 2% of those still receiving the drug.  Because treatment failure was the reason for MTX discontinuation in 80% of patients who discontinued, the investigators suggested that caffeine may have interfered with MTX efficacy.<br /><br />MANAGEMENT:  Until further information is available, the potential for interaction should be considered in patients who consume substantial amounts of caffeine and caffeine-containing foods and are prescribed methotrexate for rheumatoid arthritis.  It may be appropriate to limit caffeine intake if an interaction is suspected in cases of treatment failure."
                }
            ]
        },
        {
            "type": "allergy",
            "interactions": [
                {
                    "message": "This patient is allergic to methotrexate.",
                    "severity": "Severe",
                    "suppress_intrxn_id": "-1",
                    "reaction": "test reactions",
                    "allergen": "methotrexate"
                }
            ]
        }
    ]
}

Query Parameters

Name Required Type Description
generic_drug_id required string Generic Drug ID from Drug Database
generic_drug_name required string Generic Drug Name from Drug Database

Lab orders

API to lab orders

List Ordered Labs

GET /api/ehr/v1/patients/{patient_id}/labs/order

List Ordered Labs

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "lab_order": {
        "order_id": "100000000000010013",
        "patient_id": "100000000000002695",
        "order_date": "2015-03-05",
        "encounter_id": "100000000000010003",
        "notes_to_lab": "",
        "intra_office_notes": "",
        "order_tests": [
            {
                "order_test_id": "100000000000010015",
                "lab_name": "General",
                "test_name": "Basic Metabolic Panel",
                "test_code": ""
            },
            {
                "order_test_id": "100000000000010017",
                "lab_name": "General",
                "test_name": "Comprehensive Metabolic Panel",
                "test_code": ""
            },
            {
                "order_test_id": "100000000000012005",
                "lab_name": "LabCorp",
                "test_name": "Allergens, Zone 11",
                "test_code": "676619"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
encounter_id required long Encounter ID

Search for Labs

GET /api/ehr/v1/labs/search

Search for Labs

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "labs": [
        {
            "lab_id": "2000000000625",
            "lab_name": "General"
        },
        {
            "lab_id": "2000000000631",
            "lab_name": "Genova Diagnostics"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "lab_name",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "lab_name",
                "search_text": "Ge",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
lab_name optional string Search with lab_name; Variants : lab_name_contains and lab_name_startswith

Search for Tests

GET /api/ehr/v1/labs/tests/search

Search for Tests

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "lab_tests": [
        {
            "test_id": "2000000312135",
            "lab_id": "2000000267001",
            "test_name": "WHITE BLOOD CELL COUNT",
            "lab_name": "Quest Diagnostics Lab",
            "test_code": "937",
            "lab_record_id": "2000000284551",
            "specimen_condition_signature": "RT",
            "test_type": "CLINICAL",
            "profile_indicator": 0
        },
        {
            "test_id": "2000000273033",
            "lab_id": "2000000267001",
            "test_name": "WHITE BLOOD CELL COUNT",
            "lab_name": "Quest Diagnostics Lab",
            "test_code": "937",
            "lab_record_id": "2000000284551",
            "specimen_condition_signature": "RT",
            "test_type": "CLINICAL",
            "profile_indicator": 0
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "test_name",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "lab_name",
                "search_text": "Quest Diagnostics Lab",
                "comparator": "equal"
            },
            {
                "column_name": "test_name",
                "search_text": "white blood",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
lab_name optional string Search with lab_name; Variants : lab_name_contains and lab_name_startswith
test_name optional string Search with test_name; Variants : test_name_contains and test_name_startswith

Add Order Labs

POST /api/ehr/v1/patients/{patient_id}/order/labs

Add Order Labs for a patient

Request Example


{
    "encounter_id": "100000000000002725",
    "order_tests": [
        {
            "lab_id": 2000000267001,
            "medical_record_id": 2000000274999,
            "specimen_condition_temperature": "RF",
            "test_type": "CLINICAL",
            "lab_record_id": "2000000284551",
            "profile_indicator": "false",
            "lab_name": "Quest Diagnostics Lab"
        },
        {
            "lab_id": 2000000267001,
            "medical_record_id": 2000000307303,
            "specimen_condition_temperature": "RT",
            "test_type": "CLINICAL",
            "lab_record_id": "2000000316773",
            "profile_indicator": "false",
            "lab_name": "Quest Diagnostics Lab",
            "ask_at_order_entry": [
                {
                    "code": "85996211",
                    "description": "24 HR URINE VOLUME",
                    "filter": "",
                    "answer": "aa"
                }
            ]
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Labs ordered successfully"
}

Request Attributes

Name
Description
encounter_id
optional,    long
Encounter ID
order_tests
Show Attributes
required,    list
Tests to order

Get Ask Order Entry of test

GET /api/ehr/v1/test/{lab_record_id}/ask_at_order_entry

Get Ask Order Entry of test

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "ask_at_order_entry": [
        {
            "aoe_entry_id": "2000000287133",
            "code": "85997860",
            "description": "SPECIMEN TYPE/SOURCE/VOL",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287135",
            "code": "85997861",
            "description": "CLINICAL INDICATION",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287137",
            "code": "85997862",
            "description": "PRIOR THERAPY",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287139",
            "code": "85997863",
            "description": "REFERRING PHYSICIAN PHONE",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287141",
            "code": "85997864",
            "description": "CLIENT/PHONE #",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287143",
            "code": "85997865",
            "description": "CLIENT ACCESSION NUMBER",
            "filter": ""
        },
        {
            "aoe_entry_id": "2000000287145",
            "code": "85997866",
            "description": "PATIENT ID",
            "filter": ""
        }
    ]
}

Query Parameters

Name Required Type Description

Delete an Ordered test

DELETE /api/ehr/v1/labs/order/test/{order_test_id}

Delete an Ordered test

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "Ordered lab test deleted successfully."
}

Query Parameters

Name Required Type Description

Update Lab Notes

POST /api/ehr/v1/patients/{patient_id}/order/labs/notes

Update notes to Order Labs

Request Example


{
    "encounter_id": "100000000000002725",
    "notes_to_lab": "notes to lab",
    "intra_office_notes": "notes to practice"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "Notes updated successfully."
}

Request Attributes

Name
Description
encounter_id
optional,    long
Encounter ID
notes_to_lab
required,    string
Notes to Lab
intra_office_notes
required,    string
Intra Office Notes

Get Mapped Diagnoses

GET /api/ehr/v1/labs/order/tests/{order_test_map_id}/diagnoses

Get Mapped Diagnoses with an ordered test

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "patient_diagnoses": [
        {
            "test_diagnosis_map_id": "100000000000007013",
            "patient_diagnosis_id": "100000000000005025"
        },
        {
            "test_diagnosis_map_id": "100000000000007015",
            "patient_diagnosis_id": "100000000000005026"
        },
        {
            "test_diagnosis_map_id": "100000000000007017",
            "patient_diagnosis_id": "100000000000005033"
        }
    ]
}

Query Parameters

Name Required Type Description

Update Diagnoses for ordered Test

POST /api/ehr/v1/labs/order/tests/{order_test_map_id}/diagnoses

Update Diagnoses for ordered Test

Request Example


{
    "patient_diagnoses": [
        {
            "patient_diagnosis_id": "100000000000003031"
        },
        {
            "patient_diagnosis_id": "100000000000003032"
        },
        {
            "patient_diagnosis_id": "100000000000005015"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Diagnoses mapped successfully"
}

Request Attributes

Name
Description
patient_diagnoses
Show Attributes
required,    list
Patient Diagnosis to map

Lab Results

API for Lab Results

Upload Lab Reports

POST /api/ehr/v1/labs/results/file

Uplods Lab results (in PDF format) of a patient

Request Example


{
    "patient_id": "100000000000003007",
    "facility_id": "100000000000000179",
    "lab_name": "Lab Name",
    "test_codes": [
        "001",
        "002",
        "003"
    ],
    "date": "2015-01-01",
    "provider_id": "100000000000000161",
    "result_ref_no": "RESULT02941",
    "interpretation": "Abnormal",
    "comments": "Result is Abnormal. Please notify the patient immediately.",
    "overwrite": "true",
    "mark_as_signed": "true"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Lab Record saved successfully.",
    "lab": {
        "result_reference_number": "RESULT02941"
    }
}

Request Attributes

Name
Description
required,    list
Criteria as JSON Object
file
required,    string
Lab Result File Content

Delete Lab Reports

DELETE /api/ehr/v1/labs/results

Deletes Lab results of a patient

Request Example


{
    "patient_id": "100000000000000161",
    "result_ref_no": "100000000000000179"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Lab Result deleted successfully"
}

Image Orders

API for Image Orders

List Order Images

GET /api/ehr/v1/images/orders

List Order Images

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "image_orders": [
        {
            "image_test": "NECK AP& LATERAL VIEW",
            "image_type": "X-ray",
            "image_type_id": "100000000000002589",
            "image_order_test_id": "100000000000011007",
            "image_test_id": "100000000000002590"
        },
        {
            "image_test": "NECK",
            "image_type": "CT Scan",
            "image_type_id": "100000000000002610",
            "image_order_test_id": "100000000000011009",
            "image_test_id": "100000000000002611"
        }
    ]
}

Query Parameters

Name Required Type Description
encounter_id long long Encounter ID

Search Images Type

GET /api/ehr/v1/images/search

Search Images Type

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "image_types": [
        {
            "type_id": "100000000000002631",
            "test_type": "MRI"
        },
        {
            "type_id": "100000000000002589",
            "test_type": "X-ray"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": "false",
        "sort_column": "test_type",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "test_type",
                "search_text": "R",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
test_type optional string Search with test type; Variants : test_type_contains and test_type_startswith

Search Images Test

GET /api/ehr/v1/images/tests/search

Search Images Test

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "image_tests": [
        {
            "test_id": "100000000000002632",
            "test_name": "BRAIN WITH CONTRAST",
            "test_type": "MRI"
        },
        {
            "test_id": "100000000000002640",
            "test_name": "NECK",
            "test_type": "MRI"
        },
        {
            "test_id": "100000000000002587",
            "test_name": "CHEST-PA/LATERAL (R/L)",
            "test_type": "X-ray"
        },
        {
            "test_id": "100000000000002592",
            "test_name": "ABDOMEN-AP ERECT",
            "test_type": "X-ray"
        },
        {
            "test_id": "100000000000002590",
            "test_name": "NECK AP& LATERAL VIEW",
            "test_type": "X-ray"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": "false",
        "sort_column": "test_type",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "test_name",
                "search_text": "c",
                "comparator": "contains"
            },
            {
                "column_name": "test_type",
                "search_text": "R",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
test_name optional string Search with test name; Variants : test_name_contains and test_name_startswith
test_type optional string Search with test type; Variants : test_type_contains and test_type_startswith
sort_column optional string Sort patients; Allowed values: test_name, type_name.

Add Order Images

POST /api/ehr/v1/patients/{patient_id}/images/orders

Add Order Images

Request Example


{
    "encounter_id": "100000000000005011",
    "facility_id": "100000000000000179",
    "order_tests": [
        {
            "order_test_id": "100000000000002587"
        },
        {
            "order_test_id": "100000000000002590"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Image order added successfully.",
    "imageorders": {
        "image_order_test_id": "100000000000021005",
        "image_order_id": "100000000000020031",
        "image_test_id": "100000000000002587"
    }
}

Request Attributes

Name
Description
encounter_id
optional,    long
Encounter ID
facility_id
optional,    long
Facility ID
order_tests
Show Attributes
required,    list
Order Tests

Delete Ordered Image

DELETE /api/ehr/v1/images/orders/{image_order_id}

Delete Ordered Image

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Image order deleted successfully."
}

Query Parameters

Name Required Type Description

Image Results

API for Image Results

Upload Radiology Reports

POST /api/ehr/v1/images/results/file

Uploads radiology reports (in PDF format) of a patient

Request Example


{
    "patient_id": "100000000000002703",
    "facility_id": "100000000000000179",
    "provider_id": "100000000000000161",
    "date": "2015-01-01",
    "test_code": "001",
    "result_ref_no": "Doc0192",
    "interpretation": "Abnormal",
    "overwrite": "true",
    "mark_as_signed": "true"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Image result saved successfully."
}

Request Attributes

Name
Description
required,    list
data json
file
required,    string
Lab Result File Content

Delete Image Reports

DELETE /api/ehr/v1/images/results

Deletes Image results of a patient

Request Example


{
    "patient_id": "100000000000000161",
    "result_ref_no": "Pat02932"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "Document deleted successfully."
}

Injections

API for injections

List injections

GET /api/ehr/v1/patients/{patient_id}/injections

List injections of a patient

Request Example


{
    "encounter_id": "100000000000000161"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "injections": [
        {
            "injection_id": "100000000000003029",
            "injection_name": "Plenaxis",
            "patient_injection_map_id": "100000000000003031",
            "patient_id": "100000000000002695",
            "dosage": 23,
            "dosage_unit": "gm",
            "intake_route": "Intramuscular",
            "site": "Left Gluteal",
            "injection_lot_number": "12",
            "duration": 2,
            "duration_unit": "weeks",
            "note_to_nurse": "injectable suspension ",
            "date_of_expiry": "2018-01-01",
            "frequency": "4 times a day",
            "comments": "injectable suspension ",
            "is_administered": "yes",
            "date_of_injection": "13-03-2015 14:00:24",
            "encounter_id": "100000000000002725",
            "ordering_provider_id": "100000000000000161",
            "ordering_provider_name": "malarvizhi"
        },
        {
            "injection_id": "100000000000003039",
            "injection_name": "Accolate",
            "patient_injection_map_id": "100000000000003041",
            "patient_id": "100000000000002695",
            "dosage": 12,
            "dosage_unit": "ml",
            "intake_route": "Intradermal",
            "site": "Left Deltoid",
            "injection_lot_number": "13",
            "duration": 22,
            "duration_unit": "days",
            "note_to_nurse": "",
            "date_of_expiry": "2016-01-10",
            "frequency": "Once a day",
            "comments": "",
            "is_administered": "yes",
            "date_of_injection": "13-03-2015 14:00:24",
            "encounter_id": "100000000000002725",
            "ordering_provider_id": "100000000000000161",
            "ordering_provider_name": "malarvizhi"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "date_of_injection",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
encounter_id required long Encounter ID

Search Injections

GET /api/ehr/v1/injections/search

list of injections for search

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "injections": [
        {
            "injection_id": "100000000000005039",
            "injection_name": "Kenalog 10"
        },
        {
            "injection_id": "100000000000006013",
            "injection_name": "Kenalog 10 Micromedex"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "injection_name",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "injection_name",
                "search_text": "Kenalog",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
injection_name required string

Add injection

POST /api/ehr/v1/patients/{patient_id}/injections

Used to add an injection of a patient

Request Example


{
    "name ": "Plenaxis",
    "dosage": "<Dosage>",
    "dosage_unit": "<ml | mg | mg/ml | mg/liter | mol/liter | mol/ml | mcg/ml | % | Units | gm>",
    "duration": "<Duration>",
    "duration_unit": "<DurationUnit>",
    "route": "Intramuscular",
    "site": "<Site>",
    "lot_number": "16",
    "is_administered": "Yes/No",
    "expiry_date": "2018-01-01",
    "frequency": "4 times a day",
    "note_to_nurse": "injectable suspension",
    "comments": "injectable suspension",
    "encounter_id": "100000000000002725"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Injection saved successfully.",
    "injection": {
        "patient_injection_id": "100000000000013019",
        "dosage": "3.8",
        "dosage_unit": "mg",
        "intake_route": "Intramuscular",
        "site": "site",
        "duration": "78",
        "duration_unit": "days",
        "note_to_nurse": "nurse notes",
        "comments": "comments",
        "frequency": "Twice a day",
        "date_of_expiry": "2019-01-01"
    }
}

Request Attributes

Name
Description
injection_name
required,    string
Name of the injection
dosage
optional,    float
dosage of the injection
dosage_unit
optional,    string
unit of the dosage
duration
optional,    int
Duration
duration_unit
optional,    string
Duration Unit
route
required,    string
Route of the injection
site
optional,    string
Site of the injection
lot_number
optional,    string
Lot number of the Injection
is_administered
required,    boolean
injection is administered or not
expiry_date
optional,    string
expiry date of the injection[format:]
frequency
required,    string
frequency of the injection
note_to_nurse
optional,    string
Nurse notes
comments
optional,    string
comments of the injection
date_of_injection
required,    string
date of the injection [format:]
encounter_id
required,    long
Encounter id

Update injection

PUT /api/ehr/v1/patients/{patient_id}/injections//

Used to update an injection of a patient

Request Example


{
    "dosage": "3.8",
    "dosage_unit": "mg",
    "duration": "78",
    "duration_unit": "days",
    "route": "Intramuscular",
    "site": "Right Deltoid",
    "lot_number": "16",
    "is_administered": "Yes/No",
    "expiry_date": "2018-01-01",
    "frequency": "4 times a day",
    "note_to_nurse": "injectable suspension",
    "comments": "injectable suspension",
    "encounter_id": "100000000000002725"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Injection updated successfully.",
    "injection": {
        "patient_injection_id": "100000000000013019",
        "dosage": "3.8",
        "dosage_unit": "mg",
        "intake_route": "Intramuscular",
        "site": "Right Deltoid",
        "duration": "78",
        "duration_unit": "days",
        "note_to_nurse": "nurse notes",
        "comments": "comments",
        "frequency": "Twice a day",
        "date_of_expiry": "2019-01-01"
    }
}

Request Attributes

Name
Description
dosage
optional,    float
dosage of the injection
dosage_unit
optional,    string
unit of the dosage
duration
optional,    int
Duration
duration_unit
optional,    string
Duration Unit
route
required,    string
Route of the injection
site
optional,    string
Site of the injection
lot_number
optional,    string
Lot number of the Injection
is_administered
required,    boolean
injection is administered or not
expiry_date
optional,    string
expiry date of the injection[format:]
frequency
required,    string
frequency of the injection
note_to_nurse
optional,    string
Nurse notes
comments
optional,    string
comments of the injection
date_of_injection
required,    string
date of the injection [format:]
encounter_id
required,    long
Encounter id

Get Injection

GET /api/ehr/v1/patients/{patient_id}/injections/{patient_injection_id}

Get Injection

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "injection": {
        "patient_injection_id": "100000000000017075",
        "dosage": 90,
        "dosage_unit": "mol/liter",
        "intake_route": "Intradermal",
        "site": "Left Deltoid",
        "duration": 78,
        "duration_unit": "weeks",
        "note_to_nurse": "Note to Nurse ",
        "comments": "comments",
        "frequency": "Twice a day",
        "date_of_expiry": "2019-01-01"
    }
}

Query Parameters

Name Required Type Description

Delete injection

DELETE /api/ehr/v1/patients/{patient_id}/injections/{patient_injection_id}

Delete injection

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "injection deleted successfully."
}

Query Parameters

Name Required Type Description

List Template Injections

GET /api/ehr/v1//injection_templates/{template_id}

List Template Injections

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "injectiontemplates": [
        {
            "injection_id": "100000000000002731",
            "injection_name": "Accolate",
            "dosage": 2,
            "dosage_unit": "",
            "intake_route": "",
            "site": "",
            "injection_lot_number": "",
            "duration": "",
            "duration_unit": "",
            "note_to_nurse": "",
            "date_of_expiry": "",
            "frequency": "",
            "comments": "",
            "position": 0
        },
        {
            "injection_id": "100000000000013005",
            "injection_name": "Plenaxis",
            "dosage": 1,
            "dosage_unit": "mol/ml",
            "intake_route": "Subcutaneous",
            "site": "Left Gluteal",
            "injection_lot_number": "23",
            "duration": 23,
            "duration_unit": "months",
            "note_to_nurse": "note to nurse",
            "date_of_expiry": "2017-01-01",
            "frequency": "Once a week",
            "comments": "comments",
            "position": 1
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "position",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description

List Injection Metrics

GET /api/ehr/v1/injections_metrics

List Injection Metrics

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "injections_metrics": {
        "sites": [
            {
                "value": "Right Deltoid",
                "label": "Right Deltoid"
            },
            {
                "value": "Left Deltoid",
                "label": "Left Deltoid"
            },
            {
                "value": "Right Gluteal",
                "label": "Right Gluteal"
            },
            {
                "value": "Left Gluteal",
                "label": "Left Gluteal"
            },
            {
                "value": "Right Thigh",
                "label": "Right Thigh"
            },
            {
                "value": "Left Thigh",
                "label": "Left Thigh"
            },
            {
                "value": "Others",
                "label": "Others"
            }
        ],
        "duration": [
            {
                "value": "days",
                "label": "days"
            },
            {
                "value": "weeks",
                "label": "weeks"
            },
            {
                "value": "months",
                "label": "months"
            },
            {
                "value": "years",
                "label": "years"
            }
        ],
        "routes": [
            {
                "value": "Intramuscular",
                "label": "Intramuscular"
            },
            {
                "value": "Intravenous",
                "label": "Intravenous"
            },
            {
                "value": "Intradermal",
                "label": "Intradermal"
            },
            {
                "value": "Subcutaneous",
                "label": "Subcutaneous"
            },
            {
                "value": "Intraosseous",
                "label": "Intraosseous"
            }
        ],
        "frequency": [
            {
                "value": "Once",
                "label": "Once"
            },
            {
                "value": "Once a day",
                "label": "Once a day"
            },
            {
                "value": "Twice a day",
                "label": "Twice a day"
            },
            {
                "value": "3 times a day",
                "label": "3 times a day"
            },
            {
                "value": "4 times a day",
                "label": "4 times a day"
            },
            {
                "value": "5 times a day",
                "label": "5 times a day"
            },
            {
                "value": "Every 4 hours",
                "label": "Every 4 hours"
            },
            {
                "value": "Every 3 hours",
                "label": "Every 3 hours"
            },
            {
                "value": "Once a week",
                "label": "Once a week"
            },
            {
                "value": "2 times per week",
                "label": "2 times per week"
            },
            {
                "value": "3 times per week",
                "label": "3 times per week"
            },
            {
                "value": "4 times per week",
                "label": "4 times per week"
            },
            {
                "value": "5 times per week",
                "label": "5 times per week"
            },
            {
                "value": "6 times per week",
                "label": "6 times per week"
            },
            {
                "value": "Once every 2 weeks",
                "label": "Once every 2 weeks"
            },
            {
                "value": "Once every 3 weeks",
                "label": "Once every 3 weeks"
            },
            {
                "value": "Once a month",
                "label": "Once a month"
            },
            {
                "value": "Once every 5 weeks",
                "label": "Once every 5 weeks"
            },
            {
                "value": "Once every 6 weeks",
                "label": "Once every 6 weeks"
            },
            {
                "value": "Once every 7 weeks",
                "label": "Once every 7 weeks"
            },
            {
                "value": "Once every 2 months",
                "label": "Once every 2 months"
            },
            {
                "value": "Once every 3 months",
                "label": "Once every 3 months"
            },
            {
                "value": "As needed",
                "label": "As needed"
            }
        ],
        "intravenous_sites": [
            {
                "value": "Cephalic Vein - RH",
                "label": "Cephalic Vein - RH"
            },
            {
                "value": "Basilic Vein - RH",
                "label": "Basilic Vein - RH"
            },
            {
                "value": "Brachial Vein - RH",
                "label": "Brachial Vein - RH"
            },
            {
                "value": "Median Vein - RH",
                "label": "Median Vein - RH"
            },
            {
                "value": "Dorsal Metacarpal Vein -RH",
                "label": "Dorsal Metacarpal Vein -RH"
            },
            {
                "value": "Cephalic Vein - LH",
                "label": "Cephalic Vein - LH"
            },
            {
                "value": "Basilic Vein - LH",
                "label": "Basilic Vein - LH"
            },
            {
                "value": "Brachial Vein - LH",
                "label": "Brachial Vein - LH"
            },
            {
                "value": "Median Vein - LH",
                "label": "Median Vein - LH"
            },
            {
                "value": "Great Saphenous Vein - LF",
                "label": "Great Saphenous Vein - LF"
            },
            {
                "value": "Small Saphenous Vein - RF",
                "label": "Small Saphenous Vein - RF"
            },
            {
                "value": "Internal Jugular Vein - LF",
                "label": "Internal Jugular Vein - LF"
            },
            {
                "value": "Femoral vein",
                "label": "Femoral vein"
            },
            {
                "value": "Others",
                "label": "Others"
            }
        ],
        "dosage_units": [
            {
                "value": "gm",
                "label": "gm"
            },
            {
                "value": "ml",
                "label": "ml"
            },
            {
                "value": "mg",
                "label": "mg"
            },
            {
                "value": "mg/ml",
                "label": "mg/ml"
            },
            {
                "value": "mg/liter",
                "label": "mg/liter"
            },
            {
                "value": "mol/ml",
                "label": "mol/ml"
            },
            {
                "value": "mol/liter",
                "label": "mol/liter"
            },
            {
                "value": "mcg/ml",
                "label": "mcg/ml"
            },
            {
                "value": "%",
                "label": "%"
            },
            {
                "value": "Units",
                "label": "Units"
            }
        ]
    }
}

Query Parameters

Name Required Type Description

Vaccine

API for Vaccines

List Vaccines

GET /api/ehr/v1/patients/{patient_id}/vaccines

List Vaccines

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccines": [
        {
            "vaccine_name": "Name",
            "patient_vaccine_map_id": "100000000000009007",
            "patient_id": "100000000000003003",
            "dosage": 13.7,
            "dosage_unit": "mg",
            "intake_route": "ID",
            "site": "LT",
            "vaccine_lot_number": "223",
            "note_to_nurse": "notes",
            "date_of_expiry": "2010-04-04",
            "ordering_provider_id": "",
            "ordering_provider_name": "",
            "is_administered": "",
            "date_of_vaccination": "28-03-2015 17:34:49",
            "encounter_id": ""
        },
        {
            "vaccine_name": "Name",
            "patient_vaccine_map_id": "100000000000004015",
            "patient_id": "100000000000003003",
            "dosage": 13.7,
            "dosage_unit": "mg",
            "intake_route": "ID",
            "site": "LT",
            "vaccine_lot_number": "223",
            "note_to_nurse": "notes",
            "date_of_expiry": "2010-04-04",
            "ordering_provider_id": "",
            "ordering_provider_name": "",
            "is_administered": "",
            "date_of_vaccination": "26-03-2015 16:04:31",
            "encounter_id": ""
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "date_of_vaccination",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
encounter_id optional long Encounter ID

Search Vaccines to add

GET /api/ehr/v1/vaccines/search

Search vaccines to add

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccines": [
        {
            "vaccine_id": "100000000000002091",
            "vaccine_name": "Adenovirus types 4 and 7"
        },
        {
            "vaccine_id": "100000000000000985",
            "vaccine_name": "Anthrax"
        },
        {
            "vaccine_id": "100000000000000977",
            "vaccine_name": "BCG"
        },
        {
            "vaccine_id": "100000000000000989",
            "vaccine_name": "Botulinum antitoxin"
        },
        {
            "vaccine_id": "100000000000000993",
            "vaccine_name": "CMVIG"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": true,
        "sort_column": "vaccine_name",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description
vaccine_name optional string Search with vaccines; Variants : vaccine_name_contains and vaccine_name_startswith

Add Vaccine

POST /api/ehr/v1/patients/{patient_id}/vaccines

Add vaccine

Request Example


{
    "name": "MMR",
    "code": "03",
    "vfc_eligibility": "Not VFC eligible",
    "notes": "notes",
    "expiry_date": "2010-04-04",
    "is_administered": "Yes",
    "send_immunization_to_IR": "yes",
    "facility_id": "100000000000000915",
    "patient_vaccine_id": "100000000000010001",
    "vaccine_name": "MMR",
    "administering_provider": "100000000000089",
    "dosage": "13.7",
    "dosage_unit": "mg",
    "route": "ID",
    "site": "LT"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Vaccine added successfully.",
    "vaccine": {
        "patient_vaccine_id": "100000000000010001",
        "vaccine_name": "MMR",
        "administering_provider": "100000000000089",
        "vaccine_cvx_code": "03",
        "vaccine_manufacturer": "Abbott Laboratories",
        "dosage": "13.7",
        "dosage_unit": "mg",
        "route": "ID",
        "site": "LT",
        "notes": "notes",
        "date_of_expiry": "2010-04-04"
    }
}

Request Attributes

Name
Description
name
required,    string
Name of the vaccine
route
optional,    string
Route of administration
is_administered
optional,    string
Yes/No
lot_number
optional,    string
Lot Number
manufacturer
optional,    long
Manufacturer
expiry_date
optional,    string
Expiry Date
number_in_series
optional,    int
Number in Series
dosage
optional,    float
Dosage
dosage_unit
optional,    string
Dosage Unit
site
optional,    string
Site of administration
adminstering_provider
optional,    long
Provider ID
vfc_eligibility
optional,    string
VFC Eligibility
facility_id
required,    long
Facility ID
send_immunizations_to_IR
optional,    string
Yes/No
VIS_given_to_patient
optional,    string
Yes/No
notes
optional,    string
Notes

Update a Vaccine

PUT /api/ehr/v1/patients/{patient_id}/vaccines/{patient_vaccine_id}

Update a Vaccine

Request Example


{
    "dosage": "13.7",
    "dosage_unit": "mg",
    "route": "ID",
    "site": "LT",
    "administering_provider": "100000000000089",
    "manufacturer": "Abbott Laboratories",
    "notes": "notes",
    "expiry_date": "2019-04-04"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Vaccine updated successfully.",
    "vaccine": {
        "patient_vaccine_id": "100000000000010001",
        "vaccine_name": "MMR",
        "administering_provider": "100000000000089",
        "vaccine_cvx_code": "03",
        "vaccine_manufacturer": "Abbott Laboratories",
        "dosage": "13.7",
        "dosage_unit": "mg",
        "route": "ID",
        "site": "LT",
        "notes": "notes",
        "date_of_expiry": "2019-04-04"
    }
}

Request Attributes

Name
Description
is_administered
optional,    string
Yes/No
lot_number
optional,    string
Lot Number
manufacturer
optional,    long
Manufacturer
expiry_date
optional,    string
Expiry Date
number_in_series
optional,    int
Number in Series
dosage
optional,    float
Dosage
dosage_unit
optional,    string
Dosage Unit
route
required,    string
Route of administration
site
optional,    string
Site of administration
adminstering_provider
optional,    long
Provider ID
vfc_eligibility
optional,    string
VFC Eligibility
facility_id
optional,    long
Facility ID
send_immunizations_to_IR
optional,    string
Yes/No
VIS_given_to_patient
optional,    string
Yes/No
notes
optional,    string
Notes

Delete Vaccine

DELETE /api/ehr/v1/patients/{patient_id}/vaccines/{patient_vaccine_id}

Delete Vaccine

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "vaccine deleted successfully."
}

Query Parameters

Name Required Type Description

Get Vaccine

GET /api/ehr/v1/patients/{patient_id}/vaccines/{patient_vaccine_id}

Get Vaccine

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccine": {
        "patient_vaccine_id": "100000000000010001",
        "vaccine_name": "MMR",
        "administering_provider": "100000000000089",
        "vaccine_cvx_code": "03",
        "vaccine_manufacturer": "Abbott Laboratories",
        "dosage": 13.7,
        "dosage_unit": "mg",
        "route": "ID",
        "site": "LT",
        "notes": "notes",
        "date_of_expiry": "2019-04-04"
    }
}

Query Parameters

Name Required Type Description

List Template Vaccines

GET /api/ehr/v1/vaccine_templates/{template_id}

List Template Vaccines

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccinetemplates": [
        {
            "vaccine_id": "",
            "vaccine_name": "vaccine p",
            "dosage": 12,
            "dosage_unit": "mg",
            "intake_route": "NS",
            "site": "LD",
            "vaccine_lot_number": "102",
            "note_to_nurse": "subrah test",
            "date_of_expiry": "2015-01-10",
            "position": 0
        },
        {
            "vaccine_id": "",
            "vaccine_name": "MMR",
            "dosage": 0.5,
            "dosage_unit": "ml",
            "intake_route": "SC",
            "site": "LLFA",
            "vaccine_lot_number": "02",
            "note_to_nurse": "testing for malar",
            "date_of_expiry": "2015-01-02",
            "position": 1
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "position",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description

List Vaccine Metrics

GET /api/ehr/v1/vaccines_metrics

List Vaccine Metrics

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccines_metrics": {
        "site": [
            {
                "value": "LA",
                "label": "Left Arm"
            },
            {
                "value": "LD",
                "label": "Left Deltoid"
            },
            {
                "value": "LG",
                "label": "Left Gluteous Medius"
            },
            {
                "value": "LLFA",
                "label": "Left Lower Forearm"
            },
            {
                "value": "LT",
                "label": "Left Thigh"
            },
            {
                "value": "LVL",
                "label": "Left Vastus Lateralis"
            },
            {
                "value": "RA",
                "label": "Right Arm"
            },
            {
                "value": "RD",
                "label": "Right Deltoid"
            },
            {
                "value": "RG",
                "label": "Right Gluteous Medius"
            },
            {
                "value": "RLFA",
                "label": "Right Lower Forearm"
            },
            {
                "value": "RT",
                "label": "Right Thigh"
            },
            {
                "value": "RVL",
                "label": "Right Vastus Lateralis"
            }
        ],
        "dosageunits": [
            {
                "value": "mg",
                "label": "mg"
            },
            {
                "value": "ml",
                "label": "ml"
            }
        ],
        "route": [
            {
                "value": "IM",
                "label": "Intramuscular"
            },
            {
                "value": "ID",
                "label": "Intradermal"
            },
            {
                "value": "NS",
                "label": "Nasal"
            },
            {
                "value": "IV",
                "label": "Intravenous"
            },
            {
                "value": "PO",
                "label": "Oral"
            },
            {
                "value": "SC",
                "label": "Subcutaneous"
            },
            {
                "value": "TD",
                "label": "Transdermal"
            }
        ],
        "VFCEligibility": [
            {
                "value": "V07",
                "label": "Local-specific eligibility"
            },
            {
                "value": "V05",
                "label": "VFC eligible-Federally Qualified Health Center Patient (under-insured)"
            },
            {
                "value": "V04",
                "label": "VFC eligible-American Indian/Alaskan Native"
            },
            {
                "value": "V03",
                "label": "VFC eligible-Uninsured"
            },
            {
                "value": "V02",
                "label": "VFC eligible-Medicaid/Medicaid Managed Care"
            },
            {
                "value": "V01",
                "label": "Not VFC eligible"
            }
        ]
    }
}

Query Parameters

Name Required Type Description

List Vaccine Manufacturers

GET /api/ehr/v1/vaccine_manufacturers/search

List Vaccine Manufacturers

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "manufacturers": [
        {
            "manufacturer_id": "100000000000002207",
            "manufacturer_name": "Abbott Laboratories"
        },
        {
            "manufacturer_id": "100000000000002209",
            "manufacturer_name": "Acambis, Inc"
        },
        {
            "manufacturer_id": "100000000000002211",
            "manufacturer_name": "Adams Laboratories, Inc."
        },
        {
            "manufacturer_id": "100000000000002213",
            "manufacturer_name": "Akorn, Inc"
        },
        {
            "manufacturer_id": "100000000000002215",
            "manufacturer_name": "Alpha Therapeutic Corporation"
        },
        {
            "manufacturer_id": "100000000000002217",
            "manufacturer_name": "Armour"
        },
        {
            "manufacturer_id": "100000000000002219",
            "manufacturer_name": "Aventis Behring L.L.C."
        },
        {
            "manufacturer_id": "100000000000002221",
            "manufacturer_name": "Aviron"
        },
        {
            "manufacturer_id": "100000000000002233",
            "manufacturer_name": "Barr Laboratories"
        },
        {
            "manufacturer_id": "100000000000002225",
            "manufacturer_name": "Baxter Healthcare Corporation"
        },
        {
            "manufacturer_id": "100000000000002223",
            "manufacturer_name": "Baxter Healthcare Corporation-inactive"
        },
        {
            "manufacturer_id": "100000000000002227",
            "manufacturer_name": "Bayer Corporation"
        },
        {
            "manufacturer_id": "100000000000002229",
            "manufacturer_name": "Berna Products"
        },
        {
            "manufacturer_id": "100000000000002231",
            "manufacturer_name": "Berna Products Corporation"
        },
        {
            "manufacturer_id": "100000000000002235",
            "manufacturer_name": "Biotest Pharmaceuticals Corporation"
        },
        {
            "manufacturer_id": "100000000000002241",
            "manufacturer_name": "Cangene Corporation"
        },
        {
            "manufacturer_id": "100000000000002243",
            "manufacturer_name": "Celltech Medeva Pharmaceuticals"
        },
        {
            "manufacturer_id": "100000000000002245",
            "manufacturer_name": "Centeon L.L.C."
        },
        {
            "manufacturer_id": "100000000000002247",
            "manufacturer_name": "Chiron Corporation"
        },
        {
            "manufacturer_id": "100000000000002249",
            "manufacturer_name": "Connaught"
        },
        {
            "manufacturer_id": "100000000000002239",
            "manufacturer_name": "CSL Behring, Inc"
        },
        {
            "manufacturer_id": "100000000000002251",
            "manufacturer_name": "DynPort Vaccine Company, LLC"
        },
        {
            "manufacturer_id": "100000000000002237",
            "manufacturer_name": "Emergent BioDefense Operations Lansing"
        },
        {
            "manufacturer_id": "100000000000002253",
            "manufacturer_name": "Evans Medical Limited"
        },
        {
            "manufacturer_id": "100000000000002255",
            "manufacturer_name": "GeoVax Labs, Inc."
        },
        {
            "manufacturer_id": "100000000000002259",
            "manufacturer_name": "Greer Laboratories, Inc."
        },
        {
            "manufacturer_id": "100000000000002261",
            "manufacturer_name": "Immuno International AG"
        },
        {
            "manufacturer_id": "100000000000002263",
            "manufacturer_name": "Immuno-U.S., Inc."
        },
        {
            "manufacturer_id": "100000000000002265",
            "manufacturer_name": "Intercell Biomedical"
        },
        {
            "manufacturer_id": "100000000000002331",
            "manufacturer_name": "Johnson and Johnson"
        },
        {
            "manufacturer_id": "100000000000002267",
            "manufacturer_name": "Korea Green Cross Corporation"
        },
        {
            "manufacturer_id": "100000000000002269",
            "manufacturer_name": "Lederle"
        },
        {
            "manufacturer_id": "100000000000002271",
            "manufacturer_name": "Massachusetts Biologic Laboratories"
        },
        {
            "manufacturer_id": "100000000000002273",
            "manufacturer_name": "Massachusetts Public Health Biologic Laboratories"
        },
        {
            "manufacturer_id": "100000000000002275",
            "manufacturer_name": "MedImmune, Inc."
        },
        {
            "manufacturer_id": "100000000000002277",
            "manufacturer_name": "Merck&Co.,Inc."
        },
        {
            "manufacturer_id": "100000000000002279",
            "manufacturer_name": "Merieux"
        },
        {
            "manufacturer_id": "100000000000002281",
            "manufacturer_name": "Miles"
        },
        {
            "manufacturer_id": "100000000000002283",
            "manufacturer_name": "NABI"
        },
        {
            "manufacturer_id": "100000000000002285",
            "manufacturer_name": "New York Blood Center"
        },
        {
            "manufacturer_id": "100000000000002287",
            "manufacturer_name": "North American Vaccine, Inc."
        },
        {
            "manufacturer_id": "100000000000002289",
            "manufacturer_name": "Novartis Pharmaceutical Corporation"
        },
        {
            "manufacturer_id": "100000000000002291",
            "manufacturer_name": "Novavax, Inc."
        },
        {
            "manufacturer_id": "100000000000002293",
            "manufacturer_name": "Organon Teknika Corporation"
        },
        {
            "manufacturer_id": "100000000000002295",
            "manufacturer_name": "Ortho-clinical Diagnostics"
        },
        {
            "manufacturer_id": "100000000000002327",
            "manufacturer_name": "Other manufacturer"
        },
        {
            "manufacturer_id": "100000000000002297",
            "manufacturer_name": "Parkedale Pharmaceuticals"
        },
        {
            "manufacturer_id": "100000000000002299",
            "manufacturer_name": "Pfizer, Inc"
        },
        {
            "manufacturer_id": "100000000000002301",
            "manufacturer_name": "PowderJect Pharmaceuticals"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": true,
        "sort_column": "manufacturer_name",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description

List Vaccine Inventory

GET /api/ehr/v1/vaccines/{vaccine_id}/inventory

List Vaccine Inventory

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "vaccine_inventory": {
        "vis_details": [
            {
                "vis_id": "100000000000000915",
                "vis_name": "DTaP",
                "group_cvx_code": "107",
                "vis_published_date": "2007-05-17"
            },
            {
                "vis_id": "100000000000000917",
                "vis_name": "Hib",
                "group_cvx_code": "17",
                "vis_published_date": "2014-02-04"
            },
            {
                "vis_id": "100000000000000943",
                "vis_name": "Polio",
                "group_cvx_code": "89",
                "vis_published_date": "2011-11-08"
            }
        ],
        "inventory": [
            {
                "batch_number": "12345",
                "manufacturer": "CSL Behring, Inc",
                "quantity": 123,
                "inventory_expiry_date": "2017-11-08"
            }
        ]
    }
}

Query Parameters

Name Required Type Description

Supplements

API for Supplements

List Supplements

GET /api/ehr/v1/patients/{patient_id}/supplements

List the supplements added for a patient

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "supplements": [
        {
            "patient_supplement_id": "100000000000052031",
            "patient_id": "100000000000002697",
            "supplement_name": "Feosol",
            "strength": "",
            "dosage_form": "",
            "generic_supplement_name": "Feosol",
            "route": "",
            "date_of_entry": "2015-04-10",
            "supplement_type": "Manufactured",
            "manufacturer_id": "",
            "start_date": "2014-10-20",
            "end_date": "2015-01-01",
            "dosage": 1,
            "dosage_unit": "",
            "frequency": "Once a day",
            "intake_type": "Before Meals",
            "status": 1,
            "duration_in_days": "",
            "weaning_schedule": "",
            "comments": "",
            "preparation": "",
            "refills": "",
            "encounter_id": ""
        },
        {
            "patient_supplement_id": "100000000000052033",
            "patient_id": "100000000000002697",
            "supplement_name": "Black Cohosh",
            "strength": "",
            "dosage_form": "",
            "generic_supplement_name": "Black Cohosh",
            "route": "",
            "date_of_entry": "2015-04-10",
            "supplement_type": "Manufactured",
            "manufacturer_id": "",
            "start_date": "2013-01-01",
            "end_date": "2015-01-01",
            "dosage": 2,
            "dosage_unit": "",
            "frequency": "Once a day",
            "intake_type": "After Meals",
            "status": 1,
            "duration_in_days": "",
            "weaning_schedule": "",
            "comments": "",
            "preparation": "",
            "refills": "",
            "encounter_id": ""
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "applied_filter": "Status.Active",
        "sort_column": "date_of_entry",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
filter_by optional string filter by the status
encounter_id optional long Encounter ID

Get Supplement

GET /api/ehr/v1/patients/{patient_id}/supplements/{patient_supplement_id}

Get the supplement details

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "patient_supplement": {
        "patient_id": "100000000000002697",
        "patient_supplement_id": "100000000000052033",
        "supplement_name": "Black Cohosh",
        "strength": "",
        "dosage_form": "",
        "generic_supplement_name": "Black Cohosh",
        "supplement_type": "Manufactured",
        "manufacturer_id": "",
        "start_date": "2013-01-01",
        "end_date": "2015-01-01",
        "dosage": 2,
        "dosage_unit": "tablet(s)",
        "frequency": "Once a day",
        "intake_type": "After Meals",
        "status": true,
        "route": "",
        "duration_in_days": "",
        "weaning_schedule": "",
        "comments": "",
        "preparation": "",
        "refills": "",
        "encounter_id": ""
    }
}

Query Parameters

Name Required Type Description

Add Supplement

POST /api/ehr/v1/patients/{patient_id}/supplements

Add a supplement to patient

Request Example


{
    "supplement_name": "Indian Long Pepper",
    "supplement_type": "Manufactured",
    "manufacturer_id": "100000000000052039",
    "start_date": "2014-01-01",
    "end_date": "2014-02-02",
    "dosage": "10",
    "dosage_unit": "teaspoon",
    "frequency": "Once a week",
    "intake_type": "Before Meals",
    "status": "Active",
    "strength": "10",
    "dose_form": "capsule",
    "route": "Oral",
    "duration_in_days": "3",
    "weaning_schedule": "",
    "comments": ""
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "",
    "patient_supplement": {
        "patient_id": "100000000000002617",
        "patient_supplement_id": "100000000000002659",
        "supplement_name": "supplement 1",
        "strength": "",
        "dosage_form": "",
        "generic_supplement_name": "supplement 1",
        "supplement_type": "Manufactured",
        "manufacturer_id": "100000000000002649",
        "start_date": "2014-01-01",
        "end_date": "2014-02-02",
        "dosage": 10,
        "dosage_unit": "mg",
        "frequency": "Once a day",
        "intake_type": "After Meals",
        "status": true,
        "route": "Oral",
        "duration_in_days": 3,
        "weaning_schedule": "test ws",
        "comments": "test coments ",
        "preparation": "Vial",
        "refills": 10,
        "encounter_id": "100000000000002647"
    }
}

Request Attributes

Name
Description
supplement_name
required,    string
Name of the supplement
supplement_type
required
Manufactured/Compounded
encounter_id
optional,    long
Encounter ID
manufacturer_id
optional,    string
Manufacturer ID
start_date
optional,    string
Starting date of the supplement
end_date
optional,    string
Ending date of the supplement
dosage
optional,    float
Dosage
dosage_unit
optional,    string
Dosage Unit
frequency
optional,    string
Frequency
intake_type
optional,    string
Intake Type
status
optional
Active/Inactive
strength
optional,    float
string
dose_form
optional,    string
Dose Form
route
optional,    string
Route of administration
duration_in_days
optional,    int
Duration
weaning_schedule
optional,    string
Weaning Schedule
comments
optional,    string
Comments
preparation
optional,    string
Preparation
refills
optional,    int
Refills

Update Supplement

PUT /api/ehr/v1/patients/{patient_id}/supplements/{patient_supplement_id}

Update supplement details

Request Example


{
    "supplement_name": "Poria Mushroom",
    "supplement_type": "Manufactured",
    "manufacturer_id": "100000000000052039",
    "start_date": "2014-01-01",
    "end_date": "2014-02-02",
    "dosage": "10",
    "dosage_unit": "teaspoon",
    "frequency": "Once a week",
    "intake_type": "Before Meals",
    "status": "Active",
    "strength": "10",
    "dose_form": "capsule",
    "route": "Oral",
    "duration_in_days": "3",
    "weaning_schedule": "",
    "comments": ""
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Supplement updated successfully",
    "patient_supplement": {
        "patient_id": "100000000000002697",
        "patient_supplement_id": "100000000000052043",
        "supplement_name": "Poria Mushroom",
        "strength": "10",
        "dosage_form": "capsule",
        "generic_supplement_name": "Poria Mushroom 10 capsule",
        "supplement_type": "Manufactured",
        "manufacturer_id": "100000000000052039",
        "start_date": "2014-01-01",
        "end_date": "2014-02-02",
        "dosage": 10,
        "dosage_unit": "teaspoon",
        "frequency": "Once a week",
        "intake_type": "Before Meals",
        "status": true,
        "route": "Oral",
        "duration_in_days": 3,
        "weaning_schedule": "",
        "comments": "",
        "preparation": "",
        "refills": "",
        "encounter_id": ""
    }
}

Request Attributes

Name
Description
supplement_name
required,    string
Name of the supplement
supplement_type
required
Manufactured/Compounded
encounter_id
optional,    long
Encounter ID
manufacturer_id
optional,    string
Manufacturer ID
start_date
optional,    string
Starting date of the supplement
end_date
optional,    string
Ending date of the supplement
dosage
optional,    float
Dosage
dosage_unit
optional,    string
Dosage Unit
frequency
optional,    string
Frequency
intake_type
optional,    string
Intake Type
status
optional
Active/Inactive
strength
optional,    float
string
dose_form
optional,    string
Dose Form
route
optional,    string
Route of administration
duration_in_days
optional,    int
Duration
weaning_schedule
optional,    string
Weaning Schedule
comments
optional,    string
Comments
preparation
optional,    string
Preparation
refills
optional,    int
Refills

Delete Supplement

DELETE /api/ehr/v1/patients/{patient_id}/supplements/{patient_supplement_id}

Delete a supplement

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Supplements deleted successfully."
}

Query Parameters

Name Required Type Description

Allergies

API for allergies

List Allergies

GET /api/ehr/v1/patients/{patient_id}/allergies

List Allergies

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "allergies": [
        {
            "patient_allergy_id": "100000000000008029",
            "patient_id": "100000000000002625",
            "allergen": "Pollen",
            "type": "Plant",
            "severity": "Severe",
            "observed_on": "2012-02-05",
            "status": 1,
            "reactions": "swelling of the nasal mucosa (allergic rhinitis) runny nose, sneezing",
            "date_of_entry": "2015-02-16"
        },
        {
            "patient_allergy_id": "100000000000008035",
            "patient_id": "100000000000002625",
            "allergen": "Long Travel",
            "type": "Environmental",
            "severity": "Severe",
            "observed_on": "2002-01-01",
            "status": 1,
            "reactions": "feeling of fullness, possibly pain, and impaired hearing due to the lack of eustachian tube drainage.",
            "date_of_entry": "2015-02-16"
        },
        {
            "patient_allergy_id": "100000000000008041",
            "patient_id": "100000000000002625",
            "allergen": "penicillin",
            "type": "Medication",
            "severity": "Moderate",
            "observed_on": "2011-05-05",
            "status": 1,
            "reactions": "Anaphylactic reactions",
            "date_of_entry": "2015-02-16"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "applied_filter": "Status.Active",
        "sort_column": "date_of_entry",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
filter_by optional string Filter allergies based on the status; Allowed values : Status.All, Status.Active and Status.Inactive.

Search Allergies to add

GET /api/ehr/v1/allergies/search

Search Allergies to add

Request Example


{
    "allergen_contains": "a"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "allergens": [
        {
            "allergy_id": "100000000000003031",
            "allergen": "Long Travel",
            "type": "Environmental",
            "rx_norm_code": ""
        },
        {
            "allergy_id": "100000000000003015",
            "allergen": "warfarin",
            "type": "Medication",
            "rx_norm_code": ""
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": "false",
        "sort_column": "allergen",
        "sort_order": "A",
        "search_criteria": [
            {
                "column_name": "allergen",
                "search_text": "a",
                "comparator": "contains"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
allergen optional string Allergen to search.
type optional string Type of allergen to search; Allowed vlaues: Medication, Environmental, Food, Plant, Animal

Get Allergy

GET /api/ehr/v1/patients/{patient_id}/allergies/{patient_allergy_id}

Get a patient allergy with details

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "patient_allergy": {
        "patient_id": "100000000000002617",
        "patient_allergy_id": "100000000000003258",
        "allergen": "Aspirin",
        "type": "Medication",
        "severity": "Severe",
        "observed_on": "2013-01-10",
        "status": "Active",
        "reactions": "red rashes on skin"
    }
}

Add an Allergy

POST /api/ehr/v1/patients/{patient_id}/allergies

adds an allergy to patient record with the given details and returns allergy details

Request Example


{
    "type": "Plant",
    "allergen": "Pollen",
    "severity": "Severe",
    "status": "Active",
    "date": "2014-01-01",
    "reactions": "swelling of the nasal mucosa (allergic rhinitis) runny nose, sneezing"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Allergy added successfully",
    "patient_allergy": {
        "patient_id": "100000000000002697",
        "patient_allergy_id": "100000000000053005",
        "allergen": "Pollen",
        "type": "Plant",
        "severity": "Severe",
        "observed_on": "2014-01-01",
        "status": "Active",
        "reactions": "swelling of the nasal mucosa (allergic rhinitis) runny nose, sneezing"
    }
}

Request Attributes

Name
Description
type
required,    string
Type of allergen; Allowed values: Medication, Environmental, Food, Plant, Animal
allergen
required,    string[100]
Name of the allergen; maximum-limit:100
severity
required,    string
Severity of allergy; Allowed values : Severe, Moderate, Mild
status
required,    string
Status of the allergy; Allowed values : Active/Inactive
date
optional,    string
start date of allergy; format: yyyy-mm-dd
reactions
optional,    string[250]
reactions; maximum-limit:250

Update Allergy

PUT /api/ehr/v1/patients/{patient_id}/allergies/{patient_allergy_id}

update patient allergy with given details

Request Example


{
    "type": "Medication",
    "allergen": "penicillin",
    "severity": "Severe",
    "status": "Active",
    "date": "2014-01-01",
    "reactions": "Anaphylactic reactions"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Allergy updated successfully",
    "patient_allergy": {
        "patient_id": "100000000000002697",
        "patient_allergy_id": "100000000000053005",
        "allergen": "penicillin",
        "type": "Medication",
        "severity": "Severe",
        "observed_on": "2014-01-01",
        "status": "Active",
        "reactions": "Anaphylactic reactions"
    }
}

Request Attributes

Name
Description
type
required,    string
Type of allergen; Allowed values: Medication, Environmental, Food, Plant, Animal.
allergen
required,    string[100]
Name of the allergen; maximum-limit:100
severity
required,    string
Severity of allergy: Allowed values : Severe, Moderate, Mild
status
required,    string
Status of the allergy; Allowed values : Active/Inactive
date
optional,    string
start date of allergy format: yyyy-mm-dd
reactions
optional,    string[250]
reactions; maximum-limit:250

Delete Allergy

DELETE /api/ehr/v1/patients/{patient_id}/allergies/{patient_allergy_id}

Delete an allergy added for patient

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Allergy deleted successfully."
}

Update ‘No Known Allergy’ of a Patient

POST /api/ehr/v1/patients/{patient_id}/no_known_allergy

Request Example


{
    "type": "Medication",
    "status": "Known"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "No Known allergy updated successfully"
}

Request Attributes

Name
Description
type
required,    string
Allowed Values: Medication,Environmental,Food
status
required
Status of the type of allergy

Chart Notes

Chart Notes

Get A Encounter Chart Notes

GET /api/ehr/v1/encounters/{encounter_id}

Get A Encounter Chart Notes

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "encounter": {
        "encounter_id": "100000000000002725",
        "chart_type": "Comprehensive",
        "patient_id": "100000000000002697",
        "provider_id": "100000000000000161",
        "encounter_mode": "In Person",
        "encounter_date": "",
        "is_html_content": "true",
        "notes": {
            "chief_complaints": "Here to get a new primary care physician.",
            "symptoms": "",
            "history_of_present_illness": "Mr. Smith is a 56-year-old gentleman formally followed at Carolina Premier who presents to obtain a new primary care physician secondary to insurance changes. He has a past medical history significant for a myocardial infarction in 1994. His cholesterol has been fine. Catheterization showed a possible \"kink\" in one of his vessels and it was thought that he had a possible \"eddy\" of current which led to a clot. He has been on Coumadin since then as well as a calcium channel blocker with the thought that there may have been a superimposed spasm. He has had several unremarkable stress tests since then. He works out on a Nordic-Track three times a week without any chest pain or shortness of breath. He has a history of possible peptic ulcer disease in 1981. He was treated with H2 blockers and his symptoms resolved. He has never had any bleeding to his knowledge. He had a hernia repair bilaterally in 1989 and surgery for a right knee cyst in 1999, all of which went well. He also has about a year long history of right buttock pain. This happens only when he is sitting for some time and does not change position. It does not happen when he is walking or exercising. He wonders if it might be pyriformis syndrome. If he changes positions frequently or stretches his legs, this seems to help. He has no acute complaints today and is here to get plugged into the system. He does wonder if there is anything else that can be done about his buttock pain.",
            "past_medical_history": "As above. In addition, he had a flexible sigmoidoscopy in 2003 which was okay.",
            "family_and_social_history": "His mother had diabetes developed at age 55 and coronary artery disease in her mid sixties. His father had CAD as well but not until his 70s. A paternal aunt had breast cancer. There is no history of colon or prostate cancer.<div><hr>&nbsp;He lives in Durham with his wife and mother. He works for a biotech company. He does not smoke. He drinks two beers per night and reports no trouble with alcohol in the past. No history of drug use.</div>",
            "review_of_systems": "As per his personal health summary and is significant only for his buttock pain as listed above, but is otherwise essentially unremarkable.",
            "nurse_notes": "",
            "physical_examination": "<br>GENERAL: A healthy-appearing middle-aged gentleman.<br>HEENT: Pupils equal, round, reactive to light. Conjunctivaepink. Sclerae anicteric. Tympanic membranes clear. Oropharynx clear.<br>NECK: No lymphadenopathy or thyromegaly or JVD.<br>LUNGS: Clear to auscultation and percussion.<br>HEART: Regular rate and rhythm without murmur, rub, or gallop.<br>ABDOMEN: Normal bowel sounds. Soft, nontender. No hepatosplenomegaly.<br>EXTREMITIES: No cyanosis, clubbing, or edema. 2+ peripheral pulses.<br>NEUROLOGIC: Motor and sensation grossly intact.<br>PSYCHIATRIC: Normal affect and behavior.<br>DERMATOLOGIC: He has a small whitish papule at the upper borderof his mustache on the left.<br>MUSCULOSKELETAL: Full range of motion of his legs and hips bilaterally with no tenderness to palpation over his buttocks.",
            "assessment_notes": "<ol style-\"margin:=\"\" 0px=\"\" 1em=\"\" 1.5em;=\"\" padding:=\"\" 1.05em;=\"\" list-style-position:=\"\" outside;=\"\" list-style-image:=\"\" none;\"=\"\"><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">Status post myocardial infarction. No evidence for actual CAD. He will continue his aspirin and Coumadin. Unclear to exactly how long he should be on Coumadin or if this is really needed. At some point, may discuss this with cardiology. We will check an INR today and get him plugged into our Coumadin clinic. Check cholesterol.</li><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">High blood pressure. He will continue with diet and exercise changes. At next visit, may go up on his calcium channel blocker versus add another agent. Check creatinine and potassium today.</li><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">Buttock pain. Will try some physical therapy.</li><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">Will send him to dermatology for the papule above his mustache.</li><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">Possible h/o peptic ulcer disease. As he has not had any known GI bleed, do not feel a need to check H. pylori serology today.</li><li style=\"margin: 0px 0px 0.35em; padding: 0px;\">Health maintenance. Tetanus shot today. Flex sig as above. Will discuss prostate cancer screening next visit.</li></ol>",
            "self_notes": "",
            "diets": "",
            "life_style": "",
            "treatment_notes": "",
            "instructions": "",
            "follow_up_appointment": "Return to clinic in four months."
        },
        "vital_entry": {
            "vital_entry_id": "100000000000013009",
            "vitals": [
                {
                    "vital_name": "Weight",
                    "vital_value": "1.0",
                    "vital_unit": "kgs"
                },
                {
                    "vital_name": "Height",
                    "vital_value": "2.0",
                    "vital_unit": "cms"
                },
                {
                    "vital_name": "BMI",
                    "vital_value": "2500.0",
                    "vital_unit": ""
                },
                {
                    "vital_name": "Temp",
                    "vital_value": "4.0",
                    "vital_unit": "C"
                },
                {
                    "vital_name": "Head Circ",
                    "vital_value": "5.0",
                    "vital_unit": "cms"
                },
                {
                    "vital_name": "SPO2",
                    "vital_value": "6.0",
                    "vital_unit": "%"
                },
                {
                    "vital_name": "Systolic BP",
                    "vital_value": "6.0",
                    "vital_unit": "mmHg"
                },
                {
                    "vital_name": "Diastolic BP",
                    "vital_value": "7.0",
                    "vital_unit": "mmHg"
                },
                {
                    "vital_name": "Pulse Rate",
                    "vital_value": "8.0",
                    "vital_unit": "bpm"
                },
                {
                    "vital_name": "Pulse Pattern",
                    "vital_value": "Regular",
                    "vital_unit": ""
                },
                {
                    "vital_name": "Pulse Volume",
                    "vital_value": "Normal",
                    "vital_unit": ""
                },
                {
                    "vital_name": "Respiratory Rate",
                    "vital_value": "9.0",
                    "vital_unit": "bpm"
                },
                {
                    "vital_name": "Respiratory Pattern",
                    "vital_value": "Normal",
                    "vital_unit": ""
                },
                {
                    "vital_name": "Chest",
                    "vital_value": "10.0",
                    "vital_unit": "ins"
                },
                {
                    "vital_name": "Waist",
                    "vital_value": "11.0",
                    "vital_unit": "ins"
                }
            ]
        },
        "diagnoses": [

        ],
        "medications": [

        ],
        "supplements": [

        ],
        "lab_order": {
            "order_id": "100000000000002731",
            "patient_id": "100000000000002697",
            "order_date": "2015-05-12",
            "encounter_id": "100000000000002725",
            "notes_to_lab": "notes to lab",
            "intra_office_notes": "Intra office notes",
            "order_tests": [
                {
                    "order_test_id": "100000000000005001",
                    "lab_name": "General",
                    "test_name": "Basic Metabolic Panel",
                    "test_code": ""
                }
            ]
        },
        "image_orders": [

        ],
        "injections": [

        ],
        "vaccines": [

        ],
        "handouts": [

        ],
        "addendums": [

        ]
    }
}

Query Parameters

Name Required Type Description

Add an encounter

POST /api/ehr/v1/patients/{patient_id}/encounter

Used to add an encounter of a patient

Request Example


{
    "provider_id": "100000000000000161",
    "facility_id": "100000000000000179",
    "date": "2010-04-04",
    "encounter_mode": "In Person",
    "chart_type": "Brief",
    "visittype_id": "100000000000031015"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Encounter started successfully.",
    "encounter": {
        "encounter_id": "100000000000040003"
    }
}

Request Attributes

Name
Description
provider_id
required,    long
Id of the provider
facility_id
required,    long
id of the facility
encounter_mode
required,    string
mode of the encounter [In Person||Phone Call]
chart_type
required,    string
Type of the encounter [Allowed values : Quick|Brief|Comprehensive|SOAP Template]
visittype_id
optional,    long
Visit type Id
date
required,    string
date of encounter [format:]

Add an encounter

POST /api/ehr/v1/appointments/{appointment_id}/encounter

Used to add an encounter of a patient from appointment

Request Example


{
    "chart_type": "Brief"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Encounter started successfully.",
    "encounter": {
        "encounter_id": "100000000000040003"
    }
}

Request Attributes

Name
Description
chart_type
required,    string
Type of the encounter [Allowed values : Quick|Brief|Comprehensive|SOAP Template]

Upload Paper Record

POST /api/ehr/v1/charts/file

Upload paper record (in PDF Format)

Request Example


{
    "patient_id": "100000000000002703",
    "facility_id": "100000000000000179",
    "provider_id": "100000000000000161",
    "date": "2015-01-01",
    "comments": "paper chart note"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "Chart saved successfully.",
    "chart": {
        "chart_id": "100000000000000161"
    }
}

Request Attributes

Name
Description
required,    list
Criteria as JSON Object
file
required,    string
Chart Note File Content

Delete patient encounter

DELETE /api/ehr/v1/patients/{patient_id}/encounters/{encounter_id}

Deletes an encounter of a patient

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Encounter deleted successfully."
}

Query Parameters

Name Required Type Description

Sign an encounter

POST /api/ehr/v1/patients/{patient_id}/encounters/{encounter_id}/sign

Used to Sign an encounter of a patient

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Encounter signed successfully.",
    "encounter": {
        "encounter_id": "100000000000040003"
    }
}

File for Review

POST /api/ehr/v1/patients/{patient_id}/encounters/{encounter_id}/file_review

File for review with seleccted physician

Request Example


{
    "reviewer_id": "100000000000003059"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "File has been sent for review successfully."
}

Request Attributes

Name
Description
reviewer_id
required,    long
Id of the Physician, who wants to review

Save Chart Note

POST /api/ehr/v1/patients/{patient_id}/encounters/{encounter_id}/save

Save Chart Notes

Request Example


{
    "symptoms": "Sweating,Anxiety,Extreme hunger",
    "family_social_history": "His mother had diabetes developed at age 55 and coronary artery disease in her mid sixties. His father had CAD as well but not until his 70s. A paternal aunt had breast cancer. There is no history of colon or prostate cancer.He lives in Durham with his wife and mother. He works for a biotech company. He does not smoke. He drinks two beers per night and reports no trouble with alcohol in the past. No history of drug use"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Encounter notes saved successfully"
}

Request Attributes

Name
Description
chief_complaints
optional,    string
chief complaints of the patient
symptoms
optional,    string
symptoms
physical_examination
optional,    string
Physical examination
treatment_notes
optional,    string
Treatment notes
self_notes
optional,    string
Self_notes of the physician
patient_notes
optional,    string
Patient Notes
diets
optional,    string
Diets Notes
lifestyle
optional,    string
Lifestyle Notes
assessment_notes
optional,    string
Assessment notes
psychotherapy_notes
optional,    string
Psychotherapy Notes
present_illness_history
optional,    string
Present illness history
family_social_history
optional,    string
family and social history of the patient
review_of_systems
optional,    string
review of systems
past_medical_history
optional,    string
Past Medical history of patient
condition_related_to
optional,    string
Condition related to this encounter
accident_place
optional,    string
Place of the accident
isHtml
optional,    string
To identify it is html or not

View List of Encounters

POST /api/ehr/v1/encounters

View list of encounters

Request Example


{
    "member_id": "100000000000000161"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "success",
    "encounters": [
        {
            "encounter_id": "100000000000003017",
            "date": "2015-06-09 17:53:11",
            "appointment_mode": "In Person",
            "chart_type": "Comprehensive",
            "encounter_title": "",
            "is_approved": "false",
            "time_of_creation": 1433852591917,
            "physician_name": "Steven \" D'Antonio",
            "prefix": "Dr",
            "patient_name": "first last",
            "patient_id": "100000000000002715",
            "gender": "male",
            "patient_record_id": "cha0001",
            "is_file_for_review": "false"
        }
    ],
    "page_context": {
        "page": "1",
        "per_page": "50",
        "has_more_page": "false",
        "sort_column": "time_of_creation",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
member_id required long Id of the member
filter_by optional string Encounter Status: Allowed values:Signed,Unsigned

Calendar

API for appointments

Request Appointment

POST /api/ehr/v1/appointments/request

Request Appointment

Request Example


{
    "patient_id": "100000000000000103",
    "member_id": "100000000000000161",
    "facility_id": "100000000000000179",
    "start_time": "10:40 AM",
    "end_time": "11:25 AM",
    "date": "2015-01-29",
    "reason": "<Reason for requesting appointment>"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Appointment requested successfully"
}

Request Attributes

Name
Description
patient_id
required,    long
Patient ID
member_id
required,    bigint
Member ID
facility_id
required,    bigint
Facility ID
start_time
required,    string
Start Time
end_time
required,    string
End Time
date
required,    string
Date
reason
optional,    string
Reason for requesting appointment; max-length is 400

Get available time slots

GET /api/ehr/v1/members/{member_id}/availability

Get available time slots for a member

Request Example


{
    "from_date": "2015-04-09",
    "to_date": "2015-04-09",
    "facility_id": "100000000000000179",
    "time_slot": "60"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "availability": {
        "to_date": "2015-04-09",
        "from_Date": "2015-04-09",
        "facility_id": 100000000000000180,
        "member_id": 100000000000000160,
        "available_slots": [
            {
                "2015-04-09": [
                    {
                        "end_time": "10:00 AM",
                        "start_time": "09:00 AM"
                    },
                    {
                        "end_time": "11:00 AM",
                        "start_time": "10:00 AM"
                    },
                    {
                        "end_time": "00:00 PM",
                        "start_time": "11:00 AM"
                    },
                    {
                        "end_time": "01:00 PM",
                        "start_time": "00:00 PM"
                    },
                    {
                        "end_time": "02:00 PM",
                        "start_time": "01:00 PM"
                    },
                    {
                        "end_time": "03:00 PM",
                        "start_time": "02:00 PM"
                    },
                    {
                        "end_time": "04:00 PM",
                        "start_time": "03:00 PM"
                    },
                    {
                        "end_time": "05:00 PM",
                        "start_time": "04:00 PM"
                    },
                    {
                        "end_time": "06:00 PM",
                        "start_time": "05:00 PM"
                    }
                ]
            }
        ]
    }
}

Query Parameters

Name Required Type Description
facility_id required long Facility ID
from_date required string From Date
to_date required string To Date
time_slot optional time slot to divide the member’s available appointments

Add an Appointment

POST /api/ehr/v1/appointments

Add an Appointment

Request Example


{
    "member_id": "100000000000000161",
    "patient_id": "100000000000000169",
    "facility_id": "100000000000000179",
    "mode": "In Person/Phone Call",
    "repetition": "Single Date/Period",
    "start_time": "10:40 AM",
    "start_date": "2015-01-29",
    "duration_in_minutes": "20",
    "end_date": "2015-02-29",
    "frequency": "daily/weekly",
    "weekly_days": [
        {
            "week_day": "Sunday"
        },
        {
            "week_day": "Monday"
        },
        {
            "week_day": "Tuesday"
        },
        {
            "week_day": "Wednesday"
        },
        {
            "week_day": "Thursday"
        },
        {
            "week_day": "Friday"
        }
    ],
    "reason": "<Reason for adding appointment>",
    "message_to_patient": "<message to patient>",
    "questionnaire": [
        {
            "questionnaire_id": "100000000000004051"
        },
        {
            "questionnaire_id": "100000000000004061"
        }
    ],
    "visit_type_id": "100000000000005007",
    "resource_id": "100000000000004009",
    "provider_double_booking": "allow",
    "resource_double_booking": "allow",
    "consent_forms": [
        {
            "file_id": "100000000000004451"
        },
        {
            "file_id": "100000000000004011"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Appointment added successfully"
}

Request Attributes

Name
Description
member_id
required,    long
Member ID
patient_id
required,    long
Patient ID
facility_id
required,    long
Facility ID
mode
required,    string
In Person/Phone Call
repetition
required,    string
Single Date/Period
start_time
required,    string
Start Time
start_date
required,    string
Start Date
duration_in_minutes
required,    string
Duration in Minutes
end_date
optional,    string
End Date; used in case periodic appointments
frequency
optional,    string
daily/weekly; used in case periodic appointments
weekly_days
Show Attributes
optional,    list
Days of the Week; used in case periodic weekly appointments
reason
optional,    string
Reason for adding appointment; max-limit 500
message_to_patient
optional,    string
Message to the Patient; max-limit 400;
questionnaire
Show Attributes
optional,    list
Questionnaire
visit_type_id
optional,    long
Visit Type ID
resource_id
optional,    long
Resource ID
provider_double_booking
optional,    string
allow
resource_double_booking
optional,    string
allow
consent_forms
Show Attributes
optional,    list
Consent Forms

Members

API for Members

List Members

GET /api/ehr/v1/members

List Members

Request Example


{
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "members": [
        {
            "member_id": "100000000000000161",
            "prefix": "Dr",
            "first_name": "Mary",
            "last_name": "J",
            "full_name": "Mary J",
            "gender": "male",
            "specialization": "Dentistry",
            "degree": "",
            "created_date": "",
            "home_phone": "9892039282",
            "mobile": "9902993003",
            "address_line1": "696",
            "address_line2": "Haul Road",
            "city": "Chennai",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "600123"
        },
        {
            "member_id": "100000000000002645",
            "prefix": "Dr",
            "first_name": "Leland",
            "last_name": "Warren",
            "full_name": "Leland Warren",
            "gender": "male",
            "specialization": "",
            "degree": "",
            "created_date": "",
            "home_phone": "9093009219",
            "mobile": "8929033222",
            "address_line1": "2906",
            "address_line2": "Laurel Lee",
            "city": "Madurai",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "601243"
        },
        {
            "member_id": "100000000000002665",
            "prefix": "Dr",
            "first_name": "Reuben",
            "last_name": "Denney",
            "full_name": "Reuben Denney",
            "gender": "male",
            "specialization": "",
            "degree": "",
            "created_date": "",
            "home_phone": "9828300499",
            "mobile": "8872839444",
            "address_line1": "1795",
            "address_line2": "Park Street",
            "city": "Trichy",
            "state": "Tamil Nadu",
            "country": "in",
            "zip_code": "605505"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "applied_filter": "Status.Active",
        "sort_column": "created_date",
        "sort_order": "D"
    }
}

Query Parameters

Name Required Type Description
facility_id required long Facility ID
role_id optional long Members with given role will be returned.
privilege optional string Privilege filter to the members; Allowed values : sign_encounter.
first_name optional string search with first_name; Variants: first_name_startswith and first_name_contains
last_name optional string search with last_name; Variants: last_name_startswith and last_name_contains
full_name optional string search with full_name; Variants: full_name_startswith and full_name_contains
city optional string search with city; Variants: city_startswith and city_contains
state optional string search with state; Variants: state_startswith and state_contains
zip_code optional string search with zip_code; Variants: zip_code_startswith and zip_code_contains
home_phone optional string search with home_phone; Variants: home_phone_startswith and home_phone_contains
mobile optional string search with mobile; Variants: mobile_startswith and mobile_contains
specialization optional string search with specializaion; Variants: specialization_startswith and specialization_contains
sort_column optional string Sort patients; Allowed values: first_name, last_name, specialization, created_date, full_name.

Add Member

POST /api/ehr/v1/members

Add Member

Request Example


{
    "first_name": "Mary",
    "last_name": "J",
    "login_id": "mary.j",
    "dob": "1989-01-02",
    "email": "mary.j@aol.com",
    "gender": "female",
    "role_ids": [
        {
            "role_id": "100000000000000101"
        }
    ],
    "facilities": [
        {
            "facility_id": "100000000000000179"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Member saved successfully",
    "member": {
        "member_id": "1000000001932"
    }
}

Request Attributes

Name
Description
first_name
required,    string
First Name
last_name
required,    string
Last Name
middle_name
optional,    string
Middle Name
prefix
optional,    string
Prefix
login_id
required,    string
Login ID
dob
required,    string
Date of Birth
email
required,    string
Email ID
gender
required,    string
Gender
mobile
optional,    long
Mobile
home_phone
optional,    long
Home Phone
degree
optional,    string
Degree
specialization
optional,    string
Specialization
tax_id
optional,    string
Tax ID
taxonomy_code
optional,    string
Taxonomy Code
address
Show Attributes
optional,    list
Address
role_ids
Show Attributes
required,    list
Roles
facilities
Show Attributes
required,    list
id_qualifiers
Show Attributes
optional,    list
Qualifier Ids for member

Update Member

PUT /api/ehr/v1/members/{member_id}

Update a Member details

Request Example


{
    "first_name": "Mary",
    "last_name": "J",
    "login_id": "mary.j",
    "dob": "1989-01-02",
    "email": "mary.j@aol.com",
    "gender": "female",
    "role_ids": [
        {
            "role_id": "100000000000000101"
        }
    ],
    "facilities": [
        {
            "facility_id": "100000000000000179"
        }
    ]
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Member details updated  successfully",
    "member": {
        "member_id": "1000000001932"
    }
}

Request Attributes

Name
Description
first_name
required,    string
First Name
last_name
required,    string
Last Name
middle_name
optional,    string
Middle Name
prefix
optional,    string
Prefix
dob
required,    string
Date of Birth
email
required,    string
Email ID
gender
required,    string
Gender
mobile
optional,    long
Mobile
home_phone
optional,    long
Home Phone
degree
optional,    string
Degree
specialization
optional,    string
Specialization
tax_id
optional,    string
Tax ID
taxonomy_code
optional,    string
Taxonomy Code
address
Show Attributes
optional,    list
Address
role_ids
Show Attributes
required,    list
Roles
facilities
Show Attributes
required,    list
id_qualifiers
Show Attributes
optional,    list
Qualifier Ids for member

Patient Portal

API for Patient Portal

Send PHR Invitation

POST /api/ehr/v1/patients//sendInvitation

Send PHR Invitation

Request Example


{
    "send_to": "Patient",
    "email": "thilak@abcd.com"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "Invitation has been sent successfully."
}

Request Attributes

Name
Description
send_to
required,    string
Send Invite to person; Allowed values: Patient/Patient Representative
email
required,    string[100]
Email ID
representative_first_name
optional,    string[100]
Representative Last Name
allow_multiple_patients_in_same_phr
optional,    string
Do you want to allow multiple patients to be managed in PHR ?; allowed values: yes

Facility API

Facility API

List Facility

GET /api/ehr/v1/facilities

List Facility

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "facilities": [
        {
            "facility_id": "1884000001342611",
            "facility_name": "Fayette & Health System",
            "facility_code": "",
            "facility_status": "Enabled",
            "address_line1": "1515 North Campbell Avenue",
            "address_line2": "",
            "city": "Montgomery",
            "state": "Alabama",
            "country": "us",
            "zip_code": "08574",
            "mobile": "",
            "office_phone": "5208030654"
        },
        {
            "facility_id": "1884000003400299",
            "facility_name": "Mayo Clinic",
            "facility_code": "",
            "facility_status": "Enabled",
            "address_line1": "13400 E. Shea Blvd.",
            "address_line2": "",
            "city": "Scottsdale",
            "state": "Arizona",
            "country": "us",
            "zip_code": "85259",
            "mobile": "8004462279",
            "office_phone": "4803018000"
        },
        {
            "facility_id": "1884000000374011",
            "facility_name": "Natural Wellness Center",
            "facility_code": "NWC",
            "facility_status": "Enabled",
            "address_line1": "Lincoln Street",
            "address_line2": "City Corner",
            "city": "Montgomery",
            "state": "Alabama",
            "country": "us",
            "zip_code": "36110",
            "mobile": "2323121121",
            "office_phone": "2323232323"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": "false",
        "applied_filter": "Status.Active",
        "sort_column": "facility_name",
        "sort_order": "A"
    }
}

Query Parameters

Name Required Type Description
filter_by optional string Filter by status of the facility; Allowed values : Status.All, Status.Active and Status.Inactive.

Settings

API for settings

List Visit Types

GET /api/ehr/v1/settings/visittypes

List Visit Types

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "visittypes": [
        {
            "visit_type_id": "100000000000003013",
            "visit_type": "visit 2",
            "duration": 23,
            "visit_type_color": "#DA70D6:#00000f"
        },
        {
            "visit_type_id": "100000000000003011",
            "visit_type": "visit 1",
            "duration": 12,
            "visit_type_color": "#37BC9B:#00000f"
        },
        {
            "visit_type_id": "100000000000003025",
            "visit_type": "visit type",
            "duration": 12,
            "visit_type_color": "#ED5565:#ffffff"
        },
        {
            "visit_type_id": "100000000000003029",
            "visit_type": "visit types",
            "duration": 12,
            "visit_type_color": "#00ffff:#00000f"
        }
    ],
    "page_context": {
        "page": 1,
        "per_page": 50,
        "has_more_page": false,
        "sort_column": "duration",
        "sort_order": "D"
    }
}

Miscellaneous

Miscellaneous API

List Countries

GET /api/ehr/v1/countries

List Countries

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "country_metrics": {
        "countries": [
            {
                "value": "af",
                "label": "Afghanistan"
            },
            {
                "value": "ax",
                "label": "Aland Islands"
            },
            {
                "value": "al",
                "label": "Albania"
            },
            {
                "value": "dz",
                "label": "Algeria"
            },
            {
                "value": "as",
                "label": "American Samoa"
            },
            {
                "value": "ad",
                "label": "Andorra"
            },
            {
                "value": "ao",
                "label": "Angola"
            },
            {
                "value": "ai",
                "label": "Anguilla"
            },
            {
                "value": "aq",
                "label": "Antarctica"
            },
            {
                "value": "ag",
                "label": "Antigua And Barbuda"
            },
            {
                "value": "ar",
                "label": "Argentina"
            },
            {
                "value": "am",
                "label": "Armenia"
            },
            {
                "value": "aw",
                "label": "Aruba"
            },
            {
                "value": "au",
                "label": "Australia"
            },
            {
                "value": "at",
                "label": "Austria"
            },
            {
                "value": "az",
                "label": "Azerbaijan"
            },
            {
                "value": "bs",
                "label": "Bahamas"
            },
            {
                "value": "bh",
                "label": "Bahrain"
            },
            {
                "value": "bd",
                "label": "Bangladesh"
            },
            {
                "value": "bb",
                "label": "Barbados"
            },
            {
                "value": "by",
                "label": "Belarus"
            },
            {
                "value": "be",
                "label": "Belgium"
            },
            {
                "value": "bz",
                "label": "Belize"
            },
            {
                "value": "bj",
                "label": "Benin"
            },
            {
                "value": "bm",
                "label": "Bermuda"
            },
            {
                "value": "bt",
                "label": "Bhutan"
            },
            {
                "value": "bo",
                "label": "Bolivia"
            },
            {
                "value": "ba",
                "label": "Bosnia And Herzegovina"
            },
            {
                "value": "bw",
                "label": "Botswana"
            },
            {
                "value": "bv",
                "label": "Bouvet Island"
            },
            {
                "value": "br",
                "label": "Brazil"
            },
            {
                "value": "io",
                "label": "British Indian Ocean Territory"
            },
            {
                "value": "vg",
                "label": "British Virgin Islands"
            },
            {
                "value": "bn",
                "label": "Brunei Darussalam"
            },
            {
                "value": "bg",
                "label": "Bulgaria"
            },
            {
                "value": "bf",
                "label": "Burkina Faso"
            },
            {
                "value": "bi",
                "label": "Burundi"
            },
            {
                "value": "kh",
                "label": "Cambodia"
            },
            {
                "value": "cm",
                "label": "Cameroon"
            },
            {
                "value": "ca",
                "label": "Canada"
            },
            {
                "value": "cv",
                "label": "Cape Verde"
            },
            {
                "value": "ky",
                "label": "Cayman Islands"
            },
            {
                "value": "cf",
                "label": "Central african republic"
            },
            {
                "value": "td",
                "label": "Chad"
            },
            {
                "value": "cl",
                "label": "Chile"
            },
            {
                "value": "cn",
                "label": "China"
            },
            {
                "value": "cx",
                "label": "Christmas island"
            },
            {
                "value": "cc",
                "label": "Cocos (keeling) Islands"
            },
            {
                "value": "co",
                "label": "Colombia"
            },
            {
                "value": "km",
                "label": "Comoros"
            },
            {
                "value": "cg",
                "label": "Congo"
            },
            {
                "value": "ck",
                "label": "Cook Islands"
            },
            {
                "value": "cr",
                "label": "Costa Rica"
            },
            {
                "value": "ci",
                "label": "Cote D'ivoire"
            },
            {
                "value": "hr",
                "label": "Croatia"
            },
            {
                "value": "cu",
                "label": "Cuba"
            },
            {
                "value": "cy",
                "label": "Cyprus"
            },
            {
                "value": "cz",
                "label": "Czech Republic"
            },
            {
                "value": "dk",
                "label": "Denmark"
            },
            {
                "value": "dj",
                "label": "Djibouti"
            },
            {
                "value": "dm",
                "label": "Dominica"
            },
            {
                "value": "do",
                "label": "Dominican Republic"
            },
            {
                "value": "ec",
                "label": "Ecuador"
            },
            {
                "value": "eg",
                "label": "Egypt"
            },
            {
                "value": "sv",
                "label": "El Salvador"
            },
            {
                "value": "gq",
                "label": "Equatorial Guinea"
            },
            {
                "value": "er",
                "label": "Eritrea"
            },
            {
                "value": "ee",
                "label": "Estonia"
            },
            {
                "value": "et",
                "label": "Ethiopia"
            },
            {
                "value": "fk",
                "label": "Falkland Islands (malvinas)"
            },
            {
                "value": "fo",
                "label": "Faroe Islands"
            },
            {
                "value": "fj",
                "label": "Fiji"
            },
            {
                "value": "fi",
                "label": "Finland"
            },
            {
                "value": "fr",
                "label": "France"
            },
            {
                "value": "gf",
                "label": "French Guiana"
            },
            {
                "value": "pf",
                "label": "French Polynesia"
            },
            {
                "value": "tf",
                "label": "French Southern Territories"
            },
            {
                "value": "ga",
                "label": "Gabon"
            },
            {
                "value": "gm",
                "label": "Gambia"
            },
            {
                "value": "ge",
                "label": "Georgia"
            },
            {
                "value": "de",
                "label": "Germany"
            },
            {
                "value": "gh",
                "label": "Ghana"
            },
            {
                "value": "gi",
                "label": "Gibraltar"
            },
            {
                "value": "gr",
                "label": "Greece"
            },
            {
                "value": "gl",
                "label": "Greenland"
            },
            {
                "value": "gd",
                "label": "Grenada"
            },
            {
                "value": "gp",
                "label": "Guadeloupe"
            },
            {
                "value": "gu",
                "label": "Guam"
            },
            {
                "value": "gt",
                "label": "Guatemala"
            },
            {
                "value": "gg",
                "label": "Guernsey"
            },
            {
                "value": "gn",
                "label": "Guinea"
            },
            {
                "value": "gw",
                "label": "Guinea-bissau"
            },
            {
                "value": "gy",
                "label": "Guyana"
            },
            {
                "value": "ht",
                "label": "Haiti"
            },
            {
                "value": "hm",
                "label": "Heard Island And Mcdonald Islands"
            },
            {
                "value": "va",
                "label": "Holy See (vatican City State)"
            },
            {
                "value": "hn",
                "label": "Honduras"
            },
            {
                "value": "hk",
                "label": "Hong Kong"
            },
            {
                "value": "hu",
                "label": "Hungary"
            },
            {
                "value": "is",
                "label": "Iceland"
            },
            {
                "value": "in",
                "label": "India"
            },
            {
                "value": "id",
                "label": "Indonesia"
            },
            {
                "value": "ir",
                "label": "Iran"
            },
            {
                "value": "iq",
                "label": "Iraq"
            },
            {
                "value": "ie",
                "label": "Ireland"
            },
            {
                "value": "im",
                "label": "Isle Of Man"
            },
            {
                "value": "il",
                "label": "Israel"
            },
            {
                "value": "it",
                "label": "Italy"
            },
            {
                "value": "jm",
                "label": "Jamaica"
            },
            {
                "value": "jp",
                "label": "Japan"
            },
            {
                "value": "je",
                "label": "Jersey"
            },
            {
                "value": "jo",
                "label": "Jordan"
            },
            {
                "value": "kz",
                "label": "Kazakhstan"
            },
            {
                "value": "ke",
                "label": "Kenya"
            },
            {
                "value": "ki",
                "label": "Kiribati"
            },
            {
                "value": "kw",
                "label": "Kuwait"
            },
            {
                "value": "kg",
                "label": "Kyrgyzstan"
            },
            {
                "value": "la",
                "label": "Lao People's Democratic Republic"
            },
            {
                "value": "lv",
                "label": "Latvia"
            },
            {
                "value": "lb",
                "label": "Lebanon"
            },
            {
                "value": "ls",
                "label": "Lesotho"
            },
            {
                "value": "lr",
                "label": "Liberia"
            },
            {
                "value": "ly",
                "label": "Libyan Arab Jamahiriya"
            },
            {
                "value": "li",
                "label": "Liechtenstein"
            },
            {
                "value": "lt",
                "label": "Lithuania"
            },
            {
                "value": "lu",
                "label": "Luxembourg"
            },
            {
                "value": "mo",
                "label": "Macao"
            },
            {
                "value": "mk",
                "label": "Macedonia"
            },
            {
                "value": "mg",
                "label": "Madagascar"
            },
            {
                "value": "mw",
                "label": "Malawi"
            },
            {
                "value": "my",
                "label": "Malaysia"
            },
            {
                "value": "mv",
                "label": "Maldives"
            },
            {
                "value": "ml",
                "label": "Mali"
            },
            {
                "value": "mt",
                "label": "Malta"
            },
            {
                "value": "mh",
                "label": "Marshall Islands"
            },
            {
                "value": "mq",
                "label": "Martinique"
            },
            {
                "value": "mr",
                "label": "Mauritania"
            },
            {
                "value": "mu",
                "label": "Mauritius"
            },
            {
                "value": "yt",
                "label": "Mayotte"
            },
            {
                "value": "mx",
                "label": "Mexico"
            },
            {
                "value": "fm",
                "label": "Micronesia"
            },
            {
                "value": "md",
                "label": "Moldova"
            },
            {
                "value": "mc",
                "label": "Monaco"
            },
            {
                "value": "mn",
                "label": "Mongolia"
            },
            {
                "value": "me",
                "label": "Montenegro"
            },
            {
                "value": "ms",
                "label": "Montserrat"
            },
            {
                "value": "ma",
                "label": "Morocco"
            },
            {
                "value": "mz",
                "label": "Mozambique"
            },
            {
                "value": "mm",
                "label": "Myanmar"
            },
            {
                "value": "na",
                "label": "Namibia"
            },
            {
                "value": "nr",
                "label": "Nauru"
            },
            {
                "value": "np",
                "label": "Nepal"
            },
            {
                "value": "nl",
                "label": "Netherlands"
            },
            {
                "value": "an",
                "label": "Netherlands Antilles"
            },
            {
                "value": "nc",
                "label": "New Caledonia"
            },
            {
                "value": "nz",
                "label": "New Zealand"
            },
            {
                "value": "ni",
                "label": "Nicaragua"
            },
            {
                "value": "ne",
                "label": "Niger"
            },
            {
                "value": "ng",
                "label": "Nigeria"
            },
            {
                "value": "nu",
                "label": "Niue"
            },
            {
                "value": "nf",
                "label": "Norfolk Island"
            },
            {
                "value": "kp",
                "label": "North Korea"
            },
            {
                "value": "mp",
                "label": "Northern Mariana Islands"
            },
            {
                "value": "no",
                "label": "Norway"
            },
            {
                "value": "om",
                "label": "Oman"
            },
            {
                "value": "pk",
                "label": "Pakistan"
            },
            {
                "value": "pw",
                "label": "Palau"
            },
            {
                "value": "ps",
                "label": "Palestine"
            },
            {
                "value": "pa",
                "label": "Panama"
            },
            {
                "value": "pg",
                "label": "Papua New Guinea"
            },
            {
                "value": "py",
                "label": "Paraguay"
            },
            {
                "value": "pe",
                "label": "Peru"
            },
            {
                "value": "ph",
                "label": "Philippines"
            },
            {
                "value": "pn",
                "label": "Pitcairn"
            },
            {
                "value": "pl",
                "label": "Poland"
            },
            {
                "value": "pt",
                "label": "Portugal"
            },
            {
                "value": "pr",
                "label": "Puerto Rico"
            },
            {
                "value": "qa",
                "label": "Qatar"
            },
            {
                "value": "re",
                "label": "Reunion"
            },
            {
                "value": "ro",
                "label": "Romania"
            },
            {
                "value": "ru",
                "label": "Russian Federation"
            },
            {
                "value": "rw",
                "label": "Rwanda"
            },
            {
                "value": "sh",
                "label": "Saint Helena"
            },
            {
                "value": "kn",
                "label": "Saint Kitts And Nevis"
            },
            {
                "value": "lc",
                "label": "Saint Lucia"
            },
            {
                "value": "pm",
                "label": "Saint Pierre And Miquelon"
            },
            {
                "value": "vc",
                "label": "Saint Vincent And The Grenadines"
            },
            {
                "value": "ws",
                "label": "Samoa"
            },
            {
                "value": "sm",
                "label": "San Marino"
            },
            {
                "value": "st",
                "label": "Sao Tome And Principe"
            },
            {
                "value": "sa",
                "label": "Saudi Arabia"
            },
            {
                "value": "sn",
                "label": "Senegal"
            },
            {
                "value": "rs",
                "label": "Serbia"
            },
            {
                "value": "sc",
                "label": "Seychelles"
            },
            {
                "value": "sl",
                "label": "Sierra Leone"
            },
            {
                "value": "sg",
                "label": "Singapore"
            },
            {
                "value": "sk",
                "label": "Slovakia"
            },
            {
                "value": "si",
                "label": "Slovenia"
            },
            {
                "value": "sb",
                "label": "Solomon Islands"
            },
            {
                "value": "so",
                "label": "Somalia"
            },
            {
                "value": "za",
                "label": "South Africa"
            },
            {
                "value": "gs",
                "label": "South Georgia And The South Sandwich islands"
            },
            {
                "value": "kr",
                "label": "South Korea"
            },
            {
                "value": "es",
                "label": "Spain"
            },
            {
                "value": "lk",
                "label": "Sri Lanka"
            },
            {
                "value": "sd",
                "label": "Sudan"
            },
            {
                "value": "sr",
                "label": "Suriname"
            },
            {
                "value": "sj",
                "label": "Svalbard And Jan Mayen"
            },
            {
                "value": "sz",
                "label": "Swaziland"
            },
            {
                "value": "se",
                "label": "Sweden"
            },
            {
                "value": "ch",
                "label": "Switzerland"
            },
            {
                "value": "sy",
                "label": "Syrian Arab Republic"
            },
            {
                "value": "tw",
                "label": "Taiwan"
            },
            {
                "value": "tj",
                "label": "Tajikistan"
            },
            {
                "value": "tz",
                "label": "Tanzania"
            },
            {
                "value": "th",
                "label": "Thailand"
            },
            {
                "value": "cd",
                "label": "The Democratic Republic Of Congo"
            },
            {
                "value": "tl",
                "label": "Timor-leste"
            },
            {
                "value": "tg",
                "label": "Togo"
            },
            {
                "value": "tk",
                "label": "Tokelau"
            },
            {
                "value": "to",
                "label": "Tonga"
            },
            {
                "value": "tt",
                "label": "Trinidad And Tobago"
            },
            {
                "value": "tn",
                "label": "Tunisia"
            },
            {
                "value": "tr",
                "label": "Turkey"
            },
            {
                "value": "tm",
                "label": "Turkmenistan"
            },
            {
                "value": "tc",
                "label": "Turks And Caicos Islands"
            },
            {
                "value": "tv",
                "label": "Tuvalu"
            },
            {
                "value": "vi",
                "label": "U.S. Virgin Islands"
            },
            {
                "value": "ug",
                "label": "Uganda"
            },
            {
                "value": "ua",
                "label": "Ukraine"
            },
            {
                "value": "ae",
                "label": "United Arab Emirates"
            },
            {
                "value": "gb",
                "label": "United Kingdom"
            },
            {
                "value": "us",
                "label": "United States"
            },
            {
                "value": "um",
                "label": "United States Minor Outlying Islands"
            },
            {
                "value": "uy",
                "label": "Uruguay"
            },
            {
                "value": "uz",
                "label": "Uzbekistan"
            },
            {
                "value": "vu",
                "label": "Vanuatu"
            },
            {
                "value": "ve",
                "label": "Venezuela"
            },
            {
                "value": "vn",
                "label": "Viet Nam"
            },
            {
                "value": "wf",
                "label": "Wallis And Futuna"
            },
            {
                "value": "eh",
                "label": "Western Sahara"
            },
            {
                "value": "ye",
                "label": "Yemen"
            },
            {
                "value": "zm",
                "label": "Zambia"
            },
            {
                "value": "zw",
                "label": "Zimbabwe"
            }
        ]
    }
}

Query Parameters

Name Required Type Description

List States

GET /api/ehr/v1/states

List States

Request Example


{
    "country": "us"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "state_metrics": {
        "states": [
            {
                "value": "Alabama",
                "label": "Alabama"
            },
            {
                "value": "Alaska",
                "label": "Alaska"
            },
            {
                "value": "Arizona",
                "label": "Arizona"
            },
            {
                "value": "Arkansas",
                "label": "Arkansas"
            },
            {
                "value": "California",
                "label": "California"
            },
            {
                "value": "Colorado",
                "label": "Colorado"
            },
            {
                "value": "Connecticut",
                "label": "Connecticut"
            },
            {
                "value": "Delaware",
                "label": "Delaware"
            },
            {
                "value": "Florida",
                "label": "Florida"
            },
            {
                "value": "Georgia",
                "label": "Georgia"
            },
            {
                "value": "Hawaii",
                "label": "Hawaii"
            },
            {
                "value": "Idaho",
                "label": "Idaho"
            },
            {
                "value": "Illinois",
                "label": "Illinois"
            },
            {
                "value": "Indiana",
                "label": "Indiana"
            },
            {
                "value": "Iowa",
                "label": "Iowa"
            },
            {
                "value": "Kansas",
                "label": "Kansas"
            },
            {
                "value": "Kentucky",
                "label": "Kentucky"
            },
            {
                "value": "Louisiana",
                "label": "Louisiana"
            },
            {
                "value": "Maine",
                "label": "Maine"
            },
            {
                "value": "Maryland",
                "label": "Maryland"
            },
            {
                "value": "Massachusetts",
                "label": "Massachusetts"
            },
            {
                "value": "Michigan",
                "label": "Michigan"
            },
            {
                "value": "Minnesota",
                "label": "Minnesota"
            },
            {
                "value": "Mississippi",
                "label": "Mississippi"
            },
            {
                "value": "Missouri",
                "label": "Missouri"
            },
            {
                "value": "Montana",
                "label": "Montana"
            },
            {
                "value": "Nebraska",
                "label": "Nebraska"
            },
            {
                "value": "Nevada",
                "label": "Nevada"
            },
            {
                "value": "New Hampshire",
                "label": "New Hampshire"
            },
            {
                "value": "New Jersey",
                "label": "New Jersey"
            },
            {
                "value": "New Mexico",
                "label": "New Mexico"
            },
            {
                "value": "New York",
                "label": "New York"
            },
            {
                "value": "North Carolina",
                "label": "North Carolina"
            },
            {
                "value": "North Dakota",
                "label": "North Dakota"
            },
            {
                "value": "Ohio",
                "label": "Ohio"
            },
            {
                "value": "Oklahoma",
                "label": "Oklahoma"
            },
            {
                "value": "Oregon",
                "label": "Oregon"
            },
            {
                "value": "Pennsylvania",
                "label": "Pennsylvania"
            },
            {
                "value": "Rhode Island",
                "label": "Rhode Island"
            },
            {
                "value": "South Carolina",
                "label": "South Carolina"
            },
            {
                "value": "South Dakota",
                "label": "South Dakota"
            },
            {
                "value": "Tennessee",
                "label": "Tennessee"
            },
            {
                "value": "Texas",
                "label": "Texas"
            },
            {
                "value": "Utah",
                "label": "Utah"
            },
            {
                "value": "Vermont",
                "label": "Vermont"
            },
            {
                "value": "Virginia",
                "label": "Virginia"
            },
            {
                "value": "Washington",
                "label": "Washington"
            },
            {
                "value": "Washington, D.C",
                "label": "Washington, D.C"
            },
            {
                "value": "West Virginia",
                "label": "West Virginia"
            },
            {
                "value": "Wisconsin",
                "label": "Wisconsin"
            },
            {
                "value": "Wyoming",
                "label": "Wyoming"
            }
        ]
    }
}

Query Parameters

Name Required Type Description
country required Country; value from list countries API

List User Privileges

GET /api/ehr/v1/privileges

List User Privileges

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": "0",
    "message": "success",
    "user_privileges": {
        "privileges": [
            "export_patient",
            "export_medicalhistory",
            "view_healthvitals",
            "view_medications",
            "view_supplements",
            "view_allergies",
            "export_questionnaire",
            "delete_insurance",
            "delete_pharmacy",
            "export_pastencounter",
            "export_labresults",
            "export_documents",
            "export_facesheet",
            "view_clinical_data",
            "export_laborders",
            "view_injectionorders",
            "view_vaccineorders",
            "export_imageorders",
            "export_appointment",
            "view_appointment_request",
            "delete_inventory",
            "export_inventory_reports",
            "export_invoice_receipt",
            "edit_writeoff",
            "add_paymentrefund",
            "export_claim",
            "export_billingreports",
            "view_rcm",
            "view_practicestats",
            "view_patientstats",
            "view_vaccinestats",
            "view_daignosesstats",
            "view_medicationstats",
            "view_labrecordstats",
            "view_phrusagestats",
            "view_pqristats",
            "view_meaningfulusestats",
            "view_messages",
            "view_settings_facility",
            "view_settings_calendar",
            "view_settings_templates",
            "view_settings_questionnaire",
            "view_settings_documents",
            "view_settings_encounter",
            "view_settings_erx",
            "view_settings_encounterpreferences",
            "view_settings_drug_interaction",
            "view_settings_billing",
            "view_settings_lab",
            "view_settings_messages",
            "view_settings_phrsettings",
            "view_settings_immunization",
            "view_audits_others",
            "view_audits_patient",
            "edit_patient",
            "edit_healthvitals",
            "delete_medications",
            "delete_supplements",
            "delete_allergies",
            "start_encounter",
            "sign_encounter",
            "edit_injectionorders",
            "edit_vaccineorders",
            "view_appointment_booking"
        ]
    }
}

Query Parameters

Name Required Type Description

Invoices

API for Invoices

List Invoices

GET /api/ehr/v1/invoices

List the invoices that are added/updated in the given date period

Request Example


{
    "date_name": "invoice_date",
    "from_date": "2015-06-29",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011",
    "start_index": "1"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "invoices": [
        {
            "invoice_id": "1884000003881205",
            "invoice_number": "INV1275",
            "invoice_date": "2015-06-29",
            "invoice_added_date": "2015-06-24",
            "invoice_updated_date": "2015-06-30",
            "encounter_date": "2015-06-24",
            "invoice_provider_name": "Dr. William Aberthnet",
            "invoice_generated_by": "Dr. William Aberthnet",
            "is_available_credit_used": "false",
            "invoice_terms": "Products once sold cannot be taken back after 7 days",
            "invoice_notes": "Take medicines at time as prescribed by the physician",
            "invoice_amount": "453.8",
            "total_payment_amount": "253.0",
            "total_writeoff_amount": "0.8",
            "invoice_due": "200.0",
            "invoice_status": "Partially Paid",
            "patient_details": {
                "patient_id": "1884000001800333",
                "patient_record_id": "'Ch0406",
                "patient_first_name": "Stephen",
                "patient_middle_name": "",
                "patient_last_name": "Hook",
                "patient_full_name": "Stephen Hook",
                "patient_gender": "male",
                "patient_dob": "1988-07-02"
            },
            "facility_details": {
                "facility_id": "1884000000374011",
                "facility_name": "ChARM Community Hospital ",
                "facility_code": "FL"
            },
            "procedures": [
                {
                    "item_id": "1884000003881207",
                    "item_name": "Level 5 - New Patient Office Visit, Comprehensive 60 minute consult",
                    "item_charge": "300.0",
                    "item_quantity": "1",
                    "item_type": "Procedure",
                    "code_id": "1884000000444011",
                    "code_number": "99205",
                    "tax_name": "Service Tax",
                    "tax_percentage": "5.0",
                    "tax_amount": "13.5",
                    "discount_amount": "30.0",
                    "item_total": "283.5"
                },
                {
                    "item_id": "1884000003881209",
                    "item_name": "Blood Sugar - Random",
                    "item_charge": "50.0",
                    "item_quantity": "1",
                    "item_type": "Lab Test",
                    "code_id": "1884000003405021",
                    "code_number": "LAB001",
                    "tax_name": "Service Tax",
                    "tax_percentage": "5.0",
                    "tax_amount": "2.25",
                    "discount_amount": "5.0",
                    "item_total": "47.25"
                }
            ],
            "products": [
                {
                    "item_id": "1884000003904051",
                    "item_name": "Thiamine 50 mg oral tablet",
                    "item_type": "Inventory",
                    "item_charge": "50.0",
                    "item_quantity": "2",
                    "category_name": "Supplement",
                    "batch_number": "-",
                    "cost_price": "3.75",
                    "expiry_date": "1969-12-31",
                    "tax_name": "Sales Tax",
                    "tax_percentage": "7.0",
                    "tax_amount": "6.44",
                    "discount_amount": "8.0",
                    "item_total": "98.44"
                },
                {
                    "item_id": "1884000003904053",
                    "item_name": "5-HTP 50mg 60cap",
                    "item_charge": "25.0",
                    "item_quantity": "1",
                    "item_type": "Inventory",
                    "category_name": "Supplement",
                    "batch_number": "-",
                    "cost_price": "8.0",
                    "expiry_date": "1969-12-31",
                    "tax_name": "Sales Tax",
                    "tax_percentage": "7.0",
                    "tax_amount": "1.61",
                    "discount_amount": "2.0",
                    "item_total": "24.61"
                }
            ],
            "payments": [
                {
                    "payment_id": "1884000003904115",
                    "payment_amount": "130.0",
                    "payment_to": "Claim",
                    "payment_added_date": "2015-06-30",
                    "payment_updated_date": "",
                    "receipt_id": "1884000003904113",
                    "receipt_number": "REC958",
                    "receipt_date": "2015-06-30",
                    "receipt_amount": "130.0",
                    "payment_method": "Cash",
                    "is_patient_payment": "false",
                    "reference_number": "NRY735372"
                },
                {
                    "payment_id": "1884000003904133",
                    "payment_amount": "123.0",
                    "payment_to": "Invoice",
                    "payment_added_date": "2015-06-30",
                    "payment_updated_date": "",
                    "receipt_id": "1884000003904131",
                    "receipt_number": "REC960",
                    "receipt_date": "2015-06-30",
                    "receipt_amount": "123.0",
                    "payment_method": "Cash",
                    "is_patient_payment": "true",
                    "reference_number": "FGT67483"
                }
            ],
            "writeoff": [
                {
                    "writeoff_id": "1884000003904127",
                    "writeoff_amount": "0.75",
                    "writeoff_date": "2015-06-30",
                    "writeoff_added_date": "2015-06-30",
                    "writeoff_updated_date": "",
                    "writeoff_type": "Small Balance",
                    "writeoff_comments": "",
                    "is_patient_writeoff": "false",
                    "writeoff_applied_to": "Claim"
                },
                {
                    "writeoff_id": "1884000003904149",
                    "writeoff_amount": "0.05",
                    "writeoff_date": "2015-06-30",
                    "writeoff_added_date": "2015-06-30",
                    "writeoff_updated_date": "",
                    "writeoff_type": "Small Balance",
                    "writeoff_comments": "",
                    "is_patient_writeoff": "true",
                    "writeoff_applied_to": "Invoice"
                }
            ]
        },
        {
            "invoice_id": "1884000003881412",
            "invoice_number": "INV1276",
            "invoice_date": "2015-06-30",
            "invoice_added_date": "2015-06-24",
            "invoice_updated_date": "2015-06-30",
            "encounter_date": "2015-06-24",
            "invoice_provider_name": "Dr. William Aberthnet",
            "invoice_generated_by": "Dr. William Aberthnet",
            "is_available_credit_used": "false",
            "invoice_terms": "Products once sold cannot be taken back after 7 days",
            "invoice_notes": "Take medicines at time as prescribed by the physician",
            "invoice_amount": "450.75",
            "total_payment_amount": "449.99",
            "total_writeoff_amount": "0.76",
            "invoice_due": "0.0",
            "invoice_status": "Paid",
            "patient_details": {
                "patient_id": "1884000001800333",
                "patient_record_id": "'Ch0406",
                "patient_first_name": "Charles",
                "patient_middle_name": "",
                "patient_last_name": "Cooper",
                "patient_full_name": "Charles Cooper",
                "patient_gender": "male",
                "patient_dob": "1985-05-25"
            },
            "facility_details": {
                "facility_id": "1884000000374011",
                "facility_name": "ChARM Community Hospital ",
                "facility_code": "FL"
            },
            "procedures": [
                {
                    "item_id": "1884000003904155",
                    "item_name": "Level 4 - New Patient Office Visit, Comprehensive 45 minute consult",
                    "item_charge": "250.0",
                    "item_quantity": "1",
                    "item_type": "Procedure",
                    "code_id": "1884000000444009",
                    "code_number": "99204",
                    "tax_name": "Service Tax",
                    "tax_percentage": "5.0",
                    "tax_amount": "10.0",
                    "discount_amount": "50.0",
                    "item_total": "210.0"
                }
            ],
            "products": [
                {
                    "item_id": "1884000003904153",
                    "item_name": "Thiamine 50 mg oral tablet",
                    "item_charge": "50.0",
                    "item_quantity": "5",
                    "item_type": "Inventory",
                    "category_name": "Supplement",
                    "batch_number": "-",
                    "cost_price": "3.75",
                    "expiry_date": "1969-12-31",
                    "tax_name": "Sales Tax",
                    "tax_percentage": "7.0",
                    "tax_amount": "15.75",
                    "discount_amount": "25.0",
                    "item_total": "240.75"
                }
            ],
            "payments": [
                {
                    "payment_id": "1884000003881444",
                    "payment_amount": "436.41",
                    "payment_to": "Invoice",
                    "payment_added_date": "2015-06-24",
                    "payment_updated_date": "",
                    "receipt_id": "1884000003881442",
                    "receipt_number": "REC957",
                    "receipt_date": "2015-06-24",
                    "receipt_amount": "436.41",
                    "payment_method": "Cash",
                    "is_patient_payment": "true"
                },
                {
                    "payment_id": "1884000003881446",
                    "payment_amount": "13.58",
                    "payment_to": "Invoice",
                    "payment_added_date": "2015-06-24",
                    "payment_updated_date": "",
                    "receipt_id": "1884000003577061",
                    "receipt_number": "REC921",
                    "receipt_date": "2015-04-09",
                    "receipt_amount": "50.0",
                    "payment_method": "Cash",
                    "is_patient_payment": "true",
                    "reference_number": "fjkwnfkjnwejg"
                }
            ],
            "writeoff": [
                {
                    "writeoff_id": "1884000003904189",
                    "writeoff_amount": "0.76",
                    "writeoff_date": "2015-06-30",
                    "writeoff_added_date": "2015-06-30",
                    "writeoff_updated_date": "",
                    "writeoff_type": "Small Balance",
                    "writeoff_applied_to": "Invoice",
                    "is_patient_writeoff": "true",
                    "writeoff_comments": ""
                }
            ]
        }
    ]
}

Query Parameters

Name Required Type Description
date_name optional string Invoices are fetched based on the value of this parameter. The possible values are invoice_date (or) invoice_added_date (or) invoice_updated_date. Default value is invoice_date. invoice_date refers the date chosen by the user while creating/generating the Invoice. invoice_added_date refers the date on which Invoice is approved first by the user. invoice_updated_date refers the date on which Invoice is edited/updated recently in the System. The operations ‘Add/Edit Payment’, Add/Edit Write-off', ‘Edit/Cancel Invoice’ and ‘Void Payment’ are considered as ‘Update’ for the Invoice
from_date required string Invoices are fetched from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Invoices are fetched up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
start_index optional int Default value is 1. Invoices are fetched from this index. A maximum of 100 invoices are fetched per API call. So, start_index need to be used to get subsequent invoices.

Get Invoice Summary

GET /api/ehr/v1/invoices/summary

Get summary of invoices for the given date period

Request Example


{
    "date_name": "invoice_date",
    "from_date": "2015-06-29",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "summary": {
        "total_invoice_amount": "904.55",
        "total_invoice_due": "200.0"
    }
}

Query Parameters

Name Required Type Description
date_name optional string Invoices are accounted based on the value of this parameter. The possible values are invoice_date (or) invoice_added_date. Default value is invoice_date
from_date required string Invoices are accounted from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Invoices are accounted up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
patient_id optional long filter by the patient

Get Invoice

GET /api/ehr/v1/invoices/{invoice_id}

Get details of the Invoice

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "invoice": {
        "invoice_id": "1884000003881205",
        "invoice_number": "INV1275",
        "invoice_date": "2015-06-29",
        "invoice_added_date": "2015-06-24",
        "invoice_updated_date": "2015-06-30",
        "encounter_date": "2015-06-24",
        "invoice_provider_name": "Dr. William Aberthnet",
        "invoice_generated_by": "Dr. William Aberthnet",
        "is_available_credit_used": "false",
        "invoice_terms": "Products once sold cannot be taken back after 7 days",
        "invoice_notes": "Take medicines at time as prescribed by the physician",
        "invoice_amount": "453.8",
        "total_payment_amount": "253.0",
        "total_writeoff_amount": "0.8",
        "invoice_due": "200.0",
        "invoice_status": "Partially Paid",
        "patient_details": {
            "patient_id": "1884000001800333",
            "patient_record_id": "'Ch0406",
            "patient_first_name": "Stephen",
            "patient_middle_name": "",
            "patient_last_name": "Hook",
            "patient_full_name": "Stephen Hook",
            "patient_gender": "male",
            "patient_dob": "1988-07-02"
        },
        "facility_details": {
            "facility_id": "1884000000374011",
            "facility_name": "ChARM Community Hospital ",
            "facility_code": "FL"
        },
        "procedures": [
            {
                "item_id": "1884000003881207",
                "item_name": "Level 5 - New Patient Office Visit, Comprehensive 60 minute consult",
                "item_charge": "300.0",
                "item_quantity": "1",
                "item_type": "Procedure",
                "code_id": "1884000000444011",
                "code_number": "99205",
                "tax_name": "Service Tax",
                "tax_percentage": "5.0",
                "tax_amount": "13.5",
                "discount_amount": "30.0",
                "item_total": "283.5"
            },
            {
                "item_id": "1884000003881209",
                "item_name": "Blood Sugar - Random",
                "item_charge": "50.0",
                "item_quantity": "1",
                "item_type": "Lab Test",
                "code_id": "1884000003405021",
                "code_number": "LAB001",
                "tax_name": "Service Tax",
                "tax_percentage": "5.0",
                "tax_amount": "2.25",
                "discount_amount": "5.0",
                "item_total": "47.25"
            }
        ],
        "products": [
            {
                "item_id": "1884000003904051",
                "item_name": "Thiamine 50 mg oral tablet",
                "item_type": "Inventory",
                "item_charge": "50.0",
                "item_quantity": "2",
                "category_name": "Supplement",
                "batch_number": "-",
                "cost_price": "3.75",
                "expiry_date": "1969-12-31",
                "tax_name": "Sales Tax",
                "tax_percentage": "7.0",
                "tax_amount": "6.44",
                "discount_amount": "8.0",
                "item_total": "98.44"
            },
            {
                "item_id": "1884000003904053",
                "item_name": "5-HTP 50mg 60cap",
                "item_charge": "25.0",
                "item_quantity": "1",
                "item_type": "Inventory",
                "category_name": "Supplement",
                "batch_number": "-",
                "cost_price": "8.0",
                "expiry_date": "1969-12-31",
                "tax_name": "Sales Tax",
                "tax_percentage": "7.0",
                "tax_amount": "1.61",
                "discount_amount": "2.0",
                "item_total": "24.61"
            }
        ],
        "payments": [
            {
                "payment_id": "1884000003904115",
                "payment_amount": "130.0",
                "payment_to": "Claim",
                "payment_added_date": "2015-06-30",
                "payment_updated_date": "",
                "receipt_id": "1884000003904113",
                "receipt_number": "REC958",
                "receipt_date": "2015-06-30",
                "receipt_amount": "130.0",
                "payment_method": "Cash",
                "is_patient_payment": "false",
                "reference_number": "NRY735372"
            },
            {
                "payment_id": "1884000003904133",
                "payment_amount": "123.0",
                "payment_to": "Invoice",
                "payment_added_date": "2015-06-30",
                "payment_updated_date": "",
                "receipt_id": "1884000003904131",
                "receipt_number": "REC960",
                "receipt_date": "2015-06-30",
                "receipt_amount": "123.0",
                "payment_method": "Cash",
                "is_patient_payment": "true",
                "reference_number": "FGT67483"
            }
        ],
        "writeoff": [
            {
                "writeoff_id": "1884000003904127",
                "writeoff_amount": "0.75",
                "writeoff_date": "2015-06-30",
                "writeoff_added_date": "2015-06-30",
                "writeoff_updated_date": "",
                "writeoff_type": "Small Balance",
                "writeoff_comments": "",
                "is_patient_writeoff": "false",
                "writeoff_applied_to": "Claim"
            },
            {
                "writeoff_id": "1884000003904149",
                "writeoff_amount": "0.05",
                "writeoff_date": "2015-06-30",
                "writeoff_added_date": "2015-06-30",
                "writeoff_updated_date": "",
                "writeoff_type": "Small Balance",
                "writeoff_comments": "",
                "is_patient_writeoff": "true",
                "writeoff_applied_to": "Invoice"
            }
        ]
    }
}

Receipts

API for Receipts

List Receipts

GET /api/ehr/v1/receipts

List the Receipts that are added/updated in the given date period

Request Example


{
    "date_name": "receipt_date",
    "from_date": "2015-06-24",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011",
    "start_index": "1"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "receipts": [
        {
            "receipt_id": "1884000003881442",
            "receipt_number": "REC957",
            "receipt_date": "2015-06-24",
            "receipt_added_date": "2015-06-24",
            "receipt_updated_date": "2015-07-01",
            "payment_method": "Cash",
            "is_patient_payment": "true",
            "receipt_amount": "600.0",
            "total_applied_payment_amount": "500.0",
            "total_refund_amount": "50.0",
            "unused_amount": "50.0",
            "reference_number": "",
            "description": "",
            "is_voided": "false",
            "patient_details": {
                "patient_id": "1884000001800333",
                "patient_record_id": "'Ch0406",
                "patient_first_name": "Charles",
                "patient_middle_name": "",
                "patient_last_name": "Cooper",
                "patient_full_name": "Charles Cooper",
                "patient_gender": "male",
                "patient_dob": "1985-02-25"
            },
            "facility_details": {
                "facility_id": "1884000000374011",
                "facility_name": "ChARM Community Hospital ",
                "facility_code": "FL"
            },
            "invocies_paid": [
                {
                    "payment_id": "1884000003881444",
                    "payment_amount": "436.41",
                    "payment_to": "Invoice",
                    "payment_added_date": "2015-06-24",
                    "payment_updated_date": "",
                    "invoice_id": "1884000003881412",
                    "invoice_number": "INV1276",
                    "invoice_date": "2015-06-30",
                    "invoice_amount": "450.75",
                    "invoice_status": "Paid"
                },
                {
                    "payment_id": "1884000003904197",
                    "payment_amount": "63.59",
                    "payment_to": "Invoice",
                    "payment_added_date": "2015-07-01",
                    "payment_updated_date": "",
                    "invoice_id": "1884000003881205",
                    "invoice_number": "INV1275",
                    "invoice_date": "2015-06-30",
                    "invoice_amount": "453.8",
                    "invoice_status": "Partially Paid"
                }
            ],
            "refunds": [
                {
                    "refund_id": "1884000003904203",
                    "refund_amount": "50.0",
                    "refund_method": "Cash",
                    "refund_date": "2015-06-30",
                    "refund_added_date": "2015-07-01",
                    "refund_updated_date": "",
                    "refunded_by": "Dr. William Aberthnet",
                    "refund_reference_number": "NWR76384",
                    "refund_comments": ""
                }
            ]
        },
        {
            "receipt_id": "1884000003904113",
            "receipt_number": "REC958",
            "receipt_date": "2015-06-30",
            "receipt_added_date": "2015-06-30",
            "receipt_updated_date": "2015-07-01",
            "payment_method": "Cash",
            "is_patient_payment": "false",
            "receipt_amount": "150.0",
            "total_applied_payment_amount": "130.0",
            "total_refund_amount": "10.0",
            "unused_amount": "10.0",
            "reference_number": "NRY735372",
            "description": "",
            "is_voided": "false",
            "patient_details": {
                "patient_id": "1884000001800333",
                "patient_record_id": "'Ch0406",
                "patient_first_name": "Stephen",
                "patient_middle_name": "",
                "patient_last_name": "Hook",
                "patient_full_name": "Stephen Hook",
                "patient_gender": "male",
                "patient_dob": "1988-07-02"
            },
            "facility_details": {
                "facility_id": "1884000000374011",
                "facility_name": "ChARM Community Hospital ",
                "facility_code": "FL"
            },
            "invocies_paid": [
                {
                    "payment_id": "1884000003904115",
                    "payment_to": "Claim",
                    "payment_added_date": "2015-06-30",
                    "payment_updated_date": "",
                    "payment_amount": "130.0",
                    "invoice_id": "1884000003881205",
                    "invoice_number": "INV1275",
                    "invoice_date": "2015-06-30",
                    "invoice_amount": "453.8",
                    "invoice_status": "Partially Paid"
                }
            ],
            "refunds": [
                {
                    "refund_id": "1884000003904211",
                    "refund_date": "2015-06-29",
                    "refund_added_date": "2015-07-01",
                    "refund_updated_date": "2015-07-01",
                    "refund_amount": "10.0",
                    "refund_method": "Cash",
                    "refunded_by": "Dr. William Aberthnet",
                    "refund_reference_number": "MNG86483",
                    "refund_comments": ""
                }
            ]
        }
    ]
}

Query Parameters

Name Required Type Description
date_name optional string Receipts are fetched based on the value of this parameter. The possible values are receipt_date (or) receipt_added_date (or) receipt_updated_date. Default value is receipt_date. receipt_date refers the date chosen by the user while creating the Receipt. receipt_added_date refers the date on which Receipt is actually added in the System. receipt_updated_date refers the date on which Receipt is updated recently in the System. The operations ‘Edit & Apply Payment’, ‘Add/Edit Refund’, ‘Void Payment’ and ‘Adjust Invoice Payments’ are considered as ‘Update’ for Receipts
from_date required string Receipts are fetched from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Receipts are fetched up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
start_index optional int Default value is 1. Receipts are fetched from this index. A maximum of 100 receipts are fetched per API call. So, start_index need to be used to get subsequent receipts

Get Total Receipt Amount

GET /api/ehr/v1/receipts/summary

Get total receipt amount for the given date period

Request Example


{
    "date_name": "receipt_date",
    "from_date": "2015-06-24",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "summary": {
        "total_receipt_amount": "750.0"
    }
}

Query Parameters

Name Required Type Description
date_name optional string Receipts are accounted based on the value of this parameter. The possible values are receipt_date (or) receipt_added_date. Default value is receipt_date
from_date required string Receipts are accounted from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Receipts are accounted up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
patient_id optional long filter by the patient

Get Total Unused Amount of the Receipts

GET /api/ehr/v1/receipts/unusedamount

Get total unused amount available currently from the receipts thats falls in the given date period

Request Example


{
    "date_name": "receipt_date",
    "from_date": "2015-06-24",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "summary": {
        "total_unused_amount": "60.0"
    }
}

Query Parameters

Name Required Type Description
date_name optional string Receipts are accounted based on the value of this parameter. The possible values are receipt_date (or) receipt_added_date. Default value is receipt_date
from_date required string Receipts are accounted from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Receipts are accounted up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
patient_id optional long filter by the patient

Get Receipt

GET /api/ehr/v1/receipts/{receipt_id}

Get Receipt details

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "receipt": {
        "receipt_id": "1884000003881442",
        "receipt_number": "REC957",
        "receipt_date": "2015-06-24",
        "receipt_added_date": "2015-06-24",
        "receipt_updated_date": "2015-07-01",
        "payment_method": "Cash",
        "is_patient_payment": "true",
        "receipt_amount": "600.0",
        "total_applied_payment_amount": "500.0",
        "total_refund_amount": "50.0",
        "unused_amount": "50.0",
        "reference_number": "",
        "description": "",
        "is_voided": "false",
        "patient_details": {
            "patient_id": "1884000001800333",
            "patient_record_id": "'Ch0406",
            "patient_first_name": "Charles",
            "patient_middle_name": "",
            "patient_last_name": "Cooper",
            "patient_full_name": "Charles Cooper",
            "patient_gender": "male",
            "patient_dob": "1985-02-25"
        },
        "facility_details": {
            "facility_id": "1884000000374011",
            "facility_name": "ChARM Community Hospital ",
            "facility_code": "FL"
        },
        "invocies_paid": [
            {
                "payment_id": "1884000003881444",
                "payment_amount": "436.41",
                "payment_to": "Invoice",
                "payment_added_date": "2015-06-24",
                "payment_updated_date": "",
                "invoice_id": "1884000003881412",
                "invoice_number": "INV1276",
                "invoice_date": "2015-06-30",
                "invoice_amount": "450.75",
                "invoice_status": "Paid"
            },
            {
                "payment_id": "1884000003904197",
                "payment_amount": "63.59",
                "payment_to": "Invoice",
                "payment_added_date": "2015-07-01",
                "payment_updated_date": "",
                "invoice_id": "1884000003881205",
                "invoice_number": "INV1275",
                "invoice_date": "2015-06-30",
                "invoice_amount": "453.8",
                "invoice_status": "Partially Paid"
            }
        ],
        "refunds": [
            {
                "refund_id": "1884000003904203",
                "refund_amount": "50.0",
                "refund_method": "Cash",
                "refund_date": "2015-06-30",
                "refund_added_date": "2015-07-01",
                "refund_updated_date": "",
                "refunded_by": "Dr. William Aberthnet",
                "refund_reference_number": "NWR76384",
                "refund_comments": ""
            }
        ]
    }
}

Payments

API for Payments

List Payments

GET /api/ehr/v1/payments

List Payments of the Invoice

Request Example


{
    "date_name": "payment_added_date",
    "from_date": "2015-06-30",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011",
    "start_index": "1"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "payments": [
        {
            "payment_id": "1884000003904115",
            "payment_amount": "130.0",
            "payment_to": "Claim",
            "payment_added_date": "2015-06-30",
            "payment_updated_date": "",
            "receipt_details": {
                "receipt_id": "1884000003904113",
                "receipt_number": "REC958",
                "receipt_amount": "150.0",
                "receipt_date": "2015-06-30",
                "payment_method": "Cash",
                "is_patient_payment": "false",
                "reference_number": "NRY735372",
                "description": ""
            },
            "invoice_details": {
                "invoice_id": "1884000003881205",
                "invoice_number": "INV1275",
                "invoice_date": "2015-06-30",
                "invoice_amount": "453.8",
                "invoice_status": "Partially Paid",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        },
        {
            "payment_id": "1884000003904133",
            "payment_amount": "123.0",
            "payment_to": "Invoice",
            "payment_added_date": "2015-06-30",
            "payment_updated_date": "",
            "receipt_details": {
                "receipt_id": "1884000003904131",
                "receipt_number": "REC960",
                "receipt_amount": "123.0",
                "receipt_date": "2015-06-30",
                "payment_method": "Cash",
                "is_patient_payment": "true",
                "reference_number": "FGT67483",
                "description": ""
            },
            "invoice_details": {
                "invoice_id": "1884000003881205",
                "invoice_number": "INV1275",
                "invoice_date": "2015-06-30",
                "invoice_amount": "453.8",
                "invoice_status": "Partially Paid",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        }
    ]
}

Query Parameters

Name Required Type Description
date_name optional string Payments are fetched based on the value of this parameter. The possible values are payment_added_date (or) payment_updated_date. Default value is payment_added_date. payment_added_date refers the date on which Payment is applied to Invoice from Receipt. payment_updated_date refers the date on which Payment is edited/updated recently in the System
from_date required string Payments are fetched from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Payments are fetched up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
start_index optional int Default value is 1. Payments are fetched from this index. A maximum of 100 payments are fetched per API call. So, start_index need to be used to get subsequent payments.

Write-offs

API for write-offs

List Write-offs

GET /api/ehr/v1/writeoffs

Get details of write-off done in the given date period

Request Example


{
    "date_name": "writeoff_date",
    "from_date": "2015-06-30",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011",
    "start_index": "1"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "writeoffs": [
        {
            "writeoff_id": "1884000003904127",
            "writeoff_amount": "0.75",
            "writeoff_date": "2015-06-30",
            "writeoff_added_date": "2015-06-30",
            "writeoff_updated_date": "",
            "writeoff_type": "Small Balance",
            "writeoff_applied_to": "Claim",
            "writeoff_comments": "",
            "is_patient_writeoff": "false",
            "invoice_details": {
                "invoice_id": "1884000003881205",
                "invoice_number": "INV1275",
                "invoice_amount": "453.8",
                "invoice_date": "2015-06-30",
                "invoice_status": "Partially Paid",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        },
        {
            "writeoff_id": "1884000003904149",
            "writeoff_amount": "0.05",
            "writeoff_date": "2015-06-30",
            "writeoff_added_date": "2015-06-30",
            "writeoff_updated_date": "",
            "writeoff_applied_to": "Invoice",
            "writeoff_type": "Small Balance",
            "writeoff_comments": "",
            "is_patient_writeoff": "true",
            "invoice_details": {
                "invoice_id": "1884000003881205",
                "invoice_number": "INV1275",
                "invoice_amount": "453.8",
                "invoice_date": "2015-06-30",
                "invoice_status": "Partially Paid",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        },
        {
            "writeoff_id": "1884000003904189",
            "writeoff_amount": "0.76",
            "writeoff_date": "2015-06-30",
            "writeoff_added_date": "2015-06-30",
            "writeoff_updated_date": "",
            "writeoff_type": "Small Balance",
            "writeoff_applied_to": "Invoice",
            "writeoff_comments": "",
            "is_patient_writeoff": "true",
            "invoice_details": {
                "invoice_id": "1884000003881412",
                "invoice_number": "INV1276",
                "invoice_amount": "450.75",
                "invoice_date": "2015-06-30",
                "invoice_status": "Paid",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        }
    ]
}

Query Parameters

Name Required Type Description
date_name optional string Write-offs are fetched based on the value of this parameter. The possible values are writeoff_date (or) writeoff_added_date (or) writeoff_updated_date. Default value is writeoff_date. writeoff_date refers the date chosen by the user while giving Write-off to Invoice. writeoff_added_date refers the date on which Write-off is actually given to Invoice. writeoff_updated_date refers the date on which Write-off is edited/updated recently in the System
from_date required string Write-offs are fetched from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Write-offs are fetched up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
start_index optional int Default value is 1. Write-offs are fetched from this index. A maximum of 100 write-offs are fetched per API call. So, start_index need to be used to get subsequent write-offs.

Refunds

API for Refunds

List Refunds

GET /api/ehr/v1/refunds

Get details of Refunds of the Receipts

Request Example


{
    "date_name": "refund_date",
    "from_date": "2015-06-30",
    "to_date": "2015-06-30",
    "facility_id": "1884000000374011",
    "start_index": "1"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "refunds": [
        {
            "refund_id": "1884000003910817",
            "refund_amount": "50.0",
            "refund_method": "Cash",
            "refund_date": "2015-06-30",
            "refund_added_date": "2015-07-03",
            "refund_updated_date": "2015-07-03",
            "refunded_by": "Dr. William Aberthnet",
            "refund_reference_number": "#KLY763823",
            "refund_comments": "Unused amount refunded to patient",
            "receipt_details": {
                "receipt_id": "1884000003881442",
                "receipt_number": "REC957",
                "receipt_amount": "600.0",
                "receipt_date": "2015-06-24",
                "payment_method": "Cash",
                "is_patient_payment": "true",
                "reference_number": "",
                "description": "",
                "is_voided": "false",
                "patient_record_id": "'Ch0406",
                "patient_id": "1884000001800333",
                "facility_id": "1884000000374011"
            }
        },
        {
            "refund_id": "1884000003910837",
            "refund_amount": "5.0",
            "refund_date": "2015-06-30",
            "refund_added_date": "2015-07-03",
            "refund_updated_date": "",
            "refund_method": "Cash",
            "refunded_by": "Dr. William Aberthnet",
            "refund_reference_number": "#NJH78234",
            "refund_comments": "",
            "receipt_details": {
                "receipt_id": "1884000003672165",
                "receipt_number": "REC942",
                "receipt_amount": "50.0",
                "receipt_date": "2015-05-07",
                "payment_method": "Cash",
                "is_patient_payment": "true",
                "reference_number": "",
                "description": "",
                "is_voided": "false",
                "patient_record_id": "'Ch0421",
                "patient_id": "1884000001904277",
                "facility_id": "1884000000374011"
            }
        }
    ]
}

Query Parameters

Name Required Type Description
date_name optional string Refunds are fetched based on the value of this parameter. The possible values are refund_date (or) refund_added_date (or) refund_updated_date. Default value is refund_date. refund_date refers the date chosen by the user while giving Refund from the Receipt. refund_added_date refers the date on which Refund is actually given from the Receipt. refund_updated_date refers the date on which Refund is edited/updated recently in the System
from_date required string Refunds are fetched from this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
to_date required string Refunds are fetched up to this date. It should be given in the format yyyy-mm-dd (or) yyyy-mm-dd hh:mm:ss
facility_id optional long filter by the facility
start_index optional int Default value is 1. Refunds are fetched from this index. A maximum of 100 refunds are fetched per API call. So, start_index need to be used to get subsequent refunds

Procedures

API for Procedures

List Procedures

GET /api/ehr/v1/billing/procedures

Get details of Procedures that are added in the System

Request Example


{
    "code_name": "Office Visit"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "procedures": [
        {
            "code_id": "1884000000444009",
            "code_name": "Level 4 - New Patient Office Visit, Comprehensive 45 minute consult",
            "code_number": "99204",
            "code_type": "Procedure",
            "charge": "150.0",
            "tax_name": "Service Tax",
            "tax_percentage": "5.0",
            "modifier_1": "25",
            "modifier_2": "",
            "modifier_3": "",
            "modifier_4": ""
        },
        {
            "code_id": "1884000000444025",
            "code_name": "Level 5 - Estb Patient Office Visit, Comprehensive 60 minute consult",
            "code_number": "99215",
            "code_type": "Procedure",
            "charge": "200.0",
            "tax_name": "Service Tax",
            "tax_percentage": "5.0",
            "modifier_1": "FH",
            "modifier_2": "",
            "modifier_3": "",
            "modifier_4": ""
        }
    ]
}

Query Parameters

Name Required Type Description
code_id optional long filter procedures by given code id
code_name required string filter procedures by given code name
code_number required string filter procedures by given code number

Inventory

API for Inventory

List Products

GET /api/ehr/v1/inventory/products

Get details of Products that are added in the System

Request Example


{
    "get_stocks": "true"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "products": [
        {
            "product_id": "1884000000866087",
            "product_name": "Amino Support",
            "group_name": "Supplement",
            "category_name": "Supplement",
            "tax_name": "Sales Tax",
            "tax_percentage": "10.0",
            "reorder_level": "10",
            "reorder_quantity": "50",
            "total_available_quantity": "150",
            "stocks": [
                {
                    "stock_id": "1884000000866089",
                    "added_date": "2015-07-05",
                    "received_date": "2015-07-05",
                    "expiry_date": "2016-07-05",
                    "batch_number": "BN-AS-001",
                    "received_quantity": "100",
                    "available_quantity": "100",
                    "cost_price": "12.0",
                    "retail_price": "15.0",
                    "manufacturer": "Ranbaxy Laboratories",
                    "supplier_name": "Modern drug suppliers",
                    "storage_location": "Shelf-54",
                    "pack": "10",
                    "reference_number": "NFH89363"
                },
                {
                    "stock_id": "1884000001716019",
                    "added_date": "2015-05-15",
                    "received_date": "2015-05-15",
                    "expiry_date": "2016-05-15",
                    "batch_number": "BN-AS-002",
                    "received_quantity": "100",
                    "available_quantity": "50",
                    "cost_price": "11.50",
                    "retail_price": "15.0",
                    "storage_location": "Shelf-54",
                    "manufacturer": "Sun Pharma",
                    "supplier_name": "Modern drug suppliers",
                    "pack": "10",
                    "reference_number": "MGDS93743"
                }
            ]
        },
        {
            "product_id": "1884000001982015",
            "product_name": "Thiamine 50 mg tablet",
            "group_name": "Supplement",
            "category_name": "Supplement",
            "tax_name": "Sales Tax",
            "tax_percentage": "10.0",
            "reorder_level": "50",
            "reorder_quantity": "100",
            "total_available_quantity": "100",
            "stocks": [
                {
                    "stock_id": "1884000001982023",
                    "added_date": "2015-07-02",
                    "received_date": "2015-07-02",
                    "expiry_date": "2017-07-02",
                    "batch_number": "BN-TH-056",
                    "received_quantity": "80",
                    "available_quantity": "70",
                    "cost_price": "8.50",
                    "retail_price": "10.0",
                    "storage_location": "Shelf-47",
                    "manufacturer": "Sun Pharma",
                    "supplier_name": "Modern drug suppliers",
                    "pack": "10",
                    "reference_number": "FDJ8374"
                },
                {
                    "stock_id": "1884000001982023",
                    "added_date": "2015-05-12",
                    "received_date": "2015-05-12",
                    "expiry_date": "2017-05-12",
                    "batch_number": "BN-TH-055",
                    "received_quantity": "50",
                    "available_quantity": "30",
                    "cost_price": "8.50",
                    "retail_price": "10.0",
                    "storage_location": "Shelf-47",
                    "manufacturer": "Sun Pharma",
                    "supplier_name": "Modern drug suppliers",
                    "pack": "10",
                    "reference_number": "KHD98628"
                }
            ]
        }
    ]
}

Query Parameters

Name Required Type Description
product_id optional long filter products by given product id
product_name optional string filter products by given product name
get_stocks optional boolean If it is true, the API will also fetch details of stocks which have available quantities

List Stocks of the Products

GET /api/ehr/v1/inventory/products/stocks

Get details of Stocks that are added/dispensed in given date period

Request Example


{
    "from_date": "2015-07-01",
    "to_date": "2015-07-05"
}

Response Example

HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8

{
    "code": 0,
    "message": "success",
    "products": [
        {
            "product_id": "1884000000866087",
            "product_name": "Amino Support",
            "group_name": "Supplement",
            "category_name": "Supplement",
            "tax_name": "Sales Tax",
            "tax_percentage": "10.0",
            "reorder_level": "10",
            "reorder_quantity": "50",
            "total_available_quantity": "100",
            "stocks": [
                {
                    "stock_id": "1884000000866089",
                    "added_date": "2015-07-05",
                    "received_date": "2015-07-05",
                    "expiry_date": "2016-07-05",
                    "batch_number": "BN-AS-001",
                    "received_quantity": "100",
                    "available_quantity": "100",
                    "cost_price": "12.0",
                    "retail_price": "15.0",
                    "manufacturer": "Ranbaxy Laboratories",
                    "supplier_name": "Modern drug suppliers",
                    "storage_location": "Shelf-54",
                    "pack": "10",
                    "reference_number": "NFH89363"
                }
            ]
        },
        {
            "product_id": "1884000001982015",
            "product_name": "Thiamine 50 mg tablet",
            "group_name": "Supplement",
            "category_name": "Supplement",
            "tax_name": "Sales Tax",
            "tax_percentage": "10.0",
            "reorder_level": "50",
            "reorder_quantity": "100",
            "total_available_quantity": "70",
            "stocks": [
                {
                    "stock_id": "1884000001982023",
                    "added_date": "2015-07-02",
                    "received_date": "2015-07-02",
                    "expiry_date": "2017-07-02",
                    "batch_number": "BN-TH-056",
                    "received_quantity": "80",
                    "available_quantity": "70",
                    "cost_price": "8.50",
                    "retail_price": "10.0",
                    "storage_location": "Shelf-47",
                    "manufacturer": "Sun Pharma",
                    "supplier_name": "Modern drug suppliers",
                    "pack": "10",
                    "reference_number": "FDJ8374"
                }
            ]
        }
    ]
}

Query Parameters

Name Required Type Description
from_date required string Stocks are fetched from this date. It should be given in the format yyyy-mm-dd
to_date required string Stocks are fetched up to this date. It should be given in the format yyyy-mm-dd