{
  "resourceType": "StructureDefinition",
  "id": "fiphr-sd-selfcareplan-r4",
  "url": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-selfcareplan-r4",
  "version": "1.0.0",
  "name": "FIPHRSDCarePlan",
  "title": "Finnish PHR SelfCarePlan profile",
  "status": "active",
  "experimental": false,
  "date": "2023-03-02",
  "description": "StructureDefinition for FinnishPHR SelfCarePlan resource.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CarePlan",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "CarePlan",
        "path": "CarePlan",
        "short": "Self-care plan for patient"
      },
      {
        "id": "CarePlan.meta.profile",
        "path": "CarePlan.meta.profile",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "definition": "FinnishPHR: fiphrProfile SHALL be used. Other profiles MAY be used.\r\nA list of profiles (references to [StructureDefinition](structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](structuredefinition-definitions.html#StructureDefinition.url).",
        "min": 1
      },
      {
        "id": "CarePlan.meta.profile:fiphrProfile",
        "path": "CarePlan.meta.profile",
        "sliceName": "fiphrProfile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "http://phr.kanta.fi/StructureDefinition/fiphr-sd-selfcareplan-r4"
      },
      {
        "id": "CarePlan.language",
        "path": "CarePlan.language",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "Finnish PHR: A code of human language."
        }
      },
      {
        "id": "CarePlan.text",
        "path": "CarePlan.text",
        "definition": "Narrative contains clinically relevant information of the resource in a human-readable format. The following fields are used: CarePlan.title, CarePlan.status, CarePlan.period, CarePlan.category, CarePlan.goal, CarePlan.description. If available, a text representation of SelfCareGoal resource is included in the narrative.",
        "min": 1
      },
      {
        "id": "CarePlan.contained",
        "path": "CarePlan.contained",
        "max": "0",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-selfcaregoal-r4"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.extension",
        "path": "CarePlan.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.extension:creatingApplication",
        "path": "CarePlan.extension",
        "sliceName": "creatingApplication",
        "short": "Additional Content defined by implementations",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-ext-creatingapplication"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "min": 1
      },
      {
        "id": "CarePlan.identifier.use",
        "path": "CarePlan.identifier.use",
        "definition": "The purpose of this identifier. \r\nFinnish PHR: The code 'official' SHALL be only used if the given identifier value is truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system).",
        "comment": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one. Applications can assume that an identifier is permanent unless it explicitly says that it is temporary."
      },
      {
        "id": "CarePlan.identifier.system",
        "path": "CarePlan.identifier.system",
        "min": 1
      },
      {
        "id": "CarePlan.identifier.value",
        "path": "CarePlan.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system. \r\nFinnish PHR: At least one of the identifiers SHALL be truly globally unique (e.g. an uuid as the value and 'urn:ietf:rfc:3986' as the system).",
        "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](extension-rendered-value.html).",
        "min": 1
      },
      {
        "id": "CarePlan.identifier.assigner",
        "path": "CarePlan.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CarePlan.instantiatesCanonical",
        "path": "CarePlan.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "CarePlan.instantiatesUri",
        "path": "CarePlan.instantiatesUri",
        "max": "0"
      },
      {
        "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": "In Finnish PHR completed is the only accepted value.",
        "fixedCode": "completed"
      },
      {
        "id": "CarePlan.intent",
        "path": "CarePlan.intent",
        "fixedCode": "plan"
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "extensible",
          "description": "Identifies what \"kind\" of self-care plan this is to support differentiation between multiple co-existing plans.",
          "valueSet": "http://phr.kanta.fi/ValueSet/fiphr-vs-careplancategory"
        }
      },
      {
        "id": "CarePlan.category.coding",
        "path": "CarePlan.category.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "definition": "FinnishPHR: fiphrCategory SHALL be used. Other categories MAY be used.\r\nA reference to a code defined by a terminology system.",
        "min": 1
      },
      {
        "id": "CarePlan.category.coding:fiphrCoding",
        "path": "CarePlan.category.coding",
        "sliceName": "fiphrCoding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.category.coding:fiphrCoding.system",
        "path": "CarePlan.category.coding.system",
        "min": 1,
        "fixedUri": "http://phr.kanta.fi/CodeSystem/fiphr-cs-careplancategory"
      },
      {
        "id": "CarePlan.category.coding:fiphrCoding.code",
        "path": "CarePlan.category.coding.code",
        "min": 1
      },
      {
        "id": "CarePlan.category.coding:fiphrCoding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.category.coding.display",
        "min": 1
      },
      {
        "id": "CarePlan.title",
        "path": "CarePlan.title",
        "min": 1
      },
      {
        "id": "CarePlan.description",
        "path": "CarePlan.description",
        "min": 1
      },
      {
        "id": "CarePlan.subject",
        "path": "CarePlan.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.subject.reference",
        "path": "CarePlan.subject.reference",
        "min": 1
      },
      {
        "id": "CarePlan.subject.identifier.assigner",
        "path": "CarePlan.subject.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CarePlan.encounter",
        "path": "CarePlan.encounter",
        "max": "0"
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.author.reference",
        "path": "CarePlan.author.reference",
        "min": 1
      },
      {
        "id": "CarePlan.author.identifier.assigner",
        "path": "CarePlan.author.identifier.assigner",
        "max": "0"
      },
      {
        "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",
        "definition": "Identifies portions of the patient's record that specifically influenced the formation of the plan.  These might include co-morbidities, recent procedures, limitations, recent assessments, etc. Links also symptom check questionnaire responses to the careplan",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-questionnaireresponse-r4"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.supportingInfo.reference",
        "path": "CarePlan.supportingInfo.reference",
        "min": 1
      },
      {
        "id": "CarePlan.supportingInfo.identifier.assigner",
        "path": "CarePlan.supportingInfo.identifier.assigner",
        "max": "0"
      },
      {
        "id": "CarePlan.goal",
        "path": "CarePlan.goal",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-selfcaregoal-r4"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.goal.reference",
        "path": "CarePlan.goal.reference",
        "min": 1
      },
      {
        "id": "CarePlan.activity",
        "path": "CarePlan.activity",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail",
        "path": "CarePlan.activity.detail",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.kind",
        "path": "CarePlan.activity.detail.kind",
        "definition": "High-level categorization of the type of activity in a self-care plan."
      },
      {
        "id": "CarePlan.activity.detail.code",
        "path": "CarePlan.activity.detail.code",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/care-plan-activity"
        }
      },
      {
        "id": "CarePlan.activity.detail.code.coding",
        "path": "CarePlan.activity.detail.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "CarePlan.activity.detail.code.coding.system",
        "path": "CarePlan.activity.detail.code.coding.system",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.code.coding.version",
        "path": "CarePlan.activity.detail.code.coding.version",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.code.coding.code",
        "path": "CarePlan.activity.detail.code.coding.code",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.activity.detail.code.coding.display",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.code.coding.userSelected",
        "path": "CarePlan.activity.detail.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.code.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.activity.detail.code.text",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonCode",
        "path": "CarePlan.activity.detail.reasonCode",
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/activity-reason"
        }
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding",
        "path": "CarePlan.activity.detail.reasonCode.coding",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding.system",
        "path": "CarePlan.activity.detail.reasonCode.coding.system",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding.version",
        "path": "CarePlan.activity.detail.reasonCode.coding.version",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding.code",
        "path": "CarePlan.activity.detail.reasonCode.coding.code",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.activity.detail.reasonCode.coding.display",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.coding.userSelected",
        "path": "CarePlan.activity.detail.reasonCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.reasonCode.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.activity.detail.reasonCode.text",
        "min": 1
      },
      {
        "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": "not-started | in-progress | completed | cancelled"
      },
      {
        "id": "CarePlan.activity.detail.statusReason",
        "path": "CarePlan.activity.detail.statusReason",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.performer",
        "path": "CarePlan.activity.detail.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://phr.kanta.fi/StructureDefinition/fiphr-sd-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.performer.reference",
        "path": "CarePlan.activity.detail.performer.reference",
        "min": 1
      },
      {
        "id": "CarePlan.activity.detail.performer.type",
        "path": "CarePlan.activity.detail.performer.type",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.performer.identifier",
        "path": "CarePlan.activity.detail.performer.identifier",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.performer.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "CarePlan.activity.detail.performer.display",
        "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.note",
        "path": "CarePlan.note",
        "max": "0"
      }
    ]
  }
}