Commit d50eb21c authored by nisit ETDA's avatar nisit ETDA

Merge branch '20201008_1454' into 'master'

ขอ upload all files ค่ะ

See merge request teda/teda-affiliate/department-of-health-service-support/development/annual-fee-payment-form-for-hospital-services-establishment!2
parents 92356d88 fc329fe8
#Detail Version 1.0.2
-ปรับแก้การ reference Resource
#Detail Version 1.0.1
-ลบ Prefix fhir ออกจาก example file
#Detail Version 1.0.0
เพิ่มโครงสร้างข้อมูล (Schema) ใบอนุญาตประกอบกิจการสถานประกอบการเพื่อสุขภาพเข้าระบบ TEDA Schemas
เพิ่มโครงสร้างข้อมูล (Schema) ใบอนุญาตให้ดำเนินการสถานพยาบาลเข้าระบบ TEDA Schemas
\ No newline at end of file
{
"standardName": "Bundle",
"standardName": "Annual-Fee-Payment-Form",
"standardCode": "",
"version": "1.0.0",
"messages" : [
{
"rootTagName": "Bundle",
"versionPath": "/Bundle/entry/resource/DocumentReference/extension/valueString/@value",
"rootTagName": "Annual-Fee-Payment-Form",
"versionPath": "/Bundle/entry/resource/Composition/extension/valueString/@value",
"schemaFilePath": "/schema/fhir/bundle.xsd",
"schematronFilePath": "/schema/fhir/bundle.sch"
}
......
# Annual Fee Payment Form For Hospital Services Establishment โครงสร้างข้อมูลที่เกี่ยวกับแบบฟอร์มการชำระค่าธรรมประจำปีสำหรับการประกอบกิจการสถานพยาบาล
เพื่อกำหนดโครงสร้างข้อมูลของข้อความอิเล็กทรอนิกส์ในรูปแบบ XML (Extensible Markup Language) ให้สอดคล้องกับมาตรฐานสากลของ HL7 FHIR และเพื่อใช้เป็นมาตรฐานประกอบการจัดทำข้อมูลที่เกี่ยวกับแบบฟอร์มการชำระค่าธรรมเนียมประจำปีสำหรับการประกอบกิจการสถานพยาบาล
# Annual-Fee-Payment-Form โครงสร้างข้อมูลใบเสร็จใบอนุญาตประกอบกิจการประจำปี
เพื่อกำหนดโครงสร้างข้อมูลของข้อความอิเล็กทรอนิกส์ในรูปแบบ XML (Extensible Markup Language) ให้สอดคล้องกับมาตรฐานสากลของ HL7 FHIR และเพื่อใช้เป็นมาตรฐานประกอบการจัดทำข้อมูลใบเสร็จใบอนุญาตประกอบกิจการประจำปี
# Latest Release
......
<?xml version="1.0" encoding="UTF-8"?>
<fhir:Bundle xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:fhir="http://hl7.org/fhir"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://hl7.org/fhir file:../schema/fhir/bundle.xsd">
<!--1 กำหนดภาษาที่ใช้ของเอกสารอิเล็กทรอนิกส์-->
<fhir:language value="TH"/>
<!--2.กำหนดประเภทเอกสาร-->
<fhir:type value="document"/>
<fhir:entry>
<fhir:resource>
<fhir:DocumentReference>
<!--3.1.1 หมายเลข OID ของ สพธอ.-->
<fhir:extension url="https://oid.estandard.or.th">
<fhir:valueOid id="2.16.764.1.4.100.16.4.1.1"/>
</fhir:extension>
<!--3.1.2 เวอร์ชั่นเอกสาร-->
<fhir:extension url="VersionNumber">
<fhir:valueString value="1.0"/>
</fhir:extension>
<!--3.2 ข้อมูลเลขที่ใบอนุญาตประกอบกิจการ -->
<fhir:identifier id="เลขที่ใบอนุญาต"/>
<!--3.3 สถานะของเอกสาร-->
<fhir:status value="current"/>
<!--3.4 ชื่อสถานพยาบลที่ได้รับใบอนุญาตประกอบกิจการ-->
<fhir:subject>
<fhir:display value="ชื่อสถานพยาบาลที่ได้รับใบอนุญาต"/>
</fhir:subject>
<!--3.5 วันที่สร้างเอกสาร-->
<fhir:date id="2020-06-10"/>
<fhir:author>
<!--3.6 ชื่อสถานประกอบการที่ได้รับอนุญาต-->
<fhir:name value="ชื่อสถานประกอบการ"/>
<fhir:address>
<!--3.6.3.3.1 กรณีที่ตั้ง-สถานประกอบการ Unstructure-->
<fhir:text></fhir:text>
<!--3.6.3.3.2 เลขที่-->
<fhir:line></fhir:line>
<!--3.6.3.3.3 ตำบล-->
<fhir:city value="100101"/>
<!--3.6.3.3.4 อำเภอ-->
<fhir:district value="1001"/>
<!--3.6.3.3.5 จังหวัด-->
<fhir:state value="10"/>
<fhir:postalCode value="12000"/>
<fhir:country value="TH"/>
</fhir:address>
</fhir:author>
<!--3.7 วันเดือนปีที่ออกเอกสาร มีผลการใช้งานเอกสาร-->
<fhir:context>
<fhir:period>
<!--3.7.1.1 วันเดือนปีที่เริ่มมีมีผลการใช้งานเอกสาร-->
<fhir:start value="2020-06-10"/>
<!--3.7.1.2 วันเดือนปีที่สิ้นสุด-->
<fhir:end value="2021-06-10"/>
</fhir:period>
</fhir:context>
</fhir:DocumentReference>
</fhir:resource>
</fhir:entry>
<fhir:signature>
<!--(4.1) วันที่เซ็นเอกสาร -->
<fhir:when value="2020-05-05T13:28:17-05:00"/>
<!--(4.2) ชื่อ-นามสกุลผู้อนุมัติ -->
<fhir:who>
<fhir:display value="ชื่อ-นามสกุลผู้อนุมัติ"/>
</fhir:who>
<!--(4.3) ประเภทรูปแบบการเซ็นเอกสารอิเล็กทรอนิกส์ -->
<fhir:sigFormat value="application/signature+xml"/>
<!--(4.4) ข้อมูลลายเซ็น -->
<fhir:data value="0000"/>
</fhir:signature>
</fhir:Bundle>
This diff is collapsed.
......@@ -23,7 +23,8 @@ This XML Schema Definition file was developed as a subset profile of the UN/CEFA
xmlns:thCity="urn:etda:uncefact:codelist:standard:ThaiCityIdentification:1"
xmlns:thCountrySubDivision="urn:etda:uncefact:codelist:standard:ThaiCountrySubDivisionCode:1"
xmlns:ids5ISO316612A="urn:un:unece:uncefact:codelist:standard:ISO:ISOTwo-letterCountryCode:SecondEdition2006"
xmlns:clm5ISO63912A="urn:un:unece:uncefact:codelist:standard:ISO:ISO2AlphaLanguageCode:2006-10-27">
xmlns:clm5ISO63912A="urn:un:unece:uncefact:codelist:standard:ISO:ISO2AlphaLanguageCode:2006-10-27"
xmlns:hssDocumentName="urn:hss:codelist:standard:DocumentNameCode:1">
<xsd:import
namespace="urn:un:unece:uncefact:codelist:standard:ISO:ISOTwo-letterCountryCode:SecondEdition2006"
......@@ -41,6 +42,27 @@ This XML Schema Definition file was developed as a subset profile of the UN/CEFA
<xsd:import namespace="urn:etda:uncefact:codelist:standard:ThaiCitySubDivisionIdentification:1"
schemaLocation="Thai_CitySubDivisionIdentification_1p0.xsd"/>
<xsd:import namespace="urn:hss:codelist:standard:DocumentNameCode:1"
schemaLocation="..\..\..\hss\codelist\standard\HSS_DocumentNameCode_1p0.xsd"/>
<!-- =================================================================== -->
<!-- ===== Type Definitions : รหัสเอกสารของกรมสนับสนุนสุขภาพ ===== -->
<!-- =================================================================== -->
<!-- ===== String. Type ===== -->
<!-- =================================================================== -->
<xsd:complexType name="DocumentNameCodeContentType">
<xsd:simpleContent>
<xsd:extension base="hssDocumentName:DocumentNameCodeContentType"/>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="DocumentNameCode">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="value" type="hssDocumentName:DocumentNameCodeContentType" use="optional" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- =================================================================== -->
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="a" uri="http://www.w3.org/2005/Atom"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>AdverseReaction</sch:title>
<sch:rule context="/f:AdverseReaction/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">Inv-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:recorder">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:symptom/f:code">
<sch:assert test="count(f:coding[f:primary/@value='true'])&lt;1">Inv-2: Only one coding in a set can be chosen directly by the user</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:symptom/f:code/f:coding">
<sch:assert test="not (exists(f:valueSet) and exists(f:code)) or exists(f:system)">Inv-1: If a valueSet is provided, a system URI Is required</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:symptom/f:code/f:coding/f:valueSet">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:AdverseReaction/f:exposure/f:substance">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="a" uri="http://www.w3.org/2005/Atom"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<sch:pattern>
<sch:title>Alert</sch:title>
<sch:rule context="/f:Alert/f:identifier/f:period">
<sch:assert test="not(exists(f:start)) or not(exists(f:end)) or (f:start/@value &lt;= f:end/@value)">Inv-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:category">
<sch:assert test="count(f:coding[f:primary/@value='true'])&lt;1">Inv-2: Only one coding in a set can be chosen directly by the user</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:category/f:coding">
<sch:assert test="not (exists(f:valueSet) and exists(f:code)) or exists(f:system)">Inv-1: If a valueSet is provided, a system URI Is required</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:category/f:coding/f:valueSet">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:subject">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
<sch:rule context="/f:Alert/f:author">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::a:content/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')]|/f:*/f:contained/f:*[@id=substring-after(current()/f:reference/@value, '#')])">Inv-1: SHALL have a local reference if the resource is provided inline</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011-2013, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Generated on Tue, Sep 30, 2014 18:08+1000 for FHIR v0.0.82
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="0.0.82">
<xs:include schemaLocation="fhir-base.xsd"/>
<xs:element name="Alert" type="Alert">
<xs:annotation>
<xs:documentation>Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="Alert">
<xs:annotation>
<xs:documentation>Prospective warnings of potential issues when providing care to the patient.</xs:documentation>
<xs:documentation>If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="Resource">
<xs:sequence>
<xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
<xs:annotation>
<xs:documentation>Identifier assigned to the alert for external use (outside the FHIR environment).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="category" minOccurs="0" maxOccurs="1" type="CodeableConcept">
<xs:annotation>
<xs:documentation>Allows an alert to be divided into different categories like clinical, administrative etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="status" minOccurs="1" maxOccurs="1" type="AlertStatus">
<xs:annotation>
<xs:documentation>Supports basic workflow.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="subject" minOccurs="1" maxOccurs="1" type="ResourceReference">
<xs:annotation>
<xs:documentation>The person who this alert concerns.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="author" minOccurs="0" maxOccurs="1" type="ResourceReference">
<xs:annotation>
<xs:documentation>The person or device that created the alert.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="note" minOccurs="1" maxOccurs="1" type="string">
<xs:annotation>
<xs:documentation>The textual component of the alert to display to the user.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="AlertStatus-list">
<xs:restriction base="xs:string">
<xs:enumeration value="active">
<xs:annotation>
<xs:documentation>A current alert that should be displayed to a user. A system may use the category to determine which roles should view the alert.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="inactive">
<xs:annotation>
<xs:documentation>The alert does not need to be displayed any more.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="entered in error">
<xs:annotation>
<xs:documentation>The alert was added in error, and should no longer be displayed.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AlertStatus">
<xs:annotation>
<xs:documentation>Indicates whether this alert is active and needs to be displayed to a user, or whether it is no longer needed or entered in error</xs:documentation>
<xs:documentation>If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="Element">
<xs:attribute name="value" type="AlertStatus-list" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource AppointmentResponse
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="f:extension">
<sch:assert test="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])">ext-1: Must have either extensions or value[x], not both</sch:assert>
</sch:rule>
<sch:rule context="f:modifierExtension">
<sch:assert test="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])">ext-1: Must have either extensions or value[x], not both</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Global 1</sch:title>
<sch:rule context="f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>AppointmentResponse</sch:title>
<sch:rule context="f:AppointmentResponse">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource</sch:assert>
<sch:assert test="not(exists(f:contained/*/f:meta/f:security))">dom-5: If a resource is contained in another resource, it SHALL NOT have a security label</sch:assert>
<sch:assert test="(exists(f:participantType) or exists(f:actor))">apr-1: Either the participantType or actor must be specified</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:text/h:div">
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:identifier/f:period">
<sch:assert test="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) &lt;= xs:dateTime(f:end/@value))">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a contained resource if a local reference is provided</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:appointment">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a contained resource if a local reference is provided</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:appointment/f:identifier/f:period">
<sch:assert test="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) &lt;= xs:dateTime(f:end/@value))">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:appointment/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a contained resource if a local reference is provided</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:actor">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a contained resource if a local reference is provided</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:actor/f:identifier/f:period">
<sch:assert test="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) &lt;= xs:dateTime(f:end/@value))">per-1: If present, start SHALL have a lower value than end</sch:assert>
</sch:rule>
<sch:rule context="f:AppointmentResponse/f:actor/f:identifier/f:assigner">
<sch:assert test="not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])">ref-1: SHALL have a contained resource if a local reference is provided</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Generated on Fri, Nov 1, 2019 09:29+1100 for FHIR v4.0.1
Note: the schemas &amp; schematrons do not contain all of the rules about what makes resources
valid. Implementers will still need to be familiar with the content of the specification and with
any profiles that apply to the resources in order to make a conformant implementation.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://hl7.org/fhir" xmlns:xhtml="http://www.w3.org/1999/xhtml" targetNamespace="http://hl7.org/fhir" elementFormDefault="qualified" version="1.0">
<xs:include schemaLocation="fhir-base.xsd"/>
<xs:element name="AppointmentResponse" type="AppointmentResponse">
<xs:annotation>
<xs:documentation xml:lang="en">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="AppointmentResponse">
<xs:annotation>
<xs:documentation xml:lang="en">A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection.</xs:documentation>
<xs:documentation xml:lang="en">If the element is present, it must have either a @value, an @id, or extensions</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="DomainResource">
<xs:sequence>
<xs:element name="identifier" minOccurs="0" maxOccurs="unbounded" type="Identifier">
<xs:annotation>
<xs:documentation xml:lang="en">This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="appointment" minOccurs="1" maxOccurs="1" type="Reference">
<xs:annotation>
<xs:documentation xml:lang="en">Appointment that this response is replying to.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="start" minOccurs="0" maxOccurs="1" type="instant">
<xs:annotation>
<xs:documentation xml:lang="en">Date/Time that the appointment is to take place, or requested new start time.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="end" minOccurs="0" maxOccurs="1" type="instant">
<xs:annotation>
<xs:documentation xml:lang="en">This may be either the same as the appointment request to confirm the details of the appointment, or alternately a new time to request a re-negotiation of the end time.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="participantType" minOccurs="0" maxOccurs="unbounded" type="CodeableConcept">
<xs:annotation>
<xs:documentation xml:lang="en">Role of participant in the appointment.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="actor" minOccurs="0" maxOccurs="1" type="Reference">
<xs:annotation>
<xs:documentation xml:lang="en">A Person, Location, HealthcareService, or Device that is participating in the appointment.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="participantStatus" minOccurs="1" maxOccurs="1" type="ParticipationStatus">
<xs:annotation>
<xs:documentation xml:lang="en">Participation status of the participant. When the status is declined or tentative if the start/end times are different to the appointment, then these times should be interpreted as a requested time change. When the status is accepted, the times can either be the time of the appointment (as a confirmation of the time) or can be empty.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="comment" minOccurs="0" maxOccurs="1" type="string">
<xs:annotation>
<xs:documentation xml:lang="en">Additional comments about the appointment.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:ns prefix="f" uri="http://hl7.org/fhir"/>
<sch:ns prefix="h" uri="http://www.w3.org/1999/xhtml"/>
<!--
This file contains just the constraints for the resource AuditEvent
It is provided for documentation purposes. When actually validating,
always use fhir-invariants.sch (because of the way containment works)
Alternatively you can use this file to build a smaller version of
fhir-invariants.sch (the contents are identical; only include those
resources relevant to your implementation).
-->
<sch:pattern>
<sch:title>Global</sch:title>
<sch:rule context="f:extension">
<sch:assert test="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])">ext-1: Must have either extensions or value[x], not both</sch:assert>
</sch:rule>
<sch:rule context="f:modifierExtension">
<sch:assert test="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])">ext-1: Must have either extensions or value[x], not both</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>Global 1</sch:title>
<sch:rule context="f:*">
<sch:assert test="@value|f:*|h:div">global-1: All FHIR elements must have a @value or children</sch:assert>
</sch:rule>
</sch:pattern>
<sch:pattern>
<sch:title>AuditEvent</sch:title>
<sch:rule context="f:AuditEvent">
<sch:assert test="not(parent::f:contained and f:contained)">dom-2: If the resource is contained in another resource, it SHALL NOT contain nested Resources</sch:assert>
<sch:assert test="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))">dom-4: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated</sch:assert>
<sch:assert test="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))">dom-3: If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource</sch:assert>
<sch:assert test="not(exists(f:contained/*/f:meta/f:security))">dom-5: If a resource is contained in another resource, it SHALL NOT have a security label</sch:assert>
</sch:rule>
<sch:rule context="f:AuditEvent/f:text/h:div">
<sch:assert test="not(descendant-or-self::*[not(local-name(.)=('a', 'abbr', 'acronym', 'b', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'dd', 'dfn', 'div', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var'))]) and not(descendant-or-self::*/@*[not(name(.)=('abbr', 'accesskey', 'align', 'alt', 'axis', 'bgcolor', 'border', 'cellhalign', 'cellpadding', 'cellspacing', 'cellvalign', 'char', 'charoff', 'charset', 'cite', 'class', 'colspan', 'compact', 'coords', 'dir', 'frame', 'headers', 'height', 'href', 'hreflang', 'hspace', 'id', 'lang', 'longdesc', 'name', 'nowrap', 'rel', 'rev', 'rowspan', 'rules', 'scope', 'shape', 'span', 'src', 'start', 'style', 'summary', 'tabindex', 'title', 'type', 'valign', 'value', 'vspace', 'width'))])">txt-1: The narrative SHALL contain only the basic html formatting elements and attributes described in chapters 7-11 (except section 4 of chapter 9) and 15 of the HTML 4.0 standard, &lt;a&gt; elements (either name or href), images and internally contained style attributes</sch:assert>
<sch:assert test="descendant::text()[normalize-space(.)!=''] or descendant::h:img[@src]">txt-2: The narrative SHALL have some non-whitespace content</sch:assert>
</sch:rule>
<sch:rule context="f:AuditEvent/f:period">
<sch:assert test="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) &lt;= xs:dateTime(f:end/@value))">per-1: If present, start SHALL have a lower value than end</sch:assert>