# openEHR Web Template to FHIR Questionnaire converter **Category:** [Tool Support](https://discourse.openehr.org/c/tool-support/29) **Created:** 2025-03-18 15:24 UTC **Views:** 219 **Replies:** 8 **URL:** https://discourse.openehr.org/t/openehr-web-template-to-fhir-questionnaire-converter/6574 --- ## Post #1 by @jbuch I’m excited to share an open-source tool to convert openEHR Web Templates into FHIR Questionnaires. The converter can be obtained from [CISTEC Github](https://github.com/cistec-com/openEHR2FHIRquestionnaire) and used via CLI, or directly [in the Browser](https://huggingface.co/spaces/cistec/openEHR2FHIRquestionnaire). On Github you can find additional details, as well as information regarding licensing. Feel free to customize and adapt the script to your needs. Obviously, it would be beneficial if you either contribute through Github issues & pull requests or contact me directly. Note that this is a very recent project, and I am not too familiar with FHIR. I will be glad for inputs regarding overall functionality, parameters to add, specific mappings, and general feedback. --- ## Post #2 by @joostholslag Cool, thanks for sharing as open source! Are you familiar with related initiatives: https://discourse.openehr.org/t/online-openehr2fhir-transformer/2606 And FHIR-connect spec (about to be re-released). And I’m curious where to find your data type mapping. There’s a project in waiting to standardise mappings for those. --- ## Post #3 by @jbuch Yes, I’m aware of these related initiatives! I feel there’s room for improvement regarding the availability of open-source tools. The work by @SevKohler, @yampeku, and @gandrejc is crucial for efficiently standardizing mappings. I’d be happy to explore ways we can share the workload and connect our efforts to benefit the community. I just added a [Data Type Mapping Table](https://github.com/cistec-com/openEHR2FHIRquestionnaire?tab=readme-ov-file#data-type-mapping) to the README. --- ## Post #4 by @jbuch I have updated the Web Template to FHIR Questionnaire converter script, adding optional help buttons to questions as well as setting the linkId of nodes to their corresponding FLAT format path. In a second script that I have added, this allows to generate valid (EHRbase and Better) FLAT format compositions from the filled in questionnaireResponse, as long as the questionnaire has originally been created using the former script. Again available on [Github](https://github.com/cistec-com/openEHR2FHIRquestionnaire) and can be used via CLI or in the [Browser](https://huggingface.co/spaces/cistec/openEHR2FHIRquestionnaire) (now with two tabs for the two scripts). --- ## Post #5 by @ian.mcnicoll Thanks Jonas, Very timely. At last I am going to have time to explore this properlym,ammd I have real use case. What are you using to ‘deploy’ the Questionairres - is this your own thing or something like the SDC tooling? --- ## Post #6 by @jbuch By deploy do you mean form rendering? For some basic testing I used [LHC FHIR Tools](https://lhcforms.nlm.nih.gov/), but in our use case I am not the one creating the UI/forms. --- ## Post #7 by @yampeku By the way, we experimented in LinkEHR in the past with LForms. The most recent form visualization in the tool used LForms generated from archetypes --- ## Post #8 by @ian.mcnicoll Fantastic - used your tool to generate FHIR Questionnaire then NLM SDC tool to show this - really nice for prototyping Completely driven from openEHR templates!! ![CleanShot 2025-10-03 at 19.01.12|690x424](upload://8do0WSrX3PDKlqQbpMlmzYCc2Lk.png) --- ## Post #9 by @jbuch It’s definitely possible to generate forms from archetypes directly. In our use case, we need the questionnaires while making sure that the response can be stored in openEHR, which is why the scripts are designed in this way. I will be happy for any suggestions, directly here or through Github! --- **Canonical:** https://discourse.openehr.org/t/openehr-web-template-to-fhir-questionnaire-converter/6574 **Original content:** https://discourse.openehr.org/t/openehr-web-template-to-fhir-questionnaire-converter/6574