Skip to main content

reMEDyo API (0.1.0)

Download OpenAPI specification:Download

The HTTP interface of reMEDyo, a fictional telehealth prototype.

Every route requires an authenticated session unless it is marked otherwise, because authentication is applied globally and opted out of per route. Routes restricted to a role carry that restriction in x-roles.

This document is generated from the running application, not written by hand.

auth

Register a patient

Creates the account, signs it in, and sets the session cookie.

Request Body schema: application/json
required
email
required
string <email>
password
required
string [ 8 .. 128 ] characters
fullName
string <= 120 characters

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "stringst",
  • "fullName": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "displayName": "string",
  • "initials": "string",
  • "profileComplete": true,
  • "approvalState": "PENDING"
}

Register a doctor

Creates the account and signs it in. The profile starts awaiting administrator approval.

Request Body schema: application/json
required
email
required
string <email>
password
required
string [ 8 .. 128 ] characters
fullName
required
string [ 2 .. 120 ] characters
specializations
required
Array of strings non-empty
Items Enum: "GENERAL_PRACTICE" "CARDIOLOGY" "DERMATOLOGY" "PEDIATRICS" "PSYCHIATRY" "ORTHOPEDICS" "NEUROLOGY" "GASTROENTEROLOGY" "OBSTETRICS_GYNECOLOGY" "ENDOCRINOLOGY" "OPHTHALMOLOGY" "PULMONOLOGY" "ENT"
licenseNumber
required
string [ 3 .. 60 ] characters
yearsExperience
number >= 0
bio
string <= 2000 characters

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "stringst",
  • "fullName": "string",
  • "specializations": [
    ],
  • "licenseNumber": "string",
  • "yearsExperience": 0,
  • "bio": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "displayName": "string",
  • "initials": "string",
  • "profileComplete": true,
  • "approvalState": "PENDING"
}

Sign in

Sets the session cookie and returns the signed-in account.

Request Body schema: application/json
required
email
required
string <email>
password
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "displayName": "string",
  • "initials": "string",
  • "profileComplete": true,
  • "approvalState": "PENDING"
}

Sign out

Clears the session cookie. Succeeds whether or not a session was present.

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "ok": true
}

The signed-in account

Reads the account from the session cookie. Re-read on every request.

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "displayName": "string",
  • "initials": "string",
  • "profileComplete": true,
  • "approvalState": "PENDING"
}

users

Read the calling patient’s profile

Acts on the caller’s own profile only; the id is taken from the session.

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "fullName": "string",
  • "dateOfBirth": "2019-08-24",
  • "age": 0,
  • "contactNumber": "string",
  • "weightKg": 0,
  • "heightCm": 0,
  • "initials": "string",
  • "history": [
    ]
}

Update the calling patient’s profile

Authorizations:
session
Request Body schema: application/json
required
fullName
string <= 120 characters
dateOfBirth
string
contactNumber
string <= 40 characters
weightKg
number [ 1 .. 500 ]
heightCm
number [ 20 .. 280 ]

Responses

Request samples

Content type
application/json
{
  • "fullName": "string",
  • "dateOfBirth": "string",
  • "contactNumber": "string",
  • "weightKg": 1,
  • "heightCm": 20
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "fullName": "string",
  • "dateOfBirth": "2019-08-24",
  • "age": 0,
  • "contactNumber": "string",
  • "weightKg": 0,
  • "heightCm": 0,
  • "initials": "string",
  • "history": [
    ]
}

Add a medical history entry

An allergy, a current medication, a chronic condition, or a free note.

Authorizations:
session
Request Body schema: application/json
required
kind
required
string
Enum: "ALLERGY" "MEDICATION" "CONDITION" "NOTE"
description
required
string [ 2 .. 500 ] characters

Responses

Request samples

Content type
application/json
{
  • "kind": "ALLERGY",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "kind": "ALLERGY",
  • "description": "string",
  • "recordedAt": "2019-08-24T14:15:22Z"
}

Remove a medical history entry

Authorizations:
session
path Parameters
id
required
string

The history entry to remove.

Responses

availability

List the doctor's weekly windows

Every route here acts on the calling doctor's own schedule.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a weekly window

Authorizations:
session
Request Body schema: application/json
required
dayOfWeek
required
number [ 0 .. 6 ]

0 = Sunday .. 6 = Saturday.

startMinute
required
number [ 0 .. 1439 ]

Minutes from midnight, local to the doctor.

endMinute
required
number [ 1 .. 1440 ]

Minutes from midnight, local to the doctor. Must be after startMinute.

Responses

Request samples

Content type
application/json
{
  • "dayOfWeek": 0,
  • "startMinute": 0,
  • "endMinute": 1
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "dayOfWeek": 0,
  • "startMinute": 0,
  • "endMinute": 1
}

Remove a weekly window

Authorizations:
session
path Parameters
id
required
string

The window to remove.

Responses

List dated exceptions

Dates that override the weekly windows entirely.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark a date unavailable

Authorizations:
session
Request Body schema: application/json
required
date
required
string

ISO date, YYYY-MM-DD.

reason
string <= 200 characters

Shown to the doctor only.

Responses

Request samples

Content type
application/json
{
  • "date": "string",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "date": "2019-08-24",
  • "reason": "string"
}

Remove a dated exception

Authorizations:
session
path Parameters
id
required
string

The exception to remove.

Responses

The doctor's own offerable slots

Derived from windows and exceptions, for previewing the schedule.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

doctors

The calling doctor’s own profile

Includes the fields a public listing omits, such as the license number.

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "fullName": "string",
  • "initials": "string",
  • "specializations": [
    ],
  • "yearsExperience": 0,
  • "consultationFee": 0,
  • "bioExcerpt": "string",
  • "hasUpcomingAvailability": true,
  • "approvalState": "PENDING",
  • "bio": "string",
  • "licenseNumber": "string",
  • "nextSlots": [
    ],
  • "rejectionReason": "string"
}

Update the calling doctor’s profile

Authorizations:
session
Request Body schema: application/json
required
fullName
string [ 2 .. 120 ] characters
specializations
Array of strings non-empty
Items Enum: "GENERAL_PRACTICE" "CARDIOLOGY" "DERMATOLOGY" "PEDIATRICS" "PSYCHIATRY" "ORTHOPEDICS" "NEUROLOGY" "GASTROENTEROLOGY" "OBSTETRICS_GYNECOLOGY" "ENDOCRINOLOGY" "OPHTHALMOLOGY" "PULMONOLOGY" "ENT"
bio
string <= 2000 characters
yearsExperience
number [ 0 .. 70 ]
licenseNumber
string <= 60 characters
consultationFee
number [ 0 .. 1000000 ]

Responses

Request samples

Content type
application/json
{
  • "fullName": "string",
  • "specializations": [
    ],
  • "bio": "string",
  • "yearsExperience": 0,
  • "licenseNumber": "string",
  • "consultationFee": 0
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "fullName": "string",
  • "initials": "string",
  • "specializations": [
    ],
  • "yearsExperience": 0,
  • "consultationFee": 0,
  • "bioExcerpt": "string",
  • "hasUpcomingAvailability": true,
  • "approvalState": "PENDING",
  • "bio": "string",
  • "licenseNumber": "string",
  • "nextSlots": [
    ],
  • "rejectionReason": "string"
}

Search the doctor directory

Returns approved doctors only. An unapproved doctor is visible to administrators and to themselves, never here.

Authorizations:
session
query Parameters
q
string <= 120 characters

Free text matched against name and specialization.

specialization
string
Enum: "GENERAL_PRACTICE" "CARDIOLOGY" "DERMATOLOGY" "PEDIATRICS" "PSYCHIATRY" "ORTHOPEDICS" "NEUROLOGY" "GASTROENTEROLOGY" "OBSTETRICS_GYNECOLOGY" "ENDOCRINOLOGY" "OPHTHALMOLOGY" "PULMONOLOGY" "ENT"
availableSoon
boolean

Restrict to doctors with a slot inside the "soon" horizon.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Read one doctor

Authorizations:
session
path Parameters
id
required
string

The doctor profile id, not the user id.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  • "fullName": "string",
  • "initials": "string",
  • "specializations": [
    ],
  • "yearsExperience": 0,
  • "consultationFee": 0,
  • "bioExcerpt": "string",
  • "hasUpcomingAvailability": true,
  • "approvalState": "PENDING",
  • "bio": "string",
  • "licenseNumber": "string",
  • "nextSlots": [
    ],
  • "rejectionReason": "string"
}

Offerable slots for a doctor

Derived from the doctor’s windows and exceptions. A doctor whose approval is not yet granted returns 404 from the lookup behind this route.

Authorizations:
session
path Parameters
id
required
string

The doctor profile id, not the user id.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

appointments

List the calling account’s appointments

Scoped to the caller: a patient sees their own, a doctor the ones booked with them.

Authorizations:
session
query Parameters
scope
string
Enum: "upcoming" "past" "all"

Defaults to all.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Book an appointment

The requested slot must be one the doctor currently offers.

Authorizations:
session
Request Body schema: application/json
required
doctorId
required
string
startsAt
required
string
reasonForVisit
required
string [ 3 .. 500 ] characters

Responses

Request samples

Content type
application/json
{
  • "doctorId": "string",
  • "startsAt": "string",
  • "reasonForVisit": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "patient": {
    },
  • "doctor": {
    },
  • "startsAt": "2019-08-24T14:15:22Z",
  • "endsAt": "2019-08-24T14:15:22Z",
  • "state": "SCHEDULED",
  • "sessionState": "SCHEDULED",
  • "reasonForVisit": "string",
  • "cancelledBy": "PATIENT",
  • "cancellationReason": "string",
  • "missed": true,
  • "hasNote": true,
  • "prescriptionCount": 0
}

Read one appointment

Refused unless the caller is one of the two participants.

Authorizations:
session
path Parameters
id
required
string

The appointment id.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "patient": {
    },
  • "doctor": {
    },
  • "startsAt": "2019-08-24T14:15:22Z",
  • "endsAt": "2019-08-24T14:15:22Z",
  • "state": "SCHEDULED",
  • "sessionState": "SCHEDULED",
  • "reasonForVisit": "string",
  • "cancelledBy": "PATIENT",
  • "cancellationReason": "string",
  • "missed": true,
  • "hasNote": true,
  • "prescriptionCount": 0
}

Reschedule an appointment

Only the patient may move an appointment, and only before it starts.

Authorizations:
session
path Parameters
id
required
string

The appointment id.

Request Body schema: application/json
required
startsAt
required
string

Responses

Request samples

Content type
application/json
{
  • "startsAt": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "patient": {
    },
  • "doctor": {
    },
  • "startsAt": "2019-08-24T14:15:22Z",
  • "endsAt": "2019-08-24T14:15:22Z",
  • "state": "SCHEDULED",
  • "sessionState": "SCHEDULED",
  • "reasonForVisit": "string",
  • "cancelledBy": "PATIENT",
  • "cancellationReason": "string",
  • "missed": true,
  • "hasNote": true,
  • "prescriptionCount": 0
}

Cancel an appointment

Either participant may cancel. Refused once the consultation is completed or already cancelled. There is no time restriction — an appointment whose start has passed can still be cancelled.

Authorizations:
session
path Parameters
id
required
string

The appointment id.

Request Body schema: application/json
required
reason
string <= 500 characters

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "patient": {
    },
  • "doctor": {
    },
  • "startsAt": "2019-08-24T14:15:22Z",
  • "endsAt": "2019-08-24T14:15:22Z",
  • "state": "SCHEDULED",
  • "sessionState": "SCHEDULED",
  • "reasonForVisit": "string",
  • "cancelledBy": "PATIENT",
  • "cancellationReason": "string",
  • "missed": true,
  • "hasNote": true,
  • "prescriptionCount": 0
}

consultations

The state of a consultation

Every route here is scoped to an appointment the caller is a participant in. The clinical context is returned to the doctor only.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the consultation belongs to.

Responses

Response samples

Content type
application/json
{
  • "appointment": {
    },
  • "sessionState": "SCHEDULED",
  • "patientJoinedAt": "2019-08-24T14:15:22Z",
  • "doctorJoinedAt": "2019-08-24T14:15:22Z",
  • "joinable": true,
  • "messages": [
    ],
  • "clinicalContext": {
    }
}

Join the consultation

Records the caller’s arrival. Whether joining is allowed is decided by the appointment’s state, not by the clock: a participant who is early or late still belongs in this room. Refused once the consultation has completed or the appointment was cancelled.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the consultation belongs to.

Responses

Response samples

Content type
application/json
{
  • "appointment": {
    },
  • "sessionState": "SCHEDULED",
  • "patientJoinedAt": "2019-08-24T14:15:22Z",
  • "doctorJoinedAt": "2019-08-24T14:15:22Z",
  • "joinable": true,
  • "messages": [
    ],
  • "clinicalContext": {
    }
}

Complete the consultation

The doctor ends the session. A patient cannot close a consultation, and a doctor who did not take part cannot either.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the consultation belongs to.

Responses

Response samples

Content type
application/json
{
  • "appointment": {
    },
  • "sessionState": "SCHEDULED",
  • "patientJoinedAt": "2019-08-24T14:15:22Z",
  • "doctorJoinedAt": "2019-08-24T14:15:22Z",
  • "joinable": true,
  • "messages": [
    ],
  • "clinicalContext": {
    }
}

Post a message

Both participants may write. Messages are retained with the record.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the consultation belongs to.

Request Body schema: application/json
required
body
required
string [ 1 .. 2000 ] characters

Responses

Request samples

Content type
application/json
{
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "appointmentId": "24c6adb3-18be-4108-aa61-3d58879e05a2",
  • "senderId": "6b2f63ba-164c-48c9-87b1-690cee2b3da3",
  • "senderName": "string",
  • "body": "string",
  • "sentAt": "2019-08-24T14:15:22Z"
}

records

The calling patient’s own record

Every consultation the caller attended, with its note, prescriptions and summary.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

A patient’s record, as a doctor sees it

Refused unless the calling doctor is a participant in one of that patient’s consultations.

Authorizations:
session
path Parameters
patientId
required
string

The patient profile id, not the user id.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

The record entry for one appointment

Both participants may read it. The summary is withheld while it is stale.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the record entry belongs to.

Responses

Response samples

Content type
application/json
{
  • "appointment": {
    },
  • "note": {
    },
  • "prescriptions": [
    ],
  • "summary": {
    }
}

Whether clinical assist is available

Authenticated on purpose: the answer says something about this deployment’s configuration, so it is not public.

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "enabled": true,
  • "model": "string"
}

The draft already generated for an appointment

Null when none has been generated, so reloading the form costs nothing.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment the draft belongs to.

Responses

Response samples

Content type
application/json
Example
{
  • "findings": "string",
  • "diagnosis": "string",
  • "recommendations": "string",
  • "followUp": "string",
  • "extractionCandidates": [
    ],
  • "model": "string",
  • "generatedAt": "2019-08-24T14:15:22Z"
}

Generate a note draft from the transcript

Generated scaffolding, not the record: it pre-fills the form and nothing else, and the doctor’s own save remains the only writer. A refusal — a transcript too thin to draft from, or assistance unavailable — is a 201 carrying status: "refused", not an error.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment to draft from.

Responses

Response samples

Content type
application/json
Example
{
  • "status": "drafted",
  • "draft": {
    }
}

Sign or revise the consultation note

Only a doctor who took part in the consultation may write the note. Saving again revises it: notes are never deleted, and an earlier version is superseded rather than removed.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment being written up.

Request Body schema: application/json
required
findings
required
string [ 3 .. 4000 ] characters
diagnosis
required
string [ 3 .. 2000 ] characters
recommendations
required
string [ 3 .. 4000 ] characters
followUp
string <= 1000 characters
aiAssisted
boolean

Whether the doctor started from a generated draft.

Declared by the authoring interface, because only the form knows: the presence of a draft row does not tell you the doctor used it. A provenance marker, not an integrity control — see design.md D7.

Responses

Request samples

Content type
application/json
{
  • "findings": "string",
  • "diagnosis": "string",
  • "recommendations": "string",
  • "followUp": "string",
  • "aiAssisted": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "appointmentId": "24c6adb3-18be-4108-aa61-3d58879e05a2",
  • "findings": "string",
  • "diagnosis": "string",
  • "recommendations": "string",
  • "followUp": "string",
  • "authorName": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Add a prescription

Only a doctor who took part in the consultation may prescribe. Prescriptions are retained, never deleted.

Authorizations:
session
path Parameters
appointmentId
required
string

The appointment being prescribed for.

Request Body schema: application/json
required
medication
required
string [ 2 .. 200 ] characters
dosage
required
string [ 1 .. 100 ] characters
frequency
required
string [ 1 .. 200 ] characters
durationDays
required
number [ 1 .. 365 ]
instructions
string <= 1000 characters

Responses

Request samples

Content type
application/json
{
  • "medication": "string",
  • "dosage": "string",
  • "frequency": "string",
  • "durationDays": 1,
  • "instructions": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "appointmentId": "24c6adb3-18be-4108-aa61-3d58879e05a2",
  • "medication": "string",
  • "dosage": "string",
  • "frequency": "string",
  • "durationDays": 0,
  • "instructions": "string",
  • "prescriberName": "string",
  • "issuedAt": "2019-08-24T14:15:22Z"
}

matching

The symptom catalogue

The options the intake form offers, including which ones are emergency indicators.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Matching doctors for a described concern

Deterministic: the same intake always produces the same result, so a patient who retries does not get a different answer. A rule that matches nothing falls back rather than returning an empty list.

Authorizations:
session
Request Body schema: application/json
required
symptomIds
Array of strings <= 20 items

Identifiers from the symptom catalogue.

freeText
string <= 1000 characters

The patient's own words, matched against the same rules as the identifiers.

durationDays
number [ 0 .. 3650 ]
severity
string
Enum: "MILD" "MODERATE" "SEVERE"

Responses

Request samples

Content type
application/json
{
  • "symptomIds": [
    ],
  • "freeText": "string",
  • "durationDays": 0,
  • "severity": "MILD"
}

Response samples

Content type
application/json
{
  • "suggestions": [
    ],
  • "fallback": true,
  • "fallbackReason": "string",
  • "emergencyWarning": true
}

admin

List accounts

Reads leave no audit entry: the log records changes, not lookups.

Authorizations:
session
query Parameters
q
string <= 120 characters
role
string
Enum: "PATIENT" "DOCTOR" "ADMIN"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Activate an account

Authorizations:
session
path Parameters
id
required
string

The account to activate.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "fullName": "string",
  • "initials": "string",
  • "statusReason": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "approvalState": "PENDING"
}

Suspend an account

Takes effect on the account’s next request, not when its token expires.

Authorizations:
session
path Parameters
id
required
string

The account to suspend.

Request Body schema: application/json
required
reason
required
string [ 3 .. 500 ] characters

Mandatory: the admin-console spec rejects a reasonless suspension.

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "fullName": "string",
  • "initials": "string",
  • "statusReason": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "approvalState": "PENDING"
}

Deactivate an account

Authorizations:
session
path Parameters
id
required
string

The account to deactivate.

Request Body schema: application/json
required
reason
required
string [ 3 .. 500 ] characters

Mandatory: the admin-console spec rejects a reasonless suspension.

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "email": "user@example.com",
  • "role": "PATIENT",
  • "status": "ACTIVE",
  • "fullName": "string",
  • "initials": "string",
  • "statusReason": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "approvalState": "PENDING"
}

The doctor approval queue

Applications awaiting a decision, oldest first.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Approve a doctor

Until this happens the doctor is absent from the public directory and cannot be booked.

Authorizations:
session
path Parameters
id
required
string

The doctor profile to approve.

Responses

Reject a doctor

The stated reason is shown to the doctor on their own profile. A rejection is not revisited by the review queue: the profile stays rejected unless an administrator later approves it.

Authorizations:
session
path Parameters
id
required
string

The doctor profile to reject.

Request Body schema: application/json
required
reason
required
string [ 3 .. 500 ] characters

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Correct a doctor’s specializations

The only way the list changes once submitted: doctors may not invent a specialization, so an administrator corrects it.

Authorizations:
session
path Parameters
id
required
string

The doctor profile to correct.

Request Body schema: application/json
required
specializations
required
Array of strings non-empty
Items Enum: "GENERAL_PRACTICE" "CARDIOLOGY" "DERMATOLOGY" "PEDIATRICS" "PSYCHIATRY" "ORTHOPEDICS" "NEUROLOGY" "GASTROENTEROLOGY" "OBSTETRICS_GYNECOLOGY" "ENDOCRINOLOGY" "OPHTHALMOLOGY" "PULMONOLOGY" "ENT"
reason
string <= 500 characters

Responses

Request samples

Content type
application/json
{
  • "specializations": [
    ],
  • "reason": "string"
}

List appointments across all accounts

Authorizations:
session
query Parameters
state
string
Enum: "SCHEDULED" "COMPLETED" "CANCELLED"
from
string
to
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Cancel an appointment as an administrator

Recorded as cancelled by ADMIN, with the reason kept.

Authorizations:
session
path Parameters
id
required
string

The appointment to cancel.

Request Body schema: application/json
required
reason
string <= 500 characters

Responses

Request samples

Content type
application/json
{
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "patient": {
    },
  • "doctor": {
    },
  • "startsAt": "2019-08-24T14:15:22Z",
  • "endsAt": "2019-08-24T14:15:22Z",
  • "state": "SCHEDULED",
  • "sessionState": "SCHEDULED",
  • "reasonForVisit": "string",
  • "cancelledBy": "PATIENT",
  • "cancellationReason": "string",
  • "missed": true,
  • "hasNote": true,
  • "prescriptionCount": 0
}

Dashboard counts

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "patients": 0,
  • "doctors": 0,
  • "doctorsPendingReview": 0,
  • "appointmentsByState": {
    },
  • "consultationsCompleted": 0
}

The audit log

Only actions that changed something appear here.

Authorizations:
session
query Parameters
actorId
string
action
string
Enum: "APPOINTMENT_CANCELLED" "DOCTOR_APPROVED" "DOCTOR_REJECTED" "ACCOUNT_ACTIVATED" "ACCOUNT_SUSPENDED" "ACCOUNT_DEACTIVATED" "DOCTOR_SPECIALIZATION_UPDATED" "NOTE_DRAFT_GENERATED" "RECORD_SUMMARY_GENERATED"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

notifications

List the calling account’s notifications

Scoped to the caller. No role restriction: every account has a notification list.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

The unread badge count

Authorizations:
session

Responses

Response samples

Content type
application/json
{
  • "unread": 0
}

Upcoming appointment reminders

The reminders shown on the dashboard, derived rather than stored.

Authorizations:
session

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Mark one notification read

Authorizations:
session
path Parameters
id
required
string

The notification to mark.

Responses

Mark every notification read

Authorizations:
session

Responses

health

Liveness and database reachability

Public by design. Consumed by the compose healthcheck and by Fly.io, neither of which holds a session.

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "database": "up"
}