private PersonName extractPersonNameFromGPPracticeRecord(Gp_practiceRecord gp_practice_record) { if (gp_practice_record == null || gp_practice_record.Gp_surname == null || gp_practice_record.Gp_first_name == null) return null; PersonName voPersonName = new PersonName(); PersonTitle voPersonTitle = new PersonTitle(); voPersonTitle.setText(gp_practice_record.Gp_title == null ? null: gp_practice_record.Gp_title); voPersonName.setTitle(voPersonTitle); voPersonName.setForename(gp_practice_record.Gp_first_name); voPersonName.setSurname(gp_practice_record.Gp_surname); voPersonName.setUppers(); return voPersonName; }
private PersonTitle getTitleLookup(String titleTxt,ProviderSystemVo providerSystem) { if (titleTxt == null) return null; String modifiedText = titleTxt.toUpperCase().trim().replaceAll("\\.", ""); PersonTitle titleValue =(PersonTitle) svc.getLocalLookup(PersonTitle.class, PersonTitle.TYPE_ID, providerSystem.getCodeSystem().getText(), modifiedText); if (titleValue != null) return titleValue; else return (PersonTitle)addLookupInstanceMapping(PersonTitle.class, PersonTitle.TYPE_ID, titleTxt, modifiedText, providerSystem.getCodeSystem().getText()); }
private PersonTitle assembleTitleLookupItem(LookupInstance title) { if(title == null) return null; ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (title.getImage() != null) { img = new ims.framework.utils.ImagePath(title.getImage().getImageId(), title.getImage().getImagePath()); } color = title.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.PersonTitle voLookup = new ims.core.vo.lookups.PersonTitle(title.getId(),title.getText(), title.isActive(), null, img, color); ims.core.vo.lookups.PersonTitle parentVoLookup = voLookup; ims.domain.lookups.LookupInstance parent = title.getParent(); while (parent != null) { if (parent.getImage() != null) { img = new ims.framework.utils.ImagePath(parent.getImage().getImageId(), parent.getImage().getImagePath() ); } else { img = null; } color = parent.getColor(); if (color != null) color.getValue(); parentVoLookup.setParent(new ims.core.vo.lookups.PersonTitle(parent.getId(),parent.getText(), parent.isActive(), null, img, color)); parentVoLookup = parentVoLookup.getParent(); parent = parent.getParent(); } return voLookup; }
public PersonTitle getPatientTitle(String pdsTitle) { PersonTitle title = (PersonTitle)domain.getLookupService().getLocalLookup(PersonTitle.class, PersonTitle.TYPE_ID, "PDS", pdsTitle); return title; }