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

Make fhir primitive element field optional if extension value is provided. #40

Closed
nazrulworld opened this issue Oct 28, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nazrulworld
Copy link
Owner

nazrulworld commented Oct 28, 2020

https://www.hl7.org/fhir/extensibility.html#Special-Case

Certainly SMART doesn't impose any limits on how FHIR JSON works -- it sounds like there's some question about how FHIR treats extensions that are present in place of required elements. https://www.hl7.org/fhir/extensibility.html#Special-Case provides the official guidance to corroborate @Md Nazrul Islam's note above that "Maybe... when _intent value is provided then the intent field should be optional." -- indeed, required elements can be missing if extensions are provided.

https://chat.fhir.org/#narrow/stream/179218-python/topic/JSON.20representation.20of.20primitive.20elements.20%28validation%29/near/214834853

@Md Nazrul Islam I tested with beta 6.x.x version and this doesn't pass validation:

"_intent": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "unknown"
}
]
},

Am I doing something wrong?

pydantic.error_wrappers.ValidationError: 1 validation error for MedicationRequest
intent
field required (type=value_error.missing)


https://chat.fhir.org/#narrow/stream/179218-python/topic/JSON.20representation.20of.20primitive.20elements.20%28validation%29/near/214840441

@_Stephen Whitney|269724 said:

I see thanks @**Md Nazrul Islam**. It passes validation using open hapi fhir server as written at http://hapi.fhir.org/baseR4/Bundle/$validate

Ok, that is something a little bit long discussion need to be done. Maybe there should be when _intent value is provided then the intent field should be optional.

@nazrulworld nazrulworld added the enhancement New feature or request label Oct 28, 2020
@nazrulworld nazrulworld changed the title Make fhir primitive value field optional if extension value is provided. Make fhir primitive element field optional if extension value is provided. Oct 29, 2020
nazrulworld added a commit that referenced this issue Oct 29, 2020
…onal if extension value is provided.

* resources are regenerated.
@nazrulworld nazrulworld self-assigned this Oct 31, 2020
@sbwhitney
Copy link

Impressive turnaround time. Thank you @nazrulworld. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants