{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.cambio.se/StructureDefinition/CareplanCordinatedCareSe",
  "name": "CareplanCordinatedCareSe",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "CarePlan",
  "baseDefinition": "https://fhir.cambio.se/StructureDefinition/CarePlanCore/",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CarePlan.identifier",
        "path": "CarePlan.identifier",
        "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.intent",
        "path": "CarePlan.intent",
        "fixedCode": "plan"
      },
      {
        "id": "CarePlan.category",
        "path": "CarePlan.category",
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.cambio.se/ValueSet/CarePlanCategories/v1"
        }
      },
      {
        "id": "CarePlan.subject.type",
        "path": "CarePlan.subject.type",
        "fixedUri": "Patient"
      },
      {
        "id": "CarePlan.subject.identifier",
        "path": "CarePlan.subject.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "CarePlan.subject.identifier:personnummer",
        "path": "CarePlan.subject.identifier",
        "sliceName": "personnummer",
        "short": "Personnummer/Personal identity number for the patient"
      },
      {
        "id": "CarePlan.subject.identifier:personnummer.system",
        "path": "CarePlan.subject.identifier.system",
        "min": 1,
        "fixedUri": "urn:oid:1.2.752.129.2.1.3.1"
      },
      {
        "id": "CarePlan.subject.identifier:personnummer.value",
        "path": "CarePlan.subject.identifier.value",
        "min": 1
      },
      {
        "id": "CarePlan.subject.identifier:samordningsnummer",
        "path": "CarePlan.subject.identifier",
        "sliceName": "samordningsnummer"
      },
      {
        "id": "CarePlan.subject.identifier:samordningsnummer.system",
        "path": "CarePlan.subject.identifier.system",
        "min": 1,
        "fixedUri": "urn:oid:1.2.752.129.2.1.3.3"
      },
      {
        "id": "CarePlan.subject.identifier:samordningsnummer.value",
        "path": "CarePlan.subject.identifier.value",
        "min": 1
      },
      {
        "id": "CarePlan.encounter",
        "path": "CarePlan.encounter",
        "max": "0"
      },
      {
        "id": "CarePlan.author",
        "path": "CarePlan.author",
        "max": "0"
      },
      {
        "id": "CarePlan.contributor",
        "path": "CarePlan.contributor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.cambio.se/StructureDefinition/PractitionerRoleLiteSe/v1"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.careTeam",
        "path": "CarePlan.careTeam",
        "max": "0"
      },
      {
        "id": "CarePlan.addresses",
        "path": "CarePlan.addresses",
        "max": "0"
      },
      {
        "id": "CarePlan.supportingInfo",
        "path": "CarePlan.supportingInfo",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.cambio.se/StructureDefinition/QuestionnaireResponseSe/v1"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.reference",
        "path": "CarePlan.activity.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Appointment",
              "http://hl7.org/fhir/StructureDefinition/CommunicationRequest",
              "http://hl7.org/fhir/StructureDefinition/DeviceRequest",
              "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
              "http://hl7.org/fhir/StructureDefinition/NutritionOrder",
              "http://hl7.org/fhir/StructureDefinition/Task",
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
              "http://hl7.org/fhir/StructureDefinition/VisionPrescription",
              "http://hl7.org/fhir/StructureDefinition/RequestGroup",
              "https://www.hl7.org/fhir/questionnaire.html"
            ]
          }
        ]
      },
      {
        "id": "CarePlan.activity.detail.kind",
        "path": "CarePlan.activity.detail.kind",
        "fixedCode": "Task"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesCanonical",
        "path": "CarePlan.activity.detail.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "CarePlan.activity.detail.instantiatesUri",
        "path": "CarePlan.activity.detail.instantiatesUri",
        "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.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]",
        "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": "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"
      }
    ]
  }
}