import { type Base, genBase } from "./_base"

export interface MedicationItem extends Base {
  medication_id: number
  isMix?: boolean
  medicine_id?: number
  medicineMix_id?: number
  frequency: number
  dose: number
  interval: number
  intervalUnit_code: string
  usage?: string
  intervalMultplier?: number
  quantity?: number
  isRedeemed?: boolean
  note?: string
}

export function genMedicationItem(): MedicationItem {
  return {
    ...genBase(),
    medication_id: 0,
    frequency: 0,
    dose: 0,
    interval: 0,
    intervalUnit_code: '',
  }
}
