Skip to content

APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time)#3141

Merged
JordanGuinn merged 44 commits intomainfrom
jg/APP-354
Apr 10, 2026
Merged

APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time)#3141
JordanGuinn merged 44 commits intomainfrom
jg/APP-354

Conversation

@JordanGuinn
Copy link
Copy Markdown
Contributor

@JordanGuinn JordanGuinn commented Apr 7, 2026

Description

This PR converts the NBSSR00011 SAS report to a Python equivalent.

Tickets

Checklist for adding a library:

  • Copy this checklist into your (draft) PR description
  • Check the existing description for the library in apps/modernization-api/src/main/resources/db/changelog/report/execution/03_ODSE_Data_Report_Library_Init.sql
    • If the report execution service is not yet in use by any STLT (even beta), you should update this file
    • Update the description in the library-specific migration
  • Add a migration to apps/modernization-api/src/main/resources/db/report/execution/libraries named <your library name>.sql
    • Copy another migration and update the variables at the top of the file
  • Add the migration to apps/modernization-api/src/main/resources/db/report-execution-changelog.yml. It should be added to the latest changeSet since the last release - this could require a new changeSet if there isn't one since last release
  • Check the migration works by building/running the containerized dev setup
  • Add a python library file to apps/report-execution/src/libraries named in lowercase, but generally following the naming convention of SAS (needs to be human recognizable as the same library)
  • Follow the pattern established in existing libraries to create your library. The execute function is the required method and its signature will (someday) be checked for validity
    • Make sure pertinent text embedded in the reports is included in the description of the report
    • Note in the doc string any deviation from the SAS
  • Keep an eye out for things in the sas library that are/could be centralized to pre- or post-processing or a util would be helpful for (e.g. common formatting needs)
  • Add integration tests in a apps/report-execution/tests/libraries/<your_library_here>py file following the conventions established for other libraries
    • The subset_sql can be assumed to be well tested by the modernization-api, so focus on any logic and additional joins/queries/analysis that is added in the library
    • The database used in integration testing is our standard golden db + seed used in other testing - if additional data is needed to test the report, add it to the seeding process
  • Add e2e test coverage for the report
    • If this step is not set up, create a ticket to track this as follow on work needed for this report
  • Check that the report has parity with the NBS 6 version using (process TBD)
    • If this step is not set up, create a ticket to track this as follow on work needed for this report
  • Keep an eye out for opportunities to:
    • Consolidate reports by using parameters (parameter design tbd)
    • Improve the report spec or result expectations
  • Update the SAS to Python tracking spreadsheet with information about the newly converted library
  • Update/clarify these instructions in the epic based on your experience

@JordanGuinn JordanGuinn marked this pull request as ready for review April 8, 2026 09:17
@JordanGuinn JordanGuinn requested a review from a team as a code owner April 8, 2026 09:17
@JordanGuinn JordanGuinn requested review from emyl3 and krista-skylight and removed request for a team April 8, 2026 09:18
@JordanGuinn JordanGuinn changed the title (WIP) APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) Apr 8, 2026
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py
JordanGuinn and others added 5 commits April 10, 2026 10:08
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Co-authored-by: Mary McGrath <m.c.mcgrath13@gmail.com>
Copy link
Copy Markdown
Contributor

@mcmcgrath13 mcmcgrath13 left a comment

Choose a reason for hiding this comment

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

LGTM! just let #3092 merge first and de-conflict on this one

Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Comment thread apps/report-execution/src/libraries/nbs_sr_11.py Outdated
Copy link
Copy Markdown
Contributor

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

Left a couple of small copy differences I noticed!

@JordanGuinn JordanGuinn changed the title APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) (blocked) APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) Apr 10, 2026
columns: list[str]
data: list[tuple[Any, ...]]

def get_column(self, col_name: str) -> list[Any]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I just merged! I think if you pull from main and tests still pass then you're good to go.

@JordanGuinn JordanGuinn changed the title (blocked) APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) APP-354 - Convert NBSSR00011 (Cases of Selected Diseases By Year Over Time) Apr 10, 2026
@sonarqubecloud
Copy link
Copy Markdown

@JordanGuinn JordanGuinn merged commit b21ccd8 into main Apr 10, 2026
7 checks passed
@JordanGuinn JordanGuinn deleted the jg/APP-354 branch April 10, 2026 19:45
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.

4 participants