| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | |
| | export interface PatientHistory { |
| | name: string; |
| | age: string; |
| | bloodGroup: string; |
| | parity: string; |
| | pregnancyStatus: string; |
| | gestationalAgeWeeks: string; |
| | monthsSinceLastDelivery: string; |
| | monthsSinceAbortion: string; |
| | menstrualStatus: string; |
| | sexualHistory: string; |
| | hpvStatus: string; |
| | hpvVaccination: string; |
| | patientProfileNotes: string; |
| | postCoitalBleeding: boolean; |
| | interMenstrualBleeding: boolean; |
| | persistentDischarge: boolean; |
| | symptomsNotes: string; |
| | papSmearResult: string; |
| | hpvDnaTypes: string; |
| | pastProcedures: { biopsy: boolean; leep: boolean; cryotherapy: boolean; none: boolean }; |
| | screeningNotes: string; |
| | smoking: string; |
| | immunosuppression: { hiv: boolean; steroids: boolean; none: boolean }; |
| | riskFactorsNotes: string; |
| | } |
| |
|
| | |
| | export interface NativeFindings { |
| | cervixFullyVisible: 'Yes' | 'No' | null; |
| | obscuredBy: { blood: boolean; inflammation: boolean; discharge: boolean; scarring: boolean }; |
| | adequacyNotes: string; |
| | scjVisibility: string; |
| | scjNotes: string; |
| | tzType: string; |
| | suspiciousAtNativeView: boolean; |
| | obviousGrowths: boolean; |
| | contactBleeding: boolean; |
| | irregularSurface: boolean; |
| | other: boolean; |
| | additionalNotes: string; |
| | } |
| |
|
| | |
| | export interface AceticFindings { |
| | |
| | selectedCategories: Record<string, boolean>; |
| | |
| | selectedFindings: Record<string, boolean>; |
| | additionalNotes: string; |
| | } |
| |
|
| | |
| | export interface BiopsyMarkings { |
| | lesionMarks: Array<{ type: string; typeCode: string; clockHour: number; color: string }>; |
| | swedeScores: { |
| | acetoUptake: number | null; |
| | marginsAndSurface: number | null; |
| | vessels: number | null; |
| | lesionSize: number | null; |
| | iodineStaining: number | null; |
| | }; |
| | totalSwedeScore: number; |
| | marksByType: Record<string, { type: string; hours: number[] }>; |
| | } |
| |
|
| | |
| | export interface PatientSession { |
| | |
| | patientInfo?: { id: string; name: string; examDate?: string }; |
| | |
| | patientHistory?: Partial<PatientHistory>; |
| | |
| | nativeFindings?: Partial<NativeFindings>; |
| | |
| | aceticFindings?: Partial<AceticFindings>; |
| | |
| | stepFindings?: Record<string, any>; |
| | |
| | biopsyMarkings?: BiopsyMarkings; |
| | |
| | reportFormData?: Record<string, string>; |
| | |
| | sessionStarted?: string; |
| | } |
| |
|
| | const KEY = 'pathora_colpo_session'; |
| |
|
| | export const sessionStore = { |
| | |
| | get(): PatientSession { |
| | try { |
| | return JSON.parse(localStorage.getItem(KEY) ?? '{}') as PatientSession; |
| | } catch { |
| | return {}; |
| | } |
| | }, |
| |
|
| | |
| | merge(partial: Partial<PatientSession>): void { |
| | const current = sessionStore.get(); |
| | localStorage.setItem(KEY, JSON.stringify({ ...current, ...partial })); |
| | }, |
| |
|
| | |
| | clear(): void { |
| | localStorage.removeItem(KEY); |
| | }, |
| |
|
| | |
| | export(): string { |
| | return JSON.stringify(sessionStore.get(), null, 2); |
| | }, |
| | }; |
| |
|