{
  "resourceType": "StructureDefinition",
  "id": "CA-eReC-ServiceRequest",
  "url": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ServiceRequest",
  "name": "ServiceRequest",
  "title": "ServiceRequest",
  "status": "draft",
  "description": "ServiceRequest is the main resource used to send all referral related information to the destination system.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.extension",
        "path": "ServiceRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.extension:PatientPresentLocation",
        "path": "ServiceRequest.extension",
        "sliceName": "PatientPresentLocation",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient-Present-Location-EXT"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:DARC",
        "path": "ServiceRequest.extension",
        "sliceName": "DARC",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/DARC-EXT"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:DART",
        "path": "ServiceRequest.extension",
        "sliceName": "DART",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/DART-ext"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:RoutingOptions",
        "path": "ServiceRequest.extension",
        "sliceName": "RoutingOptions",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/Routing-Options-EXT"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:CopiedParticipants",
        "path": "ServiceRequest.extension",
        "sliceName": "CopiedParticipants",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-copied-participants-EXT"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:ServiceProviderPreference",
        "path": "ServiceRequest.extension",
        "sliceName": "ServiceProviderPreference",
        "short": "USE CASE SUPPORT: Systems deployed in Ontario SHALL support",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ext-ServiceProviderPreference"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.identifier.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.identifier.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.basedOn",
        "path": "ServiceRequest.basedOn",
        "short": "𝗨𝗦𝗘 𝗖𝗔𝗦𝗘 𝗦𝗨𝗣𝗣𝗢𝗥𝗧: Systems that support routing/chaining/splitting SHALL support",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.basedOn.reference",
        "path": "ServiceRequest.basedOn.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.basedOn.identifier",
        "path": "ServiceRequest.basedOn.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.basedOn.identifier.system",
        "path": "ServiceRequest.basedOn.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.basedOn.identifier.value",
        "path": "ServiceRequest.basedOn.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.replaces",
        "path": "ServiceRequest.replaces",
        "short": "𝗨𝗦𝗘 𝗖𝗔𝗦𝗘 𝗦𝗨𝗣𝗣𝗢𝗥𝗧: Systems that support routing/chaining/splitting SHALL support",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.replaces.reference",
        "path": "ServiceRequest.replaces.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.replaces.identifier",
        "path": "ServiceRequest.replaces.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.replaces.identifier.system",
        "path": "ServiceRequest.replaces.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.replaces.identifier.value",
        "path": "ServiceRequest.replaces.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requisition",
        "path": "ServiceRequest.requisition",
        "short": "𝗨𝗦𝗘 𝗖𝗔𝗦𝗘 𝗦𝗨𝗣𝗣𝗢𝗥𝗧: Systems that support routing/chaining/splitting SHALL support"
      },
      {
        "id": "ServiceRequest.requisition.system",
        "path": "ServiceRequest.requisition.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requisition.value",
        "path": "ServiceRequest.requisition.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/request-status"
        }
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "fixedCode": "proposal",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://fhir.infoway-inforoute.ca/ValueSet/interventioncodesubsetcare"
        },
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "short": "Note that the meaning of this field is to be used in conjunction with ServiceRequest.performer pointing to a HealthCareservice, and .code further specifies the service, for example code could be a specific procedure under the specificed HealthcareService (e.g., HealthcareService = Orthopaedic Surgeon, code=Knee Surgery)",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://fhir.infoway-inforoute.ca/ValueSet/interventioncodesubsetcare"
        }
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.reference",
        "path": "ServiceRequest.subject.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier",
        "path": "ServiceRequest.subject.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier.system",
        "path": "ServiceRequest.subject.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier.value",
        "path": "ServiceRequest.subject.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester.extension",
        "path": "ServiceRequest.requester.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.requester.extension:ServiceRequesterDelegate",
        "path": "ServiceRequest.requester.extension",
        "sliceName": "ServiceRequesterDelegate",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ext-ServiceRequesterDelegate"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.requester.reference",
        "path": "ServiceRequest.requester.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester.identifier",
        "path": "ServiceRequest.requester.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester.identifier.system",
        "path": "ServiceRequest.requester.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.requester.identifier.value",
        "path": "ServiceRequest.requester.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-HealthcareService"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer.extension",
        "path": "ServiceRequest.performer.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.performer.extension:PerformerIdentifier",
        "path": "ServiceRequest.performer.extension",
        "sliceName": "PerformerIdentifier",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-performer-identifier-EXT"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer.reference",
        "path": "ServiceRequest.performer.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer.identifier",
        "path": "ServiceRequest.performer.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer.identifier.system",
        "path": "ServiceRequest.performer.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer.identifier.value",
        "path": "ServiceRequest.performer.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ServiceRequestReason"
            }
          ],
          "strength": "preferred",
          "description": "Diagnosis or problem codes justifying the reason for requesting the service investigation.",
          "valueSet": "http://hl7.org/fhir/ValueSet/procedure-reason"
        }
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "definition": "Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations.  In laboratory ordering these are typically referred to as \"ask at order entry questions (AOEs)\".  This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example,  reporting the amount of inspired oxygen for blood gas measurements.",
        "comment": "To represent information about how the services are to be delivered use the `instructions` element. This element can be used to provide a Patient Summary as well.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Resource",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-DocumentReference",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Communication",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-QuestionnaireResponse",
              "http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/condition-ca-ps",
              "http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/allergyintolerance-ca-ps"
            ],
            "_targetProfile": [
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": false
                  }
                ]
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": true
                  }
                ]
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": true
                  }
                ]
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": true
                  }
                ]
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": false
                  }
                ]
              },
              {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-type-must-support",
                    "valueBoolean": false
                  }
                ]
              }
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.supportingInfo.reference",
        "path": "ServiceRequest.supportingInfo.reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.supportingInfo.identifier",
        "path": "ServiceRequest.supportingInfo.identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.supportingInfo.identifier.system",
        "path": "ServiceRequest.supportingInfo.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.supportingInfo.identifier.value",
        "path": "ServiceRequest.supportingInfo.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note",
        "path": "ServiceRequest.note",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.author[x]",
        "path": "ServiceRequest.note.author[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference",
        "path": "ServiceRequest.note.author[x]",
        "sliceName": "authorReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Practitioner",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Organization",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference.reference",
        "path": "ServiceRequest.note.author[x].reference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference.identifier",
        "path": "ServiceRequest.note.author[x].identifier",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference.identifier.system",
        "path": "ServiceRequest.note.author[x].identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference.identifier.value",
        "path": "ServiceRequest.note.author[x].identifier.value",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}