Default values in OPT 1.4

Several versions of the OPT 1.4 XSD seem to be used. Pablo did a comparison of the different versions in OPT version, schema & document - #34 by pablo .

I am currently writing a converter from OPT 1.4 to ADL 2 templates in source form. It now mostly works and can be found in Opt 1.4 parser and converter by pieterbos · Pull Request #261 · openEHR/archie · GitHub . It can also be used to parse OPT 1.4 into the AOM 2 directly, without conversion.

However, in the different OPT 1.4 versions, the way to define default values is very different:

  • one has default values on every C_ARCHETYPE_ROOT, with a path, in terms of primitive types (string, boolean, integer, etc)
    • a sub-variant, where this can be on every C_COMPLEX_OBJECT instead
  • one has a separate section, containing a mapping from paths to extended C_ATTRIBUTES, with default values defined as DV_ types, so DV_TEXT, DV_CODED_TEXT, etc.

All of the OPTs I found use the second variant, with a separate section. I could write the first one as well relatively easily, but of course only if it is in use.

So my question: Is the other variant of defining default values actually used? If the variant on C_ARCHETYPE_ROOT is used, does anyone have any examples of that?

Are you just talking about what the _default blocks look like in OPT1.4, not the generated OPT2, which should have them inline, like ADL2?

Yes, just OPT 1.4 there are several versions of the XSDs in use. So I would like to know if this specific feature is actually in use as well in the different variants.

In OPT2 it is very clear what to do.

1 Like