{
  "resourceType": "StructureDefinition",
  "url": "http://oda.fi/fhir/StructureDefinition/stu3/Notification",
  "name": "ODA notification",
  "title": "ODA notification",
  "status": "draft",
  "date": "2019-07-26",
  "publisher": "SoteDigi Oy",
  "description": "A record of information transmitted about an event in Omaolo.",
  "purpose": "The data model for Omaolo notifications.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Communication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Communication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Communication.meta.profile",
        "path": "Communication.meta.profile",
        "fixedUri": "http://oda.fi/fhir/StructureDefinition/stu3/Notification"
      },
      {
        "id": "Communication.implicitRules",
        "path": "Communication.implicitRules",
        "max": "0"
      },
      {
        "id": "Communication.contained",
        "path": "Communication.contained",
        "max": "0"
      },
      {
        "id": "Communication.extension",
        "path": "Communication.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Communication.extension:validAfter",
        "path": "Communication.extension",
        "sliceName": "validAfter",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://oda.fi/fhir/StructureDefinition/ValidAfter"
          }
        ]
      },
      {
        "id": "Communication.identifier",
        "path": "Communication.identifier",
        "max": "0"
      },
      {
        "id": "Communication.definition",
        "path": "Communication.definition",
        "max": "0"
      },
      {
        "id": "Communication.basedOn",
        "path": "Communication.basedOn",
        "max": "0"
      },
      {
        "id": "Communication.partOf",
        "path": "Communication.partOf",
        "max": "0"
      },
      {
        "id": "Communication.notDone",
        "path": "Communication.notDone",
        "max": "0"
      },
      {
        "id": "Communication.notDoneReason",
        "path": "Communication.notDoneReason",
        "max": "0"
      },
      {
        "id": "Communication.category",
        "path": "Communication.category",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "Codes for general categories of communications.",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/notification-category"
          }
        }
      },
      {
        "id": "Communication.category.id",
        "path": "Communication.category.id",
        "max": "0"
      },
      {
        "id": "Communication.category.coding",
        "path": "Communication.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.category.coding.id",
        "path": "Communication.category.coding.id",
        "max": "0"
      },
      {
        "id": "Communication.category.coding.system",
        "path": "Communication.category.coding.system",
        "min": 1,
        "fixedUri": "http://oda.fi/fhir/CodeSystem/communication-category"
      },
      {
        "id": "Communication.category.coding.version",
        "path": "Communication.category.coding.version",
        "max": "0"
      },
      {
        "id": "Communication.category.coding.code",
        "path": "Communication.category.coding.code",
        "min": 1
      },
      {
        "id": "Communication.category.coding.userSelected",
        "path": "Communication.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.category.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.category.text",
        "max": "0"
      },
      {
        "id": "Communication.medium",
        "path": "Communication.medium",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/communication-medium"
          }
        }
      },
      {
        "id": "Communication.medium.id",
        "path": "Communication.medium.id",
        "max": "0"
      },
      {
        "id": "Communication.medium.coding",
        "path": "Communication.medium.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.medium.coding.id",
        "path": "Communication.medium.coding.id",
        "max": "0"
      },
      {
        "id": "Communication.medium.coding.system",
        "path": "Communication.medium.coding.system",
        "min": 1,
        "fixedUri": "http://oda.fi/fhir/CodeSystem/communication-medium"
      },
      {
        "id": "Communication.medium.coding.version",
        "path": "Communication.medium.coding.version",
        "max": "0"
      },
      {
        "id": "Communication.medium.coding.code",
        "path": "Communication.medium.coding.code",
        "min": 1
      },
      {
        "id": "Communication.medium.coding.userSelected",
        "path": "Communication.medium.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.medium.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.medium.text",
        "max": "0"
      },
      {
        "id": "Communication.subject",
        "path": "Communication.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ]
      },
      {
        "id": "Communication.subject.id",
        "path": "Communication.subject.id",
        "max": "0"
      },
      {
        "id": "Communication.subject.reference",
        "path": "Communication.subject.reference",
        "min": 1
      },
      {
        "id": "Communication.subject.identifier",
        "path": "Communication.subject.identifier",
        "max": "0"
      },
      {
        "id": "Communication.subject.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.subject.display",
        "max": "0"
      },
      {
        "id": "Communication.recipient",
        "path": "Communication.recipient",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          }
        ]
      },
      {
        "id": "Communication.recipient.id",
        "path": "Communication.recipient.id",
        "max": "0"
      },
      {
        "id": "Communication.recipient.reference",
        "path": "Communication.recipient.reference",
        "min": 1
      },
      {
        "id": "Communication.recipient.identifier",
        "path": "Communication.recipient.identifier",
        "max": "0"
      },
      {
        "id": "Communication.recipient.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.recipient.display",
        "max": "0"
      },
      {
        "id": "Communication.topic",
        "path": "Communication.topic",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/ReferralRequest"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Goal"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/CarePlan"
          }
        ]
      },
      {
        "id": "Communication.topic.id",
        "path": "Communication.topic.id",
        "max": "0"
      },
      {
        "id": "Communication.topic.extension",
        "path": "Communication.topic.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Communication.topic.extension:referenceTargetType",
        "path": "Communication.topic.extension",
        "sliceName": "referenceTargetType",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://oda.fi/fhir/StructureDefinition/reference-target-type"
          }
        ]
      },
      {
        "id": "Communication.topic.extension:carePlanActivityId",
        "path": "Communication.topic.extension",
        "sliceName": "carePlanActivityId",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://oda.fi/fhir/StructureDefinition/care-plan-activity-id"
          }
        ]
      },
      {
        "id": "Communication.topic.reference",
        "path": "Communication.topic.reference",
        "min": 1
      },
      {
        "id": "Communication.topic.identifier",
        "path": "Communication.topic.identifier",
        "max": "0"
      },
      {
        "id": "Communication.topic.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.topic.display",
        "max": "0"
      },
      {
        "id": "Communication.context",
        "path": "Communication.context",
        "max": "0"
      },
      {
        "id": "Communication.sender",
        "path": "Communication.sender",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
          }
        ]
      },
      {
        "id": "Communication.reasonCode",
        "path": "Communication.reasonCode",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/notification-reason-code"
          }
        }
      },
      {
        "id": "Communication.reasonCode:eventType",
        "path": "Communication.reasonCode",
        "sliceName": "eventType",
        "definition": "The type of event that triggered this communication.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/notification-reason-code"
          }
        }
      },
      {
        "id": "Communication.reasonCode:eventType.id",
        "path": "Communication.reasonCode.id",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:eventType.coding",
        "path": "Communication.reasonCode.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.reasonCode:eventType.coding.id",
        "path": "Communication.reasonCode.coding.id",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:eventType.coding.system",
        "path": "Communication.reasonCode.coding.system",
        "min": 1,
        "fixedUri": "http://oda.fi/fhir/CodeSystem/notification-type"
      },
      {
        "id": "Communication.reasonCode:eventType.coding.version",
        "path": "Communication.reasonCode.coding.version",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:eventType.coding.code",
        "path": "Communication.reasonCode.coding.code",
        "min": 1
      },
      {
        "id": "Communication.reasonCode:eventType.coding.userSelected",
        "path": "Communication.reasonCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:eventType.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.reasonCode.text",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode",
        "path": "Communication.reasonCode",
        "sliceName": "additionalReasonCode",
        "definition": "Other reason code for the communication.",
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSetReference": {
            "reference": "http://oda.fi/fhir/ValueSet/notification-reason-code"
          }
        }
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.id",
        "path": "Communication.reasonCode.id",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding",
        "path": "Communication.reasonCode.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding.id",
        "path": "Communication.reasonCode.coding.id",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding.system",
        "path": "Communication.reasonCode.coding.system",
        "min": 1
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding.version",
        "path": "Communication.reasonCode.coding.version",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding.code",
        "path": "Communication.reasonCode.coding.code",
        "min": 1
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.coding.userSelected",
        "path": "Communication.reasonCode.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Communication.reasonCode:additionalReasonCode.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Communication.reasonCode.text",
        "max": "0"
      },
      {
        "id": "Communication.reasonReference",
        "path": "Communication.reasonReference",
        "max": "0"
      },
      {
        "id": "Communication.payload",
        "path": "Communication.payload",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Communication.payload.id",
        "path": "Communication.payload.id",
        "max": "0"
      },
      {
        "id": "Communication.payload.content[x]:contentString",
        "path": "Communication.payload.contentString",
        "sliceName": "contentString",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Communication.note",
        "path": "Communication.note",
        "max": "0"
      }
    ]
  }
}