@Override public List<RecordElement> getAllElements() { if (this.elements == null) { this.elements = collectElements(); } return Collections.unmodifiableList(this.elements); }
@Override public List<RecordElement> getEnabledElements() { List<RecordElement> result = new LinkedList<>(); for (RecordElement element : getAllElements()) { if (element.isEnabled()) { result.add(element); } } return Collections.unmodifiableList(result); }
@Override public String toString() { StringBuilder result = new StringBuilder(getName()); result.append(" ["); result.append(StringUtils.join(getEnabledElements(), ", ")); result.append(']'); return result.toString(); } }
@Override public RecordConfiguration process(@Nullable final RecordConfiguration config) { if (config == null) { return null; } final List<UIExtension> sectionExtensions = getOrderedSectionUIExtensions(); final List<RecordSection> recordSections = new LinkedList<>(); for (final UIExtension sectionExtension : sectionExtensions) { final RecordSection section = new UIXRecordSection(sectionExtension, this.uixManager, this.orderFilter); recordSections.add(section); } config.setSections(Collections.unmodifiableList(recordSections)); return config; }
@Override public RecordConfiguration process(RecordConfiguration config) { if (config == null) { return null; } final List<UIExtension> sectionExtensions = getOrderedSectionUIExtensions(); final List<RecordSection> recordSections = new LinkedList<>(); for (final UIExtension sectionExtension : sectionExtensions) { final RecordSection section = new UIXRecordSection(sectionExtension, this.uixManager, this.orderFilter); recordSections.add(section); } config.setSections(recordSections); DocumentReference mapping = getPhenotypeMapping(); if (mapping != null) { config.setPhenotypeMapping(mapping); } String dobFormat = getDateOfBirthFormat(); if (StringUtils.isNotBlank(dobFormat)) { config.setDateOfBirthFormat(dobFormat); } return config; }