{
  "resourceType": "StructureDefinition",
  "id": "HealthAppModule",
  "url": "https://fhir.bfarm.de/StructureDefinition/HealthAppModule",
  "version": "3.1.0-TEST",
  "name": "HealthAppModule",
  "title": "HealthAppModule",
  "status": "active",
  "description": "Definition of a module of a digital health application (DiGA) or digital nursing application (DiPA).",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DeviceDefinition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DeviceDefinition",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DeviceDefinition",
        "path": "DeviceDefinition",
        "short": "Module of a digital application",
        "definition": "Represents information about a module of a digital health application (DiGA) or digital nursing application (DiPA).",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension",
        "path": "DeviceDefinition.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:category",
        "path": "DeviceDefinition.extension",
        "sliceName": "category",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthAppModuleCategory"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:hardware",
        "path": "DeviceDefinition.extension",
        "sliceName": "hardware",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthAppModuleHardware"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link",
        "path": "DeviceDefinition.extension",
        "sliceName": "link",
        "short": "Supported DeviceDataRecorders",
        "definition": "DiGA only: Link to compatible interfaces (DeviceDataRecorder) by HIIS ID.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-DeviceDefinition.link"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension",
        "path": "DeviceDefinition.extension.extension",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation",
        "path": "DeviceDefinition.extension.extension",
        "sliceName": "relation",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation.extension",
        "path": "DeviceDefinition.extension.extension.extension",
        "max": "0"
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation.value[x]",
        "path": "DeviceDefinition.extension.extension.value[x]",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.bfarm.de/ValueSet/HealthAppDeviceDefinitionRelationType"
        }
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation.value[x].system",
        "path": "DeviceDefinition.extension.extension.value[x].system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation.value[x].code",
        "path": "DeviceDefinition.extension.extension.value[x].code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relation.value[x].display",
        "path": "DeviceDefinition.extension.extension.value[x].display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice",
        "path": "DeviceDefinition.extension.extension",
        "sliceName": "relatedDevice",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension",
        "path": "DeviceDefinition.extension.extension.extension",
        "min": 2,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference",
        "path": "DeviceDefinition.extension.extension.extension",
        "sliceName": "reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference.extension",
        "path": "DeviceDefinition.extension.extension.extension.extension",
        "max": "0"
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference.value[x]",
        "path": "DeviceDefinition.extension.extension.extension.value[x]",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference.value[x].identifier",
        "path": "DeviceDefinition.extension.extension.extension.value[x].identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference.value[x].identifier.system",
        "path": "DeviceDefinition.extension.extension.extension.value[x].identifier.system",
        "min": 1,
        "fixedUri": "https://fhir.bfarm.de/Identifier/HiisId",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:link.extension:relatedDevice.extension:reference.value[x].identifier.value",
        "path": "DeviceDefinition.extension.extension.extension.value[x].identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.extension:medicalDevice",
        "path": "DeviceDefinition.extension",
        "sliceName": "medicalDevice",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthAppModuleMedicalDevice"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.deviceName",
        "path": "DeviceDefinition.deviceName",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "short": "Module name",
        "definition": "The name of the digital application module.",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.deviceName:modelName",
        "path": "DeviceDefinition.deviceName",
        "sliceName": "modelName",
        "short": "Name",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.deviceName:modelName.name",
        "path": "DeviceDefinition.deviceName.name",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.deviceName:modelName.type",
        "path": "DeviceDefinition.deviceName.type",
        "fixedCode": "model-name"
      },
      {
        "id": "DeviceDefinition.specialization",
        "path": "DeviceDefinition.specialization",
        "short": "Platform availability and requirements",
        "definition": "Contains information about platforms on which the digital application module is available and the requirements for those platforms (e.g., hardware and software compatibility).",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.specialization.extension",
        "path": "DeviceDefinition.specialization.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.specialization.extension:compatibility",
        "path": "DeviceDefinition.specialization.extension",
        "sliceName": "compatibility",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthAppModuleSpecializationCompatibility"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.specialization.extension:url",
        "path": "DeviceDefinition.specialization.extension",
        "sliceName": "url",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthAppModuleSpecializationUrl"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.specialization.systemType",
        "path": "DeviceDefinition.specialization.systemType",
        "short": "Platform",
        "definition": "Contains the identifier of the platform on which the digital application module is available and can be downloaded or used.",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.bfarm.de/ValueSet/HealthAppPlatformType"
        }
      },
      {
        "id": "DeviceDefinition.specialization.version",
        "path": "DeviceDefinition.specialization.version",
        "short": "Version number",
        "definition": "The version number of the digital application module on the respective platform.",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.languageCode",
        "path": "DeviceDefinition.languageCode",
        "short": "Languages",
        "definition": "Indicates the languages in which the module is provided.",
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.languageCode.coding",
        "path": "DeviceDefinition.languageCode.coding",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Coding",
            "profile": [
              "https://fhir.bfarm.de/StructureDefinition/CodingHealthAppLanguage"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.parentDevice",
        "path": "DeviceDefinition.parentDevice",
        "short": "HealthApp",
        "definition": "The reference to the parent digital application (HealthApp).",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.bfarm.de/StructureDefinition/HealthApp"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.parentDevice.reference",
        "path": "DeviceDefinition.parentDevice.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceDefinition.parentDevice.display",
        "path": "DeviceDefinition.parentDevice.display",
        "mustSupport": true
      }
    ]
  }
}