OpenEHR Base package
0.1.0 - First Draft International flag

OpenEHR Base package, published by openEHR + HL7. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/openehr-fhir/base-spec/ and changes regularly. See the Directory of published versions

Logical Model: VERSIONED_OBJECT - XML Profile

Page standards status: Informative Maturity Level: 3

XML representation of the VERSIONED-OBJECT logical model.

Raw xml | Download


<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="VERSIONED-OBJECT"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureDefinition VERSIONED-OBJECT</b></p><a name="VERSIONED-OBJECT"> </a><a name="hcVERSIONED-OBJECT"> </a><table border="0" cellpadding="0" cellspacing="0" style="border: 0px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;"><tr style="border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top"><th style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="The logical name of the element">Name</a></th><th style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Information about the use of the element">Flags</a></th><th style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Minimum and Maximum # of times the element can appear in the instance">Card.</a></th><th style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px; width: 100px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Reference to the type of the element">Type</a></th><th style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; padding-top: 3px; padding-bottom: 3px" class="hierarchy"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Additional information about the element">Description &amp; Constraints</a><span style="float: right"><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/></a></span></th></tr><tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck1.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_element.gif" alt="." style="background-color: white; background-color: inherit" title="Element" class="hierarchy"/> <a href="StructureDefinition-VERSIONED-OBJECT-definitions.html#VERSIONED_OBJECT" title="Version control abstraction, defining semantics for versioning one complex object.">VERSIONED_OBJECT</a><a href="StructureDefinition-Any.html">&lt;T : Any&gt;</a><a name="VERSIONED_OBJECT"> </a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a style="padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;; padding-left: 3px; padding-right: 3px; border: 1px maroon solid; font-weight: bold; color: #301212; background-color: #fdf4f4;" href="http://hl7.org/fhir/R5/conformance-rules.html#constraints" title="This element has or is affected by constraints ( Version_count_valid, All_version_ids_valid, All_versions_valid, Latest_version_valid, Uid_validity )">C</a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">0..*</td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-Any.html">Any</a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Version control abstraction, defining semantics for versioning one complex object.<br class="constraint"/><span title="null" class="constraint">Constraints: </span><span style="font-weight:bold" title="Version count valid must satisfy range constraints" class="constraint">Version_count_valid</span><span title="null" class="constraint">, </span><span style="font-weight:bold" title="All version ids valid" class="constraint">All_version_ids_valid</span><span title="null" class="constraint">, </span><span style="font-weight:bold" title="All versions valid" class="constraint">All_versions_valid</span><span title="null" class="constraint">, </span><span style="font-weight:bold" title="Latest version valid must be present" class="constraint">Latest_version_valid</span><span title="null" class="constraint">, </span><span style="font-weight:bold" title="Uid validity must not be empty" class="constraint">Uid_validity</span><br/></td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Resource" class="hierarchy"/> <a href="StructureDefinition-VERSIONED-OBJECT-definitions.html#VERSIONED_OBJECT.uid" title="Unique identifier of this version container in the form of a UID with no extension. This id will be the same in all instances of the same container in a distributed environment, meaning that it can be understood as the uid of the  virtual version tree. ">uid</a><a href="StructureDefinition-Any.html">&lt;T : Any&gt;</a><a name="VERSIONED_OBJECT.uid"> </a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-HIER-OBJECT-ID.html">HIER_OBJECT_ID</a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Unique identifier of this version container in the form of a UID with no extension.</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: white"><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck10.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="." style="background-color: white; background-color: inherit" title="Resource" class="hierarchy"/> <a href="StructureDefinition-VERSIONED-OBJECT-definitions.html#VERSIONED_OBJECT.owner-id" title="Reference to object to which this version container belongs, e.g. the id of the containing EHR or other relevant owning entity. ">owner_id</a><a href="StructureDefinition-Any.html">&lt;T : Any&gt;</a><a name="VERSIONED_OBJECT.owner_id"> </a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-OBJECT-REF.html">OBJECT_REF</a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: white; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Reference to object to which this version container belongs, e.</td></tr>
<tr style="border: 0px #F0F0F0 solid; padding:0px; vertical-align: top; background-color: #F7F7F7"><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px; white-space: nowrap; background-image: url(tbl_bck00.png)" class="hierarchy"><img src="tbl_spacer.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="tbl_vjoin_end.png" alt="." style="background-color: inherit" class="hierarchy"/><img src="icon_resource.png" alt="." style="background-color: #F7F7F7; background-color: inherit" title="Resource" class="hierarchy"/> <a href="StructureDefinition-VERSIONED-OBJECT-definitions.html#VERSIONED_OBJECT.time-created" title="Time of initial creation of this versioned object. ">time_created</a><a href="StructureDefinition-Any.html">&lt;T : Any&gt;</a><a name="VERSIONED_OBJECT.time_created"> </a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"/><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">1..1</td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy"><a href="StructureDefinition-DV-DATE-TIME.html">DV_DATE_TIME</a></td><td style="vertical-align: top; text-align : var(--ig-left,left); background-color: #F7F7F7; border: 0px #F0F0F0 solid; padding:0px 4px 0px 4px" class="hierarchy">Time of initial creation of this versioned object.</td></tr>
<tr><td colspan="5" class="hierarchy"><br/><a href="https://build.fhir.org/ig/FHIR/ig-guidance/readingIgs.html#table-views" title="Legend for this format"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3goXBCwdPqAP0wAAAldJREFUOMuNk0tIlFEYhp9z/vE2jHkhxXA0zJCMitrUQlq4lnSltEqCFhFG2MJFhIvIFpkEWaTQqjaWZRkp0g26URZkTpbaaOJkDqk10szoODP//7XIMUe0elcfnPd9zsfLOYplGrpRwZaqTtw3K7PtGem7Q6FoidbGgqHVy/HRb669R+56zx7eRV1L31JGxYbBtjKK93cxeqfyQHbehkZbUkK20goELEuIzEd+dHS+qz/Y8PTSif0FnGkbiwcAjHaU1+QWOptFiyCLp/LnKptpqIuXHx6rbR26kJcBX3yLgBfnd7CxwJmflpP2wUg0HIAoUUpZBmKzELGWcN8nAr6Gpu7tLU/CkwAaoKTWRSQyt89Q8w6J+oVQkKnBoblH7V0PPvUOvDYXfopE/SJmALsxnVm6LbkotrUtNowMeIrVrBcBpaMmdS0j9df7abpSuy7HWehwJdt1lhVwi/J58U5beXGAF6c3UXLycw1wdFklArBn87xdh0ZsZtArghBdAA3+OEDVubG4UEzP6x1FOWneHh2VDAHBAt80IbdXDcesNoCvs3E5AFyNSU5nbrDPZpcUEQQTFZiEVx+51fxMhhyJEAgvlriadIJZZksRuwBYMOPBbO3hePVVqgEJhFeUuFLhIPkRP6BQLIBrmMenujm/3g4zc398awIe90Zb5A1vREALqneMcYgP/xVQWlG+Ncu5vgwwlaUNx+3799rfe96u9K0JSDXcOzOTJg4B6IgmXfsygc7/Bvg9g9E58/cDVmGIBOP/zT8Bz1zqWqpbXIsd0O9hajXfL6u4BaOS6SeWAAAAAElFTkSuQmCC" alt="doco" style="background-color: inherit"/> Documentation for this format</a></td></tr></table></div>
  </text>
  <contained>
    <OperationDefinition>
      <id value="version_count"/>
      <name value="version_count"/>
      <title value="version_count"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Return the total number of versions in this object."/>
      <code value="version_count"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="integer"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="all_version_ids"/>
      <name value="all_version_ids"/>
      <title value="all_version_ids"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Return a list of ids of all versions in this object. "/>
      <code value="all_version_ids"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="all_versions"/>
      <name value="all_versions"/>
      <title value="all_versions"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="Return a list of all versions in this object. "/>
      <code value="all_versions"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="*"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="has_version_at_time"/>
      <name value="has_version_at_time"/>
      <title value="has_version_at_time"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="True if a version for time  `_a_time_` exists. "/>
      <code value="has_version_at_time"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_time"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="dateTime"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="has_version_id"/>
      <name value="has_version_id"/>
      <title value="has_version_id"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="True if a version with `_a_version_uid_` exists. "/>
      <code value="has_version_id"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_version_uid"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="version_with_id"/>
      <name value="version_with_id"/>
      <title value="version_with_id"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Return the version with `_uid_` =  `_a_version_uid_`. 
"/>
      <code value="version_with_id"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_version_uid"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="is_original_version"/>
      <name value="is_original_version"/>
      <title value="is_original_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="True if version with `_a_version_uid_` is an `ORIGINAL_VERSION`. "/>
      <code value="is_original_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_version_uid"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="version_at_time"/>
      <name value="version_at_time"/>
      <title value="version_at_time"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="Return the version for time  `_a_time_`. "/>
      <code value="version_at_time"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_time"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="dateTime"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="revision_history"/>
      <name value="revision_history"/>
      <title value="revision_history"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="History of all audits and attestations in this versioned repository."/>
      <code value="revision_history"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="latest_version"/>
      <name value="latest_version"/>
      <title value="latest_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Return the most recently added version (i.e. on trunk or any branch). "/>
      <code value="latest_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="latest_trunk_version"/>
      <name value="latest_trunk_version"/>
      <title value="latest_trunk_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="Return the most recently added trunk version. "/>
      <code value="latest_trunk_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="trunk_lifecycle_state"/>
      <name value="trunk_lifecycle_state"/>
      <title value="trunk_lifecycle_state"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Return the lifecycle state from the latest trunk version. Useful for determining if the version container is logically deleted. "/>
      <code value="trunk_lifecycle_state"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="commit_original_version"/>
      <name value="commit_original_version"/>
      <title value="commit_original_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description value="Add a new original version. "/>
      <code value="commit_original_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_contribution"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_new_version_uid"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_preceding_version_id"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="an_audit"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_lifecycle_state"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="a_data"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="signing_key"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="commit_original_merged_version"/>
      <name value="commit_original_merged_version"/>
      <title value="commit_original_merged_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Add a new original merged version. This commit function adds a parameter containing the ids of other versions merged into the current one. "/>
      <code value="commit_original_merged_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_contribution"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_new_version_uid"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_preceding_version_id"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="an_audit"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_lifecycle_state"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="a_data"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="an_other_input_uids"/>
        <use value="in"/>
        <min value="1"/>
        <max value="*"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="signing_key"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="commit_imported_version"/>
      <name value="commit_imported_version"/>
      <title value="commit_imported_version"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Add a new imported version. Details of version id etc come from the `ORIGINAL_VERSION` being committed. "/>
      <code value="commit_imported_version"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="a_contribution"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="an_audit"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_version"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <contained>
    <OperationDefinition>
      <id value="commit_attestation"/>
      <name value="commit_attestation"/>
      <title value="commit_attestation"/>
      <status value="active"/>
      <kind value="operation"/>
      <description
                   value="Add a new attestation to a specified original version. Attestations can only be added to Original versions. "/>
      <code value="commit_attestation"/>
      <system value="false"/>
      <instance value="true"/>
      <parameter>
        <name value="an_attestation"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="a_ver_id"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
      <parameter>
        <name value="signing_key"/>
        <use value="in"/>
        <min value="1"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="return"/>
        <use value="out"/>
        <min value="1"/>
        <max value="1"/>
        <type value="Parameters"/>
      </parameter>
    </OperationDefinition>
  </contained>
  <extension url="http://hl7.org/fhir/tools/StructureDefinition/web-source">
    <valueUrl
              value="https://specifications.openehr.org/releases/RM/development/common.html#_versioned_object_class"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-parameter">
    <extension url="name">
      <valueCode value="T"/>
    </extension>
    <extension url="type">
      <valueUri value="http://openehr.org/fhir/StructureDefinition/Any"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#version_count"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#all_version_ids"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#all_versions"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#has_version_at_time"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#has_version_id"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#version_with_id"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#is_original_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#version_at_time"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#revision_history"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#latest_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#latest_trunk_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#trunk_lifecycle_state"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#commit_original_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#commit_original_merged_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#commit_imported_version"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/tools/StructureDefinition/type-operation">
    <valueCanonical value="#commit_attestation"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir"/>
  </extension>
  <extension url="http://hl7.org/fhir/tools/StructureDefinition/view-hint">
    <valueCode value="element-view-replace-cardinality"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical
                        value="http://openehr.org/fhir/ImplementationGuide/openehr.base"/>
      </extension>
    </valueInteger>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="informative">
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/structuredefinition-conformance-derivedFrom">
        <valueCanonical
                        value="http://openehr.org/fhir/ImplementationGuide/openehr.base"/>
      </extension>
    </valueCode>
  </extension>
  <url value="http://openehr.org/fhir/StructureDefinition/VERSIONED-OBJECT"/>
  <version value="0.1.0"/>
  <name value="VERSIONED_OBJECT"/>
  <title value="VERSIONED_OBJECT"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2025-09-06T15:35:39+10:00"/>
  <publisher value="openEHR + HL7"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.openehr.org"/>
    </telecom>
  </contact>
  <description
               value="Version control abstraction, defining semantics for versioning one complex object."/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <fhirVersion value="5.0.0"/>
  <mapping>
    <identity value="rim"/>
    <uri value="http://hl7.org/v3"/>
    <name value="RIM Mapping"/>
  </mapping>
  <kind value="logical"/>
  <abstract value="false"/>
  <type value="http://openehr.org/fhir/StructureDefinition/VERSIONED_OBJECT"/>
  <baseDefinition value="http://openehr.org/fhir/StructureDefinition/Any"/>
  <derivation value="specialization"/>
  <snapshot>
    <extension
               url="http://hl7.org/fhir/tools/StructureDefinition/snapshot-base-version">
      <valueString value="0.1.0"/>
    </extension>
    <element id="VERSIONED_OBJECT">
      <path value="VERSIONED_OBJECT"/>
      <short
             value="Version control abstraction, defining semantics for versioning one complex object."/>
      <definition
                  value="Version control abstraction, defining semantics for versioning one complex object."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="Base"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <constraint>
        <key value="Version_count_valid"/>
        <severity value="error"/>
        <human value="Version count valid must satisfy range constraints"/>
        <expression value="version_count() &gt;= 0"/>
      </constraint>
      <constraint>
        <key value="All_version_ids_valid"/>
        <severity value="error"/>
        <human value="All version ids valid"/>
        <expression value="all_version_ids().count() = version_count()"/>
      </constraint>
      <constraint>
        <key value="All_versions_valid"/>
        <severity value="error"/>
        <human value="All versions valid"/>
        <expression value="all_versions().count() = version_count()"/>
      </constraint>
      <constraint>
        <key value="Latest_version_valid"/>
        <severity value="error"/>
        <human value="Latest version valid must be present"/>
        <expression
                    value="version_count() &gt; 0 implies latest_version().exists()"/>
      </constraint>
      <constraint>
        <key value="Uid_validity"/>
        <severity value="error"/>
        <human value="Uid validity must not be empty"/>
        <expression value="extension.empty()"/>
      </constraint>
      <isModifier value="false"/>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element id="VERSIONED_OBJECT.uid">
      <path value="VERSIONED_OBJECT.uid"/>
      <short
             value="Unique identifier of this version container in the form of a UID with no extension."/>
      <definition
                  value="Unique identifier of this version container in the form of a UID with no extension. This id will be the same in all instances of the same container in a distributed environment, meaning that it can be understood as the uid of the  virtual version tree. "/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="VERSIONED_OBJECT.uid"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://openehr.org/fhir/StructureDefinition/HIER-OBJECT-ID"/>
      </type>
      <isModifier value="false"/>
    </element>
    <element id="VERSIONED_OBJECT.owner-id">
      <path value="VERSIONED_OBJECT.owner_id"/>
      <short
             value="Reference to object to which this version container belongs, e."/>
      <definition
                  value="Reference to object to which this version container belongs, e.g. the id of the containing EHR or other relevant owning entity. "/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="VERSIONED_OBJECT.owner_id"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="http://openehr.org/fhir/StructureDefinition/OBJECT-REF"/>
      </type>
      <isModifier value="false"/>
    </element>
    <element id="VERSIONED_OBJECT.time-created">
      <path value="VERSIONED_OBJECT.time_created"/>
      <short value="Time of initial creation of this versioned object."/>
      <definition
                  value="Time of initial creation of this versioned object. "/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="VERSIONED_OBJECT.time_created"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code
              value="http://openehr.org/fhir/StructureDefinition/DV-DATE-TIME"/>
      </type>
      <isModifier value="false"/>
    </element>
  </snapshot>
  <differential>
    <element id="VERSIONED_OBJECT">
      <path value="VERSIONED_OBJECT"/>
      <short
             value="Version control abstraction, defining semantics for versioning one complex object."/>
      <definition
                  value="Version control abstraction, defining semantics for versioning one complex object."/>
      <min value="0"/>
      <max value="*"/>
      <constraint>
        <key value="Version_count_valid"/>
        <severity value="error"/>
        <human value="Version count valid must satisfy range constraints"/>
        <expression value="version_count() &gt;= 0"/>
      </constraint>
      <constraint>
        <key value="All_version_ids_valid"/>
        <severity value="error"/>
        <human value="All version ids valid"/>
        <expression value="all_version_ids().count() = version_count()"/>
      </constraint>
      <constraint>
        <key value="All_versions_valid"/>
        <severity value="error"/>
        <human value="All versions valid"/>
        <expression value="all_versions().count() = version_count()"/>
      </constraint>
      <constraint>
        <key value="Latest_version_valid"/>
        <severity value="error"/>
        <human value="Latest version valid must be present"/>
        <expression
                    value="version_count() &gt; 0 implies latest_version().exists()"/>
      </constraint>
      <constraint>
        <key value="Uid_validity"/>
        <severity value="error"/>
        <human value="Uid validity must not be empty"/>
        <expression value="extension.empty()"/>
      </constraint>
      <isModifier value="false"/>
    </element>
    <element id="VERSIONED_OBJECT.uid">
      <path value="VERSIONED_OBJECT.uid"/>
      <short
             value="Unique identifier of this version container in the form of a UID with no extension."/>
      <definition
                  value="Unique identifier of this version container in the form of a UID with no extension. This id will be the same in all instances of the same container in a distributed environment, meaning that it can be understood as the uid of the  virtual version tree. "/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code
              value="http://openehr.org/fhir/StructureDefinition/HIER-OBJECT-ID"/>
      </type>
      <isModifier value="false"/>
    </element>
    <element id="VERSIONED_OBJECT.owner-id">
      <path value="VERSIONED_OBJECT.owner_id"/>
      <short
             value="Reference to object to which this version container belongs, e."/>
      <definition
                  value="Reference to object to which this version container belongs, e.g. the id of the containing EHR or other relevant owning entity. "/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code value="http://openehr.org/fhir/StructureDefinition/OBJECT-REF"/>
      </type>
      <isModifier value="false"/>
    </element>
    <element id="VERSIONED_OBJECT.time-created">
      <path value="VERSIONED_OBJECT.time_created"/>
      <short value="Time of initial creation of this versioned object."/>
      <definition
                  value="Time of initial creation of this versioned object. "/>
      <min value="1"/>
      <max value="1"/>
      <type>
        <code
              value="http://openehr.org/fhir/StructureDefinition/DV-DATE-TIME"/>
      </type>
      <isModifier value="false"/>
    </element>
  </differential>
</StructureDefinition>