public static List<BreadCrumb> initBreadCrumb(Client client, WorkType type, Lpu lpu, Collaborator coll) {
List<BreadCrumb> pageBreadcrumb = new LinkedList<BreadCrumb>();
List<BreadCrumbParam> params = new LinkedList<BreadCrumbParam>();
if(client != null) {
pageBreadcrumb.add(new BreadCrumb("", client.toString(), "/reception/index.htm"));
params.add(new BreadCrumbParam("client", client.getId()));
}
if(type != null) {
pageBreadcrumb.add(new BreadCrumb("записывается на прием к специалисту", type.toString().toLowerCase(),
"/reception/work.htm", new LinkedList<BreadCrumbParam>(params)));
params.add(new BreadCrumbParam("type", type.getId()));
}
if (lpu != null) {
pageBreadcrumb.add(new BreadCrumb("в поликлинику", lpu.toString(),
"/reception/lpu.htm", new LinkedList<BreadCrumbParam>(params)));
params.add(new BreadCrumbParam("lpu", lpu.getId()));
}
if (coll != null) {
pageBreadcrumb.add(new BreadCrumb("к врачу", coll.getClient().toString(),
"/reception/collaborator.htm", new LinkedList<BreadCrumbParam>(params)));
}
return pageBreadcrumb;
}