{
  "resourceType": "StructureDefinition",
  "id": "message-search",
  "meta": {
    "versionId": "15",
    "lastUpdated": "2023-10-15T12:44:27.762+00:00"
  },
  "url": "http://fhir.cezih.hr/specifikacije/StructureDefinition/message-search",
  "version": "0.1",
  "name": "MessageSearch",
  "title": "Poruka pretrage uputnica",
  "status": "active",
  "description": "Poruka služi za izvođenje pretrage uputnica po određenim kriterijima u skladu s FHIR messaging specifikacijom (https://www.hl7.org/fhir/messaging.html#search).",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Bundle",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle",
        "path": "Bundle"
      },
      {
        "id": "Bundle.id",
        "path": "Bundle.id",
        "short": "Jedinstveni identifikator poruke",
        "definition": "Identifikator definira pošiljatelj poruke u UUID formatu.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.type",
        "path": "Bundle.type",
        "fixedCode": "message"
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "min": 1
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "rules": "closed"
        },
        "min": 2
      },
      {
        "id": "Bundle.entry.resource",
        "path": "Bundle.entry.resource",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:parametriPretrage.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:parametriPretrage.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:parametriPretrage.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:MessageHeader",
        "path": "Bundle.entry",
        "sliceName": "MessageHeader",
        "short": "Zaglavlje poruke",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:MessageHeader.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "short": "Jedinstveni identifikator zapisa u poruci",
        "definition": "Identifikator definira pošiljatelj poruke u UUID formatu. Ovaj identifikator mora biti jednak identifikatoru resursa (atribut id) koji se nalazi u zapisu (entry)",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:MessageHeader.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "MessageHeader",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/specijalisticka-uputnica-message-header"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.event[x]",
        "path": "Bundle.entry.resource.event[x]",
        "short": "Kod poruke",
        "definition": "Kod definira da se radi o pretragi poruka uputnice.",
        "fixedCoding": {
          "system": "http://fhir.cezih.hr/specifikacije/CodeSystem/message-types",
          "code": "3.11"
        }
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.sender",
        "path": "Bundle.entry.resource.sender",
        "short": "Pošiljatelj poruke",
        "definition": "Referenca na organizaciju koja je pošiljatelj poruke. Za referenciranje organizacije koristi se logička referenca (identifikator - HZZO šifra zdravstvene ustanove).",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-organizacija"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.author",
        "path": "Bundle.entry.resource.author",
        "short": "Autor poruke",
        "definition": "Referenca na zdravstvenog djelatnika koji je autor poruke. Za referenciranje zdravstvenog djelatnika koristi se logička referenca (identifikator - HZJZ šifra zdravstvenog djelatnika ili MBO)",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-practitioner"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.source",
        "path": "Bundle.entry.resource.source",
        "short": "Jedinstveni identifikator sustava koji šalje poruku"
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.focus",
        "path": "Bundle.entry.resource.focus",
        "short": "Reference na sadržaj poruke",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference"
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:MessageHeader.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:MessageHeader.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:parametriPretrage",
        "path": "Bundle.entry",
        "sliceName": "parametriPretrage",
        "short": "Parametri pretrage",
        "definition": "Zapis sadrži parametre pretrage uputnica.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:parametriPretrage.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "short": "Jedinstveni identifikator zapisa u poruci",
        "min": 1
      },
      {
        "id": "Bundle.entry:parametriPretrage.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Parameters",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/parametri-pretrage"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:parametriPretrage.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:parametriPretrage.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:parametriPretrage.response",
        "path": "Bundle.entry.response",
        "max": "0"
      }
    ]
  }
}