<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="AccessPolicyDefinition" />
  <url value="http://hl7.org/fhir/StructureDefinition/AccessPolicyDefinition" />
  <version value="1.0.0" />
  <name value="AccessPolicyDefinition" />
  <status value="active" />
  <experimental value="false" />
  <date value="2022-12-07T00:00:00.000+01:00" />
  <publisher value="Firely" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="htts://fire.ly" />
    </telecom>
  </contact>
  <description value="A definition of an access policy. This resource is used to describe the underlying policies, evaluated by a FHIR server, to determine which resources a user is allowed to access." />
  <fhirVersion value="3.0.2" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AccessPolicyDefinition" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="AccessPolicyDefinition">
      <path value="AccessPolicyDefinition" />
      <short value="Definition of an access policy." />
      <definition value="A definition of an access policy. This resource is used to describe the underlying policies, evaluated by a FHIR server, to determine which resources a user is allowed to access." />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="AccessPolicyDefinition.url">
      <path value="AccessPolicyDefinition.url" />
      <short value="Canonical identifier for this structure definition, represented as a URI (globally unique)" />
      <definition value="An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.identifier">
      <path value="AccessPolicyDefinition.identifier" />
      <short value="Additional identifier for the structure definition" />
      <definition value="A formal identifier that is used to identify this structure definition when it is represented in other formats, or referenced in a specification, model, design or an instance." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.version">
      <path value="AccessPolicyDefinition.version" />
      <short value="Business version of the structure definition" />
      <definition value="The identifier that is used to identify this version of the structure definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the structure definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.versionAlgorithm[x]">
      <path value="AccessPolicyDefinition.versionAlgorithm[x]" />
      <short value="How to compare versions" />
      <definition value="Indicates the mechanism used to compare versions to determine which is more current." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <type>
        <code value="Coding" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.name">
      <path value="AccessPolicyDefinition.name" />
      <short value="Name for this structure definition (computer friendly)" />
      <definition value="A natural language name identifying the structure definition. This name should be usable as an identifier for the module by machine processing applications such as code generation." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.title">
      <path value="AccessPolicyDefinition.title" />
      <short value="Name for this structure definition (human friendly)" />
      <definition value="A short, descriptive, user-friendly title for the structure definition." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.status">
      <path value="AccessPolicyDefinition.status" />
      <short value="draft | active | retired | unknown" />
      <definition value="The status of this structure definition. Enables tracking the life-cycle of the content." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="PublicationStatus" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true" />
        </extension>
        <strength value="required" />
        <description value="The lifecycle status of an artifact." />
        <valueSetUri value="http://hl7.org/fhir/ValueSet/publication-status" />
      </binding>
    </element>
    <element id="AccessPolicyDefinition.experimental">
      <path value="AccessPolicyDefinition.experimental" />
      <short value="For testing purposes, not real usage" />
      <definition value="A Boolean value to indicate that this structure definition is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <meaningWhenMissing value="If absent, this resource is treated as though it is not experimental." />
    </element>
    <element id="AccessPolicyDefinition.date">
      <path value="AccessPolicyDefinition.date" />
      <short value="Date last changed" />
      <definition value="The date  (and optionally time) when the structure definition was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the structure definition changes." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.publisher">
      <path value="AccessPolicyDefinition.publisher" />
      <short value="Name of the publisher/steward (organization or individual)" />
      <definition value="The name of the organization or individual responsible for the release and ongoing maintenance of the structure definition." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.contact">
      <path value="AccessPolicyDefinition.contact" />
      <short value="Contact details for the publisher" />
      <definition value="Contact details to assist a user in finding and communicating with the publisher." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="ContactDetail" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.description">
      <path value="AccessPolicyDefinition.description" />
      <short value="Natural language description of the structure definition" />
      <definition value="A free text natural language description of the structure definition from a consumer's perspective." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="markdown" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.useContext">
      <path value="AccessPolicyDefinition.useContext" />
      <short value="The context that the content is intended to support" />
      <definition value="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate structure definition instances." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="UsageContext" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.jurisdiction">
      <path value="AccessPolicyDefinition.jurisdiction" />
      <short value="Intended jurisdiction for structure definition (if applicable)" />
      <definition value="A legal or geographic region in which the structure definition is intended to be used." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="Jurisdiction" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="true" />
        </extension>
        <strength value="extensible" />
        <description value="Countries and regions within which this artifact is targeted for use." />
        <valueSetUri value="http://hl7.org/fhir/ValueSet/jurisdiction" />
      </binding>
    </element>
    <element id="AccessPolicyDefinition.purpose">
      <path value="AccessPolicyDefinition.purpose" />
      <short value="Why this structure definition is defined" />
      <definition value="Explanation of why this structure definition is needed and why it has been designed as it has." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="markdown" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.copyright">
      <path value="AccessPolicyDefinition.copyright" />
      <short value="Use and/or publishing restrictions" />
      <definition value="A copyright statement relating to the structure definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the structure definition.  The short copyright declaration (e.g. (c) '2015+ xyz organization' should be sent in the copyrightLabel element." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="markdown" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.copyrightLabel">
      <path value="AccessPolicyDefinition.copyrightLabel" />
      <short value="Copyright holder and year(s)" />
      <definition value="A short string (&lt;50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved')." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.policy">
      <path value="AccessPolicyDefinition.policy" />
      <short value="Policy defining access control rights." />
      <definition value="Policy defining access control rights. All policies apply as a union. The FHIR Server should enforce the policies in combination with access rights applying to the client accessing the FHIR Server (e.g. SMART on FHIR scopes provided in an access token)." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="AccessPolicyDefinition.policy.type">
      <path value="AccessPolicyDefinition.policy.type" />
      <short value="smart-v1 | smart-v2" />
      <definition value="Classification of the access policy." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Coding" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="AccessPolicyType" />
        </extension>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding">
          <valueBoolean value="false" />
        </extension>
        <strength value="required" />
        <description value="Classification of the access policy." />
        <valueSetUri value="https://fire.ly/fhir/ValueSet/AccessPolicyType" />
      </binding>
    </element>
    <element id="AccessPolicyDefinition.policy.restriction">
      <path value="AccessPolicyDefinition.policy.restriction" />
      <short value="List of additional restrictions to apply to the user's access control rights." />
      <definition value="List of additional restrictions to apply to the user's access control rights. Restricions are applied using a syntax defined by AccessPolicyDefinition.policy.type." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="string" />
      </type>
    </element>
  </differential>
</StructureDefinition>