fhir.resources
fhir.resources copied to clipboard
code validation questions
- fhir.resources version: current
- Python version: 3.7
- Operating System: Mac OS
Description
when instantiate a FHIR Resource with a required valueset - Observation.status, I expected it to be validated based upon the fixed set of codes ( http://hl7.org/fhir/valueset-observation-status.html ). What is the status of code validataion? I think that it would possble to at least validate the required bindings where the codes are enumerated.
What I Did
from fhir.resources import construct_fhir_element
obs = construct_fhir_element('Observation', {"status":"foo", "code": {}})
I expected the value "foo" to cause a pydantic validation error.
I just saw this: https://github.com/nazrulworld/fhir.resources#enum-validator