{
  "resourceType": "StructureDefinition",
  "id": "hn-basis-serviceRequest",
  "url": "http://helsenorge.no/fhir/StructureDefinition/hn-basis-serviceRequest",
  "version": "1.3.2",
  "name": "HnBasisServiceRequest",
  "status": "draft",
  "description": "ServiceRequest sendes til tjenesteytere for å informere om hvilke tjenester som ønskes fra leverandøren.",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NO",
          "system": "urn:iso:std:iso:3166",
          "display": "Norway"
        }
      ]
    }
  ],
  "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:ansiennitetsDato",
        "path": "ServiceRequest.extension",
        "sliceName": "ansiennitetsDato",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/no-ansiennitets-dato"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:mottattDato",
        "path": "ServiceRequest.extension",
        "sliceName": "mottattDato",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/no-mottatt-dato"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:fristDatoForHelsehjelp",
        "path": "ServiceRequest.extension",
        "sliceName": "fristDatoForHelsehjelp",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/no-frist-for-helsehjelp"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:fristDatoForVurdering",
        "path": "ServiceRequest.extension",
        "sliceName": "fristDatoForVurdering",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/no-frist-for-vurdering"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:vurdertDato",
        "path": "ServiceRequest.extension",
        "sliceName": "vurdertDato",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/no-vurdert-dato"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:statusReason",
        "path": "ServiceRequest.extension",
        "sliceName": "statusReason",
        "short": "Reason for the current status",
        "definition": "Provides the rationale behind the current status (e.g., on-hold due to patient request).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://helsenorge.no/fhir/StructureDefinition/servicerequest-statusReason"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "short": "Skal være UUID",
        "definition": "Identifier er identifikator som identifiserer serviceRequest uavhengig av ressursens id på en FHIR-server. Skal være en UUID. Kan benyttes for å knytte ServiceRequest sammen med eventuelle etterfølgende oppdateringer.",
        "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",
        "patternCode": "order"
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "short": "Hvis category er brukt og det mangler code bør beskrivelse av bestilling være i note",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://helsenorge.no/fhir/ValueSet/serviceRequest-category-vs"
        }
      },
      {
        "id": "ServiceRequest.priority",
        "path": "ServiceRequest.priority",
        "min": 1
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "short": "Subject identifiserer innbygger.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.subject.reference",
        "path": "ServiceRequest.subject.reference",
        "max": "0"
      },
      {
        "id": "ServiceRequest.subject.type",
        "path": "ServiceRequest.subject.type",
        "patternUri": "Patient"
      },
      {
        "id": "ServiceRequest.subject.identifier.system",
        "path": "ServiceRequest.subject.identifier.system",
        "short": "Det skal benyttes fødselsnummer eller d-nummer."
      },
      {
        "id": "ServiceRequest.performerType",
        "path": "ServiceRequest.performerType",
        "binding": {
          "strength": "required",
          "valueSet": "http://helsenorge.no/fhir/ValueSet/serviceRequest-performerType-vs"
        }
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "short": "Supporting info kan brukes for å sende informasjon når det er frykt for smitte.",
        "definition": "Hvis det er frykt for smitte eller bevist smitte er slik informasjonen referert fra supportingInformation som ‘contained’ ressurs."
      }
    ]
  }
}