docs: public List<Document> retrieveHeaders(Patient patient, Date startDate, Date endDate, DocumentCategory category) {
          List<DocumentCategory> categories = category == null ? getCategories() : Collections.singletonList(category);
          List<Document> results = new ArrayList<>();
  
          for (DocumentCategory cat : categories) {
              for (String result : broker.callRPCList("TIU DOCUMENTS BY CONTEXT", null, cat.getId().getIdPart(), 1,
                  patient.getIdElement().getIdPart(), startDate, endDate)) {
                  String[] pcs = StrUtil.split(result, StrUtil.U, 14);
                  Document doc = new Document();
                  doc.setId(pcs[0]);
                  doc.setTitle(pcs[1]);
                  doc.setDateTime(new FMDate(pcs[2]));
                  doc.setAuthorName(StrUtil.piece(pcs[4], ";", 3));
                  doc.setLocationName(pcs[5]);
                  doc.setSubject(pcs[11]);
                  doc.setCategory(cat);
                  results.add(doc);
              }
          }
  
          return results;
      }