private void loadGPsPractice(GpShortVo vo) { GP gpVo = domain.getGP(vo); if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0) { for (int i = 0 ; i < gpVo.getPractices().size() ; i++) { if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() && gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() ) { form.qmbReferringOrg().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null); form.qmbReferringOrg().setValue(gpVo.getPractices().get(i).getPractice()); } } } }
private void insertgrdGpAdressee(GpShortVo gpShortVo, LocSiteShortVo locSiteShortVo) { if (gpShortVo == null || locSiteShortVo == null) return; RecipientVo gpRecipVo = new RecipientVo(); GenForm.lyrCorrespondenceDetailLayer.tabRecipientsContainer.grdAdresseeRow row = form.lyrCorrespondenceDetail().tabRecipients().grdAdressee().getRows().newRow(); GpShortVo voGP = (GpShortVo) gpShortVo; PersonAddress surgeryAddress = null; if (locSiteShortVo.getAddressIsNotNull()) { surgeryAddress = locSiteShortVo.getAddress(); row.setAddress(surgeryAddress.toDisplayString()); } row.setGP(form.getImages().Admin.StaffBlue); gpRecipVo.setName(voGP.getName()); gpRecipVo.setAddress(surgeryAddress); gpRecipVo.setRecipientType(RecipientType.EXTERNAL_GP); row.setValue(gpRecipVo); row.setAdressee(voGP.getName().toString()); }
private String getReferalGpTooltip(GpShortVo gp) { if (gp == null) { if (form.getMode().equals(FormMode.EDIT)) { form.imbReferralGP().setVisible(true); } else { form.imbReferralGP().setVisible(false); } return "No GP Details"; } StringBuffer sbGPDetails = new StringBuffer(); if (gp.getNameIsNotNull()) { sbGPDetails.append(Textile.setBold("GP DETAILS") + "\r" + Textile.setBold("GP Name: ") + gp.getName().toString()); form.txtReferralGP().setValue(gp.getName().toString()); } return new Textile().process(sbGPDetails.toString()); }
public GpShortVo getGpPatient(PatientRefVo patient) { if(patient == null) throw new CodingRuntimeException("Patient not provided"); DomainFactory factory = getDomainFactory(); String hsql = "select g1_1 from Patient as p1_1 left join p1_1.gp as g1_1 where (p1_1.id = :id)"; List gps = factory.find(hsql, new String[] {"id"}, new Object[] {patient.getID_Patient()}); if(gps != null && gps.size() > 0) { GpShortVoCollection gpColl = GpShortVoAssembler.createGpShortVoCollectionFromGp(gps); if(gpColl != null && gpColl.size() > 0) return gpColl.get(0); } return null; }
protected final void renderGpShortVoToXCN(GpShortVo gp,XCN xcn,ProviderSystemVo providerSystem) throws DataTypeException { LOG.debug("VoMapper renderGpShortVoToXCN: entry"); if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getForenameIsNotNull()) xcn.getGivenName().setValue(gp.getName().getForename()); if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getSurnameIsNotNull()) xcn.getFamilyName().getSurname().setValue(gp.getName().getSurname()); TaxonomyMap mapping = null; if (gp!=null) mapping = gp.getExternalCode(TaxonomyType.NAT_GP_CODE); if(mapping!=null) { xcn.getIDNumber().setValue(mapping.getTaxonomyCode()); } if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getTitleIsNotNull()) xcn.getPrefixEgDR().setValue(svc.getRemoteLookup(gp.getName().getTitle().getID(), providerSystem.getCodeSystem().getText())); LOG.debug("VoMapper renderGpShortVoToXCN: exit"); }
public GpShortVo getNewGpBasedOnSearchCriteria() { GpShortVo voGpShort = new GpShortVo(); voGpShort.setName(new PersonName()); String forname = form.txtSearchForename().getValue(); String surname = form.txtSearchSurname().getValue(); TaxonomyType type = form.cmbSearchCodeType().getValue(); voGpShort.getName().setForename(forname); voGpShort.getName().setUpperForename(forname != null ? forname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperForenameMaxLength(), forname.length())) : null); voGpShort.getName().setSurname(surname); voGpShort.getName().setUpperSurname(surname != null ? surname.toUpperCase().substring(0, Math.min(voGpShort.getName().getUpperSurnameMaxLength(), surname.length())) : null); if (type != null) { voGpShort.setCodeMappings(new TaxonomyMapCollection()); TaxonomyMap taxonomyMap = new TaxonomyMap(); taxonomyMap.setTaxonomyName(type); taxonomyMap.setTaxonomyCode(form.txtSearchCode().getValue()); voGpShort.getCodeMappings().add(taxonomyMap); } return voGpShort; }
protected void onChkPatientsGpValueChanged() throws PresentationLogicException { GpShortVo patientGp = null; form.getLocalContext().setGPInfo(form.getGlobalContext().RefMan.getPatientsGP()); if (form.chkPatientsGp().getValue()) { form.getLocalContext().setGPInfo(form.getGlobalContext().RefMan.getPatientsGP()); if (form.getGlobalContext().RefMan.getPatientsGPIsNotNull()) patientGp = form.getGlobalContext().RefMan.getPatientsGP(); else if (form.getGlobalContext().Core.getPatientShortIsNotNull()) patientGp = form.getLocalContext().getpatientsGp();// domain.getPatientGP(form.getGlobalContext().Core.getPatientShort().getID_Patient()); if (patientGp != null) populateGPDetailsPanelFromData(patientGp); else onReferrerTypeSelectionChanged(); } else if (!form.chkPatientsGp().getValue()) onReferrerTypeSelectionChanged(); else onReferrerTypeSelectionChanged(); }
private void addGpToGrid(GpShortVo voGp) { //check if this GP already exists for (int i = 0; i < form.lyrDetails().tabRecipents().grdRecipients().getRows().size(); i++) { if(form.lyrDetails().tabRecipents().grdRecipients().getRows().get(i).getValue() != null) { if(form.lyrDetails().tabRecipents().grdRecipients().getRows().get(i).getValue().getGeneralPractitionerIsNotNull() && form.lyrDetails().tabRecipents().grdRecipients().getRows().get(i).getValue().getGeneralPractitioner().getID_Gp().equals(voGp.getID_Gp())) { engine.showMessage("This GP was already added !"); return; } } } grdRecipientsRow row = form.lyrDetails().tabRecipents().grdRecipients().getRows().newRow(); ClinicalCorrespondenceRecipientsVo recipient = new ClinicalCorrespondenceRecipientsVo(); recipient.setGeneralPractitioner(voGp); recipient.setPatient(Boolean.FALSE); row.setValue(recipient); row.setcolName((voGp.getName().getForename() != null ? voGp.getName().getForename():"") + " " + (voGp.getName().getSurname()!= null ? voGp.getName().getSurname():"")); //wdev-10872 row.setcolPrimary(false); }
private void loadGPsPractice(GpShortVo vo) { GP gpVo = domain.getGP(vo); if (gpVo.getPracticesIsNotNull() && gpVo.getPractices().size() > 0) { for (int i = 0 ; i < gpVo.getPractices().size() ; i++) { if (gpVo.getPractices().get(i).getIsPrimaryPracticeIsNotNull() && gpVo.getPractices().get(i).getIsPrimaryPractice().booleanValue() ) { form.qmbRefOrganisation().newRow(gpVo.getPractices().get(i).getPractice(), gpVo.getPractices().get(i).getPractice().getName(), null, null); form.qmbRefOrganisation().setValue(gpVo.getPractices().get(i).getPractice()); } } } }
protected final void renderGpShortVoToXCN(GpShortVo gp, XCN xcn, ProviderSystemVo providerSystem) throws DataTypeException { LOG.debug("VoMapper renderGpShortVoToXCN: entry"); if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getForenameIsNotNull()) xcn.getGivenName().setValue(gp.getName().getForename()); if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getSurnameIsNotNull()) xcn.getFamilyName().getSurname().setValue(gp.getName().getSurname()); TaxonomyMap mapping = null; if (gp!=null) mapping = gp.getExternalCode(TaxonomyType.NAT_GP_CODE); if(mapping!=null) { xcn.getIDNumber().setValue(mapping.getTaxonomyCode()); } if(gp!=null&&gp.getNameIsNotNull()&&gp.getName().getTitleIsNotNull()) xcn.getPrefixEgDR().setValue(svc.getRemoteLookup(gp.getName().getTitle().getID(), providerSystem.getCodeSystem().getText())); LOG.debug("VoMapper renderGpShortVoToXCN: exit"); }
@Override protected void onQmbReferredByValueChanged() throws PresentationLogicException { if (form.qmbReferredBy().getValue() instanceof GpShortVo) { loadGPsPractice((GpShortVo)form.qmbReferredBy().getValue()); } }
private void populateGpGrid(GpShortVoCollection collection) { form.grdGps().getRows().clear(); GpShortVo voGpPract = null; GenForm.grdGpsRow row = null; for(int i=0;i<collection.size();i++) { voGpPract = collection.get(i); row = form.grdGps().getRows().newRow(); row.setName(voGpPract.getName().toString()); if (null != voGpPract && voGpPract.getPracticesIsNotNull()) { for (int j=0; j < voGpPract.getPractices().size(); j++) { if (voGpPract.getPractices().get(j).getIsPrimaryPracticeIsNotNull() && (voGpPract.getPractices().get(j).getIsPrimaryPractice().equals(Boolean.TRUE)) && //WDEV-2725 voGpPract.getPractices().get(j).getPracticeIsNotNull() && voGpPract.getPractices().get(j).getPractice().getAddressIsNotNull()) { row.setAddress(voGpPract.getPractices().get(j).getPractice().getAddress().toDisplayString()); break; } } } if (voGpPract.getStatusIsNotNull()) row.setStatus(voGpPract.getStatus().toString()); row.setValue(voGpPract); } }
protected void onGrdGPSSelectionChanged() throws ims.framework.exceptions.PresentationLogicException { //populate control details GenForm.grdGpsRow row = form.grdGps().getRows().get(form.grdGps().getSelectedRowIndex()); GpShortVo voGp = row.getValue(); if (null == voGp) return; if (voGp.getPracticesIsNotNull()) { //WDEV-2725 if (row.getValue().getPractices().get(0).getPracticeIsNotNull() && row.getValue().getPractices().get(0).getPractice().getAddressIsNotNull()) { form.txtGPAddress1().setValue(row.getValue().getPractices().get(0).getPractice().getAddress().getLine1()); form.txtGPAddress2().setValue(row.getValue().getPractices().get(0).getPractice().getAddress().getLine2()); form.txtGPAddress3().setValue(row.getValue().getPractices().get(0).getPractice().getAddress().getLine3()); form.txtGPAddress4().setValue(row.getValue().getPractices().get(0).getPractice().getAddress().getLine4()); } } // TODO form.txtGPLocation().setValue(row.getValue().get) if (voGp.getNameIsNotNull()) form.txtGPName().setValue(voGp.getName().toString()); form.txtGPPhone().setValue(row.getValue().getMobile()); form.btnSelectGP().setVisible(true); form.btnSelectGP().setEnabled(true); }
private void refreshGpDetails(GpShortVo gp, LocSiteShortVo gpSurgery) { form.getGlobalContext().Core.setGPDetails(gp); form.getGlobalContext().Core.setGPSurgery(gpSurgery); form.imbGP().setTooltip(getGpTooltip(gp, gpSurgery)); if (gpSurgery != null) form.txtGPPractice().setValue(gpSurgery.getName()); if (gp != null) form.txtGPName().setValue(gp.getName().toString()); }
private void setPracticePhoneAndFax(OrganisationWithSitesVo practice) { if (practice.getCommChannelsIsNotNull()) //WDEV-16051 { GpShortVo gp = form.getGlobalContext().Core.getGPDetails(); // WORK PHONE CommChannelVo gpWorkPhone = gp.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE); CommChannelVo practiceWorkPhone = practice.getCommChannels().getCommunicationChannel(ChannelType.WORK_PHONE); if (gpWorkPhone != null && gpWorkPhone.getCommValueIsNotNull()) { form.txtPhone().setValue(gpWorkPhone.toString()); form.lblPhone().setValue("GP Phone:"); } else if (practiceWorkPhone != null && practiceWorkPhone.getCommValueIsNotNull()) { form.txtPhone().setValue(practiceWorkPhone.toString()); form.lblPhone().setValue("Practice Phone:"); } else form.lblPhone().setValue("Practice Phone:"); // FAX NUMBER CommChannelVo gpFax = gp.getCommChannels().getCommunicationChannel(ChannelType.FAX); CommChannelVo practiceFax = practice.getCommChannels().getCommunicationChannel(ChannelType.FAX); if (gpFax != null && gpFax.getCommValueIsNotNull()) { form.txtFax().setValue(gpFax.toString()); form.lblFax().setValue("GP Fax:"); } else if (practiceFax != null && practiceFax.getCommValueIsNotNull()) { form.txtFax().setValue(practiceFax.toString()); form.lblFax().setValue("Practice Fax:"); } else form.lblFax().setValue("Practice Fax:"); } }
private String getMappingForGp(GpShortVo gp) { if(gp != null && gp.getCodeMappingsIsNotNull()) return gp.getCodeMappings().getMappingValue(TaxonomyType.PAS); return ""; }
private GpToPracticesVoCollection newGpToPracticesCollectionFromDTORecord(Gp_practiceRecord gp_practice_record, GpShortVo voGP ) { GpToPracticesVo voGpToPractice = new GpToPracticesVo(); voGpToPractice.setGp(voGP); voGpToPractice.setGpCode(gp_practice_record.Gp_code); // TODO voGpToPractice.setPractice(voGPPractice); voGpToPractice.setIsPrimaryPractice(Boolean.TRUE); GpToPracticesVoCollection voCollGpToPractices = new GpToPracticesVoCollection(); voCollGpToPractices.add(voGpToPractice); return voCollGpToPractices; }
protected void onCmbSourceOfReferralValueChanged() throws PresentationLogicException { form.txtReferralGP().setValue(null); form.txtOther().setValue(null); if (!ReferredBy.GP.equals(form.cmbSourceOfReferral().getValue())) { form.txtReferralGP().setValue(null); form.imbReferralGP().setTooltip("Find and Select GP");//WDEV-17297 } if (!ReferredBy.OTHER.equals(form.cmbSourceOfReferral().getValue())) { form.txtOther().setValue(null); form.imbReferralGP().setTooltip("Find and Select GP");//WDEV-17297 } if (ReferredBy.GP.equals(form.cmbSourceOfReferral().getValue()) && form.txtReferralGP().getValue() == null) { GpShortVo gpShortVo = domain.getGpPatient(form.getGlobalContext().Core.getPatientShort()); form.getLocalContext().setSelectedGp(gpShortVo); if (gpShortVo != null) { form.txtReferralGP().setValue(gpShortVo.getNameIsNotNull() ? gpShortVo.getName().toString() : ""); form.imbReferralGP().setTooltip(getReferalGpTooltip(gpShortVo)); } } updateControlState(); }