@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api spec
@base https://app.drchrono.com
@version v4 - Hunt Valley
@auth OAuth2
@endpoints 327
@hint download_for_search
@toc api(327)

@endpoint GET /api/day_sheet_charges
@desc Retrieve daysheet charges report for a given date range
@required {start_date: str, end_date: str}
@optional {charges_date_type: str, report_type: str, claim_type: str, patient_id: int, office_id: str, examroom_id: int, pg_mode: bool}

@endpoint POST /api/claim_billing_notes
@desc Create a new billing note
@optional {appointment: int, doctor: int}
@returns(201) {text: str, created_at: str, appointment: int, id: int, created_by: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/claim_billing_notes
@desc Retrieve or search billing notes
@optional {cursor: str, page_size: int, appointment: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/signed_consent_forms
@desc signed_consent_forms Create
@required {patient: int # ID of the patient to associate with the consent form, appointment: int # ID of the appointment to associate with the consent form, consent_form: int # ID of the consent form that was signed}
@optional {signature_file: file # File containing the patient's signature}
@returns(201) {date_signed: str, archived: bool, appointment: int, signature_file: str(binary), updated_at: str, patient: int, consent_form: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/signed_consent_forms
@desc signed_consent_forms Update
@required {id: int}
@optional {patient: int # ID of the patient to filter by}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/signed_consent_forms
@desc signed_consent_forms Get
@required {appointment: int # ID of the appointment that the consent form is signed for, patient: int # ID of the patient who signed the consent form, consent_form: int # ID of the consent form that is signed}
@optional {cursor: str, page_size: int, patient: int, doctor: int, date_signed: str # Date when the consent form is signed.  Automatically set when the record is created, archived: bool # Indicates that the consent form has been archived and should not be used, signature_file: str(binary) # File with the signature of the patient, updated_at: str # Date and time when the signature was last updated, id: int # ID consent form signature}
@returns(200) {previous: str, results: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}
@example_request {"patient":12345}

@endpoint POST /api/custom_appointment_fields
@desc Create custom appointment fields
@optional {doctor: int}
@returns(201) {archived: bool, doctor: str, created_at: str, updated_at: str, order: int, field_desc: str, field_name: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_appointment_fields
@desc Retrieve or search custom appointment fields
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/lab_orders/{id}
@desc Update an existing lab order
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/lab_orders/{id}
@desc Update an existing lab order
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_orders/{id}
@desc Retrieve an existing lab order
@required {id: str}
@optional {since: str, doctor: int}
@returns(200) {status: str, documents: [str], patient: int, doctor: int, timestamp: str, notes: str, accession_number: str, requisition_id: str, external_requisition_id: str, priority: str, icd10_codes: [map], sublab: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/lab_orders/{id}
@desc Delete an existing lab order
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/clinical_notes_list
@desc Create clinical note list request.  Use the UUID returned in the response to retrieve the batch of records. Results returned in order of ID.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int, page: int, patient: int # Patient ID filter, office: int # Office ID filter, doctor: int # Doctor ID filter, since: str # Inclusive lower bound on clinical note updated/created time., date_range: str # Inclusive bounded date range on appointment scheduled date, date: str # Filter on specific appointment scheduled date, verbose: bool # When `true` includes yellow notes}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/clinical_notes_list
@desc Retrieve or search clinical notes in batches. Results returned in order of ID.
@optional {uuid: str # The UUID token for the batch of clinical notes.  This is returned in the response of the `create` endpoint.}
@returns(200) {status: str, pagination: map{count: int, pages: int, page: int}, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/custom_vitals/{id}
@desc Retrieve an existing custom vital type
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, description: str, data_type: str, doctor: str, is_fraction_field: bool, fraction_delimiter: str, allowed_values: [str], id: int, unit: str, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/sublabs/{id}
@desc Update an existing sub vendor
@required {id: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/sublabs/{id}
@desc Update an existing sub vendor
@required {id: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/sublabs/{id}
@desc Retrieve an existing sub vendor
@required {id: int}
@returns(200) {vendor_name: str, facility_code: str, id: int, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/sublabs/{id}
@desc Delete an existing sub vendor
@required {id: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients/{id}/qrda1
@desc Retrieve patient QRDA1
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/problems
@desc Create patient problems
@optional {patient: int, doctor: int}
@returns(201) {category: str, icd_code: str, icd_version: str, appointment: int, description: str, info_url: str, doctor: int, notes: str, verification_status: any, status: str, snomed_ct_code: str, abatement_date: str(date), date_onset: str, date_diagnosis: str, date_changed: str, patient: int, problem_type: str, id: int, name: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/problems
@desc Retrieve or search patient problems
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/staff
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_messages/{id}
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_messages/{id}
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_messages/{id}
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(200) {body: str, patient: int, attachments: [map], doctor: int, created_at: str, updated_at: str, message: str, id: int, subject: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/yellow_notepad
@desc Create or update yellow notepad content for a specific appointment and template combination.
@required {appointment_id: int, template_id: int, content: str # The yellow notepad content. Can be empty string.}
@returns(201) {content: str, template_id: int, appointment_id: int} # Success - content created/updated
@errors {400: Bad Request - missing/invalid parameters or content field, 401: Unauthorized, 403: Forbidden - insufficient permissions, suspended account, or light suspended account attempting write, 404: Not Found - invalid appointment_id or template_id, or not visible to user, 405: Method not allowed, 409: Conflict - the associated clinical note is locked and cannot be modified, 500: Internal Server Error}

@endpoint GET /api/yellow_notepad
@desc Retrieve yellow notepad content for a specific appointment and template combination.
@required {appointment_id: int, template_id: int}
@returns(200) {content: str, template_id: int, appointment_id: int} # Success - returns yellow notepad content
@errors {400: Bad Request - missing or invalid query parameters, 401: Unauthorized, 403: Forbidden - insufficient permissions or suspended account, 404: Not Found - invalid appointment_id or template_id, or not visible to user, 405: Method not allowed, 500: Internal Server Error}

@endpoint GET /api/eligibility_checks
@desc Retrieve or search past eligibility checks for patient
@optional {cursor: str, page_size: int, appointment: int, appointment_date: str, doctor: int, query_date_range: str, appointment_date_range: str, query_date: str, patient: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/doctor_work_schedule/{id}
@desc Update an existing doctor's entire work schedule
@required {id: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/doctor_work_schedule/{id}
@desc Update an existing doctor's work schedule
@required {id: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctor_work_schedule/{id}
@desc Retrieve a work schedule for the doctor (beta)
@required {id: str}
@returns(200) {work_days: [map], id: int, office: int, doctor: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/medications
@desc Create patient medications
@optional {patient: int, doctor: int}
@returns(201) {dispense_quantity: num, prn: bool, pharmacy_note: str, number_refills: int, patient: int, id: int, dosage_quantity: str, doctor: int, date_started_taking: str, dosage_units: str, date_stopped_taking: str, order_status: str, status: str, appointment: int, daw: bool, rxnorm: str, date_prescribed: str, name: str, ndc: str, notes: str, frequency: str, indication: str, signature_note: str, route: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/medications
@desc Retrieve or search patient medications
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/custom_demographics
@desc Create custom demographics fields
@optional {doctor: int}
@returns(201) {archived: bool, description: str, doctor: int, template_name: str, allowed_values: str, id: int, name: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_demographics
@desc Retrieve or search custom demographics fields
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/appointments_list
@optional {status: str, patient: int, office: int, doctor: int, since: str, date_range: str, order_by: str # Order results by a specific field. Valid options include [scheduled_time, updated_at]. Default: scheduled_time., date: str, show_archived: bool # set to `true` or `1` to include deleted or archived appointments}
@returns(201) {status: str, icd9_codes: [str], office: int, base_recurring_appointment: str, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str}, first_billed_date: str, last_billed_date: str, billing_status: str, primary_insurer_payer_id: str, duration: int, appt_is_break: bool, id: str, custom_fields: [map], scheduled_time: str, secondary_insurer_name: str, doctor: int, recur_start_date: str, primary_insurance_id_number: str, created_by: str, ins2_status: str, first_edi_date: str, billing_notes: [map], is_walk_in: bool, billing_provider: str, reminder_profile: str, primary_insurer_name: str, profile: int, resubmit_claim_original_id: int, patient: int, cloned_from: int, extended_updated_at: str, exam_room: int, updated_at: str, reason: str, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool, payment_profile: str, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str}, custom_vitals: [map], is_virtual_base: bool, recurring_appointment: bool, supervising_provider: str, recurring_days: [any], status_transitions: [map], created_at: str, reminders: [map], ins1_status: str, custom_status: str, recur_end_date: str, icd10_codes: [str], deleted_flag: bool, notes: str, recurs_every: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint GET /api/appointments_list
@optional {cursor: str, page_size: int, status: str, patient: int, office: int, doctor: int, since: str, date_range: str, date: str, show_archived: bool # set to `true` or `1` to include deleted or archived appointments}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/appointment_profiles
@desc Create appointment profiles for a doctor's calendar
@optional {doctor: int}
@returns(201) {archived: bool, name: str, doctor: int, color: str, reason: str, sort_order: int, duration: int, id: int, online_scheduling: bool} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/appointment_profiles
@desc Retrieve or search appointment profiles for a doctor's calendar
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_communications
@desc Create patient communication for CQM
@optional {patient: int, doctor: int}
@returns(201) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_communications
@desc Retrieve or search patient communications for CQM
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_authorizations
@desc Retrieve or search patient authorizations
@optional {cursor: str, page_size: int, patient: int, doctor: int, start_date: str, date_range: str, end_date: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/appointment_profiles/{id}
@desc Update an existing appointment profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/appointment_profiles/{id}
@desc Update an existing appointment profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/appointment_profiles/{id}
@desc Retrieve an existing appointment profile
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, name: str, doctor: int, color: str, reason: str, sort_order: int, duration: int, id: int, online_scheduling: bool} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/appointment_profiles/{id}
@desc Delete an existing appointment profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/messages
@desc Create messages in doctor's message center
@optional {patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(201) {type_description: str, patient_middle_name: str, updated_at: str, owner: str, responsible_user_first_name: str, received_at: str, id: int, doctor_last_name: str, owner_first_name: str, archived: bool, doctor: int, owner_last_name: str, patient_first_name: str, attachment: str, outgoing_fax_recipient_fax_number: str, responsible_user_last_name: str, type: str, patient_last_name: str, patient: int, doctor_first_name: str, read: bool, responsible_user: str, workflow_step: str, outgoing_fax_recipient_name: str, doctor_middle_name: str, message_notes: [map], title: str, starred: bool} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/messages
@desc Retrieve or search messages in doctor's message center
@optional {cursor: str, page_size: int, patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/clinical_note_field_values/{id}
@desc Update an existing clinical note field value
@required {id: str}
@optional {clinical_note_field: int, since: str, appointment: int, clinical_note_template: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/clinical_note_field_values/{id}
@desc Update an existing clinical note field value
@required {id: str}
@optional {clinical_note_field: int, since: str, appointment: int, clinical_note_template: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_field_values/{id}
@desc Retrieve an existing clinical note field value
@required {id: str}
@optional {clinical_note_field: int, since: str, appointment: int, clinical_note_template: int, doctor: int}
@returns(200) {clinical_note_field: int, created_at: str, updated_at: str, value: str, appointment: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/task_categories
@desc Create a task category
@optional {since: str}
@returns(201) {archived: bool, is_global: str, name: str, practice_group: int, created_at: str, updated_at: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_categories
@desc Retrieve or search task categories
@optional {cursor: str, page_size: int, since: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/fee_schedules_v2
@optional {cursor: str, page_size: int, payer_id: str, plan_name: str, specialities: str, assignees: str, assignee_type: str, effective_date: str, ineffective_date: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_insurance_plan_names/{id}
@desc Retrieve an existing custom insurance plan name
@required {id: str}
@optional {since: str, user: int, name: str, doctor: int}
@returns(200) {archived: bool, doctor: str, created_at: str, updated_at: str, insurance_plan_name: str, user: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/care_team_members
@optional {cursor: str, page_size: int, patient: int, appointment: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/user_groups
@desc Retrieve or search user groups
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/line_items_list
@desc Create a billing line items list request
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int, posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str, service_date_range: str}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/line_items_list
@desc Retrieve the list of billing line items
@optional {uuid: str # The UUID token for the batch of patients.  This is returned in the response of the create endpoint.}
@returns(200) {status: str, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/consent_forms/{id}/unapply_from_appointment
@desc Unassign (unapply) a consent form from appointment
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/consent_forms/{id}/apply_to_appointment
@desc Assign (apply) a consent form to appointment
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/consent_forms
@desc Create a patient consent form
@optional {doctor: int}
@returns(201) {archived: bool, is_mandatory: bool, uri: str, doctor: int, updated_at: str, created_at: str, title: str, assign_by_default: bool, order: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/consent_forms
@desc Retrieve or search patient consent forms
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/reminder_profiles/{id}
@desc Update an existing reminder profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/reminder_profiles/{id}
@desc Update an existing reminder profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/reminder_profiles/{id}
@desc Retrieve an existing reminder profile
@required {id: str}
@optional {doctor: int}
@returns(200) {reminders: [map], id: int, name: str, doctor: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/reminder_profiles/{id}
@desc Delete an existing reminder profile
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/day_sheet_patient_payments
@desc Retrieve daysheet cash report for a given date range
@required {start_date: str, end_date: str}
@optional {charges_date_type: str, report_type: str, claim_type: str, patient_id: int, office: str, examroom_id: int, legacy: bool}

@endpoint POST /api/offices/{id}/add_exam_room
@desc Add an exam room to the office
@required {id: str}
@optional {doctor: int}
@returns(201) {phone_number: str, city: str, archived: bool, office_work_schedule: map{work_days: [map], id: int, office: int, doctor: int}, name: str, doctor: str, country: str, start_time: str, fax_number: str, online_timeslots: [map], state: str, end_time: str, exam_rooms: str, address: str, tax_id_number_professional: str, zip_code: str, id: int, online_scheduling: bool} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/eligibility_checks/{id}
@desc Retrieve an existing past eligibility check
@required {id: str}
@optional {appointment: int, appointment_date: str, doctor: int, query_date_range: str, appointment_date_range: str, query_date: str, patient: int}
@returns(200) {coverage_subscriber: str, appointment: str, eligibility: str, payer_name: str, coverage_details: str, updated_at: str, query_date: str, service_type_description: str, patient: str, request_service_type: str, id: int, cob_level: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patients_list
@desc Submit patient list request.  Use the UUID returned in the response to retrieve the batch of patients.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int, first_name: str, last_name: str, preferred_language: str, gender: str # Filter the list for the patient's gender., since: str # Filter the list for when the patient was created or updated.  The value should be a date in the format YYYY-MM-DD.  For example, to filter for patients created or updated on or after 2019-01-01, use the value 2019-01-01., date_of_birth: str # Filter the list for the patient's date of birth.  The value should be a date in the format YYYY-MM-DD.  For example, to filter for patients born on 2019-01-01, use the value 2019-01-01., race: str # Filter the list for the patients' race., chart_id: str # Filter the list for the patients' chart id., email: str # Filter the list for the patients' email., ethnicity: str # Filter the list for the patients' ethnicity., verbose: bool # when `true` include additional verbose fields in the response.}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 500: Internal Server Error}

@endpoint GET /api/patients_list
@desc Retrieve or search patients in batches. This resource returns identical data to `GET /api/patients` but uses an asynchronous batch-based approach to data delivery. This is an efficient choice for large historical record loading use cases. Retrieve the results/status of a previously created patient_list request using the UUID returned in the response. Results are ordered by patient ID number.
@required {uuid: str # The UUID token for submitted batch request. This is returned in the response of the create request.}
@returns(200) {status: str, results: [map], uuid: str} # OK
@errors {400: Bad Request., 401: Unauthorized, 403: Permission Denied, 404: Not Found. The UUID is not found, or, it has expired. UUIDs have a 1 hour lifetime., 500: Internal Server Error}

@endpoint POST /api/patient_interventions
@desc Create patient intervention for CQM
@optional {patient: int, doctor: int}
@returns(201) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_interventions
@desc Retrieve or search patient interventions for CQM
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_messages
@optional {since: str, patient: int, doctor: int}
@returns(201) {body: str, patient: int, attachments: [map], doctor: int, created_at: str, updated_at: str, message: str, id: int, subject: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_messages
@optional {cursor: str, page_size: int, since: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_physical_exams/{id}
@desc Update an existing patient physical exam for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_physical_exams/{id}
@desc Update an existing patient physical exam for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_physical_exams/{id}
@desc Retrieve an existing patient physical exam for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/clinical_note_field_values
@desc Create clinical note field value
@optional {clinical_note_field: int, since: str, appointment: int, clinical_note_template: int, doctor: int}
@returns(201) {clinical_note_field: int, created_at: str, updated_at: str, value: str, appointment: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_field_values
@desc Retrieve or search clinical note field values
@optional {cursor: str, page_size: int, clinical_note_field: int, since: str, appointment: int, clinical_note_template: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/inventory_vaccines/{id}
@desc Retrieve an existing vaccine inventory
@required {id: str}
@optional {status: str, cvx_code: str, since: str, doctor: int}
@returns(200) {category: int, lot_number: str, manufacturer_code: str, name: str, original_quantity: int, doctor: int, created_at: str, status: str, updated_at: str, price_with_tax: num, expiry: str, note: str, sales_tax_applicable: bool, cost: num, price: num, vaccination_type: str, id: int, manufacturer: str, current_quantity: int, cvx_code: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patients
@desc Create patient
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str, allow_duplicates: bool # Override duplicate check}
@returns(201) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients
@desc Retrieve or search patients
@optional {cursor: str, page_size: int, first_name: str, created_at: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/implantable_devices/{id}
@desc Retrieve an existing implantable device
@required {id: str}
@optional {mu_date: str, patient: int, mu_date_range: str, doctor: int}
@returns(200) {status: str, lot_number: str, archived: bool, manufacturing_date: str, patient: str, expiration_date: str, created_at: str, brand_name: str, updated_at: str, gmdn_pt_name: str, version_or_model: str, serial_number: str, udi: str, id: int, procedure: str, company_name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_communications/{id}
@desc Update an existing patient communication for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_communications/{id}
@desc Update an existing patient communication for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_communications/{id}
@desc Retrieve an existing patient communication for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/offices
@desc Retrieve or search offices
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/prescription_messages/{id}
@desc Retrieve an existing prescription message
@required {id: str}
@optional {parent_message: int, since: str, patient: int, doctor: int}
@returns(200) {message_status: str, patient: int, doctor: int, message_type: str, created_at: str, parent_message: str, message_direction: str, pharmacy: str, json_data: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/implantable_devices
@desc Retrieve or search implantable devices
@optional {cursor: str, page_size: int, mu_date: str, patient: int, mu_date_range: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_risk_assessments
@optional {patient: int, doctor: int}
@returns(201) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_risk_assessments
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/task_statuses/{id}
@desc Update an existing task status
@required {id: str}
@optional {since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/task_statuses/{id}
@desc Update an existing task status
@required {id: str}
@optional {since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_statuses/{id}
@desc Retrieve an existing task status
@required {id: str}
@optional {since: str}
@returns(200) {archived: bool, name: str, status_category: str, practice_group: int, created_at: str, updated_at: str, id: int, task_category: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patients_summary
@optional {first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(201) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients_summary
@optional {cursor: str, page_size: int, first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/documents/{id}
@desc Update an existing appointment template
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/documents/{id}
@desc Update an existing appointment template
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/documents/{id}
@desc Retrieve an existing appointment template
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(200) {archived: bool, patient: int, description: str, doctor: int, metatags: str, updated_at: str, date: str, document: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/documents/{id}
@desc Delete an existing appointment template
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/office_work_schedule
@desc Get the work schedule for the authed doctor's primary office (beta)
@returns(200) {work_days: [map], id: int, office: int, doctor: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patients/{id}/onpatient_access
@desc Send new onpatient invite to patient
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(201) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients/{id}/onpatient_access
@desc Retrieve or search existing onpatient access invites
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/patients/{id}/onpatient_access
@desc Revoke sent onpatient invites
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/comm_logs
@desc Create communication (phone call) logs
@optional {since: str, patient: int, doctor: int}
@returns(201) {scheduled_time: str, archived: bool, appointment: int, doctor: int, title: str, created_at: str, author: str, updated_at: str, cash_charged: num, duration: int, patient: int, message: str, type: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/comm_logs
@desc Retrieve or search communicatioin (phone call) logs
@optional {cursor: str, page_size: int, since: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/lab_results/{id}
@desc Update an existing lab result
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/lab_results/{id}
@desc Update an existing lab result
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_results/{id}
@desc Retrieve an existing lab result
@required {id: str}
@optional {order: int, doctor: int}
@returns(200) {status: str, group_code: str, observation_description: str, is_abnormal: str, observation_code: str, specimen_received: str, comments: str, normal_range: str, test_performed: str, value: str, abnormal_status: str, lab_order: str, value_is_numeric: bool, document: int, lab_test: int, id: int, unit: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/lab_results/{id}
@desc Delete an existing lab result
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/medications/{id}
@desc Update an existing patient medications
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/medications/{id}
@desc Update an existing patient medications
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/medications/{id}
@desc Retrieve an existing patient medications
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {dispense_quantity: num, prn: bool, pharmacy_note: str, number_refills: int, patient: int, id: int, dosage_quantity: str, doctor: int, date_started_taking: str, dosage_units: str, date_stopped_taking: str, order_status: str, status: str, appointment: int, daw: bool, rxnorm: str, date_prescribed: str, name: str, ndc: str, notes: str, frequency: str, indication: str, signature_note: str, route: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/day_sheet_credits
@desc Retrieve daysheet credits/adjustments report for a given date range
@required {start_date: str, end_date: str}
@optional {credits_date_type: str, report_type: str, claim_type: str, patient_id: int, office_id: str, examroom_id: int, pg_mode: bool}

@endpoint POST /api/task_templates
@desc Create a task template
@optional {assignee_user: int, status: int, assignee_group: int, since: str, category: int}
@returns(201) {archived: bool, name: str, practice_group: str, default_category: int, updated_at: str, default_title: str, default_note: str, default_status: int, id: int, default_assignee_group: int, default_assignee_user: str, default_due_date_offset: str, created_at: str, default_priority: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_templates
@desc Retrieve or search task templates
@optional {cursor: str, page_size: int, assignee_user: int, status: int, assignee_group: int, since: str, category: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/transactions_list
@desc Create transactions list request.  Use the UUID returned in the response to retrieve the batch of records. Results returned in order of id or updated_at.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int # Number of results to return per page. Value between 1 and 1000., page: int # Number of page to return. Value between 1 and max number of pages in result set., line_item: int # Line item ID, posted_date: str # Posted date, appointment: int # appointment, since: str # since, doctor: int # doctor, verbose: bool # When True includes full details}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/transactions_list
@desc Retrieve or search transactions in batches. Results returned in order of ID or updated_at.
@required {uuid: str # The UUID token for the batch of transactions.  This is returned in the response of the `create` endpoint.}
@returns(200) {status: str, pagination: map{count: int, pages: int, page: int}, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint PATCH /api/medications/{id}/append_to_pharmacy_note
@desc Append a message to the "pharmacy_note" section of the prescription, in a new paragraph
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/office_work_schedule/{id}
@desc Update an existing office's entire work schedule
@required {id: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/office_work_schedule/{id}
@desc Update an existing office's work schedule
@required {id: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/office_work_schedule/{id}
@desc Retrieve a work schedule (beta)
@required {id: str}
@returns(200) {work_days: [map], id: int, office: int, doctor: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_vaccine_records/{id}
@desc Update an existing patient vaccine records
@required {id: str}
@optional {cvx_code: str, patient: int, since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_vaccine_records/{id}
@desc Update an existing patient vaccine records
@required {id: str}
@optional {cvx_code: str, patient: int, since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_vaccine_records/{id}
@desc Retrieve an existing patient vaccine records
@required {id: str}
@optional {cvx_code: str, patient: int, since: str, doctor: int}
@returns(200) {lot_number: str, site: str, ordering_doctor: int, doses: [map], id: int, next_dose_date: str, cpt_code: str, completion_status: str, administered_at: int, comments: str, funding_eligibility: str, units: str, entered_by: str, patient: int, administration_start: str, record_source: str, updated_at: str, consent_form: int, manufacturer: str, administered_by: str, name: str, vis: str, created_at: str, observed_immunity: str, amount: num, vaccine_inventory: int, route: str, cvx_code: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_flag_types/{id}
@desc Update an existing patient flag type
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_flag_types/{id}
@desc Update an existing patient flag type
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_flag_types/{id}
@desc Retrieve an existing patient flag type
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, name: str, doctor: int, color: str, created_at: str, updated_at: str, priority: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/inventory_categories/{id}
@desc Retrieve an existing inventory category
@required {id: str}
@optional {since: str, doctor: int}
@returns(200) {archived: bool, name: str, doctor: str, created_at: str, updated_at: str, category_type: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/clinical_note_field_types/{id}
@desc Update the `freedraw_image_size` of an existing clinical note FreeDraw Field
@required {id: str}
@optional {freedraw_image_size: str(/150x300/300x600/450x900/600x1200/750x1500) # Size setting for the free-draw image field:   - "" = Actual size (native resolution)   - "150x300" = Extra Small   - "300x600" = Small   - "450x900" = Medium   - "600x1200" = Large   - "750x1500" = Extra Large}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_field_types/{id}
@desc Retrieve an existing clinial note field type
@required {id: str}
@optional {clinical_note_template: int, doctor: int}
@returns(200) {comment: str, archived: bool, clinical_note_template: str, data_type: str, required: bool, allowed_values: [str], id: int, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/tasks/{id}
@desc Update an existing task
@required {id: str}
@optional {status: int, category: int, due_at_date: str, due_at_unknown: str, since: str, due_at_since: str, assignee_user: int, assignee_group: int, due_at_range: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/tasks/{id}
@desc Update an existing task
@required {id: str}
@optional {status: int, category: int, due_at_date: str, due_at_unknown: str, since: str, due_at_since: str, assignee_user: int, assignee_group: int, due_at_range: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/tasks/{id}
@desc Retrieve an existing task
@required {id: str}
@optional {status: int, category: int, due_at_date: str, due_at_unknown: str, since: str, due_at_since: str, assignee_user: int, assignee_group: int, due_at_range: str}
@returns(200) {category: int, due_date: map{time: str}, archived: bool, associated_items: [map], assigned_by: str, assignee_user: str, created_at: str, assignee_group: int, updated_at: str, created_by: str, priority: str, status: int, notes: [map], title: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctor_work_schedule
@desc Get the work schedule for the authed doctor's primary office (beta)
@returns(200) {work_days: [map], id: int, office: int, doctor: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctor_options
@desc Retrieve or search doctor options within practice group
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/fee_schedules
@optional {cursor: str, page_size: int, code: str, code_type: str, since: str, payer_id: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_risk_assessments/{id}
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_risk_assessments/{id}
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_risk_assessments/{id}
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/inventory_categories
@desc Retrieve or search inventory categories
@optional {cursor: str, page_size: int, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/lab_documents/{id}
@desc Update an existing lab order document
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/lab_documents/{id}
@desc Update an existing lab order document
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_documents/{id}
@desc Retrieve an existing lab order document
@required {id: str}
@optional {since: str, doctor: int}
@returns(200) {hl7: str, timestamp: str, lab_order: int, document: str, type: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/lab_documents/{id}
@desc Delete an existing lab order document
@required {id: str}
@optional {since: str, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/appointment_templates/{id}
@desc Update an existing appointment template
@required {id: str}
@optional {profile: int, office: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/appointment_templates/{id}
@desc Update an existing appointment template
@required {id: str}
@optional {profile: int, office: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/appointment_templates/{id}
@desc Retrieve an existing appointment template
@required {id: str}
@optional {profile: int, office: int, doctor: int}
@returns(200) {profile: int, scheduled_time: str, archived: bool, week_days: [int], office: int, open_slots: [map], date_end: str, date_start: str, exam_room: int, duration: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/appointment_templates/{id}
@desc Delete an existing appointment template
@required {id: str}
@optional {profile: int, office: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_interventions/{id}
@desc Update an existing patient intervention for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_interventions/{id}
@desc Update an existing patient intervention for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_interventions/{id}
@desc Retrieve an existing patient intervention for CQM
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/task_statuses
@desc Create a task status
@optional {since: str}
@returns(201) {archived: bool, name: str, status_category: str, practice_group: int, created_at: str, updated_at: str, id: int, task_category: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_statuses
@desc Retrieve or search task statuses
@optional {cursor: str, page_size: int, since: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/allergies/{id}
@desc Update an existing patient allergy
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/allergies/{id}
@desc Update an existing patient allergy
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/allergies/{id}
@desc Retrieve an existing patient allergy
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {status: str, reaction: str, patient: int, description: str, doctor: int, snomed_reaction: str, notes: str, verification_status: str, snomed_code: str, rxnorm: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients/{id}/ccda
@desc Retrieve patient CCDA
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_payments/{id}
@desc Retrieve an existing patient payment
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(200) {line_item: int, posted_date: str, appointment: int, doctor: int, payment_method: str, created_at: str, payment_transaction_type: str, created_by: str, updated_at: str, amount: num, notes: str, trace_number: str, patient: int, id: int, received_date: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_orders_summary
@optional {cursor: str, page_size: int, since: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_payments
@desc Create patient payment
@optional {since: str, patient: int, doctor: int}
@returns(201) {line_item: int, posted_date: str, appointment: int, doctor: int, payment_method: str, created_at: str, payment_transaction_type: str, created_by: str, updated_at: str, amount: num, notes: str, trace_number: str, patient: int, id: int, received_date: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_payments
@desc Retrieve or search patient payments
@optional {cursor: str, page_size: int, since: str, posted_date: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/clinical_note_field_values_list
@desc Create clinical note field value list request.  Use the UUID returned in the response to retrieve the batch of records. Results returned in order of ID.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int, page: int, since: str, appointment: int, clinical_note_template: int}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/clinical_note_field_values_list
@desc Retrieve or search clinical note values (soap notes) in batches. Results returned in order of ID or by updated_at.
@optional {uuid: str # The UUID token for the batch of requested data. This is returned in the response of the `create` endpoint.}
@returns(200) {status: str, pagination: map{count: int, pages: int, page: int}, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/care_plans/{id}
@desc Retrieve an existing care plan
@required {id: str}
@optional {patient: int, plan_type: int, doctor: int}
@returns(200) {code: str, appointment: str, description: str, title: str, created_at: str, plan_type: str, updated_at: str, scheduled_date: str, patient: str, id: int, code_system: str, instructions: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/billing_profiles
@desc Retrieve or search billing profiles
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/billing_profiles/{id}
@desc Retrieve an existing billing profiles
@required {id: str}
@optional {doctor: int}
@returns(200) {cpt_codes: [map], archived: bool, icd9_codes: [str], name: str, hcpcs_codes: [map], created_at: str, doctor: str, updated_at: str, custom_procedure_codes: [map], icd10_codes: [str], id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/availability
@desc Retrieve availability slots for the given date and office, doctor, or exam room.
@optional {office: int, doctor: int, date: str, date_range: str, duration: int}

@endpoint PUT /api/task_templates/{id}
@desc Update an existing task template
@required {id: str}
@optional {assignee_user: int, status: int, assignee_group: int, since: str, category: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/task_templates/{id}
@desc Update an existing task template
@required {id: str}
@optional {assignee_user: int, status: int, assignee_group: int, since: str, category: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_templates/{id}
@desc Retrieve an existing task template
@required {id: str}
@optional {assignee_user: int, status: int, assignee_group: int, since: str, category: int}
@returns(200) {archived: bool, name: str, practice_group: str, default_category: int, updated_at: str, default_title: str, default_note: str, default_status: int, id: int, default_assignee_group: int, default_assignee_user: str, default_due_date_offset: str, created_at: str, default_priority: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/fee_schedules/{id}
@required {id: str}
@optional {code: str, code_type: str, since: str, payer_id: str, doctor: int}
@returns(200) {code_type: str, insured_out_of_network_price: num, office: int, updated_at: str, code: str, billing_description: str, id: int, picklist_category: str, allowed_amount: num, ndc_quantity: num, cash_price: num, plan_name: str, description: str, ndc_units: str, ndc_code: str, payer_id: str, cpt_hcpcs_modifier2: str, cpt_hcpcs_modifier3: str, cpt_hcpcs_modifier1: str, cpt_hcpcs_modifier4: str, created_at: str, doctor: int, insured_price: num, base_price: num} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/appointments/{id}
@desc Update an existing appointment or break
@required {id: str # Appointment ID, office: int # Office ID, scheduled_time: str # The starting time of the appointment, doctor: int # Doctor ID, patient: int # ID of this appointment's patient. Breaks have a null patient field., exam_room: int # Index of the exam room that this appointment occurs in. See `/api/offices`}
@optional {status: str(/Arrived/Checked In/Checked In Online/In Room/In Session/Complete/Confirmed/Not Confirmed/Rescheduled/Cancelled/No Show) # One of ``, `Arrived`, `Checked In`, `In Room`, `Cancelled`, `Complete`, `Confirmed`, `In Session`, `No Show`, `Not Confirmed`, or `Rescheduled`. Or one of the custom statuses., icd9_codes: [str], base_recurring_appointment: str # ID of base appointment of a recurring series, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str} # Clinical vitals associated with the appointment, first_billed_date: str, last_billed_date: str, billing_status: str # Should be one of `Auto Accident Claim`, `Balance Due`, `Bill Insurance`, `Bill Secondary Insurance`, `Durable Medical Equipment Claim`, `Internal Review`, `Paid In Full`, `Settled`, `Worker's Comp Claim` or one of the custom billing status, primary_insurer_payer_id: str, duration: int # Length of the appointment in minutes. Optional if `profile` is provided., appt_is_break: bool, id: str # Unique identifier. Usually numeric, but not always, custom_fields: [map{field_type: int, created_at: str, updated_at: str, field_value: str}] # Custom appointment fields, secondary_insurer_name: str, recur_start_date: str # For recurring appointments, the start date of the recurring series, primary_insurance_id_number: str, created_by: str, ins2_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of secondary insurer, first_edi_date: str, billing_notes: [map{text: str, created_at: str, appointment: int, id: int, created_by: str}] # Billing notes of the appointment. For writing, check `/api/claim_billing_notes`, is_walk_in: bool # Whether the appointment is a walk-in appointment, billing_provider: str, reminder_profile: str # Write-only. ID of an `/api/reminder_profiles` instance. Set this to apply a reminder profile to the appointment. Cannot be applied to an appointment with reminders., primary_insurer_name: str, profile: int # ID of an `/api/appointment_profiles` instance. The profile sets default values for `color`, `duration`, and `reason` on creation, which can be overriden by setting these values explicitly., resubmit_claim_original_id: int # ID of this claim id., cloned_from: int # ID of the original appointment which this appointment cloned from. Will be null if the appointment is not cloned., extended_updated_at: str # The most recent update time among appointment itself, its vitals and its custom vitals, updated_at: str, reason: str # Default to `""`, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool # Bypass overlap check., payment_profile: str # Appointment Payment Profile, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str} # Associated clinical note object, custom_vitals: [map{value: str, vital_type: int}] # Custom vitals associated with this appointment., is_virtual_base: bool, recurring_appointment: bool # Whether the appointment is a recurring appointment or not, supervising_provider: str # Supervising provider of appointment if set., recurring_days: [any] # For recurring appointments, the days of the week on which the appointment recurs. Can include Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday, status_transitions: [map{appointment: str, to_status: str, from_status: str, datetime: str}], created_at: str, reminders: [map{scheduled_time: str, type: str, id: int}] # Scheduled reminders of the appointment, ins1_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of primary insurer, custom_status: str # AppointmentStatus Name, recur_end_date: str # For recurring appointments, the end date of the recurring series, icd10_codes: [str], deleted_flag: bool # Whether the appointment is deleted., notes: str, recurs_every: int # For recurring appointments, the number of weeks between recurrences. For example, if this is 2, the appointment recurs every other week.}
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint PATCH /api/appointments/{id}
@desc Update an existing appointment or break
@required {id: str # Appointment ID, office: int # Office ID, scheduled_time: str # The starting time of the appointment, doctor: int # Doctor ID, patient: int # ID of this appointment's patient. Breaks have a null patient field., exam_room: int # Index of the exam room that this appointment occurs in. See `/api/offices`}
@optional {status: str(/Arrived/Checked In/Checked In Online/In Room/In Session/Complete/Confirmed/Not Confirmed/Rescheduled/Cancelled/No Show) # One of ``, `Arrived`, `Checked In`, `In Room`, `Cancelled`, `Complete`, `Confirmed`, `In Session`, `No Show`, `Not Confirmed`, or `Rescheduled`. Or one of the custom statuses., icd9_codes: [str], base_recurring_appointment: str # ID of base appointment of a recurring series, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str} # Clinical vitals associated with the appointment, first_billed_date: str, last_billed_date: str, billing_status: str # Should be one of `Auto Accident Claim`, `Balance Due`, `Bill Insurance`, `Bill Secondary Insurance`, `Durable Medical Equipment Claim`, `Internal Review`, `Paid In Full`, `Settled`, `Worker's Comp Claim` or one of the custom billing status, primary_insurer_payer_id: str, duration: int # Length of the appointment in minutes. Optional if `profile` is provided., appt_is_break: bool, id: str # Unique identifier. Usually numeric, but not always, custom_fields: [map{field_type: int, created_at: str, updated_at: str, field_value: str}] # Custom appointment fields, secondary_insurer_name: str, recur_start_date: str # For recurring appointments, the start date of the recurring series, primary_insurance_id_number: str, created_by: str, ins2_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of secondary insurer, first_edi_date: str, billing_notes: [map{text: str, created_at: str, appointment: int, id: int, created_by: str}] # Billing notes of the appointment. For writing, check `/api/claim_billing_notes`, is_walk_in: bool # Whether the appointment is a walk-in appointment, billing_provider: str, reminder_profile: str # Write-only. ID of an `/api/reminder_profiles` instance. Set this to apply a reminder profile to the appointment. Cannot be applied to an appointment with reminders., primary_insurer_name: str, profile: int # ID of an `/api/appointment_profiles` instance. The profile sets default values for `color`, `duration`, and `reason` on creation, which can be overriden by setting these values explicitly., resubmit_claim_original_id: int # ID of this claim id., cloned_from: int # ID of the original appointment which this appointment cloned from. Will be null if the appointment is not cloned., extended_updated_at: str # The most recent update time among appointment itself, its vitals and its custom vitals, updated_at: str, reason: str # Default to `""`, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool # Bypass overlap check., payment_profile: str # Appointment Payment Profile, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str} # Associated clinical note object, custom_vitals: [map{value: str, vital_type: int}] # Custom vitals associated with this appointment., is_virtual_base: bool, recurring_appointment: bool # Whether the appointment is a recurring appointment or not, supervising_provider: str # Supervising provider of appointment if set., recurring_days: [any] # For recurring appointments, the days of the week on which the appointment recurs. Can include Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday, status_transitions: [map{appointment: str, to_status: str, from_status: str, datetime: str}], created_at: str, reminders: [map{scheduled_time: str, type: str, id: int}] # Scheduled reminders of the appointment, ins1_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of primary insurer, custom_status: str # AppointmentStatus Name, recur_end_date: str # For recurring appointments, the end date of the recurring series, icd10_codes: [str], deleted_flag: bool # Whether the appointment is deleted., notes: str, recurs_every: int # For recurring appointments, the number of weeks between recurrences. For example, if this is 2, the appointment recurs every other week.}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint GET /api/appointments/{id}
@desc Retrieve an existing appointment or break
@required {id: str}
@returns(200) {status: str, icd9_codes: [str], office: int, base_recurring_appointment: str, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str}, first_billed_date: str, last_billed_date: str, billing_status: str, primary_insurer_payer_id: str, duration: int, appt_is_break: bool, id: str, custom_fields: [map], scheduled_time: str, secondary_insurer_name: str, doctor: int, recur_start_date: str, primary_insurance_id_number: str, created_by: str, ins2_status: str, first_edi_date: str, billing_notes: [map], is_walk_in: bool, billing_provider: str, reminder_profile: str, primary_insurer_name: str, profile: int, resubmit_claim_original_id: int, patient: int, cloned_from: int, extended_updated_at: str, exam_room: int, updated_at: str, reason: str, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool, payment_profile: str, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str}, custom_vitals: [map], is_virtual_base: bool, recurring_appointment: bool, supervising_provider: str, recurring_days: [any], status_transitions: [map], created_at: str, reminders: [map], ins1_status: str, custom_status: str, recur_end_date: str, icd10_codes: [str], deleted_flag: bool, notes: str, recurs_every: int} # OK
@errors {401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint DELETE /api/appointments/{id}
@desc Delete an existing appointment or break
@required {id: str # Appointment ID. Can be in the form of date_id where date is the day of the appointment and ID is the recurring appointment ID. If not recurring this is just the ID number.}
@errors {401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint POST /api/telehealth_appointments
@optional {appointment: int, doctor: int}
@returns(201) {sent_patient_email: any, appointment: int, created_at: str, updated_at: str, overlapping_duration: str, duration: int, telehealth_url: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/telehealth_appointments
@optional {cursor: str, page_size: int, appointment: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/care_plans
@desc Retrieve or search care plans
@optional {cursor: str, page_size: int, patient: int, plan_type: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_physical_exams
@desc Create patient physical exam for CQM
@optional {patient: int, doctor: int}
@returns(201) {value_name: str, value_code_system: str, code: str, appointment: str, name: str, doctor: int, created_at: str, effective_time: str, value_code: str, patient: int, id: int, code_system: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_physical_exams
@desc Retrieve or search patient physical exams for CQM
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/line_item_deletions
@desc Retrieve or search billing line item deletions. When a billing line item is deleted, a record of its original ID and the appointment it was attached to will be logged and is accessible from this resource.
@optional {since: str, appointment_id: int}
@returns(200) {previous: str, results: [map], next: str}
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/signed_consent_forms/{id}
@desc signed_consent_forms Read
@required {id: str}
@returns(200) {date_signed: str, archived: bool, appointment: int, signature_file: str(binary), updated_at: str, patient: int, consent_form: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_templates/{id}
@desc Retrieve an existing clinical note tempalte
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, workflow_key: str, name: str, doctor: str, updated_at: str, is_persistent: bool, clinical_note_fields: [map], is_onpatient: bool, order: map{on_complete_note: int, on_ipad: int}, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/transactions
@desc Retrieve or search insurance transactions associated with billing line items
@optional {cursor: str, page_size: int, line_item: int, posted_date: str, appointment: int, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/lab_results
@desc Create lab results. An example lab workflow is as following:
@optional {order: int, doctor: int}
@returns(201) {status: str, group_code: str, observation_description: str, is_abnormal: str, observation_code: str, specimen_received: str, comments: str, normal_range: str, test_performed: str, value: str, abnormal_status: str, lab_order: str, value_is_numeric: bool, document: int, lab_test: int, id: int, unit: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_results
@desc Retrieve or search lab results
@optional {cursor: str, page_size: int, order: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_insurance_plan_names
@desc Retrieve or search custom insurance plan names
@optional {cursor: str, page_size: int, since: str, user: int, name: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/problems/{id}
@desc Update an existing patient problems
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/problems/{id}
@desc Update an existing patient problems
@required {id: str}
@optional {patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/problems/{id}
@desc Retrieve an existing patient problems
@required {id: str}
@optional {patient: int, doctor: int}
@returns(200) {category: str, icd_code: str, icd_version: str, appointment: int, description: str, info_url: str, doctor: int, notes: str, verification_status: any, status: str, snomed_ct_code: str, abatement_date: str(date), date_onset: str, date_diagnosis: str, date_changed: str, patient: int, problem_type: str, id: int, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/amendments
@desc Create patient amendments to a patient's clinical records
@optional {appointment: int, patient: int, doctor: int}
@returns(201) {amendment_name: str, appointment: int, doctor: int, comments: str, amendment_file: str, patient: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/amendments
@desc Retrieve or search patient amendments. You can only interact with amendments created by your API application
@optional {cursor: str, page_size: int, appointment: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/lab_orders
@desc Create lab orders. An example lab workflow is as following:
@optional {since: str, doctor: int}
@returns(201) {status: str, documents: [str], patient: int, doctor: int, timestamp: str, notes: str, accession_number: str, requisition_id: str, external_requisition_id: str, priority: str, icd10_codes: [map], sublab: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_orders
@desc Retrieve or search lab orders
@optional {cursor: str, page_size: int, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctors/{id}
@desc Retrieve an existing doctor
@required {id: str}
@optional {doctor: int}
@returns(200) {website: str, doctor_work_schedule: map{work_days: [map], id: int, office: int, doctor: int}, first_name: str, last_name: str, suffix: str, profile_picture: str, country: str, practice_group_name: str, specialty: str, is_account_suspended: bool, id: int, office_phone: str, npi_number: str, group_npi_number: str, home_phone: str, practice_group: str, timezone: str, cell_phone: str, email: str, job_title: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_flag_types
@desc Create patient flag types
@optional {doctor: int}
@returns(201) {archived: bool, name: str, doctor: int, color: str, created_at: str, updated_at: str, priority: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_flag_types
@desc Retrieve or search patient flag types
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/day_sheet_totals
@desc Retrieve daysheet totals report for a given date range
@required {start_date: str, end_date: str}
@optional {charges_date_type: str, report_type: str, credits_date_type: str, group_by: str, sub_group_by: str, tertiary_group_by: str, cash_view_type: str, patient_id: int, office_id: str, examroom_id: int, pg_mode: bool}

@endpoint PUT /api/custom_appointment_fields/{id}
@desc Update an existing custom appointment field
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/custom_appointment_fields/{id}
@desc Update an existing custom appointment field
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_appointment_fields/{id}
@desc Retrieve an existing custom appointment field
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, doctor: str, created_at: str, updated_at: str, order: int, field_desc: str, field_name: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/eobs
@desc Create EOB object
@optional {doctor: int}
@returns(201) {posted_date: str, insurance_payer_name: str, doctor: int, payment_method: str, deposit_date: str, updated_at: str, insurance_payer_id: str, scanned_eob: str, insurance_payer_trace_number: str, total_paid: num, check_date: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/eobs
@desc Retrieve or search EOB objects
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/users/{id}
@desc Retrieve an existing user, `/api/users/current` can be used to identify logged in user, it will redirect to `/api/users/{current_user_id}`
@required {id: str}
@optional {doctor: int}
@returns(200) {username: str, doctor: str, practice_group: str, is_doctor: str, is_staff: str, id: str, permissions: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/insurances
@required {payer_type: str # One of `"emdeon"`, `"gateway"`, `"ihcfa"`}
@optional {cursor: str, page_size: int, term: str # Search term, which can be either a partial name, partial ID or the state.}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/telehealth_appointment_history
@optional {doctor: int}
@returns(201) {timestamp: str, description: str, event_type: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/telehealth_appointment_history
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/task_notes
@desc Create a task note
@optional {task: int, since: str}
@returns(201) {archived: bool, task: int, text: str, created_at: str, updated_at: str, created_by: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_notes
@desc Retrieve or search task notes
@optional {cursor: str, page_size: int, task: int, since: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/tasks
@desc Create a task
@optional {status: int, category: int, due_at_date: str, due_at_unknown: str, since: str, due_at_since: str, assignee_user: int, assignee_group: int, due_at_range: str}
@returns(201) {category: int, due_date: map{time: str}, archived: bool, associated_items: [map], assigned_by: str, assignee_user: str, created_at: str, assignee_group: int, updated_at: str, created_by: str, priority: str, status: int, notes: [map], title: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/tasks
@desc Retrieve or search tasks
@optional {cursor: str, page_size: int, status: int, category: int, due_at_date: str, due_at_unknown: str, since: str, due_at_since: str, assignee_user: int, assignee_group: int, due_at_range: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patients_summary/{id}
@required {id: str}
@optional {first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patients_summary/{id}
@required {id: str}
@optional {first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients_summary/{id}
@required {id: str}
@optional {first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(200) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/patients_summary/{id}
@required {id: str}
@optional {first_name: str, last_name: str, doctor: int, gender: str, since: str, date_of_birth: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/lab_documents
@desc Create lab order documents. An example lab workflow is as following:
@optional {since: str, doctor: int}
@returns(201) {hl7: str, timestamp: str, lab_order: int, document: str, type: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_documents
@desc Retrieve or search lab order documents
@optional {cursor: str, page_size: int, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/consent_forms/{id}
@desc Update an existing patient consent form
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/consent_forms/{id}
@desc Update an existing patient consent form
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/consent_forms/{id}
@desc Retrieve an existing patient consent form
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, is_mandatory: bool, uri: str, doctor: int, updated_at: str, created_at: str, title: str, assign_by_default: bool, order: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/lab_tests/{id}
@desc Update an existing lab test
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/lab_tests/{id}
@desc Update an existing lab test
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_tests/{id}
@desc Retrieve an existing lab test
@required {id: str}
@optional {order: int, doctor: int}
@returns(200) {report_notes: str, status: str, code: str, description: str, specimen_condition: str, collection_date: str, internal_notes: str, specimen_total_volume: num, specimen_source: str, lab_order: int, id: int, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/lab_tests/{id}
@desc Delete an existing lab test
@required {id: str}
@optional {order: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/prescription_messages_list
@desc Create prescription messages list request.  Use the UUID returned in the response to retrieve the batch of records. Results returned in order of id or updated_at.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int # Number of results to return per page. Value between 1 and 1000., page: int # Number of page to return. Value between 1 and max number of pages in result set., since: str # Inclusive lower bound on record updated/created time, patient: int # Patient ID filter, doctor: int # Prescribing doctor ID filter, created_at: str # Filter on specific creation date, parent_message: int # Filter on associated parent prescription message ID}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/prescription_messages_list
@desc Retrieve or search prescription messages in batches. Results returned in order of ID or updated_at.
@optional {uuid: str # The UUID token for the batch of prescription messages.  This is returned in the response of the `create` endpoint.}
@returns(200) {status: str, pagination: map{count: int, pages: int, page: int}, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint PUT /api/patients/{id}
@desc Update an existing patient
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patients/{id}
@desc Update an existing patient
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients/{id}
@desc Retrieve an existing patient
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) {medication_history_consent: str, last_name: str, emergency_contact_phone: str, primary_care_physician: str, date_of_first_appointment: str, tertiary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, patient_flags_attached: [map], updated_at: str, custom_demographics: [map], referring_source: str, responsible_party_relation: str, zip_code: str, id: int, employer_city: str, employer_state: str, city: str, first_name: str, middle_name: str, doctor: int, race_subcategories: [map], disable_sms_messages: bool, employer: str, preferred_language_description: str, patient_flags: [map], date_of_birth: str, ethnicity: str, home_phone: str, pronouns: str, patient_status: str, patient_photo_date: str, gender_identity_description: str, email: str, responsible_party_email: str, patient_photo: str, responsible_party_phone: str, state: str, secondary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, date_of_last_appointment: str, preferred_language_code: str, patient_payment_profile: str, date_of_death: str, social_security_number: str, auto_accident_insurance: map{auto_accident_claim_rep_city: str, auto_accident_claim_rep_state: str, auto_accident_claim_rep_address: str, auto_accident_will_require_therapy_rec: str, auto_accident_subscriber_middle_name: str, auto_accident_still_under_care: bool, auto_accident_significant_injury_notes: str, auto_accident_subscriber_first_name: str, auto_accident_subscriber_address: str, auto_accident_disabled_from_date: str, auto_accident_company: str, auto_accident_disabled_to_date: str, auto_accident_similar_condition_date: str, auto_accident_case_number: str, auto_accident_claim_rep_is_insurer: bool, auto_accident_payer_address: str, auto_accident_subscriber_last_name: str, auto_accident_subscriber_social_security: str, auto_accident_subscriber_phone_number: str, auto_accident_subscriber_city: str, auto_accident_significant_injury: str, auto_accident_similar_condition_notes: str, auto_accident_payer_id: str, auto_accident_payer_state: str, auto_accident_subscriber_zip_code: str, auto_accident_payer_zip: str, auto_accident_payer_city: str, auto_accident_will_require_therapy: bool, auto_accident_date_of_accident: str, auto_accident_subscriber_date_of_birth: str, auto_accident_subscriber_suffix: str, auto_accident_subscriber_state: str, auto_accident_return_to_work_date: str, auto_accident_notes: str, auto_accident_policy_number: str, auto_accident_is_subscriber_the_patient: bool, auto_accident_claim_rep_zip: str, auto_accident_state_of_occurrence: str, auto_accident_treatment_duration: str, auto_accident_had_similar_condition: bool, auto_accident_patient_relationship_to_subscriber: str, auto_accident_claim_rep_name: str}, address: str, chart_id: str, referring_doctor: map{fax: str, last_name: str, middle_name: str, suffix: str, first_name: str, provider_number: str, specialty: str, provider_qualifier: str, phone: str, address: str, npi: str, email: str}, primary_insurance: map{insurance_group_name: str, insurance_id_number: str, insurance_claim_office_number: str, subscriber_address: str, subscriber_state: str, subscriber_social_security: str, photo_front: str, subscriber_last_name: str, subscriber_middle_name: str, subscriber_date_of_birth: str, insurance_company: str, is_subscriber_the_patient: bool, insurance_plan_name: str, patient_relationship_to_subscriber: str, subscriber_gender: str, photo_back: str, subscriber_suffix: str, subscriber_zip_code: str, subscriber_city: str, insurance_plan_type: str, insurance_payer_id: str, subscriber_country: str, subscriber_first_name: str, insurance_group_number: str}, preferred_language: str, responsible_party_name: str, nick_name: str, copay: str, created_at: str, emergency_contact_relation: str, gender_identity_code: str, office_phone: str, employer_address: str, race: str, offices: [int], preferred_pharmacies: [str], emergency_contact_name: str, gender: str, default_pharmacy: str, cell_phone: str, employer_zip_code: str, workers_comp_insurance: map{workers_comp_payer_city: str, workers_comp_payer_id: str, workers_comp_group_name: str, workers_comp_wcb: str, workers_comp_carrier_code: str, workers_comp_notes: str, property_and_casualty_agency_claim_number: str, workers_comp_state_of_occurrence: str, workers_comp_payer_zip: str, workers_comp_wcb_rating_code: str, workers_comp_case_number: str, workers_comp_group_number: str, workers_comp_company: str, workers_comp_payer_address: str, workers_comp_date_of_accident: str, workers_comp_payer_state: str}} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/patients/{id}
@desc Delete an existing patient
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patients/{id}/ccda_async
@desc Retrieve patient CCDA async.
@required {id: str}
@optional {first_name: str, last_name: str, preferred_language: str, doctor: int, gender: str, created_at: str, since: str, date_of_birth: str, race: str, chart_id: str, email: str, ethnicity: str}
@returns(200) OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_vitals
@desc Retrieve or search custom vital types
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/schedule_blocks
@desc Create a schedule block
@required {office: int # ID of the office where the schedule block is applied, start_time: str(date-time) # Start time of the schedule block in ISO 8601 format, end_time: str(date-time) # End time of the schedule block in ISO 8601 format, provider: int # ID of the provider or doctor who owns this schedule block}
@optional {description: str # Description or reason for the schedule block (e.g., "Lunch Break", "Staff Meeting", "PTO"), color: str # Custom color associated with the schedule block for calendar display, practice_group: int # ID of the practice group for the associated provider (doctor), exam_room: int # ID of the exam room where the schedule block is applied, series: int # Series ID if the schedule block is part of a recurring series, id: int # Unique identifier for the schedule block, appointment_break: int # ID of an associated appointment break, if applicable}
@returns(201) {description: str, office: int, color: str, practice_group: int, start_time: str(date-time), exam_room: int, series: int, end_time: str(date-time), provider: int, id: int, appointment_break: int} # Created
@errors {400: Bad Request - Invalid data (e.g., start_time must be before end_time), 401: Unauthorized, 403: Permission Denied, 500: Internal Server Error}
@example_request {"description":"PTO - Personal Day","office":200,"color":"#9B59B6","start_time":"2024-04-01T08:00:00","end_time":"2024-04-01T17:00:00","provider":100}

@endpoint GET /api/schedule_blocks
@desc Retrieve and search schedule blocks
@optional {cursor: str, page_size: int, doctor: int # Filter by doctor/provider ID, office: int # Filter by office ID, date: str # Filter by specific date (YYYY-MM-DD format), date_range: str # Filter by date range (YYYY-MM-DD/YYYY-MM-DD format)}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 500: Internal Server Error}

@endpoint GET /api/care_team_members/{id}
@required {id: str}
@optional {patient: int, appointment: int, doctor: int}
@returns(200) {patient: str, created_at: str, appointment: str, id: int, user: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/claim_billing_notes/{id}
@desc Retrieve an existing billing note
@required {id: str}
@optional {appointment: int, doctor: int}
@returns(200) {text: str, created_at: str, appointment: int, id: int, created_by: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/inventory_vaccines
@desc Create vaccine inventory
@optional {status: str, cvx_code: str, since: str, doctor: int}
@returns(201) {category: int, lot_number: str, manufacturer_code: str, name: str, original_quantity: int, doctor: int, created_at: str, status: str, updated_at: str, price_with_tax: num, expiry: str, note: str, sales_tax_applicable: bool, cost: num, price: num, vaccination_type: str, id: int, manufacturer: str, current_quantity: int, cvx_code: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/inventory_vaccines
@desc Retrieve or search vaccine inventories
@optional {cursor: str, page_size: int, status: str, cvx_code: str, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/transactions/{id}
@desc Retrieve an existing insurance transaction
@required {id: str}
@optional {line_item: int, posted_date: str, appointment: int, since: str, doctor: int}
@returns(200) {insurance: map{id_number: str, message: str, name: str}, ins_paid: num, posted_date: str, appointment: int, ins_name: int, doctor: int, adjustment_group_code: str, updated_at: str, id: int, line_item: int, claim_status: str, check_date: str, trace_number: str, adjustment_reason: str, patient: int, adjustment: num, created_at: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/procedures
@optional {cursor: str, page_size: int, mu_date: str, patient: int, doctor: int, mu_date_range: str, appointment: int, service_date: str}
@returns(200) {previous: str, data: [any], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/patient_lab_results/{id}
@required {id: str}
@optional {ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/patient_lab_results/{id}
@required {id: str}
@optional {ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_lab_results/{id}
@required {id: str}
@optional {ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(200) {doctor_signoff: bool, loinc_code: str, patient: int, ordering_doctor: int, lab_abnormal_flag: str, lab_normal_range_units: str, created_at: str, lab_normal_range: str, doctor_comments: str, date_test_performed: str, updated_at: str, lab_result_value: str, lab_result_value_as_float: num, scanned_in_result: str, title: str, lab_order_status: str, lab_imported_from_ccr: str, id: int, lab_result_value_units: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/patient_lab_results/{id}
@required {id: str}
@optional {ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/amendments/{id}
@desc Update an existing patient amendment, you can only interact with amendments created by your API application
@required {id: str}
@optional {appointment: int, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/amendments/{id}
@desc Update an existing patient amendment, you can only interact with amendments created by your API application
@required {id: str}
@optional {appointment: int, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/amendments/{id}
@desc Retrieve an existing patient amendment, you can only interact with amendments created by your API application
@required {id: str}
@optional {appointment: int, patient: int, doctor: int}
@returns(200) {amendment_name: str, appointment: int, doctor: int, comments: str, amendment_file: str, patient: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/amendments/{id}
@desc Delete an existing patient amendment, you can only interact with amendments created by your API application
@required {id: str}
@optional {appointment: int, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/lab_tests
@desc Create lab tests. An example lab workflow is as following:
@optional {order: int, doctor: int}
@returns(201) {report_notes: str, status: str, code: str, description: str, specimen_condition: str, collection_date: str, internal_notes: str, specimen_total_volume: num, specimen_source: str, lab_order: int, id: int, name: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/lab_tests
@desc Retrieve or search lab tests
@optional {cursor: str, page_size: int, order: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/appointments_list/{id}
@required {id: str}
@optional {status: str, patient: int, office: int, doctor: int, since: str, date_range: str, date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint PATCH /api/appointments_list/{id}
@required {id: str}
@optional {status: str, patient: int, office: int, doctor: int, since: str, date_range: str, date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint GET /api/appointments_list/{id}
@required {id: str}
@optional {status: str, patient: int, office: int, doctor: int, since: str, date_range: str, date: str}
@returns(200) {status: str, icd9_codes: [str], office: int, base_recurring_appointment: str, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str}, first_billed_date: str, last_billed_date: str, billing_status: str, primary_insurer_payer_id: str, duration: int, appt_is_break: bool, id: str, custom_fields: [map], scheduled_time: str, secondary_insurer_name: str, doctor: int, recur_start_date: str, primary_insurance_id_number: str, created_by: str, ins2_status: str, first_edi_date: str, billing_notes: [map], is_walk_in: bool, billing_provider: str, reminder_profile: str, primary_insurer_name: str, profile: int, resubmit_claim_original_id: int, patient: int, cloned_from: int, extended_updated_at: str, exam_room: int, updated_at: str, reason: str, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool, payment_profile: str, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str}, custom_vitals: [map], is_virtual_base: bool, recurring_appointment: bool, supervising_provider: str, recurring_days: [any], status_transitions: [map], created_at: str, reminders: [map], ins1_status: str, custom_status: str, recur_end_date: str, icd10_codes: [str], deleted_flag: bool, notes: str, recurs_every: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/appointments_list/{id}
@required {id: str}
@optional {status: str, patient: int, office: int, doctor: int, since: str, date_range: str, date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_lab_results
@optional {ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(201) {doctor_signoff: bool, loinc_code: str, patient: int, ordering_doctor: int, lab_abnormal_flag: str, lab_normal_range_units: str, created_at: str, lab_normal_range: str, doctor_comments: str, date_test_performed: str, updated_at: str, lab_result_value: str, lab_result_value_as_float: num, scanned_in_result: str, title: str, lab_order_status: str, lab_imported_from_ccr: str, id: int, lab_result_value_units: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_lab_results
@optional {cursor: str, page_size: int, ordering_doctor: int, since: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/task_categories/{id}
@desc Update an existing task category
@required {id: str}
@optional {since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/task_categories/{id}
@desc Update an existing task category
@required {id: str}
@optional {since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_categories/{id}
@desc Retrieve an existing task category
@required {id: str}
@optional {since: str}
@returns(200) {archived: bool, is_global: str, name: str, practice_group: int, created_at: str, updated_at: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/fee_schedules_v2/{id}
@required {id: str}
@returns(200) {ineffective_date: str, assignees: [any], items: [any], created_at: str, payer_id: str, updated_at: str, assignee_type: str, specialities: [any], effective_date: str, plan_name: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/insurances/{id}
@required {id: str, payer_type: str # One of `"emdeon"`, `"gateway"`, `"ihcfa"`}
@optional {term: str # Search term, which can be either a partial name, partial ID or the state.}
@returns(200) {payer_name: str, state: str, payer_id: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_notes
@optional {cursor: str, page_size: int, patient: int, office: int, doctor: int, created_at: str, since: str, date_range: str, date: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/eligibility_checks_list
@desc Create eligibility checks list request.  Use the UUID returned in the response to retrieve the batch of records. Results returned in order of id or updated_at.
@optional {order_by: str # Order results by a specific field. Valid options include [id, updated_at]. Default: id., page_size: int # Number of results to return per page. Value between 1 and 1000., page: int # Number of page to return. Value between 1 and max number of pages in result set., since: str # Inclusive lower bound on record updated/created time, patient: int # Patient ID filter, appointment_date_range: str # Inclusive bounded date range on appointment scheduled date, appointment_date: str # Filter on specific appointment scheduled date, query_date_range: str # Inclusive bounded date range on eligibility check date, query_date: str # Filter on specific eligibility check date, service_types: str # Filter for checks included within a comma-separated list of service type codes (STCs), verbose: bool # When True includes full coverage details}
@returns(201) {status: str, uuid: str, description: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/eligibility_checks_list
@desc Retrieve or search eligibility checks in batches. Results returned in order of ID or updated_at.
@optional {uuid: str # The UUID token for the batch of eligibility checks.  This is returned in the response of the `create` endpoint.}
@returns(200) {status: str, pagination: map{count: int, pages: int, page: int}, results: [map], uuid: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/telehealth_appointment_history/{id}
@required {id: str}
@optional {doctor: int}
@returns(200) {timestamp: str, description: str, event_type: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_notes/{id}
@required {id: str}
@optional {patient: int, office: int, doctor: int, since: str, date_range: str, date: str}
@returns(200) {patient: str, archived: bool, clinical_note_sections: [map], appointment: str, signee: map{locked_by: str, supervisor_locked_by: str}} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_field_types
@desc Retrieve or search clinical note field types
@optional {cursor: str, page_size: int, clinical_note_template: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/documents
@desc Create documents
@optional {since: str, patient: int, doctor: int}
@returns(201) {archived: bool, patient: int, description: str, doctor: int, metatags: str, updated_at: str, date: str, document: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/documents
@desc Retrieve or search documents
@optional {cursor: str, page_size: int, since: str, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/staff/{id}
@required {id: str}
@optional {doctor: int}
@returns(200) {username: str, first_name: str, last_name: str, user_id: str, doctor: str, created_at: str, updated_at: str, id: int, home_phone: str, active: str, cell_phone: str, email: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/users
@desc Retrieve or search users, `/api/users/current` can be used to identify logged in user, it will redirect to `/api/users/{current_user_id}`
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/schedule_blocks/{id}
@desc Update a schedule block
@required {id: str # Schedule block ID, office: int # ID of the office where the schedule block is applied, start_time: str(date-time) # Start time of the schedule block in ISO 8601 format, end_time: str(date-time) # End time of the schedule block in ISO 8601 format, provider: int # ID of the provider or doctor who owns this schedule block}
@optional {description: str # Description or reason for the schedule block (e.g., "Lunch Break", "Staff Meeting", "PTO"), color: str # Custom color associated with the schedule block for calendar display, practice_group: int # ID of the practice group for the associated provider (doctor), exam_room: int # ID of the exam room where the schedule block is applied, series: int # Series ID if the schedule block is part of a recurring series, id: int # Unique identifier for the schedule block, appointment_break: int # ID of an associated appointment break, if applicable}
@returns(200) {description: str, office: int, color: str, practice_group: int, start_time: str(date-time), exam_room: int, series: int, end_time: str(date-time), provider: int, id: int, appointment_break: int} # OK - Schedule block updated
@returns(204) No Content - Schedule block updated (alternative response)
@errors {400: Bad Request - Invalid data or missing required fields, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}
@example_request {"description":"Early Lunch - Staff Training","office":200,"color":"#16A085","start_time":"2024-03-15T11:00:00","exam_room":1,"end_time":"2024-03-15T12:30:00","provider":100}

@endpoint PATCH /api/schedule_blocks/{id}
@desc Partially update a schedule block
@required {id: str # Schedule block ID, office: int # ID of the office where the schedule block is applied, start_time: str(date-time) # Start time of the schedule block in ISO 8601 format, end_time: str(date-time) # End time of the schedule block in ISO 8601 format, provider: int # ID of the provider or doctor who owns this schedule block}
@optional {description: str # Description or reason for the schedule block (e.g., "Lunch Break", "Staff Meeting", "PTO"), color: str # Custom color associated with the schedule block for calendar display, practice_group: int # ID of the practice group for the associated provider (doctor), exam_room: int # ID of the exam room where the schedule block is applied, series: int # Series ID if the schedule block is part of a recurring series, id: int # Unique identifier for the schedule block, appointment_break: int # ID of an associated appointment break, if applicable}
@returns(200) {description: str, office: int, color: str, practice_group: int, start_time: str(date-time), exam_room: int, series: int, end_time: str(date-time), provider: int, id: int, appointment_break: int} # OK - Schedule block updated
@returns(204) No Content - Schedule block updated (alternative response)
@errors {400: Bad Request - Invalid data, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}
@example_request {"exam_room":4}

@endpoint GET /api/schedule_blocks/{id}
@desc Retrieve a schedule block
@required {id: str # Schedule block ID}
@returns(200) {description: str, office: int, color: str, practice_group: int, start_time: str(date-time), exam_room: int, series: int, end_time: str(date-time), provider: int, id: int, appointment_break: int} # OK
@errors {401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint DELETE /api/schedule_blocks/{id}
@desc Delete a schedule block
@required {id: str # Schedule block ID}
@returns(204) No Content - Schedule block successfully deleted
@errors {401: Unauthorized, 403: Permission Denied, 404: Not Found, 500: Internal Server Error}

@endpoint GET /api/lab_orders_summary/{id}
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(200) {status: str, documents: [str], patient: int, doctor: int, timestamp: str, notes: str, accession_number: str, requisition_id: str, external_requisition_id: str, priority: str, icd10_codes: [map], sublab: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/audit_log
@desc Retrieve or search audit logs.
@optional {cursor: str, page_size: int, since: str, date_range: str, date: str, patient: int, doctor: int, user: int, appointment: int, type: str, action: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/task_notes/{id}
@desc Update an existing task note
@required {id: str}
@optional {task: int, since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/task_notes/{id}
@desc Update an existing task note
@required {id: str}
@optional {task: int, since: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/task_notes/{id}
@desc Retrieve an existing task note
@required {id: str}
@optional {task: int, since: str}
@returns(200) {archived: bool, task: int, text: str, created_at: str, updated_at: str, created_by: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/custom_demographics/{id}
@desc Update an existing custom demographics field
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/custom_demographics/{id}
@desc Update an existing custom demographics field
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/custom_demographics/{id}
@desc Retrieve an existing custom demographics field
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, description: str, doctor: int, template_name: str, allowed_values: str, id: int, name: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/messages/{id}
@desc Update an existing message in doctor's message center
@required {id: str}
@optional {patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/messages/{id}
@desc Update an existing message in doctor's message center
@required {id: str}
@optional {patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/messages/{id}
@desc Retrieve an existing message in doctor's message center
@required {id: str}
@optional {patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(200) {type_description: str, patient_middle_name: str, updated_at: str, owner: str, responsible_user_first_name: str, received_at: str, id: int, doctor_last_name: str, owner_first_name: str, archived: bool, doctor: int, owner_last_name: str, patient_first_name: str, attachment: str, outgoing_fax_recipient_fax_number: str, responsible_user_last_name: str, type: str, patient_last_name: str, patient: int, doctor_first_name: str, read: bool, responsible_user: str, workflow_step: str, outgoing_fax_recipient_name: str, doctor_middle_name: str, message_notes: [map], title: str, starred: bool} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/messages/{id}
@desc Delete an existing message in doctor's message center
@required {id: str}
@optional {patient: int, doctor: int, responsible_user: int, updated_since: str, received_since: str, owner: int, type: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/eobs/{id}
@desc Retrieve an existing EOB object
@required {id: str}
@optional {doctor: int}
@returns(200) {posted_date: str, insurance_payer_name: str, doctor: int, payment_method: str, deposit_date: str, updated_at: str, insurance_payer_id: str, scanned_eob: str, insurance_payer_trace_number: str, total_paid: num, check_date: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctor_options/{id}
@desc Retrieve existing options for a doctor
@required {id: str}
@returns(200) {default_supervising_provider: int, doctor: int, updated_at: str, patient_statement_office: int, allowed_payment_methods: [any], default_report: int, default_billing_provider: int, default_reminder_profile: int, enable_everhealth_scribe: bool, office_for_lab_results: int, erx_supervising_providers: [int], iframe_apps: [str], id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/allergies
@desc Create patient allergy
@optional {patient: int, doctor: int}
@returns(201) {status: str, reaction: str, patient: int, description: str, doctor: int, snomed_reaction: str, notes: str, verification_status: str, snomed_code: str, rxnorm: str, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/allergies
@desc Retrieve or search patient allergies
@optional {cursor: str, page_size: int, patient: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/appointments
@desc Create a new appointment or break on doctor's calendar
@required {office: int # Office ID, scheduled_time: str # The starting time of the appointment, doctor: int # Doctor ID, patient: int # ID of this appointment's patient. Breaks have a null patient field., exam_room: int # Index of the exam room that this appointment occurs in. See `/api/offices`}
@optional {status: str(/Arrived/Checked In/Checked In Online/In Room/In Session/Complete/Confirmed/Not Confirmed/Rescheduled/Cancelled/No Show) # One of ``, `Arrived`, `Checked In`, `In Room`, `Cancelled`, `Complete`, `Confirmed`, `In Session`, `No Show`, `Not Confirmed`, or `Rescheduled`. Or one of the custom statuses., icd9_codes: [str], base_recurring_appointment: str # ID of base appointment of a recurring series, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str} # Clinical vitals associated with the appointment, first_billed_date: str, last_billed_date: str, billing_status: str # Should be one of `Auto Accident Claim`, `Balance Due`, `Bill Insurance`, `Bill Secondary Insurance`, `Durable Medical Equipment Claim`, `Internal Review`, `Paid In Full`, `Settled`, `Worker's Comp Claim` or one of the custom billing status, primary_insurer_payer_id: str, duration: int # Length of the appointment in minutes. Optional if `profile` is provided., appt_is_break: bool, id: str # Unique identifier. Usually numeric, but not always, custom_fields: [map{field_type: int, created_at: str, updated_at: str, field_value: str}] # Custom appointment fields, secondary_insurer_name: str, recur_start_date: str # For recurring appointments, the start date of the recurring series, primary_insurance_id_number: str, created_by: str, ins2_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of secondary insurer, first_edi_date: str, billing_notes: [map{text: str, created_at: str, appointment: int, id: int, created_by: str}] # Billing notes of the appointment. For writing, check `/api/claim_billing_notes`, is_walk_in: bool # Whether the appointment is a walk-in appointment, billing_provider: str, reminder_profile: str # Write-only. ID of an `/api/reminder_profiles` instance. Set this to apply a reminder profile to the appointment. Cannot be applied to an appointment with reminders., primary_insurer_name: str, profile: int # ID of an `/api/appointment_profiles` instance. The profile sets default values for `color`, `duration`, and `reason` on creation, which can be overriden by setting these values explicitly., resubmit_claim_original_id: int # ID of this claim id., cloned_from: int # ID of the original appointment which this appointment cloned from. Will be null if the appointment is not cloned., extended_updated_at: str # The most recent update time among appointment itself, its vitals and its custom vitals, updated_at: str, reason: str # Default to `""`, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool # Bypass overlap check., payment_profile: str # Appointment Payment Profile, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str} # Associated clinical note object, custom_vitals: [map{value: str, vital_type: int}] # Custom vitals associated with this appointment., is_virtual_base: bool, recurring_appointment: bool # Whether the appointment is a recurring appointment or not, supervising_provider: str # Supervising provider of appointment if set., recurring_days: [any] # For recurring appointments, the days of the week on which the appointment recurs. Can include Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday, status_transitions: [map{appointment: str, to_status: str, from_status: str, datetime: str}], created_at: str, reminders: [map{scheduled_time: str, type: str, id: int}] # Scheduled reminders of the appointment, ins1_status: str(/Incomplete Information/In Process Emdeon/Rejected Emdeon/Rejected EPS/Rejected Jopari/In Process Payor/Rejected Waystar Professional/Rejected Waystar Institutional/In Process Payer/Payer Acknowledged/Rejected Payor/Rejected Payer/Paid in Full/Partially Paid/Coordination of Benefits/ERA Received/ERA Denied/HCFA Form Faxed) # Billing status of primary insurer, custom_status: str # AppointmentStatus Name, recur_end_date: str # For recurring appointments, the end date of the recurring series, icd10_codes: [str], deleted_flag: bool # Whether the appointment is deleted., notes: str, recurs_every: int # For recurring appointments, the number of weeks between recurrences. For example, if this is 2, the appointment recurs every other week.}
@returns(201) {status: str, icd9_codes: [str], office: int, base_recurring_appointment: str, color: str, vitals: map{height_units: str, weight_units: str, pain: str, temperature: num, weight: num, smoking_status: str, head_circumference: num, bmi: str, head_circumference_units: str, blood_pressure_2: int, blood_pressure_1: int, height: num, pulse: int, oxygen_saturation: num, respiratory_rate: int, temperature_units: str}, first_billed_date: str, last_billed_date: str, billing_status: str, primary_insurer_payer_id: str, duration: int, appt_is_break: bool, id: str, custom_fields: [map], scheduled_time: str, secondary_insurer_name: str, doctor: int, recur_start_date: str, primary_insurance_id_number: str, created_by: str, ins2_status: str, first_edi_date: str, billing_notes: [map], is_walk_in: bool, billing_provider: str, reminder_profile: str, primary_insurer_name: str, profile: int, resubmit_claim_original_id: int, patient: int, cloned_from: int, extended_updated_at: str, exam_room: int, updated_at: str, reason: str, last_edi_date: str, secondary_insurer_payer_id: str, allow_overlapping: bool, payment_profile: str, secondary_insurance_id_number: str, clinical_note: map{pdf: str, locked: bool, updated_at: str}, custom_vitals: [map], is_virtual_base: bool, recurring_appointment: bool, supervising_provider: str, recurring_days: [any], status_transitions: [map], created_at: str, reminders: [map], ins1_status: str, custom_status: str, recur_end_date: str, icd10_codes: [str], deleted_flag: bool, notes: str, recurs_every: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 409: Scheduled time overlaps with an existing appointment, 500: Internal Server Error}

@endpoint GET /api/appointments
@desc Retrieve or search appointment or breaks.
@optional {cursor: str, page_size: int, status: str # Appointment status name, patient: int # Patient ID, office: int # Office ID, doctor: int # Doctor ID, since: str # Lower bound inclusive date filter for appointment updated/created date, occurred_since: str # Filter appointments based on scheduled time, date_range: str # Inclusive upper and lower bound filter for appointment scheduled date. Format: yyyy-mm-dd/yyyy-mm-dd. Max window size 190 days, verbose: bool # set to `true` to include clinical_note, custom_fields, custom_vitals, extended_updated_at, reminders, status_transitions, vitals but limit page_size to 25, date: str # Specific date filter for appointment scheduled date, ignore_virtual: bool # set to `true` to ignore virtual appointments that have not yet been materialized, show_archived: bool # set to `true` or `1` to include deleted or archived appointments}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 500: Internal Server Error}

@endpoint GET /api/procedures/{id}
@required {id: str}
@optional {mu_date: str, patient: int, doctor: int, mu_date_range: str, appointment: int, service_date: str}
@returns(200) {status: str, code: str, patient: int, description: str, doctor: int, created_at: str, updated_at: str, procedure_type: str, date: str, appointment: int, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/clinical_note_templates
@desc Retrieve or search clinical note templates
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/line_items/{id}
@required {id: str}
@optional {posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/line_items/{id}
@required {id: str}
@optional {posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/line_items/{id}
@desc Retrieve an existing billing line item
@required {id: str}
@optional {posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str, service_date_range: str}
@returns(200) {code: str, ins3_paid: num, updated_at: str, posted_date: str, billing_status: str, pt_paid: num, allowed: num, patient: str, adjustment: num, id: int, doctor: str, balance_pt: num, units: str, balance_ins: num, paid_total: str, diagnosis_pointers: [str], appointment: int, description: str, balance_total: str, price: num, expected_reimbursement: num, ins2_paid: num, ins1_paid: num, insurance_status: str, billed: num, modifiers: [str], denied_flag: bool, ins_total: str, procedure_type: str, service_date: str, quantity: num} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint DELETE /api/line_items/{id}
@required {id: str}
@optional {posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/doctors
@desc Retrieve or search doctors within practice group
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/reminder_profiles
@desc Create reminder profile
@optional {doctor: int}
@returns(201) {reminders: [map], id: int, name: str, doctor: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/reminder_profiles
@desc Retrieve or search reminder profiles
@optional {cursor: str, page_size: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_payment_log
@desc Retrieve or search patient payment logs
@optional {cursor: str, page_size: int, since: str, office: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/offices/{id}
@desc Update an existing office
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/offices/{id}
@desc Update an existing office
@required {id: str}
@optional {doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/offices/{id}
@desc Retrieve an existing office
@required {id: str}
@optional {doctor: int}
@returns(200) {phone_number: str, city: str, archived: bool, office_work_schedule: map{work_days: [map], id: int, office: int, doctor: int}, name: str, doctor: str, country: str, start_time: str, fax_number: str, online_timeslots: [map], state: str, end_time: str, exam_rooms: str, address: str, tax_id_number_professional: str, zip_code: str, id: int, online_scheduling: bool} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_payment_log/{id}
@desc Retrieve an existing patient payment log
@required {id: str}
@optional {since: str, office: int, doctor: int}
@returns(200) {appointment: str, doctor: str, payment_method: str, updated_at: str, created_by: str, source: str, amount: num, action: str, patient: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/appointment_templates
@desc Create appointment templates for a doctor's calendar
@optional {profile: int, office: int, doctor: int}
@returns(201) {profile: int, scheduled_time: str, archived: bool, week_days: [int], office: int, open_slots: [map], date_end: str, date_start: str, exam_room: int, duration: int, id: int} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/appointment_templates
@desc Retrieve or search appointment templates for a doctor's calendar
@optional {available: str, week_days: [int], cursor: str, page_size: int, profile: int, office: int, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/patient_vaccine_records
@desc Create patient vaccine records
@optional {cvx_code: str, patient: int, since: str, doctor: int}
@returns(201) {lot_number: str, site: str, ordering_doctor: int, doses: [map], id: int, next_dose_date: str, cpt_code: str, completion_status: str, administered_at: int, comments: str, funding_eligibility: str, units: str, entered_by: str, patient: int, administration_start: str, record_source: str, updated_at: str, consent_form: int, manufacturer: str, administered_by: str, name: str, vis: str, created_at: str, observed_immunity: str, amount: num, vaccine_inventory: int, route: str, cvx_code: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/patient_vaccine_records
@desc Retrieve or search patient vaccine records
@optional {cursor: str, page_size: int, cvx_code: str, patient: int, since: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/telehealth_appointments/{id}
@required {id: str}
@optional {appointment: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/telehealth_appointments/{id}
@required {id: str}
@optional {appointment: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/telehealth_appointments/{id}
@required {id: str}
@optional {appointment: int, doctor: int}
@returns(200) {sent_patient_email: any, appointment: int, created_at: str, updated_at: str, overlapping_duration: str, duration: int, telehealth_url: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PUT /api/comm_logs/{id}
@desc Update an existing communication (phone call) logs
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint PATCH /api/comm_logs/{id}
@desc Update an existing communication (phone call) logs
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(204) No Content
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/comm_logs/{id}
@desc Retrieve an existing communication (phone call) logs
@required {id: str}
@optional {since: str, patient: int, doctor: int}
@returns(200) {scheduled_time: str, archived: bool, appointment: int, doctor: int, title: str, created_at: str, author: str, updated_at: str, cash_charged: num, duration: int, patient: int, message: str, type: str, id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/prescription_messages
@desc Retrieve or search prescription messages
@optional {cursor: str, page_size: int, parent_message: int, since: str, patient: int, created_at: str, doctor: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/user_groups/{id}
@desc Retrieve an existing user group
@required {id: str}
@optional {doctor: int}
@returns(200) {archived: bool, name: str, practice_group: str, created_at: str, updated_at: str, members: [str], id: int} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/line_items
@desc Create billing line item for appointments
@optional {posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str}
@returns(201) {code: str, ins3_paid: num, updated_at: str, posted_date: str, billing_status: str, pt_paid: num, allowed: num, patient: str, adjustment: num, id: int, doctor: str, balance_pt: num, units: str, balance_ins: num, paid_total: str, diagnosis_pointers: [str], appointment: int, description: str, balance_total: str, price: num, expected_reimbursement: num, ins2_paid: num, ins1_paid: num, insurance_status: str, billed: num, modifiers: [str], denied_flag: bool, ins_total: str, procedure_type: str, service_date: str, quantity: num} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/line_items
@desc Retrieve or search billing line items
@optional {cursor: str, page_size: int, posted_date: str, patient: int, office: int, doctor: int, since: str, appointment: int, service_date: str}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint POST /api/sublabs
@desc Create sub-vendors
@returns(201) {vendor_name: str, facility_code: str, id: int, name: str} # Created
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@endpoint GET /api/sublabs
@desc Retrieve or search sub vendors
@optional {cursor: str, page_size: int}
@returns(200) {previous: str, data: [map], next: str} # OK
@errors {400: Bad Request, 401: Unauthorized, 403: Permission Denied, 404: Not Found, 405: Method Not Allowed, 500: Internal Server Error}

@end
