Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cloud Healthcare API beta FHIR updates #2639

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

Merged
merged 14 commits into from
Jan 30, 2020
Merged

Cloud Healthcare API beta FHIR updates #2639

merged 14 commits into from
Jan 30, 2020

Conversation

noerog
Copy link
Contributor

@noerog noerog commented Dec 19, 2019

Split create_resource into 3 components and update region tags/tests:

create_patient
create_encounter
create_observation

In tests, create a patient fixture to use in different test methods.

Update README.

Add file and tests for executeBundle.

Add conditions for each conditional method (conditionalUpdate, conditionalPatch, conditionalDelete)

@noerog noerog requested a review from a team as a code owner December 19, 2019 20:29
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 19, 2019
@noerog noerog changed the title Chc fhir resources Cloud Healthcare API beta FHIR updates Dec 19, 2019
@noerog
Copy link
Contributor Author

noerog commented Dec 20, 2019

Can this be merged if all tests except 3.7 are passing?

@gguuss
Copy link
Contributor

gguuss commented Dec 21, 2019

@noerog Is there a reason you don't want / need Python 3.7 support?

@noerog
Copy link
Contributor Author

noerog commented Dec 23, 2019

Not really, but if it passes on our main/required tests I'd rather submit the PR and fix 3.7 later because the test failure makes no sense to me right now.

@gguuss
Copy link
Contributor

gguuss commented Dec 26, 2019

I can take a look to see if there's something you can do to fix 3.7. I'd prefer to avoid committing something that breaks on the latest Python.

@gguuss gguuss added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Dec 26, 2019
@gguuss
Copy link
Contributor

gguuss commented Dec 26, 2019

Looks like a race condition? I'll see if re-running gets 'em green.

@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Dec 26, 2019
@gguuss
Copy link
Contributor

gguuss commented Dec 26, 2019

It appears that in Python 3.x there's a problem, I'll investigate further.

@gguuss
Copy link
Contributor

gguuss commented Dec 27, 2019

@crwilcox Any ideas on why these tests are passing locally but failing on CI?

@gguuss gguuss added the kokoro:run Add this label to force Kokoro to re-run the tests. label Dec 27, 2019
@leahecole leahecole removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 9, 2020
@noerog
Copy link
Contributor Author

noerog commented Jan 21, 2020

Just an fyi: now 3.7, which was failing a week ago, is passing, but 3.5 is failing, even though no code has changed.

@leahecole
Copy link
Collaborator

taking a look

@leahecole leahecole added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 21, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 21, 2020
Copy link
Collaborator

@leahecole leahecole left a comment

Choose a reason for hiding this comment

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

I requested some changes and am hoping that these minor tweaks will resolve all mysterious failures. Put time on my calendar or ping me if you want to pair or have questions!

@noerog
Copy link
Contributor Author

noerog commented Jan 23, 2020

I suspect the conditional update/patch errors were caused by there being duplicate FHIR resources. According to the FHIR spec for conditional update and patch, if there are multiple versions of a resource that are detected, a 412 error is returned: https://www.hl7.org/fhir/http.html#cond-update / https://www.hl7.org/fhir/http.html#patch

@noerog
Copy link
Contributor Author

noerog commented Jan 29, 2020

Healthcare tests are all passing but it seems that /automl/ tests are failing which causes the whole suite to fail.

Copy link
Collaborator

@leahecole leahecole left a comment

Choose a reason for hiding this comment

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

@noerog - just open those two issues and assign them to yourself and we're good. Thanks for your patience!

assert "Got Patient resource" in out


@pytest.mark.skip(reason='flaky test sometimes returns 403 errors, need to investigate')
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm cool with a skip as long as an issue gets opened up in the repo referencing this


@pytest.mark.skip(reason='flaky test sometimes returns 403 errors, need to investigate')
def test_conditional_patch_resource(test_dataset, test_fhir_store, test_patient, capsys):
# The conditional method tests use an Observation, so we have to create an
Copy link
Collaborator

Choose a reason for hiding this comment

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

these comments are informative - thank you!

fhir_store_id,
)

# In accordance with the FHIR spec, if conditional patch or conditional update
Copy link
Collaborator

Choose a reason for hiding this comment

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

👏 again with the helpful comments 🎉

assert "Conditionally patched" in out


@pytest.mark.skip(reason='flaky test sometimes returns 412 errors, need to investigate')
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as above - want to see an issue opened for this investigation (ideally with you assigned to this and the other :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants