{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/TrackerProgramQuestionnaireResponse",
  "name": "TrackerProgramQuestionnaireResponse",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "QuestionnaireResponse",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "QuestionnaireResponse.implicitRules",
        "path": "QuestionnaireResponse.implicitRules",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.language",
        "path": "QuestionnaireResponse.language",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.contained",
        "path": "QuestionnaireResponse.contained",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.extension",
        "path": "QuestionnaireResponse.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "QuestionnaireResponse.extension:eventStatus",
        "path": "QuestionnaireResponse.extension",
        "sliceName": "eventStatus",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://www.dhis2.org/dhis2-fhir-adapter/extensions/event-status"
            ]
          }
        ]
      },
      {
        "id": "QuestionnaireResponse.extension:dueDate",
        "path": "QuestionnaireResponse.extension",
        "sliceName": "dueDate",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://www.dhis2.org/dhis2-fhir-adapter/extensions/incident-date-copy"
            ]
          }
        ]
      },
      {
        "id": "QuestionnaireResponse.extension:location",
        "path": "QuestionnaireResponse.extension",
        "sliceName": "location",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://www.dhis2.org/dhis2-fhir-adapter/extensions/location"
            ]
          }
        ]
      },
      {
        "id": "QuestionnaireResponse.identifier",
        "path": "QuestionnaireResponse.identifier",
        "slicing": {
          "description": "Only DHIS2 identifier is supported.",
          "rules": "open"
        }
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2",
        "path": "QuestionnaireResponse.identifier",
        "sliceName": "dhis2",
        "min": 1
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.use",
        "path": "QuestionnaireResponse.identifier.use",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.type",
        "path": "QuestionnaireResponse.identifier.type",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.system",
        "path": "QuestionnaireResponse.identifier.system",
        "min": 1,
        "fixedUri": "http://www.dhis2.org/dhis2-fhir-adapter/systems/DHIS2-FHIR-Identifier"
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.value",
        "path": "QuestionnaireResponse.identifier.value",
        "min": 1
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.period",
        "path": "QuestionnaireResponse.identifier.period",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.identifier:dhis2.assigner",
        "path": "QuestionnaireResponse.identifier.assigner",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.basedOn",
        "path": "QuestionnaireResponse.basedOn",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/CarePlan"
            ]
          }
        ],
        "patternReference": {
          "type": "CarePlan"
        }
      },
      {
        "id": "QuestionnaireResponse.basedOn.reference",
        "path": "QuestionnaireResponse.basedOn.reference",
        "min": 1
      },
      {
        "id": "QuestionnaireResponse.partOf",
        "path": "QuestionnaireResponse.partOf",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.questionnaire",
        "path": "QuestionnaireResponse.questionnaire",
        "min": 1
      },
      {
        "id": "QuestionnaireResponse.status",
        "path": "QuestionnaireResponse.status",
        "short": "in-progress | completed",
        "definition": "The position of the questionnaire response within its overall lifecycle. More detailed information is included in the event status of the questionnaire response."
      },
      {
        "id": "QuestionnaireResponse.encounter",
        "path": "QuestionnaireResponse.encounter",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.authored",
        "path": "QuestionnaireResponse.authored",
        "short": "Event date",
        "definition": "The event date."
      },
      {
        "id": "QuestionnaireResponse.author",
        "path": "QuestionnaireResponse.author",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.source",
        "path": "QuestionnaireResponse.source",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.item.definition",
        "path": "QuestionnaireResponse.item.definition",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.item.answer.item",
        "path": "QuestionnaireResponse.item.answer.item",
        "max": "0"
      },
      {
        "id": "QuestionnaireResponse.item.item",
        "path": "QuestionnaireResponse.item.item",
        "max": "0"
      }
    ]
  }
}