This API documentation is intended for developers who want to integrate with Cerbo's REST API.
As with any development project that involves sensitive data, follow best security practices and ensure the most efficient ways to retrieve specific data. The sections below are not comprehensive, but they are a good starting point.
anonymize
flag for applications which are doing general data analysis to remove most identifying properties about patients.username:password
string sent in an Authorization
header. Do not assume that encoded credentials are any safer than plain-text credentials.Authorization: Basic CREDS
, where CREDS is the base64-encoded credentials.anonymize
flag in your application, do not assume that the consuming application will not be able to identify the patient. API data responses contain a large number of data-points that could be used in conjunction to identify a patient, and questionnaire data included in responses are not scrubbed in any way (these questions are custom for each client, so Cerbo does not know which questions might be identifying).delta
endpoint to calculate which resources have been added, removed, and/or modified within a time-period rather than re-sycning large numbers of documents/data that may already be cached.PATCH
commands where no data is being updated where possible.extended_details
endpoint (which returns a huge amount of data per patient) if you need most of the included data - almost all the data returned by that endpoint is available via more targeted endpoints which will generally be much faster.The REST API serves as an excellent way for your application to request specific data or to initiate changes to data in Cerbo. However, there are many scenarios where your application needs notifications about events in the EHR. These types of notifications are called webhooks and Cerbo allows you to easily configure these notices for many actions so your application will be notified when these specific events are triggered within the EHR.
Webhooks can be configured under the Admin > Manage > Integrations
flyout menus. Only users with Superadmin permissions are able to update webhooks. When you add a webhook endpoint, you must enter the URL and select each event for which you would like to receive notifications.
Some important notes about webhooks and their limitations:
Get all appointments for a specified date range
start_date required | string Example: start_date=2020-01-01 Starting date of the date range. The start date should be formatted as |
end_date required | string Example: end_date=2020-02-01 Ending date of the date range. The end date should be formatted as |
provider_id | integer Example: provider_id=1 Provider identifier. If specified, results will be for only that provider. |
pt_id | integer Example: pt_id=1 Patient identifier. If specified, results will be for only that patient. |
include_cancelled | boolean Example: include_cancelled=y If specified and not empty, results will include cancelled appointments. |
include_work_schedule | boolean Example: include_work_schedule=y Include details about when a provider is set to work. |
status | Array of strings Appointment status. If specified, results will be for only the given statuses.
Valid statuses include |
limit | integer <= 1000 Default: 1000 Limit of how many records to return. Often used in conjunction with offset for pagination. |
offset | integer Offset of where to start the returned records. Often used in conjunction with limit for pagination. |
curl -H "Authorization: Basic CREDS" -X GET \ https://subdomain.md-hq.com/api/v1/appointments?limit=10&start_date=2017-01-01&end_date=2017-12-31&provider_id=7&status=confirmed
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "appointment",
- "id": 0,
- "title": "string",
- "appointment_status": "string",
- "appointment_location": "string",
- "recurrance_interval": 0,
- "recurrance_type": "string",
- "recurrance_value": "string",
- "recurrance_group": "string",
- "addedby": 0,
- "datedeleted": "string",
- "patient_details": {
- "object": "patient",
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "middle_name": "string",
- "dob": "2019-08-24",
- "sex": "M",
- "email1": "string",
- "url_patient_details": "string"
}, - "associated_providers": [
- {
- "object": "string",
- "id": 0,
- "first_name": "string",
- "middle_name": "string",
- "last_name": "string",
- "prefix": "string",
- "suffix": "string",
- "npi": "string",
- "email": "string",
- "is_resource": true,
- "associated_by": 0,
- "date_associated": "string",
- "is_active_user": true,
- "url_user_details": "string"
}
], - "telemedicine": {
- "is_telemedicine": true,
- "telemedicine_url": "string"
}, - "start_date_time": "string",
- "end_date_time": "string",
- "appointment_type": "string",
- "appointment_note": "string",
- "created": "string"
}
]
}
Create a new appointment
start_date_time required | string Starting datetime of the date range.
This field should be formatted as |
end_date_time required | string Ending datetime of the date range.
This field should be formatted as |
provider_ids required | Array of integers An array of provider identifiers associated with this appointment. |
pt_id | integer A patient identifier associated with this appointment. |
appointment_type required | string Valid appointment type |
title required | string Display title of the appointment. |
appointment_note required | string Accompanying notes for the appointment. |
status | string Default: "scheduled" The status of the appointment.
Valid statuses include |
telemedicine | boolean Default: false Flag for whether or not this is a telemedicine appointment. |
{- "start_date_time": "2020-01-01 09:00",
- "end_date_time": "2020-02-01 09:30",
- "provider_ids": [
- 1
], - "pt_id": 1,
- "appointment_type": "Preventative Care",
- "title": "string",
- "appointment_note": "string",
- "status": "scheduled",
- "telemedicine": false
}
Update an appointment
appointment_id required | integer Appointment identifier. |
start_date_time | string Starting datetime of the date range.
This field should be formatted as |
end_date_time | string Ending datetime of the date range.
This field should be formatted as |
provider_ids | Array of integers An array of provider identifiers associated with this appointment. |
pt_id | integer A patient identifier associated with this appointment. |
appointment_type | string Valid appointment type |
title | string Display title of the appointment. |
appointment_note | string Accompanying notes for the appointment. |
status | string The status of the appointment.
Valid statuses include |
{- "start_date_time": "2020-01-01 09:00",
- "end_date_time": "2020-02-01 09:30",
- "provider_ids": [
- 1
], - "pt_id": 1,
- "appointment_type": "Preventative Care",
- "title": "string",
- "appointment_note": "string",
- "status": "string"
}
Destroy an appointment.
This method should be used to completely remove an appointment.
If you are looking to cancel an appointment, instead use the update endpoint and set the status to cancelled
.
appointment_id required | integer Appointment identifier. |
curl -H "Authorization: Basic CREDS" -X DELETE https://subdomain.md-hq.com/api/v1/appointments/542
Get appointment availability for providers and/or appointment types.
start_date required | string Example: start_date=2020-01-01 Starting date of the date range. The start date should be formatted as |
end_date required | string Example: end_date=2020-02-01 Ending date of the date range. The end date should be formatted as |
provider_ids | Array of integers Provider identifiers. If specified, results will be for only those providers. |
appointment_type_ids | Array of integers Appointment type identifiers. If specified, results will be for only those appointment types. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/appointments/availability?start_date=2024-09-01&end_date=2024-10-01&provider_ids[]=473&appointment_type_ids[]=8&appointment_type_ids[]=341
{- "object": "list",
- "parameters": {
- "start_date": "string",
- "end_date": "string",
- "provider_ids": [
- 0
], - "appointment_type_ids": [
- 0
]
}, - "gmt_timezone_offset": "string",
- "has_more": true,
- "user_availabilies": [
- {
- "provider_id": 0,
- "provider_details": {
- "object": "string",
- "id": 0,
- "first_name": "string",
- "middle_name": "string",
- "last_name": "string",
- "prefix": "string",
- "suffix": "string",
- "npi": "string",
- "email": "string",
- "is_resource": true,
- "has_calendar": true,
- "user_notes": "string",
- "login_active": true,
- "active": true,
- "display_name_for_messages": "string",
- "display_name_for_appointments": "string",
- "created": "string"
}, - "availability_by_type": [
- {
- "appointment_type_id": 0,
- "appointment_type_details": {
- "object": "string",
- "id": 0,
- "name": "string",
- "name_portal": "string",
- "color_hex": "string",
- "description": "string",
- "allow_on_portal": true,
- "number_of_overlaps_to_allow": 0,
- "portal_notice": "string",
- "which_providers": [
- 0
], - "default_length": 0,
- "default_status": "string",
- "sort_order": 0,
- "telemedicine": true,
- "is_active": true,
- "inactive_date": "string",
- "created": "string",
- "created_by": 0
}, - "available_windows": [
- {
- "window_start": "string",
- "window_end": "string",
- "minutes_available_at_this_time": 0
}
]
}
]
}
]
}
Get all appointment types
If the email_reminder_hrs_before
or sms_reminder_hrs_before
values are less than
zero, it means that they inherit the timing from the default practice settings.
include_deleted | boolean Example: include_deleted=y If specified and not empty, results will include deleted appointment types. |
limit | integer <= 1000 Default: 1000 Limit of how many records to return. Often used in conjunction with offset for pagination. |
offset | integer Offset of where to start the returned records. Often used in conjunction with limit for pagination. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/appointment_types
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "appointment_type",
- "id": 0,
- "name": "string",
- "name_portal": "string",
- "color_hex": "string",
- "description": "string",
- "allow_on_portal": true,
- "number_of_overlaps_to_allow": 0,
- "portal_notice": "string",
- "which_providers": [
- 0
], - "default_length": 0,
- "default_status": "string",
- "sort_order": 0,
- "telemedicine": true,
- "email_notice_on": true,
- "email_notice": "string",
- "email_notice_subject": "string",
- "email_reminder_hrs_before": 0,
- "sms_reminder_on": true,
- "sms_reminder": "string",
- "sms_reminder_hrs_before": 0,
- "is_active": true,
- "inactive_date": "string",
- "created": "string",
- "created_by": 0
}
]
}
Get All Charge Definitions from the Master Ledger
limit | integer <= 100 Default: 100 |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through charge definitions. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/charge_master?limit=10&offset=0
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": "string",
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}
]
}
Get Single Charge Definition from the Master Ledger
charge_id required | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/charge_master/2
{- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": "string",
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}
Get All Patient Charges
pt_id required | integer The ID of the patient. |
limit | integer The maximum number of charges to return (default is 100). |
offset | integer Offset the list to allow cycling through patient charges. |
date_method | string If you're filtering by date range, should the range be calculated by date the charge was created, or the recorded transaction date? Valid arguments are 'created' and 'transaction' (created is the default). |
start_date | string Show charges from after this date (calculated by date_method). |
end_date | string Show charges from before this date (calculated by date_method). |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/charges?limit=100&offset=0&start_date=2018-10-01&end_date=2018-10-31"
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "patient_charge",
- "id": 0,
- "name": "string",
- "patient_id": 0,
- "encounter_id": 0,
- "amount": "string",
- "quantity": 0,
- "discount_multiplier": 0,
- "charge_master_details": {
- "object": "charge_definition",
- "id": 0,
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": 0,
- "is_taxable": true,
- "add_to_insurance_claim": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}, - "billing_rules": {
- "add_to_insurance_claim": true,
- "cpt_code": "string",
- "cpt_modifiers": "string",
- "amt_billed_to_insurance": "string",
- "amt_paid_by_insurance": "string",
- "amt_written_off": "string",
- "date_paid_by_insurance": "string",
- "which_insurance_to_bill": "string",
- "justifying_diagnoses": [
- {
- "object": "assessment",
- "id": "string",
- "name": "string",
- "icd_version": "string",
- "code": "string",
- "addedby": "string",
- "created": "string",
- "diagnosis_history": {
- "onset_date": "string",
- "is_primary": true,
- "initial_treatment_date": "string"
}
}
]
}, - "location_identifier": "string",
- "additional_details": "string",
- "notes": "string",
- "is_voided": true,
- "date_voided": "string",
- "owner_id": 0,
- "addedby": 0,
- "created": "string",
- "transaction_date": "2019-08-24",
- "payment_details": "string",
- "is_deleted": true,
- "date_deleted": "string"
}
]
}
Get All Charges from a Single Encounter
pt_id required | integer The ID of the patient. |
encounter_id required | integer The ID of the encounter. |
limit | integer The maximum number of charge definitions to return (default is 100). |
offset | integer Offset the list to allow cycling through charge definitions. |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/encounters/423/charges"
{- "object": "list",
- "description": "encounter_charges",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "patient_charge",
- "id": 0,
- "name": "string",
- "patient_id": 0,
- "encounter_id": 0,
- "amount": "string",
- "quantity": 0,
- "discount_multiplier": 0,
- "charge_master_details": {
- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": 0,
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}, - "billing_rules": {
- "add_to_insurance_claim": true,
- "cpt_code": "string",
- "cpt_modifiers": "string",
- "amt_billed_to_insurance": "string",
- "amt_paid_by_insurance": "string",
- "amt_written_off": "string",
- "date_paid_by_insurance": "string",
- "which_insurance_to_bill": "string",
- "justifying_diagnoses": [
- {
- "object": "assessment",
- "id": "string",
- "name": "string",
- "icd_version": "string",
- "code": "string",
- "addedby": "string",
- "created": "string",
- "diagnosis_history": {
- "onset_date": "string",
- "is_primary": true,
- "initial_treatment_date": "string"
}
}
]
}, - "location_identifier": "string",
- "additional_details": "string",
- "notes": "string",
- "is_voided": true,
- "date_voided": "string",
- "owner_id": 0,
- "addedby": 0,
- "created": "string",
- "transaction_date": "2019-08-24",
- "payment_details": "string",
- "is_deleted": true,
- "date_deleted": "string"
}
]
}
Get all differences of resources in a specified date time range
resource_type required | string Resource type. Valid resources include |
start_date required | string Example: start_date=2020-01-01 Starting date of the date range. The start date should be formatted as |
end_date required | string Example: end_date=2020-02-01 Ending date of the date range. The end date should be formatted as |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq/api/v1/delta/documents?start_date=2020-01-20&end_date=2020-01-22"
{- "object": "delta",
- "resource_type": "documents",
- "from_date": "string",
- "until_date": "string",
- "delta_data": {
- "created": [
- {
- "id": 0,
- "dateadded": "string",
- "addedby": 0,
- "patient_id": 0,
- "system_type": "string",
- "details_api_url": "string"
}
], - "modified": [
- {
- "id": 0,
- "dateadded": "string",
- "addedby": 0,
- "patient_id": 0,
- "system_type": "string",
- "details_api_url": "string"
}
], - "removed": [
- {
- "id": 0,
- "dateadded": "string",
- "addedby": 0,
- "patient_id": 0,
- "system_type": "string",
- "details_api_url": "string"
}
]
}
}
Please note: All dates listed are listed in UTC, so you’ll want to adjust for your local timezone. These endpoints allow to you search/get details about specific medications. If you are looking for API calls on patient-specific prescriptions as opposed to drug definitions, please use the Patient Prescriptions endpoint. Also, these drug definitions are licensed data from Wolters Kluwer and your usage of these endpoints are limited to functions that you can perform in the EMR or patient portal. You may not use this drug data for purposes other than management of medications for your Cerbo patient population. You can enter several terms with spaces between each (make sure to url-encode the search string, so spaces would be %20). Each term is treated as potentially a wildcard search so tylen%203 (tylen 3) would return Tylenol 325mg, Tylenol Syrup 30mg, etc.
limit | integer <= 100 Default: 50 Limit number of results |
offset | integer Offset the results |
favorites-only | boolean Default: true Return only drugs from provider's favorites list |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/drugs/search/tylenol
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone. The returned JSON will include prescribed medications, supplements, recommendations (and other alternate plan items), diagnoses. One thing to note: the API is designed to return attachments (documents and images that are included in the encounter) with the response, but currently this functionality is disabled and an empty array will always be returned.
patient_id required | integer The ID of the patient. |
limit | integer The maximum number of encounters to return (default is 100). |
offset | integer Offset the list to allow cycling through encounter notes. |
type | string Limit results to a specific encounter note type (e.g., "ov" for office visit). |
signed_only | boolean If included and set to "false," return all encounter notes, including those not marked as signed. |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/encounters?limit=10&signed_only=false&type=ov"
id required | integer Encounter identifier. |
curl -H "Authorization: Basic CREDS" -X DELETE https://subdomain.md-hq.com/api/v1/encounters/1
{- "result": true,
- "object": "encounter",
- "id": 0,
- "data": null,
- "action": "removed",
- "message": "Encounter successfully deleted"
}
pt_id | integer A valid ID of a non-archived patient. |
date_of_service | string <date> A time stamp (YYYY-MM-DD format preferred) representing the date the encounter took or will take place. Can be future or past. |
title | string The title of the encounter note. |
content | string The plaintext-formatted text of the encounter note. |
encounter_type | string The two-letter abbreviation of the type of encounter note you are creating. |
owner | integer A valid ID of a non-archived, non-resource user who is the expected owner/manager of the note. Default is the API “user” itself. |
parent_encounter | integer The valid ID of an existing encounter for the designated patient. If set, the new note will be filed as a sub-note of the designated parent encounter. The parent note must belong to the patient set by pt_id and it must not be a sub-note itself. |
{- "pt_id": 0,
- "date_of_service": "2019-08-24",
- "title": "string",
- "content": "string",
- "encounter_type": "string",
- "owner": 0,
- "parent_encounter": 0
}
Most data about an individual patient is available through specific calls for patient documents, demographics, vitals, etc. However, for research purposes you often want to pull a large amount of discrete data about patients, so Cerbo provides a specific endpoint that aggregates most relevant data into a single call.
To access your patient's extended data, first run an API call to return all patients, then loop through the patient ids returned in that response and fetch each patient's extended details.
Please note: All dates listed are listed in UTC, so you'll want to adjust for your local timezone. Also, the API responses include some routes that may not be available for your instance.
Also note: The responses for this call can often be large (more than 1MB/patient in some scenarios) so response times to this call can vary. Please rate-limit this call to 20 calls/second and we recommend waiting until after business hours if you are going to run this for all patients.
For a full sample response, please visit https://demo1.md-hq.com/custom/sample_data/extended_details.json
id | integer The ID of the patient. |
anonymize | bool The return values will strip PHI identifiers from the chart including: names, street-level addresses, telephone numbers (area codes will remain), date-of-birth (year of birth will remain) and some questionnaire answers. Because ever client has different questionnaires, you will want to make sure you further anonymize the results if your questionnaires include requests for identifying information |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com /api/v1/patients/2/extended_details?anonymize=true
Get all Health Maintenance Trackers from the Master Health Maintenance List.
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
limit | integer Defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through long health maintenance tracker object lists. |
include_specific_pt | boolean If set, returns specific patient data. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/health_maintenance?limit=10&offset=0&include_specific_pt=1
Get single Health Maintenance Tracker from the Master Health Maintenance List
health_maintenance_id required | integer The ID of the health maintenance tracker to retrieve. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/health_maintenance/2
{- "object": "health_maintenance_tracker",
- "id": "2",
- "name": "Annual Exam",
- "description": "",
- "sex": "Both",
- "start_age": 0,
- "end_age": 200,
- "frequency": "12 months",
- "applies_to": "All Patients",
- "overrides": null,
- "icd_codes": "",
- "created": "2019-03-30 02:01:34",
- "addedby": "18"
}
Get all Laboratory definitions from the Master Laboratories List.
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
city | string Returns laboratory listings defined as being in this city. |
state | string Returns laboratory listings defined as being in this state. |
company-brand | string Returns laboratory listings of this brand (e.g., "Quest"). |
limit | integer Upper bound on number of returned laboratory listings |
offset | integer Lower bound on number of returned laboratory listings |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/laboratories?limit=10&offset=0&city=Portland"
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient who orders apply to |
limit | integer Defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through long health maintenance tracker object lists. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/partners/quest/orders
order_id | integer ID of order to show |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/partners/quest/requisition/3/content
pt_id | integer |
limit | integer defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there is more than the limit responses
|
date_method | string Enum: "created" "transaction" If you're filtering by date range, should the range be calculated by date the estimated charge was created, or the recorded transaction date (manual date assigned to the estimated charge)? Valid arguments are created and transaction (created is the default). |
start_date | string <date> If this argument is included it will only show estimated charges from after this date (calculated by |
end_date | string <date> If this argument is included it will only show estimated charges from before this date (calculated by |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/estimates?limit=100&offset=0&start_date=2024-01-01&end_date=2024-01-31
{- "object": "list",
- "description": "patient_estimates",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "patient_estimate",
- "id": 0,
- "name": "string",
- "patient_id": 0,
- "encounter_id": 0,
- "amount": "string",
- "quantity": 0,
- "discount_multiplier": 0,
- "charge_master_details": {
- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": 0,
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}, - "billing_rules": {
- "add_to_insurance_claim": true,
- "cpt_code": "string",
- "cpt_modifiers": "string",
- "amt_billed_to_insurance": "string",
- "amt_paid_by_insurance": "string",
- "date_paid_by_insurance": "string",
- "which_insurance_to_bill": "string",
- "justifying_diagnoses": [
- "string"
]
}, - "location_identifier": "string",
- "additional_details": "string",
- "notes": "string",
- "owner_id": 0,
- "addedby": 0,
- "created": "string",
- "transaction_date": "2019-08-24",
- "payment_details": "string",
- "is_deleted": true,
- "date_deleted": "2019-08-24",
- "expiration_date": "2019-08-24",
- "converted_tp_patient_charge_id": "string"
}
]
}
pt_id | integer |
encounter_id | integer |
limit | integer defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there is more than the limit responses
|
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/encounters/423/estimates
{- "object": "list",
- "description": "encounter_estimates",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "patient_estimate",
- "id": 0,
- "name": "string",
- "patient_id": 0,
- "encounter_id": 0,
- "amount": "string",
- "quantity": 0,
- "discount_multiplier": 0,
- "charge_master_details": {
- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": 0,
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}, - "billing_rules": {
- "add_to_insurance_claim": true,
- "cpt_code": "string",
- "cpt_modifiers": "string",
- "amt_billed_to_insurance": "string",
- "amt_paid_by_insurance": "string",
- "date_paid_by_insurance": "string",
- "which_insurance_to_bill": "string",
- "justifying_diagnoses": [
- "string"
]
}, - "location_identifier": "string",
- "additional_details": "string",
- "notes": "string",
- "owner_id": 0,
- "addedby": 0,
- "created": "string",
- "transaction_date": "2019-08-24",
- "payment_details": "string",
- "is_deleted": true,
- "date_deleted": "2019-08-24",
- "expiration_date": "2019-08-24",
- "converted_tp_patient_charge_id": "string"
}
]
}
pt_id | integer |
estimate_id | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/estimates/64
{- "object": "patient_estimate",
- "id": 0,
- "name": "string",
- "patient_id": 0,
- "encounter_id": 0,
- "amount": "string",
- "quantity": 0,
- "discount_multiplier": 0,
- "charge_master_details": {
- "object": "charge_definition",
- "id": "string",
- "name": "string",
- "name_for_pt_portal": "string",
- "category": "string",
- "cpt_code": "string",
- "nicknames": [
- "string"
], - "barcode_upc": "string",
- "description": "string",
- "retail": "string",
- "wholesale": "string",
- "is_supply": true,
- "time_required": "string",
- "is_taxable": true,
- "tax_rate": 0,
- "is_special": true,
- "add_to_insurance_claims": true,
- "inactive": true,
- "addedby": "string",
- "created": "string"
}, - "billing_rules": {
- "add_to_insurance_claim": true,
- "cpt_code": "string",
- "cpt_modifiers": "string",
- "amt_billed_to_insurance": "string",
- "amt_paid_by_insurance": "string",
- "date_paid_by_insurance": "string",
- "which_insurance_to_bill": "string",
- "justifying_diagnoses": [
- "string"
]
}, - "location_identifier": "string",
- "additional_details": "string",
- "notes": "string",
- "owner_id": 0,
- "addedby": 0,
- "created": "string",
- "transaction_date": "2019-08-24",
- "payment_details": "string",
- "is_deleted": true,
- "date_deleted": "2019-08-24",
- "expiration_date": "2019-08-24",
- "converted_tp_patient_charge_id": "string"
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
limit | integer (optional) defaults to 100, but can be overridden (max is 100) |
offset | integer (optional) If the returned data indicates that there are more responses than the limit (has_more: true), then it will offset the list to allow you to cycle through documents. |
folder | string (optional) String (folder name). Limits results to a specific folder or "tab." |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/documents"
patient_id | integer ID of patient |
enqueue | bool (true by default) If true, the system will insert the document into the active patient portal queue so that the clinic is notified and can review the proposed addition |
pt_id | integer (required) An integer identifier for the patient associated with the document. |
mime_type | string (required) A string indicating the MIME type of the file. Valid MIME types are listed above. |
name | string (required) A string to be used as the title of the document. |
base64_content | string <binary> (required) Binary data, encoded base64. Maximum file size is 16MB. |
notes | string (optional) A string |
{- "pt_id": 0,
- "mime_type": "string",
- "name": "string",
- "base64_content": "string",
- "notes": "string"
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
limit | integer (optional) defaults to 100, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through long patient list |
status | boolean If this parameter is set it will only include ACTIVE patients |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com /api/v1/patients
Data: property-value key-pairs, including nested objects for address and insurance information (match the structure from the GET API call)
Notes: At a minimum, you must provide a first name, last name, date of birth (preferred format is YYYY-MM-DD), and sex (must be M, F, or ?)
first_name required | integer |
last_name required | string (required) A string indicating the MIME type of the file. Valid MIME types are listed above. |
dob required | string YYYY-MM-DD |
sex required | string must be 'M', 'F', or '?' |
{- "first_name": 0,
- "last_name": "string",
- "dob": "string",
- "sex": "string"
}
Data: property-value key-pairs, including nested objects for address and insurance information (match the structure from the GET API call)
first_name | integer |
last_name | string (required) A string indicating the MIME type of the file. Valid MIME types are listed above. |
dob | string YYYY-MM-DD |
sex | string must be 'M', 'F', or '?' |
{- "first_name": 0,
- "last_name": "string",
- "dob": "string",
- "sex": "string"
}
limit | integer (optional) defaults to 100, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through long patient list |
last_name | string (optional) Match patients with given last name. Allows wildcard: smith% will match “Smith”,”Smithson”,”Simthe” etc) |
first_name | string (optional) Match patients with given first name Allows wildcard: ben% will match “Ben”,”Benjamin”,”Bennett” etc) |
string (optional) Match patients with given email as their primary or secondary address Allows wildcard: %@gmail.com will match all patients with Gmail addresses | |
username | string (optional) Match patients with given patient portal username |
dob | string (optional) Match patients with given date of birth (preferred format is yyyy-mmdd). No wildcards allowed |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/search?first_name=John%&last_name=Doe%&dob=1980-12-01
This endpoint allows you to send an email in the same format as other system-generated emails (with your logo at the top and practice information at the bottom). This will look identical to emails sent to patients by clicking on their email address from the Patient Information block in the EMR.
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
subject required | string Subject of email to be sent |
body required | string Body of email to be sent |
reply-to required | string This is the address that any patient response will be forwarded to (the email itself will be sent from do-not-reply@md-hq.com). |
{- "subject": "string",
- "body": "string",
- "reply-to": "string"
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id required | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/laboratories
patient_id required | integer ID of patient |
laboratory_id required | integer An integer, the laboratory ID to add. See the "Facility Endpoints" documentation for how to find the ID in the master laboratories database |
priority_order | integer An integer representing where in the patient's laboratories list this entry should go (lowest number is considered the first/preferred listing). If null, the system will look at set_as_primary instead. |
set_as_primary | boolean A boolean value representing if this should be added as the patient's new preferred listing, or just added to the bottom of the list. If priority_order is set, this argument will be ignored. |
note | string A string, 255 character max |
{- "laboratory_id": 0,
- "priority_order": 0,
- "set_as_primary": true,
- "note": "string"
}
patient_id | integer ID of patient |
pt_note_type_id | integer ID of note type |
note required | string The new free-text note value |
{- "note": "string"
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
limit | integer Defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there are more responses than the limit (has_more: true), then it will offset the list to allow you to cycle through documents. |
photo_type | string String (either “personal” or “medical”). If left blank, both types will be returned. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/images?photo_type=personal
patient_id | integer ID of patient |
pt_id required | integer An integer identifier for the patient associated with the document. |
mime_type required | string A string indicating the MIME type of the file. Valid MIME types: image/jpeg image/jpg image/gif image/png image/pngx |
base64_content required | string <binary> Binary data, encoded base64. Maximum file size is 16MB. |
{- "pt_id": 0,
- "mime_type": "string",
- "base64_content": "string"
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/health_maintenance
patient_id required | integer ID of patient |
health_maintenance_id required | integer ID of health maintenance entry *See “HEALTH MAINTENANCE ENDPOINTS” documentation to get definitions from the master health maintenance trackers list |
date required | string A string specifying the date of the health maintenance tracker. |
notes | integer A string |
{- "date": "string",
- "notes": 0
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
limit | integer Defaults to 100, but can be overridden (max is 100). |
offset | integer If the returned data indicates that there are more responses than the limit (has_more: true), then it will offset the list to allow you to cycle through invoices. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/invoices?limit=10
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/orders"
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/pmh
{- "object": "list",
- "total_count": 0,
- "data": [
- {
- "object": "pmh",
- "id": "string",
- "name": "string",
- "display_name": "string",
- "icd_version": "string",
- "code": "string",
- "problem_status": "string",
- "addedby": "string",
- "created": "string",
- "encounter_id": 0,
- "url_encounter": 0
}
]
}
Please note: All dates listed are listed in UTC, so you'll want to adjust for your local timezone. Also, the API responses include some routes that may not be available for your instance. For the most part adding to the patient portal is going to be made through message-type specific endpoints (i.e. the /patients/:pt_id/questionnairesendpoint or the/patients/:pt_id/rxs endpoint) and the documentation for those posts are listed alongside other related calls. However, if you're just looking to summarize or manage posts that are already in queue (before they've been dismissed) you can use the calls below:
pt_id | integer ID of patient |
request_type | string (COMING SOON) return only specific types of requests |
status | string (COMING SOON) return requests of a specific status (defaults to “open”) |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/portal/enqueued
All API-supported DELETE commands are “soft-deletes” so the data remains available but hidden. The time and API-user-identifier are both recorded automatically
pt_id | integer ID of patient |
queue_request_id | integer ID of queued request |
curl -H "Authorization: Basic CREDS" -X DELETE https://subdomain.md-hq.com/api/v1/patients/1/portal/enqueued/27
This will try to send an email to the patient's primary email address with an encrypted link. The text and subject of this email will be the same as the settings that you use when inviting patients from inside the EMR.
pt_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X POST https://ben:password@sandbox.md-hq.com/api/v1/patients/221/portal/invite
If the credentials are valid, this will return the matching patient's details
username required | string The patient's username that they use to login to your patient portal |
password required | string The patient's password that they use to login to your patient portal |
{- "username": "string",
- "password": "string"
}
{- "result": true,
- "message": "string",
- "patient_details": {
- "id": 0,
- "first_name": "string",
- "last_name": "string",
- "email_address": "string",
- "status": "string"
}
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone. If you want to manage underlying drug definitions please use the /v1/drugs endpoints.
patient_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/rxs
patient_id | integer ID of patient |
enqueue | boolean (true by default) If true, the system will insert the drug into the active patient portal queue so that the clinic is notified and can review the proposed addition. This replicates the functionality of the patient portal queue. |
drug_id required | integer An integer identifier for a drug as returned from a /v1/drugs/search/:term query. |
notes | string |
{- "drug_id": 0,
- "notes": "string"
}
patient_id | integer ID of patient |
original_prescription_id required | integer An integer identifier for an existing prescription for this patient as returned from a /v1/patients/:patient_id/rxs GET query. |
notes | string |
agreed_to_terms | string A string value representing agreement to terms. If not set, defaults to "No terms agreed to". |
{- "original_prescription_id": 0,
- "notes": "string",
- "agreed_to_terms": "string"
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
limit | integer Number of results returned. Default (and maximum) is 100. |
offset | integer Used for looping through the dataset. Default is 0. |
include_deleted | boolean Returns deleted and current subscriptions if set to true. Default is false. |
schedule_frequency | string Enum: "monthly" "weekly" "annually" If set to monthly/weekly/annually, it will only return subscriptions billing at that frequency. |
subscription_charge_id | string ID of a specific charge associated with a subscription-type. If set, it will only return that type of subscription. |
charge_owner_user_id | string ID of a Cerbo user that gets 'credit' for that subscription. If set, it will only return 'their' subscriptions. |
curl -H "Authorization: Basic CREDS" -X GET https://pk_username:sk_password@subdomain.md-hq.com/api/v1/patients/subscriptions?include_deleted=true&limit=5&schedule_frequency=monthly&subscription_charge_id=1021
patient_id | integer ID of patient |
include_deleted | boolean False by default. Returns deleted and current subscriptions if set to true. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1540/subscriptions?include_deleted=true
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone. If you want to manage underlying supplement definitions please use the /v1/ supplements endpoints.
patient_id | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/supplements
patient_id | integer |
enqueue | boolean (true by default) If true, the system will insert the supplement into the active patient portal queue so that the clinic is notified and can review the proposed addition. This replicates the functionality of the patient portal queue. |
supplement_id required | integer An integer identifier for a supplement as returned from a /v1/supplements/search/:term query. |
notes | string |
{- "supplement_id": 0,
- "notes": "string"
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you’ll want to adjust for your local timezone. These endpoints allow you to query the system about users (providers and other staff) in Cerbo.
limit | integer Defaults to 10, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit
responses |
status | string If a non-empty value is passed the system will include deleted/suspended users in the return. If the argument is omitted only active users will be returned. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com /api/v1/users?limit=10
This endpoint is rate limited to 3 attempts per 10 seconds, and 120 per 12-hour period.
user required | string username |
password required | string |
{- "user": "string",
- "password": "string"
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone. If you want to manage underlying supplement definitions please use the /v1/ supplements endpoints.
patient_id | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/vaccines
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": {
- "object": "pt_vaccine",
- "id": 0,
- "pt_id": 0,
- "vaccine_id": 0,
- "vaccine_name": "string",
- "dose": 0,
- "site": "string",
- "notes": "string",
- "in_office": true,
- "administeredby": "string",
- "administered": "string",
- "enteredby": 0,
- "entered": "string",
- "next_due": true
}
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/vitals/height
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "height",
- "id": 0,
- "pt_id": 0,
- "date_taken": "2019-08-24T14:15:22Z",
- "height": 0,
- "units": "string",
- "comments": "string",
- "addedby": 0,
- "created": "2019-08-24T14:15:22Z"
}
]
}
patient_id | integer |
height | string A string specifying the height reading |
units | string A string specifying the unit (inches or “cm”) |
comments | string |
date_taken | string A string specifying the date and time of the vital reading (if no valid 3-letter timezone specified, defaults to UTC). If left blank, defaults to the current time. |
{- "height": "string",
- "units": "string",
- "comments": "string",
- "date_taken": "string"
}
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/vitals/weight
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "weight",
- "id": 0,
- "pt_id": 0,
- "date_taken": "2019-08-24T14:15:22Z",
- "weight": 0,
- "units": "string",
- "comments": "string",
- "addedby": 0,
- "created": "2019-08-24T14:15:22Z"
}
]
}
patient_id | integer |
weight | string A string specifying the weight reading |
units | string A string specifying the unit (“lbs” or “kg”) |
comments | string |
date_taken | string A string specifying the date and time of the vital reading (if no valid 3-letter timezone specified, defaults to UTC). If left blank, defaults to the current time. |
{- "weight": "string",
- "units": "string",
- "comments": "string",
- "date_taken": "string"
}
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/vitals/bp
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "bp",
- "id": 0,
- "pt_id": 0,
- "date_taken": "2019-08-24T14:15:22Z",
- "systolic": 0,
- "diastolic": 0,
- "pulse": 0,
- "units": "string",
- "comments": "string",
- "addedby": 0,
- "created": "2019-08-24T14:15:22Z"
}
]
}
patient_id | integer |
systolic | string A string specifying the systolic pressure reading |
diastolic | string A string specifying the diastolic pressure reading |
pulse | string A string specifying the pulse (b/min) reading |
comments | string |
date_taken | string A string specifying the date and time of the vital reading (if no valid 3-letter timezone specified, defaults to UTC). If left blank, defaults to the current time. |
{- "systolic": "string",
- "diastolic": "string",
- "pulse": "string",
- "comments": "string",
- "date_taken": "string"
}
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/vitals/weight
{- "object": "list",
- "total_count": 0,
- "has_more": true,
- "data": [
- {
- "object": "weight",
- "id": 0,
- "pt_id": 0,
- "vital_id": 0,
- "date_taken": "2019-08-24T14:15:22Z",
- "value": "string",
- "units": "string",
- "comments": "string",
- "abnormal": true,
- "encounter_id": 0,
- "url_encounter": "string",
- "order_id": 0,
- "url_order": "string",
- "addedby": 0,
- "created": "2019-08-24T14:15:22Z"
}
]
}
patient_id | integer |
vital_id | integer |
string or boolean A string or boolean value for the vital reading, depending on the custom vital type. | |
abnormal | boolean A boolean value to indicate if the reading should be marked as abnormal. If left blank, defaults to false (the vital reading is added as “normal”) |
comments | string |
date_taken | string A string specifying the date and time of the vital reading (if no valid 3-letter timezone specified, defaults to UTC). If left blank, defaults to the current time. |
{- "value": "string",
- "abnormal": true,
- "comments": "string",
- "date_taken": "string"
}
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer |
extended_details | boolean Defaults to false, but can be overridden. If false (good for looping through lots of questionnaires) it will not return the actual key-value responses that the patient submitted and instead return a NULL value for the raw_data property. |
curl -H "Authorization: Basic CREDS" -X GET "https://subdomain.md-hq.com/api/v1/patients/2/questionnaires?ßextended_details=true"
Please note: All dates listed (creation times, sign dates, date of service, update-times) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer |
questionnaire_type | string |
questionnaire_name | string |
html_content required | string <html> An HTML-formatted string that will serve as the human-readable version of the patient responses |
required | object An object with key-value pairs that will represent the structured data underlying the patient responses. This allows us to analyze their response-data. |
{- "questionnaire_type": "string",
- "questionnaire_name": "string",
- "html_content": "string",
- "raw_data": {
- "key": "value",
- "key2": "Some other value",
- "complex": {
- "subkey": "subval",
- "subkey2": "subvalue2"
}
}
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer |
sent_by | string Either “pt” (to get all messages sent by the patient) or “dr” (to get all messages sent to the patient from doctor/clinic) |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/1/portal/secure_messages?sent_by=pt
patient_id | integer |
subject required | string between 1 and 54 characters long |
note required | string at least 10 characters long |
dr_id | integer A valid ID of a non-archived, non-resource user who should respond to the message |
reply | string Enum: "secure message" "phone" "other" "none" how the patient would like to receive a response |
{- "subject": "string",
- "note": "string",
- "dr_id": 0,
- "reply": "secure message"
}
{- "result": true,
- "message": "string",
- "portal_queue_id": 0
}
Please note: All dates listed are listed in UTC, so you’ll want to adjust for your local timezone. Also, the API responses include some routes that may not be available for your instance. Supplements can also be accessed through the /alternate_plans/ endpoints, but because most clinics handle supplements separately you will want to use the /supplements/ endpoints unless you’re actively managing other products. Also, these endpoints pertain only to supplement definitions - if you’re looking for patient-associated prescriptions for supplements (including prescribing details) please use the /patients/:pt_id/supplements endpoints.
Also note that while you have full usage rights over any supplement that was created/defined by your practice, and data sets that were installed or provided by a third party are subject to usage restrictions
limit | integer Defaults to 100, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit responses |
active_only | boolean If this parameter is set it will only include ACTIVE supplements |
vendor_code | string If this parameter is set it will only supplements with matching vendor code (note, this is different from the external_ref_id). |
class | string If this parameter is set it will only supplements with that class specified |
external_ref_id | string If this parameter is set it will only include items with the designated external identifier - generally you will want to make this unique so it only includes a single item. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/supplements?limit=10&class=sampleClass
At a minimum, you must provide a name, and the name must be unique (it will throw an error if there is a duplicate note)
name required | string |
nicknames | string |
vendor_code | string |
description | string |
external_ref_id | string |
inactive | boolean |
{- "name": "string",
- "nicknames": "string",
- "vendor_code": "string",
- "description": "string",
- "external_ref_id": "string",
- "inactive": true
}
terms | string <urlencoded> You can enter several terms with spaces between each (make sure to url-encode the search string, so spaces would be %20). Each term is treated as potentially a wildcard search so “vitam%20D” (“vitam D”) would return “Vitamin D”, “Vitamin D1000”, etc. |
limit | integer Defaults to 100, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit responses |
active_only | boolean If this parameter is set it will only include ACTIVE supplements |
vendor_code | string If this parameter is set it will only supplements with matching vendor code (note, this is different from the external_ref_id). |
class | string If this parameter is set it will only supplements with that class specified |
external_ref_id | string If this parameter is set it will only include items with the designated external identifier - generally you will want to make this unique so it only includes a single item. |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/supplements/search/vitam%20d?limit=10&class=sampleClass
supplement_id | integer |
Any value which is provided will update, so do not add empty fields to the patch data unless you want these fields to be set to empty.
name | string |
nicknames | string |
vendor_code | string |
description | string |
external_ref_id | string |
inactive | boolean |
{- "name": "string",
- "nicknames": "string",
- "vendor_code": "string",
- "description": "string",
- "external_ref_id": "string",
- "inactive": true
}
Please note: All dates listed (creation times, due dates, reminder dates) are listed in UTC, so you’ll want to adjust for your local timezone.
limit | integer Defaults to 100, but can be overridden (max is 100) |
offset | integer If the returned data indicates that there is more than the limit responses (has_more: true), then it will offset the list to allow you to cycle through a long task list |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/tasks
{- "object": "list",
- "search-filters": { },
- "total_count": 0,
- "has_more": null,
- "data": [
- {
- "object": "task",
- "id": 0,
- "dr_id": 0,
- "subject": "string",
- "start_date": "string",
- "due_date": "string",
- "reminder_time": "string",
- "notes": "string",
- "priority": "low",
- "addedby": 0,
- "patient_details": {
- "object": "patient",
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "dob": "string",
- "sex": "M",
- "email1": "string",
- "url_patient_details": "string"
}, - "completed_on": "string",
- "associated_resource_type": "string",
- "associated_resource_id": 0,
- "created": "string"
}
]
}
Please note: All dates listed (creation times, due dates, reminder dates) are listed in UTC, so you’ll want to adjust for your local timezone.
dr_id required | integer A valid ID of a non-archived, non-resource user who the task is being added for. |
subject required | string |
priority required | string Enum: "low" "normal" "high" |
notes | string |
pt_id | integer A valid ID of a non-archived patient to associate with the task. |
due_date | string <date-time> A time stamp (YYYY-MM-DD HH:MM:SS format) representing the due date for this task. |
remind_minutes_before | integer Represents the number of minutes before your due date to remind the user of the task (due_date must be set). |
{- "dr_id": 0,
- "subject": "string",
- "priority": "low",
- "notes": "string",
- "pt_id": 0,
- "due_date": "2019-08-24T14:15:22Z",
- "remind_minutes_before": 0
}
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/tasks
{- "object": "task",
- "id": 0,
- "dr_id": 0,
- "subject": "string",
- "start_date": "string",
- "due_date": "string",
- "reminder_time": "string",
- "notes": "string",
- "priority": "low",
- "addedby": 0,
- "patient_details": {
- "object": "patient",
- "id": "string",
- "first_name": "string",
- "last_name": "string",
- "dob": "string",
- "sex": "M",
- "email1": "string",
- "url_patient_details": "string"
}, - "completed_on": "string",
- "associated_resource_type": "string",
- "associated_resource_id": 0,
- "created": "string"
}
task_id | integer |
dr_id required | integer A valid ID of a non-archived, non-resource user who the task is being added for. |
subject required | string |
priority required | string Enum: "low" "normal" "high" |
notes | string |
pt_id | integer A valid ID of a non-archived patient to associate with the task. |
due_date | string <date-time> A time stamp (YYYY-MM-DD HH:MM:SS format) representing the due date for this task. |
remind_minutes_before | integer Represents the number of minutes before your due date to remind the user of the task (due_date must be set). |
{- "dr_id": 0,
- "subject": "string",
- "priority": "low",
- "notes": "string",
- "pt_id": 0,
- "due_date": "2019-08-24T14:15:22Z",
- "remind_minutes_before": 0
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you’ll want to adjust for your local timezone.
show_all | boolean If set to “true”, returns the entire custom vitals list, otherwise only returns the items configured to appear on patient charts |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/vitals?limit=10&offset=0&show_all=true
vital_id | integer |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/vitals/114
{- "object": "vital_definition",
- "id": 0,
- "name": "Glucose",
- "name_full": "Blood Glucose",
- "nicknames": "string",
- "units": "mg/dL",
- "unit_type": "Numeric",
- "notes": "string",
- "normal_low": "string",
- "normal_high": "string",
- "dashboard_active": true,
- "addedby": 0,
- "created": "2019-08-24T14:15:22Z"
}
Please note: All dates listed (creation times, date taken) are listed in UTC, so you'll want to adjust for your local timezone.
patient_id | integer ID of patient |
curl -H "Authorization: Basic CREDS" -X GET https://subdomain.md-hq.com/api/v1/patients/2/lab_results
{- "property1": [
- {
- "name": "string",
- "date": "string",
- "units": "string",
- "references_range": "string",
- "value": "string",
- "flag": "string",
- "ntes": {
- "property1": {
- "set_id": "string",
- "source_of_comment": "string",
- "comment": "string"
}, - "property2": {
- "set_id": "string",
- "source_of_comment": "string",
- "comment": "string"
}
}, - "date_saved_to_chart": "string",
- "src_lab": "string",
- "obx3": "string",
- "manual_entry": true,
- "manual_entry_id": "string"
}
], - "property2": [
- {
- "name": "string",
- "date": "string",
- "units": "string",
- "references_range": "string",
- "value": "string",
- "flag": "string",
- "ntes": {
- "property1": {
- "set_id": "string",
- "source_of_comment": "string",
- "comment": "string"
}, - "property2": {
- "set_id": "string",
- "source_of_comment": "string",
- "comment": "string"
}
}, - "date_saved_to_chart": "string",
- "src_lab": "string",
- "obx3": "string",
- "manual_entry": true,
- "manual_entry_id": "string"
}
]
}