<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Log: sp_attrib_groups.xsd,v $
    Revision 1.1.1.1  2003/07/22 14:26:28  richard
    initial import

    Revision 1.4  2002/07/08 18:46:01  richard
    Modified the medical assessment so that the "self_reprrted_ilness" and "documented_ilness" are now tok50Type(s).
    Added the "drug abuse" option to the disabilites picklist.
    Added CVS LOG keyword to all template files.

-->
<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

 <xsd:include schemaLocation="sp_simple_types.xsd"/>

 <xsd:attributeGroup name="dynamicDataDateGroup">
  <xsd:attribute name="date_added" 				type="xsd:dateTime"	 		use='required'/>
  <xsd:attribute name="date_effective"				type="xsd:dateTime"	 		use='required'/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="dateGroup">
  <xsd:attribute name="date_added" 				type="xsd:dateTime"	 		use='required'/>
  <xsd:attribute name="date_updated"				type="xsd:dateTime"	 		use='required'/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="recordIdentifierGroup">
  <xsd:attribute name="record_id"				type="xsd:ID" 				use='required'/>
  <xsd:attributeGroup ref="dateGroup"/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="entityIdentifierGroup">
  <xsd:attribute name="record_id"				type="xsd:ID" 				use='required'/>
  <xsd:attribute name="odbid"					type="xsd:int"   			use='required'/>
  <xsd:attribute name="external_id"				type="legacyIDType"			use='optional'/>
  <xsd:attribute name="system_id"				type="legacyIDType"			use='required'/>
  <xsd:attributeGroup ref="dateGroup"/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="weakEntityIdentifierGroup">
  <xsd:attribute name="record_id"				type="xsd:ID" 				use='required'/>
  <xsd:attribute name="external_id"				type="legacyIDType"			use='optional'/>
  <xsd:attribute name="system_id"				type="legacyIDType"			use='required'/>
  <xsd:attributeGroup ref="dateGroup"/>
 </xsd:attributeGroup>

</xsd:schema>
