@Test public void processDoesntSetCustomDobFormatWhenNotSet() throws ComponentLookupException { when(this.configObject.getStringValue("dateOfBirthFormat")).thenReturn(null); Assert.assertSame(this.config, this.mocker.getComponentUnderTest().process(this.config)); verify(this.config, never()).setDateOfBirthFormat(any(String.class)); }
@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; }
GlobalPatientRecordConfigurationModule implements RecordConfigurationModule { @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; } }
GlobalPatientRecordConfigurationModule implements RecordConfigurationModule { @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; }  }
GlobalPatientRecordConfigurationModule implements RecordConfigurationModule { @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; }  @Override RecordConfiguration process(RecordConfiguration config); @Override int getPriority(); @Override boolean supportsRecordType(final String recordType); }
GlobalPatientRecordConfigurationModule implements RecordConfigurationModule { @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; }  @Override RecordConfiguration process(RecordConfiguration config); @Override int getPriority(); @Override boolean supportsRecordType(final String recordType);  }