dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #03683
[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 72: Rearranged orgunit definition to better reflect the API model
------------------------------------------------------------
revno: 72
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: dhis2-docbook-docs
timestamp: Tue 2009-12-15 00:49:17 +0000
message:
Rearranged orgunit definition to better reflect the API model
modified:
src/schemas/dxf_v2_schema/dxf2.rng
src/schemas/dxf_v2_schema/sample_dxf2.xml
--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs
Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription.
=== modified file 'src/schemas/dxf_v2_schema/dxf2.rng'
--- src/schemas/dxf_v2_schema/dxf2.rng 2009-12-14 14:42:50 +0000
+++ src/schemas/dxf_v2_schema/dxf2.rng 2009-12-15 00:49:17 +0000
@@ -23,10 +23,6 @@
<element name="metadata">
<optional>
- <ref name="OrgUnitDefinition"/>
- </optional>
-
- <optional>
<ref name="CategoryDimensions"/>
</optional>
@@ -44,9 +40,15 @@
<optional>
<ref name="DataSetDefinition"/>
</optional>
+
<optional>
<ref name="DataDictionaryDefinition"/>
</optional>
+
+ <optional>
+ <ref name="OrgUnitDefinition"/>
+ </optional>
+
<optional>
<ref name="Periods"/>
</optional>
@@ -101,10 +103,10 @@
</define>
<define name="OrgUnitDefinition">
<element name="orgUnitStructure" ns="http://dhis2.org/ns/schema/dxf2">
+ <ref name="organisationUnitLevels"/>
+ <ref name="organisationUnits"/>
+ <ref name="organisationUnitGroups"/>
<ref name="organisationGroupSets"/>
- <ref name="organisationUnitGroups"/>
- <ref name="organisationUnits"/>
- <ref name="organisationUnitLevels"/>
</element>
</define>
<define name="ReportTableDefinition">
@@ -165,11 +167,13 @@
<oneOrMore>
<element name="category">
<ref name="identifiableObject"/>
- <oneOrMore>
- <element name="categoryOption">
- <ref name="identifiableObject"/>
- </element>
- </oneOrMore>
+ <element name="categoryOptions">
+ <oneOrMore>
+ <element name="categoryOption">
+ <ref name="identifiableObject"/>
+ </element>
+ </oneOrMore>
+ </element>
</element>
</oneOrMore>
</element>
@@ -447,6 +451,15 @@
<value>false</value>
</choice>
</element>
+ <element name="groups">
+ <zeroOrMore>
+ <element name="group">
+ <attribute name="ref">
+ <ref name="dxfIDRef"/>
+ </attribute>
+ </element>
+ </zeroOrMore>
+ </element>
</element>
</zeroOrMore>
</element>
@@ -465,12 +478,11 @@
<element name="name">
<text/>
</element>
- <!--An organisation group can be a member of zero or more groupsets -->
- <element name="groupSets">
+ <element name="orgUnits">
<zeroOrMore>
- <element name="groupSet">
- <attribute name="id">
- <ref name="dxfID"/>
+ <element name="orgUnit">
+ <attribute name="ref">
+ <ref name="dxfIDRef"/>
</attribute>
</element>
</zeroOrMore>
@@ -487,48 +499,63 @@
</zeroOrMore>
</element>
</define>
+
<define name="organisationUnit">
<element name="organisationUnit" ns="http://dhis2.org/ns/schema/dxf2">
<ref name="identifiableObject"/>
- <!-- <element name="openingDate"><data type="date"/></element> -->
- <element name="openingDate">
- <text/>
- </element>
- <!-- TODO: accept Date or nothing -->
- <element name="closedDate">
- <text/>
- </element>
- <element name="active">
- <text/>
- </element>
- <element name="comment">
- <text/>
- </element>
- <element name="geoCode">
- <text/>
- </element>
- <!-- An orgunit has zero or more dataSets associated with it-->
- <element name="dataSets">
- <zeroOrMore>
- <element name="dataSetID">
- <data type="integer"/>
- </element>
- </zeroOrMore>
- </element>
- <!--An organisation can be a member of zero or more groups -->
- <element name="organisationGroups">
- <zeroOrMore>
- <element name="OrganisationGroup">
- <data type="integer"/>
- </element>
- </zeroOrMore>
- </element>
-<!-- An organisation unit is part of a hierarchical tree-->
- <element name="children">
- <zeroOrMore>
- <ref name="organisationUnit"/>
- </zeroOrMore>
- </element>
+ <!-- <element name="openingDate"><data type="date"/></element> -->
+ <element name="dataSets">
+ <zeroOrMore>
+ <element name="dataSet">
+ <attribute name="ref">
+ <ref name="dxfIDRef"/>
+ </attribute>
+ </element>
+ </zeroOrMore>
+ </element>
+ <element name="openingDate">
+ <!-- TODO: accept Date or nothing -->
+ <!-- <data type="date"/>-->
+ <text/>
+ </element>
+ <element name="closedDate">
+ <!-- TODO: accept Date or nothing -->
+ <!-- <data type="date"/>-->
+ <text/>
+ </element>
+ <element name="active">
+ <text/>
+ </element>
+ <element name="comment">
+ <text/>
+ </element>
+ <element name="geoCode">
+ <text/>
+ </element>
+ <element name="polygonCoordinates">
+ <text/>
+ </element>
+ <element name="latitude">
+ <text/>
+ </element>
+ <element name="longitude">
+ <text/>
+ </element>
+ <element name="url">
+ <text/>
+ </element>
+ <element name="lastUpdated">
+ <!-- TODO: accept Date or nothing -->
+ <!-- <data type="date"/>-->
+ <text/>
+ </element>
+
+ <!-- An organisation unit is part of a hierarchical tree-->
+ <element name="children">
+ <zeroOrMore>
+ <ref name="organisationUnit"/>
+ </zeroOrMore>
+ </element>
</element>
</define>
=== modified file 'src/schemas/dxf_v2_schema/sample_dxf2.xml'
--- src/schemas/dxf_v2_schema/sample_dxf2.xml 2009-12-14 14:42:50 +0000
+++ src/schemas/dxf_v2_schema/sample_dxf2.xml 2009-12-15 00:49:17 +0000
@@ -2,85 +2,9 @@
<?oxygen RNGSchema="dxf2.rng" type="xml"?>
<dxf xmlns="http://dhis2.org/ns/schema/dxf2" >
-
+
<metadata>
-
- <orgUnitStructure>
- <groupSets/>
- <organisationUnitGroups/>
- <organisationUnits>
- <organisationUnit id="1">
- <uuid/>
- <name>Bob's District</name>
- <alternativename>Bob's District</alternativename>
- <shortname>Bob's District</shortname>
- <code>DISTRICT_BOB</code>
- <description/>
- <openingDate/>
- <closedDate/>
- <active/>
- <comment/>
- <geoCode/>
- <dataSets/>
- <organisationGroups/>
- <children>
- <organisationUnit id="2">
- <uuid></uuid>
- <name>Bob's Clinic</name>
- <alternativename>Bob's Clinic</alternativename>
- <shortname>Bob's Clinic</shortname>
- <code></code>
- <description></description>
- <openingDate></openingDate>
- <closedDate></closedDate>
- <active></active>
- <comment></comment>
- <geoCode></geoCode>
- <dataSets></dataSets>
- <organisationGroups></organisationGroups>
- <children></children>
- </organisationUnit>
- <organisationUnit id="3">
- <uuid></uuid>
- <name></name>
- <alternativename></alternativename>
- <shortname></shortname>
- <code></code>
- <description></description>
- <openingDate></openingDate>
- <closedDate></closedDate>
- <active></active>
- <comment></comment>
- <geoCode></geoCode>
- <dataSets></dataSets>
- <organisationGroups></organisationGroups>
- <children>
- <organisationUnit id="4">
- <uuid></uuid>
- <name></name>
- <alternativename></alternativename>
- <shortname></shortname>
- <code></code>
- <description></description>
- <openingDate></openingDate>
- <closedDate></closedDate>
- <active></active>
- <comment></comment>
- <geoCode></geoCode>
- <dataSets></dataSets>
- <organisationGroups></organisationGroups>
- <children></children>
- </organisationUnit>
-
- </children>
- </organisationUnit>
-
- </children>
- </organisationUnit>
- </organisationUnits>
- <organisationUnitLevels/>
- </orgUnitStructure>
-
+
<categories>
<category id="1">
<uuid/>
@@ -89,22 +13,24 @@
<shortname>Gender</shortname>
<code>CL_GENDER</code>
<description/>
- <categoryOption id="1">
- <uuid/>
- <name>Male</name>
- <alternativename/>
- <shortname>Male</shortname>
- <code>MALE</code>
- <description/>
- </categoryOption>
- <categoryOption id="2">
- <uuid/>
- <name>Female</name>
- <alternativename/>
- <shortname>Female</shortname>
- <code>FEMALE</code>
- <description/>
- </categoryOption>
+ <categoryOptions>
+ <categoryOption id="1">
+ <uuid/>
+ <name>Male</name>
+ <alternativename/>
+ <shortname>Male</shortname>
+ <code>MALE</code>
+ <description/>
+ </categoryOption>
+ <categoryOption id="2">
+ <uuid/>
+ <name>Female</name>
+ <alternativename/>
+ <shortname>Female</shortname>
+ <code>FEMALE</code>
+ <description/>
+ </categoryOption>
+ </categoryOptions>
</category>
<category id="2">
<uuid/>
@@ -113,22 +39,24 @@
<shortname>Age</shortname>
<code>CL_AGE</code>
<description/>
- <categoryOption id="3">
- <uuid/>
- <name>Under 5</name>
- <alternativename/>
- <shortname>Under 5</shortname>
- <code>UNDER_5</code>
- <description/>
- </categoryOption>
- <categoryOption id="4">
- <uuid/>
- <name>5 to 10</name>
- <alternativename/>
- <shortname>5 to 10</shortname>
- <code>5_TO_10</code>
- <description/>
- </categoryOption>
+ <categoryOptions>
+ <categoryOption id="3">
+ <uuid/>
+ <name>Under 5</name>
+ <alternativename/>
+ <shortname>Under 5</shortname>
+ <code>UNDER_5</code>
+ <description/>
+ </categoryOption>
+ <categoryOption id="4">
+ <uuid/>
+ <name>5 to 10</name>
+ <alternativename/>
+ <shortname>5 to 10</shortname>
+ <code>5_TO_10</code>
+ <description/>
+ </categoryOption>
+ </categoryOptions>
</category>
</categories>
@@ -343,6 +271,96 @@
</dataSet>
</dataSets>
<dataDictionaries/>
+
+ <orgUnitStructure>
+ <organisationUnitLevels/>
+ <organisationUnits>
+ <organisationUnit id="2000">
+ <uuid/>
+ <name>Bob's District</name>
+ <alternativename>Bob's District</alternativename>
+ <shortname>Bob's District</shortname>
+ <code>DISTRICT_BOB</code>
+ <description/>
+ <dataSets/>
+ <openingDate/>
+ <closedDate/>
+ <active/>
+ <comment/>
+ <geoCode/>
+ <polygonCoordinates/>
+ <latitude/>
+ <longitude/>
+ <url/>
+ <lastUpdated/>
+ <children>
+ <organisationUnit id="2001">
+ <uuid></uuid>
+ <name>Bob's Clinic</name>
+ <alternativename>Bob's Clinic</alternativename>
+ <shortname>Bob's Clinic</shortname>
+ <code></code>
+ <description></description>
+ <dataSets/>
+ <openingDate/>
+ <closedDate/>
+ <active/>
+ <comment/>
+ <geoCode/>
+ <polygonCoordinates/>
+ <latitude/>
+ <longitude/>
+ <url/>
+ <lastUpdated/>
+ <children></children>
+ </organisationUnit>
+ <organisationUnit id="3000">
+ <uuid></uuid>
+ <name></name>
+ <alternativename></alternativename>
+ <shortname></shortname>
+ <code></code>
+ <description></description>
+ <dataSets/>
+ <openingDate/>
+ <closedDate/>
+ <active/>
+ <comment/>
+ <geoCode/>
+ <polygonCoordinates/>
+ <latitude/>
+ <longitude/>
+ <url/>
+ <lastUpdated/>
+ <children>
+ <organisationUnit id="3000">
+ <uuid></uuid>
+ <name></name>
+ <alternativename></alternativename>
+ <shortname></shortname>
+ <code></code>
+ <description></description>
+ <dataSets/>
+ <openingDate/>
+ <closedDate/>
+ <active/>
+ <comment/>
+ <geoCode/>
+ <polygonCoordinates/>
+ <latitude/>
+ <longitude/>
+ <url/>
+ <lastUpdated/>
+ <children/>
+ </organisationUnit>
+ </children>
+ </organisationUnit>
+ </children>
+ </organisationUnit>
+ </organisationUnits>
+ <organisationUnitGroups/>
+ <groupSets/>
+ </orgUnitStructure>
<periods>
<period id="1">