Element not allowed units_system in element list

I created an archetype with the RM type C_DV_QUANTITY using the Better Archetype Designer tool.
Then I created a template based on the above archetype and tried to validate it using the ehrbase-openehr-sdk Java library. However, I got this error:
Element not allowed: units_system in element list

This is the code segment in the OPT file that triggered the error.

I was unable to find units_system and units_display_name in the official openEHR schema specification.
Are these custom elements introduced by the Better Archetype Designer tool?
If so, how can I validate my OPT file against the openEHR standards?

Those attributes were added in Reference Model 1.1.0 release in 2020. Not sure what schema specification you are referring to.

DV_QUANTITY specification

1 Like

I’m using the openEHR_SDK version 2.26.0 to validate template .opt files in my application.

This is the schema used by the Java library:
https://github.com/ehrbase/openEHR_SDK/blob/release/v2.26.0/opt-1.4/src/main/xsd/BaseTypes.xsd

The SDK appears to be using the ITS XML schema version 1.0.2.
After investigating openEHR releases, I found the following:

  • RM Release 1.1.0 (29-Sep-2020): This RM model includes the elements you mentioned.

  • ITS-XML Release 2.0.0 (26-Apr-2021): This release includes the ITS along with the compatible XSDs.

However, even in the latest ITS release, the stable XML schemas are still marked as version 1.0.2:

It seems that the new changes introduced in RM Release 1.1.0 have not yet been incorporated into the stable ITS release. I believe that’s why the openEHR_SDK v2.26.0 Java library is still using the older 1.0.2 XSDs.

As a result, I’m still getting the 1.0.2 stable XSDs from the ITS release.

Do you have any idea why openEHR hasn’t released updated XSDs with the latest RM changes in the ITS releases?

I don’t, but I’ll open this topic on the specifications committee meeting next week and get back to you.

1 Like

So the conclusion basically is that the XSD models refer to an old version, while not explicitly stating that. Our plan is to add a note/statement to that accord ASAP, and then soon after that bring the XSD up to date. Thank you for noting the discrepancy!

1 Like

Thanks for the clarification! That sounds like a good plan . Do you also have an estimated timeline for updating the SDK Java library accordingly (ITS release)?

No; perhaps @sebastian.iancu can comment on that.

1 Like

Actually, I think that openEHR SDK library is from Ehrbase - perhaps @vidi42 can comment?

1 Like

We encountered another validation error:
Invalid xsi:type qname: ‘C_DV_SCALE’ in element attributes@http://schemas.openehr.org/v1

The DV_SCALE type was introduced in RM Release 1.1.0:
https://specifications.openehr.org/releases/ITS-XML/Release-2.0.0/components/RM/Release-1.1.0/DataTypes.xsd

However, it is not available in the latest ITS release. The stable XML schemas are still marked as version 1.0.2, and the openEHR_SDK v2.26.0 Java library is still using these older 1.0.2 XSDs.

Do we have any updates or plans to bring the XSDs up to date and update the SDK Java library accordingly (ITS release)?
@matijap, @vidi42 , @ian.mcnicoll

1 Like

I’ll bring it up at the next SEC call.

1 Like