{
  "resourceType": "StructureDefinition",
  "url": "http://fhir.cezih.hr/specifikacije/StructureDefinition/HRPrescriptionResponseMessage",
  "name": "HRPrescriptionResponseMessage",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "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": "$this"
            }
          ],
          "rules": "closed"
        },
        "min": 1
      },
      {
        "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": "Resource",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/hr-message-header"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.event[x]",
        "path": "Bundle.entry.resource.event[x]",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.cezih.hr/specifikacije/ValueSet/prescription-management-message-types"
        }
      },
      {
        "id": "Bundle.entry:MessageHeader.resource.response",
        "path": "Bundle.entry.resource.response",
        "short": "Identifikator poruke zahtjeva",
        "definition": "Identifikator poruke zahtjeva",
        "min": 1
      },
      {
        "id": "Bundle.entry:Task",
        "path": "Bundle.entry",
        "sliceName": "Task",
        "short": "Task resurs",
        "definition": "Elementi od kojih se sastoji FHIR poruka. Task resurs se šalje u slučaju uspješno obrađene poruke recepta te nosi informaciju o trenutnom stanju recepta.",
        "max": "1"
      },
      {
        "id": "Bundle.entry:Task.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Task"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Task.resource.intent",
        "path": "Bundle.entry.resource.intent",
        "fixedCode": "order"
      },
      {
        "id": "Bundle.entry:Task.resource.focus",
        "path": "Bundle.entry.resource.focus",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/MedicationRequest"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Task.resource.focus.identifier",
        "path": "Bundle.entry.resource.focus.identifier",
        "short": "CUID recepta za kojeg se šalje stanje procesa",
        "definition": "CUID recepta za kojeg se šalje stanje procesa",
        "min": 1
      },
      {
        "id": "Bundle.entry:Task.resource.focus.identifier.system",
        "path": "Bundle.entry.resource.focus.identifier.system",
        "min": 1,
        "fixedUri": " http://fhir.cezih.hr/specifikacije/identifikatori/cuid-recepta"
      },
      {
        "id": "Bundle.entry:Task.resource.focus.identifier.value",
        "path": "Bundle.entry.resource.focus.identifier.value",
        "short": "CUID recepta za kojeg se šalje stanje procesa",
        "definition": "CUID recepta za kojeg se šalje stanje procesa",
        "min": 1
      },
      {
        "id": "Bundle.entry:Ishod",
        "path": "Bundle.entry",
        "sliceName": "Ishod",
        "max": "1"
      },
      {
        "id": "Bundle.entry:Ishod.resource",
        "path": "Bundle.entry.resource",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://fhir.cezih.hr/specifikacije/StructureDefinition/ishod"
            ]
          }
        ]
      },
      {
        "id": "Bundle.entry:Ishod.resource.issue.details",
        "path": "Bundle.entry.resource.issue.details",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.cezih.hr/specifikacije/ValueSet/HR-message-error-type"
        }
      }
    ]
  }
}