{
  "resourceType": "StructureDefinition",
  "id": "294e93fc-9e6d-4c8f-8335-c35d8d9b4628",
  "meta": {
    "lastUpdated": "2021-10-05T09:41:03.949+00:00"
  },
  "url": "https://fhir.cambio.se/StructureDefinition/ServiceRequestReferral/v1",
  "name": "ServiceRequestReferral",
  "status": "draft",
  "date": "2021-04-13T18:09:09.7507912Z",
  "description": "The ServiceRequestReferral profile is used for retrieving data about a referral request. It references a composition resource which represents the documented clinical data within the referral request.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "quick",
      "uri": "http://siframework.org/cqf",
      "name": "Quality Improvement and Clinical Knowledge (QUICK)"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "https://fhir.cambio.se/StructureDefinition/ServiceRequestReferralCoreSwe/v1",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.meta",
        "path": "ServiceRequest.meta",
        "min": 1
      },
      {
        "id": "ServiceRequest.meta.profile",
        "path": "ServiceRequest.meta.profile",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "definition": "Should either be the COSMIC Internal referral ID and/or the external referral ID."
      },
      {
        "id": "ServiceRequest.identifier.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier:localServiceRequest",
        "path": "ServiceRequest.identifier",
        "sliceName": "localServiceRequest",
        "definition": "Identifier used for service request sent within the same EHR installation, for example within one hospital or one region.",
        "max": "1"
      },
      {
        "id": "ServiceRequest.identifier:localServiceRequest.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1,
        "fixedUri": "https://fhir.cambio.se/ServiceRequest"
      },
      {
        "id": "ServiceRequest.identifier:localServiceRequest.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier:nationalServiceRequest",
        "path": "ServiceRequest.identifier",
        "sliceName": "nationalServiceRequest",
        "definition": "Identifier used for service request sent from one region to another.",
        "max": "1"
      },
      {
        "id": "ServiceRequest.identifier:nationalServiceRequest.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1,
        "fixedUri": "https://cambio.codes/is/inera/national-referral-id"
      },
      {
        "id": "ServiceRequest.identifier:nationalServiceRequest.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.instantiatesCanonical",
        "path": "ServiceRequest.instantiatesCanonical",
        "comment": "No use case as of today. \r\nReference to SVF in future?",
        "max": "0"
      },
      {
        "id": "ServiceRequest.instantiatesUri",
        "path": "ServiceRequest.instantiatesUri",
        "comment": "No use case as of today. \r\nReference to SVF in future?\r\n\r\nThis might be an HTML page, PDF, etc. or could just be a non-resolvable URI identifier.",
        "max": "0"
      },
      {
        "id": "ServiceRequest.basedOn",
        "path": "ServiceRequest.basedOn",
        "comment": "Possibly include SVF attribute here as a careplan reference",
        "max": "0"
      },
      {
        "id": "ServiceRequest.replaces",
        "path": "ServiceRequest.replaces",
        "max": "0"
      },
      {
        "id": "ServiceRequest.requisition",
        "path": "ServiceRequest.requisition",
        "max": "0"
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "short": "draft | active | revoked | completed | entered-in-error",
        "definition": "The status of the order.\r\nSupported statuses are: Draft, Active, Revoked, Completed, Entered-in-error"
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "short": "order",
        "fixedCode": "order"
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.category.coding",
        "path": "ServiceRequest.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.category.coding.system",
        "path": "ServiceRequest.category.coding.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.category.coding.code",
        "path": "ServiceRequest.category.coding.code",
        "min": 1
      },
      {
        "id": "ServiceRequest.priority",
        "path": "ServiceRequest.priority",
        "comment": "Priority is included in the Task resource.",
        "max": "0"
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "comment": "Will include a value set of 3 snomed codes for referral types: Referral, self-referral and consultation referral.",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "Codes for referral request types",
          "valueSet": "https://fhir.cambio.se/ValueSet/ReferralRequestTypes/v1"
        }
      },
      {
        "id": "ServiceRequest.code.coding",
        "path": "ServiceRequest.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.code.coding.system",
        "path": "ServiceRequest.code.coding.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.code.coding.code",
        "path": "ServiceRequest.code.coding.code",
        "min": 1
      },
      {
        "id": "ServiceRequest.orderDetail",
        "path": "ServiceRequest.orderDetail",
        "max": "0"
      },
      {
        "id": "ServiceRequest.subject.identifier.system",
        "path": "ServiceRequest.subject.identifier.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.subject.identifier.value",
        "path": "ServiceRequest.subject.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.encounter",
        "path": "ServiceRequest.encounter",
        "definition": "In COSMIC this corresponds to the Contact ID."
      },
      {
        "id": "ServiceRequest.encounter.identifier.system",
        "path": "ServiceRequest.encounter.identifier.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.encounter.identifier.value",
        "path": "ServiceRequest.encounter.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.occurrence[x]",
        "path": "ServiceRequest.occurrence[x]",
        "max": "0"
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "short": "Date request",
        "comment": "Referral date",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.requester.extension",
        "path": "ServiceRequest.requester.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "ServiceRequest.requester.extension:hsaHierarchy",
        "path": "ServiceRequest.requester.extension",
        "sliceName": "hsaHierarchy",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.cambio.se/StructureDefinition/common-hsaHierarchy/v1"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performerType",
        "path": "ServiceRequest.performerType",
        "comment": "Map to the role of the receiver in COSMIC.",
        "max": "0"
      },
      {
        "id": "ServiceRequest.performerType.coding",
        "path": "ServiceRequest.performerType.coding",
        "max": "0"
      },
      {
        "id": "ServiceRequest.performerType.coding.system",
        "path": "ServiceRequest.performerType.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/ValueSet/participant-role"
      },
      {
        "id": "ServiceRequest.performerType.coding.code",
        "path": "ServiceRequest.performerType.coding.code",
        "min": 1
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.cambio.se/StructureDefinition/PractitionerRoleLiteSe/v1",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer.extension",
        "path": "ServiceRequest.performer.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "ServiceRequest.performer.extension:hsaHierarchy",
        "path": "ServiceRequest.performer.extension",
        "sliceName": "hsaHierarchy",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.cambio.se/StructureDefinition/common-hsaHierarchy/v1"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "comment": "Intended use is the patient's reason for contact. Should include the valueset from Socialstyrelsen for Swedish concepts for reason for contact.",
        "max": "1"
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "max": "0"
      },
      {
        "id": "ServiceRequest.insurance",
        "path": "ServiceRequest.insurance",
        "max": "0"
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "comment": "supportingInfo should reference a composition including the referral record data (components and values in text)",
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.cambio.se/StructureDefinition/CompositionReferralClinicalInformation/v1"
            ],
            "aggregation": [
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.note",
        "path": "ServiceRequest.note",
        "max": "0"
      },
      {
        "id": "ServiceRequest.patientInstruction",
        "path": "ServiceRequest.patientInstruction",
        "max": "0"
      },
      {
        "id": "ServiceRequest.relevantHistory",
        "path": "ServiceRequest.relevantHistory",
        "max": "0"
      }
    ]
  }
}