{
  "resourceType": "StructureDefinition",
  "url": "https://api-erp.kamsoft.pl/ns/StructureDefinition/InventoryDocument",
  "name": "InventoryDocument",
  "version": "1.0.0",
  "title": "Dokument magazynowy (InventoryDocument)",
  "description": "Zasób kanoniczny WMS — PZ, WZ, MM, korekta; movementType, lokalizacje, pozycje.",
  "kind": "resource",
  "abstract": false,
  "type": "InventoryDocument",
  "baseDefinition": "https://api-erp.kamsoft.pl/ns/StructureDefinition/DomainResource",
  "snapshot": {
    "element": [
      {
        "path": "InventoryDocument.identifier",
        "min": 0,
        "max": "*",
        "short": "Identyfikatory dokumentu magazynowego",
        "type": [
          {
            "code": "Identifier[]"
          }
        ]
      },
      {
        "path": "InventoryDocument.movementType",
        "min": 0,
        "max": "1",
        "short": "Typ ruchu",
        "definition": "receipt, issue, transfer, adjustment — value set InventoryMovementType.",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "valueSet": "https://api-erp.kamsoft.pl/ns/valueset/InventoryMovementType"
        }
      },
      {
        "path": "InventoryDocument.effectiveDate",
        "min": 0,
        "max": "1",
        "short": "Data skuteczna operacji",
        "type": [
          {
            "code": "String"
          }
        ]
      },
      {
        "path": "InventoryDocument.fromLocation",
        "min": 0,
        "max": "1",
        "short": "Lokalizacja źródłowa",
        "type": [
          {
            "code": "Reference"
          }
        ]
      },
      {
        "path": "InventoryDocument.toLocation",
        "min": 0,
        "max": "1",
        "short": "Lokalizacja docelowa",
        "type": [
          {
            "code": "Reference"
          }
        ]
      },
      {
        "path": "InventoryDocument.participant",
        "min": 0,
        "max": "*",
        "short": "Uczestnicy",
        "type": [
          {
            "code": "Reference[]"
          }
        ]
      },
      {
        "path": "InventoryDocument.relatedDocument",
        "min": 0,
        "max": "*",
        "short": "Powiązane dokumenty",
        "type": [
          {
            "code": "Reference[]"
          }
        ]
      },
      {
        "path": "InventoryDocument.position",
        "min": 0,
        "max": "*",
        "short": "Pozycje dokumentu magazynowego",
        "type": [
          {
            "code": "InventoryDocumentPosition[]"
          }
        ]
      }
    ]
  }
}