private void loadCCOSpecialties(String pasMapping) { form.cmbCCOSpecialty().clear(); if(pasMapping != null) { PASSpecialtyCollection collSpec = null; try { collSpec = domain.listCCOSpecialtiesFromConSpc( pasMapping ); } catch (DomainInterfaceException e) { engine.showMessage("PAS Error : " + e.getMessage()); return; } for(int i=0; collSpec != null && i<collSpec.size();i++) { PASSpecialty inst = collSpec.get(i); form.cmbCCOSpecialty().newRow(inst, inst.getText()); } } }
public Specialty getCCOSpecialtyMappingFromPASSpecialty(PASSpecialty pasSpecialty) { if (pasSpecialty == null) return null; BedAdmissionComponent impl = (BedAdmissionComponent) getDomainImpl(BedAdmissionComponentImpl.class); String szMapping = null; for (int i = 0 ; i < pasSpecialty.getMappings().size() ; i++) { if (pasSpecialty.getMappings().get(i).getExtSystem().equals("PAS")) szMapping = pasSpecialty.getMappings().get(i).getExtCode(); } if (szMapping != null) return impl.getSpecialtyMappingFromPASSpecialty(szMapping); else return null; }
public Specialty getCCOSpecialtyMappingFromPASSpecialty(PASSpecialty pasSpecialty) { if (pasSpecialty == null) return null; String szMapping = null; for (int i = 0 ; pasSpecialty.getMappings() != null && i < pasSpecialty.getMappings().size() ; i++) { if (pasSpecialty.getMappings().get(i).getExtSystem().equals("PAS")) szMapping = pasSpecialty.getMappings().get(i).getExtCode(); } if (szMapping != null) return getSpecialtyMappingFromPASSpecialty(szMapping); else return null; }
/** * * @param mos * @param ccCons - used to determine which cc to work with * @param specialty * @param pasSpec */ private void listSpecialtiesForConsultant(IMos mos, String ccCons, Specialty specialty, PASSpecialty pasSpec) { if (ccCons == null) throw new CodingRuntimeException("ccCons cannot be null in method listSpecialtiesForConsultant"); if(ccCons.equals(ACCEPTING_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbConsultantSpecialty().clear(); else if(ccCons.equals(IN_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().clear(); else if(ccCons.equals(OUT_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbOutSpecialty().clear(); else if(ccCons.equals(INFANT_CONSULTANT)) form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().clear(); if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) { //wdev-13927 if(ccCons.equals(ACCEPTING_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbCCOConsultantSpecialty().clear(); else if(ccCons.equals(IN_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().clear(); else if(ccCons.equals(OUT_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbCCOOutSpecialty().clear(); } if(mos != null) { String pasMapping = domain.getPasMappingFromConsultant(mos) ; //WDEV-18573 - if USE_ELECTIVE_LIST_FUNCTIONALITY is TRUE and there are no rows in the specialty combo, // then add in all active Specialty lookups to the combo; will only apply to cmbSpecialty if(ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("CCO")) { loadCCOSpecialties(ccCons, pasMapping, pasSpec); loadSpecialties(ccCons, pasMapping, specialty); } else loadSpecialties(ccCons, pasMapping, specialty); } }
public PASSpecialtyCollection listCCOSpecialtiesFromConSpc(String consultantMapping) throws DomainInterfaceException { if (consultantMapping == null || consultantMapping.equals("")) throw new CodingRuntimeException("consultantMapping cannot be null in method listCCOSpecialtiesFromConSpc"); if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue())) return null; String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue(); PASSpecialtyCollection specColl = new PASSpecialtyCollection(); Conspc conspc = (Conspc) getDTOInstance(Conspc.class); conspc.Filter.clear(); conspc.Filter.Cons = consultantMapping; conspc.list(); ConspcRecord rec; String recordMappings = ""; int count = conspc.DataCollection.count(); for (int i = 0; i < count; i++) { rec = conspc.DataCollection.get(i); recordMappings += "'" + rec.Spcd + "'"; recordMappings += ((count - (i+1)) > 0 ? "," : ""); } if(count > 0) { List specs = getDomainFactory().find("from LookupInstance lkp join lkp.mappings as map where type = " + PASSpecialty.TYPE_ID + " and map.extSystem = 'PAS' and map.extCode in (" + recordMappings + ")"); specColl = constructCCOSpecialtyLookupCollection(specs); } return specColl; }
public PASSpecialty getPASSpecialtyMappingFromSpecialty(String szMapping) { if (szMapping == "") return null; List specs = getDomainFactory().find("from LookupInstance lkp join lkp.mappings as map where type = " + PASSpecialty.TYPE_ID + " and map.extSystem = 'PAS' and map.extCode = '" + szMapping + "'"); PASSpecialtyCollection specColl = constructCCOSpecialtyLookupCollection(specs); return specColl.size() > 0 ? specColl.get(0) : null; }
public PASSpecialtyCollection listCCOSpecialtiesFromConSpc(String consultantMapping) throws DomainInterfaceException { if (consultantMapping == null || consultantMapping.equals("")) throw new CodingRuntimeException("consultantMapping cannot be null in method listCCOSpecialtiesFromConSpc"); if (Boolean.TRUE.equals(ConfigFlag.GEN.USE_ELECTIVE_LIST_FUNCTIONALITY.getValue())) return null; String extSystem = ConfigFlag.DOM.DEMOGRAPHICS_EXT_SYSTEM.getValue(); PASSpecialtyCollection specColl = new PASSpecialtyCollection(); Conspc conspc = (Conspc) getDTOInstance(Conspc.class); conspc.Filter.clear(); conspc.Filter.Cons = consultantMapping; conspc.list(); ConspcRecord rec; StringBuilder recordMappings = new StringBuilder(""); int count = conspc.DataCollection.count(); for (int i = 0; i < count; i++) { rec = conspc.DataCollection.get(i); recordMappings.append("'").append(rec.Spcd).append("'"); recordMappings.append(((count - (i+1)) > 0 ? "," : "")); } if(count > 0) { List specs = getDomainFactory().find("from LookupInstance lkp join lkp.mappings as map where type = " + PASSpecialty.TYPE_ID + " and map.extSystem = 'PAS' and map.extCode in (" + recordMappings + ")"); specColl = constructCCOSpecialtyLookupCollection(specs); } return specColl; }
public PASSpecialty getPASSpecialtyMappingFromSpecialty(String szMapping) { if (szMapping == null || szMapping.equals("")) return null; List specs = getDomainFactory().find("from LookupInstance lkp join lkp.mappings as map where type = " + PASSpecialty.TYPE_ID + " and map.extSystem = 'PAS' and map.extCode = '" + szMapping + "'"); PASSpecialtyCollection specColl = constructCCOSpecialtyLookupCollection(specs); return specColl.size() > 0 ? specColl.get(0) : null; }
private void populateTransferInTabFromData() { clearTransferInTab(); PendingTransfersLiteVo voTransfer = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getValue(); if (voTransfer == null) throw new CodingRuntimeException("No Transfer selected in method populateTransferInTabFromData"); //WDEV-9852 - previously defaulted to Main if(voTransfer.getWardTypeIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().setValue(voTransfer.getWardType()); else form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().setValue(WardType.MAIN); if (voTransfer.getConsultantIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().setValue(voTransfer.getConsultant()); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().setValue(voTransfer.getInpatientEpisode().getPasEvent().getConsultant()); Specialty spec = null; if (voTransfer.getSpecialtyIsNotNull()) spec = voTransfer.getSpecialty(); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull()) spec = voTransfer.getInpatientEpisode().getPasEvent().getSpecialty(); PASSpecialty pasSpec = null; if (voTransfer.getPASSpecialtyIsNotNull()) pasSpec = voTransfer.getPASSpecialty(); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getPASSpecialtyIsNotNull()) pasSpec = voTransfer.getInpatientEpisode().getPasEvent().getPASSpecialty(); listSpecialtiesForConsultant(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue(), IN_CONSULTANT, spec, pasSpec); // //if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway // if(spec != null) // { // if(!form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().getValues().contains(spec)) // form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().newRow(spec, spec.getText()); // } form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().setValue(spec); form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().setValue(pasSpec); form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dtimTransfer().setValue(new DateTime()); if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getEstDischargeDateIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dteDischarge().setValue(voTransfer.getInpatientEpisode().getEstDischargeDate()); form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(true); //WDEV-9790 if(form.getLocalContext().getIsReadOnlyIsNotNull() && form.getLocalContext().getIsReadOnly()) form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(false); }
private void loadCCOSpecialties(String ccCons, String pasMapping, PASSpecialty pasSpec) { // WDEV-18573 if (pasMapping == null) return; PASSpecialtyCollection collSpec = null; try { collSpec = domain.listCCOSpecialtiesFromConSpc(pasMapping); } catch (DomainInterfaceException e) { engine.showMessage("PAS Error : " + e.getMessage()); return; } //wdev-13927 if(ccCons.equals(ACCEPTING_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbCCOConsultantSpecialty().clear(); else if(ccCons.equals(IN_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().clear(); else if(ccCons.equals(OUT_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbCCOOutSpecialty().clear(); for(int i=0;i<collSpec.size();i++) { PASSpecialty inst = collSpec.get(i); if(ccCons.equals(ACCEPTING_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbCCOConsultantSpecialty().newRow(inst, inst.getText()); else if(ccCons.equals(IN_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().newRow(inst, inst.getText()); else if(ccCons.equals(OUT_CONSULTANT)) form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbCCOOutSpecialty().newRow(inst, inst.getText()); } if (pasSpec != null) { if(ccCons.equals(ACCEPTING_CONSULTANT)) { if(!form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbCCOConsultantSpecialty().getValues().contains(pasSpec)) form.lyrDetail().tabTransfer().lyrTransfer().tabConsultant().cmbCCOConsultantSpecialty().newRow(pasSpec, pasSpec.getText()); } else if(ccCons.equals(IN_CONSULTANT)) { if(!form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().getValues().contains(pasSpec)) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().newRow(pasSpec, pasSpec.getText()); } else if(ccCons.equals(OUT_CONSULTANT)) { if(!form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbCCOOutSpecialty().getValues().contains(pasSpec)) form.lyrDetail().tabTransfer().lyrTransfer().tabOut().cmbCCOOutSpecialty().newRow(pasSpec, pasSpec.getText()); } } }
public PASSpecialty getPASSpecialtyMappingFromSpecialty(String szMapping) { BedAdmissionComponent impl = (BedAdmissionComponent) getDomainImpl(BedAdmissionComponentImpl.class); return impl.getPASSpecialtyMappingFromSpecialty(szMapping); }
public PASSpecialty getPASSpecialtyMappingFromSpecialty(Specialty specialty) { // TODO Auto-generated method stub return null; }
private PASSpecialtyCollection constructCCOSpecialtyLookupCollection(List specs) { if (specs == null) throw new CodingRuntimeException("specs cannot be null in method constructCCOSpecialtyLookupCollection"); PASSpecialtyCollection collSpec = new PASSpecialtyCollection(); for(java.util.Iterator iterator = specs.iterator(); iterator.hasNext(); ) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; ims.domain.lookups.LookupInstance instance = (ims.domain.lookups.LookupInstance) iterator.next(); if (instance.getImage() != null) { img = new ims.framework.utils.ImagePath(instance.getImage().getImageId(), instance.getImage().getImagePath()); } else { img = null; } color = instance.getColor(); if (color != null) color.getValue(); PASSpecialty voInstance = new PASSpecialty(instance.getId(),instance.getText(), instance.isActive(), null, img, color); PASSpecialty parentVoInstance = voInstance; ims.domain.lookups.LookupInstance parent = instance.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(); parentVoInstance.setParent(new PASSpecialty(parent.getId(),parent.getText(), parent.isActive(), null, img, color)); parentVoInstance = parentVoInstance.getParent(); parent = parent.getParent(); } LookupMappingVoCollection voMapColl = new LookupMappingVoCollection(); for(java.util.Iterator iteratorMap = instance.getMappings().iterator(); iteratorMap.hasNext(); ) { LookupMapping instanceMap = (LookupMapping) iteratorMap.next(); voMapColl.add(new LookupMappingVo(instanceMap.getExtSystem(), instanceMap.getExtCode())); } voInstance.setMappings(voMapColl); collSpec.add(voInstance); } return collSpec; }