pca-location
type: StructureDefinition
node role: treeRoot
id:
  v: pca-location
text:
  status:
    v: extensions
  div: Name Flags Card. Type Description & Constraints<img src="[binary]" alt="doco" style="background-color: inherit"/> Location C 0..* AUBaseLocation A location at which services are offered by a publisher inv-pca-1: managingOrganization shall be a relative reference to an Organization inv-pca-2: If present, the type must include either 'MOBL' or 'VI' inv-pca-3: If type contains 'VI', no other type must be present inv-pca-4: If type contains 'MOBL', it must also include at least one of the following codes to further qualify where the mobile service is offered: 'PTRES', 'SCHOOL', 'WORK', 'COMM' or 'AMB' inv-pca-5: If type contains 'MOBL', then mode shall be 'kind' inv-pca-6: If type contains 'VI', then mode shall be 'kind' and physicalType shall be 'vi' inv-pca-7: Either type or address shall be present id S 0..1 id Logical id of this artifact meta S 0..1 Meta Metadata about the resource versionId S 0..1 id Version specific identifier lastUpdated S 0..1 instant When the resource version last changed pca-amenity S 0..* CodeableConcept Physical features within or in close proximity of the location URL: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-amenity Binding: PCA Amenity (required) pca-postal-address S 0..1 AustralianAddress Postal address URL: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-postal-address Slices for identifier S 1..* Identifier, AULocationSpecificPracticeNumber, AUNATASiteNumber Unique code or number identifying the location to its users Slice: Unordered, Open by value:system identifier:pca-li S 0..1 PcaLocationIdentifier PCA Location Identifier (PCA-LI) issued by the PCA service status SC 1..1 code active | inactive inv-pca-8: status shall be either 'active' or 'inactive' name S 1..1 string Name of the location as used by humans mode S 0..1 code instance | kind type S 0..* CodeableConcept Type of function performed Binding: PCA Service Delivery Location Role Type (required) telecom S 0..* ContactPoint Contact detai…
url:
  v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
version:
  v: 2.4.3
name:
  v: PcaLocation
title:
  v: PCA Location
status:
  v: active
date:
  v: 2024-03-19T15:12:36+10:00
publisher:
  v: Australian Digital Health Agency
contact:
  telecom:
    system:
      v: email
description:
  v: This profile of Location defines a PCA Location. A PCA Location is a location at which services are offered by a PCA publisher.
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: AU
copyright:
  v: Copyright © 2024 Australian Digital Health Agency - All rights reserved. This content is licensed under a Creative Commons Attribution 4.0 International License. See https://creativecommons.org/licenses/by/4.0/.
fhir version:
  v: 4.0.1
mapping:
  identity:
    v: rim
  uri:
    v: http://hl7.org/v3
  name:
    v: RIM Mapping
mapping:
  identity:
    v: w5
  uri:
    v: http://hl7.org/fhir/fivews
  name:
    v: FiveWs Pattern Mapping
kind:
  v: resource
abstract:
  v: false
type:
  v: Location
base definition:
  v: http://hl7.org.au/fhir/StructureDefinition/au-location
  link: http://hl7.org.au/fhir/StructureDefinition/au-location
derivation:
  v: constraint
snapshot:
  element:
    id:
      v: Location
    path:
      v: Location
    short:
      v: A location at which services are offered by a publisher
    definition:
      v: A location at which services are offered by a publisher.
    min:
      v: 0
    max:
      v: *
    base:
      path:
        v: Location
      min:
        v: 0
      max:
        v: *
    constraint:
      key:
        v: dom-2
      severity:
        v: error
      human:
        v: If the resource is contained in another resource, it SHALL NOT contain nested Resources
      expression:
        v: contained.contained.empty()
      xpath:
        v: not(parent::f:contained and f:contained)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-3
      severity:
        v: error
      human:
        v: 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:
        v: 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:
        v: 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:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-4
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated
      expression:
        v: contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-5
      severity:
        v: error
      human:
        v: If a resource is contained in another resource, it SHALL NOT have a security label
      expression:
        v: contained.meta.security.empty()
      xpath:
        v: not(exists(f:contained/*/f:meta/f:security))
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: dom-6
      severity:
        v: warning
      human:
        v: A resource should have narrative for robust management
      expression:
        v: text.`div`.exists()
      xpath:
        v: exists(f:text/h:div)
      source:
        v: http://hl7.org/fhir/StructureDefinition/DomainResource
        link: http://hl7.org/fhir/StructureDefinition/DomainResource
    constraint:
      key:
        v: inv-pca-1
      severity:
        v: error
      human:
        v: managingOrganization shall be a relative reference to an Organization
      expression:
        v: managingOrganization.reference.startsWith('Organization/')
    constraint:
      key:
        v: inv-pca-2
      severity:
        v: error
      human:
        v: If present, the type must include either 'MOBL' or 'VI'
      expression:
        v: type.exists() implies (type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() or type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists())
      source:
        v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
        link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    constraint:
      key:
        v: inv-pca-3
      severity:
        v: error
      human:
        v: If type contains 'VI', no other type must be present
      expression:
        v: type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists() implies (type.count() = 1)
      source:
        v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
        link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    constraint:
      key:
        v: inv-pca-4
      severity:
        v: error
      human:
        v: If type contains 'MOBL', it must also include at least one of the following codes to further qualify where the mobile service is offered: 'PTRES', 'SCHOOL', 'WORK', 'COMM' or 'AMB'
      expression:
        v: type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() implies (type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'PTRES').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'SCHOOL').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'WORK').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'COMM').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'AMB').exists())
      source:
        v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
        link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    constraint:
      key:
        v: inv-pca-5
      severity:
        v: error

v: true

v: 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.

v: If type contains 'MOBL', then mode shall be 'kind'

v: type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() implies mode.exists(value = 'kind')

key:
  v: inv-pca-6
severity:
  v: error
human:
  v: If type contains 'VI', then mode shall be 'kind' and physicalType shall be 'vi'
expression:
  v: type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists() implies mode.exists(value = 'kind') and physicalType.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-physical-type' and code = 'vi')
source:
  v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location

key:
  v: inv-pca-7
severity:
  v: error
human:
  v: Either type or address shall be present
expression:
  v: (type.exists() implies address.exists().not()) and (type.exists().not() implies address.exists())
source:
  v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location

v: false

v: false

identity:
  v: rim
map:
  v: Entity. Role, or Act

identity:
  v: rim
map:
  v: .Role[classCode=SDLC]

id:
  v: Location.id
path:
  v: Location.id
short:
  v: Logical id of this artifact
definition:
  v: The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.
comment:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value:
      v: id
  code:
    v: http://hl7.org/fhirpath/System.String
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta
path:
  v: Location.meta
short:
  v: Metadata about the resource
definition:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.meta
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Meta
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta.id
path:
  v: Location.meta.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.meta.extension
path:
  v: Location.meta.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  description:
    v: Extensions are always sliced by (at least) url
  rules:
    v: open
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. 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:
  v: 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:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.meta.versionId
path:
  v: Location.meta.versionId
short:
  v: Version specific identifier
definition:
  v: The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.
comment:
  v: The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.versionId
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: id
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta.lastUpdated
path:
  v: Location.meta.lastUpdated
short:
  v: When the resource version last changed
definition:
  v: When the resource last changed - e.g. when the version changed.
comment:
  v: This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http://hl7.org/fhir/R4/http.html#read) interaction.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.lastUpdated
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: instant
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta.source
path:
  v: Location.meta.source
short:
  v: Identifies where the resource comes from
definition:
  v: A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.
comment:
  v: In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. This element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Meta.source
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta.profile
path:
  v: Location.meta.profile
short:
  v: Profiles this resource claims to conform to
definition:
  v: A list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).
comment:
  v: It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time. The list of profile URLs is a set.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Meta.profile
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: canonical
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/StructureDefinition
    link: http://hl7.org/fhir/StructureDefinition/StructureDefinition
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true

id:
  v: Location.meta.security
path:
  v: Location.meta.security
short:
  v: Security Labels applied to this resource
definition:
  v: Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.
comment:
  v: The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Meta.security
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: SecurityLabels
  strength:
    v: extensible
  description:
    v: Security Labels from the Healthcare Privacy and Security Classification System.
  value set:
    v: http://hl7.org/fhir/ValueSet/security-labels
    link: http://hl7.org/fhir/ValueSet/security-labels

id:
  v: Location.meta.tag
path:
  v: Location.meta.tag
short:
  v: Tags applied to this resource
definition:
  v: Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.
comment:
  v: The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Meta.tag
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Coding
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Tags
  strength:
    v: example
  description:
    v: Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".
  value set:
    v: http://hl7.org/fhir/ValueSet/common-tags
    link: http://hl7.org/fhir/ValueSet/common-tags

id:
  v: Location.implicitRules
path:
  v: Location.implicitRules
short:
  v: A set of rules under which this content was created
definition:
  v: 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:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.implicitRules
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: uri
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: true
is modifier reason:
  v: 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
is summary:
  v: true

id:
  v: Location.language
path:
  v: Location.language
short:
  v: Language of the resource content
definition:
  v: The base language in which the resource is written.
comment:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Resource.language
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet
    value:
      v: http://hl7.org/fhir/ValueSet/all-languages
      link: http://hl7.org/fhir/ValueSet/all-languages
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: Language
  strength:
    v: preferred
  description:
    v: A human language.
  value set:
    v: http://hl7.org/fhir/ValueSet/languages
    link: http://hl7.org/fhir/ValueSet/languages

id:
  v: Location.text
path:
  v: Location.text
short:
  v: Text summary of the resource, for human interpretation
definition:
  v: 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:
  v: 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:
  v: narrative
alias:
  v: html
alias:
  v: xhtml
alias:
  v: display
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.text
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Narrative
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: Act.text?

id:
  v: Location.contained
path:
  v: Location.contained
short:
  v: Contained, inline Resources
definition:
  v: 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:
  v: 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:
  v: inline resources
alias:
  v: anonymous resources
alias:
  v: contained resources
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.contained
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Resource
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Location.extension
path:
  v: Location.extension
slicing:
  discriminator:
    type:
      v: value
    path:
      v: url
  ordered:
    v: false
  rules:
    v: open
short:
  v: Extension
definition:
  v: An Extension
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false

id:
  v: Location.extension:pca-amenity
path:
  v: Location.extension
slice name:
  v: pca-amenity
short:
  v: Physical features within or in close proximity of the location
definition:
  v: The physical features that are available within, or in close proximity of, the location.
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
  profile:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-amenity
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-amenity
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
must support:
  v: true
is modifier:
  v: false

id:
  v: Location.extension:pca-postal-address
path:
  v: Location.extension
slice name:
  v: pca-postal-address
short:
  v: Postal address
definition:
  v: Postal address.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: DomainResource.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
  profile:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-postal-address
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-postal-address
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
must support:
  v: true
is modifier:
  v: false

id:
  v: Location.modifierExtension
path:
  v: Location.modifierExtension
short:
  v: Extensions that cannot be ignored
definition:
  v: 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: 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:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: DomainResource.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Location.identifier
path:
  v: Location.identifier
slicing:
  discriminator:
    type:
      v: value
    path:
      v: system
  rules:
    v: open
short:
  v: Unique code or number identifying the location to its users
definition:
  v: Unique code or number identifying the location to its users.
requirements:
  v: Organization label locations in registries, need to keep track of those.
min:
  v: 1
max:
  v: *
base:
  path:
    v: Location.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
  profile:
    v: http://hl7.org/fhir/StructureDefinition/Identifier
    link: http://hl7.org/fhir/StructureDefinition/Identifier
  profile:
    v: http://hl7.org.au/fhir/StructureDefinition/au-locationspecificpracticenumber
    link: http://hl7.org.au/fhir/StructureDefinition/au-locationspecificpracticenumber
  profile:
    v: http://hl7.org.au/fhir/StructureDefinition/au-natasitenumber
    link: http://hl7.org.au/fhir/StructureDefinition/au-natasitenumber
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CX / EI (occasionally, more often EI maps to a resource id or a URL)
mapping:
  identity:
    v: rim
  map:
    v: 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:
  identity:
    v: servd
  map:
    v: Identifier

id:
  v: Location.identifier:pca-li
path:
  v: Location.identifier
slice name:
  v: pca-li
short:
  v: PCA Location Identifier (PCA-LI) issued by the PCA service
definition:
  v: The PCA Location Identifier (PCA-LI) issued by the PCA service to each Location.
requirements:
  v: Organization label locations in registries, need to keep track of those.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.identifier
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Identifier
  profile:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location-identifier
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location-identifier
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: CX / EI (occasionally, more often EI maps to a resource id or a URL)
mapping:
  identity:
    v: rim
  map:
    v: 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:
  identity:
    v: servd
  map:
    v: Identifier

id:
  v: Location.status
path:
  v: Location.status
short:
  v: active | inactive
definition:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Location.status
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: inv-pca-8
  severity:
    v: error
  human:
    v: status shall be either 'active' or 'inactive'
  expression:
    v: (value = 'active') or (value = 'inactive')
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
must support:
  v: true
is modifier:
  v: true
is modifier reason:
  v: This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: LocationStatus
  strength:
    v: required
  description:
    v: Indicates whether the location is still in use.
  value set:
    v: http://hl7.org/fhir/ValueSet/location-status|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: rim
  map:
    v: .statusCode

id:
  v: Location.operationalStatus
path:
  v: Location.operationalStatus
short:
  v: The operational status of the location (typically only for a bed/room)
definition:
  v: 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:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.operationalStatus
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Coding
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: OperationalStatus
  strength:
    v: preferred
  description:
    v: The operational status if the location (where typically a bed/room).
  value set:
    v: http://terminology.hl7.org/ValueSet/v2-0116
    link: http://terminology.hl7.org/ValueSet/v2-0116
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.status
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.name
path:
  v: Location.name
short:
  v: Name of the location as used by humans
definition:
  v: Name of the location as used by humans. Does not need to be unique.
comment:
  v: 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.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Location.name
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .name

id:
  v: Location.alias
path:
  v: Location.alias
short:
  v: A list of alternate names that the location is known as, or was known as, in the past
definition:
  v: A list of alternate names that the location is known as, or was known as, in the past.
comment:
  v: 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:
  v: Over time locations and organizations go through many changes and can be known by different names. For searching knowing previous names that the location was known by can be very useful.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.alias
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .name

id:
  v: Location.description
path:
  v: Location.description
short:
  v: Additional details about the location that could be displayed as further information to identify the location beyond its name
definition:
  v: Description of the Location, which helps in finding or referencing the place.
requirements:
  v: Humans need additional information to verify a correct location has been identified.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.description
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .playingEntity[classCode=PLC determinerCode=INSTANCE].desc

id:
  v: Location.mode
path:
  v: Location.mode
short:
  v: instance | kind
definition:
  v: Indicates whether a resource instance represents a specific location or a class of locations.
comment:
  v: 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:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.mode
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: LocationMode
  strength:
    v: required
  description:
    v: Indicates whether a resource instance represents a specific location or a class of locations.
  value set:
    v: http://hl7.org/fhir/ValueSet/location-mode|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .playingEntity[classCode=PLC].determinerCode

id:
  v: Location.type
path:
  v: Location.type
short:
  v: Type of function performed
definition:
  v: Indicates the type of function performed at the location.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.type
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/ValueSet/pca-service-delivery-location-role-type
    link: http://pca.digitalhealth.gov.au/fhir/4.0/ValueSet/pca-service-delivery-location-role-type
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .code

id:
  v: Location.telecom
path:
  v: Location.telecom
short:
  v: Contact details of the location
definition:
  v: The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.telecom
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: ContactPoint
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .telecom

id:
  v: Location.address
path:
  v: Location.address
short:
  v: Address at which services are offered by a publisher
definition:
  v: The address at which services are offered by a publisher.
comment:
  v: Note: address is intended to describe postal addresses for administrative purposes, not to describe absolute geographical coordinates. Postal addresses are often used as proxies for physical locations (also see the [Location](http://hl7.org/fhir/R4/location.html#) resource).
requirements:
  v: If locations can be visited, we need to keep track of their address.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.address
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Address
  profile:
    v: http://hl7.org.au/fhir/StructureDefinition/au-address
    link: http://hl7.org.au/fhir/StructureDefinition/au-address
condition:
  v: ele-1
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: inv-add-0
  severity:
    v: error
  human:
    v: The address shall at least have text or a line
  expression:
    v: text.exists() or line.exists()
  source:
    v: http://hl7.org.au/fhir/StructureDefinition/au-address
    link: http://hl7.org.au/fhir/StructureDefinition/au-address
constraint:
  key:
    v: inv-add-1
  severity:
    v: error
  human:
    v: If asserting no fixed address, the type shall be 'physical'
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/no-fixed-address').exists() implies type='physical'
  source:
    v: http://hl7.org.au/fhir/StructureDefinition/au-address
    link: http://hl7.org.au/fhir/StructureDefinition/au-address
constraint:
  key:
    v: inv-add-2
  severity:
    v: error
  human:
    v: If asserting no fixed address, the address text shall begin with 'NO FIXED ADDRESS'
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/no-fixed-address').exists() implies text.startsWith('NO FIXED ADDRESS')
  source:
    v: http://hl7.org.au/fhir/StructureDefinition/au-address
    link: http://hl7.org.au/fhir/StructureDefinition/au-address
constraint:
  key:
    v: inv-pca-9
  severity:
    v: error
  human:
    v: At most, one DPID address identifier shall be present
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/address-identifier').value.where(system='http://hl7.org.au/id/dpid').count() < 2
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
constraint:
  key:
    v: inv-pca-10
  severity:
    v: error
  human:
    v: At most, one G-NAF address identifier shall be present
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/address-identifier').value.where(system='http://hl7.org.au/id/gnafidentifier').count() < 2
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
constraint:
  key:
    v: inv-pca-11
  severity:
    v: error
  human:
    v: address shall contain a maximum of 3 line elements
  expression:
    v: line.count() < 4
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
must support:
  v: true
is modifier:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a
mapping:
  identity:
    v: v2
  map:
    v: XAD
mapping:
  identity:
    v: rim
  map:
    v: AD
mapping:
  identity:
    v: servd
  map:
    v: Address

id:
  v: Location.physicalType
path:
  v: Location.physicalType
short:
  v: Physical form of the location
definition:
  v: Physical form of the location, e.g. building, room, vehicle, road.
requirements:
  v: For purposes of showing relevant locations in queries, we need to categorize locations.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.physicalType
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: CodeableConcept
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
binding:
  strength:
    v: preferred
  value set:
    v: http://terminology.hl7.org.au/ValueSet/location-physical-type-extended
    link: http://terminology.hl7.org.au/ValueSet/location-physical-type-extended
mapping:
  identity:
    v: w5
  map:
    v: FiveWs.class
mapping:
  identity:
    v: rim
  map:
    v: .playingEntity [classCode=PLC].code

id:
  v: Location.position
path:
  v: Location.position
short:
  v: The absolute geographic location
definition:
  v: The absolute geographic location of the Location, expressed using the WGS84 datum (This is the same co-ordinate system used in KML).
requirements:
  v: For mobile applications and automated route-finding knowing the exact location of the Location is required.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.position
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .playingEntity [classCode=PLC determinerCode=INSTANCE].positionText

id:
  v: Location.position.id
path:
  v: Location.position.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.position.extension
path:
  v: Location.position.extension
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. 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:
  v: 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:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.position.modifierExtension
path:
  v: Location.position.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: 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:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Location.position.longitude
path:
  v: Location.position.longitude
short:
  v: Longitude with WGS84 datum
definition:
  v: Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Location.position.longitude
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: decimal
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: (RIM Opted not to map the sub-elements of GPS location, is now an OBS)

id:
  v: Location.position.latitude
path:
  v: Location.position.latitude
short:
  v: Latitude with WGS84 datum
definition:
  v: Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below).
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Location.position.latitude
  min:
    v: 1
  max:
    v: 1
type:
  code:
    v: decimal
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: (RIM Opted not to map the sub-elements of GPS location, is now an OBS)

id:
  v: Location.position.altitude
path:
  v: Location.position.altitude
short:
  v: Altitude with WGS84 datum
definition:
  v: Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below).
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.position.altitude
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: decimal
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: (RIM Opted not to map the sub-elements of GPS location, is now an OBS)

id:
  v: Location.managingOrganization
path:
  v: Location.managingOrganization
short:
  v: Organization responsible for provisioning and upkeep
definition:
  v: The organization responsible for the provisioning and upkeep of the location.
comment:
  v: 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:
  v: Need to know who manages the location.
min:
  v: 1
max:
  v: 1
base:
  path:
    v: Location.managingOrganization
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-organization
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-organization
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
must support:
  v: true
is modifier:
  v: false
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: .scopingEntity[classCode=ORG determinerKind=INSTANCE]

id:
  v: Location.partOf
path:
  v: Location.partOf
short:
  v: Another Location this one is physically a part of
definition:
  v: Another Location of which this Location is physically a part of.
requirements:
  v: For purposes of location, display and identification, knowing which locations are located within other locations is important.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.partOf
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-hierarchy
    value:
      v: true
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Location
    link: http://hl7.org/fhir/StructureDefinition/Location
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .inboundLink[typeCode=PART].source[classCode=SDLC]

id:
  v: Location.hoursOfOperation
path:
  v: Location.hoursOfOperation
short:
  v: What days/times during a week is this location usually open
definition:
  v: What days/times during a week is this location usually open.
comment:
  v: This type of information is commonly found published in directories and on websites informing customers when the facility is available. Specific services within the location may have their own hours which could be shorter (or longer) than the locations hours.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.hoursOfOperation
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: BackboneElement
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: Location.hoursOfOperation.id
path:
  v: Location.hoursOfOperation.id
representation:
  v: xmlAttr
short:
  v: Unique id for inter-element referencing
definition:
  v: Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Element.id
  min:
    v: 0
  max:
    v: 1
type:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type
    value:
      v: string
  code:
    v: http://hl7.org/fhirpath/System.String
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.hoursOfOperation.extension
path:
  v: Location.hoursOfOperation.extension
short:
  v: Additional content defined by implementations
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element. 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:
  v: 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:
  v: extensions
alias:
  v: user content
min:
  v: 0
max:
  v: *
base:
  path:
    v: Element.extension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.hoursOfOperation.modifierExtension
path:
  v: Location.hoursOfOperation.modifierExtension
short:
  v: Extensions that cannot be ignored even if unrecognized
definition:
  v: May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained 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 can 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. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
comment:
  v: 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:
  v: 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](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).
alias:
  v: extensions
alias:
  v: user content
alias:
  v: modifiers
min:
  v: 0
max:
  v: *
base:
  path:
    v: BackboneElement.modifierExtension
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Extension
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
constraint:
  key:
    v: ext-1
  severity:
    v: error
  human:
    v: Must have either extensions or value[x], not both
  expression:
    v: extension.exists() != value.exists()
  xpath:
    v: exists(f:extension)!=exists(f:*[starts-with(local-name(.), "value")])
  source:
    v: http://hl7.org/fhir/StructureDefinition/Extension
    link: http://hl7.org/fhir/StructureDefinition/Extension
is modifier:
  v: true
is modifier reason:
  v: Modifier extensions are expected to modify the meaning or interpretation of the element that contains them
is summary:
  v: true
mapping:
  identity:
    v: rim
  map:
    v: N/A

id:
  v: Location.hoursOfOperation.daysOfWeek
path:
  v: Location.hoursOfOperation.daysOfWeek
short:
  v: mon | tue | wed | thu | fri | sat | sun
definition:
  v: Indicates which days of the week are available between the start and end Times.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.hoursOfOperation.daysOfWeek
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: code
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
binding:
  extension:
    url:
      v: http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName
    value:
      v: DaysOfWeek
  strength:
    v: required
  description:
    v: The days of the week.
  value set:
    v: http://hl7.org/fhir/ValueSet/days-of-week|4.0.1
    link: 4.0
    link: .1
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: Location.hoursOfOperation.allDay
path:
  v: Location.hoursOfOperation.allDay
short:
  v: The Location is open all day
definition:
  v: The Location is open all day.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.hoursOfOperation.allDay
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: boolean
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: Location.hoursOfOperation.openingTime
path:
  v: Location.hoursOfOperation.openingTime
short:
  v: Time that the Location opens
definition:
  v: Time that the Location opens.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.hoursOfOperation.openingTime
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: time
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: Location.hoursOfOperation.closingTime
path:
  v: Location.hoursOfOperation.closingTime
short:
  v: Time that the Location closes
definition:
  v: Time that the Location closes.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.hoursOfOperation.closingTime
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: time
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: .effectiveTime

id:
  v: Location.availabilityExceptions
path:
  v: Location.availabilityExceptions
short:
  v: Description of availability exceptions
definition:
  v: 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.
min:
  v: 0
max:
  v: 1
base:
  path:
    v: Location.availabilityExceptions
  min:
    v: 0
  max:
    v: 1
type:
  code:
    v: string
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

id:
  v: Location.endpoint
path:
  v: Location.endpoint
short:
  v: Technical endpoints providing access to services operated for the location
definition:
  v: Technical endpoints providing access to services operated for the location.
requirements:
  v: 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.
min:
  v: 0
max:
  v: *
base:
  path:
    v: Location.endpoint
  min:
    v: 0
  max:
    v: *
type:
  code:
    v: Reference
  target profile:
    v: http://hl7.org/fhir/StructureDefinition/Endpoint
    link: http://hl7.org/fhir/StructureDefinition/Endpoint
constraint:
  key:
    v: ele-1
  severity:
    v: error
  human:
    v: All FHIR elements must have a @value or children
  expression:
    v: hasValue() or (children().count() > id.count())
  xpath:
    v: @value|f:*|h:div
  source:
    v: http://hl7.org/fhir/StructureDefinition/Element
    link: http://hl7.org/fhir/StructureDefinition/Element
is modifier:
  v: false
is summary:
  v: false
mapping:
  identity:
    v: rim
  map:
    v: n/a

element:
  id:
    v: Location
  path:
    v: Location
  short:
    v: A location at which services are offered by a publisher
  definition:
    v: A location at which services are offered by a publisher.
  constraint:
    key:
      v: inv-pca-1
    severity:
      v: error
    human:
      v: managingOrganization shall be a relative reference to an Organization
    expression:
      v: managingOrganization.reference.startsWith('Organization/')
  constraint:
    key:
      v: inv-pca-2
    severity:
      v: error
    human:
      v: If present, the type must include either 'MOBL' or 'VI'
    expression:
      v: type.exists() implies (type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() or type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists())
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  constraint:
    key:
      v: inv-pca-3
    severity:
      v: error
    human:
      v: If type contains 'VI', no other type must be present
    expression:
      v: type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists() implies (type.count() = 1)
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  constraint:
    key:
      v: inv-pca-4
    severity:
      v: error
    human:
      v: If type contains 'MOBL', it must also include at least one of the following codes to further qualify where the mobile service is offered: 'PTRES', 'SCHOOL', 'WORK', 'COMM' or 'AMB'
    expression:
      v: type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() implies (type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'PTRES').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'SCHOOL').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'WORK').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'COMM').exists() or type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'AMB').exists())
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  constraint:
    key:
      v: inv-pca-5
    severity:
      v: error
    human:
      v: If type contains 'MOBL', then mode shall be 'kind'
    expression:
      v: type.coding.where(system='http://terminology.hl7.org/CodeSystem/v3-RoleCode' and code = 'MOBL').exists() implies mode.exists(value = 'kind')
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  constraint:
    key:
      v: inv-pca-6
    severity:
      v: error
    human:
      v: If type contains 'VI', then mode shall be 'kind' and physicalType shall be 'vi'
    expression:
      v: type.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-type' and code = 'VI').exists() implies mode.exists(value = 'kind') and physicalType.coding.where(system='http://terminology.hl7.org.au/CodeSystem/location-physical-type' and code = 'vi')
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
  constraint:
    key:
      v: inv-pca-7
    severity:
      v: error
    human:
      v: Either type or address shall be present
    expression:
      v: (type.exists() implies address.exists().not()) and (type.exists().not() implies address.exists())
    source:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
element:
  id:
    v: Location.id
  path:
    v: Location.id
  must support:
    v: true
element:
  id:
    v: Location.meta
  path:
    v: Location.meta
  must support:
    v: true
element:
  id:
    v: Location.meta.versionId
  path:
    v: Location.meta.versionId
  must support:
    v: true
element:
  id:
    v: Location.meta.lastUpdated
  path:
    v: Location.meta.lastUpdated
  must support:
    v: true
element:
  id:
    v: Location.extension:pca-amenity
  path:
    v: Location.extension
  slice name:
    v: pca-amenity
  type:
    code:
      v: Extension
    profile:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-amenity
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-amenity
  must support:
    v: true
element:
  id:
    v: Location.extension:pca-postal-address
  path:
    v: Location.extension
  slice name:
    v: pca-postal-address
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Extension
    profile:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-postal-address
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-postal-address
  must support:
    v: true
element:
  id:
    v: Location.identifier
  path:
    v: Location.identifier
  slicing:
    discriminator:
      type:
        v: value
      path:
        v: system
    rules:
      v: open
  min:
    v: 1
  must support:
    v: true
element:
  id:
    v: Location.identifier:pca-li
  path:
    v: Location.identifier
  slice name:
    v: pca-li
  short:
    v: PCA Location Identifier (PCA-LI) issued by the PCA service
  min:
    v: 0
  max:
    v: 1
  type:
    code:
      v: Identifier
    profile:
      v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location-identifier
      link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location-identifier
  must support:
    v: true
element:
  id:
    v: Location.status
  path:
    v: Location.status
  short:
    v: active | inactive
  min:
    v: 1
  constraint:
    key:
      v: inv-pca-8

v: error

v: status shall be either 'active' or 'inactive'

v: (value = 'active') or (value = 'inactive')

v: true

id:
  v: Location.name
path:
  v: Location.name
min:
  v: 1
must support:
  v: true

id:
  v: Location.mode
path:
  v: Location.mode
must support:
  v: true

id:
  v: Location.type
path:
  v: Location.type
must support:
  v: true
binding:
  strength:
    v: required
  value set:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/ValueSet/pca-service-delivery-location-role-type
    link: http://pca.digitalhealth.gov.au/fhir/4.0/ValueSet/pca-service-delivery-location-role-type

id:
  v: Location.telecom
path:
  v: Location.telecom
must support:
  v: true

id:
  v: Location.address
path:
  v: Location.address
short:
  v: Address at which services are offered by a publisher
definition:
  v: The address at which services are offered by a publisher.
type:
  code:
    v: Address
  profile:
    v: http://hl7.org.au/fhir/StructureDefinition/au-address
    link: http://hl7.org.au/fhir/StructureDefinition/au-address
constraint:
  key:
    v: inv-pca-9
  severity:
    v: error
  human:
    v: At most, one DPID address identifier shall be present
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/address-identifier').value.where(system='http://hl7.org.au/id/dpid').count() < 2
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
constraint:
  key:
    v: inv-pca-10
  severity:
    v: error
  human:
    v: At most, one G-NAF address identifier shall be present
  expression:
    v: extension('http://hl7.org.au/fhir/StructureDefinition/address-identifier').value.where(system='http://hl7.org.au/id/gnafidentifier').count() < 2
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
constraint:
  key:
    v: inv-pca-11
  severity:
    v: error
  human:
    v: address shall contain a maximum of 3 line elements
  expression:
    v: line.count() < 4
  source:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-location
must support:
  v: true

id:
  v: Location.physicalType
path:
  v: Location.physicalType
must support:
  v: true

id:
  v: Location.managingOrganization
path:
  v: Location.managingOrganization
min:
  v: 1
type:
  code:
    v: Reference
  target profile:
    v: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-organization
    link: http://pca.digitalhealth.gov.au/fhir/4.0/StructureDefinition/pca-organization
must support:
  v: true