{
  "resourceType": "StructureDefinition",
  "id": "EngagementRecord",
  "url": "http://hl7.org/fhir/StructureDefinition/EngagementRecord",
  "version": "0.1",
  "name": "EngagementRecord",
  "status": "draft",
  "publisher": "Synapxe",
  "copyright": "Copyright (C) 2024 Synapxe",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "EngagementRecord",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "EngagementRecord",
        "path": "EngagementRecord",
        "constraint": [
          {
            "key": "dom-3",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
            "expression": "contained.where(((id.exists() and ('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url)))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(uri) = '#').exists()).not()).trace('unmatched', id).empty()"
          }
        ]
      },
      {
        "id": "EngagementRecord.activity",
        "path": "EngagementRecord.activity",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Activity"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "EngagementRecord.comment",
        "path": "EngagementRecord.comment",
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isModifier": false
      }
    ]
  }
}