Indivo Document Schema: SDMXΒΆ
For any data model in Indivo that can be represented in SDML, we will accept data in the form of SDMX.
Schema:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://indivo.org/vocab/xml/documents#" elementFormDefault="qualified" xmlns:indivo="http://indivo.org/vocab/xml/documents#">
<complexType name="ModelType">
<sequence>
<element name="Field" minOccurs="0" maxOccurs="unbounded">
<complexType mixed="true">
<choice>
<element name="Model" type="indivo:ModelType" minOccurs="0" maxOccurs="1"/>
<element name="Models" type="indivo:ModelsType" minOccurs="0" maxOccurs="1"/>
</choice>
<attribute name="name" type="string" use="required"/>
</complexType>
</element>
</sequence>
<attribute name="name" type="string" use="required" />
<attribute name="documentId" type="string" use="optional"/>
</complexType>
<complexType name="ModelsType">
<sequence>
<element name="Model" type="indivo:ModelType" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<element name="Models" type="indivo:ModelsType" />
</schema>
Example:
<Models xmlns="http://indivo.org/vocab/xml/documents#">
<Model name="TestMedication" documentId="b1d83191-6edd-4aad-be4e-63117cd4c660">
<Field name="date_started">2010-10-01T00:00:00Z</Field>
<Field name="name">ibuprofen</Field>
<Field name="brand_name">Advil</Field>
<Field name="date_stopped">2010-10-31T00:00:00Z</Field>
<Field name="prescription">
<Model name="TestPrescription" documentId="b1d83191-6edd-4aad-be4e-63117cd4c660">
<Field name="prescribed_by_name">Kenneth D. Mandl</Field>
<Field name="prescribed_by_institution">Children's Hospital Boston</Field>
<Field name="prescribed_on">2010-09-30T00:00:00Z</Field>
<Field name="prescribed_stop_on">2010-10-31T00:00:00Z</Field>
</Model>
</Field>
<Field name="fills">
<Models>
<Model name="TestFill" documentId="b1d83191-6edd-4aad-be4e-63117cd4c660">
<Field name="date_filled">2010-10-01T00:00:00Z</Field>
<Field name="supply_days">15</Field>
<Field name="filled_at_name">CVS</Field>
</Model>
<Model name="TestFill" documentId="b1d83191-6edd-4aad-be4e-63117cd4c660">
<Field name="date_filled">2010-10-16T00:00:00Z</Field>
<Field name="supply_days">15</Field>
<Field name="filled_at_name">CVS</Field>
</Model>
</Models>
</Field>
</Model>
</Models>