How ricardxdev/medappoint-cgo works
This is a terminal patient-management application: users navigate a Bubble Tea menu to search, create, update, delete, schedule appointments, or browse patient lists and demographic filters. The views call a shared Go patient service, which bridges through cgo to C patient/index operations and file persistence. README capabilities include disability, appointment-date, gender, age, and specialty reporting. The sampled excerpts establish the search and list wiring and service/storage boundary; CRUD view wiring beyond search/list is represented only where paths and product scope support it.
Main entry points: main.go Menu entry · patient.go Patient operations · patients.go Service bootstrap · listMenu_view.go List selection
Components 16
Terminal interface
- Menu entry
main.go - Patient search
src/views/search_view.go - Patient add form
src/views/add_view.go - Patient update form
src/views/update_view.go - Patient removal
src/views/delete_view.go - List selection
src/views/listMenu_view.go - Patient tables
src/views/table_view.go - Input validation
src/views/help_patient.go
Patient service
- Service bootstrap
global/patients.go - Patient operations
src/models/patient.go - Patient reports
src/models/metrics.go
C patient engine
- Patient and index logic
csrc/patient.c - Report calculations
csrc/patient_metrics.c
Local persistence
- Patient records
data/patients.bin - Patient index
data/index.dat
Other components
- Terminal user
Connections 23
- Terminal user → Menu entry: chooses actions
- Menu entry → Patient search: opens search
- Menu entry → Patient add form: opens form
- Menu entry → Patient update form: opens form
- Menu entry → Patient removal: opens removal
- Menu entry → List selection: opens lists
- Patient add form → Input validation: validates fields
- Patient update form → Input validation: validates fields
- Patient search → Service bootstrap: gets patient
- Patient add form → Service bootstrap: adds patient
- Patient update form → Service bootstrap: updates patient
- Patient removal → Service bootstrap: deletes patient
- List selection → Service bootstrap: requests records
- List selection → Patient operations: requests filters
- List selection → Patient tables: shows results
- Service bootstrap → Patient operations: loads records
- Patient operations → Patient and index logic: calls via cgo
- Patient reports → Report calculations: calls via cgo
- Patient operations → Patient records: reads and writes
- Patient operations → Patient index: reads and writes
- Patient and index logic → Patient records: persists records
- Patient and index logic → Patient index: persists index
- Patient reports → Patient operations: reads patient state