<?xml version="1.0" encoding="UTF-8"?><!--Generated using tds-default.xsl v2.3 ($Revision: 4657 $)--><xs:schema xmlns:oe="http://schemas.openehr.org/v1" xmlns="http://schemas.oceanehr.com/templates"  elementFormDefault="qualified" targetNamespace="http://schemas.oceanehr.com/templates" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:import xmlns:xs="http://www.w3.org/2001/XMLSchema" schemaLocation="Structure.xsd" namespace="http://schemas.openehr.org/v1"/><xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Request_for_service">
    <xs:complexType>
        <xs:sequence>
            <xs:element name="name">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="value" type="xs:string" default="Request for service"/>
                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="uid" type="oe:UID_BASED_ID" minOccurs="0" maxOccurs="1"/>
            <xs:element name="links" type="oe:LINK" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="language">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="terminology_id">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="value" fixed="ISO_639-1" type="xs:token"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="code_string" default="en" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="territory">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="terminology_id">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="value" fixed="ISO_3166-1" type="xs:token"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="code_string" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="category">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="value" type="xs:string" fixed="event"/>
                        <xs:element name="defining_code">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="terminology_id">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" fixed="openehr" type="xs:token"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="code_string" fixed="433" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="composer" type="oe:PARTY_PROXY"/>
            <xs:element name="context">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="start_time" type="oe:DV_DATE_TIME"/>
                        <xs:element name="end_time" minOccurs="0" maxOccurs="1" type="oe:DV_DATE_TIME"/>
                        <xs:element name="location" minOccurs="0" maxOccurs="1" type="xs:string"/>
                        <xs:element name="setting" type="oe:DV_CODED_TEXT"/>
                        <xs:element name="XDS_Metadata" minOccurs="0">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" type="xs:string" default="XDS Metadata"/>
                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Confidentiality_code" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Confidentiality code"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0004" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Practice_setting_code" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Practice setting code"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0009" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Encounter_Id" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Encounter Id"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0012" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Referral_Unique_Id" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Referral Unique Id"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0013" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="openEHR-EHR-CLUSTER.xds_metadata.v0" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="CLUSTER" name="type"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Person" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" type="xs:string" fixed="Person"/>
                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Identifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" use="required">
                                                <xs:simpleType>
                                                    <xs:restriction base="xs:string">
                                                        <xs:enumeration value="DV_IDENTIFIER"/>
                                                        <xs:enumeration value="DV_TEXT"/>
                                                    </xs:restriction>
                                                </xs:simpleType>
                                            </xs:attribute>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Additional_Patient_Details" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Additional Patient Details"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="PatientInsuranceType" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="PatientInsuranceType"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                            <xs:element name="defining_code">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="terminology_id">
                                                                                            <xs:complexType>
                                                                                                <xs:sequence>
                                                                                                    <xs:element name="value" fixed="local" type="xs:token"/>
                                                                                                </xs:sequence>
                                                                                            </xs:complexType>
                                                                                        </xs:element>
                                                                                        <xs:element name="code_string">
                                                                                            <xs:simpleType>
                                                                                                <xs:restriction base="xs:string">
                                                                                                    <xs:enumeration value="at0004"/>
                                                                                                    <!-- Value = 1 -->
                                                                                                    <xs:enumeration value="at0005"/>
                                                                                                    <!-- Value = 2 -->
                                                                                                    <xs:enumeration value="at0006"/>
                                                                                                    <!-- Value = 3 -->
                                                                                                </xs:restriction>
                                                                                            </xs:simpleType>
                                                                                        </xs:element>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0002" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Newborn" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Newborn"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value" type="oe:DV_BOOLEAN"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0009" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_BOOLEAN"/>
                                                    </xs:complexType>
                                                </xs:element>
                                            </xs:sequence>
                                            <xs:attribute fixed="openEHR-EHR-CLUSTER.patient_details.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="CLUSTER" name="type"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Comment" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Comment"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0010" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="openEHR-EHR-CLUSTER.person.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="CLUSTER" name="type"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Contact_Person" minOccurs="0">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" type="xs:string" fixed="Contact Person"/>
                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Identifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" use="required">
                                                <xs:simpleType>
                                                    <xs:restriction base="xs:string">
                                                        <xs:enumeration value="DV_IDENTIFIER"/>
                                                        <xs:enumeration value="DV_TEXT"/>
                                                    </xs:restriction>
                                                </xs:simpleType>
                                            </xs:attribute>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Role" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Role"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:personrole" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0004" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="openEHR-EHR-CLUSTER.person.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="CLUSTER" name="type"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="Service_request_details" minOccurs="0">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" type="xs:string" default="Service request details"/>
                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="RequestInternalIdentifier" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="RequestInternalIdentifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0037" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_IDENTIFIER"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="RequestUniqueIdentifier" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="RequestUniqueIdentifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0001" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_IDENTIFIER"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="PrevRequestUniqueIdentifier" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="PrevRequestUniqueIdentifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_IDENTIFIER"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="PrevRequestDocIdentifier" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="PrevRequestDocIdentifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0031" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_IDENTIFIER"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="PaperReferralIdentifier" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="PaperReferralIdentifier"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_IDENTIFIER"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0045" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_IDENTIFIER"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralMediaTypeId" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReferralMediaTypeId"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:mediatypeid" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0014" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralCreationDateTime" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReferralCreationDateTime"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_DATE_TIME"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0026" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_DATE_TIME"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralValidity" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReferralValidity"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:referralvalidity" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0032" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralValidityDuration" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReferralValidityDuration"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_DURATION"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0040" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_DURATION"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReasonForCancellationCode" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReasonForCancellationCode"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:reasonforcancellation" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="4"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="5"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="6"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="7"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="8"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0043" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReasonForCancellationDescription" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="ReasonForCancellationDescription"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0044" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="openEHR-EHR-CLUSTER.referral_specific_details.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="CLUSTER" name="type"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="health_care_facility" minOccurs="0" maxOccurs="1" type="oe:PARTY_IDENTIFIED"/>
                        <xs:element name="participations" minOccurs="0" maxOccurs="unbounded" type="oe:PARTICIPATION"/>
                    </xs:sequence>
                    <xs:attribute name="other_context_node_id" fixed="at0001" type="oe:archetypeNodeId"/>
                    <xs:attribute name="other_context_type" fixed="ITEM_TREE" type="xs:string"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="Service_request" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="name">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="value" type="xs:string" default="Service request"/>
                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="uid" type="oe:UID_BASED_ID" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="links" type="oe:LINK" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="language">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="terminology_id">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" fixed="ISO_639-1" type="xs:token"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="code_string" default="en" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="encoding">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="terminology_id">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" fixed="IANA_character-sets" type="xs:token"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="code_string" default="UTF-8" type="xs:string"/>
                                </xs:sequence>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="subject" type="oe:PARTY_SELF"/>
                        <xs:element name="provider" type="oe:PARTY_IDENTIFIED" minOccurs="0" maxOccurs="1"/>
                        <xs:element name="other_participations" type="oe:PARTICIPATION" minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="protocol" minOccurs="0" maxOccurs="1">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="requestorDoc" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="requestorDoc"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Identifier"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                                <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" use="required">
                                                            <xs:simpleType>
                                                                <xs:restriction base="xs:string">
                                                                    <xs:enumeration value="DV_IDENTIFIER"/>
                                                                    <xs:enumeration value="DV_TEXT"/>
                                                                </xs:restriction>
                                                            </xs:simpleType>
                                                        </xs:attribute>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="RequestorDocType" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" fixed="RequestorDocType"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                            <xs:element name="defining_code">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="terminology_id">
                                                                                            <xs:complexType>
                                                                                                <xs:sequence>
                                                                                                    <xs:element name="value" fixed="urn:nijz:referral:doctype" type="xs:token"/>
                                                                                                </xs:sequence>
                                                                                            </xs:complexType>
                                                                                        </xs:element>
                                                                                        <xs:element name="code_string">
                                                                                            <xs:simpleType>
                                                                                                <xs:restriction base="xs:string">
                                                                                                    <xs:enumeration value="1"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="2"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="3"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="4"/>
                                                                                                    <!-- Value =  -->
                                                                                                </xs:restriction>
                                                                                            </xs:simpleType>
                                                                                        </xs:element>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0004" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Organisation" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Organisation"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="name">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="value" type="xs:string" default="Identifier"/>
                                                                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                </xs:sequence>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:choice>
                                                                            <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                                            <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                                            <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                        </xs:choice>
                                                                    </xs:sequence>
                                                                    <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                    <xs:attribute fixed="ELEMENT" name="type"/>
                                                                    <xs:attribute name="valueType" use="required">
                                                                        <xs:simpleType>
                                                                            <xs:restriction base="xs:string">
                                                                                <xs:enumeration value="DV_IDENTIFIER"/>
                                                                                <xs:enumeration value="DV_TEXT"/>
                                                                            </xs:restriction>
                                                                        </xs:simpleType>
                                                                    </xs:attribute>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:element name="Comment" minOccurs="0">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="name">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="value" type="xs:string" default="Comment"/>
                                                                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                </xs:sequence>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:choice>
                                                                            <xs:element name="value" type="oe:DV_TEXT"/>
                                                                            <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                        </xs:choice>
                                                                    </xs:sequence>
                                                                    <xs:attribute fixed="at0019" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                    <xs:attribute fixed="ELEMENT" name="type"/>
                                                                    <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                                </xs:complexType>
                                                            </xs:element>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="openEHR-EHR-CLUSTER.organisation.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="CLUSTER" name="type"/>
                                                    </xs:complexType>
                                                </xs:element>
                                            </xs:sequence>
                                            <xs:attribute fixed="openEHR-EHR-CLUSTER.person.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="CLUSTER" name="type"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="requestorDoc_paperRequest" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="requestorDoc_paperRequest"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Identifier"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                                <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" use="required">
                                                            <xs:simpleType>
                                                                <xs:restriction base="xs:string">
                                                                    <xs:enumeration value="DV_IDENTIFIER"/>
                                                                    <xs:enumeration value="DV_TEXT"/>
                                                                </xs:restriction>
                                                            </xs:simpleType>
                                                        </xs:attribute>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="RequestorDocType" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" fixed="RequestorDocType"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                            <xs:element name="defining_code">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="terminology_id">
                                                                                            <xs:complexType>
                                                                                                <xs:sequence>
                                                                                                    <xs:element name="value" fixed="local_terms" type="xs:token"/>
                                                                                                </xs:sequence>
                                                                                            </xs:complexType>
                                                                                        </xs:element>
                                                                                        <xs:element name="code_string">
                                                                                            <xs:simpleType>
                                                                                                <xs:restriction base="xs:string">
                                                                                                    <xs:enumeration value="1"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="2"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="3"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="4"/>
                                                                                                    <!-- Value =  -->
                                                                                                </xs:restriction>
                                                                                            </xs:simpleType>
                                                                                        </xs:element>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0004" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Organisation" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Organisation"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:element name="Identifier" minOccurs="0" maxOccurs="unbounded">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="name">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="value" type="xs:string" default="Identifier"/>
                                                                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                </xs:sequence>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:choice>
                                                                            <xs:element name="identifier_value" type="oe:DV_IDENTIFIER"/>
                                                                            <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                                            <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                        </xs:choice>
                                                                    </xs:sequence>
                                                                    <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                    <xs:attribute fixed="ELEMENT" name="type"/>
                                                                    <xs:attribute name="valueType" use="required">
                                                                        <xs:simpleType>
                                                                            <xs:restriction base="xs:string">
                                                                                <xs:enumeration value="DV_IDENTIFIER"/>
                                                                                <xs:enumeration value="DV_TEXT"/>
                                                                            </xs:restriction>
                                                                        </xs:simpleType>
                                                                    </xs:attribute>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:element name="PracticeSetting" minOccurs="0">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="name">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="value" type="xs:string" default="PracticeSetting"/>
                                                                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                </xs:sequence>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:element name="Level1" minOccurs="0">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="name">
                                                                                        <xs:complexType>
                                                                                            <xs:sequence>
                                                                                                <xs:element name="value" type="xs:string" default="Level1"/>
                                                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                            </xs:sequence>
                                                                                        </xs:complexType>
                                                                                    </xs:element>
                                                                                    <xs:choice>
                                                                                        <xs:element name="value" type="oe:DV_TEXT"/>
                                                                                        <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                                    </xs:choice>
                                                                                </xs:sequence>
                                                                                <xs:attribute fixed="at0001" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                                <xs:attribute fixed="ELEMENT" name="type"/>
                                                                                <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:element name="Level2" minOccurs="0">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="name">
                                                                                        <xs:complexType>
                                                                                            <xs:sequence>
                                                                                                <xs:element name="value" type="xs:string" default="Level2"/>
                                                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                            </xs:sequence>
                                                                                        </xs:complexType>
                                                                                    </xs:element>
                                                                                    <xs:choice>
                                                                                        <xs:element name="value" type="oe:DV_TEXT"/>
                                                                                        <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                                    </xs:choice>
                                                                                </xs:sequence>
                                                                                <xs:attribute fixed="at0002" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                                <xs:attribute fixed="ELEMENT" name="type"/>
                                                                                <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                    </xs:sequence>
                                                                    <xs:attribute fixed="openEHR-EHR-CLUSTER.practicesetting.v0" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                    <xs:attribute fixed="CLUSTER" name="type"/>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:element name="Comment" minOccurs="0">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="name">
                                                                            <xs:complexType>
                                                                                <xs:sequence>
                                                                                    <xs:element name="value" type="xs:string" default="Comment"/>
                                                                                    <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                                    <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                                </xs:sequence>
                                                                            </xs:complexType>
                                                                        </xs:element>
                                                                        <xs:choice>
                                                                            <xs:element name="value" type="oe:DV_TEXT"/>
                                                                            <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                                        </xs:choice>
                                                                    </xs:sequence>
                                                                    <xs:attribute fixed="at0019" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                                    <xs:attribute fixed="ELEMENT" name="type"/>
                                                                    <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                                </xs:complexType>
                                                            </xs:element>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="openEHR-EHR-CLUSTER.organisation.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="CLUSTER" name="type"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Comment" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Comment"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value" type="oe:DV_TEXT"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0010" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                            </xs:sequence>
                                            <xs:attribute fixed="openEHR-EHR-CLUSTER.person.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="CLUSTER" name="type"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Request_status" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Request status"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="Service Request" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="4"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="5"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="6"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="11"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0127" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="at0008" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="ITEM_TREE" name="type"/>
                            </xs:complexType>
                        </xs:element>
                        <xs:element name="narrative" type="oe:DV_TEXT"/>
                        <xs:element name="Current_Activity" minOccurs="1" maxOccurs="unbounded">
                            <xs:complexType>
                                <xs:sequence>
                                    <xs:element name="name">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="value" type="xs:string" default="Current Activity"/>
                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                            </xs:sequence>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="uid" type="oe:UID_BASED_ID" minOccurs="0" maxOccurs="1"/>
                                    <xs:element name="links" type="oe:LINK" minOccurs="0" maxOccurs="unbounded"/>
                                    <xs:element name="timing" type="oe:DV_PARSABLE"/>
                                    <xs:element name="ServiceName">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="ServiceName"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:type" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="0"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="4"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="5"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="6"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="7"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0121" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="MedicalProcedure" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="MedicalProcedure"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string" type="xs:string"/>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0148" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralReason" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="ReferralReason"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                    <xs:element name="coded_text_value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:reason" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="4"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="5"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="7"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0062" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" use="required">
                                                <xs:simpleType>
                                                    <xs:restriction base="xs:string">
                                                        <xs:enumeration value="DV_TEXT"/>
                                                        <xs:enumeration value="DV_CODED_TEXT"/>
                                                    </xs:restriction>
                                                </xs:simpleType>
                                            </xs:attribute>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReasonForServiceRequest" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="ReasonForServiceRequest"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_TEXT"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0064" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralDiagnosisId" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="ReferralDiagnosisId"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string" type="xs:string"/>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0152" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="ReferralUrgencyType" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" fixed="ReferralUrgencyType"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value">
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                <xs:element name="defining_code">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="terminology_id">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="value" fixed="urn:nijz:servicerequest:urgency" type="xs:token"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                            <xs:element name="code_string">
                                                                                <xs:simpleType>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:enumeration value="1"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="2"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="3"/>
                                                                                        <!-- Value =  -->
                                                                                        <xs:enumeration value="4"/>
                                                                                        <!-- Value =  -->
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0068" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="Indefinite_quest_" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="Indefinite?"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:choice>
                                                    <xs:element name="value" type="oe:DV_BOOLEAN"/>
                                                    <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                </xs:choice>
                                            </xs:sequence>
                                            <xs:attribute fixed="at0147" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="ELEMENT" name="type"/>
                                            <xs:attribute name="valueType" fixed="DV_BOOLEAN"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="DNFT_details" minOccurs="0">
                                        <xs:complexType>
                                            <xs:sequence>
                                                <xs:element name="name">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="value" type="xs:string" default="DNFT details"/>
                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                            <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                        </xs:sequence>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="MedicalProcedureSide" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="MedicalProcedureSide"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="value" type="xs:string" minOccurs="0"/>
                                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                            <xs:element name="defining_code">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="terminology_id">
                                                                                            <xs:complexType>
                                                                                                <xs:sequence>
                                                                                                    <xs:element name="value" fixed="urn:nijz:servicerequest:referraltypes" type="xs:token"/>
                                                                                                </xs:sequence>
                                                                                            </xs:complexType>
                                                                                        </xs:element>
                                                                                        <xs:element name="code_string">
                                                                                            <xs:simpleType>
                                                                                                <xs:restriction base="xs:string">
                                                                                                    <xs:enumeration value="0"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="1"/>
                                                                                                    <!-- Value =  -->
                                                                                                    <xs:enumeration value="2"/>
                                                                                                    <!-- Value =  -->
                                                                                                </xs:restriction>
                                                                                            </xs:simpleType>
                                                                                        </xs:element>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0012" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_CODED_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="ProposedStrategy" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" fixed="ProposedStrategy"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value" type="oe:DV_TEXT"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0002" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_TEXT"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="OrderedProcedures" minOccurs="0" maxOccurs="unbounded">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" fixed="OrderedProcedures"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="coded_text_value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="value" type="xs:string"/>
                                                                            <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                            <xs:element name="defining_code">
                                                                                <xs:complexType>
                                                                                    <xs:sequence>
                                                                                        <xs:element name="terminology_id">
                                                                                            <xs:complexType>
                                                                                                <xs:sequence>
                                                                                                    <xs:element name="value" type="xs:token"/>
                                                                                                </xs:sequence>
                                                                                            </xs:complexType>
                                                                                        </xs:element>
                                                                                        <xs:element name="code_string" type="xs:string"/>
                                                                                    </xs:sequence>
                                                                                </xs:complexType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="text_value" type="oe:DV_TEXT"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0003" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" use="required">
                                                            <xs:simpleType>
                                                                <xs:restriction base="xs:string">
                                                                    <xs:enumeration value="DV_CODED_TEXT"/>
                                                                    <xs:enumeration value="DV_TEXT"/>
                                                                </xs:restriction>
                                                            </xs:simpleType>
                                                        </xs:attribute>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Repetitions" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Repetitions"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value" type="oe:DV_QUANTITY"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0006" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_QUANTITY"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="Period" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="Period"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value">
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element minOccurs="0" name="lower" type="oe:DV_DATE_TIME"/>
                                                                            <!-- lower is required if lower_unbounded is false -->
                                                                            <xs:element minOccurs="0" name="upper" type="oe:DV_DATE_TIME"/>
                                                                            <!-- upper is required if upper_unbounded is false -->
                                                                            <xs:element name="lower_included" type="xs:boolean" minOccurs="0"/>
                                                                            <!-- lower_included is required if lower_unbounded is false  -->
                                                                            <xs:element name="upper_included" type="xs:boolean" minOccurs="0"/>
                                                                            <!-- upper_included is required if upper_unbounded is false  -->
                                                                            <xs:element name="lower_unbounded" type="xs:boolean"/>
                                                                            <xs:element name="upper_unbounded" type="xs:boolean"/>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0010" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_INTERVAL&lt;DV_DATE_TIME&gt;"/>
                                                    </xs:complexType>
                                                </xs:element>
                                                <xs:element name="FirstVisit" minOccurs="0">
                                                    <xs:complexType>
                                                        <xs:sequence>
                                                            <xs:element name="name">
                                                                <xs:complexType>
                                                                    <xs:sequence>
                                                                        <xs:element name="value" type="xs:string" default="FirstVisit"/>
                                                                        <xs:element name="mappings" type="oe:TERM_MAPPING" minOccurs="0" maxOccurs="unbounded"/>
                                                                        <xs:element name="defining_code" type="oe:CODE_PHRASE" minOccurs="0"/>
                                                                    </xs:sequence>
                                                                </xs:complexType>
                                                            </xs:element>
                                                            <xs:choice>
                                                                <xs:element name="value" type="oe:DV_DATE_TIME"/>
                                                                <xs:element name="null_flavour" type="oe:DV_CODED_TEXT"/>
                                                            </xs:choice>
                                                        </xs:sequence>
                                                        <xs:attribute fixed="at0011" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                                        <xs:attribute fixed="ELEMENT" name="type"/>
                                                        <xs:attribute name="valueType" fixed="DV_DATE_TIME"/>
                                                    </xs:complexType>
                                                </xs:element>
                                            </xs:sequence>
                                            <xs:attribute fixed="openEHR-EHR-CLUSTER.dnft_details.v0" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                            <xs:attribute fixed="CLUSTER" name="type"/>
                                        </xs:complexType>
                                    </xs:element>
                                    <xs:element name="action_archetype_id"><!-- NOT IMPLEMENTED --></xs:element>
                                </xs:sequence>
                                <xs:attribute fixed="at0001" name="archetype_node_id" type="oe:archetypeNodeId"/>
                                <xs:attribute fixed="ACTIVITY" name="type"/>
                            </xs:complexType>
                        </xs:element>
                    </xs:sequence>
                    <xs:attribute fixed="openEHR-EHR-INSTRUCTION.service_request.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
                    <xs:attribute fixed="INSTRUCTION" name="type"/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute fixed="openEHR-EHR-COMPOSITION.request.v1" name="archetype_node_id" type="oe:archetypeNodeId"/>
        <xs:attribute fixed="COMPOSITION" name="type"/>
        <xs:attribute fixed="ServiceRequestDNFT" name="template_id" use="required"/>
    </xs:complexType>
</xs:element></xs:schema>