Stream: python
Topic: xml to fhir
kishore reddy (Feb 04 2021 at 03:34):
Hi All, I am new to fhir and my question might be a dumb one. I am looking for ways to convert bunch of xml files to fhir format. Can any of you direct me to blogpost/tutorials/git wiki links on the same?any help is much appreciated
Eric Haas (Feb 04 2021 at 15:30):
FHIR officialko supports 3 over the wire exchange formats.
Eric Haas (Feb 04 2021 at 15:30):
Xml
Eric Haas (Feb 04 2021 at 15:30):
Json
Eric Haas (Feb 04 2021 at 15:30):
Rdf
Eric Haas (Feb 04 2021 at 15:30):
No need to translate from xml
Eric Haas (Feb 04 2021 at 15:31):
If you want to translate from xml. To json
Eric Haas (Feb 04 2021 at 15:32):
Can use an operation described in the spec
Eric Haas (Feb 04 2021 at 15:32):
Not aware of any python apps that do this
Eric Haas (Feb 04 2021 at 15:33):
But other tools do
kishore reddy (Feb 04 2021 at 16:31):
thanks @Eric Haas so, I can just pass XML files as inputs to FHIR and get output in FHIR format? can you please direct me to the documentation which explains how to do these
René Spronk (Feb 04 2021 at 16:47):
How you do the mapping of your own XML structures to the FHIR XML structure is up to you - any XML technique or tool will do, from XSLT, to the FHIR mapping language, to tons of commercial / open source mapping tools. The hard work remains the same: creating the actual mapping.
kishore reddy (Feb 07 2021 at 03:52):
Thanks @René Spronk , I am still unable to find a tutorial to start with, can you please help me with the links on mapping XML to fhir and on creating actual mapping. This would be of great help for my academic project
René Spronk (Feb 07 2021 at 07:55):
Given that you're using the Python stream, so you're probably a Python programmer: a) read XML in some py structure (probably a dict), b) use one of the public Python FHIR APIs, c) map.
kishore reddy (Feb 23 2021 at 16:58):
@René Spronk I have tried using fhir.resources but of no use. sorry to ask the same question again, is ther any blog or tutorial on using public FHIR APIs and mapping?
Md Nazrul Islam (Mar 25 2021 at 04:21):
https://github.com/nazrulworld/fhir.resources/issues/51 I think a feature like that, is coming soon.
Md Nazrul Islam (Mar 31 2021 at 06:24):
Here we go! https://pypi.org/project/fhir.resources/6.2.0b1/
Last updated: Apr 12 2022 at 19:14 UTC