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 = {