{
  "resourceType": "StructureDefinition",
  "id": "hn-basis-patient-referral",
  "url": "http://helsenorge.no/fhir/StructureDefinition/hn-basis-patient-referral",
  "version": "0.02.00",
  "name": "HnBasisPatientReferral",
  "title": "hn-basis-patient-referral",
  "date": "2024-11-25",
  "description": "Basis profil for pasient henvisning og henvisningsstatus for bruk i Helsenorge. Profilen bør brukes som basis forvidere profilering av henvisning i helsenorge",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest",
        "path": "ServiceRequest",
        "alias": [
          "care referral",
          "referral request",
          "specialist referral",
          "clinical referral",
          "henvisning"
        ],
        "constraint": [
          {
            "key": "identifier-system-assigner-rule",
            "human": "The system must be 'urn:ietf:rfc:3986' or the assigner must be present. In Helsenorge the general rule is that one uses 'urn:ietf:rfc:3986' as system for identifier. The exeption is when Identifier is used for routing in the system that create the resource. In that case assigner must exist.",
            "source": "http://helsenorge.no/fhir/StructureDefinition/hn-basis-patient-referral",
            "severity": "error",
            "expression": "identifier.system = 'urn:ietf:rfc:3986' or identifer.assigner.exists()"
          }
        ]
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "fixedCode": "order"
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "binding": {
          "strength": "preferred",
          "valueSet": "urn:oid:2.16.578.1.12.4.1.1.8455"
        }
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Practitioner",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Organization",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://hl7.no/fhir/StructureDefinition/no-basis-HealthcareService",
              "http://hl7.no/fhir/StructureDefinition/no-basis-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.locationReference",
        "path": "ServiceRequest.locationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Location",
              "http://hl7.no/fhir/StructureDefinition/no-basis-Location"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "min": 1
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Condition",
              "http://hl7.org/fhir/StructureDefinition/Observation",
              "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
              "http://hl7.no/fhir/StructureDefinition/no-basis-DocumentReference"
            ]
          }
        ]
      }
    ]
  }
}