Skip to content

API Reference

All whitelisted methods are callable via Frappe's RPC: POST /api/method/{dotted.path}. Auth required unless noted.

Calling Conventions

bash
# Module-level function
POST /api/method/healthcare.healthcare.doctype.patient_appointment.patient_appointment.update_status

# Instance method (on a document)
POST /api/method/run_doc_method
Body: { "dt": "Inpatient Record", "dn": "IP-00001", "method": "admit", "args": {...} }

# Standard CRUD (all DocTypes)
GET    /api/resource/{DocType}              # List
GET    /api/resource/{DocType}/{name}       # Read
POST   /api/resource/{DocType}              # Create
PUT    /api/resource/{DocType}/{name}       # Update
DELETE /api/resource/{DocType}/{name}       # Delete

# Auth header
Authorization: token api_key:api_secret

Patient Portal API

Module: healthcare.healthcare.api.patient_portal

MethodParamsDescription
get_logged_in_patientResolve session user to Patient record
get_appointmentsList appointments for patient + relations
get_departmentsList portal-visible departments
get_practitionersdepartmentList practitioners by department
get_patientsList accessible patients (self + relations)
get_settingsReturn Healthcare Settings singleton
get_slotspractitioner, dateAvailable time slots
make_appointmentpractitioner, patient, date, slotBook appointment
get_feespractitioner, dateConsultation fee details
get_print_formatdoctype, namePrint format + letter head info
get_ordersDiagnostic test orders + results
get_payment_linkdoctype, docname, title, amount, total_amount, currency, patient, redirect_toPayment gateway URL

Patient Appointment

Module: healthcare.healthcare.doctype.patient_appointment.patient_appointment

MethodParamsDescription
get_availability_datadate, practitioner, appointment_type, ...Slot availability
check_payment_reqdpatientCheck if payment required
invoice_appointmentappointment_name, discount_%, discount_amtInvoice the appointment
update_fee_validityappointmentUpdate fee validity after booking
update_statusappointment_id, statusChange appointment status
make_encountersource_nameCreate Patient Encounter
get_eventsstart, end, filtersCalendar events
get_procedure_prescribedpatientList prescribed procedures
create_therapy_sessionsappointment, therapy_typesCreate linked therapy sessions
check_unavailability_conflictsfiltersCheck for scheduling conflicts
create_unavailability_appointmentdataBlock practitioner time

Recurring Handler

Module: healthcare.healthcare.doctype.patient_appointment.recuring_appointment_handler

MethodParamsDescription
create_recurring_appointmentsdataCreate recurring appointment series
book_appointmentsdataBatch book appointments
get_recurring_appointment_datesdataPreview recurring dates
get_availabilityscheduled_details, practitioner, service_unitCheck availability
get_service_unit_valuesselected_practitionerPractitioner's service units

Patient Encounter

Module: healthcare.healthcare.doctype.patient_encounter.patient_encounter

MethodParamsDescription
get_applicable_treatment_plansencounterMatching treatment plan templates
set_treatment_plans(instance) treatment_plansApply treatment plan
add_clinical_note(instance) note, note_typeAdd SOAP note
edit_clinical_note(instance) note, note_nameEdit note
delete_clinical_note(instance) note_nameDelete note
get_clinical_notes(instance) patientGet all notes
load_patient_history(instance)Load medical history
make_ip_medication_ordersource_nameCreate IP medication order
create_service_requestencounterCreate service requests from prescriptions
create_medication_requestencounterCreate medication requests
get_medicationsmedicationMedication details
cancel_requestdoctype, requestCancel a request
create_service_request_from_widgetencounter, dataSidebar widget ordering
get_encounter_detailsdocFormatted encounter details
create_patient_referralencounter, referencesCreate referral

Inpatient Record

Module: healthcare.healthcare.doctype.inpatient_record.inpatient_record

MethodParamsDescription
admit(instance) service_unit, check_in, ...Admit patient
discharge(instance)Discharge patient
transfer(instance) service_unit, check_in, ...Transfer bed/ward
add_service_unit_rent_to_billable_items(instance)Add daily rent charges
create_insurance_coverage(instance)Create IP insurance coverage
schedule_inpatientadmission_orderSchedule admission
schedule_dischargedischarge_orderSchedule discharge
set_ip_order_cancelledinpatient_record, reasonCancel IP order
make_discharge_summarysource_nameCreate discharge summary
create_treatment_counsellingip_orderCreate pre-admission counselling
create_stock_entryitems, inpatient_recordCreate stock entry for consumables

Observation

Module: healthcare.healthcare.doctype.observation.observation

MethodParamsDescription
get_observation_detailsdocnameFull observation data
edit_observationobservation, data_type, resultEdit result
add_observation**argsCreate new observation
record_observation_resultvaluesRecord result values
add_notenote, observationAdd note to observation
get_observation_result_templatetemplate_name, observationGet result template
set_observation_statusobservation, status, reasonSet approval status

Therapy Plan + Session

Therapy Plan — healthcare.healthcare.doctype.therapy_plan.therapy_plan

MethodParamsDescription
set_therapy_details_from_template(instance)Populate from template
get_invoiced_details(instance)Invoicing status
make_therapy_sessiontherapy_plan, patient, therapy_type, companyCreate session
make_sales_invoicereference_name, patient, company, itemsInvoice plan
make_patient_appointmentsource_nameCreate appointment

Therapy Session — healthcare.healthcare.doctype.therapy_session.therapy_session

MethodParamsDescription
consume_stocks(instance)Consume consumables
verify_stock(instance)Check stock availability
make_material_receipt(instance) submitCreate material receipt
create_therapy_sessionsource_nameCreate from appointment
invoice_therapy_sessionsource_nameInvoice session
validate_no_of_sessiontherapy_planCheck session limit
get_therapy_consumablestherapy_typeList consumables

Clinical Procedure

Module: healthcare.healthcare.doctype.clinical_procedure.clinical_procedure

MethodParamsDescription
start_procedure(instance)Start procedure
complete_procedure(instance)Complete procedure
make_material_receipt(instance) submitMaterial receipt
get_procedure_consumablesprocedure_templateList consumables
make_stock_entrydocCreate stock entry
make_proceduresource_nameCreate from service request

Service Request

Module: healthcare.healthcare.doctype.service_request.service_request

MethodParamsDescription
set_service_request_statusservice_request, statusUpdate status
make_clinical_procedureservice_requestCreate procedure
make_lab_testservice_requestCreate lab test
make_therapy_sessionservice_requestCreate therapy session
make_observationservice_requestCreate observation
make_appointmentsource_nameCreate appointment

Lab Test

Module: healthcare.healthcare.doctype.lab_test.lab_test

MethodParamsDescription
update_statusstatus, nameUpdate test status
create_multipledoctype, docnameBatch create tests
get_lab_test_prescribedpatientList prescribed tests

Insurance

ModuleMethodParamsDescription
insurance_payorhas_active_contractinsurance_payor, company, on_dateCheck active contract
patient_insurance_coveragecreate_insurance_eligibilitydocCreate eligibility check
insurance_claimget_coverages(instance)Get applicable coverages
insurance_claimcreate_payment_entrydocCreate payment for claim

Billing Utilities

Module: healthcare.healthcare.utils

MethodParamsDescription
get_healthcare_services_to_invoicepatient, customer, company, link_customerAggregate all billable services
get_appointment_billing_item_and_ratedocBilling item + rate for appointment
get_drugs_to_invoiceencounter, customer, link_customerDrugs to invoice
get_patient_vitalspatient, from_date, to_dateVital signs records
render_doc_as_htmldoctype, docname, exclude_fieldsRender document as HTML
get_medical_codestemplate_dt, template_dn, code_standardMedical codes for template
generate_barcodesin_valBarcode image generation
add_nodeAdd Healthcare Service Unit tree node
check_patient_duplicatespatientDuplicate patient detection

Desk Page APIs

Patient History — healthcare.healthcare.page.patient_history.patient_history

MethodParamsDescription
get_feedname, document_types, date_range, start, page_lengthPaginated medical timeline
get_feed_for_dtdoctype, docnameSingle document feed
get_patient_history_doctypesAvailable doc types

Patient Progress — healthcare.healthcare.page.patient_progress.patient_progress

MethodParamsDescription
get_therapy_sessions_countpatientTotal/completed counts
get_patient_heatmap_datapatient, dateActivity heatmap
get_therapy_sessions_distribution_datapatient, fieldDistribution by type
get_therapy_progress_datapatient, therapy_type, time_spanProgress over time
get_patient_assessment_datapatient, assessment_template, time_spanAssessment scores
get_therapy_assessment_correlation_datapatient, assessment_template, time_spanCorrelation analysis
get_assessment_parameter_datapatient, parameter, time_spanParameter trends

Dashboard Chart Sources

SourceDescription
department_wise_patient_appointmentsAppointments by department
insurance_claim_statusInsurance claim status breakdown
service_unit_type_wise_admission_statusAdmissions by unit type