<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Location" />
  <meta>
    <versionId value="4" />
    <lastUpdated value="2022-02-02T03:17:31.312+00:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Base.Entities" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="business" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="pa" />
  </extension>
  <url value="https://fhir.kemkes.go.id/r4/StructureDefinition/Location" />
  <version value="4.0.1" />
  <name value="Location" />
  <status value="draft" />
  <date value="2022-07-08T15:10:50.6856647+00:00" />
  <publisher value="Health Level Seven International (Patient Administration)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/pafm/index.cfm" />
    </telecom>
  </contact>
  <description value="Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated." />
  <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/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="Location">
      <path value="Location" />
      <short value="Details and position information for a physical place" />
      <definition value="Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated." />
      <mapping>
        <identity value="rim" />
        <map value=".Role[classCode=SDLC]" />
      </mapping>
    </element>
    <element id="Location.identifier">
      <path value="Location.identifier" />
      <short value="Unique code or number identifying the location to its users" />
      <definition value="Unique code or number identifying the location to its users." />
      <requirements value="Organization label locations in registries, need to keep track of those." />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
    </element>
    <element id="Location.status">
      <path value="Location.status" />
      <short value="active | suspended | inactive" />
      <definition value="The status property covers the general availability of the resource, not the current value which may be covered by the operationStatus, or by a schedule/slots if they are configured for the location." />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="LocationStatus" />
        </extension>
        <strength value="required" />
        <description value="Indicates whether the location is still in use." />
        <valueSet value="http://hl7.org/fhir/ValueSet/location-status|4.0.1" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
    </element>
    <element id="Location.operationalStatus">
      <path value="Location.operationalStatus" />
      <short value="The operational status of the location (typically only for a bed/room)" />
      <definition value="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." />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="OperationalStatus" />
        </extension>
        <strength value="preferred" />
        <description value="The operational status if the location (where typically a bed/room)." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v2-0116" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
    </element>
    <element id="Location.name">
      <path value="Location.name" />
      <short value="Name of the location as used by humans" />
      <definition value="Name of the location as used by humans. Does not need to be unique." />
      <comment value="If the name of a location changes, consider putting the old name in the alias column so that it can still be located through searches." />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".name" />
      </mapping>
    </element>
    <element id="Location.alias">
      <path value="Location.alias" />
      <short value="A list of alternate names that the location is known as, or was known as, in the past" />
      <definition value="A list of alternate names that the location is known as, or was known as, in the past." />
      <comment value="There are no dates associated with the alias/historic names, as this is not intended to track when names were used, but to assist in searching so that older names can still result in identifying the location." />
      <requirements value="Over time locations and organizations go through many changes and can be known by different names.&#xA;&#xA;For searching knowing previous names that the location was known by can be very useful." />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".name" />
      </mapping>
    </element>
    <element id="Location.description">
      <path value="Location.description" />
      <short value="Additional details about the location that could be displayed as further information to identify the location beyond its name" />
      <definition value="Description of the Location, which helps in finding or referencing the place." />
      <requirements value="Humans need additional information to verify a correct location has been identified." />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".playingEntity[classCode=PLC determinerCode=INSTANCE].desc" />
      </mapping>
    </element>
    <element id="Location.mode">
      <path value="Location.mode" />
      <short value="instance | kind" />
      <definition value="Indicates whether a resource instance represents a specific location or a class of locations." />
      <comment value="This is labeled as a modifier because whether or not the location is a class of locations changes how it can be used and understood." />
      <requirements value="When using a Location resource for scheduling or orders, we need to be able to refer to a class of Locations instead of a specific Location." />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="LocationMode" />
        </extension>
        <strength value="required" />
        <description value="Indicates whether a resource instance represents a specific location or a class of locations." />
        <valueSet value="http://hl7.org/fhir/ValueSet/location-mode|4.0.1" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".playingEntity[classCode=PLC].determinerCode" />
      </mapping>
    </element>
    <element id="Location.type">
      <path value="Location.type" />
      <short value="Type of function performed" />
      <definition value="Indicates the type of function performed at the location." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="LocationType" />
        </extension>
        <strength value="extensible" />
        <description value="Indicates the type of function performed at the location." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-ServiceDeliveryLocationRoleType" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".code" />
      </mapping>
    </element>
    <element id="Location.telecom">
      <path value="Location.telecom" />
      <short value="Contact details of the location" />
      <definition value="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." />
      <type>
        <code value="ContactPoint" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".telecom" />
      </mapping>
    </element>
    <element id="Location.address">
      <path value="Location.address" />
      <short value="Physical location" />
      <definition value="Physical location." />
      <comment value="Additional addresses should be recorded using another instance of the Location resource, or via the Organization." />
      <requirements value="If locations can be visited, we need to keep track of their address." />
      <max value="1" />
      <type>
        <code value="Address" />
        <profile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Address" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".addr" />
      </mapping>
    </element>
    <element id="Location.physicalType">
      <path value="Location.physicalType" />
      <short value="Physical form of the location" />
      <definition value="Physical form of the location, e.g. building, room, vehicle, road." />
      <requirements value="For purposes of showing relevant locations in queries, we need to categorize locations." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="PhysicalType" />
        </extension>
        <strength value="example" />
        <description value="Physical form of the location." />
        <valueSet value="http://hl7.org/fhir/ValueSet/location-physical-type" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".playingEntity [classCode=PLC].code" />
      </mapping>
    </element>
    <element id="Location.position">
      <path value="Location.position" />
      <short value="The absolute geographic location" />
      <definition value="The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML)." />
      <requirements value="For mobile applications and automated route-finding knowing the exact location of the Location is required." />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".playingEntity [classCode=PLC determinerCode=INSTANCE].positionText" />
      </mapping>
    </element>
    <element id="Location.position.longitude">
      <path value="Location.position.longitude" />
      <short value="Longitude with WGS84 datum" />
      <definition value="Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)" />
      </mapping>
    </element>
    <element id="Location.position.latitude">
      <path value="Location.position.latitude" />
      <short value="Latitude with WGS84 datum" />
      <definition value="Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)" />
      </mapping>
    </element>
    <element id="Location.position.altitude">
      <path value="Location.position.altitude" />
      <short value="Altitude with WGS84 datum" />
      <definition value="Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)." />
      <max value="1" />
      <type>
        <code value="decimal" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="(RIM Opted not to map the sub-elements of GPS location, is now an OBS)" />
      </mapping>
    </element>
    <element id="Location.managingOrganization">
      <path value="Location.managingOrganization" />
      <short value="Organization responsible for provisioning and upkeep" />
      <definition value="The organization responsible for the provisioning and upkeep of the location." />
      <comment value="This can also be used as the part of the organization hierarchy where this location provides services. These services can be defined through the HealthcareService resource." />
      <requirements value="Need to know who manages the location." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".scopingEntity[classCode=ORG determinerKind=INSTANCE]" />
      </mapping>
    </element>
    <element id="Location.partOf">
      <path value="Location.partOf" />
      <short value="Another Location this one is physically a part of" />
      <definition value="Another Location of which this Location is physically a part of." />
      <requirements value="For purposes of location, display and identification, knowing which locations are located within other locations is important." />
      <max value="1" />
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy">
          <valueBoolean value="true" />
        </extension>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".inboundLink[typeCode=PART].source[classCode=SDLC]" />
      </mapping>
    </element>
    <element id="Location.hoursOfOperation">
      <path value="Location.hoursOfOperation" />
      <short value="What days/times during a week is this location usually open" />
      <definition value="What days/times during a week is this location usually open." />
      <comment value="This type of information is commonly found published in directories and on websites informing customers when the facility is available.&#xA;&#xA;Specific services within the location may have their own hours which could be shorter (or longer) than the locations hours." />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Location.hoursOfOperation.daysOfWeek">
      <path value="Location.hoursOfOperation.daysOfWeek" />
      <short value="mon | tue | wed | thu | fri | sat | sun" />
      <definition value="Indicates which days of the week are available between the start and end Times." />
      <type>
        <code value="code" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="DaysOfWeek" />
        </extension>
        <strength value="required" />
        <description value="The days of the week." />
        <valueSet value="http://hl7.org/fhir/ValueSet/days-of-week|4.0.1" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Location.hoursOfOperation.allDay">
      <path value="Location.hoursOfOperation.allDay" />
      <short value="The Location is open all day" />
      <definition value="The Location is open all day." />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Location.hoursOfOperation.openingTime">
      <path value="Location.hoursOfOperation.openingTime" />
      <short value="Time that the Location opens" />
      <definition value="Time that the Location opens." />
      <max value="1" />
      <type>
        <code value="time" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Location.hoursOfOperation.closingTime">
      <path value="Location.hoursOfOperation.closingTime" />
      <short value="Time that the Location closes" />
      <definition value="Time that the Location closes." />
      <max value="1" />
      <type>
        <code value="time" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="Location.availabilityExceptions">
      <path value="Location.availabilityExceptions" />
      <short value="Description of availability exceptions" />
      <definition value="A description of when the locations opening ours are different to normal, e.g. public holiday availability. Succinctly describing all possible exceptions to normal site availability as detailed in the opening hours Times." />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="Location.endpoint">
      <path value="Location.endpoint" />
      <short value="Technical endpoints providing access to services operated for the location" />
      <definition value="Technical endpoints providing access to services operated for the location." />
      <requirements value="Organizations may have different systems at different locations that provide various services and need to be able to define the technical connection details for how to connect to them, and for what purpose." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Endpoint" />
      </type>
    </element>
  </differential>
</StructureDefinition>