{
  "resourceType": "StructureDefinition",
  "url": "http://oda.fi/fhir/StructureDefinition/stu3/CarePlan",
  "name": "ODA CarePlan",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "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",
        "min": 1
      },
      {
        "id": "CarePlan.contained",
        "path": "CarePlan.contained",
        "type": [
          {
            "code": "ActivityDefinition",
            "profile": "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"
          },
          {
            "code": "Observation",
            "profile": "http://hl7.org/fhir/StructureDefinition/Observation"
          }
        ]
      },
      {
        "id": "CarePlan.definition",
        "path": "CarePlan.definition",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/CarePlanTemplate"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Questionnaire"
          }
        ]
      },
      {
        "id": "CarePlan.basedOn",
        "path": "CarePlan.basedOn",
        "definition": "A care plan that is related to this plan. In Omaolo, this link represents loose coupling so that the related careplans can have their own status and life cycle.",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/CarePlan"
          }
        ]
      },
      {
        "id": "CarePlan.replaces",
        "path": "CarePlan.replaces",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/CarePlan"
          }
        ]
      },
      {
        "id": "CarePlan.partOf",
        "path": "CarePlan.partOf",
        "definition": "A larger care plan of which this particular care plan is a component or step. In Omaolo, this link represents tight coupling of care plans so that the status and life-cycle of this plan is same as the status of the \"master-plan\" ie. the plan partOf references.",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/CarePlan"
          }
        ]
      },
      {
        "id": "CarePlan.intent",
        "path": "CarePlan.intent",
        "short": "plan",
        "fixedCode": "plan"
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "min": 1,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "CarePlanCategory"
            }
          ],
          "strength": "required",
          "description": "Identifies what \"kind\" of plan this is to support differentiation between multiple co-existing plans; e.g. \"Home health\", \"psychiatric\", \"asthma\", \"disease management\", etc. Should contain one ODA template category and one careplan category.",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/careplan-category"
          }
        }
      },
      {
        "id": "CarePlan.title",
        "path": "CarePlan.title",
        "min": 1
      },
      {
        "id": "CarePlan.subject",
        "path": "CarePlan.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ]
      },
      {
        "id": "CarePlan.context",
        "path": "CarePlan.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"
          }
        ]
      },
      {
        "id": "CarePlan.period",
        "path": "CarePlan.period",
        "min": 1
      },
      {
        "id": "CarePlan.period.start",
        "path": "CarePlan.period.start",
        "min": 1
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          }
        ]
      },
      {
        "id": "CarePlan.careTeam",
        "path": "CarePlan.careTeam",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/ServiceRequestList"
          }
        ]
      },
      {
        "id": "CarePlan.addresses",
        "path": "CarePlan.addresses",
        "max": "0"
      },
      {
        "id": "CarePlan.goal",
        "path": "CarePlan.goal",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://oda.fi/fhir/StructureDefinition/stu3/Goal"
          }
        ]
      },
      {
        "id": "CarePlan.activity.outcomeCodeableConcept",
        "path": "CarePlan.activity.outcomeCodeableConcept",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.progress",
        "path": "CarePlan.activity.progress",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Task"
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.category",
        "path": "CarePlan.activity.detail.category",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.category.coding.system",
        "path": "CarePlan.activity.detail.category.coding.system",
        "fixedUri": "http://oda.fi/fhir/ValueSet/activity-category"
      },
      {
        "id": "CarePlan.activity.detail.definition",
        "path": "CarePlan.activity.detail.definition",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/PlanDefinition"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"
          }
        ]
      },
      {
        "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.statusReason",
        "path": "CarePlan.activity.detail.statusReason",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.prohibited",
        "path": "CarePlan.activity.detail.prohibited",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.location",
        "path": "CarePlan.activity.detail.location",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.performer",
        "path": "CarePlan.activity.detail.performer",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ]
      },
      {
        "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"
      }
    ]
  }
}