<Profile xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../fhir-single.xsd">
	<text>
		<status value="generated" />
		<div xmlns="http://www.w3.org/1999/xhtml">
		</div>
	</text>
	<name value="organization" />
	<publisher value="ConnectingGTA" />
	<description value="TODO: define" />
	<status value="draft" />
	<date value="2014-02-03" />

	<structure>
		<type value="Organization" />
		<publish value="true" />
		<element>
			<path value="Organization" />
			<definition>
				<short value="A grouping of people or organizations with a common purpose" />
				<formal
					value="A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc." />
				<min value="1" />
				<max value="1" />
				<type>
					<code value="Resource" />
				</type>
				<constraint>
					<key value="1" />
					<name value="AtLeastANameOrId" />
					<severity value="error" />
					<human value="The organization SHALL at least have a name or an id, and possibly more than one" />
					<xpath value="count(f:identifier | f:name) &gt; 0" />
				</constraint>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.extension" />
			<slicing>
				<discriminator value="url" />
				<ordered value="false"/>
				<rules value="open"/>
			</slicing>
			<definition>
				<short value="Extensions" />
				<formal value="Extensions" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Extension" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.extension" />
			<name value="providerIdPool"/>
			<definition>
				<short value="Provider ID system pool" />
				<formal value="An OID which serves as a namespace (ID root in HL7v3, identifier.system in FHIR) for a provider identifier" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Extension" />
					<profile value="#providerIdPool" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>

		<element>
			<path value="Organization.modifierExtension" />
			<definition>
				<short value="Extensions that cannot be ignored" />
				<formal
					value="May be used to represent additional information that is not part of the basic definition of the resource, 
			and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, 
			there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be 
			met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
				<comments
					value="there can be no stigma associated 
			with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what 
			allows the FHIR specification to retain a core simplicity for everyone." />
				<synonym value="extensions" />
				<synonym value="user content" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Extension" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.text" />
			<definition>
				<short value="Text summary of the 
			resource, for human interpretation" />
				<formal
					value="A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to 
			a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it &quot;clinically safe&quot; for a human to just read the narrative. 
			Resource definitions may define what content should be represented in the narrative to ensure clinical safety." />
				<comments value="Contained resources do not have narrative. Resources 
			that are not contained SHOULD have a narrative." />
				<synonym value="narrative" />
				<synonym value="html" />
				<synonym value="xhtml" />
				<synonym value="display" />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="Narrative" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.contained" />
			<definition>
				<short value="Contained, 
			inline Resources" />
				<formal
					value="These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor 
			can they have their own independent transaction scope." />
				<comments
					value="This should never be done when the content can be identified properly, as once identification is lost, it 
			is extremely difficult (and context dependent) to restore it again." />
				<synonym value="inline resources" />
				<synonym value="anonymous resources" />
				<synonym value="contained resources" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Resource" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>

		<!-- <element> <path value="Organization.providerIdPool" /> <definition> <short value="Contact for the organization for a certain purpose" /> <formal value="Contact for the organization 
			for a certain purpose." /> <min value="0" /> <max value="*" /> <isModifier value="false" /> <extension url=""></extension> </definition> </element> -->


		<element>
			<path value="Organization.identifier" />
			<definition>
				<short value="Identifies this organization  across multiple systems" />
				<formal value="Identifier for the organization that is used to identify the organization across multiple disparate systems." />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Identifier" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.name" />
			<definition>
				<short value="Name used for the organization" />
				<formal value="A name associated with the organization." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="string" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".name" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="XON.1 Organization Name" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value=".PreferredName/Name" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.type" />
			<definition>
				<short value="Kind of organization" />
				<formal value="The kind of organization that this is." />
				<comments
					value="Organizations can be corporations, wards, sections, clinical teams, government departments, etc. Note that code is generally a classifier of the type of organization; in many applications, codes are used to identity a particular organization (say, ward) as opposed to another of the same type - these are identifiers, not codes." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="CodeableConcept" />
				</type>
				<isModifier value="false" />
				<binding>
					<name value="OrganizationType" />
					<isExtensible value="true" />
					<conformance value="example" />
					<referenceValueSet>
						<reference value="http://hl7.org/fhir/vs/organization-type" />
					</referenceValueSet>
				</binding>
				<mapping>
					<identity value="rim" />
					<map value=".code" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="No equivalent in v2" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value="n/a" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.telecom" />
			<definition>
				<short value="A contact detail for the organization" />
				<formal value="A contact detail for the organization." />
				<comments
					value="The use code home is not to be used. Note that these contacts are not the contact details of people who are employed by or represent the organization, but official contacts for the organization itself." />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Contact" />
				</type>
				<constraint>
					<key value="3" />
					<name value="NoHomeUseTelecom" />
					<severity value="error" />
					<human value="The telecom of an organization can never be of use 'home'" />
					<xpath value="count(f:use[@value='home']) = 0" />
				</constraint>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".telecom" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="No authoritative equivalent in V2.x" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value="./ContactPoints" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.address" />
			<definition>
				<short value="An address for the organization" />
				<formal value="An address for the organization." />
				<comments value="Organization may have multiple addresses with different uses or applicable periods. The use code home is not to be used." />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Address" />
				</type>
				<constraint>
					<key value="2" />
					<name value="NoHomeUseAddress" />
					<severity value="error" />
					<human value="An address of an organization can never be of use 'home'" />
					<xpath value="count(f:use[@value='home']) = 0" />
				</constraint>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".address" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="No authoritative equivalent in V2.x; some V2.x segments such as OBX might provide a serialized instance value" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value="./PrimaryAddress and ./OtherAddresses" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.partOf" />
			<definition>
				<short value="The organization of which this organization forms a part" />
				<formal value="The organization of which this organization forms a part." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="ResourceReference" />
					<profile value="http://hl7.org/fhir/profiles/Organization" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".playedBy[classCode=Part].scoper" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="No equivalent in V2.x" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value="n/a" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact" />
			<definition>
				<short value="Contact for the organization for a certain purpose" />
				<formal value="Contact for the organization for a certain purpose." />
				<min value="0" />
				<max value="*" />
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".contactParty" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact.extension" />
			<definition>
				<short value="Additional Content defined by implementations" />
				<formal
					value="May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
				<comments
					value="there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone." />
				<synonym value="extensions" />
				<synonym value="user content" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Extension" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.contact.modifierExtension" />
			<definition>
				<short value="Extensions that cannot be ignored" />
				<formal
					value="May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." />
				<comments
					value="there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core simplicity for everyone." />
				<synonym value="extensions" />
				<synonym value="user content" />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Extension" />
				</type>
				<isModifier value="false" />
			</definition>
		</element>
		<element>
			<path value="Organization.contact.purpose" />
			<definition>
				<short value="The type of contact" />
				<formal value="Indicates a purpose for which the contact can be reached." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="CodeableConcept" />
				</type>
				<isModifier value="false" />
				<binding>
					<name value="ContactPartyType" />
					<isExtensible value="true" />
					<conformance value="preferred" />
					<referenceValueSet>
						<reference value="http://hl7.org/fhir/vs/contactentity-type" />
					</referenceValueSet>
				</binding>
				<mapping>
					<identity value="rim" />
					<map value="./type" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact.name" />
			<definition>
				<short value="A name associated with the contact" />
				<formal value="A name associated with the contact." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="HumanName" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value="./name" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="PID-5, PID-9" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact.telecom" />
			<definition>
				<short value="Contact details (telephone, email, etc)  for a contact" />
				<formal value="A contact detail (e.g. a telephone number or an email address) by which the party may be contacted." />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="Contact" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value="./telecom" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="PID-13, PID-14" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact.address" />
			<definition>
				<short value="Visiting or postal addresses for the contact" />
				<formal value="Visiting or postal addresses for the contact." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="Address" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value="./addr" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="PID-11" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.contact.gender" />
			<definition>
				<short value="Gender for administrative purposes" />
				<formal value="Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="CodeableConcept" />
				</type>
				<isModifier value="false" />
				<binding>
					<name value="AdministrativeGender" />
					<isExtensible value="true" />
					<conformance value="preferred" />
					<referenceValueSet>
						<reference value="http://hl7.org/fhir/vs/administrative-gender" />
					</referenceValueSet>
				</binding>
				<mapping>
					<identity value="rim" />
					<map value="./administrativeGender" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="PID-8" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.location" />
			<definition>
				<short value="Location(s) the organization uses to provide services" />
				<formal value="Location(s) the organization uses to provide services." />
				<min value="0" />
				<max value="*" />
				<type>
					<code value="ResourceReference" />
					<profile value="http://hl7.org/fhir/profiles/Location" />
				</type>
				<isModifier value="false" />
				<mapping>
					<identity value="rim" />
					<map value=".scopedBy[classCode=LocatedEntity].scoper" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map value="./Sites" />
				</mapping>
			</definition>
		</element>
		<element>
			<path value="Organization.active" />
			<definition>
				<short value="Whether the organization's record is still in active use" />
				<formal value="Whether the organization's record is still in active use." />
				<comments value="Default is true." />
				<min value="0" />
				<max value="1" />
				<type>
					<code value="boolean" />
				</type>
				<isModifier value="true" />
				<mapping>
					<identity value="rim" />
					<map value=".status" />
				</mapping>
				<mapping>
					<identity value="v2" />
					<map value="No equivalent in V2.x" />
				</mapping>
				<mapping>
					<identity value="servd" />
					<map
						value="./Status (however this concept in ServD more covers why the organization is active or not, could be delisted, deregistered, not operational yet) this could alternatively be derived from ./StartDate and ./EndDate and given a context date." />
				</mapping>
			</definition>
		</element>
		<searchParam>
			<name value="_id" />
			<type value="token" />
			<documentation value="The logical resource id associated with the resource (must be supported by all servers)" />
		</searchParam>
		<searchParam>
			<name value="active" />
			<type value="token" />
			<documentation value="Whether the organization's record is active" />
			<xpath value="f:Organization/f:active" />
		</searchParam>
		<searchParam>
			<name value="identifier" />
			<type value="token" />
			<documentation value="Any identifier for the organization (not the accreditation issuer's identifier)" />
			<xpath value="f:Organization/f:identifier" />
		</searchParam>
		<searchParam>
			<name value="name" />
			<type value="string" />
			<documentation value="A portion of the organization's name" />
			<xpath value="f:Organization/f:name" />
		</searchParam>
		<searchParam>
			<name value="partof" />
			<type value="reference" />
			<documentation value="Search all organizations that are part of the given organization" />
			<xpath value="f:Organization/f:partOf" />
		</searchParam>
		<searchParam>
			<name value="phonetic" />
			<type value="string" />
			<documentation value="A portion of the organization's name using some kind of phonetic matching algorithm" />
		</searchParam>
		<searchParam>
			<name value="type" />
			<type value="token" />
			<documentation value="A code for the type of organization" />
			<xpath value="f:Organization/f:type" />
		</searchParam>
	</structure>

	<extensionDefn>
		<code value="providerIdPool" />
		<contextType value="resource" />
		<context value="Organization" />
		<definition>
			<short value="Provider ID system pool" />
			<formal value="An OID which serves as a namespace (ID root in HL7v3, identifier.system in FHIR) for a provider identifier" />
			<min value="0" />
			<max value="*" />
			<type>
				<code value="code" />
			</type>
			<mustSupport value="false" />
			<isModifier value="false" />
			<binding>
				<name value="ConnectingGTA Provider ID Namespaces" />
				<isExtensible value="false" />
			</binding>
		</definition>
	</extensionDefn>

</Profile>
