Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use get_or_create_patient in the IPC status table #1443

Open
wants to merge 1 commit into
base: cerner-merge-branch
Choose a base branch
from

Conversation

fredkingham
Copy link
Contributor

@fredkingham fredkingham commented Apr 7, 2023

The IPC Status tables has multiple rows per MRN, make sure we don't error when loading these in.

@fredkingham fredkingham changed the base branch from v0.108 to cerner-merge-branch April 7, 2023 07:40
This is because the ipc status table can have multiple rows per MRN.
@fredkingham fredkingham force-pushed the allow-multiple-mrns-get-or-create-1 branch from ad04a98 to 8de49cc Compare April 9, 2023 19:38
@fredkingham fredkingham changed the title Allow multiple mrns get or create 1 Use get_or_create_patient in the IPC status table Apr 11, 2023
# The table contains multiple results for the same
# MRN so get or create in case they have already
# recently been created.
patient, _ = loader.get_or_create_patient(
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this mean that we care about the ordering of the results in some way?
this overwrites with the arbitrarily last - is that the behaviour we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So there is an ongoing discussion on how to merge ipc status https://github.com/openhealthcare/Development/issues/166

you're right there is an arbitrary behaviour that already exists, this is more so that the we can run the ipc command as with the new create_rfh_patient_from_hospital_number error handling this will blow up and so the command can't be run.

2 options the way I see it...

  1. We leave it breaking as a reminder its somethings we have to fix
  2. We take add the merge issue to 166 and move on.

I'm happy with either

@fredkingham
Copy link
Contributor Author

I'm removing the Cerner Merge label as this is not required for that release.

@fredkingham
Copy link
Contributor Author

Marking as needs discussion as https://github.com/openhealthcare/Development/issues/166 is in needs discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants