{
  "resourceType": "StructureDefinition",
  "id": "nexus-correction-task",
  "extension": [
    {
      "url": "https://fhir.apps.health/StructureDefinition/effective-date",
      "extension": [
        {
          "url": "paths",
          "valueString": "authoredOn"
        }
      ]
    },
    {
      "url": "https://fhir.apps.health/StructureDefinition/smart-exposed",
      "extension": [
        {
          "url": "read",
          "valueString": "task:read"
        },
        {
          "url": "write",
          "valueString": "task:write"
        },
        {
          "url": "delete",
          "valueString": "task:delete"
        }
      ]
    }
  ],
  "url": "https://fhir.apps.health/StructureDefinition/nexus-correction-task",
  "name": "NexusCorrectionTask",
  "title": "Correction Task",
  "status": "draft",
  "experimental": false,
  "date": "2026-09-14",
  "publisher": "WELLSTAR Technologies Corp.",
  "description": "A patient's request to correct their own record, or to log a disagreement where a correction was refused, carried as an ordinary clinical task with the statutory correction vocabulary. Same worklist, same shape, narrower status set. AN ACCESS REQUEST IS NOT HELD TO THIS PROFILE. Every code in this vocabulary describes a correction or a disagreement, so a request to be given a copy of the record has no terminal state here it could truthfully reach. It shares the `privacy-request` worklist bin and stays on the base clinical task, which binds the wider set.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task",
  "derivation": "constraint",
  "snapshot": {
    "element": [
      {
        "id": "Task",
        "path": "Task",
        "short": "A task to be performed",
        "definition": "A task to be performed.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task",
          "min": 0,
          "max": "*"
        },
        "constraint": [
          {
            "key": "dom-2",
            "severity": "error",
            "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
            "expression": "contained.contained.empty()",
            "xpath": "not(parent::f:contained and f:contained)",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "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 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(canonical) = '#').exists()).not()).trace('unmatched', id).empty()",
            "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "dom-4",
            "severity": "error",
            "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
            "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()",
            "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "dom-5",
            "severity": "error",
            "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
            "expression": "contained.meta.security.empty()",
            "xpath": "not(exists(f:contained/*/f:meta/f:security))",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
                "valueBoolean": true
              },
              {
                "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
                "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
              }
            ],
            "key": "dom-6",
            "severity": "warning",
            "human": "A resource should have narrative for robust management",
            "expression": "text.`div`.exists()",
            "xpath": "exists(f:text/h:div)",
            "source": "http://hl7.org/fhir/StructureDefinition/DomainResource"
          },
          {
            "key": "inv-1",
            "severity": "error",
            "human": "Last modified date must be greater than or equal to authored-on date.",
            "expression": "lastModified.exists().not() or authoredOn.exists().not() or lastModified >= authoredOn",
            "xpath": "not(exists(f:lastModified/@value)) or not(exists(f:authoredOn/@value)) or f:lastModified/@value >= f:authoredOn/@value"
          },
          {
            "key": "nexus-note-extension-not-where-native",
            "severity": "error",
            "human": "The resource-note extension is not used on a resource that has a native `note` element -- that element is the home",
            "expression": "extension('https://fhir.apps.health/StructureDefinition/nexus-emr-resource-note').empty()",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-sugg-1",
            "severity": "error",
            "human": "A `suggested-resource` input SHALL reference a CONTAINED resource (a local #id reference). A suggested resource is never a first-class chart resource before someone accepts it.",
            "expression": "input.where(type.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-task-input-type' and code = 'suggested-resource').exists()).all(value.reference.startsWith('#'))",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-sugg-2",
            "severity": "error",
            "human": "A `suggested-resource` input SHALL resolve to a Bundle contained in this Task. The suggested resources are that Bundle's entries.",
            "expression": "input.where(type.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-task-input-type' and code = 'suggested-resource').exists()).all(value.reference.substring(1) in %resource.contained.where($this is Bundle).id)",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-sugg-3",
            "severity": "error",
            "human": "A contained prototype Bundle SHALL be type `transaction`: instantiating it writes its entries, and `entry.request` is what says how each one is written.",
            "expression": "contained.where($this is Bundle).all(type = 'transaction')",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-task-focus-not-contained",
            "severity": "error",
            "human": "Task.focus SHALL NOT be a local (#) reference. Focus names a resource that already exists in the chart; contained content is referenced from `input`.",
            "expression": "focus.reference.exists() implies focus.reference.startsWith('#').not()",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-task-priority-detail-1",
            "severity": "error",
            "human": "When the priority-detail extension is present, Task.priority SHALL be `routine`, so a consumer that does not read the extension sorts the task as routine rather than mis-sorting it.",
            "expression": "priority.extension.where(url = 'https://fhir.apps.health/StructureDefinition/nexus-task-priority-detail').exists() implies priority = 'routine'",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          },
          {
            "key": "nexus-task-bizstatus-scope",
            "severity": "error",
            "human": "A correction business status SHALL only appear on a task filed under `privacy-request`. The correction lifecycle is the statutory record of a request to amend a chart; on any other task it is a status nobody can act on and a reader cannot distinguish from ordinary workflow state.",
            "expression": "businessStatus.coding.where(system = 'http://hl7.org/fhir/uv/patient-corrections/CodeSystem/PatientCorrectionBusinessStatus').exists() implies code.coding.where(system = 'https://fhir.apps.health/CodeSystem/nexus-task-code' and code = 'privacy-request').exists()",
            "source": "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "workflow",
            "map": "Request, Event"
          },
          {
            "identity": "rim",
            "map": "ControlAct[moodCode=INT]"
          }
        ]
      },
      {
        "id": "Task.id",
        "path": "Task.id",
        "short": "Logical id of this artifact",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
        "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Task.meta",
        "path": "Task.meta",
        "short": "Metadata about the resource",
        "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.meta",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Meta"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true
      },
      {
        "id": "Task.implicitRules",
        "path": "Task.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
        "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.implicitRules",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "uri"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
        "isSummary": true
      },
      {
        "id": "Task.language",
        "path": "Task.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Resource.language",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "Language"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            }
          ],
          "strength": "preferred",
          "description": "A human language.",
          "valueSet": "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      {
        "id": "Task.text",
        "path": "Task.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
        "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
        "alias": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.text",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Narrative"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"
          }
        ]
      },
      {
        "id": "Task.contained",
        "path": "Task.contained",
        "short": "The suggested-resource Bundle, plus anything else this task carries in-line",
        "definition": "On a suggested-resource task: a transaction `Bundle` holding the suggested resources as its entries,\nreferenced from the `suggestion` input. That containment is what MAKES the task a suggested-resource\ntask -- neither `Task.code` nor `Task.intent` says it.\n\nThe `Provenance` carrying the suggestion's citations is an ENTRY IN THAT BUNDLE, not a sibling of\nit: a `urn:uuid` resolves only inside its own Bundle, so a Provenance beside the Bundle pointing at\nan entry within it is a dangling reference. Being an entry also means the citations are written on\nacceptance, which is the outcome AI attribution requires -- an accepted chart entry with no trail\nback to the passage it came from is the thing those rules exist to prevent.\n\nAnything else the task carries in-line -- an attachment born with it, having no independent\nexistence in the chart -- is contained beside the Bundle. There is no ambiguity about which\nresources are suggested, because those are the Bundle's entries.\n\nThe prototypes inside it are fully typed resources that state the clinical fact their citations\nsupport -- they carry NO pending-review marker of their own. Review state lives on the Task\n(`Task.status` for the decision, `Task.intent` for what is being asked), so a prototype is\ninstantiable as-is rather than needing to be edited on acceptance. What each entry would DO to the\nchart is `entry.request`: `method` POST to add, PUT to update, with the target on `request.url`.\n\nInstantiating writes the Bundle; declining retains this Task (`status` cancelled, `statusReason`\nsaying a human declined) with the Bundle still contained, as the record of what was refused.",
        "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
        "alias": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.contained",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Resource"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.extension",
        "path": "Task.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.extension:threadId",
        "path": "Task.extension",
        "sliceName": "threadId",
        "short": "Harness thread id (AI-created tasks)",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "SHOULD be present on every harness-created Task. Assigning the Task back to an agent resumes this thread (the approve/resume contract). Never rendered in the UI.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "DomainResource.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-thread-id"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.modifierExtension",
        "path": "Task.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "DomainResource.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.identifier",
        "path": "Task.identifier",
        "short": "Business identifier(s) for the task (any system; machine-written tasks carry their producer's key)",
        "definition": "Business identifier(s) for task tracking and audit. A business identifier is RECOMMENDED but not required, and no specific canonical system is mandated: a task that originates in an external system should carry that system's identifier, while a task created inside the EMR has no external record to name and is tracked by the server-assigned id alone. A task a machine writes on its own behalf SHOULD carry an identifier under its own producer's key namespace -- https://fhir.apps.health/NamingSystem/nexus-harness-key for the AI harness, https://fhir.apps.health/NamingSystem/nexus-cds-key for a decision-support rule -- whose value is derived from the GAP the task addresses rather than from the run that produced it, so that re-running the producing capability updates this task instead of creating a second one. The two namespaces are deliberately separate: a producer searches its key and updates the task it finds, so a shared key space would let one producer's re-run overwrite the other producer's task.",
        "comment": "Readers must tolerate a task with no identifier at all -- that is the ordinary shape of a task created in the chart, not a malformed record. For machine-written tasks the producer's business key is the idempotency contract: a producer searches `Task?identifier={its own key system}|{key}` before writing (`https://fhir.apps.health/NamingSystem/nexus-harness-key|{key}` for the harness, `https://fhir.apps.health/NamingSystem/nexus-cds-key|{key}` for a decision-support rule), updates the task it finds, and resolves that task when the gap it addresses no longer holds. Not sliced here: the element is left open, so adding the key is additive for every existing writer. A source system's own identifier SHOULD be carried alongside this one, flagged `use = secondary`. See [Carrying the raw code](https://fhir.apps.health/guide/patterns/raw-codes.html).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.identifier",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.identifier, Event.identifier"
          },
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "id": "Task.instantiatesCanonical",
        "path": "Task.instantiatesCanonical",
        "short": "Formal definition of task (canonical)",
        "definition": "References to formal protocols, guidelines, or ActivityDefinitions that this task follows.",
        "comment": "MERT requirement for protocol-based task execution.",
        "requirements": "Enables a formal definition of how he task is to be performed, enabling automation.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.instantiatesCanonical",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "canonical",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ActivityDefinition"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.instantiatesCanonical, Event.instantiatesCanonical"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=DEFN].target"
          }
        ]
      },
      {
        "id": "Task.instantiatesUri",
        "path": "Task.instantiatesUri",
        "short": "Formal definition of task (URI)",
        "definition": "URI references to external protocols, guidelines, or specifications.",
        "comment": "MERT requirement for external protocol references.",
        "requirements": "Enables a formal definition of how he task is to be performed (e.g. using BPMN, BPEL, XPDL or other formal notation to be associated with a task), enabling automation.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.instantiatesUri",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "uri"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.instantiatesUrl"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=DEFN].target"
          }
        ]
      },
      {
        "id": "Task.basedOn",
        "path": "Task.basedOn",
        "short": "Request fulfilled by this task (available, not must-support)",
        "definition": "The request, order, or authorization that initiated this task.",
        "comment": "The ORDER this task carries out, and only an order: base R4 leaves this open to any resource, and this profile narrows it to the four request types, so `basedOn` cannot quietly become a second `focus`. Distinct from `focus` (the chart element the task is filed against) and from `encounter` (the visit it arose in). Available and typed, but not must-support -- populate it when a task genuinely fulfills an order, and do not synthesize one to fill the element.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.basedOn",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
              "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
              "http://hl7.org/fhir/StructureDefinition/CarePlan",
              "http://hl7.org/fhir/StructureDefinition/SupplyRequest"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.basedOn, Event.basedOn"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=FLFS].target[moodCode=INT]"
          }
        ]
      },
      {
        "id": "Task.groupIdentifier",
        "path": "Task.groupIdentifier",
        "short": "Shared identifier for tasks raised together (e.g. one decision-support card)",
        "definition": "Identifier shared by every task raised in one batch, so the batch is recoverable as a set. For suggestions produced by a decision-support service, this carries the CARD: all of a card's suggestions become sibling tasks with the same value here. Distinct from `Task.identifier`, which identifies THIS task (and, for machine-written tasks, the gap it addresses under the producing capability's key namespace).",
        "comment": "A DISPLAY GROUPING AND NOTHING ELSE: consumers MUST NOT read this element, or its absence, as a signal of which producer raised a task, because grouping is available to every producer -- a harness capability proposing several chart entries from one note is one evaluation raising a set exactly as a card is. Producer is declared on `requester`. Find the siblings with `Task?group-identifier={system}|{value}`. Grouping is orthogonal to `intent`: siblings are ALTERNATIVES only when they carry `intent = #option`, in which case accepting one normally cancels the rest. Where the group has no natural upstream identifier, any stable value the producer can regenerate will do -- but derive it from what the card is ABOUT, on the same reasoning as the business key, or a re-evaluation produces a new group for the same advice.",
        "requirements": "Billing and/or reporting can be linked to whether multiple requests were created as a single unit.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.groupIdentifier",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.groupIdentifier"
          },
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=COMP].source[moodCode=INT].id"
          }
        ]
      },
      {
        "id": "Task.partOf",
        "path": "Task.partOf",
        "short": "Parent task for sub-tasks and branches",
        "definition": "Reference to parent task when this task is part of a larger workflow or represents a sub-task.",
        "comment": "Supports Nexus EMR workflow branching and task hierarchy.",
        "requirements": "Allows tasks to be broken down into sub-steps (and this division can occur independent of the original task).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.partOf",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-clinical-task"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.partOf"
          },
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=COMP].source[moodCode=INT]"
          }
        ]
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "short": "Where the task is in its lifecycle",
        "definition": "Where this task sits in its lifecycle. THESE ARE MEANINGS, NOT A PATH -- any state may follow any\nother, and the ordinary cases prove it: `ready` straight to `completed` is a normal day's work, and\n`accepted` back to `ready` is handing something back. What each code means is the specification;\nthe order is not.\n\n- `draft` -- being composed. In nobody's list yet, and nobody is expected to act on it.\n- `ready` -- actionable and in its owner's list. Where the owner is a CareTeam, it is in the\n  team's pool and nobody has claimed it. Where there is no owner at all, it is in EVERY user's\n  list: unassigned work is ready work that has not been narrowed to anyone yet.\n- `accepted` -- claimed by its owner and not yet started. The point of a state between `ready` and\n  `in-progress` is CIRCULATION: claiming a pooled task moves `owner` from the team to the person\n  and takes it out of everyone else's view, which is a real event even though no work has started.\n- `in-progress` -- actively being worked.\n- `on-hold` -- deliberately parked: snoozed, or waiting on something outside this task. Distinct\n  from `ready` because a parked task should not read as awaiting action.\n- `completed` -- the work was done.\n- `cancelled` -- the work will not be done. This covers BOTH a proposal a human declined and a\n  proposal that became moot (its alternative was approved, or the gap closed on its own), which is\n  why `Task.statusReason` matters here more than anywhere else on this profile.",
        "comment": "The binding is a REQUIRED subset of R4 TaskStatus, not the base value set: `requested` (a second name for `ready`), `received`, `rejected`, `failed` and `entered-in-error` are excluded, each for a reason given on the value set. The one worth knowing is `rejected`: a declined proposal is `cancelled`, so declining something and it becoming moot no longer live in different states. `Task.statusReason` carries which of the two happened and SHOULD be populated whenever a proposal is cancelled -- without it the record cannot say whether a clinician considered this and said no.",
        "requirements": "These states enable coordination of task status with off-the-shelf workflow solutions that support automation of tasks.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.status",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": true,
        "isModifierReason": "This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
        "isSummary": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.apps.health/ValueSet/nexus-task-statuses"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.status, Event.status"
          },
          {
            "identity": "w5",
            "map": "FiveWs.status"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          }
        ]
      },
      {
        "id": "Task.statusReason",
        "path": "Task.statusReason",
        "short": "Reason for current status",
        "definition": "Captures why the task is in its current state, particularly for cancelled or failed states.",
        "comment": "Load-bearing on a CANCELLED PROPOSAL and close to required there in practice. `cancelled` carries two facts that used to be separate states: a human considered this and declined it, and this stopped being on offer (its alternative was approved, the care gap closed on its own). Those are different clinical records and only this element can now tell them apart, so a writer cancelling a proposal without a reason destroys information the model can no longer recover.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.statusReason",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskStatusReason"
            }
          ],
          "strength": "example",
          "description": "Codes to identify the reason for current status.  These will typically be specific to a particular workflow."
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN, code=\"status change\"].reasonCode"
          }
        ]
      },
      {
        "id": "Task.businessStatus",
        "path": "Task.businessStatus",
        "short": "Where the correction request has got to",
        "definition": "The correction lifecycle from HL7's Patient Request for Corrections guide: queued, in-review, waiting-for-information, requester-cancelled, accepted, partial-accept, amendment-completed, denied, disagreement-logged, completed. `completed` does NOT mean the work is over. HL7 defines it as the state where a disagreement has been logged AND a formal rebuttal provided; a request that was accepted and amended ends at `amendment-completed`, and one refused without a rebuttal ends at `disagreement-logged`. Do not reach for it because a task is finished.",
        "comment": "REQUIRED here, and required on this profile rather than optional as it is on the base: a correction request always has a position in its lifecycle, and an absent one is indistinguishable from a request nobody has looked at. `denied` is the load-bearing value -- it is the refusal that entitles the requester to file a statement of disagreement, and the Statement of Disagreement profile's `partOf` points back at the task that reached it. A refusal is a task whose `status` is `completed` and whose `businessStatus` is `denied`: `failed` would say the system broke, which loses the only fact the statute cares about. The vocabulary is HL7's rather than this guide's on purpose -- the concepts are not local, and a reader outside this estate should not need our value set to understand the outcome.",
        "requirements": "There's often a need to track substates of a task - this is often variable by specific workflow implementation.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.businessStatus",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.apps.health/ValueSet/nexus-correction-business-status"
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=SUBJ].source[classCode=OBS, moodCode=EVN, code=\"business status\"]"
          }
        ]
      },
      {
        "id": "Task.intent",
        "path": "Task.intent",
        "short": "order (do this) | proposal (consider this) | option (one of these)",
        "definition": "What the owner is being asked to do with this task. Independent of whether the task carries a\nsuggestion.\n\n  * `order` -- the work is authorized and assigned; the owner is expected to DO it. Inbox items,\n    follow-ups and to-dos are orders, and a user sees them in a Tasks list. A suggested-resource\n    task MAY be an order, where the suggested entry is already authorized and the task exists to\n    get it recorded rather than decided.\n  * `proposal` -- something is being offered and takes effect only if the owner APPROVES it, which\n    flips this element to `order`, one-way. A user sees proposals in a Suggestions list rather\n    than a Tasks list, and that list membership is the whole practical meaning of this code. A\n    machine-extracted chart entry pending review is the usual case: the requester (a non-human\n    agent) has no authority to commit it.\n  * `option` -- this task is ONE OF A SET of alternatives, grouped by a shared `groupIdentifier`.\n    Accepting one moots the others, which are then cancelled rather than rejected. A\n    decision-support card offering three ways to close the same gap raises three tasks at\n    `option`, not three independent proposals.",
        "comment": "A consumer branching on 'is this mine to do, or mine to decide?' reads `intent`, and a UI splitting a Suggestions list from a Tasks list is reading exactly this element. A consumer asking 'does this carry a suggested chart entry?' must NOT read it: read the contained Bundle, because an `#order` carrying a suggested resource is a real and ordinary shape. APPROVING a proposal sets this element to `order` and is one-way; it moves the task between lists and writes nothing to the chart. That is a different act from ACCEPTING the task (`Task.status`) and from INSTANTIATING its contained graph -- see the suggested-resource section for all three.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.intent",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.apps.health/ValueSet/nexus-emr-task-intent"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.intent"
          },
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "rim",
            "map": ".moodCode"
          }
        ]
      },
      {
        "id": "Task.priority",
        "path": "Task.priority",
        "short": "How urgent the task is",
        "definition": "Clinical priority level for workflow triage and routing.",
        "comment": "Used for inbox sorting and urgent task highlighting in UI. `routine` is the FLOOR of this vocabulary and the binding cannot be widened -- base R4 binds it REQUIRED, a profile may only strengthen a binding, and the element is a bare `code` with no second coding slot even if it could. A priority below routine therefore rides the `priorityDetail` extension below, under a rule that makes it safe to ignore.",
        "requirements": "Used to identify the service level expected while performing a task.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.priority",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "code"
          }
        ],
        "meaningWhenMissing": "If missing, this task should be performed with normal priority",
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/request-priority"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.priority"
          },
          {
            "identity": "w5",
            "map": "FiveWs.grade"
          },
          {
            "identity": "rim",
            "map": ".priorityCode"
          }
        ]
      },
      {
        "id": "Task.priority.id",
        "path": "Task.priority.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references)",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Task.priority.extension",
        "path": "Task.priority.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Task.priority.extension:priorityDetail",
        "path": "Task.priority.extension",
        "sliceName": "priorityDetail",
        "short": "A refinement finer than request-priority allows (currently: trivial)",
        "definition": "May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "When present, `Task.priority` SHALL be `routine` (nexus-task-priority-detail-1). A consumer that does not read this extension therefore sees `routine`, the nearest true statement in the base vocabulary, and under-states the task rather than mis-sorting it.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.apps.health/StructureDefinition/nexus-task-priority-detail"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Task.priority.value",
        "path": "Task.priority.value",
        "representation": [
          "xmlAttr"
        ],
        "short": "Primitive value for code",
        "definition": "Primitive value for code",
        "min": 0,
        "max": "1",
        "base": {
          "path": "string.value",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              },
              {
                "url": "http://hl7.org/fhir/StructureDefinition/regex",
                "valueString": "[^\\s]+(\\s[^\\s]+)*"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "short": "Always `privacy-request`",
        "definition": "The category this task is filed under, so a view can sort tasks into bins. The vocabulary is expected to grow. The element is OPTIONAL -- most tasks in the chart predate this vocabulary and carry none, and readers must tolerate its absence rather than treat it as malformed. Extensible: a deployment whose category has no concept in the bound value set stays conformant under its own system.",
        "comment": "Fixed, and required where the base profile leaves `code` optional. This is the worklist bin for work arising from someone exercising a right over their own record -- access, correction, or a disagreement to be logged where a correction was refused. It is NAMED FOR THE RIGHT, NOT THE OUTCOME: which of the three this task is, and where it has got to, are read off `businessStatus` and off the optional second `code` coding from the international correction task-type system. THE BIN IS WIDER THAN THIS PROFILE. It also carries access requests, which this profile does not cover, so `code = privacy-request` is not on its own a statement that a task conforms here -- a consumer that needs the correction shape reads `meta.profile`, or reads the correction vocabulary off `businessStatus`.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.code",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "privacy-request",
              "system": "https://fhir.apps.health/CodeSystem/nexus-task-code"
            }
          ]
        },
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.apps.health/ValueSet/nexus-task-codes"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.code, Event.code"
          },
          {
            "identity": "w5",
            "map": "FiveWs.what[x]"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "id": "Task.description",
        "path": "Task.description",
        "short": "The ask: original task content, stable throughout lifecycle",
        "definition": "Canonical task description that provides the core content and remains stable throughout the task lifecycle.\n\nThis is the ASK -- the statement of what is wanted and why the task exists. The turns that follow it\nlive in `note`, and a writer should NOT duplicate this text into `note[0]`: that puts the same\nstatement in two places and opens the conversation with something nobody said.\n\nMay include structured forms (lab requisition, referral, etc.) and supports Markdown formatting for rich content.",
        "comment": "Nexus EMR requires description (1..1) vs MERT optional (0..1) to prevent ambiguous work items. It is also what makes `note` optional: the ask is carried here, so a task with no conversation on it yet is complete rather than malformed.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.description",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "string"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "id": "Task.focus",
        "path": "Task.focus",
        "short": "The chart element this task is about (form, inbox document, note, ...)",
        "definition": "The patient-chart element this task concerns: the form that was completed, the document that\narrived, the note that needs signing, the problem being followed up.\n\nForms and inbox documents are NOT stored inside the task. A completed form is a\n`QuestionnaireResponse`, an arriving document is a `DocumentReference`, an authored note is a\n`Composition`, and the task points at it. One copy, in the chart, readable by consumers that\nknow nothing about task workflow.\n\n**`focus` does NOT say what a suggested-resource task would write.** An earlier revision of this profile made it\nthe add-versus-update marker -- `focus` absent meant add, `focus` present meant update. That broke\non the first suggested-resource task that wanted to do both, because `focus` is 0..1. What each suggested resource\nwould do to the chart is now `entry.request` inside the contained prototype Bundle: `method` POST\nto create, PUT to update, with the target on `request.url`, stated once per entry.\n\nSo `focus` on a suggested-resource task means what it means everywhere else on this profile: the\nchart element the task is filed against. A suggested change to a medication may well name that\nmedication here, because that is what the task is about -- but it is `entry.request` that makes it\nan update, and a reader must not infer one from the other.\n\nRetiring an entry is the same shape: there is no delete in this chart, so a suggestion to withdraw\na resource is an update whose payload carries the entered-in-error status its own resource type\ndefines. `focus` names the target, the payload states the end state, and nothing here needs a\nvocabulary of actions.",
        "comment": "`focus` is what the task is ABOUT; `input` carries what the task NEEDS -- chiefly a contained machine-suggested resource. A reader looking for 'which chart element is this task on' reads `focus` and nothing else. Where a workflow genuinely spans several elements, `focus` names the one the task is filed against and the rest ride in `input`. ALWAYS A RESOURCE THAT ALREADY EXISTS IN THE CHART: never a contained resource, never a local `#` reference, enforced by nexus-task-focus-not-contained. On a suggested-resource task it does NOT say whether a suggested resource is created or updated -- that is `entry.request.method` inside the contained Bundle, stated per suggested resource, so one task can do both.",
        "requirements": "Used to identify the thing to be done.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.focus",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-questionnaireresponse",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-documentreference",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-composition",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-condition",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-diagnosticreport",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-servicerequest",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-medicationrequest",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-observation",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-allergyintolerance"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.what[x]"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=SUBJ].target"
          }
        ]
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "short": "Patient this task is about, when it is about one",
        "definition": "The patient this task concerns. Patient context is STRONGLY RECOMMENDED and is always set for a task created from a patient chart, because a clinical task whose patient link is missing is a safety problem. It is not required, because the profile also carries standalone work items -- administrative or practice-level to-dos -- that are about no patient at all.",
        "comment": "When present the reference must be a NexusEmrCorePatient. Readers must tolerate its absence and treat a patient-less task as a standalone work item, not a malformed record; a surface that assumes `for` is populated will drop those tasks or fault on them. Never infer the patient from `focus` -- `focus` is the chart element the task is filed against, and a task can carry one without the other.",
        "requirements": "Used to track tasks outstanding for a beneficiary.  Do not use to track the task owner or creator (see owner and creator respectively).  This can also affect access control.",
        "alias": [
          "Patient"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.for",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-patient"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.subject, Event.subject"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject[x]"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=RCT].role"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject"
          }
        ]
      },
      {
        "id": "Task.encounter",
        "path": "Task.encounter",
        "short": "Healthcare encounter during which task was created",
        "definition": "Links the task to the specific clinical encounter that generated it.",
        "comment": "Provides clinical context for task creation and helps with documentation workflow.",
        "requirements": "For some tasks it may be important to know the link between the encounter the task originated within.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.encounter",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-encounter"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.context, Event.context"
          },
          {
            "identity": "w5",
            "map": "FiveWs.context"
          },
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=COMP].source[classCode=PCPR, moodCode=EVN]"
          }
        ]
      },
      {
        "id": "Task.executionPeriod",
        "path": "Task.executionPeriod",
        "short": "Start and end time of execution",
        "definition": "Expected or actual time period during which the task is to be or was executed.",
        "comment": "MERT requirement for task timing management.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.executionPeriod",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Period"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.occurrence[x]"
          },
          {
            "identity": "w5",
            "map": "FiveWs.done[x]"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime"
          }
        ]
      },
      {
        "id": "Task.authoredOn",
        "path": "Task.authoredOn",
        "short": "When task was first created",
        "definition": "Timestamp when the task was initially created for complete audit trail.",
        "comment": "Nexus EMR requires creation timestamp (1..1) vs MERT optional (0..1) for audit compliance.",
        "requirements": "Most often used along with lastUpdated to track duration of task to supporting monitoring and management.",
        "alias": [
          "Created Date"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.authoredOn",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "condition": [
          "inv-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.authoredOn"
          },
          {
            "identity": "w5",
            "map": "FiveWs.recorded"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=AUT].time"
          }
        ]
      },
      {
        "id": "Task.lastModified",
        "path": "Task.lastModified",
        "short": "Task last modified date",
        "definition": "Most recent timestamp when the task was modified.",
        "comment": "MERT requirement for modification tracking.",
        "requirements": "Used along with history to track task activity and time in a particular task state.  This enables monitoring and management.",
        "alias": [
          "Update Date"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.lastModified",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "condition": [
          "inv-1"
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=SUBJ, ].source[classCode=CACT, moodCode=EVN].effectiveTime"
          }
        ]
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "short": "Who originally requested this task (person, AI graph, or decision-support rule)",
        "definition": "The person or agent that initiated this task. THIS IS WHERE THE PRODUCER OF A MACHINE-WRITTEN TASK IS DECLARED, and a consumer telling producers apart reads this element and nothing else. Machine-created tasks (e.g. suggestions) use a LOGICAL Device reference: Reference.type = \"Device\" and Reference.identifier under the producing registry's namespace -- https://fhir.apps.health/NamingSystem/nexus-harness-graph naming the AI-harness graph, or https://fhir.apps.health/NamingSystem/nexus-cds-rule naming the decision-support rule. Two namespaces because two separately owned registries mint these values and either could mint the same string. The identifier need not resolve to a Device resource on the server -- it points into the producing registry. Granularity is the graph or rule (a name a clinician or auditor can recognize); per-agent trace stays with the producer.",
        "comment": "Nexus EMR requires requester (1..1) vs MERT optional (0..1) for clear accountability chain. Reference.display SHOULD carry the human-readable name. Ask \"was the requester a machine\" with `Reference.type = \"Device\"` and \"was this content machine-produced\" with the AIAST security label; read `identifier.system` only for WHICH KIND of producer, and expect the list of producing registries to grow. Do NOT infer the producer from `intent` (humans raise proposals) or from `groupIdentifier` (grouping is available to every producer).",
        "requirements": "Identifies who created this task.  May be used by access control mechanisms (e.g., to ensure that only the creator can cancel a task).",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.requester",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-practitionerrole",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-practitioner",
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.requester"
          },
          {
            "identity": "w5",
            "map": "FiveWs.author"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=AUT].role"
          }
        ]
      },
      {
        "id": "Task.performerType",
        "path": "Task.performerType",
        "short": "Requested performer type",
        "definition": "The type of performer (person, device, organization) required to complete the task.",
        "comment": "MERT requirement for specifying required performer characteristics.",
        "requirements": "Use to distinguish tasks on different activity queues.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.performerType",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskPerformerType"
            }
          ],
          "strength": "preferred",
          "description": "The type(s) of task performers allowed.",
          "valueSet": "http://hl7.org/fhir/ValueSet/performer-role"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.performer.role, Request.performerType"
          },
          {
            "identity": "w5",
            "map": "FiveWs.actor"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=PRF].role.code"
          }
        ]
      },
      {
        "id": "Task.owner",
        "path": "Task.owner",
        "short": "Who holds this task now; absent means the whole clinic holds it",
        "definition": "Who is responsible for the next action on this task.\n\nABSENT -- responsibility has NOT been narrowed: the task belongs to every user in the clinic.\nUnassigned work is collective work, not unowned work, and a consumer MUST surface it in every\nuser's default inbox view (see the element comment). This is the ordinary state of work that has\narrived and not yet been triaged, including work written by an external system that names no owner.\n\nPRESENT -- responsibility is narrowed to exactly one party:\n\n- An individual practitioner (the ordinary case)\n- A practitioner role, when the capacity is what matters rather than the individual\n  (the on-call physician, the nurse covering a clinic)\n- A CareTeam for group assignment - the sanctioned mechanism for pool/work-stream\n  ownership (e.g., a nursing pool): the team as a whole holds the work until a\n  member claims or completes the task. `groupIdentifier` remains available to name the\n  batch or work stream a task belongs to; it is not the ownership mechanism.\n- Machine actors as first-class owners: a LOGICAL Device reference (Reference.identifier\n  under the producing registry's namespace -- https://fhir.apps.health/NamingSystem/nexus-harness-graph\n  naming a harness graph, or https://fhir.apps.health/NamingSystem/nexus-cds-rule naming a\n  decision-support rule -- with Reference.type = \"Device\"; the identifier need not resolve\n  to a Device resource on the server). Assigning a Task to a HARNESS GRAPH is additionally\n  the approve/resume contract: the harness watches for task-assignment changes and resumes\n  (or starts) the thread named by the thread-id extension. That contract is the harness's\n  own; assigning a task to a rule carries no such undertaking.\n\nAn absent owner is the ONLY representation of unassigned. A sentinel owner -- a per-tenant\n\"unassigned\" CareTeam, or an Organization standing for the practice -- is a second spelling of one\nstate, reads as narrowed to any consumer testing whether the element is populated, and must not be\nwritten.\n\nNOT SETTLED (1.26.0): whether an absent owner is permitted at all is still open, and this element\nmay change in a future release. The competing position is that every task names an owner when it is\nwritten, with a configured default owner where the producer has nobody to name. It is scheduled to\nbe settled after the September 2026 demo. A producer that always sets owner conforms under either\noutcome; a consumer must handle an absent owner today.",
        "comment": "The owner is responsible for the next action on this task. Ownership transfers with each significant action (forward, reply, assign-to-agent, claim-from-pool, etc.). When `owner` is ABSENT, responsibility has not been narrowed and rests with every user in the clinic: a consumer MUST show unassigned tasks in each user's default inbox view rather than behind a filter or a tab the reader must select, and count them wherever outstanding work is counted. That visibility is what makes the un-narrowed state safe; a consumer that hides it has not implemented this element. Assigning a CareTeam narrows responsibility to the team as a unit; accountability remains singular because the reference is still exactly one owner. Note the asymmetry with `note.author`, which CANNOT be a CareTeam or a PractitionerRole -- R4 does not permit either as an `Annotation.author` target, so a task owned by a team still has every turn authored by a person (see the Task Note profile). Reference.display SHOULD carry the human-readable name (person, team, or graph). NOT SETTLED (1.26.0): whether an absent owner is permitted at all is under review and may change in a future release -- see the element definition.",
        "requirements": "Identifies who is expected to perform this task.",
        "alias": [
          "Performer",
          "Executer"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.owner",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-practitionerrole",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-practitioner",
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-careteam",
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.performer.actor, Request.performer"
          },
          {
            "identity": "w5",
            "map": "FiveWs.actor"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=PRF].role"
          }
        ]
      },
      {
        "id": "Task.location",
        "path": "Task.location",
        "short": "Where task should be performed",
        "definition": "Principal physical location where the task is to be performed.",
        "comment": "MERT requirement for task location specification.",
        "requirements": "Ties the event to where the records are likely kept and provides context around the event occurrence (e.g. if it occurred inside or outside a dedicated healthcare setting).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.location",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-core-location"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.reasonCode, Event.reasonCode"
          },
          {
            "identity": "w5",
            "map": "FiveWs.where[x]"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=LOC].role"
          }
        ]
      },
      {
        "id": "Task.reasonCode",
        "path": "Task.reasonCode",
        "short": "Why task is needed (coded)",
        "definition": "Coded indication of why the task was created.",
        "comment": "MERT requirement for coded task rationale. Where this code was mapped from a source system's own vocabulary, carry the raw coding alongside the mapped one, flagged `userSelected = true`. See [Carrying the raw code](https://fhir.apps.health/guide/patterns/raw-codes.html).",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.reasonCode",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskReason"
            }
          ],
          "strength": "example",
          "description": "Indicates why the task is needed.  E.g. Suspended because patient admitted to hospital."
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.location"
          },
          {
            "identity": "w5",
            "map": "FiveWs.why[x]"
          },
          {
            "identity": "v2",
            "map": "EVN.7"
          },
          {
            "identity": "rim",
            "map": ".reasonCode"
          }
        ]
      },
      {
        "id": "Task.reasonReference",
        "path": "Task.reasonReference",
        "short": "Clinical reason for this task (available, not must-support)",
        "definition": "Reference to the clinical finding that justifies the task -- the condition being followed up, the abnormal result being chased, the document being actioned.",
        "comment": "Why the task exists, pointing at a clinical resource; `reasonCode` carries the same fact as a code. Not the same as `focus`, which is the chart element the task is filed AGAINST: a task to review an abnormal potassium has that DiagnosticReport as its `focus`, and the Condition it relates to (if any) as its `reasonReference`. Never the Patient -- every task is about the patient, so that says nothing.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.reasonReference",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Condition",
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
              "http://hl7.org/fhir/StructureDefinition/DocumentReference"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.reasonReference, Event.reasonReference"
          },
          {
            "identity": "w5",
            "map": "FiveWs.why[x]"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=RSON].target"
          }
        ]
      },
      {
        "id": "Task.insurance",
        "path": "Task.insurance",
        "short": "Associated insurance coverage",
        "definition": "Insurance coverage that is relevant to the performance of this task.",
        "comment": "MERT requirement for insurance context.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.insurance",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Coverage"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.insurance"
          },
          {
            "identity": "v2",
            "map": "IN1/IN2"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=COVBY].target"
          }
        ]
      },
      {
        "id": "Task.note",
        "path": "Task.note",
        "short": "The conversation on this task, oldest first; the ask itself is `description`",
        "definition": "The conversation on this task, oldest first, and one of the reasons this profile exists.\n\nWhat is being asked, and why the task exists, is `description` -- required, stable for the life of\nthe task, and NOT repeated here. `note` is what has been said SINCE: the question that came with a\nforward, the answer that came back, the reason it was put on hold. Both people and AI-harness\ngraphs author turns (see the [Task Note](https://fhir.apps.health/fhir/StructureDefinition-nexus-emr-task-note.html) profile,\nwhich carries the rules for machine authorship).\n\nNo turn is required. A task nobody has commented on yet carries no note at all, which is the\nordinary state of newly created work rather than a malformed record. A writer should NOT copy\n`description` into a turn to fill the thread: that puts the same statement in two places and opens\nthe conversation with something nobody said.\n\nThe thread runs the whole life of the task -- extended at every handoff, still readable when the\ntask is closed and someone asks a year later what happened. A task handed between people is only\nintelligible to the receiver if that exchange travels with it, which is why the turns live on the\ntask rather than in separate resources that would have to be gathered up.\n\nThis is the ONLY conversation mechanism on a task. `Communication` is not used for task turns.",
        "comment": "Notes are what people SAID; `relevantHistory` is what HAPPENED (Provenance: created, forwarded, completed, by whom). Keep them apart -- the audit trail must not depend on anyone having chosen to comment. The ask is `description`, so a consumer showing \"what is this task\" reads `description` and one showing \"what was said\" reads every note; `note[0]` is the first thing said AFTER the task was created, not the ask itself, and a task may have no notes at all. Turns are typed to the Task Note profile, which requires an author and a time on every turn and defines how an AI-harness graph is named as author (R4 does not permit Device on Annotation.author, and a profile cannot widen it).",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.note",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Annotation",
            "profile": [
              "https://fhir.apps.health/StructureDefinition/nexus-emr-task-note"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.note, Event.note"
          },
          {
            "identity": "rim",
            "map": ".inboundRelationship[typeCode=SUBJ, ].source[classCode=OBS, moodCode=EVN, code=\"annotation\"].value(string)"
          }
        ]
      },
      {
        "id": "Task.relevantHistory",
        "path": "Task.relevantHistory",
        "short": "Key events in history of the Task",
        "definition": "Links to Provenance records for past versions of this Task that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the task.",
        "comment": "This element does not point to the Provenance associated with the *current* version of the resource - as it would be created after this version existed.  The Provenance for the current version can be retrieved with a _revinclude.",
        "alias": [
          "Status History"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.relevantHistory",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Provenance"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Request.relevantHistory"
          },
          {
            "identity": "rim",
            "map": ".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]"
          }
        ]
      },
      {
        "id": "Task.restriction",
        "path": "Task.restriction",
        "short": "Constraints on fulfillment tasks",
        "definition": "Constraints that apply to the fulfillment of the task.",
        "comment": "MERT requirement for task execution constraints. `restriction.period` is where a DUE DATE lives: its end is the time by which the task should be completed, per the base definition, and it is the element an inbox sorts overdue work on. For a `privacy-request` task that due date is the STATUTORY RESPONSE DEADLINE -- an individual's request to access or correct their own record has to be answered within a period set by law, and no privacy-specific element exists or is needed to hold it. Do not write a due date on `executionPeriod`, which means when the work is being or was done: a deadline written there produces a task claiming to have been worked on a date in the future.",
        "requirements": "Sometimes when fulfillment is sought, you don't want full fulfillment.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.restriction",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "Instead of pointing to request, would point to component of request, having these characteristics"
          }
        ]
      },
      {
        "id": "Task.restriction.id",
        "path": "Task.restriction.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.restriction.extension",
        "path": "Task.restriction.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.restriction.modifierExtension",
        "path": "Task.restriction.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.restriction.repetitions",
        "path": "Task.restriction.repetitions",
        "short": "How many times to repeat",
        "definition": "Indicates the number of times the requested action should occur.",
        "requirements": "E.g. order that requests monthly lab tests, fulfillment is sought for 1.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.restriction.repetitions",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "positiveInt"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": ".repeatNumber"
          }
        ]
      },
      {
        "id": "Task.restriction.period",
        "path": "Task.restriction.period",
        "short": "When fulfillment sought",
        "definition": "Over what time-period is fulfillment sought.",
        "comment": "Note that period.high is the due date representing the time by which the task should be completed.",
        "requirements": "E.g. order that authorizes 1 year's services.  Fulfillment is sought for next 3 months.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.restriction.period",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "Period"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": ".effectiveTime(IVL<TS>)"
          }
        ]
      },
      {
        "id": "Task.restriction.recipient",
        "path": "Task.restriction.recipient",
        "short": "For whom is fulfillment sought?",
        "definition": "For requests that are targeted to more than on potential recipient/target, for whom is fulfillment sought?",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.restriction.recipient",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Group",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=SBJ].role"
          }
        ]
      },
      {
        "id": "Task.input",
        "path": "Task.input",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "short": "Resource(s) this task NEEDS in order to be worked",
        "definition": "Reference(s) to what the task needs -- chiefly the contained machine-suggested resource, and any additional chart elements a workflow spans beyond the one it is filed against. NOT the element the task is about: that is `focus`, which is typed. May reference any resource.",
        "comment": "Read `focus` to answer 'which chart element is this task on'; `input` never answers that question on its own. input.type is a human-readable label for now; a controlled chart-element vocabulary may be bound later. Non-reference input parameters are not supported -- use note/description for free text.",
        "requirements": "Resources and data used to perform the task.  This data is used in the business logic of task execution, and is stored separately because it varies between workflows.",
        "alias": [
          "Supporting Information"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.input",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.input.id",
        "path": "Task.input.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.input.extension",
        "path": "Task.input.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.input.modifierExtension",
        "path": "Task.input.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.input.type",
        "path": "Task.input.type",
        "short": "Label for the input",
        "definition": "A code or description indicating how the input is intended to be used as part of the task execution.",
        "comment": "If referencing a BPMN workflow or Protocol, the \"system\" is the URL for the workflow definition and the code is the \"name\" of the required input.",
        "requirements": "Inputs are named to enable task automation to bind data and pass it from one task to the next.",
        "alias": [
          "Name"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.input.type",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskInputParameterType"
            }
          ],
          "strength": "example",
          "description": "Codes to identify types of input parameters.  These will typically be specific to a particular workflow.  E.g. \"Comparison source\", \"Applicable consent\", \"Concomitent Medications\", etc."
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.input.value[x]",
        "path": "Task.input.value[x]",
        "short": "The referenced chart element (any resource)",
        "definition": "The value of the input parameter as a basic type.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.input.value[x]",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.input:suggestion",
        "path": "Task.input",
        "sliceName": "suggestion",
        "short": "The contained prototype Bundle (local #id reference)",
        "definition": "References the transaction `Bundle` CONTAINED in this Task that holds the suggested resources. The reference SHALL be local (`#id`, enforced by nexus-sugg-1) and SHALL resolve to a Bundle contained in this same Task (nexus-sugg-2). Both are error severity. ONE reference, not one per suggested resource: the Bundle holds them all, as its entries.",
        "comment": "Read `focus` to answer 'which chart element is this task on'; `input` never answers that question on its own. input.type is a human-readable label for now; a controlled chart-element vocabulary may be bound later. Non-reference input parameters are not supported -- use note/description for free text.",
        "requirements": "Resources and data used to perform the task.  This data is used in the business logic of task execution, and is stored separately because it varies between workflows.",
        "alias": [
          "Supporting Information"
        ],
        "min": 0,
        "max": "1",
        "base": {
          "path": "Task.input",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "mustSupport": true,
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.input:suggestion.id",
        "path": "Task.input.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.input:suggestion.extension",
        "path": "Task.input.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.input:suggestion.modifierExtension",
        "path": "Task.input.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.input:suggestion.type",
        "path": "Task.input.type",
        "short": "Label for the input",
        "definition": "A code or description indicating how the input is intended to be used as part of the task execution.",
        "comment": "If referencing a BPMN workflow or Protocol, the \"system\" is the URL for the workflow definition and the code is the \"name\" of the required input.",
        "requirements": "Inputs are named to enable task automation to bind data and pass it from one task to the next.",
        "alias": [
          "Name"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.input.type",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "suggested-resource",
              "system": "https://fhir.apps.health/CodeSystem/nexus-task-input-type"
            }
          ]
        },
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskInputParameterType"
            }
          ],
          "strength": "example",
          "description": "Codes to identify types of input parameters.  These will typically be specific to a particular workflow.  E.g. \"Comparison source\", \"Applicable consent\", \"Concomitent Medications\", etc."
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.input:suggestion.value[x]",
        "path": "Task.input.value[x]",
        "short": "Local reference (#id) to the contained prototype Bundle",
        "definition": "The value of the input parameter as a basic type.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.input.value[x]",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Bundle"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.output",
        "path": "Task.output",
        "short": "Information produced as part of task",
        "definition": "Outputs produced by the Task.",
        "requirements": "Resources and data produced during the execution the task.  This data is generated by the business logic of task execution, and is stored separately because it varies between workflows.",
        "min": 0,
        "max": "*",
        "base": {
          "path": "Task.output",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.output.id",
        "path": "Task.output.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "Unique id for inter-element referencing",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
        "min": 0,
        "max": "1",
        "base": {
          "path": "Element.id",
          "min": 0,
          "max": "1"
        },
        "type": [
          {
            "code": "http://hl7.org/fhirpath/System.String",
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
                "valueUrl": "string"
              }
            ]
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.output.extension",
        "path": "Task.output.extension",
        "short": "Additional content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "Element.extension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Task.output.modifierExtension",
        "path": "Task.output.modifierExtension",
        "short": "Extensions that cannot be ignored even if unrecognized",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
        "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
        "alias": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "base": {
          "path": "BackboneElement.modifierExtension",
          "min": 0,
          "max": "*"
        },
        "type": [
          {
            "code": "Extension"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "ext-1",
            "severity": "error",
            "human": "Must have either extensions or value[x], not both",
            "expression": "extension.exists() != value.exists()",
            "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
            "source": "http://hl7.org/fhir/StructureDefinition/Extension"
          }
        ],
        "isModifier": true,
        "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "id": "Task.output.type",
        "path": "Task.output.type",
        "short": "Label for output",
        "definition": "The name of the Output parameter.",
        "requirements": "Outputs are named to enable task automation to bind data and pass it from one task to the next.",
        "alias": [
          "Name"
        ],
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.output.type",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TaskOutputParameterType"
            }
          ],
          "strength": "example",
          "description": "Codes to identify types of input parameters.  These will typically be specific to a particular workflow.  E.g. \"Identified issues\", \"Preliminary results\", \"Filler order\", \"Final results\", etc."
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      },
      {
        "id": "Task.output.value[x]",
        "path": "Task.output.value[x]",
        "short": "Result of output",
        "definition": "The value of the Output parameter as a basic type.",
        "requirements": "Task outputs can take any form.",
        "min": 1,
        "max": "1",
        "base": {
          "path": "Task.output.value[x]",
          "min": 1,
          "max": "1"
        },
        "type": [
          {
            "code": "base64Binary"
          },
          {
            "code": "boolean"
          },
          {
            "code": "canonical"
          },
          {
            "code": "code"
          },
          {
            "code": "date"
          },
          {
            "code": "dateTime"
          },
          {
            "code": "decimal"
          },
          {
            "code": "id"
          },
          {
            "code": "instant"
          },
          {
            "code": "integer"
          },
          {
            "code": "markdown"
          },
          {
            "code": "oid"
          },
          {
            "code": "positiveInt"
          },
          {
            "code": "string"
          },
          {
            "code": "time"
          },
          {
            "code": "unsignedInt"
          },
          {
            "code": "uri"
          },
          {
            "code": "url"
          },
          {
            "code": "uuid"
          },
          {
            "code": "Address"
          },
          {
            "code": "Age"
          },
          {
            "code": "Annotation"
          },
          {
            "code": "Attachment"
          },
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Coding"
          },
          {
            "code": "ContactPoint"
          },
          {
            "code": "Count"
          },
          {
            "code": "Distance"
          },
          {
            "code": "Duration"
          },
          {
            "code": "HumanName"
          },
          {
            "code": "Identifier"
          },
          {
            "code": "Money"
          },
          {
            "code": "Period"
          },
          {
            "code": "Quantity"
          },
          {
            "code": "Range"
          },
          {
            "code": "Ratio"
          },
          {
            "code": "Reference"
          },
          {
            "code": "SampledData"
          },
          {
            "code": "Signature"
          },
          {
            "code": "Timing"
          },
          {
            "code": "ContactDetail"
          },
          {
            "code": "Contributor"
          },
          {
            "code": "DataRequirement"
          },
          {
            "code": "Expression"
          },
          {
            "code": "ParameterDefinition"
          },
          {
            "code": "RelatedArtifact"
          },
          {
            "code": "TriggerDefinition"
          },
          {
            "code": "UsageContext"
          },
          {
            "code": "Dosage"
          },
          {
            "code": "Meta"
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          }
        ],
        "isModifier": false,
        "isSummary": false,
        "mapping": [
          {
            "identity": "rim",
            "map": "???"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "id": "Task.businessStatus",
        "path": "Task.businessStatus",
        "short": "Where the correction request has got to",
        "definition": "The correction lifecycle from HL7's Patient Request for Corrections guide: queued, in-review, waiting-for-information, requester-cancelled, accepted, partial-accept, amendment-completed, denied, disagreement-logged, completed. `completed` does NOT mean the work is over. HL7 defines it as the state where a disagreement has been logged AND a formal rebuttal provided; a request that was accepted and amended ends at `amendment-completed`, and one refused without a rebuttal ends at `disagreement-logged`. Do not reach for it because a task is finished.",
        "comment": "REQUIRED here, and required on this profile rather than optional as it is on the base: a correction request always has a position in its lifecycle, and an absent one is indistinguishable from a request nobody has looked at. `denied` is the load-bearing value -- it is the refusal that entitles the requester to file a statement of disagreement, and the Statement of Disagreement profile's `partOf` points back at the task that reached it. A refusal is a task whose `status` is `completed` and whose `businessStatus` is `denied`: `failed` would say the system broke, which loses the only fact the statute cares about. The vocabulary is HL7's rather than this guide's on purpose -- the concepts are not local, and a reader outside this estate should not need our value set to understand the outcome.",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.apps.health/ValueSet/nexus-correction-business-status"
        }
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "short": "Always `privacy-request`",
        "comment": "Fixed, and required where the base profile leaves `code` optional. This is the worklist bin for work arising from someone exercising a right over their own record -- access, correction, or a disagreement to be logged where a correction was refused. It is NAMED FOR THE RIGHT, NOT THE OUTCOME: which of the three this task is, and where it has got to, are read off `businessStatus` and off the optional second `code` coding from the international correction task-type system. THE BIN IS WIDER THAN THIS PROFILE. It also carries access requests, which this profile does not cover, so `code = privacy-request` is not on its own a statement that a task conforms here -- a consumer that needs the correction shape reads `meta.profile`, or reads the correction vocabulary off `businessStatus`.",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "privacy-request",
              "system": "https://fhir.apps.health/CodeSystem/nexus-task-code"
            }
          ]
        }
      }
    ]
  }
}
