Skip to content

Mailed statements report and cron synchronization with postgrid#7377

Open
rzinger wants to merge 12 commits intodevelopfrom
rzinger/otr-2439-rcm-ehr-provide-a-report-to-show-all-paper-statements-sent
Open

Mailed statements report and cron synchronization with postgrid#7377
rzinger wants to merge 12 commits intodevelopfrom
rzinger/otr-2439-rcm-ehr-provide-a-report-to-show-all-paper-statements-sent

Conversation

@rzinger
Copy link
Copy Markdown
Contributor

@rzinger rzinger commented May 3, 2026

No description provided.

rzinger and others added 9 commits May 2, 2026 13:53
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an EHR report and supporting zambdas to list mailed patient statements (PostGrid) over a date range, plus on-demand and scheduled syncing of vendor mail statuses back into FHIR Communication resources.

Changes:

  • Persist statement HTML as a text/html attachment in mailed-statement Communication.payload for later preview.
  • Add zambdas for (1) generating a mailed-statements report and (2) syncing PostGrid letter statuses (HTTP + cron).
  • Add an EHR “Mailed Statements” report page, API wiring, and unit tests for the new functionality.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
packages/zambdas/src/subscriptions/task/sub-send-patient-statement-by-mail/index.ts Stores statement HTML into the mailed Communication payload.
packages/zambdas/src/shared/sync-mailed-statement-statuses.ts Implements PostGrid → FHIR status synchronization for mailed statements.
packages/zambdas/src/shared/postgrid.ts Extends PostGrid letter shape to include additional metadata fields.
packages/zambdas/src/shared/index.ts Re-exports the new sync helper.
packages/zambdas/src/ehr/mailed-statements-report/index.ts New HTTP zambda to fetch and map mailed statement Communications into a report payload.
packages/zambdas/src/ehr/mailed-statements-report/validateRequestParameters.ts Validates report request body + secrets.
packages/zambdas/src/ehr/sync-mailed-statement-statuses/index.ts New HTTP zambda wrapper to run sync on-demand.
packages/zambdas/src/ehr/sync-mailed-statement-statuses/validateRequestParameters.ts Validates sync request secrets.
packages/zambdas/src/cron/sync-mailed-statement-statuses/index.ts New cron zambda wrapper to run sync on a schedule.
packages/utils/lib/types/api/mailed-statements-report.types.ts Adds shared API types for report + sync outputs.
packages/utils/lib/types/api/index.ts Exports the new API types.
config/oystehr-core/zambdas.json Registers the new report and sync zambdas (HTTP + cron).
apps/ehr/src/api/api.ts Adds client calls for the new report + sync zambdas.
apps/ehr/src/pages/reports/MailedStatements.tsx New EHR report UI with grid, preview, and “sync statuses” action.
apps/ehr/src/pages/reports/index.ts Exports the new report page.
apps/ehr/src/pages/Reports.tsx Adds a Reports tile entry for Mailed Statements.
apps/ehr/src/App.tsx Adds route for the new report page.
packages/zambdas/test/unit/*.test.ts Adds unit tests for PostGrid fetch, sync behavior, and report mapping/validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/ehr/src/pages/reports/MailedStatements.tsx Outdated
Comment thread packages/zambdas/test/unit/sync-mailed-statement-statuses.test.ts Outdated
Comment thread packages/zambdas/src/shared/sync-mailed-statement-statuses.ts
Comment thread apps/ehr/src/pages/reports/MailedStatements.tsx Outdated
Comment thread apps/ehr/src/pages/reports/MailedStatements.tsx
Comment thread packages/zambdas/src/cron/sync-mailed-statement-statuses/index.ts Outdated
Comment thread packages/zambdas/src/shared/sync-mailed-statement-statuses.ts
Comment thread apps/ehr/src/pages/reports/MailedStatements.tsx
Comment thread apps/ehr/src/pages/reports/MailedStatements.tsx
Co-authored-by: Copilot <copilot@github.com>
@rzinger rzinger changed the title Rzinger/otr 2439 rcm ehr provide a report to show all paper statements sent Mailed statements report and cron synchronization with postgrid May 3, 2026
rzinger and others added 2 commits May 3, 2026 13:28
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