{
  "resourceType": "StructureDefinition",
  "id": "ClientApplication",
  "url": "https://haste-health.com/StructureDefinition/ClientApplication",
  "version": "4.0.1",
  "name": "ClientApplication",
  "status": "active",
  "publisher": "haste-health",
  "fhirVersion": "4.0.1",
  "description": "FHIR Implementation of Client Metadata from https://datatracker.ietf.org/doc/html/rfc7591#section-2",
  "kind": "resource",
  "abstract": false,
  "type": "ClientApplication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Resource",
  "derivation": "specialization",
  "snapshot": {
    "element": [
      {
        "id": "ClientApplication",
        "path": "ClientApplication",
        "min": 0,
        "max": "*",
        "base": {
          "path": "ClientApplication",
          "min": 0,
          "max": "*"
        },
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "ClientApplication.id",
        "path": "ClientApplication.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comment": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ],
            "code": "http://hl7.org/fhirpath/System.String"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "ClientApplication.meta",
        "path": "ClientApplication.meta",
        "short": "Metadata about the resource",
        "definition": "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": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "ClientApplication.name",
        "path": "ClientApplication.name",
        "short": "The name of the client to be presented to the end-user.",
        "type": [
          {
            "code": "string"
          }
        ],
        "min": 1,
        "max": "1"
      },
      {
        "id": "ClientApplication.description",
        "path": "ClientApplication.description",
        "short": "The description of the client to be presented to the end-user.",
        "type": [
          {
            "code": "string"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.grantType",
        "path": "ClientApplication.grantType",
        "short": "Auth 2.0 grant type strings that the client can use at the token endpoint.",
        "definition": "The grant type for this client application.",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://haste.health/fhir/ValueSet/ClientApplicationGrantType|4.0.1"
        },
        "min": 1,
        "max": "*"
      },
      {
        "id": "ClientApplication.responseTypes",
        "path": "ClientApplication.responseTypes",
        "short": "OAuth 2.0 response type strings that the client can use at the authorization endpoint.",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://haste.health/fhir/ValueSet/ClientApplicationResponseTypes|4.0.1"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "ClientApplication.secret",
        "path": "ClientApplication.secret",
        "short": "This value is used by confidential clients to authenticate to the token endpoint, as described in OAuth 2.0 [RFC6749], Section 2.3.1.",
        "definition": "For client credentials (or other confidential authentication methods), the client secret.",
        "type": [
          {
            "code": "string"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.redirectUri",
        "path": "ClientApplication.redirectUri",
        "definition": "Array of redirection URI strings for use in redirect-based flows such as the authorization code and implicit flows.  As required by Section 2 of OAuth 2.0 [RFC6749], clients using flows with redirection MUST register their redirection URI values. Authorization servers that support dynamic registration for redirect-based flows MUST implement support for this metadata value.",
        "short": "Array of redirection URI strings for use in redirect-based flows such as the authorization code and implicit flows.  As required by Section 2 of OAuth 2.0 [RFC6749], clients using flows with redirection MUST register their redirection URI values. Authorization servers that support dynamic registration for redirect-based flows MUST implement support for this metadata value.",
        "type": [
          {
            "code": "string"
          }
        ],
        "min": 0,
        "max": "5"
      },
      {
        "id": "ClientApplication.launchUri",
        "path": "ClientApplication.launchUri",
        "definition": "URL an EHR opens to start the app in a SMART App Launch EHR launch. The iss (the FHIR base URL) and launch (an opaque launch identifier) parameters are added to its query.",
        "short": "URL the app is opened at for a SMART EHR launch.",
        "type": [
          {
            "code": "uri"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.uri",
        "path": "ClientApplication.uri",
        "short": "URL string of a web page providing information about the client.",
        "type": [
          {
            "code": "uri"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.logoUri",
        "path": "ClientApplication.logoUri",
        "short": "URL string that references a logo for the client.",
        "type": [
          {
            "code": "uri"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.scope",
        "path": "ClientApplication.scope",
        "short": "String containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.",
        "type": [
          {
            "code": "string"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.contact",
        "path": "ClientApplication.contact",
        "short": "Array of strings representing ways to contact people responsible for this client, typically email addresses.",
        "type": [
          {
            "code": "ContactPoint"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.tosUri",
        "path": "ClientApplication.tosUri",
        "short": "URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.",
        "type": [
          {
            "code": "uri"
          }
        ],
        "min": 0,
        "max": "1"
      },
      {
        "id": "ClientApplication.policyUri",
        "path": "ClientApplication.policyUri",
        "short": "URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.",
        "type": [
          {
            "code": "uri"
          }
        ],
        "min": 0,
        "max": "1"
      }
    ]
  }
}