Skip to content

Small correction to XSD in oet-parser #20

@ppazos

Description

@ppazos

I'm trying to validate the OPTs generated by the Template Designer.

The TD is generating a template_id in the definition element of OPTs and this schema doesn't include that node: https://github.com/openEHR/java-libs/blob/master/oet-parser/src/main/xsd/Template.xsd

Current:

<xs:complexType name="C_ARCHETYPE_ROOT">
  <xs:complexContent>
    <xs:extension base="C_COMPLEX_OBJECT">
      <xs:sequence>
        <xs:element name="archetype_id" type="ARCHETYPE_ID"/>
        <xs:element name="default_values" type="DEFAULT_VALUE" minOccurs="0" maxOccurs="unbounded"/>

Proposed change:

<xs:complexType name="C_ARCHETYPE_ROOT">
  <xs:complexContent>
    <xs:extension base="C_COMPLEX_OBJECT">
      <xs:sequence>
        <xs:element name="archetype_id" type="ARCHETYPE_ID"/>
        <xs:element name="template_id" type="TEMPLATE_ID" minOccurs="0"/>
        <xs:element name="default_values" type="DEFAULT_VALUE" minOccurs="0" maxOccurs="unbounded"/>

Example instance generated by TD: https://github.com/ppazos/cabolabs-ehrserver/blob/master/opts/Encuentro.opt

Problematic portion:

<definition>
...
<archetype_id>
  <value>openEHR-EHR-COMPOSITION.encounter.v1</value>
</archetype_id>
<template_id><!-- TD generated this -->
  <value>Encuentro</value>
</template_id>
<term_definitions code="at0000">
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions