fhir-py icon indicating copy to clipboard operation
fhir-py copied to clipboard

Adjust fhir-py to work with any models

Open ruscoder opened this issue 2 months ago • 1 comments

Currently fhirpy is limited to work with pydantic models that matches Resource interface.

In addition to it, it expects defining resourceType with typehint that is a bit dirty.

I suggest using class name as resource type instead of trying to get it from the resource model, but in that case, resource class names must match the resource type.

ruscoder avatar Oct 22 '25 10:10 ruscoder

List of models:

  • https://github.com/beda-software/fhir-py-types-r4b
  • https://github.com/fhir-schema/fhir-schema-codegen/tree/main/example/python/aidbox
  • https://github.com/smart-on-fhir/client-py/blob/main/fhirclient/models/

ruscoder avatar Oct 22 '25 11:10 ruscoder