feature: a mocked implementation of v1 UI done.

This commit is contained in:
2026-05-07 03:40:29 +03:30
parent 2161926fc9
commit a70cbc7860
11 changed files with 1276 additions and 6 deletions

View File

@@ -0,0 +1,100 @@
/** Permanent dentition FDI ids (1148), stored as two-digit strings */
export type FdiToothId =
| '11'
| '12'
| '13'
| '14'
| '15'
| '16'
| '17'
| '18'
| '21'
| '22'
| '23'
| '24'
| '25'
| '26'
| '27'
| '28'
| '31'
| '32'
| '33'
| '34'
| '35'
| '36'
| '37'
| '38'
| '41'
| '42'
| '43'
| '44'
| '45'
| '46'
| '47'
| '48';
export interface TreatmentAppointment {
id: string;
patientId: string;
patientFirstName: string;
patientLastName: string;
providerUserId: string;
startAt: string;
endAt: string;
purpose: string;
}
export interface TreatmentAttachmentMeta {
id: string;
fileName: string;
mimeType: string;
sizeBytes: number;
}
export interface PastTreatmentRecord {
id: string;
teeth: FdiToothId[];
notes?: string | null;
}
export interface PastTreatment {
id: string;
patientId: string;
title: string;
treatmentAt: string;
status: string;
records: PastTreatmentRecord[];
documents: TreatmentAttachmentMeta[];
}
export interface LinkedOrganizationOption {
id: string;
name: string;
active: boolean;
}
export interface TreatmentRecordDraft {
clientId: string;
teeth: FdiToothId[];
comment: string;
attachmentMetas: TreatmentAttachmentMeta[];
/** Organizations selected for sending this record (mock only until API exists) */
sendToOrganizationIds: string[];
sentAt?: string | null;
}
/** Payload for persisting a draft (mock API); omits ephemeral client-only fields */
export type SavedTreatmentRecordPayload = Omit<TreatmentRecordDraft, 'clientId' | 'sentAt'>;
export interface SaveTreatmentPayload {
appointmentId: string;
patientId: string;
records: SavedTreatmentRecordPayload[];
}
export interface SendTreatmentRecordPayload {
appointmentId: string;
patientId: string;
recordClientId: string;
organizationIds: string[];
}