[FEATURE] Add Appointment and Appointment Type

Open
#199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rails

Research direction

Start by reading the existing Log delegated-type implementation, the Log index and show views, and analogous medication types and forms used in ApplicationHelper. Add the Appointment and AppointmentType scaffolding, appointment partial, admin registration, and seed entries while preserving the generic Log fallback. Done means the acceptance criteria pass, including model tests and appointment details on both Log pages.

Written by the indexing model from the issue text.

Description

enhancement Rails App RFG Conference

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.
Dominant language
TypeScript
Stars
9
Forks
4
Avg merge
9h 34m
Merged PRs (30d)
16

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rubyforgood/alongwithyou

All issues in rubyforgood/alongwithyou

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.