/** * 药物管理相关常量 */ import type { MedicationForm } from '@/types/medication'; import type { MaterialCommunityIcons } from '@expo/vector-icons'; /** * 剂型选项配置 */ export const FORM_OPTIONS: Array<{ id: MedicationForm; label: string; icon: keyof typeof MaterialCommunityIcons.glyphMap; }> = [ { id: 'capsule', label: '胶囊', icon: 'pill' }, { id: 'pill', label: '药片', icon: 'tablet' }, { id: 'injection', label: '注射', icon: 'needle' }, { id: 'spray', label: '喷雾', icon: 'spray' }, { id: 'drop', label: '滴剂', icon: 'eyedropper' }, { id: 'syrup', label: '糖浆', icon: 'bottle-tonic' }, { id: 'other', label: '其他', icon: 'dots-horizontal' }, ]; /** * 剂型标签映射 */ export const FORM_LABELS: Record = { capsule: '胶囊', pill: '药片', injection: '注射', spray: '喷雾', drop: '滴剂', syrup: '糖浆', other: '其他', }; /** * 剂量单位选项 */ export const DOSAGE_UNITS = ['片', '粒', '毫升', '滴', '喷', '勺']; /** * 剂量值选项 (0.5 - 10,步长0.5) */ export const DOSAGE_VALUES = Array.from({ length: 20 }, (_, i) => (i + 1) * 0.5); /** * 每日次数选项 */ export const TIMES_PER_DAY_OPTIONS = Array.from({ length: 10 }, (_, index) => index + 1); /** * 默认服药时间预设 */ export const DEFAULT_TIME_PRESETS = ['08:00', '12:00', '18:00', '22:00'];