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

Implement conditional operations #112

Merged
merged 12 commits into from
Aug 18, 2023
Merged

Conversation

pavlushkin
Copy link
Member

@pavlushkin pavlushkin commented Aug 15, 2023

Support FHIR Conditional operations
FHIR Spec: https://build.fhir.org/http.html#ccreate
Expected behaviour diagram: https://miro.com/app/board/uXjVMvMgnFQ=/

@@ -240,6 +246,10 @@ def first(self):

return result[0] if result else None

def create(self, **resource_data):
Copy link
Member

Choose a reason for hiding this comment

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

def create(self, resource):
    assert resource.resource_type == self.resource_type
    return self.client._do_request("POST", self.resource_type, resource.serialize(), self.params)

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2023

Codecov Report

Patch coverage: 95.00% and project coverage change: -0.26% ⚠️

Comparison is base (19d636e) 97.73% compared to head (fa72910) 97.47%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #112      +/-   ##
==========================================
- Coverage   97.73%   97.47%   -0.26%     
==========================================
  Files           8        8              
  Lines         662      713      +51     
==========================================
+ Hits          647      695      +48     
- Misses         15       18       +3     
Flag Coverage Δ
unittests 97.47% <95.00%> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
fhirpy/base/resource.py 100.00% <ø> (ø)
fhirpy/base/searchset.py 97.08% <66.66%> (-2.14%) ⬇️
fhirpy/base/lib.py 98.40% <100.00%> (+0.24%) ⬆️

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

@pavlushkin pavlushkin marked this pull request as ready for review August 17, 2023 23:16
@ir4y ir4y merged commit 5587e08 into master Aug 18, 2023
8 checks passed
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.

None yet

3 participants