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

Fixed incoming fhir data parsing #2446

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions care/hcx/utils/fhir.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,10 @@ def process_coverage_elibility_check_response(self, response):
coverageeligibilityresponse.CoverageEligibilityResponse(
**list(
filter(
lambda entry: entry.resource
is coverageeligibilityresponse.CoverageEligibilityResponse,
lambda entry: isinstance(
entry.resource,
coverageeligibilityresponse.CoverageEligibilityResponse,
),
coverage_eligibility_check_bundle.entry,
)
)[0].resource.dict()
Expand All @@ -1027,7 +1029,7 @@ def process_coverage_elibility_check_response(self, response):
coverage_request = coverage.Coverage(
**list(
filter(
lambda entry: entry.resource is coverage.Coverage,
lambda entry: isinstance(entry.resource, coverage.Coverage),
coverage_eligibility_check_bundle.entry,
)
)[0].resource.dict()
Expand Down Expand Up @@ -1057,7 +1059,9 @@ def process_claim_response(self, response):
claim_response = claimresponse.ClaimResponse(
**list(
filter(
lambda entry: entry.resource is claimresponse.ClaimResponse,
lambda entry: isinstance(
entry.resource, claimresponse.ClaimResponse
),
claim_bundle.entry,
)
)[0].resource.dict()
Expand Down