nazrulworld / fhir.resources

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

Recursive FHIR schema #118

Open bwalsh opened 1 year ago

bwalsh commented 1 year ago

Description

Attempting to get complete (deep) json schema for a FHIR type and all its dependencies

The schema for the class is created, but does not include a dependency schema for all the contained types. For example, for Patient, I'd like to recursively get the schemas for PatientCommunication, PatientContact, Address, HumanName, FHIRPrimitiveExtension etc.

What I Did

from fhir.resources.patient import Patient
Patient.schema().keys()
>>> dict_keys(['title', 'description', 'type', 'properties', 'additionalProperties'])