{
  "resourceType": "StructureDefinition",
  "url": "http://example.org/fhir/StructureDefinition/TrackerProgramCarePlan",
  "name": "TrackerProgramCarePlan",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CarePlan.implicitRules",
        "path": "CarePlan.implicitRules",
        "max": "0"
      },
      {
        "id": "CarePlan.language",
        "path": "CarePlan.language",
        "max": "0"
      },
      {
        "id": "CarePlan.contained",
        "path": "CarePlan.contained",
        "max": "0"
      },
      {
        "id": "CarePlan.extension",
        "path": "CarePlan.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.extension:incidentDate",
        "path": "CarePlan.extension",
        "sliceName": "incidentDate",
        "label": "Incident date",
        "short": "Incident date of enrollment",
        "definition": "The incident date of the enrollment.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://www.dhis2.org/dhis2-fhir-adapter/extensions/incident-date"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.extension:location",
        "path": "CarePlan.extension",
        "sliceName": "location",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://www.dhis2.org/dhis2-fhir-adapter/extensions/location"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "slicing": {
          "rules": "open"
        },
        "max": "1"
      },
      {
        "id": "CarePlan.identifier:dhis2",
        "path": "CarePlan.identifier",
        "sliceName": "dhis2",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.identifier:dhis2.use",
        "path": "CarePlan.identifier.use",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier:dhis2.type",
        "path": "CarePlan.identifier.type",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier:dhis2.system",
        "path": "CarePlan.identifier.system",
        "min": 1,
        "fixedUri": "http://www.dhis2.org/dhis2-fhir-adapter/systems/DHIS2-FHIR-Identifier"
      },
      {
        "id": "CarePlan.identifier:dhis2.value",
        "path": "CarePlan.identifier.value",
        "min": 1
      },
      {
        "id": "CarePlan.identifier:dhis2.period",
        "path": "CarePlan.identifier.period",
        "max": "0"
      },
      {
        "id": "CarePlan.identifier:dhis2.assigner",
        "path": "CarePlan.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CarePlan.instantiatesCanonical",
        "path": "CarePlan.instantiatesCanonical",
        "short": "FHIR PlanDefinition of a DHIS2 Tracker Program",
        "definition": "The URL pointing to a FHIR PlanDefinition that represents a DHIS2 Tracker Program.",
        "max": "1"
      },
      {
        "id": "CarePlan.instantiatesUri",
        "path": "CarePlan.instantiatesUri",
        "label": "DHIS2 Tracker Program ID",
        "short": "DHIS2 Tracker Program ID",
        "definition": "The ID of the DHIS2 Tracker Program that represents the care plan.",
        "max": "1"
      },
      {
        "id": "CarePlan.basedOn",
        "path": "CarePlan.basedOn",
        "max": "0"
      },
      {
        "id": "CarePlan.replaces",
        "path": "CarePlan.replaces",
        "max": "0"
      },
      {
        "id": "CarePlan.partOf",
        "path": "CarePlan.partOf",
        "max": "0"
      },
      {
        "id": "CarePlan.status",
        "path": "CarePlan.status",
        "short": "active | completed | cancelled",
        "definition": "active | completed | cancelled"
      },
      {
        "id": "CarePlan.intent",
        "path": "CarePlan.intent",
        "fixedCode": "plan"
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "max": "0"
      },
      {
        "id": "CarePlan.title",
        "path": "CarePlan.title",
        "max": "0"
      },
      {
        "id": "CarePlan.description",
        "path": "CarePlan.description",
        "max": "0"
      },
      {
        "id": "CarePlan.subject",
        "path": "CarePlan.subject",
        "label": "Reference to the Patient",
        "short": "Reference to the Patient",
        "definition": "Identifies the patient whose intended care is described by the plan."
      },
      {
        "id": "CarePlan.encounter",
        "path": "CarePlan.encounter",
        "max": "0"
      },
      {
        "id": "CarePlan.period",
        "path": "CarePlan.period",
        "slicing": {
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.period:enrollment",
        "path": "CarePlan.period",
        "sliceName": "enrollment",
        "min": 1
      },
      {
        "id": "CarePlan.period:enrollment.start",
        "path": "CarePlan.period.start",
        "min": 1
      },
      {
        "id": "CarePlan.period:enrollment.end",
        "path": "CarePlan.period.end",
        "max": "0"
      },
      {
        "id": "CarePlan.created",
        "path": "CarePlan.created",
        "label": "Incident date",
        "short": "Creation date of record",
        "max": "0"
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.contributor",
        "path": "CarePlan.contributor",
        "max": "0"
      },
      {
        "id": "CarePlan.careTeam",
        "path": "CarePlan.careTeam",
        "max": "0"
      },
      {
        "id": "CarePlan.addresses",
        "path": "CarePlan.addresses",
        "max": "0"
      },
      {
        "id": "CarePlan.supportingInfo",
        "path": "CarePlan.supportingInfo",
        "max": "0"
      },
      {
        "id": "CarePlan.goal",
        "path": "CarePlan.goal",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.outcomeCodeableConcept",
        "path": "CarePlan.activity.outcomeCodeableConcept",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.outcomeReference",
        "path": "CarePlan.activity.outcomeReference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.progress",
        "path": "CarePlan.activity.progress",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.kind",
        "path": "CarePlan.activity.detail.kind",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesCanonical",
        "path": "CarePlan.activity.detail.instantiatesCanonical",
        "short": "Instantiates FHIR PlanDefinition",
        "definition": "The URL pointing to a FHIR PlanDefinition that references the DHIS2 Tracker Program.",
        "max": "1"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesUri",
        "path": "CarePlan.activity.detail.instantiatesUri",
        "label": "DHIS2 Tracker Program Stage ID",
        "short": "DHIS2 Tracker Program Stage ID",
        "definition": "The ID of the DHIS2 Tracker Program Stage that represents the care plan.",
        "max": "1"
      },
      {
        "id": "CarePlan.activity.detail.code",
        "path": "CarePlan.activity.detail.code",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonCode",
        "path": "CarePlan.activity.detail.reasonCode",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonReference",
        "path": "CarePlan.activity.detail.reasonReference",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.goal",
        "path": "CarePlan.activity.detail.goal",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.status",
        "path": "CarePlan.activity.detail.status",
        "short": "in-progress | completed | cancelled",
        "definition": "in-progress | completed | cancelled"
      },
      {
        "id": "CarePlan.activity.detail.statusReason",
        "path": "CarePlan.activity.detail.statusReason",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.doNotPerform",
        "path": "CarePlan.activity.detail.doNotPerform",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.scheduled[x]",
        "path": "CarePlan.activity.detail.scheduled[x]",
        "min": 1,
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.scheduled[x].end",
        "path": "CarePlan.activity.detail.scheduled[x].end",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.location",
        "path": "CarePlan.activity.detail.location",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.performer",
        "path": "CarePlan.activity.detail.performer",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.product[x]",
        "path": "CarePlan.activity.detail.product[x]",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.dailyAmount",
        "path": "CarePlan.activity.detail.dailyAmount",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.quantity",
        "path": "CarePlan.activity.detail.quantity",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.description",
        "path": "CarePlan.activity.detail.description",
        "max": "0"
      },
      {
        "id": "CarePlan.note",
        "path": "CarePlan.note",
        "max": "0"
      }
    ]
  }
}