Skip to content

person cluster patient assignment endpoints #172

Merged
ericbuckley merged 12 commits into
mainfrom
feature/158-patient-assignment-endpoints
Feb 6, 2025
Merged

person cluster patient assignment endpoints #172
ericbuckley merged 12 commits into
mainfrom
feature/158-patient-assignment-endpoints

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Jan 16, 2025

Copy link
Copy Markdown
Collaborator

Description

Two new person API endpoints for assigning patients to different person clusters.

Related Issues

closes #158

Additional Notes

  • Deprecating existing create_person and update_person routes in the patient router
  • Created create_person and update_person in the person router to replace ones in patient router
  • Updated two mpi_service functions to accept a list of patients rather than just 1
  • regrouping all patient, person and seeding api endpoints into "mpi" tag in api docs

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@ericbuckley ericbuckley added the api New API feature label Jan 16, 2025
@ericbuckley ericbuckley self-assigned this Jan 16, 2025
@ericbuckley ericbuckley marked this pull request as ready for review January 16, 2025 14:46
@codecov

codecov Bot commented Jan 16, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.65%. Comparing base (5b5fe41) to head (a7d3742).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
+ Coverage   97.59%   97.65%   +0.05%     
==========================================
  Files          31       32       +1     
  Lines        1541     1576      +35     
==========================================
+ Hits         1504     1539      +35     
  Misses         37       37              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ericbuckley ericbuckley requested review from bamader and removed request for alhayward and cbrinson-rise8 January 22, 2025 18:14

@bamader bamader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The code changes themselves all look fine to me. I'm wondering what the rationale is for making the functions that previously operated on a single patient or person now perform bulk retrievals / updates. That seems to actually be a fairly dangerous process (see my example above about how that could corrupt linkage results and degrade future cluster quality) if we're performing this on any kind of updates to person clusters in between processing new in coming records. This seems like a case where I'm missing some context though, such as maybe this is only used for seeding.

Comment thread src/recordlinker/database/mpi_service.py
Comment thread src/recordlinker/database/mpi_service.py
Comment thread src/recordlinker/routes/patient_router.py
Comment thread src/recordlinker/routes/patient_router.py
@ericbuckley ericbuckley merged commit 09294ac into main Feb 6, 2025
@ericbuckley ericbuckley deleted the feature/158-patient-assignment-endpoints branch February 6, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api New API feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework patient assignment API endpoints [MPIAPI]

2 participants