{
  "resourceType": "StructureDefinition",
  "url": "http://apiframework.dedalus.eu/fhir/StructureDefinition/activityDefinition-targetTaskProfile",
  "name": "activityDefinition-targetTaskProfile",
  "status": "active",
  "experimental": false,
  "description": "Dedalus API Framework extension for ActivityDefinition, allows to specify, as part of an activty definition, the FHIR Profile that the task created with this definition as a base should be compliant to, in terms of mandatory elements and other constraints.",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "contextType": "resource",
  "context": [
    "ActivityDefinition"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Optional Extensions Element",
        "definition": "Optional Extension Element - found in all resources.",
        "base": {
          "path": "Element",
          "min": 0,
          "max": "*"
        },
        "constraint": [
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "http://apiframework.dedalus.eu/fhir/StructureDefinition/activityDefinition-targetTaskProfile"
      },
      {
        "id": "Extension.value[x]:valueReference",
        "path": "Extension.valueReference",
        "sliceName": "valueReference",
        "requirements": "Reference to the FHIR Profile for the Task resource. This reference, as an exception to the API Framework Practices, has .reference as mandatory since it is assumed that the system managing the activty defintion also manages the related task profiles, so it is safe to assume that they can be linked by urls.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/StructureDefinition"
          }
        ]
      },
      {
        "id": "Extension.value[x]:valueReference.reference",
        "path": "Extension.valueReference.reference",
        "requirements": "This reference, as an exception to the API Framework Practices, has .reference as mandatory since it is assumed that the system managing the activty defintion also manages the related task profiles, so it is safe to assume that they can be linked by urls.",
        "min": 1
      }
    ]
  }
}