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.
Creates the account, signs it in, and sets the session cookie.
| email required | string <email> |
| password required | string [ 8 .. 128 ] characters |
| fullName | string <= 120 characters |
{- "email": "user@example.com",
- "password": "stringst",
- "fullName": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "role": "PATIENT",
- "status": "ACTIVE",
- "displayName": "string",
- "initials": "string",
- "profileComplete": true,
- "approvalState": "PENDING"
}Creates the account and signs it in. The profile starts awaiting administrator approval.
| 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 |
{- "email": "user@example.com",
- "password": "stringst",
- "fullName": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "licenseNumber": "string",
- "yearsExperience": 0,
- "bio": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "role": "PATIENT",
- "status": "ACTIVE",
- "displayName": "string",
- "initials": "string",
- "profileComplete": true,
- "approvalState": "PENDING"
}Sets the session cookie and returns the signed-in account.
| email required | string <email> |
| password required | string non-empty |
{- "email": "user@example.com",
- "password": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "role": "PATIENT",
- "status": "ACTIVE",
- "displayName": "string",
- "initials": "string",
- "profileComplete": true,
- "approvalState": "PENDING"
}Reads the account from the session cookie. Re-read on every request.
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "email": "user@example.com",
- "role": "PATIENT",
- "status": "ACTIVE",
- "displayName": "string",
- "initials": "string",
- "profileComplete": true,
- "approvalState": "PENDING"
}Acts on the caller’s own profile only; the id is taken from the session.
{- "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": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kind": "ALLERGY",
- "description": "string",
- "recordedAt": "2019-08-24T14:15:22Z"
}
]
}| fullName | string <= 120 characters |
| dateOfBirth | string |
| contactNumber | string <= 40 characters |
| weightKg | number [ 1 .. 500 ] |
| heightCm | number [ 20 .. 280 ] |
{- "fullName": "string",
- "dateOfBirth": "string",
- "contactNumber": "string",
- "weightKg": 1,
- "heightCm": 20
}{- "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": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kind": "ALLERGY",
- "description": "string",
- "recordedAt": "2019-08-24T14:15:22Z"
}
]
}An allergy, a current medication, a chronic condition, or a free note.
| kind required | string Enum: "ALLERGY" "MEDICATION" "CONDITION" "NOTE" |
| description required | string [ 2 .. 500 ] characters |
{- "kind": "ALLERGY",
- "description": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kind": "ALLERGY",
- "description": "string",
- "recordedAt": "2019-08-24T14:15:22Z"
}| 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. |
{- "dayOfWeek": 0,
- "startMinute": 0,
- "endMinute": 1
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "dayOfWeek": 0,
- "startMinute": 0,
- "endMinute": 1
}| date required | string ISO date, |
| reason | string <= 200 characters Shown to the doctor only. |
{- "date": "string",
- "reason": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "date": "2019-08-24",
- "reason": "string"
}Includes the fields a public listing omits, such as the license number.
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING",
- "bio": "string",
- "licenseNumber": "string",
- "nextSlots": [
- {
- "startsAt": "2019-08-24T14:15:22Z",
- "endsAt": "2019-08-24T14:15:22Z"
}
], - "rejectionReason": "string"
}| 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 ] |
{- "fullName": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "bio": "string",
- "yearsExperience": 0,
- "licenseNumber": "string",
- "consultationFee": 0
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING",
- "bio": "string",
- "licenseNumber": "string",
- "nextSlots": [
- {
- "startsAt": "2019-08-24T14:15:22Z",
- "endsAt": "2019-08-24T14:15:22Z"
}
], - "rejectionReason": "string"
}Returns approved doctors only. An unapproved doctor is visible to administrators and to themselves, never here.
| 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. |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING"
}
]| id required | string The doctor profile id, not the user id. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING",
- "bio": "string",
- "licenseNumber": "string",
- "nextSlots": [
- {
- "startsAt": "2019-08-24T14:15:22Z",
- "endsAt": "2019-08-24T14:15:22Z"
}
], - "rejectionReason": "string"
}Derived from the doctor’s windows and exceptions. A doctor whose approval is not yet granted returns 404 from the lookup behind this route.
| id required | string The doctor profile id, not the user id. |
[- {
- "startsAt": "2019-08-24T14:15:22Z",
- "endsAt": "2019-08-24T14:15:22Z"
}
]Scoped to the caller: a patient sees their own, a doctor the ones booked with them.
| scope | string Enum: "upcoming" "past" "all" Defaults to |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}
]The requested slot must be one the doctor currently offers.
| doctorId required | string |
| startsAt required | string |
| reasonForVisit required | string [ 3 .. 500 ] characters |
{- "doctorId": "string",
- "startsAt": "string",
- "reasonForVisit": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}Refused unless the caller is one of the two participants.
| id required | string The appointment id. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}Only the patient may move an appointment, and only before it starts.
| id required | string The appointment id. |
| startsAt required | string |
{- "startsAt": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}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.
| id required | string The appointment id. |
| reason | string <= 500 characters |
{- "reason": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}Every route here is scoped to an appointment the caller is a participant in. The clinical context is returned to the doctor only.
| appointmentId required | string The appointment the consultation belongs to. |
{- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "sessionState": "SCHEDULED",
- "patientJoinedAt": "2019-08-24T14:15:22Z",
- "doctorJoinedAt": "2019-08-24T14:15:22Z",
- "joinable": true,
- "messages": [
- {
- "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"
}
], - "clinicalContext": {
- "age": 0,
- "allergies": [
- "string"
], - "medications": [
- "string"
], - "conditions": [
- "string"
]
}
}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.
| appointmentId required | string The appointment the consultation belongs to. |
{- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "sessionState": "SCHEDULED",
- "patientJoinedAt": "2019-08-24T14:15:22Z",
- "doctorJoinedAt": "2019-08-24T14:15:22Z",
- "joinable": true,
- "messages": [
- {
- "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"
}
], - "clinicalContext": {
- "age": 0,
- "allergies": [
- "string"
], - "medications": [
- "string"
], - "conditions": [
- "string"
]
}
}The doctor ends the session. A patient cannot close a consultation, and a doctor who did not take part cannot either.
| appointmentId required | string The appointment the consultation belongs to. |
{- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "sessionState": "SCHEDULED",
- "patientJoinedAt": "2019-08-24T14:15:22Z",
- "doctorJoinedAt": "2019-08-24T14:15:22Z",
- "joinable": true,
- "messages": [
- {
- "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"
}
], - "clinicalContext": {
- "age": 0,
- "allergies": [
- "string"
], - "medications": [
- "string"
], - "conditions": [
- "string"
]
}
}Both participants may write. Messages are retained with the record.
| appointmentId required | string The appointment the consultation belongs to. |
| body required | string [ 1 .. 2000 ] characters |
{- "body": "string"
}{- "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"
}Every consultation the caller attended, with its note, prescriptions and summary.
[- {
- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "note": {
- "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"
}, - "prescriptions": [
- {
- "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"
}
], - "summary": {
- "summary": "string",
- "model": "string",
- "generatedAt": "2019-08-24T14:15:22Z"
}
}
]Refused unless the calling doctor is a participant in one of that patient’s consultations.
| patientId required | string The patient profile id, not the user id. |
[- {
- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "note": {
- "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"
}, - "prescriptions": [
- {
- "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"
}
], - "summary": {
- "summary": "string",
- "model": "string",
- "generatedAt": "2019-08-24T14:15:22Z"
}
}
]Both participants may read it. The summary is withheld while it is stale.
| appointmentId required | string The appointment the record entry belongs to. |
{- "appointment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}, - "note": {
- "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"
}, - "prescriptions": [
- {
- "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"
}
], - "summary": {
- "summary": "string",
- "model": "string",
- "generatedAt": "2019-08-24T14:15:22Z"
}
}Null when none has been generated, so reloading the form costs nothing.
| appointmentId required | string The appointment the draft belongs to. |
{- "findings": "string",
- "diagnosis": "string",
- "recommendations": "string",
- "followUp": "string",
- "extractionCandidates": [
- {
- "medication": "string",
- "dosage": "string",
- "frequency": "string",
- "durationDays": 0,
- "instructions": "string",
- "sourceMessageId": "d8d89b28-2149-44de-ac51-ce0b86865800",
- "excerpt": "string"
}
], - "model": "string",
- "generatedAt": "2019-08-24T14:15:22Z"
}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.
| appointmentId required | string The appointment to draft from. |
{- "status": "drafted",
- "draft": {
- "findings": "string",
- "diagnosis": "string",
- "recommendations": "string",
- "followUp": "string",
- "extractionCandidates": [
- {
- "medication": "string",
- "dosage": "string",
- "frequency": "string",
- "durationDays": 0,
- "instructions": "string",
- "sourceMessageId": "d8d89b28-2149-44de-ac51-ce0b86865800",
- "excerpt": "string"
}
], - "model": "string",
- "generatedAt": "2019-08-24T14:15:22Z"
}
}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.
| appointmentId required | string The appointment being written up. |
| 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. |
{- "findings": "string",
- "diagnosis": "string",
- "recommendations": "string",
- "followUp": "string",
- "aiAssisted": true
}{- "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"
}Only a doctor who took part in the consultation may prescribe. Prescriptions are retained, never deleted.
| appointmentId required | string The appointment being prescribed for. |
| 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 |
{- "medication": "string",
- "dosage": "string",
- "frequency": "string",
- "durationDays": 1,
- "instructions": "string"
}{- "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"
}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.
| 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" |
{- "symptomIds": [
- "string"
], - "freeText": "string",
- "durationDays": 0,
- "severity": "MILD"
}{- "suggestions": [
- {
- "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING"
}, - "score": 0,
- "matchedSpecialization": "GENERAL_PRACTICE",
- "reason": "string"
}
], - "fallback": true,
- "fallbackReason": "string",
- "emergencyWarning": true
}Reads leave no audit entry: the log records changes, not lookups.
| q | string <= 120 characters |
| role | string Enum: "PATIENT" "DOCTOR" "ADMIN" |
[- {
- "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"
}
]| id required | string The account to activate. |
{- "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"
}Takes effect on the account’s next request, not when its token expires.
| id required | string The account to suspend. |
| reason required | string [ 3 .. 500 ] characters Mandatory: the admin-console spec rejects a reasonless suspension. |
{- "reason": "string"
}{- "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"
}| id required | string The account to deactivate. |
| reason required | string [ 3 .. 500 ] characters Mandatory: the admin-console spec rejects a reasonless suspension. |
{- "reason": "string"
}{- "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"
}Applications awaiting a decision, oldest first.
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
], - "yearsExperience": 0,
- "consultationFee": 0,
- "bioExcerpt": "string",
- "hasUpcomingAvailability": true,
- "approvalState": "PENDING",
- "bio": "string",
- "licenseNumber": "string",
- "nextSlots": [
- {
- "startsAt": "2019-08-24T14:15:22Z",
- "endsAt": "2019-08-24T14:15:22Z"
}
], - "rejectionReason": "string"
}
]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.
| id required | string The doctor profile to reject. |
| reason required | string [ 3 .. 500 ] characters |
{- "reason": "string"
}The only way the list changes once submitted: doctors may not invent a specialization, so an administrator corrects it.
| id required | string The doctor profile to correct. |
| 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 |
{- "specializations": [
- "GENERAL_PRACTICE"
], - "reason": "string"
}| state | string Enum: "SCHEDULED" "COMPLETED" "CANCELLED" |
| from | string |
| to | string |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}
]Recorded as cancelled by ADMIN, with the reason kept.
| id required | string The appointment to cancel. |
| reason | string <= 500 characters |
{- "reason": "string"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "patient": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string"
}, - "doctor": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fullName": "string",
- "initials": "string",
- "specializations": [
- "GENERAL_PRACTICE"
]
}, - "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
}Only actions that changed something appear here.
| 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" |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "actorId": "d2f1b55c-8cee-4a0d-af57-aebaeff77518",
- "actorName": "string",
- "actorEmail": "user@example.com",
- "action": "ACCOUNT_ACTIVATED",
- "targetType": "string",
- "targetId": "cbca1126-180e-4334-9df8-cf82289d378b",
- "reason": "string",
- "createdAt": "2019-08-24T14:15:22Z"
}
]Scoped to the caller. No role restriction: every account has a notification list.
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "APPOINTMENT_BOOKED",
- "title": "string",
- "body": "string",
- "link": "string",
- "readAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
]The reminders shown on the dashboard, derived rather than stored.
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "APPOINTMENT_BOOKED",
- "title": "string",
- "body": "string",
- "link": "string",
- "readAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z"
}
]