use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.
the class CaseController method getCaseViewTitleLayout.
public TitleLayout getCaseViewTitleLayout(CaseDataDto caseData) {
TitleLayout titleLayout = new TitleLayout();
titleLayout.addRow(DiseaseHelper.toString(caseData.getDisease(), caseData.getDiseaseDetails()));
titleLayout.addRow(caseData.getCaseClassification().toString());
String shortUuid = DataHelper.getShortUuid(caseData.getUuid());
PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(caseData.getPerson().getUuid());
StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(person);
mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
titleLayout.addMainRow(mainRowText.toString());
return titleLayout;
}
use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.
the class PersonController method getPersonViewTitleLayout.
public TitleLayout getPersonViewTitleLayout(PersonDto personDto) {
final TitleLayout titleLayout = new TitleLayout();
final String shortUuid = DataHelper.getShortUuid(personDto.getUuid());
final StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(personDto);
mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
titleLayout.addMainRow(mainRowText.toString());
return titleLayout;
}
use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.
the class SampleController method getSampleViewTitleLayout.
public TitleLayout getSampleViewTitleLayout(SampleDto sample) {
TitleLayout titleLayout = new TitleLayout();
titleLayout.addRow(DataHelper.getShortUuid(sample.getUuid()));
titleLayout.addRow(DateFormatHelper.formatDate(sample.getSampleDateTime()));
String mainRowText = SampleReferenceDto.buildCaption(sample.getSampleMaterial(), sample.getAssociatedCase() != null ? sample.getAssociatedCase().getUuid() : null, sample.getAssociatedContact() != null ? sample.getAssociatedContact().getUuid() : null, sample.getAssociatedEventParticipant() != null ? sample.getAssociatedEventParticipant().getUuid() : null);
titleLayout.addMainRow(mainRowText);
return titleLayout;
}
use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.
the class EventController method getEventViewTitleLayout.
public TitleLayout getEventViewTitleLayout(String uuid) {
EventDto event = findEvent(uuid);
TitleLayout titleLayout = new TitleLayout();
titleLayout.addRow(event.getEventStatus().toString());
if (event.getStartDate() != null) {
String eventStartDateLabel = event.getEndDate() != null ? DateFormatHelper.buildPeriodString(event.getStartDate(), event.getEndDate()) : DateFormatHelper.formatDate(event.getStartDate());
titleLayout.addRow(eventStartDateLabel);
}
String shortUuid = DataHelper.getShortUuid(event.getUuid());
String eventTitle = event.getEventTitle();
String mainRowText = StringUtils.isNotBlank(eventTitle) ? eventTitle + " (" + shortUuid + ")" : shortUuid;
titleLayout.addMainRow(mainRowText);
return titleLayout;
}
use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.
the class ImmunizationController method getImmunizationViewTitleLayout.
public TitleLayout getImmunizationViewTitleLayout(String uuid) {
ImmunizationDto immunizationDto = findImmunization(uuid);
TitleLayout titleLayout = new TitleLayout();
String shortUuid = DataHelper.getShortUuid(immunizationDto.getUuid());
PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(immunizationDto.getPerson().getUuid());
StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(person);
mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
titleLayout.addMainRow(mainRowText.toString());
return titleLayout;
}
Aggregations