<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="8bddd65b-b4c7-4e69-bf4a-e9e31e932f2d" />
  <url value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/RequestorLocation" />
  <version value="1.0.0" />
  <name value="RequestorLocation" />
  <title value="RequestorLocation" />
  <status value="active" />
  <description value="A practice location of the Requestor." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Location" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Location" />
  <derivation value="constraint" />
  <differential>
    <element id="Location">
      <path value="Location" />
      <definition value="#### **_`FOR SADIE USE:  A practice location of the Requestor.`_**&#xA;&#xA;Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated." />
    </element>
    <element id="Location.identifier">
      <path value="Location.identifier" />
      <definition value="#### **_`FOR SADIE USE:  A business identifier for the location.  This will be the identifier from the EAP or CPDB or a Dummy identifier.`_**&#xA;&#xA;Unique code or number identifying the location to its users." />
    </element>
    <element id="Location.identifier.use">
      <path value="Location.identifier.use" />
      <max value="0" />
    </element>
    <element id="Location.identifier.type">
      <path value="Location.identifier.type" />
      <max value="0" />
    </element>
    <element id="Location.identifier.type.coding">
      <path value="Location.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Location.identifier.type.coding.system">
      <path value="Location.identifier.type.coding.system" />
      <min value="1" />
    </element>
    <element id="Location.identifier.type.coding.code">
      <path value="Location.identifier.type.coding.code" />
      <definition value="#### **_`FOR SADIE USE:  This the code identifying the external system.  CPDB, EAP or GOSECURE`_**&#xA;&#xA;A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-ExternalSystems" />
      </binding>
    </element>
    <element id="Location.identifier.type.coding.display">
      <path value="Location.identifier.type.coding.display" />
      <max value="0" />
    </element>
    <element id="Location.identifier.type.coding.userSelected">
      <path value="Location.identifier.type.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Location.identifier.type.text">
      <path value="Location.identifier.type.text" />
      <max value="0" />
    </element>
    <element id="Location.identifier.system">
      <path value="Location.identifier.system" />
      <definition value="#### **_`FOR SADIE USE:  The system element will have the following format: urn:sadie:FHIR resource:Source System:Name in the source system.  For this it's either urn:sadie:location:dummy, urn:sadie:location:eap or urn:sadie:location:cpdb`_**&#xA;&#xA;Establishes the namespace for the value - that is, a URL that describes a set values that are unique." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-IdentifierSystems" />
      </binding>
    </element>
    <element id="Location.identifier.value">
      <path value="Location.identifier.value" />
      <definition value="#### **_`FOR SADIE USE:  The id from the external system.`_**&#xA;&#xA;The portion of the identifier typically relevant to the user and which is unique within the context of the system." />
      <min value="1" />
    </element>
    <element id="Location.identifier.period">
      <path value="Location.identifier.period" />
      <max value="0" />
    </element>
    <element id="Location.identifier.assigner">
      <path value="Location.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="Location.operationalStatus">
      <path value="Location.operationalStatus" />
      <definition value="#### **_`FOR SADIE USE:   MVP: This is no longer used.   MMVP:  This is the status of the location.  This is used in alot of the logic regarding location`_**&#xA; &#xA;The operational status covers operation values most relevant to beds (but can also apply to rooms/units/chairs/etc. such as an isolation unit/dialysis chair). This typically covers concepts such as contamination, housekeeping, and other activities like maintenance." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <description value="SADIE location statuses" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-LocationStatuses" />
      </binding>
    </element>
    <element id="Location.name">
      <path value="Location.name" />
      <definition value="#### **_`FOR SADIE USE:  This is the name of the location`_**&#xA;&#xA;Name of the location as used by humans. Does not need to be unique." />
      <min value="1" />
    </element>
    <element id="Location.alias">
      <path value="Location.alias" />
      <max value="0" />
    </element>
    <element id="Location.description">
      <path value="Location.description" />
      <max value="0" />
    </element>
    <element id="Location.mode">
      <path value="Location.mode" />
      <max value="0" />
    </element>
    <element id="Location.type">
      <path value="Location.type" />
      <definition value="#### **_`FOR SADIE USE:  This is the type of Location. Primary or Secondary.`_**" />
      <max value="1" />
    </element>
    <element id="Location.type.coding">
      <path value="Location.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Location.type.coding.system">
      <path value="Location.type.coding.system" />
      <definition value="#### **_`FOR SADIE USE:  The system should always be the internal CodeSystem  https://health.gov.on.ca/sadie/fhir/CodeSystem/FlexForms-Internal-Complete.`_**&#xA;&#xA;Establishes the namespace for the value - that is, a URL that describes a set values that are unique." />
      <min value="1" />
      <fixedString value="https://health.gov.on.ca/sadie/fhir/CodeSystem/FlexForms-Internal-Complete" />
    </element>
    <element id="Location.type.coding.version">
      <path value="Location.type.coding.version" />
      <max value="0" />
    </element>
    <element id="Location.type.coding.code">
      <path value="Location.type.coding.code" />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-LocationTypes" />
      </binding>
    </element>
    <element id="Location.type.coding.display">
      <path value="Location.type.coding.display" />
      <max value="0" />
    </element>
    <element id="Location.type.coding.userSelected">
      <path value="Location.type.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="Location.type.text">
      <path value="Location.type.text" />
      <max value="0" />
    </element>
    <element id="Location.telecom">
      <path value="Location.telecom" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <definition value="#### **_`FOR SADIE USE:  The phone number, fax number and email.`_**&#xA;&#xA;The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." />
    </element>
    <element id="Location.telecom:PhoneNumber">
      <path value="Location.telecom" />
      <sliceName value="PhoneNumber" />
      <max value="2" />
    </element>
    <element id="Location.telecom.extension:PhoneNumber.contactDescription">
      <path value="Location.telecom.contactDescription" />
      <sliceName value="contactDescription" />
      <definition value="#### **_`FOR SADIE USE:  This is a descriptive name given to this phone number.`_**" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ContactPoint-Description-Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
    </element>
    <element id="Location.telecom:PhoneNumber.system">
      <path value="Location.telecom.system" />
      <min value="1" />
      <fixedCode value="phone" />
    </element>
    <element id="Location.telecom:PhoneNumber.value">
      <path value="Location.telecom.value" />
      <definition value="#### **_`FOR SADIE USE:  This is the phone number.  If there is an extension there will be an 'x' between the phone number and the extension.  The 'x' character is used when the phone number is synced to the EAP database.`_**&#xA;&#xA;The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." />
      <min value="1" />
    </element>
    <element id="Location.telecom:PhoneNumber.use">
      <path value="Location.telecom.use" />
      <max value="0" />
    </element>
    <element id="Location.telecom:PhoneNumber.rank">
      <path value="Location.telecom.rank" />
      <definition value="#### **_`FOR SADIE USE:  A value = 1 is the primary.  All other values are considered secondary.`_**&#xA;&#xA;Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values." />
      <min value="1" />
    </element>
    <element id="Location.telecom:PhoneNumber.period">
      <path value="Location.telecom.period" />
      <max value="0" />
    </element>
    <element id="Location.telecom:FaxNumber">
      <path value="Location.telecom" />
      <sliceName value="FaxNumber" />
      <max value="2" />
    </element>
    <element id="Location.telecom.extension:FaxNumber.contactDescription">
      <path value="Location.telecom.contactDescription" />
      <sliceName value="contactDescription" />
      <definition value="#### **_`FOR SADIE USE:  This is a descriptive name given to this fax number.`_**" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ContactPoint-Description-Extension" />
      </type>
      <mustSupport value="false" />
      <isModifier value="false" />
    </element>
    <element id="Location.telecom:FaxNumber.system">
      <path value="Location.telecom.system" />
      <min value="1" />
      <fixedCode value="fax" />
    </element>
    <element id="Location.telecom:FaxNumber.value">
      <path value="Location.telecom.value" />
      <definition value="#### **_`FOR SADIE USE:  This is the fax number`_**&#xA;&#xA;The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." />
      <min value="1" />
    </element>
    <element id="Location.telecom:FaxNumber.use">
      <path value="Location.telecom.use" />
      <max value="0" />
    </element>
    <element id="Location.telecom:FaxNumber.rank">
      <path value="Location.telecom.rank" />
      <definition value="#### **_`FOR SADIE USE:  A value = 1 is the primary. All other values are considered secondary.`_**&#xA;&#xA;Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values." />
      <min value="1" />
    </element>
    <element id="Location.telecom:FaxNumber.period">
      <path value="Location.telecom.period" />
      <max value="0" />
    </element>
    <element id="Location.telecom:EmailAddress">
      <path value="Location.telecom" />
      <sliceName value="EmailAddress" />
      <max value="1" />
    </element>
    <element id="Location.telecom:EmailAddress.system">
      <path value="Location.telecom.system" />
      <min value="1" />
      <fixedCode value="email" />
    </element>
    <element id="Location.telecom:EmailAddress.value">
      <path value="Location.telecom.value" />
      <definition value="#### **_`FOR SADIE USE:  This is the email address`_**&#xA;&#xA;The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." />
      <min value="1" />
    </element>
    <element id="Location.telecom:EmailAddress.use">
      <path value="Location.telecom.use" />
      <max value="0" />
      <fixedCode value="EMAIL" />
    </element>
    <element id="Location.telecom:EmailAddress.rank">
      <path value="Location.telecom.rank" />
      <definition value="#### **_`FOR SADIE USE:  A value = 1 is the primary. All other values are considered secondary.`_**&#xA;&#xA;&#xA;Specifies a preferred order in which to use a set of contacts. ContactPoints with lower rank values are more preferred than those with higher rank values." />
      <min value="1" />
    </element>
    <element id="Location.telecom:EmailAddress.period">
      <path value="Location.telecom.period" />
      <max value="0" />
    </element>
    <element id="Location.address">
      <path value="Location.address" />
      <definition value="#### **_`FOR SADIE USE:  This is the Pratitioner's address.`_**" />
    </element>
    <element id="Location.address.use">
      <path value="Location.address.use" />
      <max value="0" />
    </element>
    <element id="Location.address.type">
      <path value="Location.address.type" />
      <max value="0" />
    </element>
    <element id="Location.address.text">
      <path value="Location.address.text" />
      <definition value="#### **_`FOR SADIE USE:  This is used to store a free text field on the UI where the user can record updates they want to the location.  It also stores new locations that are inputed using the UI.`_**&#xA;&#xA;Specifies the entire address as it should be displayed e.g. on a postal label. This may be provided instead of or as well as the specific parts." />
    </element>
    <element id="Location.address.line">
      <path value="Location.address.line" />
      <max value="1" />
    </element>
    <element id="Location.address.district">
      <path value="Location.address.district" />
      <max value="0" />
    </element>
    <element id="Location.address.postalCode">
      <path value="Location.address.postalCode" />
      <maxLength value="6" />
    </element>
    <element id="Location.address.country">
      <path value="Location.address.country" />
      <definition value="#### **_`FOR SADIE USE:  This is the country code from EAP. CA = Canada`_**" />
      <max value="1" />
    </element>
    <element id="Location.address.period">
      <path value="Location.address.period" />
      <max value="0" />
    </element>
    <element id="Location.physicalType">
      <path value="Location.physicalType" />
      <max value="0" />
    </element>
    <element id="Location.position">
      <path value="Location.position" />
      <max value="0" />
    </element>
    <element id="Location.managingOrganization">
      <path value="Location.managingOrganization" />
      <max value="0" />
    </element>
    <element id="Location.partOf">
      <path value="Location.partOf" />
      <max value="0" />
    </element>
    <element id="Location.hoursOfOperation">
      <path value="Location.hoursOfOperation" />
      <max value="0" />
    </element>
    <element id="Location.availabilityExceptions">
      <path value="Location.availabilityExceptions" />
      <max value="0" />
    </element>
    <element id="Location.endpoint">
      <path value="Location.endpoint" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>