Form creation from OpenEHR Templates


I am wondering if there is a tool to create PDF forms from OpenEHR Templates. I used Ocean Template Designer to create OFD form and got it compiled and running (attached) but export somehow doesn’t work. I tried exporting in VB code as well as in C#. In addition, I also tried with XML but couldn’t figure out a way to create a full featured PDF form which can be shown to clinicians before further steps.
I also had a quick look at Better Studio and LinkEHR but couldn’t find any option. I encountered some errors while running ADL workbench so don’t know if there is an option in it. I am wondering if there are tools which provide this feature.

Best regards,

Hi Mateen,

my understanding is that you want to automatically create a PDF form from a template. I think that’s a pretty cool idea. Unfortunately, I’m quite sure that there is no tool that can do this at the moment. The mentioned OFM format is Ocean specific and I guess will be of limited use for you.

Better’s Web Template Format or the OPT are the best starting point from my point of view. We have a tool inside our openEHR SDK that automatically creates java classes from OPTs ( Next week, my colleague will work on java docs and make the code more understandable. Combined with something like Apache PDFBox, I think it should be possible to implement such a tool. However, it might take some digging and developing on your side :grimacing:

Hope this helps a bit,


LinkEHR can generate LForms from archetypes /templates. Alternativelly, an html+js can also be generated.

You’ll find video demos of form building based on openEHR templates in several of the pre-procurement videos listed at: Swedish openEHR platform procurement Q1 2020 They are not PDF forms though.

How will the PDFs be used? Will printed filled form responses be (semi)automatically scanned by some OMR software (like ) or manually read and entered into some recieving openEHR system?

I’ve just moved this to (I think) the right place, which will help people find it more easily.

Hi, the openEHR Toolkit has a pretty basic form generator from a template and we welcome any feedback to improve it, please check it out

Hi All,

Thanks for your comments. I know how to create Forms from Templates, the idea was to create “Portable Forms” from them to send it to clinicians before developing them and implementing them in a HIS. e.g. for cancers, the Forms are often dynamic and it would make more sense to have a prototype of a template as a PDF to send around and have doctors opinion about it.

@yampeku: I tried it with some archetypes and got variable results i.e. some forms (html) were more neat than others.

@erik.sundvall: No, I was talking about using them as a Prototype before implementing them.

Regarding prototyping purposes, I think it would be very interesting to have/make an openEHR-template-based plugin to the Figma ( prototyping tool.

Figma seems to be a favourite of many of our Linköping University students, plus many in the UX world and academia.

Starting from the JSON generated by “Export as Web template” in (see image below) would likely be one of the simpler ways.

Possibly interesting links:


Hi Mateen,

THe international CKM has a Printable view which is close to what you would need.

THe Cabolabs tool kit might help

The problem with templates (and showing them to clinicians) is that they are not app prototypes, they are datasets, and as you have noticed they can seem a but untidy, and will often not match the app requirement correctly.

I think we could do with some better template visualisations for this purpose but I suspect we might be better to go straight for form builder type prototypes, and ‘hide’ more of the necessary infrastructure.

OpenEHR plugin for figma sound great.
Is there any attempt for this idea yet?

1 Like