code: public void addItem(Item item) {
          // it is important to keep the cache in the same state as the items and so item two identical items has to trigger an exception
          if (_cachedById.containsKey(item.getNaaccrId()))
              throw new DuplicateItemException(item.getNaaccrId(), "Duplicate item ID found for '" + item.getNaaccrId() + "'");
          _items.add(item);
          _cachedById.put(item.getNaaccrId(), item);
      }
docs: Adds an item to this entity.
  <br/><br/>
  This method makes no validation on the item or its value; for example, it doesn't check that an item with the same ID has already been added.
  The caller can check before adding the item, or wait until the full patient is validated, which will fail for duplicate items.
  @param item item to add, cannot be null