nazrulworld / fhir.resources

FHIR Resources https://www.hl7.org/fhir/resourcelist.html
https://pypi.org/project/fhir.resources/
Other
372 stars 104 forks source link

ExplanationOfBenefit #61

Closed nishank974 closed 3 years ago

nishank974 commented 3 years ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

I have a record of ExplanationOfBenefit in json format. When I pass it to fhir.resources.ExplanationOfBenefit it get the following error.

ValidationError: 2 validation errors for ExplanationOfBenefit __root__ -> created field required (type=value_error.missing) __root__ -> outcome field required (type=value_error.missing)

What I Did

record = records[5945] from fhir.resources.explanationofbenefit import ExplanationOfBenefit Eob = ExplanationOfBenefit(**record)

How can I know what values are missing and is there a way to print the missing values

nazrulworld commented 3 years ago

I see from your error message that ExplanationOfBenefit. createdand ExplanationOfBenefit. outcome values are missing, those are required http://www.hl7.org/fhir/explanationofbenefit.html as per specification.