{
  "resourceType": "StructureDefinition",
  "id": "Mxx-HealthHub-EntryCallUri",
  "url": "https://fhir.medatixx.de/HealthHub/StructureDefinition/Mxx_HealthHub_EntryCallUri",
  "version": "1.6.0",
  "name": "Mxx_HealthHub_EntryCallUri",
  "title": "Mxx_HealthHub_EntryCallUri",
  "status": "active",
  "publisher": "medatixx GmbH & Co. KG",
  "copyright": "medatixx GmbH & Co. KG",
  "description": "Callback link that is stored as a clickable back-link on the created health record entry in the PVS. Allows the physician to navigate from the PVS entry directly back to the originating document or record in the partner system. Sub-extensions: Uri (required, fully resolved absolute https URL, max 2000 characters, no placeholders; the PVS opens it in a browser), Label (required, human-readable link text), OpenInBrowser (optional, launch mode; default interpretation: true).",
  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "DocumentReference"
    },
    {
      "type": "element",
      "expression": "Observation"
    },
    {
      "type": "element",
      "expression": "Immunization"
    }
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Extension.extension:Uri",
        "path": "Extension.extension",
        "sliceName": "Uri",
        "short": "Callback URL",
        "definition": "Fully resolved callback URL pointing to the originating document in the partner system. Must be an absolute https URL; the PVS opens it in a browser. http, app-launch schemes, placeholders and relative URIs are not allowed. Maximum length 2000 characters. The URL must be complete and ready to use at proposal time.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:Uri.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:Uri.url",
        "path": "Extension.extension.url",
        "fixedUri": "Uri"
      },
      {
        "id": "Extension.extension:Uri.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "url"
          }
        ],
        "maxLength": 2000,
        "constraint": [
          {
            "key": "mxx-entrycalluri-1",
            "severity": "error",
            "human": "The callback URL must be an absolute https URL (the PVS opens it in a browser); http, app-launch schemes, placeholders and relative URIs are not allowed.",
            "expression": "$this.matches('^https://.+')"
          }
        ]
      },
      {
        "id": "Extension.extension:Label",
        "path": "Extension.extension",
        "sliceName": "Label",
        "short": "Link label",
        "definition": "Human-readable display text for the callback link shown in the PVS health record entry. Mandatory whenever the EntryCallUri extension is present. Maximum length 300 characters.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:Label.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:Label.url",
        "path": "Extension.extension.url",
        "fixedUri": "Label"
      },
      {
        "id": "Extension.extension:Label.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ],
        "maxLength": 300
      },
      {
        "id": "Extension.extension:OpenInBrowser",
        "path": "Extension.extension",
        "sliceName": "OpenInBrowser",
        "short": "Open in browser",
        "definition": "Indicates whether the PVS should open the callback URI in a browser window. true (default interpretation): the URL is opened in the system browser. false: not supported in the current PVS client; behaviour is implementation-defined.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Extension.extension:OpenInBrowser.extension",
        "path": "Extension.extension.extension",
        "max": "0"
      },
      {
        "id": "Extension.extension:OpenInBrowser.url",
        "path": "Extension.extension.url",
        "fixedUri": "OpenInBrowser"
      },
      {
        "id": "Extension.extension:OpenInBrowser.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "boolean"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "https://fhir.medatixx.de/HealthHub/StructureDefinition/Mxx_HealthHub_EntryCallUri"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  }
}