Mediquo documentation home

Models

Domain types returned by the Mediquo API.

All models are inferred from Zod schemas. Imports are per-model:

import type { Appointment } from "@mediquo/core/models/appointment";
import type { Document } from "@mediquo/core/models/document";
import type { Professional } from "@mediquo/core/models/professional";
import type { PatientProfile } from "@mediquo/core/models/patient-profile";
import type { ScheduleSlot } from "@mediquo/core/models/schedule-slot";
import type { Gap } from "@mediquo/core/models/gap";

Appointment

import type {
  Appointment,
  AppointmentStatus,
  AppointmentChannel,
  ConsultationType,
} from "@mediquo/core/models/appointment";

AppointmentStatus

ValueDescription
"pending"Created, awaiting professional acceptance
"accepted"Accepted, not yet started
"inCall"Active call in progress
"finished"Completed successfully
"cancelled"Cancelled by patient or professional
"declined"Declined by professional
"expired"Not answered within the time window
"free_of_charge"Completed without charge
"owed"Payment required after completion
"unpaid"Payment pending
"reporting"Professional is filing post-consultation report

AppointmentChannel

ValueDescription
"videocall"Video consultation
"chat"Async chat
"phonecall"Phone call

ConsultationType

ValueDescription
"appointment"Scheduled appointment
"chat"Chat-only consultation
"immediate"On-demand (flash) appointment

Appointment fields

FieldTypeDescription
idstring (UUID)Unique appointment identifier
room_idstringAssociated chat room ID
channelAppointmentChannelCommunication channel
statusAppointmentStatusCurrent lifecycle state
start_datestringScheduled start (ISO 8601)
started_atstring | nullActual start time
expires_atstring | nullExpiry time for pending appointments
created_atstringCreation timestamp
durationnumberDuration in minutes
seconds_to_opennumberSeconds until the appointment opens (non-negative)
consultation_reasonstring | nullPatient-provided reason
service_idstring | nullUUID of the associated service
speciality_idnumber | nullMedical specialty ID
call_idstringVideo call URL
consultation_short_urlstring | nullShort URL for the consultation
fromobjectProfessional details (see below)
toobjectPatient details (see below)
preconsultation_documentsArray<{ file_path, file_name, id }> | nullAttached pre-consultation files

from (professional)

FieldType
hashstring
namestring | null
avatarstring | null
specialitystring | null
collegiate_numberstring | null
languagesstring[]
descriptionstring | null
is_dismissedboolean

to (patient)

FieldType
idstring
hashstring
namestring | null
avatarstring | null
is_dismissedboolean

Document

import type {
  Document,
  DocumentType,
  DocumentStatus,
} from "@mediquo/core/models/document";

DocumentType

ValueDescription
"prescription"Medication prescription
"report"Clinical report
"diagnosticTestPrescription"Diagnostic test order

DocumentStatus

ValueDescription
"published"Visible to the patient
"draft"Not yet published

Document fields

FieldTypeDescription
document_idstring (UUID)Unique document identifier
document_typeDocumentTypeCategory of the document
namestringDocument display name
statusDocumentStatusPublication state
urlstringDownload URL
created_atstringCreation timestamp
professional{ speciality_id: number }Issuing professional's specialty

Professional

import type { Professional } from "@mediquo/core/models/professional";
FieldTypeDescription
idstringUnique professional identifier
namestringFull name
avatarstring | nullAvatar image URL
descriptionstring | nullBio or professional summary
collegiate_numberstring | nullMedical license number
languagesstring[]Spoken languages
speciality{ id: number }Primary medical specialty

PatientProfile

import type { PatientProfile } from "@mediquo/core/models/patient-profile";
FieldTypeDescription
hashstringUnique patient identifier
profile.first_namestring | nullFirst name
profile.last_namestring | nullLast name
profile.birth_datestring | nullDate of birth
profile.gender"male" | "female" | nullGender
profile.emailstring | nullEmail address
profile.phone_prefixstring | nullPhone country prefix
profile.phonestring | nullPhone number
profile.billing.tax_idstring | nullTax / VAT identifier
profile.billing.addressstring | nullBilling address
profile.billing.country_codestring | nullISO country code
profile.billing.regionstring | nullRegion or state
profile.billing.postal_codestring | nullPostal code

ScheduleSlot

import type {
  ScheduleSlot,
  ScheduleSlotStatus,
} from "@mediquo/core/models/schedule-slot";

ScheduleSlotStatus

ValueDescription
"available"Can be booked
"reserved"Already taken

ScheduleSlot fields

FieldTypeDescription
idstring (UUID)Unique slot identifier
channelAppointmentChannelConsultation channel for this slot
durationnumberDuration in minutes
starts_atstringSlot start time (ISO 8601)
finishes_atstringSlot end time (ISO 8601)
statusScheduleSlotStatusAvailability state
professional{ id: string, name: string }Assigned professional
servicesArray<{ id: string, name: string }>Associated services
speciality{ id: number }Medical specialty

Gap

Represents a recurring time window in a professional's availability schedule.

import type { Gap, DaysOfWeek } from "@mediquo/core/models/gap";

DaysOfWeek

ValueDescription
"monday""sunday"Specific day of the week
"working_week"Monday through Friday
"weekend"Saturday and Sunday
"all_week"Every day

Gap fields

FieldTypeDescription
days_of_weekDaysOfWeekWhich days the gap applies to
from_timestringStart time (e.g. "09:00")
to_timestringEnd time (e.g. "17:00")