# Problem when loading a GDL file containing a duration element into the GDL2 editor

**URL:** <https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100>\
**Category:** GDL editor\
**Created:** [23 November 2021 14:45 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100 "2021-11-23T14:45:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoraineC](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@LoraineC](https://discourse.openehr.org/u/LoraineC)\
**Post date:** [23 November 2021 14:45 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/1 "2021-11-23T14:45:13Z")

</div>

Hi everybody,

I get an error message when trying to load a GDL file into the GDL2 editor: _text cannot be parsed to a duration_.

The only duration element that I have in the file is the attribute _chronological age_, of the archetype _openEHR-EHR-OBSERVATION.age.v0_. Therefore, the problem should be in the way that I have set up a rule for this attribute. Here is an example of how I did this:

“$gt0028|Chronological age|\>=P60Y”

As I do make use of the ISO8601 notation, I do not understand what exactly is causing the problem. Is there anyone who has an idea on how to fix this?

Thank you in advance!

Cheers,

Loraine

---

<div class="post-metadata">

**Author:** ![LoraineC](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@LoraineC](https://discourse.openehr.org/u/LoraineC)\
**Post date:** [25 November 2021 15:21 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/2 "2021-11-25T15:21:55Z")

</div>

**Update** :

Changing the format to “$gt0028|Chronological age|\>=PT525948H46M” does work. Still I wonder why the previous format did not work.

Also, a new problem arises now: I cannot test the output of the guideline, because there is no input bar for chronological age under the execution tab, even after clicking the refresh button and re-uploading the document.

Ideas about why this happens and how to solve this problem, are most welcome!

---

<div class="post-metadata">

**Author:** ![rashmi](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@rashmi](https://discourse.openehr.org/u/rashmi)\
**Post date:** [1 December 2021 09:57 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/3 "2021-12-01T09:57:58Z")

</div>

Hi Loraine,

I am a clinical modeller from Cambio CDS. Thank you for bringing up this issue.

There indeed seems to be an issue with GDL2-Editor when using the data type DV\_DURATION for an element. We will soon organize a fix for this and get back to you.

Thanks again!

Cheers,  
Rashmi

---

<div class="post-metadata">

**Author:** ![rashmi](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@rashmi](https://discourse.openehr.org/u/rashmi)\
**Post date:** [9 December 2021 10:00 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/4 "2021-12-09T10:00:19Z")

</div>

Hi Loraine, the issue with uploading of gdl2 file with DV\_DURATION element and other related issues are fixed. But on further testing, it was revealed that gdl2 engine currently lacks support for the execution of DV\_DURATION element. So, we expect a short delay in a new release of the GDL2-editor with this fix included.

Meanwhile, as a workaround you can use DV\_QUANTITY for the Chronological age element with unit options in years or months (as per you requirements), for example, “$gt0028|Chronological age|\>=60,a”. We have also never used DV\_DURATION in rules, instead we use DV\_QUANTITY in such cases. Hope this helps to continue your modeling work.

We are happy to see that you are using the gdl2-editor and giving valuable feedback. Would it be possible to share some details in what context you are using it, so we can have a better understanding of different use cases.

Cheers, Rashmi

---

<div class="post-metadata">

**Author:** ![LoraineC](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/l/2acd7d/32.png) [@LoraineC](https://discourse.openehr.org/u/LoraineC)\
**Post date:** [13 December 2021 11:26 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/5 "2021-12-13T11:26:38Z")

</div>

Hi Rashmi,

Thank you very much for your help! Also, it is great to hear that you are already working on a fix.

In response to your question: we are translating human-interpretable medical guidelines to computer-interpretable medical guidelines, and in order to do so, we chose to work with OpenEHR and then the GDL2-editor.

Best wishes,

Loraine

---

<div class="post-metadata">

**Author:** ![rashmi](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@rashmi](https://discourse.openehr.org/u/rashmi)\
**Post date:** [11 February 2022 07:38 UTC](https://discourse.openehr.org/t/problem-when-loading-a-gdl-file-containing-a-duration-element-into-the-gdl2-editor/2100/6 "2022-02-11T07:38:18Z")

</div>

Hi Loraine,

Thank you for your response!  
It is to give you an update that we will be releasing the GDL2-editor with the DV\_DURATION support as early as possible. There has been some delay due to the work load.

Regards,  
Rashmi
