nazrulworld / fhir.resources

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

How to build a Model in Django using this Package #59

Closed ShaikhSuf closed 3 years ago

ShaikhSuf commented 3 years ago

Description

There's no issue as such. I'm trying to create a Django model using this project, for example, the patient resource.

Does this package support creation of a model?

nazrulworld commented 3 years ago

Most probably you cannot just represent directly Patient Resource as DJ Model, instead, you can create a Patient model which could have field name resource and type is JSON so this field will contain the whole resource.

But I think there could be another better solution.

ShaikhSuf commented 3 years ago

My goal is to mimic the resource models in Python to be in sync with resources.

Thanks for the suggestion, though.

Bijitakc commented 2 years ago

@ShaikhSuf Did you find out a way to represent the resources in django models?