{
  "resourceType": "StructureDefinition",
  "id": "EReferralTask",
  "url": "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/StructureDefinition/EReferralTask",
  "version": "1.0.0",
  "name": "EReferralTask",
  "status": "draft",
  "date": "2024-04-10T18:52:20.5847923+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task.meta",
        "path": "Task.meta",
        "mustSupport": true
      },
      {
        "id": "Task.meta.source",
        "path": "Task.meta.source",
        "mustSupport": false
      },
      {
        "id": "Task.meta.profile",
        "path": "Task.meta.profile",
        "comment": "Profils à laquelle cette ressource se conforme : https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/StructureDefinition/EReferralTask|1.0.0\r\n\r\n\r\nIt is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.basedOn",
        "path": "Task.basedOn",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/StructureDefinition/EReferralServiceRequest"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.basedOn.reference",
        "path": "Task.basedOn.reference",
        "mustSupport": true
      },
      {
        "id": "Task.basedOn.identifier",
        "path": "Task.basedOn.identifier",
        "mustSupport": true
      },
      {
        "id": "Task.basedOn.identifier.system",
        "path": "Task.basedOn.identifier.system",
        "mustSupport": true
      },
      {
        "id": "Task.basedOn.identifier.value",
        "path": "Task.basedOn.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size\r\n\r\nPour un changement de statut d'une demande de service il est nécessaire de mettre la valeur de \"requested\"",
        "mustSupport": true
      },
      {
        "id": "Task.intent",
        "path": "Task.intent",
        "comment": "** eReferral QC **\r\nPour les fins de mise à jour des Demandes de Service utiliser le code \"instance-order\"\r\n\r\nThis element is immutable.  Proposed tasks, planned tasks, etc. must be distinct instances.\n\nIn most cases, Tasks will have an intent of \"order\".",
        "mustSupport": true
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.code.coding",
        "path": "Task.code.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "Codes to identify what the task involves.  These will typically be specific to a particular workflow.",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/ValueSet/TachesAPSS"
        }
      },
      {
        "id": "Task.code.coding.system",
        "path": "Task.code.coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.code.coding.code",
        "path": "Task.code.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.code.coding.display",
        "path": "Task.code.coding.display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.code.text",
        "path": "Task.code.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.authoredOn",
        "path": "Task.authoredOn",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/StructureDefinition/EReferralPractitionerRole"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.note",
        "path": "Task.note",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "author"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "Task.note:DureeDeNonDisponibilite",
        "path": "Task.note",
        "sliceName": "DureeDeNonDisponibilite",
        "max": "1"
      },
      {
        "id": "Task.note:DureeDeNonDisponibilite.author[x]",
        "path": "Task.note.author[x]",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ],
        "fixedString": "DureeDeNonDisponibilite"
      },
      {
        "id": "Task.note:AutresNotes",
        "path": "Task.note",
        "sliceName": "AutresNotes"
      },
      {
        "id": "Task.note:AutresNotes.author[x]",
        "path": "Task.note.author[x]",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ],
        "fixedString": "AutresNotes"
      },
      {
        "id": "Task.input",
        "path": "Task.input",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.text"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus",
        "path": "Task.input",
        "sliceName": "ServiceRequestStatus",
        "max": "1"
      },
      {
        "id": "Task.input:ServiceRequestStatus.type",
        "path": "Task.input.type",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.type.text",
        "path": "Task.input.type.text",
        "min": 1,
        "fixedString": "ServiceRequestStatus",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x]",
        "path": "Task.input.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x].coding",
        "path": "Task.input.value[x].coding",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/Apss/ValueSet/StatutApss"
        }
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x].coding.system",
        "path": "Task.input.value[x].coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x].coding.code",
        "path": "Task.input.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x].coding.display",
        "path": "Task.input.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestStatus.value[x].text",
        "path": "Task.input.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus",
        "path": "Task.input",
        "sliceName": "ServiceRequestSubStatus",
        "max": "1"
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.type",
        "path": "Task.input.type",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.type.text",
        "path": "Task.input.type.text",
        "min": 1,
        "fixedString": "ServiceRequestSubStatus",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x]",
        "path": "Task.input.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x].coding",
        "path": "Task.input.value[x].coding",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/Apss/ValueSet/SousStatutApss"
        }
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x].coding.system",
        "path": "Task.input.value[x].coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x].coding.code",
        "path": "Task.input.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x].coding.display",
        "path": "Task.input.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestSubStatus.value[x].text",
        "path": "Task.input.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority",
        "path": "Task.input",
        "sliceName": "ServiceRequestPriority",
        "max": "1"
      },
      {
        "id": "Task.input:ServiceRequestPriority.type",
        "path": "Task.input.type",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.type.text",
        "path": "Task.input.type.text",
        "min": 1,
        "fixedString": "ServiceRequestPriority",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x]",
        "path": "Task.input.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x].coding",
        "path": "Task.input.value[x].coding",
        "binding": {
          "strength": "extensible",
          "description": "Priorité clinique de la demande de service",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/ValueSet/ClinicalPriorities"
        }
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x].coding.system",
        "path": "Task.input.value[x].coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x].coding.code",
        "path": "Task.input.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x].coding.display",
        "path": "Task.input.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestPriority.value[x].text",
        "path": "Task.input.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS",
        "path": "Task.input",
        "sliceName": "ServiceRequestTargetCRDS",
        "max": "1"
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.type",
        "path": "Task.input.type",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.type.text",
        "path": "Task.input.type.text",
        "min": 1,
        "fixedString": "ServiceRequestTargetCRDS",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x]",
        "path": "Task.input.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x].coding",
        "path": "Task.input.value[x].coding",
        "binding": {
          "strength": "extensible",
          "description": "Centres de répartition de demandes de services du Québec",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/ValueSet/CRDSList"
        }
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x].coding.system",
        "path": "Task.input.value[x].coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x].coding.code",
        "path": "Task.input.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x].coding.display",
        "path": "Task.input.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestTargetCRDS.value[x].text",
        "path": "Task.input.value[x].text",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget",
        "path": "Task.input",
        "sliceName": "ServiceRequestRedirectionTarget",
        "max": "1"
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.type",
        "path": "Task.input.type",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.type.text",
        "path": "Task.input.type.text",
        "min": 1,
        "fixedString": "ServiceRequestRedirectionTarget",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x]",
        "path": "Task.input.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x].coding",
        "path": "Task.input.value[x].coding",
        "binding": {
          "strength": "extensible",
          "description": "Cibles de redirection",
          "valueSet": "https://extranet.ti.msss.rtss.qc.ca/FHIR/eReferral/ValueSet/RedirectionTarget"
        }
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x].coding.system",
        "path": "Task.input.value[x].coding.system",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x].coding.code",
        "path": "Task.input.value[x].coding.code",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x].coding.display",
        "path": "Task.input.value[x].coding.display",
        "mustSupport": true
      },
      {
        "id": "Task.input:ServiceRequestRedirectionTarget.value[x].text",
        "path": "Task.input.value[x].text",
        "mustSupport": true
      }
    ]
  }
}