// A patient's own report as the self-report route takes it: typed fields only, and the patient's answer to where it // came from. The server builds the record; only "my own report" can make it the patient's own. A home reading may // instead carry the patient's note, and is then not asked where it came from: the server records it with unknown origin. export type SelfReportSource = 'my-own-report' | 'from-another-record'; export type SelfReport = | { type: 'reading'; measurement: string; unitCode: string; value?: number; systolic?: number; diastolic?: number; effectiveDateTime: string; source: SelfReportSource } | { type: 'reading'; measurement: string; unitCode: string; value?: number; systolic?: number; diastolic?: number; effectiveDateTime: string; note: string } | { type: 'condition'; code: { system: string; code: string; display: string }; clinicalStatus: 'active' | 'resolved'; onsetDateTime?: string; source: SelfReportSource } | { type: 'medication'; medication: { system: string; code: string; display: string }; status: 'active' | 'completed' | 'stopped' | 'intended'; source: SelfReportSource };