Permalink
Fetching contributors…
Cannot retrieve contributors at this time
997 lines (988 sloc) 44.1 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--This Xml Schema was auto-generated by the "SchemaLightener".--><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.openehr.org/v1"
targetNamespace="http://schemas.openehr.org/v1"
elementFormDefault="qualified"
version="v1.0.2"
id="Version.xsd">
<xs:element name="version" type="VERSION"/>
<xs:element name="composition" type="COMPOSITION"/>
<xs:element name="items" type="LOCATABLE"/>
<xs:simpleType name="PROPORTION_KIND">
<xs:restriction base="xs:integer">
<xs:enumeration value="0" id="pk_ratio"/>
<xs:enumeration value="1" id="pk_unitary"/>
<xs:enumeration value="2" id="pk_percent"/>
<xs:enumeration value="3" id="pk_fraction"/>
<xs:enumeration value="4" id="pk_integer_fraction"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Iso8601DateTime">
<xs:restriction base="xs:string">
<xs:pattern value="\d{4}((0[1-9]|1[0-2])((0[1-9]|[12]\d|3[01])(T?([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(00|30)?))?)?)?)?|\d{4}(\-(0[1-9]|1[0-2])(\-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?)?)?)?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Iso8601Date">
<xs:restriction base="xs:string">
<xs:pattern value="\d{4}((((0[1-9])|(1[0-2]))((0[1-9])|([12]\d)|(3[01]))?)?|(\-(((0[1-9])|(1[0-2]))(\-((0[1-9])|([12]\d)|(3[01])))?)?)?)"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Iso8601Time">
<xs:restriction base="xs:string">
<xs:pattern value="([01]\d|2[0-3])([0-5]\d([0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(00|30)?))?|([01]\d|2[0-3])(:[0-5]\d(:[0-5]\d([,.]\d+)?)?)?(Z|([+\-]((0\d)|(1[0-2]))(:(00|30))?))?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Iso8601Duration">
<xs:restriction base="xs:string">
<xs:pattern value="P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="matchString">
<xs:restriction base="xs:string">
<xs:pattern value="\?"/>
<xs:pattern value="&lt;"/>
<xs:pattern value="&gt;"/>
<xs:pattern value="="/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="archetypeNodeId">
<xs:restriction base="xs:string">
<xs:pattern value="([a-zA-Z][\w_]*-[\w][\w_]*-[\w][\w_]*\.[\w][\w_]*(-[\w][\w_]*)*\.v\d+(\.\d)*)|(at(0\.[0-9]{1,4}|[0-9]{4})(\.[0-9]{1,3})*)"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="atCode">
<xs:restriction base="xs:string">
<xs:pattern value="at(0\.[0-9]{1,4}|[0-9]{4})(\.[0-9]{1,3})*"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="VERSION" abstract="true">
<xs:sequence>
<xs:element name="contribution" type="OBJECT_REF"/>
<xs:element name="commit_audit" type="AUDIT_DETAILS"/>
<xs:element name="signature" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ORIGINAL_VERSION">
<xs:complexContent>
<xs:extension base="VERSION">
<xs:sequence>
<!-- relaxed schema 0..1 uid -->
<xs:element name="uid" type="OBJECT_VERSION_ID" minOccurs="0" maxOccurs="1"/>
<xs:element name="data" type="xs:anyType" minOccurs="0" maxOccurs="1"/>
<xs:element name="preceding_version_uid" type="OBJECT_VERSION_ID" minOccurs="0" maxOccurs="1"/>
<xs:element name="other_input_version_uids" type="OBJECT_VERSION_ID" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="attestations" type="ATTESTATION" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="lifecycle_state" type="DV_CODED_TEXT"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IMPORTED_VERSION">
<xs:complexContent>
<xs:extension base="VERSION">
<xs:sequence>
<xs:element name="item" type="ORIGINAL_VERSION"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="COMPOSITION">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="language" type="CODE_PHRASE"/>
<xs:element name="territory" type="CODE_PHRASE"/>
<xs:element name="category" type="DV_CODED_TEXT"/>
<xs:element name="composer" type="PARTY_PROXY"/>
<xs:element name="context" type="EVENT_CONTEXT" minOccurs="0"/>
<xs:element name="content" type="CONTENT_ITEM" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EVENT_CONTEXT">
<xs:sequence>
<xs:element name="start_time" type="DV_DATE_TIME"/>
<xs:element name="end_time" type="DV_DATE_TIME" minOccurs="0"/>
<xs:element name="location" type="xs:string" minOccurs="0"/>
<xs:element name="setting" type="DV_CODED_TEXT"/>
<xs:element name="other_context" type="ITEM_STRUCTURE" minOccurs="0"/>
<xs:element name="health_care_facility" type="PARTY_IDENTIFIED" minOccurs="0"/>
<xs:element name="participations" type="PARTICIPATION" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CONTENT_ITEM" abstract="true">
<xs:complexContent>
<xs:extension base="LOCATABLE"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="SECTION">
<xs:complexContent>
<xs:extension base="CONTENT_ITEM">
<xs:sequence>
<xs:element name="items" type="CONTENT_ITEM" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="GENERIC_ENTRY">
<xs:complexContent>
<xs:extension base="CONTENT_ITEM">
<xs:sequence>
<xs:element name="data" type="ITEM_TREE"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ENTRY" abstract="true">
<xs:complexContent>
<xs:extension base="CONTENT_ITEM">
<xs:sequence>
<xs:element name="language" type="CODE_PHRASE"/>
<xs:element name="encoding" type="CODE_PHRASE"/>
<xs:element name="subject" type="PARTY_PROXY"/>
<xs:element name="provider" type="PARTY_PROXY" minOccurs="0"/>
<xs:element name="other_participations" type="PARTICIPATION" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="work_flow_id" type="OBJECT_REF" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ADMIN_ENTRY">
<xs:complexContent>
<xs:extension base="ENTRY">
<xs:sequence>
<xs:element name="data" type="ITEM_STRUCTURE"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CARE_ENTRY" abstract="true">
<xs:complexContent>
<xs:extension base="ENTRY">
<xs:sequence>
<xs:element name="protocol" type="ITEM_STRUCTURE" minOccurs="0"/>
<xs:element name="guideline_id" type="OBJECT_REF" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EVALUATION">
<xs:complexContent>
<xs:extension base="CARE_ENTRY">
<xs:sequence>
<xs:element name="data" type="ITEM_STRUCTURE"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="OBSERVATION">
<xs:complexContent>
<xs:extension base="CARE_ENTRY">
<xs:sequence>
<xs:element name="data" type="HISTORY"/>
<xs:element name="state" type="HISTORY" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="INSTRUCTION">
<xs:complexContent>
<xs:extension base="CARE_ENTRY">
<xs:sequence>
<xs:element name="narrative" type="DV_TEXT"/>
<xs:element name="expiry_time" type="DV_DATE_TIME" minOccurs="0"/>
<xs:element name="wf_definition" type="DV_PARSABLE" minOccurs="0"/>
<xs:element name="activities" type="ACTIVITY" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ACTION">
<xs:complexContent>
<xs:extension base="CARE_ENTRY">
<xs:sequence>
<xs:element name="time" type="DV_DATE_TIME"/>
<xs:element name="description" type="ITEM_STRUCTURE"/>
<xs:element name="ism_transition" type="ISM_TRANSITION"/>
<xs:element name="instruction_details" type="INSTRUCTION_DETAILS" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ACTIVITY">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="description" type="ITEM_STRUCTURE"/>
<xs:element name="timing" type="DV_PARSABLE"/>
<xs:element name="action_archetype_id" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="INSTRUCTION_DETAILS">
<xs:sequence>
<xs:element name="instruction_id" type="LOCATABLE_REF"/>
<xs:element name="activity_id" type="atCode"/>
<xs:element name="wf_details" type="ITEM_STRUCTURE" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ISM_TRANSITION">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="current_state" type="DV_CODED_TEXT"/>
<xs:element name="transition" type="DV_CODED_TEXT" minOccurs="0"/>
<xs:element name="careflow_step" type="DV_CODED_TEXT" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="LOCATABLE" abstract="true">
<xs:sequence>
<xs:element name="name" type="DV_TEXT"/>
<xs:element name="uid" type="UID_BASED_ID" minOccurs="0"/>
<xs:element name="links" type="LINK" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="archetype_details" type="ARCHETYPED" minOccurs="0" maxOccurs="1"/>
<xs:element name="feeder_audit" type="FEEDER_AUDIT" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="archetype_node_id" type="archetypeNodeId" use="required"/>
</xs:complexType>
<xs:complexType name="ARCHETYPED">
<xs:sequence>
<xs:element name="archetype_id" type="ARCHETYPE_ID"/>
<xs:element name="template_id" type="TEMPLATE_ID" minOccurs="0" maxOccurs="1"/>
<xs:element name="rm_version" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LINK">
<xs:sequence>
<xs:element name="meaning" type="DV_TEXT"/>
<xs:element name="type" type="DV_TEXT"/>
<xs:element name="target" type="DV_EHR_URI"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FOLDER">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="folders" type="FOLDER" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="items" type="OBJECT_REF" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="HISTORY">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="origin" type="DV_DATE_TIME" minOccurs="1" maxOccurs="1"/>
<xs:element name="period" type="DV_DURATION" minOccurs="0"/>
<xs:element name="duration" type="DV_DURATION" minOccurs="0"/>
<xs:element name="events" type="EVENT" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="summary" type="ITEM_STRUCTURE" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EVENT" abstract="true">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence>
<xs:element name="time" type="DV_DATE_TIME"/>
<xs:element name="data" type="ITEM_STRUCTURE"/>
<xs:element name="state" type="ITEM_STRUCTURE" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="POINT_EVENT">
<xs:complexContent>
<xs:extension base="EVENT"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="INTERVAL_EVENT">
<xs:complexContent>
<xs:extension base="EVENT">
<xs:sequence>
<xs:element name="width" type="DV_DURATION"/>
<xs:element name="sample_count" type="xs:int" minOccurs="0"/>
<xs:element name="math_function" type="DV_CODED_TEXT"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM_STRUCTURE" abstract="true">
<xs:complexContent>
<xs:extension base="LOCATABLE"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM_SINGLE">
<xs:complexContent>
<xs:extension base="ITEM_STRUCTURE">
<xs:sequence>
<xs:element name="item" type="ELEMENT"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM_LIST">
<xs:complexContent>
<xs:extension base="ITEM_STRUCTURE">
<xs:sequence>
<xs:element name="items" type="ELEMENT" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM_TREE">
<xs:complexContent>
<xs:extension base="ITEM_STRUCTURE">
<xs:sequence>
<xs:element name="items" type="ITEM" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM_TABLE">
<xs:complexContent>
<xs:extension base="ITEM_STRUCTURE">
<xs:sequence>
<xs:element name="rows" type="CLUSTER" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ITEM" abstract="true">
<xs:complexContent>
<xs:extension base="LOCATABLE">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CLUSTER">
<xs:complexContent>
<xs:extension base="ITEM">
<xs:sequence>
<xs:element name="items" type="ITEM" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ELEMENT">
<xs:complexContent>
<xs:extension base="ITEM">
<xs:sequence>
<xs:element name="value" type="DATA_VALUE" minOccurs="0"/>
<xs:element name="null_flavour" type="DV_CODED_TEXT" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DATA_VALUE" abstract="true">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="DV_BOOLEAN">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="value" type="xs:boolean"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_IDENTIFIER">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="issuer" type="NotEmptyString"/>
<xs:element name="assigner" type="NotEmptyString"/>
<xs:element name="id" type="NotEmptyString"/>
<xs:element name="type" type="NotEmptyString"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_STATE">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="value" type="DV_CODED_TEXT"/>
<xs:element name="is_terminal" type="xs:boolean"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_ORDERED" abstract="true">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="normal_range" type="DV_INTERVAL" minOccurs="0"/>
<xs:element name="other_reference_ranges" type="REFERENCE_RANGE" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="normal_status" type="CODE_PHRASE" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_INTERVAL">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="lower" type="DV_ORDERED" minOccurs="0"/>
<xs:element name="upper" type="DV_ORDERED" minOccurs="0"/>
<xs:element name="lower_included" type="xs:boolean" minOccurs="0"/>
<xs:element name="upper_included" type="xs:boolean" minOccurs="0"/>
<xs:element name="lower_unbounded" type="xs:boolean"/>
<xs:element name="upper_unbounded" type="xs:boolean"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="REFERENCE_RANGE">
<xs:sequence>
<xs:element name="meaning" type="DV_TEXT"/>
<xs:element name="range" type="DV_INTERVAL"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DV_QUANTIFIED" abstract="true">
<xs:complexContent>
<xs:extension base="DV_ORDERED">
<xs:sequence>
<xs:element name="magnitude_status" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_COUNT">
<xs:complexContent>
<xs:extension base="DV_AMOUNT">
<xs:sequence>
<xs:element name="magnitude" type="xs:long"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_AMOUNT">
<xs:complexContent>
<xs:extension base="DV_QUANTIFIED">
<xs:sequence>
<xs:element name="accuracy" type="xs:float" minOccurs="0" default="-1.0"/>
<xs:element name="accuracy_is_percent" type="xs:boolean" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_TEMPORAL">
<xs:complexContent>
<xs:extension base="DV_QUANTIFIED">
<xs:sequence>
<xs:element name="accuracy" type="DV_DURATION" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_QUANTITY">
<xs:complexContent>
<xs:extension base="DV_AMOUNT">
<xs:sequence>
<xs:element name="magnitude" type="xs:double"/>
<xs:element name="units" type="NotEmptyString"/>
<xs:element name="precision" type="xs:int" default="-1" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_ORDINAL">
<xs:complexContent>
<xs:extension base="DV_ORDERED">
<xs:sequence>
<xs:element name="value" type="xs:int"/>
<xs:element name="symbol" type="DV_CODED_TEXT"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_PROPORTION">
<xs:complexContent>
<xs:extension base="DV_AMOUNT">
<xs:sequence>
<xs:element name="numerator" type="xs:float"/>
<xs:element name="denominator" type="xs:float"/>
<xs:element name="type" type="PROPORTION_KIND"/>
<xs:element name="precision" type="xs:int" default="-1" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_PARAGRAPH">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="items" type="DV_TEXT" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_TEXT">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="value" type="NotEmptyString"/>
<xs:element name="hyperlink" type="DV_URI" minOccurs="0"/>
<xs:element name="formatting" type="xs:string" minOccurs="0"/>
<xs:element name="mappings" type="TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="language" type="CODE_PHRASE" minOccurs="0"/>
<xs:element name="encoding" type="CODE_PHRASE" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_CODED_TEXT">
<xs:complexContent>
<xs:extension base="DV_TEXT">
<xs:sequence>
<xs:element name="defining_code" type="CODE_PHRASE"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="CODE_PHRASE">
<xs:sequence>
<xs:element name="terminology_id" type="TERMINOLOGY_ID"/>
<xs:element name="code_string" type="NotEmptyString"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TERM_MAPPING">
<xs:sequence>
<xs:element name="match" type="matchString" default="?"/>
<xs:element name="purpose" type="DV_CODED_TEXT" minOccurs="0"/>
<xs:element name="target" type="CODE_PHRASE"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DV_DATE_TIME">
<xs:complexContent>
<xs:extension base="DV_TEMPORAL">
<xs:sequence>
<xs:element name="value" type="Iso8601DateTime"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_TIME">
<xs:complexContent>
<xs:extension base="DV_TEMPORAL">
<xs:sequence>
<xs:element name="value" type="Iso8601Time"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_DATE">
<xs:complexContent>
<xs:extension base="DV_TEMPORAL">
<xs:sequence>
<xs:element name="value" type="Iso8601Date"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_DURATION">
<xs:complexContent>
<xs:extension base="DV_AMOUNT">
<xs:sequence>
<xs:element name="value" type="Iso8601Duration"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_TIME_SPECIFICATION" abstract="true">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="value" type="DV_PARSABLE"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_PERIODIC_TIME_SPECIFICATION">
<xs:complexContent>
<xs:extension base="DV_TIME_SPECIFICATION">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_GENERAL_TIME_SPECIFICATION">
<xs:complexContent>
<xs:extension base="DV_TIME_SPECIFICATION">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_ENCAPSULATED" abstract="true">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="charset" type="CODE_PHRASE" minOccurs="0"/>
<xs:element name="language" type="CODE_PHRASE" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_MULTIMEDIA">
<xs:complexContent>
<xs:extension base="DV_ENCAPSULATED">
<xs:sequence>
<xs:element name="alternate_text" type="xs:string" minOccurs="0"/>
<xs:element name="uri" type="DV_URI" minOccurs="0"/>
<xs:element name="data" type="xs:base64Binary" minOccurs="0"/>
<xs:element name="media_type" type="CODE_PHRASE"/>
<xs:element name="compression_algorithm" type="CODE_PHRASE" minOccurs="0"/>
<xs:element name="integrity_check" type="xs:base64Binary" minOccurs="0"/>
<xs:element name="integrity_check_algorithm" type="CODE_PHRASE" minOccurs="0"/>
<xs:element name="size" type="xs:int"/>
<xs:element name="thumbnail" type="DV_MULTIMEDIA" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_PARSABLE">
<xs:complexContent>
<xs:extension base="DV_ENCAPSULATED">
<xs:sequence>
<!-- <xs:element name="value" type="AllowAny"/> -->
<xs:element name="value" type="NotEmptyString"/>
<!-- <xs:element name="formalism" type="NotEmptyString"/>-->
<!-- https://github.com/ppazos/cabolabs-ehrserver/issues/869 -->
<xs:element name="formalism">
<xs:simpleType>
<xs:restriction base="NotEmptyString">
<!-- content formalism, only for parsable data (non-binary) -->
<xs:enumeration value="text/xml"/>
<xs:enumeration value="text/rtf"/>
<xs:enumeration value="text/plain"/>
<xs:enumeration value="text/html"/>
<xs:enumeration value="application/json"/>
<!-- date formalisms for ACTIVITY.timing.formalism -->
<xs:enumeration value="ISO8601"/>
<xs:enumeration value="HL7_GTS"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- fix to allow XML representations for DV_PARSABLE.value
https://openehr.atlassian.net/browse/SPECPR-242?jql=ORDER%20BY%20created%20DESC
<xs:complexType name="AllowAny" mixed="true">
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>
-->
<xs:complexType name="DV_URI">
<xs:complexContent>
<xs:extension base="DATA_VALUE">
<xs:sequence>
<xs:element name="value" type="NotEmptyUri" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DV_EHR_URI">
<xs:complexContent>
<xs:extension base="DV_URI">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="OBJECT_ID" abstract="true">
<xs:sequence>
<xs:element name="value" type="NotEmptyToken"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="UID_BASED_ID" abstract="true">
<xs:complexContent>
<xs:extension base="OBJECT_ID">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!--
<xs:complexType name="OBJECT_VERSION_ID">
<xs:complexContent>
<xs:extension base="UID_BASED_ID"/>
</xs:complexContent>
</xs:complexType>
-->
<!-- https://github.com/ppazos/cabolabs-ehrserver/issues/913 -->
<xs:complexType name="OBJECT_VERSION_ID">
<xs:complexContent>
<xs:restriction base="UID_BASED_ID">
<xs:sequence>
<xs:element name="value" type="OBJECT_VERSION_ID_VALUE_FORMAT"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ARCHETYPE_ID">
<xs:complexContent>
<xs:extension base="OBJECT_ID"/>
</xs:complexContent>
</xs:complexType>
<!-- https://github.com/ppazos/cabolabs-ehrserver/issues/917 -->
<!--
<xs:complexType name="TEMPLATE_ID">
<xs:complexContent>
<xs:extension base="OBJECT_ID"/>
</xs:complexContent>
</xs:complexType>
-->
<xs:complexType name="TEMPLATE_ID">
<xs:complexContent>
<xs:restriction base="OBJECT_ID">
<xs:sequence>
<xs:element name="value" type="TEMPLATE_ID_VALUE_FORMAT"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="TERMINOLOGY_ID">
<xs:complexContent>
<xs:extension base="OBJECT_ID"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="HIER_OBJECT_ID">
<xs:complexContent>
<xs:extension base="UID_BASED_ID"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="GENERIC_ID">
<xs:complexContent>
<xs:extension base="OBJECT_ID">
<xs:sequence>
<xs:element name="scheme" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="OBJECT_REF">
<xs:sequence>
<xs:element name="id" type="OBJECT_ID"/>
<xs:element name="namespace" type="NotEmptyToken"/>
<xs:element name="type" type="NotEmptyToken"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PARTY_REF">
<xs:complexContent>
<xs:extension base="OBJECT_REF"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ACCESS_GROUP_REF">
<xs:complexContent>
<xs:extension base="OBJECT_REF"/>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="LOCATABLE_REF">
<xs:complexContent>
<xs:extension base="OBJECT_REF">
<xs:sequence>
<xs:element name="path" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="REVISION_HISTORY_ITEM">
<xs:sequence>
<xs:element name="version_id" type="OBJECT_VERSION_ID"/>
<xs:element name="audits" type="AUDIT_DETAILS" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="REVISION_HISTORY">
<xs:sequence>
<xs:element name="items" type="REVISION_HISTORY_ITEM" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AUDIT_DETAILS">
<xs:sequence>
<xs:element name="system_id" type="xs:string"/>
<xs:element name="committer" type="PARTY_PROXY"/>
<xs:element name="time_committed" type="DV_DATE_TIME"/>
<xs:element name="change_type" type="DV_CODED_TEXT"/>
<xs:element name="description" type="DV_TEXT" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ATTESTATION">
<xs:complexContent>
<xs:extension base="AUDIT_DETAILS">
<xs:sequence>
<xs:element name="attested_view" type="DV_MULTIMEDIA" minOccurs="0"/>
<xs:element name="proof" type="xs:string" minOccurs="0"/>
<xs:element name="items" type="DV_EHR_URI" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="reason" type="DV_TEXT"/>
<xs:element name="is_pending" type="xs:boolean" default="false"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PARTY_PROXY" abstract="true">
<xs:sequence>
<xs:element name="external_ref" type="PARTY_REF" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PARTY_IDENTIFIED">
<xs:complexContent>
<xs:extension base="PARTY_PROXY">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="identifiers" type="DV_IDENTIFIER" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PARTY_RELATED">
<xs:complexContent>
<xs:extension base="PARTY_IDENTIFIED">
<xs:sequence>
<xs:element name="relationship" type="DV_CODED_TEXT"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PARTY_SELF">
<xs:complexContent>
<xs:extension base="PARTY_PROXY">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="PARTICIPATION">
<xs:sequence>
<xs:element name="function" type="DV_TEXT"/>
<xs:element name="performer" type="PARTY_PROXY"/>
<xs:element name="time" type="DV_INTERVAL" minOccurs="0"/>
<xs:element name="mode" type="DV_CODED_TEXT"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FEEDER_AUDIT">
<xs:sequence>
<xs:element name="originating_system_item_ids" type="DV_IDENTIFIER" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="feeder_system_item_ids" type="DV_IDENTIFIER" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="original_content" type="DV_ENCAPSULATED" minOccurs="0"/>
<xs:element name="originating_system_audit" type="FEEDER_AUDIT_DETAILS"/>
<xs:element name="feeder_system_audit" type="FEEDER_AUDIT_DETAILS" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FEEDER_AUDIT_DETAILS">
<xs:sequence>
<xs:element name="system_id" type="xs:string"/>
<xs:element name="location" type="PARTY_IDENTIFIED" minOccurs="0"/>
<xs:element name="provider" type="PARTY_IDENTIFIED" minOccurs="0"/>
<xs:element name="subject" type="PARTY_PROXY" minOccurs="0"/>
<xs:element name="time" type="DV_DATE_TIME" minOccurs="0"/>
<xs:element name="version_id" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Interval" abstract="true">
<xs:sequence>
<xs:element name="lower_included" type="xs:boolean" minOccurs="0"/>
<xs:element name="upper_included" type="xs:boolean" minOccurs="0"/>
<xs:element name="lower_unbounded" type="xs:boolean"/>
<xs:element name="upper_unbounded" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="IntervalOfInteger">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="xs:int" minOccurs="0"/>
<xs:element name="upper" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntervalOfReal">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="xs:float" minOccurs="0"/>
<xs:element name="upper" type="xs:float" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntervalOfDate">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="Iso8601Date" minOccurs="0"/>
<xs:element name="upper" type="Iso8601Date" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntervalOfDateTime">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="Iso8601DateTime" minOccurs="0"/>
<xs:element name="upper" type="Iso8601DateTime" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntervalOfTime">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="Iso8601Time" minOccurs="0"/>
<xs:element name="upper" type="Iso8601Time" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="IntervalOfDuration">
<xs:complexContent>
<xs:extension base="Interval">
<xs:sequence>
<xs:element name="lower" type="Iso8601Duration" minOccurs="0"/>
<xs:element name="upper" type="Iso8601Duration" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="NotEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NotEmptyToken">
<xs:restriction base="xs:token">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NotEmptyUri">
<xs:restriction base="xs:anyURI">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<!-- https://github.com/ppazos/cabolabs-ehrserver/issues/913 -->
<xs:simpleType name="OBJECT_VERSION_ID_VALUE_FORMAT">
<xs:restriction base="NotEmptyToken">
<xs:pattern value="[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}::([A-Za-z0-9_\-\.]*)::([0-9]+[0-9]*(\.[0-9]+[0-9]*(\.[0-9]+[0-9]*)?)?)"/>
</xs:restriction>
</xs:simpleType>
<!-- https://github.com/ppazos/cabolabs-ehrserver/issues/917 concept_snake_case.en.1.5-->
<xs:simpleType name="TEMPLATE_ID_VALUE_FORMAT">
<xs:restriction base="NotEmptyToken">
<xs:pattern value="([a-z]+(_[a-z]+)*)\.([a-z]{2})\.v([0-9]+[0-9]*(\.[0-9]+[0-9]*(\.[0-9]+[0-9]*)?)?)"/>
</xs:restriction>
</xs:simpleType>
</xsd:schema>