Skip to content

(feat) O3-5698: Add visit summary section configuration admin page#311

Draft
BlessedAmrita wants to merge 1 commit into
openmrs:mainfrom
BlessedAmrita:feat/O3-5698-visit-summary-config-page
Draft

(feat) O3-5698: Add visit summary section configuration admin page#311
BlessedAmrita wants to merge 1 commit into
openmrs:mainfrom
BlessedAmrita:feat/O3-5698-visit-summary-config-page

Conversation

@BlessedAmrita

Copy link
Copy Markdown

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work is based on designs, which are linked or shown either in the Jira ticket or the description below. (See also: Styleguide)
  • My work includes tests or is validated by existing tests.

Summary

Adds a Visit Summary Configuration page under System Administration, in a new esm-patient-documents-admin-app package. Admins can see every visit summary section registered by the patientdocuments module, toggle sections on and off, reorder them, save, and preview the resulting PDF for a given visit.

The section list comes from GET /ws/rest/v1/patientdocuments/visitSummary/sections, so a downstream module's custom section appears automatically with no change here. Saving writes the existing global properties report.visitSummary.section.<key>.enabled and .order through the standard systemsetting REST resource, so there is no new write API. Order values are renumbered in tens on save to leave room for sections to interleave.

Sections the module marks as not toggleable (facility header, patient info, footer) render with a locked toggle and an explanatory tooltip. The footer is additionally pinned to the bottom of the list with its reorder arrows disabled, since it renders as page furniture on every page rather than in the body flow.

Preview saves the current settings and then renders the PDF for the visit UUID entered, matching the per-visit nature of the report. Fetch failures are surfaced distinctly: a missing Get Global Properties privilege shows a permissions message with no retry affordance, and other failures show a retryable error.

Screenshots

admin-page.mp4

Related Issue

https://openmrs.atlassian.net/browse/O3-5698
Parent epic: https://openmrs.atlassian.net/browse/O3-5667

Other

Dependencies: The sections endpoint is not yet merged. This page requires patientdocuments with GET /ws/rest/v1/patientdocuments/visitSummary/sections openmrs/openmrs-module-patientdocuments#29. Reordering is only reflected in the generated PDF once the stylesheet order fix openmrs/openmrs-module-patientdocuments#32 is also in.

@BlessedAmrita
BlessedAmrita marked this pull request as draft July 18, 2026 19:33
@BlessedAmrita
BlessedAmrita force-pushed the feat/O3-5698-visit-summary-config-page branch from 693547c to 429dba8 Compare July 18, 2026 19:40
@BlessedAmrita

Copy link
Copy Markdown
Author

cc: @wikumChamith @NethmiRodrigo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant