Skip to content

Conversation

@joneubank
Copy link
Contributor

@joneubank joneubank commented Dec 18, 2025

Summary

Create a new route to fetch just the summary object of a submission instead of the full data object. This will be smaller data transfer and easier for parsing in some cases.

Issues

Description of Changes

UI

  • Create new route GET /submission/:submissionId/summary that returns the submission data but with all record data replaced by an object stating the count of records
  • Standardized SubmissionSummary type, which is used by the new endpoint and was already used by the "Get Summary by Organization ID" endpoint as well

Miscellaneous cleanup items

  • Rename all build scripts in packages and apps to be build instead of build:all
  • Remove image tag on mongoDb in dockerCompose since the previously tagged version has been removed (Bitnami image retirement)

Readiness Checklist

  • Self Review
    • I have performed a self review of code
    • I have run the application locally and manually tested the feature
    • I have checked all updates to correct typos and misspellings
  • Formatting
    • Code follows the project style guide
    • Autmated code formatters (ie. Prettier) have been run
  • Local Testing
    • Successfully built all packages locally
    • Successfully ran all test suites, all unit and integration tests pass
  • Updated Tests
    • Unit and integration tests have been added that describe the bug that was fixed or the features that were added
  • Documentation
    • All new environment variables added to .env.schema file and documented in the README
    • All changes to server HTTP endpoints have open-api documentation
    • All new functions exported from their module have TSDoc comment documentation

@MitchellShiell
Copy link
Contributor

I can see this being particularly useful for submission UIs as well, can be the endpoint used for populating a submission(s) summary/overview page

return (
entities &&
Object.entries(entities).reduce<Record<string, { recordsCount: number }>>((acc, [entityName, entityData]) => {
acc[entityName] = { recordsCount: entityData.length };
Copy link
Contributor

Choose a reason for hiding this comment

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

This function requires to pass the whole data object that in some cases will oversaturate memory just to get the count of records in the array, instead we can retrieve this count with a query to the database.

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