Stream: python
Topic: Data Export in FHIR format
Shaishav Bhatt (Jan 07 2021 at 22:31):
I need to convert my backend symptom data into FHIR resources, backend is in Python, how should I go about it? which libraries shall I use? I do not need to communicate with any servers or import any resources, what should I consider?
Shaishav Bhatt (Jan 07 2021 at 22:34):
I am pretty new to the topic, so in my use case, where my backend symptom data needs to be converted in FHIR resources, and my question is do I need to use any FHIR server for this, and data export will be per patient so, should I go for bulk data, or export a json file with everything related to patient.
Md Nazrul Islam (Jan 08 2021 at 16:12):
https://pypi.org/project/fhir.resources/ yes I think FHIR server is not relevant here, you can construct each resource from your backend and if need export as JSON (it's easy)
May Terry (Jan 14 2021 at 02:23):
Hi there! I'm a newbie in using PyPi. Do you have an example or code snippet where the output of org = Organization.construct()...
in your example exports to a resource in JSON? That would be example 5 in https://github.com/nazrulworld/fhir.resources.
Reason is that when I try to use json.dumps() to convert a class to a JSON string, I get an error: TypeError: Object of type Organization is not JSON serializable
BTW, great job on this python module! I really like using it for extracting elements from FHIR instances. Thanks! :-)
Md Nazrul Islam said:
https://pypi.org/project/fhir.resources/ yes I think FHIR server is not relevant here, you can construct each resource from your backend and if need export as JSON (it's easy)
May Terry (Jan 14 2021 at 02:49):
nvm. I figured out my own issue. :-)
Last updated: Apr 12 2022 at 19:14 UTC