-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfacility.xsd
83 lines (71 loc) · 3.18 KB
/
facility.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http:www.openfacility.org/v1.0" xmlns:fac="http:www.openfacility.org/v1.0"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<xs:import namespace="http://www.w3.org/2003/01/geo/wgs84_pos#" schemaLocation="geo.xsd"/>
<xs:annotation>
<xs:documentation>This schema defines the representation of a health facility It is
deliberately permissive, providing a minimal framework of mandatory elements and flexible
opportunity for extension.</xs:documentation>
</xs:annotation>
<xs:element name="facility">
<xs:complexType>
<xs:sequence>
<!-- the following are mandatory elements -->
<xs:element ref="fac:name"/>
<xs:element ref="fac:url"/>
<xs:element ref="fac:identities"/>
<xs:element ref="fac:active"/>
<xs:element ref="geo:lat"/>
<xs:element ref="geo:long"/>
<!-- the following are optional elements -->
<xs:element ref="fac:approvalDate" minOccurs="0"/>
<xs:element ref="fac:link" minOccurs="0" maxOccurs="unbounded"/>
<!--
-->
<xs:sequence minOccurs="0">
<xs:annotation>
<xs:documentation>Any other elements may appear here so long as they are in their own
namespace. Conforming producers can use this to provide additional reference metadata
about the facility which might be peculiar to the producer application. Conforming
consumers may ignore this.</xs:documentation>
</xs:annotation>
<xs:any namespace="##other" processContents="lax"/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:NCName"/>
<xs:element name="url" type="xs:anyURI"/>
<!-- a facility registry should be able to broker between different identifiers -->
<xs:element name="identities">
<xs:complexType>
<xs:sequence>
<xs:element ref="fac:guid"/>
<xs:element maxOccurs="unbounded" ref="fac:identity"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="guid" type="xs:anyURI"/>
<!-- an identifier may have any number of additional attributes, eg to model an hl7 identifier -->
<!-- context and id are mandatory -->
<xs:element name="identity">
<xs:complexType>
<xs:attribute name="agency" use="optional" type="xs:NCName"/>
<xs:attribute name="context" use="required" type="xs:NCName"/>
<xs:attribute name="id" use="required" type="xs:NMTOKEN"/>
<xs:anyAttribute/>
</xs:complexType>
</xs:element>
<xs:element name="active" type="xs:boolean"/>
<xs:element name="approvalDate" type="xs:date"/>
<!-- link provides a way associate external resources to this facility, eg those which might be in other registries -->
<!-- links are optional and any number of links are allowed -->
<xs:element name="link">
<xs:complexType>
<xs:attribute name="name" use="required" type="xs:NCName"/>
<xs:attribute name="url" use="required" type="xs:anyURI"/>
<xs:anyAttribute/>
</xs:complexType>
</xs:element>
</xs:schema>