import { type Base, genBase } from "./_base"
import { genDoctor, type Doctor } from "./doctor"
import { genEncounter, type Encounter } from "./encounter"
import { genSpecialist, type Specialist } from "./specialist"
import { genSubspecialist, type Subspecialist } from "./subspecialist"
import { genUnit, type Unit } from "./unit"

export interface ControlLetter extends Base {
  encounter_id: number
  encounter: Encounter
  unit_id: number
  unit: Unit
  specialist_id: number
  specialist: Specialist
  subspecialist_id: number
  subspecialist: Subspecialist
  doctor_id: number
  doctor: Doctor
  date: ''
}

export function genControlLetter(): ControlLetter {
  return {
    ...genBase(),
    encounter_id: 0,
    encounter: genEncounter(),
    unit_id: 0,
    unit: genUnit(),
    specialist_id: 0,
    specialist: genSpecialist(),
    subspecialist_id: 0,
    subspecialist: genSubspecialist(),
    doctor_id: 0,
    doctor: genDoctor(),
    date: ''
  }
}
