protected final void renderNameVoToXPN(PersonName name, XPN xpn,ProviderSystemVo providerSystem) throws Exception { LOG.debug("VoMapper renderNameVoToXPN: entry"); if (name == null) return; xpn.getFamilyName().getSurname().setValue(name.getSurname()); xpn.getGivenName().setValue(name.getForename()); xpn.getSecondAndFurtherGivenNamesOrInitialsThereof().setValue(name.getMiddleName()); if (name.getTitleIsNotNull()) xpn.getPrefixEgDR().setValue(svc.getRemoteLookup(name.getTitle().getID(), providerSystem.getCodeSystem().getText())); if (name.getNameTypeIsNotNull()) { xpn.getNameTypeCode().setValue(svc.getRemoteLookup(name.getNameType().getID(), providerSystem.getCodeSystem().getText())); } else { xpn.getNameTypeCode().setValue(svc.getRemoteLookup( NameType.LEGAL.getID(), providerSystem.getCodeSystem().getText())); } LOG.debug("VoMapper renderNameVoToXPN: exit (" + xpn.toString() + ")"); }
private PersonName populateLodgerNameDataFromScreen(HealthyLodgerVo healthyLodgerDetails) { PersonName lodgerName = healthyLodgerDetails.getName() == null ? new PersonName() : (PersonName) healthyLodgerDetails.getName().clone(); lodgerName.setSurname(form.txtLodgerSurname().getValue()); lodgerName.setForename(form.txtLodgerForename().getValue()); lodgerName.setMiddleName(form.txtLodgerMiddlename().getValue()); lodgerName.setTitle(form.cmbLodgerTitle().getValue()); lodgerName.setNameType(NameType.CURRENT); lodgerName.setUppers(); return lodgerName; }
public Boolean populateScreenFromData(Patient pat) { if (pat.getNameIsNotNull()) { form.cmbTitle().setValue(pat.getName().getTitle()); form.txtSurname().setValue(pat.getName().getSurname()); form.txtForename().setValue(pat.getName().getForename()); form.txtMiddleName().setValue(pat.getName().getMiddleName()); } form.txtMaidenName().setValue(null); if(pat.getOtherNames() != null) { PersonName maidenName = null; for(PersonName pn : pat.getOtherNames()) { if(NameType.MAIDEN.equals(pn.getNameType())) { maidenName = pn; break; } } //WDEV-23178 if(maidenName != null) form.txtMaidenName().setValue(maidenName.getSurname()); } form.cmbSex().setValue(pat.getSex()); form.pdtDOB().setValue(pat.getDob()); form.txtAge().setValue(pat.calculateAgeText()); form.dteDod().setValue(pat.getDod()); form.timTod().setValue(pat.getTimeOfDeath()); form.timTod().setTooltip(pat.getDodIsNotNull() && pat.getTimeOfDeath() == null ? "Time of Death<br/>Unknown/Not Recorded" : null); if (engine.hasRight(AppRight.ALLOW_MARK_PATIENT_AS_DECEASED) && form.getGlobalContext().Core.getPatientShort().getDodIsNotNull()) { form.btnDeceased().setText("Update Death Details"); form.btnDeceased().setVisible(true); //WDEV-16548 form.dteDod().setVisible(true); form.timTod().setVisible(true); } if (pat.getOtherNamesIsNotNull() && pat.getOtherNames().size() > 0) { if (pat.getMaidenName() != null) { form.imbOtherNames().setTooltip("<b>OTHER NAMES<br><br>Maiden Name: </b>" + pat.getMaidenName().toString()); } form.getGlobalContext().Core.setOtherNames(pat.getOtherNames()); } else { //form.imbOtherNames().setVisible(false); form.imbOtherNames().setTooltip("No Other Names"); } displayCaseNoteFolder(pat.getPatId(PatIdType.HOSPNUM)); //WDEV-22562 form.GroupVisitor().setValue((pat.getHasLivedUKIsNotNull() || pat.getOverseasVisitorIsNotNull()) ? (Boolean.TRUE.equals(pat.getHasLivedUK()) || !Boolean.TRUE.equals(pat.getOverseasVisitor()) ? GroupVisitorEnumeration.rdoYes : GroupVisitorEnumeration.rdoNo) : GroupVisitorEnumeration.None); form.cmbVisitorStatus().setValue(pat.getOverseasClassification()); form.cmbReligion().setValue(pat.getReligion()); form.cmbEthnicCategory().setValue(pat.getEthnicOrigin()); form.cmbMaritialStatus().setValue(pat.getMaritalStatus()); form.txtOccupation().setValue(pat.getTxtOccupation()); form.txtOccupation().setTooltip(pat.getTxtOccupation()); //WDEV-22882 form.cmbOccupation().setValue(pat.getOccupation()); if(pat.getSchoolOrCollegeIsNotNull()) { form.qmbSchool().newRow(pat.getSchoolOrCollege(), pat.getSchoolOrCollege().getText()); form.qmbSchool().setValue(pat.getSchoolOrCollege()); } return Boolean.TRUE; }
public NameType getNameTypeByPdsMapping(String type) { NameType lkp = (NameType)domain.getLookupService().getLocalLookup(NameType.class, NameType.TYPE_ID, "PDS", type); return lkp; }
protected final PersonName populateNameVoFromXPN(PersonName name, XPN xpn,ProviderSystemVo providerSystem) { LOG.debug("VoMapper populateNameVoFromXPN: entry"); if (xpn == null) return name; if (name == null) { name = new PersonName(); } String surname = xpn.getFamilyName().getSurname().getValue(); if (surname != null && surname.equals(Hl7Null)) name.setSurname(null); else if (surname != null) name.setSurname(surname); String forename = xpn.getGivenName().getValue(); if (forename != null && forename.equals(Hl7Null)) name.setForename(null); else if (forename != null) name.setForename(forename); String midName = xpn.getSecondAndFurtherGivenNamesOrInitialsThereof().getValue(); if (midName != null && midName.equals(Hl7Null)) name.setMiddleName(null); else if (midName != null) name.setMiddleName(midName); String titleTxt = xpn.getPrefixEgDR().getValue(); if (titleTxt != null && titleTxt.equals(Hl7Null)) name.setTitle(null); else if (titleTxt != null) name.setTitle(getTitleLookup(titleTxt,providerSystem)); String nmType = xpn.getNameTypeCode().getValue(); if (nmType != null && nmType.equals(Hl7Null)) name.setNameType(null); else if (nmType != null) name.setNameType((NameType) svc.getLocalLookup(NameType.class, NameType.TYPE_ID, providerSystem.getCodeSystem().getText(), nmType)); LOG.debug("VoMapper populateNameVoFromXPN: exit (" + name.toShortForm() + ")"); if (name.getSurname() == null && name.getForename() == null && name.getMiddleName() == null && name.getTitle() == null && name.getNameType() == null) { return null; } else return name; }