{
  "resourceType": "StructureDefinition",
  "url": "https://api-erp.kamsoft.pl/ns/StructureDefinition/DocumentPosition",
  "name": "DocumentPosition",
  "version": "1.0.0",
  "title": "Pozycja dokumentu (DocumentPosition)",
  "description": "Segment lub wiersz dokumentu — code + wartości (valueItem, valueMoney, …); profil zależy od domeny (FK, WMS, HR).",
  "kind": "complex-type",
  "abstract": false,
  "type": "DocumentPosition",
  "snapshot": {
    "element": [
      {
        "path": "DocumentPosition.positionNo",
        "min": 0,
        "max": "1",
        "short": "Numer pozycji",
        "type": [
          {
            "code": "Int32"
          }
        ]
      },
      {
        "path": "DocumentPosition.code",
        "min": 0,
        "max": "1",
        "short": "Rodzaj pozycji / segmentu",
        "definition": "np. invoice-line, vat-summary-line (document-position-type).",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "valueSet": "https://api-erp.kamsoft.pl/ns/document-position-type"
        }
      },
      {
        "path": "DocumentPosition.valueQuantity",
        "min": 0,
        "max": "1",
        "short": "Wartość jako Quantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueMoney",
        "min": 0,
        "max": "1",
        "short": "Wartość jako kwota",
        "type": [
          {
            "code": "Money"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueItem",
        "min": 0,
        "max": "*",
        "short": "Wartości złożone (valueItem)",
        "type": [
          {
            "code": "ValueItem[]"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueAllocation",
        "min": 0,
        "max": "*",
        "short": "Alokacje na pozycji",
        "type": [
          {
            "code": "AllocationItem[]"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueCodeableConcept",
        "min": 0,
        "max": "*",
        "short": "Wartości kodowane",
        "type": [
          {
            "code": "CodeableConcept[]"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueReference",
        "min": 0,
        "max": "*",
        "short": "Referencje na pozycji",
        "type": [
          {
            "code": "Reference[]"
          }
        ]
      },
      {
        "path": "DocumentPosition.valueString",
        "min": 0,
        "max": "1",
        "short": "Wartość tekstowa",
        "type": [
          {
            "code": "String"
          }
        ]
      },
      {
        "path": "DocumentPosition.status",
        "min": 0,
        "max": "1",
        "short": "Status pozycji",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "path": "DocumentPosition.attachment",
        "min": 0,
        "max": "*",
        "short": "Załączniki pozycji",
        "type": [
          {
            "code": "Attachment[]"
          }
        ]
      }
    ]
  }
}