{
  "resourceType": "StructureDefinition",
  "id": "TR04-Request",
  "meta": {
    "versionId": "16",
    "lastUpdated": "2022-09-20T14:11:45.252+00:00"
  },
  "url": "http://fhir.cezih.hr/specifikacije/StructureDefinition/TR04-Request",
  "version": "0.1",
  "name": "TR04Request",
  "title": "Poruka dopune uputnice (TR04)",
  "status": "active",
  "description": "Ovaj profil definira poruku koju BIS šalje kod dopune specijalističke uputnice.",
  "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",
        "mustSupport": true
      },
      {
        "id": "Bundle.timestamp",
        "path": "Bundle.timestamp",
        "min": 1
      },
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "min": 3
      },
      {
        "id": "Bundle.entry:MessageHeader",
        "path": "Bundle.entry",
        "sliceName": "MessageHeader",
        "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
      },
      {
        "id": "Bundle.entry:MessageHeader.resource",
        "path": "Bundle.entry.resource",
        "short": "Zaglavlje poruke",
        "min": 1,
        "type": [
          {
            "code": "MessageHeader",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/specijalisticka-uputnica-message-header"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.event[x]",
        "path": "Bundle.entry.resource.event[x]",
        "short": "Kod poruke",
        "definition": "Kod poruke definira koja se tranzicija inicira porukom.",
        "fixedCoding": {
          "system": "http://fhir.cezih.hr/specifikacije/CodeSystem/message-types",
          "code": "3.4"
        }
      },
      {
        "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"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "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"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "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",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resolve()"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "short": "Reference na sadržaj poruke",
        "min": 1
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.focus:uputnica",
        "path": "Bundle.entry.resource.focus",
        "sliceName": "uputnica",
        "short": "Reference na uputnicu u sadržaju poruke",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/specijalisticka-uputnica"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.focus:dokument",
        "path": "Bundle.entry.resource.focus",
        "sliceName": "dokument",
        "short": "Reference na dokumente u sadržaju poruke",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/prilozeni-dokument"
            ]
          }
        ]
      },
      {
        "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:Uputnica",
        "path": "Bundle.entry",
        "sliceName": "Uputnica",
        "short": "Specijalistička uputnica",
        "definition": "Dopunjena specijalistička uputnica.",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Uputnica.fullUrl",
        "path": "Bundle.entry.fullUrl",
        "short": "Jedinstveni identifikator zapisa u poruci",
        "definition": "Ovaj identifikator mora biti jednak identifikatoru resursa (atribut id) koji se nalazi u zapisu (entry)",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Uputnica.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "ServiceRequest",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/specijalisticka-uputnica"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:Uputnica.resource.identifier",
        "path": "Bundle.entry.resource.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.identifier:identifikatorUputnice",
        "path": "Bundle.entry.resource.identifier",
        "sliceName": "identifikatorUputnice",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.identifier:CustomerOrderNumber",
        "path": "Bundle.entry.resource.identifier",
        "sliceName": "CustomerOrderNumber",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.basedOn",
        "path": "Bundle.entry.resource.basedOn",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.status",
        "path": "Bundle.entry.resource.status",
        "fixedCode": "active"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.category",
        "path": "Bundle.entry.resource.category",
        "min": 2,
        "max": "2"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.priority",
        "path": "Bundle.entry.resource.priority",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.code",
        "path": "Bundle.entry.resource.code",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.subject",
        "path": "Bundle.entry.resource.subject"
      },
      {
        "id": "Bundle.entry:Uputnica.resource.encounter",
        "path": "Bundle.entry.resource.encounter",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.authoredOn",
        "path": "Bundle.entry.resource.authoredOn",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.requester",
        "path": "Bundle.entry.resource.requester",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.performerType",
        "path": "Bundle.entry.resource.performerType",
        "min": 1
      },
      {
        "id": "Bundle.entry:Uputnica.resource.reasonReference",
        "path": "Bundle.entry.resource.reasonReference",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:Uputnica.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Uputnica.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Uputnica.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Dokument",
        "path": "Bundle.entry",
        "sliceName": "Dokument",
        "short": "Priloženi dokument",
        "comment": "Resurs DocumentReference može sadržavati bilo kakave dokumente koje korisnik želi poslati uz uputnicu u obliku base64 binary datoteke. Kod dopune uputnice potrebno je poslati barem jedan priloženi dokument koji nadopunjava uputnicu.",
        "min": 1
      },
      {
        "id": "Bundle.entry:Dokument.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
      },
      {
        "id": "Bundle.entry:Dokument.resource",
        "path": "Bundle.entry.resource",
        "min": 1,
        "type": [
          {
            "code": "DocumentReference",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/prilozeni-dokument"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Dokument.search",
        "path": "Bundle.entry.search",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Dokument.request",
        "path": "Bundle.entry.request",
        "max": "0"
      },
      {
        "id": "Bundle.entry:Dokument.response",
        "path": "Bundle.entry.response",
        "max": "0"
      },
      {
        "id": "Bundle.signature",
        "path": "Bundle.signature",
        "short": "Digitalni potpis poruke",
        "definition": "Poruka mora biti potpisana digitalnim certifikatom autora poruke MessageHeader.author. Digitalni potpis treba biti tipa \"enveloped\" i sukladan specifikaciji digitalnog potpisa dokumenata koja se nalazi [ovdje](https://www.hl7.org/fhir/signatures.html).",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Bundle.signature.type",
        "path": "Bundle.signature.type"
      },
      {
        "id": "Bundle.signature.when",
        "path": "Bundle.signature.when"
      },
      {
        "id": "Bundle.signature.who",
        "path": "Bundle.signature.who",
        "short": "Reference na autora poruke",
        "definition": "Koristi se logička referenca (identifikator-MBO)",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-practitioner"
            ]
          }
        ]
      },
      {
        "id": "Bundle.signature.data",
        "path": "Bundle.signature.data",
        "min": 1
      }
    ]
  }
}