OrganizationAffiliation

Profile

CA-CSD-OrganizationAffiliation

Derived from

https://profiles.ihe.net/ITI/mCSD/StructureDefinition/IHE.mCSD.OrganizationAffiliation

Scope and Usage

An OrganizationAffiliation is used to identify a relationship between organizations that are not hierarchical in nature. Examples of such relationships are supply chains or administrative reporting. An OrganizationAffiliation resource can also be used to indicate a routing path to other organizations that cannot be reached directly.

References to this resource

Resource Content

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..0uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..0Extension
identifierS Σ0..*Identifier
activeS Σ1..1boolean
periodS Σ I0..1Period
organizationS Σ I1..1Reference(Organization)
participatingOrganizationS Σ I1..1Reference(Organization)
networkΣ I0..0Reference(Organization)
codeS Σ1..*CodeableConcept
specialtyΣ0..*CodeableConceptBinding
locationΣ I0..*Reference(Location)
healthcareServiceI0..*Reference(HealthcareService)
telecomS Σ I0..*ContactPoint
endpointS I0..*Reference(Endpoint)
<StructureDefinition xmlns="http://hl7.org/fhir">
    <id value="CA-CSD-OrganizationAffiliation" />
    <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
            <valueCode value="SHALL:able-to-populate" />
        </extension>
        <extension url="code">
            <valueCode value="SHOULD:populate" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.identifier" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.active" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.period" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.organization" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.participatingOrganization" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.code" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.endpoint" />
        </extension>
        <extension url="actor">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/server" />
        </extension>
    </extension>
    <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
            <valueCode value="ihe-r2" />
        </extension>
        <extension url="code">
            <valueCode value="SHOULD:populate" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.telecom" />
        </extension>
        <extension url="actor">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/server" />
        </extension>
        <extension url="documentation">
            <valueMarkdown value="SHALL:ihe-r2 is expected, even though the modifier in the ValueSet has yet to be applied." />
        </extension>
    </extension>
    <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
        <extension url="code">
            <valueCode value="SHALL:no-error" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.identifier" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.active" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.period" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.organization" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.participatingOrganization" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.code" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.telecom" />
        </extension>
        <extension url="elementId">
            <valueString value="OrganizationAffiliation.endpoint" />
        </extension>
        <extension url="actor">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/client" />
        </extension>
    </extension>
    <url value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-OrganizationAffiliation" />
    <name value="OrganizationAffiliation" />
    <status value="draft" />
    <description value="An OrganizationAffiliation is used to identify a relationship between organizations that are not hierarchical in nature.  Examples of such relationships are supply chains or administrative reporting. An OrganizationAffiliation resource can also be used to indicate a routing path to other organizations that cannot be reached directly." />
    <copyright value="Copyright &#169; 2024+ Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy)." />
    <fhirVersion value="4.0.1" />
    <kind value="resource" />
    <abstract value="false" />
    <type value="OrganizationAffiliation" />
    <baseDefinition value="https://profiles.ihe.net/ITI/mCSD/StructureDefinition/IHE.mCSD.OrganizationAffiliation" />
    <derivation value="constraint" />
    <snapshot>
        <element id="OrganizationAffiliation">
            <path value="OrganizationAffiliation" />
            <short value="Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship" />
            <definition value="Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation" />
                <min value="0" />
                <max value="*" />
            </base>
            <constraint>
                <key value="dom-2" />
                <severity value="error" />
                <human value="If the resource is contained in another resource, it SHALL NOT contain nested Resources" />
                <expression value="contained.contained.empty()" />
                <xpath value="not(parent::f:contained and f:contained)" />
                <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
            </constraint>
            <constraint>
                <key value="dom-4" />
                <severity value="error" />
                <human value="If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated" />
                <expression value="contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()" />
                <xpath value="not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))" />
                <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
            </constraint>
            <constraint>
                <key value="dom-3" />
                <severity value="error" />
                <human value="If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource" />
                <expression value="contained.where(((&#39;#&#39;+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists() or descendants().where(as(canonical) = &#39;#&#39;).exists()).not()).trace(&#39;unmatched&#39;, id).empty()" />
                <xpath value="not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat(&#39;#&#39;, $contained/*/id/@value) or descendant::f:reference[@value=&#39;#&#39;])]))" />
                <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
            </constraint>
            <constraint>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice">
                    <valueBoolean value="true" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation">
                    <valueMarkdown value="When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time." />
                </extension>
                <key value="dom-6" />
                <severity value="warning" />
                <human value="A resource should have narrative for robust management" />
                <expression value="text.`div`.exists()" />
                <xpath value="exists(f:text/h:div)" />
                <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
            </constraint>
            <constraint>
                <key value="dom-5" />
                <severity value="error" />
                <human value="If a resource is contained in another resource, it SHALL NOT have a security label" />
                <expression value="contained.meta.security.empty()" />
                <xpath value="not(exists(f:contained/*/f:meta/f:security))" />
                <source value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="Entity. Role, or Act" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Role" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.id">
            <path value="OrganizationAffiliation.id" />
            <short value="Logical id of this artifact" />
            <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." />
            <comment value="The only time that a resource does not have an id is when it is being submitted to the server using a create operation." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.id" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
                    <valueUrl value="string" />
                </extension>
                <code value="http://hl7.org/fhirpath/System.String" />
            </type>
            <isSummary value="true" />
        </element>
        <element id="OrganizationAffiliation.meta">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.meta" />
            <short value="Metadata about the resource" />
            <definition value="The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.meta" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Meta" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.implicitRules">
            <path value="OrganizationAffiliation.implicitRules" />
            <short value="A set of rules under which this content was created" />
            <definition value="A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc." />
            <comment value="Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it&#39;s narrative along with other profiles, value sets, etc." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="Resource.implicitRules" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="uri" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <isModifier value="true" />
            <isModifierReason value="This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it&#39;s meaning or interpretation" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.language">
            <path value="OrganizationAffiliation.language" />
            <short value="Language of the resource content" />
            <definition value="The base language in which the resource is written." />
            <comment value="Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute)." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="Resource.language" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="code" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet">
                    <valueCanonical value="http://hl7.org/fhir/ValueSet/all-languages" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="Language" />
                </extension>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
                    <valueBoolean value="true" />
                </extension>
                <strength value="preferred" />
                <description value="A human language." />
                <valueSet value="http://hl7.org/fhir/ValueSet/languages" />
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.text">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.text" />
            <short value="Text summary of the resource, for human interpretation" />
            <definition value="A human-readable narrative that contains a summary of the resource and can 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." />
            <comment value="Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later." />
            <alias value="narrative" />
            <alias value="html" />
            <alias value="xhtml" />
            <alias value="display" />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="DomainResource.text" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Narrative" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="Act.text?" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.contained">
            <path value="OrganizationAffiliation.contained" />
            <short value="Contained, inline Resources" />
            <definition 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." />
            <comment 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. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels." />
            <alias value="inline resources" />
            <alias value="anonymous resources" />
            <alias value="contained resources" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="DomainResource.contained" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Resource" />
            </type>
            <mapping>
                <identity value="rim" />
                <map value="Entity. Role, or Act" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.extension">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.extension" />
            <slicing>
                <discriminator>
                    <type value="value" />
                    <path value="url" />
                </discriminator>
                <description value="Extensions are always sliced by (at least) url" />
                <rules value="open" />
            </slicing>
            <short value="Additional content defined by implementations" />
            <definition value="May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." />
            <comment 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 level of simplicity for everyone." />
            <alias value="extensions" />
            <alias value="user content" />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="DomainResource.extension" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Extension" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ext-1" />
                <severity value="error" />
                <human value="Must have either extensions or value[x], not both" />
                <expression value="extension.exists() != value.exists()" />
                <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &#39;value&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.modifierExtension">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.modifierExtension" />
            <slicing>
                <discriminator>
                    <type value="value" />
                    <path value="url" />
                </discriminator>
                <description value="Extensions are always sliced by (at least) url" />
                <rules value="open" />
            </slicing>
            <short value="Extensions that cannot be ignored" />
            <definition 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 and/or the understanding of the containing element&#39;s descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)." />
            <comment 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 level of simplicity for everyone." />
            <requirements value="Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension)." />
            <alias value="extensions" />
            <alias value="user content" />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="DomainResource.modifierExtension" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Extension" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ext-1" />
                <severity value="error" />
                <human value="Must have either extensions or value[x], not both" />
                <expression value="extension.exists() != value.exists()" />
                <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), &#39;value&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
            </constraint>
            <isModifier value="true" />
            <isModifierReason value="Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="N/A" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.identifier">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.identifier" />
            <short value="Business identifiers that are specific to this role" />
            <definition value="Business identifiers that are specific to this role." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <requirements value="Often, specific identities are assigned for the agent." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.identifier" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Identifier" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="Identifier" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="FiveWs.identifier" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".id" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.active">
            <path value="OrganizationAffiliation.active" />
            <short value="Whether this organization affiliation record is in active use" />
            <definition value="Whether this organization affiliation record is in active use." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <requirements value="Need to be able to mark an organization affiliation record as not to be used because it was created in error, or otherwise no longer in active use." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="OrganizationAffiliation.active" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="boolean" />
            </type>
            <meaningWhenMissing value="This resource is generally assumed to be active if no value is provided for the active element" />
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="FiveWs.status" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".statusCode" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.period">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.period" />
            <short value="The period during which the participatingOrganization is affiliated with the primary organization" />
            <definition value="The period during which the participatingOrganization is affiliated with the primary organization." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <requirements value="An affiliation may be created ahead of time and only be active for a defined period of time. Once the affiliation is complete, the fact that it existed may still be required." />
            <min value="0" />
            <max value="1" />
            <base>
                <path value="OrganizationAffiliation.period" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Period" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="per-1" />
                <severity value="error" />
                <human value="If present, start SHALL have a lower value than end" />
                <expression value="start.hasValue().not() or end.hasValue().not() or (start &lt;= end)" />
                <xpath value="not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) &lt;= xs:dateTime(f:end/@value))" />
                <source value="http://hl7.org/fhir/StructureDefinition/Period" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="DR" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="IVL&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;] or URG&lt;TS&gt;[lowClosed=&quot;true&quot; and highClosed=&quot;true&quot;]" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="FiveWs.done[x]" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".performance[@typeCode &lt;= &#39;PPRF&#39;].ActDefinitionOrEvent.effectiveTime" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.organization">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.organization" />
            <short value="Organization where the role is available." />
            <definition value="Organization where the role is available (primary organization/has members)." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="OrganizationAffiliation.organization" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".scoper" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.participatingOrganization">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.participatingOrganization" />
            <short value="The Organization providing the role." />
            <definition value="The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of)." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <min value="1" />
            <max value="1" />
            <base>
                <path value="OrganizationAffiliation.participatingOrganization" />
                <min value="0" />
                <max value="1" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".player" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.network">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.network" />
            <short value="Health insurance provider network in which the participatingOrganization provides the role&#39;s services (if defined) at the indicated locations (if defined)" />
            <definition value="Health insurance provider network in which the participatingOrganization provides the role&#39;s services (if defined) at the indicated locations (if defined)." />
            <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
            <min value="0" />
            <max value="0" />
            <base>
                <path value="OrganizationAffiliation.network" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.code">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.code" />
            <short value="The type of affiliation" />
            <definition value="Definition of the role the participatingOrganization plays in the association." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement. Elements with a modified minimum cardinality of 1 will have a mustSupport element to ensure that it is populated." />
            <min value="1" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.code" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="CodeableConcept" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="OrganizationAffiliation" />
                </extension>
                <strength value="example" />
                <description value="The role the participating organization providing services to the primary organization." />
                <valueSet value="http://hl7.org/fhir/ValueSet/organization-role" />
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CE/CNE/CWE" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="CD" />
            </mapping>
            <mapping>
                <identity value="orim" />
                <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".code" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.specialty">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.specialty" />
            <short value="Specific specialty of the participatingOrganization in the context of the role" />
            <definition value="Specific specialty of the participatingOrganization in the context of the role." />
            <comment value="Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.specialty" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="CodeableConcept" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <isSummary value="true" />
            <binding>
                <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
                    <valueString value="OrganizationSpecialty" />
                </extension>
                <strength value="preferred" />
                <description value="Specific specialty associated with the participating organization." />
                <valueSet value="http://hl7.org/fhir/ValueSet/c80-practice-codes" />
            </binding>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="CE/CNE/CWE" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="CD" />
            </mapping>
            <mapping>
                <identity value="orim" />
                <map value="fhir:CodeableConcept rdfs:subClassOf dt:CD" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".player.HealthCareProvider[@classCode = &#39;PROV&#39;].code" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.location">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.location" />
            <short value="The location(s) at which the role occurs" />
            <definition value="The location(s) at which the role occurs." />
            <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.location" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Location" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="w5" />
                <map value="FiveWs.where[x]" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".performance.ActDefinitionOrEvent.ServiceDeliveryLocation[@classCode = &#39;SDLOC&#39;]" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.healthcareService">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.healthcareService" />
            <short value="Healthcare services provided through the role" />
            <definition value="Healthcare services provided through the role." />
            <comment value="References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.healthcareService" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-HealthcareService" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".player.QualifiedEntity[@classCode = &#39;QUAL&#39;].code" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.telecom">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.telecom" />
            <short value="Contact details at the participatingOrganization relevant to this Affiliation" />
            <definition value="Contact details at the participatingOrganization relevant to this Affiliation." />
            <comment value="mustSupport element identified within the IHE mCSD endpoint profile." />
            <requirements value="Sometimes a participating organization provides dedicated contacts to handle enquiries specifically for the role provided to the affiliated organization." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.telecom" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="ContactPoint" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="cpt-2" />
                <severity value="error" />
                <human value="A system is required if a value is provided." />
                <expression value="value.empty() or system.exists()" />
                <xpath value="not(exists(f:value)) or exists(f:system)" />
                <source value="http://hl7.org/fhir/StructureDefinition/ContactPoint" />
            </constraint>
            <mustSupport value="true" />
            <isSummary value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="v2" />
                <map value="XTN" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="TEL" />
            </mapping>
            <mapping>
                <identity value="servd" />
                <map value="ContactPoint" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value=".telecom" />
            </mapping>
        </element>
        <element id="OrganizationAffiliation.endpoint">
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
                <valueCode value="normative" />
            </extension>
            <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
                <valueCode value="4.0.0" />
            </extension>
            <path value="OrganizationAffiliation.endpoint" />
            <short value="Technical endpoints providing access to services operated for this role" />
            <definition value="Technical endpoints providing access to services operated for this role." />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <min value="0" />
            <max value="*" />
            <base>
                <path value="OrganizationAffiliation.endpoint" />
                <min value="0" />
                <max value="*" />
            </base>
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Endpoint" />
            </type>
            <condition value="ele-1" />
            <constraint>
                <key value="ele-1" />
                <severity value="error" />
                <human value="All FHIR elements must have a @value or children" />
                <expression value="hasValue() or (children().count() &gt; id.count())" />
                <xpath value="@value|f:*|h:div" />
                <source value="http://hl7.org/fhir/StructureDefinition/Element" />
            </constraint>
            <constraint>
                <key value="ref-1" />
                <severity value="error" />
                <human value="SHALL have a contained resource if a local reference is provided" />
                <expression value="reference.startsWith(&#39;#&#39;).not() or (reference.substring(1).trace(&#39;url&#39;) in %rootResource.contained.id.trace(&#39;ids&#39;))" />
                <xpath value="not(starts-with(f:reference/@value, &#39;#&#39;)) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, &#39;#&#39;)])" />
                <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
            </constraint>
            <mustSupport value="true" />
            <mapping>
                <identity value="rim" />
                <map value="n/a" />
            </mapping>
            <mapping>
                <identity value="rim" />
                <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
            </mapping>
        </element>
    </snapshot>
    <differential>
        <element id="OrganizationAffiliation.identifier">
            <path value="OrganizationAffiliation.identifier" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.active">
            <path value="OrganizationAffiliation.active" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.period">
            <path value="OrganizationAffiliation.period" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.organization">
            <path value="OrganizationAffiliation.organization" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization" />
            </type>
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.participatingOrganization">
            <path value="OrganizationAffiliation.participatingOrganization" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization" />
            </type>
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.code">
            <path value="OrganizationAffiliation.code" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement. Elements with a modified minimum cardinality of 1 will have a mustSupport element to ensure that it is populated." />
            <mustSupport value="true" />
        </element>
        <element id="OrganizationAffiliation.location">
            <path value="OrganizationAffiliation.location" />
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Location" />
            </type>
        </element>
        <element id="OrganizationAffiliation.healthcareService">
            <path value="OrganizationAffiliation.healthcareService" />
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-HealthcareService" />
            </type>
        </element>
        <element id="OrganizationAffiliation.telecom">
            <path value="OrganizationAffiliation.telecom" />
            <comment value="mustSupport element identified within the IHE mCSD endpoint profile." />
        </element>
        <element id="OrganizationAffiliation.endpoint">
            <path value="OrganizationAffiliation.endpoint" />
            <comment value="Identified as a query requirement through mCSD CapabilityStatement." />
            <type>
                <code value="Reference" />
                <targetProfile value="http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Endpoint" />
            </type>
            <mustSupport value="true" />
        </element>
    </differential>
</StructureDefinition>
{
    "resourceType": "StructureDefinition",
    "id": "CA-CSD-OrganizationAffiliation",
    "extension":  [
        {
            "extension":  [
                {
                    "url": "code",
                    "valueCode": "SHALL:able-to-populate"
                },
                {
                    "url": "code",
                    "valueCode": "SHOULD:populate"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.identifier"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.active"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.period"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.organization"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.participatingOrganization"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.code"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.endpoint"
                },
                {
                    "url": "actor",
                    "valueCanonical": "http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/server"
                }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/obligation"
        },
        {
            "extension":  [
                {
                    "url": "code",
                    "valueCode": "ihe-r2"
                },
                {
                    "url": "code",
                    "valueCode": "SHOULD:populate"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.telecom"
                },
                {
                    "url": "actor",
                    "valueCanonical": "http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/server"
                },
                {
                    "url": "documentation",
                    "valueMarkdown": "SHALL:ihe-r2 is expected, even though the modifier in the ValueSet has yet to be applied."
                }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/obligation"
        },
        {
            "extension":  [
                {
                    "url": "code",
                    "valueCode": "SHALL:no-error"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.identifier"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.active"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.period"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.organization"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.participatingOrganization"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.code"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.telecom"
                },
                {
                    "url": "elementId",
                    "valueString": "OrganizationAffiliation.endpoint"
                },
                {
                    "url": "actor",
                    "valueCanonical": "http://fhir.infoway-inforoute.ca/io/CA-CSD/ActorDefinition/client"
                }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/obligation"
        }
    ],
    "url": "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-OrganizationAffiliation",
    "name": "OrganizationAffiliation",
    "status": "draft",
    "description": "An OrganizationAffiliation is used to identify a relationship between organizations that are not hierarchical in nature.  Examples of such relationships are supply chains or administrative reporting. An OrganizationAffiliation resource can also be used to indicate a routing path to other organizations that cannot be reached directly.",
    "copyright": "Copyright © 2024+ Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy).",
    "fhirVersion": "4.0.1",
    "kind": "resource",
    "abstract": false,
    "type": "OrganizationAffiliation",
    "baseDefinition": "https://profiles.ihe.net/ITI/mCSD/StructureDefinition/IHE.mCSD.OrganizationAffiliation",
    "derivation": "constraint",
    "snapshot": {
        "element":  [
            {
                "id": "OrganizationAffiliation",
                "path": "OrganizationAffiliation",
                "short": "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship",
                "definition": "Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation",
                    "min": 0,
                    "max": "*"
                },
                "constraint":  [
                    {
                        "key": "dom-2",
                        "severity": "error",
                        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
                        "expression": "contained.contained.empty()",
                        "xpath": "not(parent::f:contained and f:contained)",
                        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
                    },
                    {
                        "key": "dom-4",
                        "severity": "error",
                        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
                        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
                        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
                        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
                    },
                    {
                        "key": "dom-3",
                        "severity": "error",
                        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
                        "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()",
                        "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
                        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
                    },
                    {
                        "extension":  [
                            {
                                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
                                "valueBoolean": true
                            },
                            {
                                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
                                "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
                            }
                        ],
                        "key": "dom-6",
                        "severity": "warning",
                        "human": "A resource should have narrative for robust management",
                        "expression": "text.`div`.exists()",
                        "xpath": "exists(f:text/h:div)",
                        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
                    },
                    {
                        "key": "dom-5",
                        "severity": "error",
                        "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
                        "expression": "contained.meta.security.empty()",
                        "xpath": "not(exists(f:contained/*/f:meta/f:security))",
                        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "Entity. Role, or Act"
                    },
                    {
                        "identity": "rim",
                        "map": "Role"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.id",
                "path": "OrganizationAffiliation.id",
                "short": "Logical id of this artifact",
                "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
                "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.id",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "extension":  [
                            {
                                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                                "valueUrl": "string"
                            }
                        ],
                        "code": "http://hl7.org/fhirpath/System.String"
                    }
                ],
                "isSummary": true
            },
            {
                "id": "OrganizationAffiliation.meta",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.meta",
                "short": "Metadata about the resource",
                "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.meta",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Meta"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.implicitRules",
                "path": "OrganizationAffiliation.implicitRules",
                "short": "A set of rules under which this content was created",
                "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
                "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "Resource.implicitRules",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "uri"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "isModifier": true,
                "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.language",
                "path": "OrganizationAffiliation.language",
                "short": "Language of the resource content",
                "definition": "The base language in which the resource is written.",
                "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "Resource.language",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "code"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
                            "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "Language"
                        },
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
                            "valueBoolean": true
                        }
                    ],
                    "strength": "preferred",
                    "description": "A human language.",
                    "valueSet": "http://hl7.org/fhir/ValueSet/languages"
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.text",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.text",
                "short": "Text summary of the resource, for human interpretation",
                "definition": "A human-readable narrative that contains a summary of the resource and can 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 \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
                "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
                "alias":  [
                    "narrative",
                    "html",
                    "xhtml",
                    "display"
                ],
                "min": 0,
                "max": "1",
                "base": {
                    "path": "DomainResource.text",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Narrative"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    },
                    {
                        "identity": "rim",
                        "map": "Act.text?"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.contained",
                "path": "OrganizationAffiliation.contained",
                "short": "Contained, inline Resources",
                "definition": "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.",
                "comment": "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. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
                "alias":  [
                    "inline resources",
                    "anonymous resources",
                    "contained resources"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "DomainResource.contained",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Resource"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "Entity. Role, or Act"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.extension",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.extension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Additional content defined by implementations",
                "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
                "comment": "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 level of simplicity for everyone.",
                "alias":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "*",
                "base": {
                    "path": "DomainResource.extension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Extension"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.modifierExtension",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.modifierExtension",
                "slicing": {
                    "discriminator":  [
                        {
                            "type": "value",
                            "path": "url"
                        }
                    ],
                    "description": "Extensions are always sliced by (at least) url",
                    "rules": "open"
                },
                "short": "Extensions that cannot be ignored",
                "definition": "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 and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
                "comment": "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 level of simplicity for everyone.",
                "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
                "alias":  [
                    "extensions",
                    "user content"
                ],
                "min": 0,
                "max": "0",
                "base": {
                    "path": "DomainResource.modifierExtension",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Extension"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ext-1",
                        "severity": "error",
                        "human": "Must have either extensions or value[x], not both",
                        "expression": "extension.exists() != value.exists()",
                        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Extension"
                    }
                ],
                "isModifier": true,
                "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "N/A"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.identifier",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.identifier",
                "short": "Business identifiers that are specific to this role",
                "definition": "Business identifiers that are specific to this role.",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "requirements": "Often, specific identities are assigned for the agent.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.identifier",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Identifier"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)"
                    },
                    {
                        "identity": "rim",
                        "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]"
                    },
                    {
                        "identity": "servd",
                        "map": "Identifier"
                    },
                    {
                        "identity": "w5",
                        "map": "FiveWs.identifier"
                    },
                    {
                        "identity": "rim",
                        "map": ".id"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.active",
                "path": "OrganizationAffiliation.active",
                "short": "Whether this organization affiliation record is in active use",
                "definition": "Whether this organization affiliation record is in active use.",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "requirements": "Need to be able to mark an organization affiliation record as not to be used because it was created in error, or otherwise no longer in active use.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "OrganizationAffiliation.active",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "boolean"
                    }
                ],
                "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element",
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "w5",
                        "map": "FiveWs.status"
                    },
                    {
                        "identity": "rim",
                        "map": ".statusCode"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.period",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.period",
                "short": "The period during which the participatingOrganization is affiliated with the primary organization",
                "definition": "The period during which the participatingOrganization is affiliated with the primary organization.",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "requirements": "An affiliation may be created ahead of time and only be active for a defined period of time. Once the affiliation is complete, the fact that it existed may still be required.",
                "min": 0,
                "max": "1",
                "base": {
                    "path": "OrganizationAffiliation.period",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Period"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "per-1",
                        "severity": "error",
                        "human": "If present, start SHALL have a lower value than end",
                        "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)",
                        "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))",
                        "source": "http://hl7.org/fhir/StructureDefinition/Period"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "DR"
                    },
                    {
                        "identity": "rim",
                        "map": "IVL<TS>[lowClosed=\"true\" and highClosed=\"true\"] or URG<TS>[lowClosed=\"true\" and highClosed=\"true\"]"
                    },
                    {
                        "identity": "w5",
                        "map": "FiveWs.done[x]"
                    },
                    {
                        "identity": "rim",
                        "map": ".performance[@typeCode <= 'PPRF'].ActDefinitionOrEvent.effectiveTime"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.organization",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.organization",
                "short": "Organization where the role is available.",
                "definition": "Organization where the role is available (primary organization/has members).",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "OrganizationAffiliation.organization",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "rim",
                        "map": ".scoper"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.participatingOrganization",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.participatingOrganization",
                "short": "The Organization providing the role.",
                "definition": "The Participating Organization provides/performs the role(s) defined by the code to the Primary Organization (e.g. providing services or is a member of).",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "min": 1,
                "max": "1",
                "base": {
                    "path": "OrganizationAffiliation.participatingOrganization",
                    "min": 0,
                    "max": "1"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "rim",
                        "map": ".player"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.network",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.network",
                "short": "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined)",
                "definition": "Health insurance provider network in which the participatingOrganization provides the role's services (if defined) at the indicated locations (if defined).",
                "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
                "min": 0,
                "max": "0",
                "base": {
                    "path": "OrganizationAffiliation.network",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://hl7.org/fhir/StructureDefinition/Organization"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.code",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.code",
                "short": "The type of affiliation",
                "definition": "Definition of the role the participatingOrganization plays in the association.",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement. Elements with a modified minimum cardinality of 1 will have a mustSupport element to ensure that it is populated.",
                "min": 1,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.code",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "OrganizationAffiliation"
                        }
                    ],
                    "strength": "example",
                    "description": "The role the participating organization providing services to the primary organization.",
                    "valueSet": "http://hl7.org/fhir/ValueSet/organization-role"
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "rim",
                        "map": ".code"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.specialty",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.specialty",
                "short": "Specific specialty of the participatingOrganization in the context of the role",
                "definition": "Specific specialty of the participatingOrganization in the context of the role.",
                "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.specialty",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "CodeableConcept"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    }
                ],
                "isSummary": true,
                "binding": {
                    "extension":  [
                        {
                            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
                            "valueString": "OrganizationSpecialty"
                        }
                    ],
                    "strength": "preferred",
                    "description": "Specific specialty associated with the participating organization.",
                    "valueSet": "http://hl7.org/fhir/ValueSet/c80-practice-codes"
                },
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "CE/CNE/CWE"
                    },
                    {
                        "identity": "rim",
                        "map": "CD"
                    },
                    {
                        "identity": "orim",
                        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD"
                    },
                    {
                        "identity": "rim",
                        "map": ".player.HealthCareProvider[@classCode = 'PROV'].code"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.location",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.location",
                "short": "The location(s) at which the role occurs",
                "definition": "The location(s) at which the role occurs.",
                "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.location",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Location"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "w5",
                        "map": "FiveWs.where[x]"
                    },
                    {
                        "identity": "rim",
                        "map": ".performance.ActDefinitionOrEvent.ServiceDeliveryLocation[@classCode = 'SDLOC']"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.healthcareService",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.healthcareService",
                "short": "Healthcare services provided through the role",
                "definition": "Healthcare services provided through the role.",
                "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.healthcareService",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-HealthcareService"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    },
                    {
                        "identity": "rim",
                        "map": ".player.QualifiedEntity[@classCode = 'QUAL'].code"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.telecom",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.telecom",
                "short": "Contact details at the participatingOrganization relevant to this Affiliation",
                "definition": "Contact details at the participatingOrganization relevant to this Affiliation.",
                "comment": "mustSupport element identified within the IHE mCSD endpoint profile.",
                "requirements": "Sometimes a participating organization provides dedicated contacts to handle enquiries specifically for the role provided to the affiliated organization.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.telecom",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "ContactPoint"
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "cpt-2",
                        "severity": "error",
                        "human": "A system is required if a value is provided.",
                        "expression": "value.empty() or system.exists()",
                        "xpath": "not(exists(f:value)) or exists(f:system)",
                        "source": "http://hl7.org/fhir/StructureDefinition/ContactPoint"
                    }
                ],
                "mustSupport": true,
                "isSummary": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "v2",
                        "map": "XTN"
                    },
                    {
                        "identity": "rim",
                        "map": "TEL"
                    },
                    {
                        "identity": "servd",
                        "map": "ContactPoint"
                    },
                    {
                        "identity": "rim",
                        "map": ".telecom"
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.endpoint",
                "extension":  [
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
                        "valueCode": "normative"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
                        "valueCode": "4.0.0"
                    }
                ],
                "path": "OrganizationAffiliation.endpoint",
                "short": "Technical endpoints providing access to services operated for this role",
                "definition": "Technical endpoints providing access to services operated for this role.",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "min": 0,
                "max": "*",
                "base": {
                    "path": "OrganizationAffiliation.endpoint",
                    "min": 0,
                    "max": "*"
                },
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Endpoint"
                        ]
                    }
                ],
                "condition":  [
                    "ele-1"
                ],
                "constraint":  [
                    {
                        "key": "ele-1",
                        "severity": "error",
                        "human": "All FHIR elements must have a @value or children",
                        "expression": "hasValue() or (children().count() > id.count())",
                        "xpath": "@value|f:*|h:div",
                        "source": "http://hl7.org/fhir/StructureDefinition/Element"
                    },
                    {
                        "key": "ref-1",
                        "severity": "error",
                        "human": "SHALL have a contained resource if a local reference is provided",
                        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))",
                        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
                        "source": "http://hl7.org/fhir/StructureDefinition/Reference"
                    }
                ],
                "mustSupport": true,
                "mapping":  [
                    {
                        "identity": "rim",
                        "map": "n/a"
                    },
                    {
                        "identity": "rim",
                        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
                    }
                ]
            }
        ]
    },
    "differential": {
        "element":  [
            {
                "id": "OrganizationAffiliation.identifier",
                "path": "OrganizationAffiliation.identifier",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.active",
                "path": "OrganizationAffiliation.active",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.period",
                "path": "OrganizationAffiliation.period",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.organization",
                "path": "OrganizationAffiliation.organization",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.participatingOrganization",
                "path": "OrganizationAffiliation.participatingOrganization",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Organization"
                        ]
                    }
                ],
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.code",
                "path": "OrganizationAffiliation.code",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement. Elements with a modified minimum cardinality of 1 will have a mustSupport element to ensure that it is populated.",
                "mustSupport": true
            },
            {
                "id": "OrganizationAffiliation.location",
                "path": "OrganizationAffiliation.location",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Location"
                        ]
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.healthcareService",
                "path": "OrganizationAffiliation.healthcareService",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-HealthcareService"
                        ]
                    }
                ]
            },
            {
                "id": "OrganizationAffiliation.telecom",
                "path": "OrganizationAffiliation.telecom",
                "comment": "mustSupport element identified within the IHE mCSD endpoint profile."
            },
            {
                "id": "OrganizationAffiliation.endpoint",
                "path": "OrganizationAffiliation.endpoint",
                "comment": "Identified as a query requirement through mCSD CapabilityStatement.",
                "type":  [
                    {
                        "code": "Reference",
                        "targetProfile":  [
                            "http://fhir.infoway-inforoute.ca/io/CA-CSD/StructureDefinition/CA-CSD-Endpoint"
                        ]
                    }
                ],
                "mustSupport": true
            }
        ]
    }
}

Terminology bindings

PathConformanceValueSet
OrganizationAffiliation.languagepreferredhttp://hl7.org/fhir/ValueSet/languages
OrganizationAffiliation.codeexamplehttp://hl7.org/fhir/ValueSet/organization-role
OrganizationAffiliation.specialtypreferredhttp://hl7.org/fhir/ValueSet/c80-practice-codes

Constraints

PathIdGradeDetailsExpression
OrganizationAffiliation; OrganizationAffiliation; OrganizationAffiliation; OrganizationAffiliation; OrganizationAffiliation; OrganizationAffiliation.meta; OrganizationAffiliation.implicitRules; OrganizationAffiliation.language; OrganizationAffiliation.text; OrganizationAffiliation.extension; OrganizationAffiliation.extension; OrganizationAffiliation.modifierExtension; OrganizationAffiliation.modifierExtension; OrganizationAffiliation.identifier; OrganizationAffiliation.active; OrganizationAffiliation.period; OrganizationAffiliation.period; OrganizationAffiliation.organization; OrganizationAffiliation.organization; OrganizationAffiliation.participatingOrganization; OrganizationAffiliation.participatingOrganization; OrganizationAffiliation.network; OrganizationAffiliation.network; OrganizationAffiliation.code; OrganizationAffiliation.specialty; OrganizationAffiliation.location; OrganizationAffiliation.location; OrganizationAffiliation.healthcareService; OrganizationAffiliation.healthcareService; OrganizationAffiliation.telecom; OrganizationAffiliation.telecom; OrganizationAffiliation.endpoint; OrganizationAffiliation.endpointdom-2; dom-4; dom-3; dom-6; dom-5; ele-1; ele-1; ele-1; ele-1; ele-1; ext-1; ele-1; ext-1; ele-1; ele-1; ele-1; per-1; ele-1; ref-1; ele-1; ref-1; ele-1; ref-1; ele-1; ele-1; ele-1; ref-1; ele-1; ref-1; ele-1; cpt-2; ele-1; ref-1error; error; error; warning; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; error; errorIf the resource is contained in another resource, it SHALL NOT contain nested Resources; If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated; If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource; A resource should have narrative for robust management; If a resource is contained in another resource, it SHALL NOT have a security label; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; Must have either extensions or value[x], not both; All FHIR elements must have a @value or children; Must have either extensions or value[x], not both; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; If present, start SHALL have a lower value than end; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is provided; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is provided; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is provided; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is provided; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is provided; All FHIR elements must have a @value or children; A system is required if a value is provided.; All FHIR elements must have a @value or children; SHALL have a contained resource if a local reference is providedcontained.contained.empty(); contained.meta.versionId.empty() and contained.meta.lastUpdated.empty(); contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty(); text.`div`.exists(); contained.meta.security.empty(); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); extension.exists() != value.exists(); hasValue() or (children().count() > id.count()); extension.exists() != value.exists(); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); start.hasValue().not() or end.hasValue().not() or (start <= end); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')); hasValue() or (children().count() > id.count()); value.empty() or system.exists(); hasValue() or (children().count() > id.count()); reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))

Obligations

Obligations Actor Elements
SHALL:able-to-populate & SHOULD:populate Server Actor CA-CSD identifier, active, period, organization, participatingOrganization, code, endpoint
ihe-r2 & SHOULD:populate Client Actor CA-CSD telecom
SHALL:no-error Client Actor CA-CSD identifier, ​active, period, organization, participatingOrganization, code, telecom, endpoint