v1

latestOpenAPI 3.0.32026-07-26229361630.0 KB
IPD API

Create IPD Admission

Overview

This API creates a single IPD (In-Patient Department) admission, scoped to the caller's business (b-id). An admission document captures the full in-patient episode — the patient, their attendee, insurance, bed and rateplan, the responsible doctor/department/facility, and the admission's lifecycle state.

The admission id is server-generated and the acting oid (from the auth header) is recorded as actor_oid; neither is accepted in the request body. The billing totals (totalbilled/totalpaid), timestamps (created_at/updated_at) and archived flag are also owned by the server and must not be supplied.

The admission's lifecycle is tracked with two fields: a coarse stage (IN → Recommended Admission, AD → active Admission, DC → Discharged) and a granular status within that stage. When omitted, stage defaults to the active inpatient stage (AD) and status defaults to BED_ASSIGNED.

The admission_date and date fields are optional ISO-8601 date-time strings and default to the server now when omitted. All timestamp fields are returned as ISO-8601 date-time strings.

Not every detail is mandatory: insurance, procedures, notes, medico_legal_case and custom_attributes are all optional.

post/appointments/v1/ipd/admission

Headers

authstring required

Request body

ipidstring required

Patient IPD case number.

pidstring required
docidstring required
facilityidstring required
bedstring required
notesstring
medico_legal_caseboolean
custom_attributesobject

Map of custom attribute keys to arrays of string values.

stage'IN' | 'AD' | 'DC'

Coarse lifecycle stage; defaults to the active inpatient stage (AD).

status'ADMISSION_RECOMMENDED' | 'ADMISSION_ON_HOLD' | 'ADMISSION_CONFIRMED' | 'ADMISSION_CANCELLED' | 'BED_ASSIGNED' | 'UNDER_CARE' | 'NOT_RECEIVED' | 'FIT_FOR_DISCHARGE' | 'DISCHARGE_INITIATED' | 'REFERRAL_INITIATED' | 'LAMA_IN_PROGRESS' | 'DAMA_IN_PROGRESS' | 'DEATH_BEING_RECORDED' | 'PATIENT_MISSING' | 'DISCHARGED' | 'LAMA_COMPLETED' | 'DAMA_COMPLETED' | 'REFERRED' | 'DECEASED' | 'ABSCONDED'

Granular lifecycle status; defaults to BED_ASSIGNED.

admission_datestring

ISO-8601 date-time; defaults to the server now.

datestring

ISO-8601 date-time; defaults to the server now.

Response

Created — the newly created IPD admission.

idstring

Server-generated admission document id.

bidstring

Business id the admission belongs to.

admission_datestring

Admission date-time as an ISO-8601 string.

discharge_datestring

Discharge date-time as an ISO-8601 string. Present once discharged.

ipidstring

Patient IPD case number.

notesstring
medico_legal_caseboolean
stage'IN' | 'AD' | 'DC'

Coarse lifecycle stage of the admission.

status'ADMISSION_RECOMMENDED' | 'ADMISSION_ON_HOLD' | 'ADMISSION_CONFIRMED' | 'ADMISSION_CANCELLED' | 'BED_ASSIGNED' | 'UNDER_CARE' | 'NOT_RECEIVED' | 'FIT_FOR_DISCHARGE' | 'DISCHARGE_INITIATED' | 'REFERRAL_INITIATED' | 'LAMA_IN_PROGRESS' | 'DAMA_IN_PROGRESS' | 'DEATH_BEING_RECORDED' | 'PATIENT_MISSING' | 'DISCHARGED' | 'LAMA_COMPLETED' | 'DAMA_COMPLETED' | 'REFERRED' | 'DECEASED' | 'ABSCONDED'

Granular lifecycle status within the current stage.

bedstring
docidstring
datestring
pidstring
created_atstring

Creation date-time as an ISO-8601 string.

updated_atstring

Last-update date-time as an ISO-8601 string.

facilityidstring
totalbillednumber

Total amount billed for the admission.

totalpaidnumber

Total amount paid against the admission.

totalbilled_updated_atstring
totalpaid_updated_atstring
custom_attributesobject

Map of custom attribute keys to arrays of string values.

archivedboolean
actor_oidstring

oid of the actor that created/last acted on the admission.