Description
An appointment is a kind of log entry. It is a Log delegated type, and the Log carries the date.
Fields come from the journal's "Call and Meeting Log" table (Section 3), which records: Date, Appointment, Met/Spoke With, Purpose/Reason for Call/Visit, Brief Notes.
Appointment
- Is a
Log delegated type (required) — the date lives on the Log
- Belongs to an AppointmentType (required)
- Met/Spoke With (String)
- Purpose (Text)
- Notes (Text)
Relationships: Log, AppointmentType
AppointmentType
Lookup table. AppointmentType has many appointments.
- Name (String)
- Table is seeded with: health care provider, procedure, test, surgery, hospitalization
UI
Standard scaffolding for Appointment and AppointmentType, plus the pieces that make an appointment visible from the log:
- Register
Appointment in Log's delegated_type list so it appears in the log type selector.
- Add a partial in
app/views/appointments/ that renders an appointment's details in a log context.
- Modify the Log index and show to render that partial next to the log entry, dispatching on the loggable type. Keep the generic fallback the Log ticket established for types that don't have a partial yet.
- Add AppointmentType to
admin_sections in ApplicationHelper — it's reference data, same as medication types and forms.
Acceptance Criteria
- A user can add, view, edit and delete an appointment
- Saving an appointment requires a date and an appointment type
- The appointment type is selected from the seeded list
AppointmentType is seeded and manageable, and appears on /admin
Appointment appears in the log type selector
- The log index shows appointment details next to each appointment log entry
- The log show page shows the appointment's full details
- Log entries of a type with no partial still render via the fallback — adding this partial must not break that
- Model tests cover both models
Notes
- The journal lists three appointment kinds (health care provider, procedure, test); the ERD adds surgery and hospitalization. Seeding all five.
- Meeting Notes (the questions-and-answers page in Section 3) is a separate concern — not in this ticket.
- "Met/Spoke With" is free text, matching the paper journal. The ERD has a
Provider model, so this could become an association later.
Description
An appointment is a kind of log entry. It is a
Logdelegated type, and the Log carries the date.Fields come from the journal's "Call and Meeting Log" table (Section 3), which records: Date, Appointment, Met/Spoke With, Purpose/Reason for Call/Visit, Brief Notes.
Appointment
Logdelegated type (required) — the date lives on the LogRelationships: Log, AppointmentType
AppointmentType
Lookup table. AppointmentType has many appointments.
UI
Standard scaffolding for Appointment and AppointmentType, plus the pieces that make an appointment visible from the log:
AppointmentinLog'sdelegated_typelist so it appears in the log type selector.app/views/appointments/that renders an appointment's details in a log context.admin_sectionsinApplicationHelper— it's reference data, same as medication types and forms.Acceptance Criteria
AppointmentTypeis seeded and manageable, and appears on/adminAppointmentappears in the log type selectorNotes
Providermodel, so this could become an association later.