## Medical clinic: patients, doctors and appointments
Scheduled
Done
Cancelled
Specialty @Configuration order="name"
name d r
Doctor @Staff order="lastName"
firstName d r / lastName d r
specialty Specialty ds r
licenseNumber ds r
email
Patient @Patients order="lastName"
#tab Personal
firstName d r / lastName d r
documentNumber ds r
birthDate date r
phone r
email
#tab Medical
bloodType
allergies text
insurer Insurer
insuranceNumber displayif="insurer != ''"
#tab Appointments
Insurer @Configuration order="name"
name d r
Appointment @Appointments order="startsAt desc" defaultlisting="main"
patient Patient d r
specialty Specialty r
doctor Doctor d r subset="forSpecialty" subsetparams="specialty"
startsAt datetime ds r
state enum enumset="AppointmentState" default="scheduled" fixed
reason text
CancelAppointment @ transient
appointment Appointment fixed
reason text r
notifyPatient boolean default="true"