<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pt-ClientID" />
  <url value="http://medmij.nl/fhir/StructureDefinition/ext-ClientID" />
  <name value="ProviderTaskClientID" />
  <status value="draft" />
  <publisher value="MedMij" />
  <contact>
    <name value="MedMij" />
    <telecom>
      <system value="email" />
      <value value="info@medmij.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="The client ID from the Endpoint resource extension is used as an input parameter named “audience” in the token exchange request between PGO and the DVA authorisation server." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="element" />
    <expression value="Endpoint.extension" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <definition value="The client ID from the Endpoint resource extension is used as an input parameter named “audience” in the token exchange request between PGO and the DVA authorisation server." />
      <comment value="The purpose of client ID is to perform impersonation during token exchange, which results in a launch token of type: medmij:token-type:one-time-code and a smart_launch_context being stored in the DVA authorisation server for that client ID.&#xA;&#xA;The launch token is used again as the value for the launch parameter in the SmartOnFhir launch URL. &#xA;&#xA;The module application that receives the SmartOnFhir launch URL requests a new access token with the same client ID, including the launch token as an additional parameter from the DVA authorisation server, which includes the smart_launch_context in the final token response if both the launch token and client ID match.&#xA;&#xA;Translated with DeepL.com (free version)" />
      <max value="1" />
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://medmij.nl/fhir/StructureDefinition/ext-ClientID" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <type>
        <code value="string" />
      </type>
    </element>
  </differential>
</StructureDefinition>