The patient-list-app is the operations console for the Configurable Patient Visit List. It lets users kick off background jobs that affect lists (refresh, recompute membership, export), observe job status, and open the Visit List UI directly with a given list context. It is not the renderer itself; instead, it drives/coordinates the Backbone VisitList screen by sending users to the route with the correct listId and by emitting audit and metrics events.

graph TD; WAR[patient-list-war\ Backbone/Handlebars UI] --> REST[patient-list-rest\ Spring Controllers]; REST --> API[patient-list-api\ Facade + DTOs]; API <--implements--> SRV[patient-list-services\ Business Logic, Mapping, Validation]; SRV --> DAO[patient-list-dao\ Repositories/Queries]; DAO --> DB[(Database)]; WAR -. static assets .-> ASSETS[Templates JS CSS];
graph TD;
subgraph UI patient-list-war
AR[AssignmentRouter]
AS[AssignmentState]
ALV[AssignmentListView]
VCOL[VisitCollection]
VLV[VisitListView]
TBV[ToolbarView]
PGR[PaginationView]
WIZ[WizardView]
TLIST[assignment-list.hbs]
TROW[visit-row.hbs]
end
subgraph REST/API
EPV[/GET /api/v1/visits/]
EPA[/GET /api/v1/assignmentLists/id/summary/]
DTOv[VisitDto]
DTOa[AssignmentListDto]
end
subgraph Server
CtlV[VisitController]
CtlA[AssignmentController]
Fac[PatientListFacade]
Svc[Facade Impl]
Map[DTO Mappers]
RepoV[VisitRepository]
RepoA[AssignmentRepository]
DB[(DB)]
end
AR --> AS
AR --> ALV
ALV --> TBV
ALV --> PGR
ALV --> VCOL
ALV -->|subview| VLV
VCOL -->|reset/sync| VLV
ALV --> TLIST
VLV --> TROW
TBV -->|filter:changed| AS
PGR -->|page:changed| AS
AS -->|toQuery| VCOL
VCOL -->|fetch| EPV
EPV --> CtlV --> Fac --> Svc --> RepoV --> DB
RepoV --> Svc --> Map --> DTOv --> CtlV --> EPV --> VCOL
ALV -->|load summary| EPA --> CtlA --> Fac --> RepoA --> DB
WIZ -->|save list| CtlAsequenceDiagram
participant U as User
participant R as AssignmentRouter
participant S as AssignmentState
participant A as AssignmentListView
participant VC as VisitCollection
participant V as VisitListView
participant T as ToolbarView
participant REST as /api/v1/visits
participant CTR as VisitController
participant FAC as Facade(Service)
participant DAO as VisitRepository
participant DB as Database
U->>R: Navigate #/assignments/42?assignee=RN1&page=1
R->>S: Initialize state (listId=42, assignee=RN1, page=1, sort, filters)
R->>A: new AssignmentListView({state:S})
A->>VC: fetch({ data: S.toQuery() })
VC->>REST: GET /api/v1/visits?listId=42&assignee=RN1&page=1&sort=...
REST->>CTR: Dispatch
CTR->>FAC: findVisitsForAssignment(listId,assignee,paging,filters)
FAC->>DAO: query(listId,assignee,paging,filters)
DAO->>DB: Execute SQL
DB-->>DAO: rows
DAO-->>FAC: entities
FAC-->>CTR: List<VisitDto> + paging
CTR-->>VC: 200 {items:[], paging:{}}
VC-->>A: reset/sync events
A->>V: render subview with VC
V->>V: render rows using Handlebars (visit-row.hbs)
A-->>U: Assignment list with visits displayed
U->>T: Change filter/search/assignee
T-->>S: filter:changed / assignee:changed
S-->>A: change:*
A->>VC: fetch() (debounced) with new query
VC->>REST: GET /api/v1/visits?... (repeat)