{
  "resourceType": "StructureDefinition",
  "id": "TaskMERT",
  "url": "https://intrahealth.com/fhir/mert/StructureDefinition/TaskMERT",
  "name": "TaskMERT",
  "title": "Task (MERT)",
  "status": "draft",
  "description": "This profile describes the Task constraints for MERT.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task.status",
        "path": "Task.status",
        "comment": "MERT constrains Task.status to 'ready' or 'completed'. Tasks in other states (e.g., cancelled, in-progress, draft) are out of scope and are not transmitted.",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://intrahealth.com/fhir/mert/ValueSet/mert-task-status-vs"
        }
      },
      {
        "id": "Task.intent",
        "path": "Task.intent",
        "comment": "MERT uses Task.intent='order' — tasks created from other intents are out of scope for this exchange.",
        "patternCode": "order",
        "mustSupport": true
      },
      {
        "id": "Task.priority",
        "path": "Task.priority",
        "mustSupport": true
      },
      {
        "id": "Task.description",
        "path": "Task.description",
        "comment": "Human-readable explanation of what needs to be done.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "comment": "Beneficiary of the Task (patient).",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.executionPeriod",
        "path": "Task.executionPeriod",
        "mustSupport": true
      },
      {
        "id": "Task.executionPeriod.end",
        "path": "Task.executionPeriod.end",
        "comment": "If present, executionPeriod.end represents the date/time Task is completed.",
        "mustSupport": true
      },
      {
        "id": "Task.authoredOn",
        "path": "Task.authoredOn",
        "mustSupport": true
      },
      {
        "id": "Task.lastModified",
        "path": "Task.lastModified",
        "mustSupport": true
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "comment": "Who requested the task.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PractitionerMERT"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.owner",
        "path": "Task.owner",
        "comment": "Assigned to / responsible individual.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PractitionerMERT"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.note",
        "path": "Task.note",
        "comment": "Progress notes / addendums.",
        "mustSupport": true
      },
      {
        "id": "Task.restriction",
        "path": "Task.restriction",
        "mustSupport": true
      },
      {
        "id": "Task.restriction.period",
        "path": "Task.restriction.period",
        "mustSupport": true
      },
      {
        "id": "Task.restriction.period.end",
        "path": "Task.restriction.period.end",
        "comment": "Restriction.period.end is used as the task due date (if provided). Receivers should preserve this value.",
        "mustSupport": true
      }
    ]
  }
}