# error in uploading a composition, from vcf\_report template, in FLAT format to FerroEHR

**URL:** <https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421>\
**Category:** Platform\
**Tags:** ferroehr\
**Created:** [22 October 2026 11:50 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421 "2026-10-22T11:50:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [22 October 2026 11:50 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/1 "2026-10-22T11:50:51Z")

</div>

When I try to insert a composition created for the vcf\_report template I get the following error:  
{“message”:“unprocessable entity: Simplified-Format conversion failed: unknown simplified path: vcf\_report/laboratory\_test\_result:0/any\_event:0/genomic\_variant\_result:0/genomic\_substitution\_variant:0/refer  
ence\_sequence”,“validationErrors”:[],“error”:“Unprocessable Entity”}

in the template “genomic\_substitution\_variant” occurrences are changed from 0..\* to 0..1 so there should not be genomic\_substitution\_variant:0 and in the composition I’m sending there is in fact:  
e.g., one of the lines is  
“vcf\_report/laboratory\_test\_result:0/any\_event:0/genomic\_variant\_result:0/genomic\_substitution\_variant/reference\_sequence/source\_name”: “NCBI”,

 ![Screenshot_20261022_135218](https://discourse.openehr.org/uploads/default/original/2X/8/8246af1ac835f4554e9206e83262fe388b31063d.png)

Any idea of what is happening? (the same composition is inserted with success in EHRbase)

---

<div class="post-metadata">

**Author:** ![rubentalstra](https://discourse.openehr.org/user_avatar/discourse.openehr.org/rubentalstra/32/6546_2.png) [@rubentalstra](https://discourse.openehr.org/u/rubentalstra)\
**Post date:** [22 October 2026 12:04 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/2 "2026-10-22T12:04:32Z")

</div>

Hi Giovanni,

The `:0` is not the problem. You don’t need it on a 0..1 node, FerroEHR just always puts the index in the path of the error message.

What the error actually says is that FerroEHR can’t find `reference_sequence` under `genomic_substitution_variant` in the web template it made from your template. In your screenshot that’s the slot with the `openEHR-EHR-CLUSTER.reference_sequence` filled in, so my guess is FerroEHR names or places that filled-in slot differently than EHRbase does.

Can you try this one?

```auto
GET /ferroehr/rest/openehr/v1/definition/template/adl1.4/vcf_report/example?format=FLAT&detail_level=complete

```

That gives you every FLAT path FerroEHR accepts for the template, so you can see what it expects under `genomic_substitution_variant`. If `reference_sequence` isn’t in there at all, that’s a bug on my side. Then please open an issue on [Issues · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/issues) with the OPT and the composition, so I can reproduce it.

---

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [22 October 2026 12:40 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/3 "2026-10-22T12:40:34Z")

</div>

thank you. I’ve posted the issue

---

<div class="post-metadata">

**Author:** ![rubentalstra](https://discourse.openehr.org/user_avatar/discourse.openehr.org/rubentalstra/32/6546_2.png) [@rubentalstra](https://discourse.openehr.org/u/rubentalstra)\
**Post date:** [22 October 2026 16:21 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/4 "2026-10-22T16:21:23Z")

</div>

the fixes are in the new release: [Release 5.3.2 · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/releases/tag/v5.3.2)

---

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [23 October 2026 07:12 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/5 "2026-10-23T07:12:58Z")

</div>

so quick. thank you. Unfortunately I have to report another problem with the same opt:

{“message”:“unprocessable entity: Simplified-Format conversion failed: unknown simplified path: vcf\_report/laboratory\_test\_result:0/test\_method”,“validationErrors”:[],“error”:“Unprocessable Entity”}

test\_method is missing in fact also in the example with detail=complete.

---

<div class="post-metadata">

**Author:** ![rubentalstra](https://discourse.openehr.org/user_avatar/discourse.openehr.org/rubentalstra/32/6546_2.png) [@rubentalstra](https://discourse.openehr.org/u/rubentalstra)\
**Post date:** [23 October 2026 11:29 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/6 "2026-10-23T11:29:32Z")

</div>

Thanks for the issue ([field missing in FLAT example creation from OPT · Issue #3933 · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/issues/3933)), it’s fixed in 5.3.3: [Release 5.3.3 · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/releases/tag/v5.3.3) what just got released.

`test_method` is an ELEMENT with no constraint on its value in the template, so any data value type is allowed there. FerroEHR used to drop that kind of node completely, which is why it wasn’t in the example and why the path got refused. Now it gets one path per data value type, the way the simplified formats spec does it for an open value.

So in your composition use:

```auto
"vcf_report/laboratory_test_result:0/test_method/text_value": "your method"

```

If your composition has just `.../test_method` with nothing after it, that’s the part to change. The example lists `test_method/coded_text_value` first, but `text_value` works the same way. I also went through the rest of `vcf_report` and `test_method` was the only node that was missing

if you find any more of these edge cases please let me know and while fixing this also found an SPEC issue: [upstream(ITS-REST): the Simplified Formats define no FLAT or STRUCTURED form for DV\_STATE · Issue #3936 · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/issues/3936)

---

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [23 October 2026 15:13 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/7 "2026-10-23T15:13:46Z")

</div>

thank you. Now I still have four errors, arguably two types of errors 😬  
{“message”:“4 validation error(s)”,“validationErrors”:

1)[“/content[openEHR-EHR-OBSERVATION.laboratory\_test\_result.v1]/protocol[at0004]/items[openEHR-EHR-CLUSTER.sequencing\_assay.v0]/items[openEHR-EHR-CLUSTER.reference\_sequence.v1]/items: cardinality violated: 2 children, expected at least 3”,

2)“/content[openEHR-EHR-OBSERVATION.laboratory\_test\_result.v1]/protocol[at0004]/items[openEHR-EHR-CLUSTER.sequencing\_assay.v0]/items[at0003]/value: expected RM type conforming to DV\_CODED\_TEXT but found DV\_TEXT”,

3)“/content[openEHR-EHR-OBSERVATION.laboratory\_test\_result.v1]/protocol[at0004]/items[openEHR-EHR-CLUSTER.sequencing\_assay.v0]/items[at0006]/items[openEHR-EHR-CLUSTER.reference\_sequence.v1]/items: cardinality violated: 2 children, expected at least 3”,

4)“/content[openEHR-EHR-OBSERVATION.laboratory\_test\_result.v1]/protocol[at0004]/items[openEHR-EHR-CLUSTER.sequencing\_assay.v0]/items[at0006]/items[openEHR-EHR-CLUSTER.reference\_sequence.v1]/items: cardinality violated: 2 children, expected at least 3”],“error”:"Unprocessable\*

1)below is the picture of the template for the first error. The children of “../sequencing\_assay/reference\_sequence/” are all optional in the template.

 ![Screenshot_20261023_165957](https://discourse.openehr.org/uploads/default/original/2X/0/0a3e6c1dbb06413b56e09a4590a85c8b38029ae8.png)

2)below is the picture of the template excerpt for the second error.  
“vcf\_report/laboratory\_test\_result:0/sequencing\_assay/nucleic\_acid|other”: “DNA”,

 ![Screenshot_20261023_165132](https://discourse.openehr.org/uploads/default/original/2X/c/c4dc43ec91dc0de03b34da67a3cc2b05cae1d825.png)

3 and 4) These seems similar to the first one. All the children are optional but the validator wants three of them having found only two.

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

---

<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:** [23 October 2026 19:58 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/8 "2026-10-23T19:58:01Z")

</div>

It is a cardinality setting in the reference sequence archetype

> **[Cluster Archetype: Reference sequence](https://ckm.openehr.org/ckm/archetypes/1013.1.3762/adl)**
>
> A sequence file that is used as a reference to describe genetic variants that are present in an analysed sequence. | The Clinical Knowledge Manager (CKM): A powerful collaboration tool for clinical data models. Powered by Ocean Health Systems.

Cardinality is different from occurences and refers to the number of items possible in a container. The adl says

items cardinality matches {3..\*; ordered}

Which neans a minimum of 3 elements in the cluster. The older archetype desigber let us set cardinalities but it proved tricky to use correctly and AD does not allow it to be adjusted. Edit to 0..\* and it shoukd work but also report to CKM.

---

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [27 October 2026 12:51 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/9 "2026-10-27T12:51:12Z")

</div>

The fix from Ian sorted out the reference\_sequence errors.

What about the error I reported as number 2 (see before for Archetype Designer figure) that is:  
{“message”:“1 validation error(s)”,“validationErrors”:[“/content[openEHR-EHR-OBSERVATION.laboratory\_test\_result.v1]/protocol[at0004]/items[openEHR-EHR-CLUSTER.sequencing\_assay.v0]/items[at0003]/value: expected RM type conforming to DV\_CODED\_TEXT but found DV\_TEXT”],“error”:“Unprocessable Entity”}

I’d imagine the problem is the use of “|other” to express DV\_TEXT when both DV\_CODED\_TEXT and DV\_TEXT are allowed. @rubentalstra isn’t this allowed in FerroEHR?

---

<div class="post-metadata">

**Author:** ![rubentalstra](https://discourse.openehr.org/user_avatar/discourse.openehr.org/rubentalstra/32/6546_2.png) [@rubentalstra](https://discourse.openehr.org/u/rubentalstra)\
**Post date:** [27 October 2026 13:08 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/10 "2026-10-27T13:08:15Z")

</div>

Hi @surfer,

That one is a bug on my side, your `|other` is correct. `nucleic_acid` allows both a coded value and free text, and FerroEHR only checked the coded one. I’m working on the fix in [FerroHEALTH/FerroEHR#4226](https://github.com/FerroHEALTH/FerroEHR/issues/4226), and it will be in the next release, 5.5.0.

Thank you for letting me know!

---

<div class="post-metadata">

**Author:** ![rubentalstra](https://discourse.openehr.org/user_avatar/discourse.openehr.org/rubentalstra/32/6546_2.png) [@rubentalstra](https://discourse.openehr.org/u/rubentalstra)\
**Post date:** [28 October 2026 06:21 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/11 "2026-10-28T06:21:37Z")

</div>

Hi @surfer,

I have just released: [Release 5.5.0 · FerroHEALTH/FerroEHR · GitHub](https://github.com/FerroHEALTH/FerroEHR/releases/tag/v5.5.0) with some big performance improvements and also the issues you have reported.

Many thanks again for testing and letting me know about your findings.

---

<div class="post-metadata">

**Author:** ![surfer](https://discourse.openehr.org/user_avatar/discourse.openehr.org/surfer/32/2326_2.png) [@surfer](https://discourse.openehr.org/u/surfer)\
**Post date:** [28 October 2026 12:01 UTC](https://discourse.openehr.org/t/error-in-uploading-a-composition-from-vcf-report-template-in-flat-format-to-ferroehr/17421/12 "2026-10-28T12:01:52Z")

</div>

your release fixes the last problem I had with that template. Thank you Ruben !
