{
  "resourceType": "StructureDefinition",
  "id": "hr-allergy-response-message",
  "url": "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-allergy-response-message",
  "version": "0.1",
  "name": "HRAllergyResponseMessage",
  "title": "Poruka odgovora na zahtjev - alergije",
  "status": "draft",
  "date": "2026-08-26",
  "publisher": "Ericsson Nikola Tesla d.d.",
  "description": "Ovaj profil definira sadržaj poruke odgovora na zahtjev za upravljanje podatcima o alergijama/intolerancijama pacijenta.",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "HR",
          "display": "Croatia"
        }
      ],
      "text": "Croatia"
    }
  ],
  "copyright": "Ericsson Nikola Tesla d.d.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Bundle",
  "baseDefinition": "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-response-message",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Bundle.entry",
        "path": "Bundle.entry",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "resource"
            }
          ],
          "ordered": false,
          "rules": "closed"
        },
        "min": 2,
        "max": "3"
      },
      {
        "id": "Bundle.entry:MessageHeader",
        "path": "Bundle.entry",
        "sliceName": "MessageHeader",
        "short": "Zaglavlje poruke",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Bundle.entry:MessageHeader.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "MessageHeader",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-allergy-management-message-header"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.response",
        "path": "Bundle.entry.resource.response",
        "short": "Reference na poruku zahtjeva",
        "min": 1
      },
      {
        "id": "Bundle.entry:AllergyIntolerance",
        "path": "Bundle.entry",
        "sliceName": "AllergyIntolerance",
        "short": "Podatci o alergiji/intoleranciji",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:AllergyIntolerance.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "AllergyIntolerance",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/HRAllergyIntolerance"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:AllergyIntolerance.resource.identifier",
        "path": "Bundle.entry.resource.identifier",
        "slicing": {
          "description": "Discriminator je definiran u profilu HRAllergyIntolerance",
          "rules": "closed"
        },
        "definition": "Jedinstveni identifikator alergije/intolerancije kojeg dodjeljuje servis za upravljanje alergijama/intolerancijama prilikom kreiranja novog zapisa o alergiji/intoleranciji.",
        "min": 1
      },
      {
        "id": "Bundle.entry:AllergyIntolerance.resource.identifier:jedinstveni-identifikator",
        "path": "Bundle.entry.resource.identifier",
        "sliceName": "jedinstveni-identifikator",
        "min": 1
      },
      {
        "id": "Bundle.entry:OperationOutcome",
        "path": "Bundle.entry",
        "sliceName": "OperationOutcome",
        "short": "Ishod",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Bundle.entry:OperationOutcome.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "OperationOutcome",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/ishod"
            ]
          }
        ]
      }
    ]
  }
}