Create a patient

POST /patients

Body

Object containing the patient details

  • patientNumber null | string

    The identifier used by the hospital staff to correlate patients with their data.

    Minimum length is 1.

  • age integer | null

    The number of years that have passed since the patient's date of birth.

    Minimum value is 0.

  • name string | null

    All the name parts, i.e. first name, middle name, and last name.

    Minimum length is 1.

  • gender null | string

    Values are MALE, FEMALE, or OTHER.

  • patientCategory string | null

    Values are GENERAL, INPATIENT, or OUTPATIENT.

  • phoneNumber string | null

    Patient phone number

    Minimum length is 1.

  • residentialAddress string | null

    Patient residential address

    Minimum length is 1.

Responses

  • Created

    Hide response attributes Show response attributes object
    • _id string(uuid) Required

      Technical identifier of the patient

    • patientNumber string | null

      The identifier used by the hospital staff to correlate patients with their data.

      Minimum length is 1.

    • age integer | null

      The number of years that have passed since the patient's date of birth.

      Minimum value is 0.

    • name string | null

      All the name parts, i.e. first name, middle name, and last name.

      Minimum length is 1.

    • gender string | null

      Values are MALE, FEMALE, or OTHER.

    • patientCategory string | null

      Values are GENERAL, INPATIENT, or OUTPATIENT.

    • phoneNumber null | string

      Patient phone number

      Minimum length is 1.

    • residentialAddress string | null

      Patient residential address

      Minimum length is 1.

POST /patients
curl \
 -X POST https://example.com/api/patients \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"John Doe","gender":"MALE","patientCategory":"GENERAL","phoneNumber":"01234567890","residentialAddress":"Guesthouse"}'
Request examples
{
  "name": "John Doe",
  "gender": "MALE",
  "patientCategory": "GENERAL",
  "phoneNumber": "01234567890",
  "residentialAddress": "Guesthouse"
}
{
  "summary": "Empty details",
  "value": {}
}
Request examples
{
  "patientNumber": "23-72362",
  "age": 23,
  "name": "John Doe",
  "gender": "MALE",
  "patientCategory": "GENERAL",
  "phoneNumber": "+1234567890",
  "residentialAddress": "Guesthouse"
}
Response examples (200)
{
  "_id": "string",
  "patientNumber": "23-72362",
  "age": 23,
  "name": "John Doe",
  "gender": "MALE",
  "patientCategory": "GENERAL",
  "phoneNumber": "+1234567890",
  "residentialAddress": "Guesthouse"
}
Response examples (200)
{
  "_id": "string",
  "patientNumber": "23-72362",
  "age": 23,
  "name": "John Doe",
  "gender": "MALE",
  "patientCategory": "GENERAL",
  "phoneNumber": "+1234567890",
  "residentialAddress": "Guesthouse"
}