Skip to content

Remove "real like" fake test data from documents data#874

Merged
yingbull merged 4 commits intodevelop/dogfishfrom
872-remove-test-data-from-documents
Nov 18, 2025
Merged

Remove "real like" fake test data from documents data#874
yingbull merged 4 commits intodevelop/dogfishfrom
872-remove-test-data-from-documents

Conversation

@LiamStanziani
Copy link
Copy Markdown
Collaborator

@LiamStanziani LiamStanziani commented Nov 17, 2025

In this PR, I have:

  • Removed potentially flagged "real like" fake test pdf documents used for test data
  • Added replacement pdf's that use very fake test patient names
  • Updated current document entries into test db to replace old removed pdf references with new added files
  • Added new document entries into test db to default provider "openodoc" with all of the current test data documents (6 in total), also added new ctl_document entries to match these additions

I have tested these changes by:

  • Fully rebuilding my docker container on this branch, ensuring no SQL errors are present in the container logs
  • Building the application and smoke testing by accessing expected patients/provider with document data, ensuring documents load correctly, and no errors are found in the tomcat logs

Summary by Sourcery

Clean up test document data by removing realistic fake PDFs and replacing them with intentionally fake ones, updating the development SQL fixtures accordingly.

Enhancements:

  • Remove existing "real-like" test PDF files and add new PDFs with clearly fake patient names
  • Update document table entries in development.sql to reference the new fake PDF filenames
  • Insert six new document records for the default openodoc provider and add matching ctl_document entries
  • Remove obsolete PDF references and adjust ctl_document associations to the new files

Tests:

  • Update .devcontainer/db/scripts/development.sql to reflect the new test document fixtures

…ed references in development.sql with two remaining pdf's that names are instantly recognizable as fake
…ncorporate these additions into the initial test data
…st pdf's into some existing document inserts, added new test data to default provider, with all currently existing document test data
@LiamStanziani LiamStanziani self-assigned this Nov 17, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Nov 17, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Update development SQL seed by replacing real-like test PDFs with clearly fake placeholders and expanding document-provider mappings for the openodoc provider.

Entity relationship diagram for updated document and ctl_document tables

erDiagram
  document {
    int id PK
    varchar doctype
    varchar doc_class
    varchar doc_subclass
    varchar doc_title
    varchar doc_desc
    varchar filename
    int provider_id
  }
  ctl_document {
    varchar entity_type
    int entity_id
    int document_id
    varchar status
  }
  document ||--o{ ctl_document : "referenced by"
Loading

File-Level Changes

Change Details Files
Standardize document seed with generic placeholder PDF filenames
  • Removed legacy INSERT block containing real-like fake PDF references
  • Replaced each document INSERT value with new placeholder filenames and updated classification/provider IDs
  • Extended document count from 16 to 21 entries with consistent date and metadata formatting
.devcontainer/db/scripts/development.sql
Expand ctl_document mappings for default openodoc provider
  • Added six new ctl_document entries linking provider ‘openodoc’ to the new test documents
  • Changed existing mapping type from 'provider' to 'providers' to align with new entries
.devcontainer/db/scripts/development.sql

Assessment against linked issues

Issue Objective Addressed Explanation
#872 Remove test PDF documents from the test data folder that have 'real like' names: 'Deval_Patel_LabReport.pdf', 'ERIC_SMITH_LabReport.pdf', 'SMITH_JOHN_LabReport.pdf', and 'DR+S+Markl+-+Welcome+letter+oct+2024.pdf'.
#872 Replace references to the removed documents in the test database seed data with obviously fake placeholder PDF files.
#872 Update the test database to use only obviously fake lab report documents and add new document entries for the default provider as needed.

Possibly linked issues

  • #unknown: The PR removes listed

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@LiamStanziani LiamStanziani marked this pull request as ready for review November 17, 2025 18:22
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@yingbull yingbull merged commit f54415d into develop/dogfish Nov 18, 2025
13 of 14 checks passed
@yingbull yingbull deleted the 872-remove-test-data-from-documents branch November 18, 2025 19:50
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.

Remove "real like" fake test data from the documents test data folder

2 participants