# Process of creating an openEHR system

**URL:** https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792
**Category:** New to openEHR?
**Tags:** archetype, ehrbase, template
**Created:** [21 August 2021 06:37 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792 "2021-08-21T06:37:23Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Yash](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yash/32/1308_2.png) [@Yash](https://discourse.openehr.org/u/Yash)
#### Post date: [21 August 2021 06:37 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/1 "2021-08-21T06:37:23Z")

</div>

Hello Forum , I am very new to openEHR and from my understanding to create a openEHR based website from collection patient data I have created a few steps to follow , but I am not able to understand if this is accurate and I am not able to move beyond it.  
Please correct me if I am wrong and suggest steps after the ones I have listed

Step 1 : Create template from achetypes using Archetype Designer  
Step 2 : Upload that template to an EHRbase server  
Step 3 : Convert the template to a HTML Form and create a website  
Step 4 : Upload a EHR without any body in EHRbase by the ehr\_id  
Step 5 : Upload a composition (I am not clear as to what I have to do here and after here)

PLease suggest sources to learn from if you can  
Thank You

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [21 August 2021 07:51 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/2 "2021-08-21T07:51:45Z")

</div>

Hi, this article will give you some hints [CaboLabs Blog - How to work with an openEHR Clinical Data Repository - step by step](https://www.cabolabs.com/blog/article/how_to_work_with_an_openehr_clinical_data_repository__step_by_step-5c51bc1c3ac69.html)

---

<div class="post-metadata">

### Author: ![Yash](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yash/32/1308_2.png) [@Yash](https://discourse.openehr.org/u/Yash)
#### Post date: [21 August 2021 08:02 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/3 "2021-08-21T08:02:09Z")

</div>

@pablo Thank You Dear sir , I have but one query , does the same logic apply with ehrbase ?

---

<div class="post-metadata">

### Author: ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)
#### Post date: [21 August 2021 09:01 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/4 "2021-08-21T09:01:28Z")

</div>

Hi,

I recommend to check the videos from @Sidharth_Ramesh:

[![](https://discourse.openehr.org/uploads/default/original/2X/b/b56782c2a62283309082a417ce2294a78266d856.jpeg "Building Fast and Interactive User Interfaces using Web Components - 4th openEHR Asia Summit 2021") ](https://www.youtube.com/watch?v=ng9lkQKa2KE)

[![](https://discourse.openehr.org/uploads/default/original/2X/d/d377fd24ae5bc5e66db96b1a0cb64110e57eef37.jpeg "Medblocks UI - openEHR Asia conference Full Demo (no audio)") ](https://www.youtube.com/watch?v=Es5K2NLib_E)

[![](https://discourse.openehr.org/uploads/default/original/2X/a/a43948a510d748ef484ed1b0d8b58b3603dd3424.jpeg "Setting up EHRbase | openEHR Series - Part 3") ](https://www.youtube.com/watch?v=F-jHqu2e-Ac)

I will later also post a postman library here that will provide you with some example payload data for posting compositions in canonical and flat formats.

Please also take a look at the Software Development Kit with many examples how to create instance data using a Java client:

> **[GitHub - ehrbase/openEHR\_SDK: A SDK to facilitate the development of openEHR...](https://github.com/ehrbase/openEHR_SDK)**
>
> A SDK to facilitate the development of openEHR applications - GitHub - ehrbase/openEHR\_SDK: A SDK to facilitate the development of openEHR applications

---

<div class="post-metadata">

### Author: ![Yash](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yash/32/1308_2.png) [@Yash](https://discourse.openehr.org/u/Yash)
#### Post date: [21 August 2021 15:22 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/5 "2021-08-21T15:22:01Z")

</div>

Thank You @birger.haarbrandt I did follow this guide but it covers till setup of EHRbase and posting of template as of now. I wanted to kknow the steps after that.

---

<div class="post-metadata">

### Author: ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)
#### Post date: [21 August 2021 15:43 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/6 "2021-08-21T15:43:10Z")

</div>

Do you have concrete issues setting up Medblocks or the Software Development Kit? I would advise you to use of these two to get started.

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [21 August 2021 18:55 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/7 "2021-08-21T18:55:45Z")

</div>

> [@Yash](#):
>
> does the same logic apply with ehrbase ?

The conceptual steps should apply to any openEHR CDR. Some might differ depending on the vendor.

---

<div class="post-metadata">

### Author: ![Sidharth\_Ramesh](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sidharth_ramesh/32/674_2.png) [@Sidharth\_Ramesh](https://discourse.openehr.org/u/Sidharth_Ramesh)
#### Post date: [23 August 2021 10:49 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/8 "2021-08-23T10:49:44Z")

</div>

Hey @Yash, I’m actually releasing the next video for creating compositions this week. I’m currently doing some research on all the possible methods to create an openEHR composition. I’d like to ask community members also to add to my list if I’ve missed any:

1. Example endpoint from Better CDR/EHR.DB (paid)
2. Example composition using - [https://toolkit.cabolabs.com/](https://toolkit.cabolabs.com/) (works with EHRServer. No canonical JSON in free version. Correct me if wrong @pablo)
3. Using EHRbase SDK
4. [VScode extension by Nedap](https://marketplace.visualstudio.com/items?itemName=NedapHealthcare.openehr-adl-lsp) (awaiting confirmation from @pieterbos)
5. Medblocks UI

Also, my team has actually taken a look at your template. We’ve created a working UI for you (except for some RM types in the template that haven’t been implemented by Medblocks UI).

---

<div class="post-metadata">

### Author: ![Yash](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yash/32/1308_2.png) [@Yash](https://discourse.openehr.org/u/Yash)
#### Post date: [26 August 2021 00:47 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/9 "2021-08-26T00:47:01Z")

</div>

Thank You @Sidharth_Ramesh , looking forward to learning more from your channel  
Cheers !!

---

<div class="post-metadata">

### Author: ![ian.mcnicoll](https://discourse.openehr.org/user_avatar/discourse.openehr.org/ian.mcnicoll/32/4430_2.png) [@ian.mcnicoll](https://discourse.openehr.org/u/ian.mcnicoll)
#### Post date: [26 August 2021 07:32 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/10 "2021-08-26T07:32:45Z")

</div>

Is your template publicly available @Yash ?

---

<div class="post-metadata">

### Author: ![Yash](https://discourse.openehr.org/user_avatar/discourse.openehr.org/yash/32/1308_2.png) [@Yash](https://discourse.openehr.org/u/Yash)
#### Post date: [26 August 2021 10:18 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/11 "2021-08-26T10:18:47Z")

</div>

It is , Yes  
I will link it here : [Open EHR – Google&nbsp;Drive](https://drive.google.com/drive/folders/1QVS5861N49Bnuwv2fV0-0DyKcD8To5Yx?usp=sharing)

---

<div class="post-metadata">

### Author: ![Sidharth\_Ramesh](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sidharth_ramesh/32/674_2.png) [@Sidharth\_Ramesh](https://discourse.openehr.org/u/Sidharth_Ramesh)
#### Post date: [27 August 2021 19:53 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/12 "2021-08-27T19:53:49Z")

</div>

Hey people! Can someone fact check this and point out any errors?

 ![image](https://discourse.openehr.org/uploads/default/original/2X/a/a2819b7b7a6b84db7d852289dbf0d0cd9cdc72ec.png)

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [28 August 2021 00:52 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/13 "2021-08-28T00:52:58Z")

</div>

> [@Sidharth\_Ramesh](#):
>
> Example composition using - [https://toolkit.cabolabs.com/](https://toolkit.cabolabs.com/) (works with EHRServer. No canonical JSON in free version. Correct me if wrong @pablo)

Hi @Sidharth_Ramesh the toolkit has generation for the canonical JSON, though the new version wasn’t deployed yet. Though that is included in the open source CLI tool [GitHub - ppazos/openEHR-OPT: Java/Groovy Support of openEHR Operational Templates, Reference Model, Data Generators and other tools for www.CaboLabs.com projects](https://github.com/ppazos/openEHR-OPT)

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [28 August 2021 01:02 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/14 "2021-08-28T01:02:39Z")

</div>

Hi @Sidharth_Ramesh the EHRServer canonical JSON support is implemented though it is not merged yet, needs more testing, but will be there in a couple of weeks or so.

About the EHRServer JSON, it is just a canonical transformation from the canonical XML to JSON (each XML element and attribute is just converted into JSON, IIRC uses [XStream - Two Minute Tutorial](https://x-stream.github.io/tutorial.html)).

The FLAT JSON is a format from Marand AFAIK. It was ported to EHRbase but I think there are some differences that the team is working on, in fact I was creating some tests for that for EHRbase at HiGHmed. I don’t know if that implementation was ported back to EtherCIS, maybe @ian.mcnicoll or @christian can confirm.

What I do confirm is EHRServer doesn’t have plans to support formats that are not canonical or well specified. Maybe when Marand’s FLAT becomes an openEHR spec, we will consider to add support for it.

Another format that we want to support is OPT is JSON, which I think can benefit implementations, since JSON is kind of default on REST APIs, it is annoying to work all data in JSON then OPTs in XML. Something similar would apply to for systems that work with archetypes, instead of working with ADL/XML we would support archetypes in JSON.

Good chart, thanks for sharing.

---

<div class="post-metadata">

### Author: ![Sidharth\_Ramesh](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sidharth_ramesh/32/674_2.png) [@Sidharth\_Ramesh](https://discourse.openehr.org/u/Sidharth_Ramesh)
#### Post date: [28 August 2021 06:05 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/15 "2021-08-28T06:05:07Z")

</div>

Thanks for the input! Yup, I’ve already built out your openEHR-OPT groovy code, and it seems to be generating both canonical XML and JSON correctly. The UI generation is also really cool.

So, okay. Canonical JSON planned for EHRServer as well as the toolkit. Got it.

Regarding Marand’s FLAT in EtherCIS, I was going based on the documentation [here](https://github.com/ethercis/ethercis/blob/master/doc/flat%20json.md). Seems to support the format. Will also wait for @christian to confirm. (Although the video is going up tomorrow 🤞)

JSON Templates will be really cool. I’ve always used web templates wherever I can anyway, because of how tedious it is to work with XML on the front-end.

Also, the openEHR-OPT seems to fail with this massive demon of a template - it’s an Encounter that includes the Demo archetype without constraining any elements 😅  
[Demo Encounter.opt](https://discourse.openehr.org/uploads/short-url/6FjEKXRPTNhp29lku3tmWVjmLws.opt) (263.7 KB).

But most other real-world templates were working just fine!

---

<div class="post-metadata">

### Author: ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)
#### Post date: [28 August 2021 06:59 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/16 "2021-08-28T06:59:51Z")

</div>

Short note: in EHRbase/SDK, we directly follow the flat implementation as it was introduced by Better. It is very much aligned as we are using their integration tests and we aim to be a compatible as possible.

EtherCIS used a pre-built lib from Marand/Better for the flat format whereas EHRbase has its own open source implementation. This being said, I’m quite sure there won’t be any updates on EtherCIS as EHRbase can be considered EtherCIS 2.0. We will eventually also support the Structured Format.

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [28 August 2021 07:05 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/17 "2021-08-28T07:05:22Z")

</div>

Can you paste the error for that template?

---

<div class="post-metadata">

### Author: ![Sidharth\_Ramesh](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sidharth_ramesh/32/674_2.png) [@Sidharth\_Ramesh](https://discourse.openehr.org/u/Sidharth_Ramesh)
#### Post date: [28 August 2021 19:57 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/18 "2021-08-28T19:57:39Z")

</div>

It was a super long error, so I just piped it out to this file (.txt upload is not supported in the forum @thomas.beale?)

[logs.md](https://discourse.openehr.org/uploads/short-url/hVsDyYJIgSYD4xoJ6rPqbi4cMcs.md) (48.6 KB)

---

<div class="post-metadata">

### Author: ![Sidharth\_Ramesh](https://discourse.openehr.org/user_avatar/discourse.openehr.org/sidharth_ramesh/32/674_2.png) [@Sidharth\_Ramesh](https://discourse.openehr.org/u/Sidharth_Ramesh)
#### Post date: [28 August 2021 19:59 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/19 "2021-08-28T19:59:08Z")

</div>

Alright. Video is up:

[![](https://discourse.openehr.org/uploads/default/original/2X/6/6c54a9d98740d7696c942652a79eab9f6c348d49.jpeg "openEHR Compositions and APIs | openEHR Series - Part 4") ](https://www.youtube.com/watch?v=_rzI1Fj6AOY)

I’ll cover openEHR-OPT by @pablo and EHRbase SDK in the coming few videos.

---

<div class="post-metadata">

### Author: ![pablo](https://discourse.openehr.org/user_avatar/discourse.openehr.org/pablo/32/3505_2.png) [@pablo](https://discourse.openehr.org/u/pablo)
#### Post date: [28 August 2021 21:06 UTC](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792/20 "2021-08-28T21:06:04Z")

</div>

Seems a missing lowerUnbounded on an interval?

```auto
Exception in thread "main" java.lang.NullPointerException: Cannot get property 'lowerUnbounded' on null object
	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
	at com.cabolabs.openehr.opt.instance_generator.XmlInstanceGenerator$_generate_DV_INTERVAL__DV_QUANTITY_closure71$_closure177.doCall(XmlInstanceGenerator.groovy:1756

```

[Next page](https://discourse.openehr.org/t/process-of-creating-an-openehr-system/1792.md?page=2)
