{
  "resourceType": "StructureDefinition",
  "id": "ServiceRequestABeReC",
  "url": "https://www.alberta.ca/fhir/aberec/StructureDefinition/ServiceRequestABeReC",
  "version": "1.1.0",
  "name": "ServiceRequestABeReC",
  "title": "ServiceRequest (AB:eReC)",
  "status": "draft",
  "description": "This profile defines a set of constraints to the FHIR ServiceRequest resource for use in Alberta eReferral and eConsult (AB:eReC). It re-profiles the CA-eReC ServiceRequest profile and it includes constraints that represent the minimum expectations for the ServiceRequest resource when used in the AB:eReC.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.extension:RequestStatusReason",
        "path": "ServiceRequest.extension",
        "sliceName": "RequestStatusReason"
      },
      {
        "id": "ServiceRequest.extension:RequestStatusReason.value[x]",
        "path": "ServiceRequest.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/request-status-reason-ab"
        }
      },
      {
        "id": "ServiceRequest.extension:referralTimestamp",
        "path": "ServiceRequest.extension",
        "sliceName": "referralTimestamp",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/ext-TimestampAB"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.extension:patientPreference",
        "path": "ServiceRequest.extension",
        "sliceName": "patientPreference",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/ext-PatientPreference"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "min": 1
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "binding": {
          "strength": "required",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/request-status-ab"
        }
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/specialty-code"
        }
      },
      {
        "id": "ServiceRequest.priority.extension",
        "path": "ServiceRequest.priority.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.priority.extension:subPriority",
        "path": "ServiceRequest.priority.extension",
        "sliceName": "subPriority",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/ext-SubPriority"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/referral-reason-code"
        }
      },
      {
        "id": "ServiceRequest.code.coding",
        "path": "ServiceRequest.code.coding",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code.coding.system",
        "path": "ServiceRequest.code.coding.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code.coding.code",
        "path": "ServiceRequest.code.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/PatientABeReC"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerRoleABeReC"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerRoleABeReC",
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/HealthcareServiceABeReC"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer.extension:role",
        "path": "ServiceRequest.performer.extension",
        "sliceName": "role",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/ext-PerformerRole"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.performer.extension:role.value[x]",
        "path": "ServiceRequest.performer.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://www.alberta.ca/fhir/ValueSet/performer-role-code"
        }
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "min": 1
      },
      {
        "id": "ServiceRequest.reasonCode.text",
        "path": "ServiceRequest.reasonCode.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/CommunicationABeReC",
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/DocumentReferenceABeReC"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.note.author[x]",
        "path": "ServiceRequest.note.author[x]",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.author[x]:authorReference",
        "path": "ServiceRequest.note.author[x]",
        "sliceName": "authorReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.alberta.ca/fhir/aberec/StructureDefinition/PractitionerABeReC"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.note.time",
        "path": "ServiceRequest.note.time",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.note.text",
        "path": "ServiceRequest.note.text",
        "mustSupport": true
      }
    ]
  }
}