code: public static NaaccrDictionary mergeDictionaries(NaaccrDictionary baseDictionary, NaaccrDictionary... userDictionaries) {
          if (baseDictionary == null)
              throw new RuntimeException("Base dictionary is required");
  
          NaaccrDictionary result = new NaaccrDictionary();
          result.setNaaccrVersion(baseDictionary.getNaaccrVersion());
          result.setDictionaryUri(baseDictionary.getDictionaryUri() + "[merged]");
          result.setSpecificationVersion(baseDictionary.getSpecificationVersion());
          result.setDescription(baseDictionary.getDescription());
  
          List<NaaccrDictionaryItem> items = new ArrayList<>(baseDictionary.getItems());
          for (NaaccrDictionary userDictionary : userDictionaries)
              items.addAll(userDictionary.getItems());
          items.sort(Comparator.comparing(NaaccrDictionaryItem::getNaaccrId));
          result.setItems(items);
  
          List<NaaccrDictionaryGroupedItem> groupedItems = new ArrayList<>(baseDictionary.getGroupedItems());
          for (NaaccrDictionary userDictionary : userDictionaries)
              groupedItems.addAll(userDictionary.getGroupedItems());
          groupedItems.sort(Comparator.comparing(NaaccrDictionaryItem::getNaaccrId));
          result.setGroupedItems(groupedItems);
  
          return result;
      }
docs: Merges the given base dictionary and user dictionaries into one dictionary.
  <br/><br/>
  Sort order of the items is based on start column, items without a start column go to the end.
  @param baseDictionary base dictionary, required
  @param userDictionaries user dictionaries, optional
  @return a new merged dictionary containing the items of all the provided dictionaries.