﻿{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://api-erp.kamsoft.pl/ns/StructureDefinition/AttachmentOccupationalMedicine",
  "title": "AttachmentOccupationalMedicine",
  "version": "1.0.0",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "meta": {
      "$ref": "Meta.schema.json"
    },
    "owner": {
      "type": "array",
      "items": {
        "$ref": "Reference.schema.json"
      }
    },
    "comment": {
      "type": "string"
    },
    "category": {
      "type": "array",
      "items": {
        "$ref": "CodeableConcept.schema.json"
      }
    },
    "status": {
      "$ref": "CodeableConcept.schema.json"
    },
    "type": {
      "$ref": "CodeableConcept.schema.json"
    },
    "contained": {
      "type": "array",
      "items": {
        "$ref": "Object.schema.json"
      }
    },
    "attribute": {
      "type": "array",
      "items": {
        "$ref": "Attribute.schema.json"
      }
    },
    "identifier": {
      "description": "Identyfikatory za\u0142\u0105cznika",
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "Identifier.schema.json"
      }
    },
    "basedOn": {
      "description": "Referencja do zasobu, na podstawie kt\u00F3rego powsta\u0142 ten za\u0142\u0105cznik (np. skierowanie, zlecenie, dokument \u017Ar\u00F3d\u0142owy)",
      "$ref": "Reference.schema.json"
    },
    "contentType": {
      "description": "Typ MIME (np. application/pdf, image/png)",
      "type": "string"
    },
    "language": {
      "description": "J\u0119zyk tre\u015Bci (opcjonalnie)",
      "type": "string"
    },
    "url": {
      "description": "Adres URL do pliku (gdy plik zewn\u0119trzny)",
      "type": "string"
    },
    "data": {
      "description": "Tre\u015B\u0107 w formacie base64",
      "type": "string"
    },
    "title": {
      "description": "Tytu\u0142 / nazwa do wy\u015Bwietlania",
      "type": "string"
    },
    "size": {
      "description": "Rozmiar w bajtach (opcjonalnie)",
      "type": "integer"
    },
    "hash": {
      "description": "Skr\u00F3t (np. SHA-256) do weryfikacji (opcjonalnie)",
      "type": "string"
    },
    "creation": {
      "description": "Data utworzenia (opcjonalnie)",
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "identifier",
    "data"
  ]
}