From 12a4aa8a9fca8e465f4405da7811bec724fd23f9 Mon Sep 17 00:00:00 2001 From: kirukib Date: Mon, 10 Aug 2026 17:07:15 +0300 Subject: [PATCH] Document PrescriptionFlag on the platform schemas sheet. Keep entity schemas aligned with Admin Rx flagging after merging remote schema pack. Co-authored-by: Cursor --- docs/schemas.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/schemas.md b/docs/schemas.md index d9b0111..bbb5019 100644 --- a/docs/schemas.md +++ b/docs/schemas.md @@ -339,6 +339,34 @@ interface PrescriptionItem { instructions?: string } +/** Staff review markers — distinct from line `controlled` and workflow status. */ +type PrescriptionFlagCode = + | 'controlled_substance' + | 'interaction_concern' + | 'incomplete_rx' + | 'fraud_suspicion' + | 'stock_shortage' + | 'needs_clarification' + | 'allergy_concern' + | 'dosing_concern' + | 'other' + +type PrescriptionFlagSeverity = 'info' | 'warning' | 'critical' +type PrescriptionFlagStatus = 'open' | 'resolved' + +interface PrescriptionFlag { + id: string + code: PrescriptionFlagCode + severity: PrescriptionFlagSeverity + note: string + createdBy: string + createdAt: Timestamp + status: PrescriptionFlagStatus + resolvedBy?: string + resolvedAt?: Timestamp + resolutionNote?: string +} + interface Prescription { id: string customerName: string @@ -359,6 +387,7 @@ interface Prescription { rejection_reason?: string days_supply?: number refill_due_at?: DateOnly + flags?: PrescriptionFlag[] } type PrescriptionVerifyBody = {