{
  "resourceType": "StructureDefinition",
  "url": "https://api-erp.kamsoft.pl/ns/StructureDefinition/Document",
  "name": "Document",
  "version": "1.0.0",
  "title": "Dokument (Document)",
  "description": "Zasób kanoniczny Document — uniwersalny dokument biznesowy (participant, position, attribute wg konwencji domenowych).",
  "kind": "resource",
  "abstract": false,
  "type": "Document",
  "baseDefinition": "https://api-erp.kamsoft.pl/ns/StructureDefinition/DomainResource",
  "snapshot": {
    "element": [
      {
        "path": "Document.identifier",
        "min": 0,
        "max": "*",
        "short": "Identyfikatory dokumentu",
        "type": [
          {
            "code": "Identifier[]"
          }
        ]
      },
      {
        "path": "Document.space",
        "min": 0,
        "max": "1",
        "short": "Przestrzeń dokumentu",
        "definition": "np. fk-inbox, eod, whs (CodeableConcept).",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "path": "Document.issueDate",
        "min": 0,
        "max": "1",
        "short": "Data wystawienia / dokumentu",
        "type": [
          {
            "code": "String"
          }
        ]
      },
      {
        "path": "Document.participant",
        "min": 0,
        "max": "*",
        "short": "Uczestnicy",
        "definition": "Referencje do PartyRole (wystawca, nabywca, …).",
        "type": [
          {
            "code": "Reference[]"
          }
        ]
      },
      {
        "path": "Document.relatedDocument",
        "min": 0,
        "max": "*",
        "short": "Powiązane dokumenty",
        "type": [
          {
            "code": "Reference[]"
          }
        ]
      },
      {
        "path": "Document.position",
        "min": 0,
        "max": "*",
        "short": "Pozycje / segmenty dokumentu",
        "type": [
          {
            "code": "DocumentPosition[]"
          }
        ]
      },
      {
        "path": "Document.attachment",
        "min": 0,
        "max": "*",
        "short": "Załączniki",
        "type": [
          {
            "code": "Attachment[]"
          }
        ]
      },
      {
        "path": "Document.statusDate",
        "min": 0,
        "max": "1",
        "short": "Data statusu",
        "type": [
          {
            "code": "String"
          }
        ]
      },
      {
        "path": "Document.expectedDate",
        "min": 0,
        "max": "1",
        "short": "Data oczekiwana",
        "type": [
          {
            "code": "String"
          }
        ]
      },
      {
        "path": "Document.realizationDate",
        "min": 0,
        "max": "1",
        "short": "Data realizacji",
        "type": [
          {
            "code": "String"
          }
        ]
      }
    ]
  }
}