Skip to main content

WP-05 Flutter spec

The API is in place and the store shell does not open this screen. Contract type: Appointment. Wire: exchange/booking.md.

Usage​

The patient booking shell calls BookingRepository.listAppointments and requestAppointment. The clinician agenda shell calls BookingRepository.clinicianAgenda and clinicianPatients. Both use the same Appointment type.

Domain​

  • Appointment at lib/domain/booking/appointment.dart. Contract Appointment.

Models​

  • AppointmentModel at lib/data/booking/appointment_model.dart. fromJson keys match contract Appointment fields.

Data sources​

  • BookingRemoteDataSource at lib/data/booking/booking_remote_data_source.dart.
listAppointments() -> Appointment[]
requestAppointment(clinicianId, slot) -> Appointment
clinicianAgenda(day) -> Appointment[]
clinicianPatients() -> list of patient ids from the same rows

Uses ApiConfig appointments, agenda, and clinician patients paths.

Repositories​

  • BookingRepository at lib/domain/booking/booking_repository.dart.

Patient presentation under lib/presentation/patient/booking/. Clinician presentation under lib/presentation/clinician/agenda/. Both import this repository.

Does not do​

Java types. Encounter notes. A second appointment model. Invented calendar widgets. A second HTTP client.