Document PrescriptionFlag on the platform schemas sheet.

Keep entity schemas aligned with Admin Rx flagging after merging remote schema pack.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
kirukib 2026-08-10 17:07:15 +03:00
parent d55c88c999
commit 12a4aa8a9f

View File

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