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.
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.
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:
Ok, that is something a little bit long discussion need to be done. Maybe there should be when
_intent
value is provided then theintent
field should be optional.