Skip to content

O3-5452: Add encounter printing support for O3 forms#11

Open
ayesigaisaac wants to merge 4 commits intoopenmrs:mainfrom
ayesigaisaac:o3-5452-encounter-printing
Open

O3-5452: Add encounter printing support for O3 forms#11
ayesigaisaac wants to merge 4 commits intoopenmrs:mainfrom
ayesigaisaac:o3-5452-encounter-printing

Conversation

@ayesigaisaac
Copy link
Copy Markdown

Summary

Implements O3-5452 by adding backend support to print encounters based on O3 forms (JSON schemas).

What This PR Adds

  • Encounter print API endpoints:
    • POST /ws/rest/v1/patientdocuments/encounters (queue print job)
    • GET /ws/rest/v1/patientdocuments/encounters/status/{requestUuid} (poll status)
    • GET /ws/rest/v1/patientdocuments/encounters/download/{requestUuid} (download PDF)
  • Encounter report pipeline:
    • EncounterPdfReportManager
    • EncounterPdfReport
    • EncounterPdfReportRenderer
    • EncounterXmlBuilder
    • EncounterPrintingContext
  • Default encounter print XSL-FO template:
    • defaultEncounterFormFopStylesheet.xsl
  • Configurable header/footer/logo support via Initializer keys
  • New privilege: App: Print encounter forms
  • Added required module dependency on o3forms
  • Added docs: readme/EncounterPrinting.md

Extra Cleanup Included

  • Removed duplicate webservices.rest-omod-common dependency in api/pom.xml
  • Fixed controller test wiring to use Spring injection
  • Trigger response includes both uuid and requestUuid for compatibility

Validation

  • mvn --% -Dmaven.repo.local=.m2 -Dproject.build.sourceEncoding=UTF-8 -DskipTests compile

Notes

  • Full tests are environment-sensitive locally due to path/URI issues when Maven cache path contains spaces, but feature code compiles successfully and endpoints are implemented end-to-end.

@ayesigaisaac
Copy link
Copy Markdown
Author

Hi OpenMRS team, this PR is ready for review.

Implements O3-5452 (encounter printing for O3 forms) with queue/status/download endpoints and a full report renderer pipeline.

Could maintainers please review when possible?
/cc @daniel Kayiwa

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.

2 participants