Java 类ims.core.vo.SupportNetworkServicesVo 实例源码
项目:AvoinApotti
文件:Logic.java
private boolean foundActiveSupportNetworkServices(SupportNetworkServicesVo[] voColl)
{
if (voColl != null)
{
for (int i=0;i< voColl.length; i++)
{
if (Boolean.TRUE.equals(voColl[i].getIsCurrentlyActive()))
{
return true;
}
}
}
return false;
}
项目:AvoinApotti
文件:Logic.java
private void newServicesInstance()
{
form.lyrSupportServices().tabPageServices().btnInactivateService().setVisible(false);
form.setMode(FormMode.EDIT);
form.getContextMenus().Emergency.hideAllSupportNetworkServicesMenuItems();
clearServiceDetails();
SupportNetworkServicesVo voService = new SupportNetworkServicesVo();
form.lyrSupportServices().tabPageServices().customControlAuthSer().initializeComponent();
form.lyrSupportServices().tabPageServices().customControlAuthSer().setIsRequiredPropertyToControls(Boolean.TRUE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
form.lyrSupportServices().tabPageServices().grdServices().setValue(null);
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(true);
form.lyrSupportServices().tabPageServices().cmbService().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(true);
if (form.getLocalContext().getPatientNoSupportNetworkServicesInfoIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setValue(false);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(false);
}
enableAuthoringHCPCustomControls();
form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true);
}
项目:openMAXIMS
文件:Logic.java
private boolean foundActiveSupportNetworkServices(SupportNetworkServicesVo[] voColl)
{
if (voColl != null)
{
for (int i=0;i< voColl.length; i++)
{
if (Boolean.TRUE.equals(voColl[i].getIsCurrentlyActive()))
{
return true;
}
}
}
return false;
}
项目:openMAXIMS
文件:Logic.java
private void newServicesInstance()
{
form.lyrSupportServices().tabPageServices().btnInactivateService().setVisible(false);
form.setMode(FormMode.EDIT);
form.getContextMenus().Emergency.hideAllSupportNetworkServicesMenuItems();
clearServiceDetails();
SupportNetworkServicesVo voService = new SupportNetworkServicesVo();
form.lyrSupportServices().tabPageServices().customControlAuthSer().initializeComponent();
form.lyrSupportServices().tabPageServices().customControlAuthSer().setIsRequiredPropertyToControls(Boolean.TRUE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
form.lyrSupportServices().tabPageServices().grdServices().setValue(null);
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(true);
form.lyrSupportServices().tabPageServices().cmbService().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(true);
if (form.getLocalContext().getPatientNoSupportNetworkServicesInfoIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setValue(false);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(false);
}
enableAuthoringHCPCustomControls();
form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true);
}
项目:openMAXIMS
文件:Logic.java
private boolean foundActiveSupportNetworkServices(SupportNetworkServicesVo[] voColl)
{
if (voColl != null)
{
for (int i=0;i< voColl.length; i++)
{
if (Boolean.TRUE.equals(voColl[i].getIsCurrentlyActive()))
{
return true;
}
}
}
return false;
}
项目:openMAXIMS
文件:Logic.java
private void newServicesInstance()
{
form.lyrSupportServices().tabPageServices().btnInactivateService().setVisible(false);
form.setMode(FormMode.EDIT);
form.getContextMenus().Emergency.hideAllSupportNetworkServicesMenuItems();
clearServiceDetails();
SupportNetworkServicesVo voService = new SupportNetworkServicesVo();
form.lyrSupportServices().tabPageServices().customControlAuthSer().initializeComponent();
form.lyrSupportServices().tabPageServices().customControlAuthSer().setIsRequiredPropertyToControls(Boolean.TRUE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
form.lyrSupportServices().tabPageServices().grdServices().setValue(null);
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(true);
form.lyrSupportServices().tabPageServices().cmbService().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(true);
if (form.getLocalContext().getPatientNoSupportNetworkServicesInfoIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setValue(false);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(false);
}
enableAuthoringHCPCustomControls();
form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true);
}
项目:openmaxims-linux
文件:Logic.java
private boolean foundActiveSupportNetworkServices(SupportNetworkServicesVo[] voColl)
{
if (voColl != null)
{
for (int i=0;i< voColl.length; i++)
{
if (Boolean.TRUE.equals(voColl[i].getIsCurrentlyActive()))
{
return true;
}
}
}
return false;
}
项目:openmaxims-linux
文件:Logic.java
private void newServicesInstance()
{
form.lyrSupportServices().tabPageServices().btnInactivateService().setVisible(false);
form.setMode(FormMode.EDIT);
form.getContextMenus().Emergency.hideAllSupportNetworkServicesMenuItems();
clearServiceDetails();
SupportNetworkServicesVo voService = new SupportNetworkServicesVo();
form.lyrSupportServices().tabPageServices().customControlAuthSer().initializeComponent();
form.lyrSupportServices().tabPageServices().customControlAuthSer().setIsRequiredPropertyToControls(Boolean.TRUE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
form.lyrSupportServices().tabPageServices().grdServices().setValue(null);
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(true);
form.lyrSupportServices().tabPageServices().cmbService().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(true);
if (form.getLocalContext().getPatientNoSupportNetworkServicesInfoIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setValue(false);
form.lyrSupportServices().tabPageServices().chkNoneAtPresentSer().setVisible(false);
}
enableAuthoringHCPCustomControls();
form.lyrSupportServices().tabPageServices().txtFrequency().setEnabled(true);
form.lyrSupportServices().tabPageServices().txtCommentsService().setEnabled(true);
}
项目:AvoinApotti
文件:Logic.java
private void insertServices()
{
form.grdDetails().getRows().clear();
Boolean bActiveOnly = Boolean.TRUE;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);
if (voColl != null && voColl.size()>0)
{
SupportNetworkServicesVo vo = null;
GenForm.grdDetailsRow row = null;
for(int i=0;i<voColl.size();i++)
{
vo = voColl.get(i);
row = form.grdDetails().getRows().newRow();
if (vo.getSuppliedServiceIsNotNull())
row.setComunityService(vo.getSuppliedService().getName());
else if (vo.getServiceIsNotNull())
row.setComunityService(vo.getService().getServiceName());
row.setCurrentFrequency(vo.getFrequencyOfService());
//create Community Service vo
CommunityServiceVo voComSer = new CommunityServiceVo();
voComSer.setCurrentFrequency(vo.getFrequencyOfService());
//copy if supplied
if (vo.getSuppliedServiceIsNotNull())
{
SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
voSerProfDet.setName(vo.getSuppliedService().getName());
voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
voComSer.setSuppliedService(voSerProfDet);
}
voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
voComSer.setService(vo.getService());
voComSer.setLocationService(vo.getLocationService());
voComSer.setIsCurrentlyActive(new Boolean(true));
voComSer.setComments(vo.getComments());
String[] arrErrors = voComSer.validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
}
try
{
domain.saveCommunitService(voComSer);
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
return;
}
row.setValue(voComSer);
}
}
}
项目:AvoinApotti
文件:Logic.java
private boolean saveService()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
ArrayList screenErrors = new ArrayList();
if (form.lyrProServices().tabServices().cmbService().getValue() == null)
{
screenErrors.add("Please select a Service Type");
}
if ((!form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().cmbLocation().getValue() == null)
{
screenErrors.add("Please select a Location");
}
if ((form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().txtAreaLoc().getValue() == null)
{
screenErrors.add("Please state a Location");
}
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
String[] arrErrors = voService.validate();
if (arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
// WDEV-2257 - save based on Patient Only
domain.saveSupportNetworkServicesForPatient(voService, form.getGlobalContext().Core.getPatientShort());
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
open();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:AvoinApotti
文件:Logic.java
private void populateServiceDataFromScreen()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
if (voService.getID_SupportNetworkServices() == null)
{
voService.setIsCurrentlyActive(Boolean.TRUE);
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
{
SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();
voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
// supplied area/location
voService.setSuppliedService(voServiceProf);
}
else
{
if (form.getLocalContext().getlocationService() != null)
voService.setLocationService(form.getLocalContext().getlocationService());
voService.setSuppliedService(null);
}
voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
}
else
{
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
//WDEV-17560
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
{
voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
}
}
form.getLocalContext().setsupportNetworkService(voService);
}
项目:AvoinApotti
文件:Logic.java
private void populateInstanceControl(SupportNetworkServicesVo voService)
{
clearServiceDetails();
form.getLocalContext().setRieRecord(voService);
form.getContextMenus().getLIPUpdateItem().setVisible(true);
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(true);
form.lyrProServices().tabServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrProServices().tabServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrProServices().tabServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrProServices().tabServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getService());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(true);
form.lyrProServices().tabServices().cmbLocation().setVisible(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(false);
if (voService.getLocationService().getLocation() != null)
{
if (locationExistsInCombo(voService.getLocationService().getLocation()) == false)
form.lyrProServices().tabServices().cmbLocation().newRow(voService.getLocationService().getLocation(), voService.getLocationService().getLocation().getName());
form.lyrProServices().tabServices().cmbLocation().setValue(voService.getLocationService().getLocation());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(false);
form.lyrProServices().tabServices().cmbLocation().setVisible(true);
cmbLocationValueChanged();
}
form.lyrProServices().tabServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrProServices().tabServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrProServices().tabServices().txtCommentsService().setValue(voService.getComments());
form.btnUpdate().setEnabled(true);
}
项目:AvoinApotti
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getsupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:AvoinApotti
文件:Logic.java
protected void onCmbEpisodeValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
form.grdServices().getRows().clear();
//09/09/2005 - check for null
CareContextShortVo voCareContext = form.cmbEpisode().getValue();
if(voCareContext == null)
return;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByCareContext(voCareContext, Boolean.TRUE);
SupportNetworkServicesVo voService = null;
GenForm.grdServicesRow row = null;
if(voColl == null)
return;
for(int i=0;i<voColl.size();i++)
{
voService = voColl.get(i);
row = form.grdServices().getRows().newRow();
if(voService.getLocationService() != null)
{
if(voService.getLocationService().getService() != null)
row.setServiceType(voService.getLocationService().getService().getServiceName());
if(voService.getLocationService().getContact() != null)
{
row.setPhone(voService.getLocationService().getContact().getContactNumber());
if(voService.getLocationService().getContact().getName() != null)
{
row.setContact(voService.getLocationService().getContact().getName().toString());
}
}
}
row.setFrequency(voService.getFrequencyOfService());
row.setSelect(true);
row.setValue(voService);
}
}
项目:AvoinApotti
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getSelectedSupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:AvoinApotti
文件:Logic.java
private void populateServicesInstanceControls(SupportNetworkServicesVo voService)
{
clearServiceDetails();
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(true);
form.lyrSupportServices().tabPageServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrSupportServices().tabPageServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrSupportServices().tabPageServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getService());
}
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setValue(voService.getLocationService());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(form.getMode().equals(FormMode.EDIT));
cmbLocationValueChanged();
}
form.lyrSupportServices().tabPageServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrSupportServices().tabPageServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrSupportServices().tabPageServices().txtCommentsService().setValue(voService.getComments());
}
项目:AvoinApotti
文件:Logic.java
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
if (formName.equals(form.getForms().Core.YesNoDialog) && result.equals(DialogResult.YES))
{
if (form.lyrSupportServices().tabPageFamily().isVisible())
{
saveFamily(setRecordActive());
openFamily();
}
else if (form.lyrSupportServices().tabPageProf().isVisible())
{
SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
voProf.setIsCurrActiveProfSupp(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
if (saveProfessional(voProf))
{
openProfessional();
}
}
else if (form.lyrSupportServices().tabPageServices().isVisible())
{
SupportNetworkServicesVo voService = form.getLocalContext().getSelectedSupportNetworkService();
voService.setIsCurrentlyActive(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
if (saveService(voService))
{
openServices();
}
}
//WDEV-17337
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.SAVE);
form.fireCustomControlValueChanged();
}
else //WDEV-17337
{
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.CANCEL);
form.fireCustomControlValueChanged();
}
}
项目:AvoinApotti
文件:Logic.java
private boolean saveService(SupportNetworkServicesVo supportNetworkServices)
{
if (form.getLocalContext().getSelectedRecord() == null)
populateBaseDischargeServices();
ArrayList<String> screenErrors = new ArrayList<String>();
if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
screenErrors.add("Please select a Service Type");
if ((!form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().cmbLocationServices().getValue() == null)
screenErrors.add("Please select a Location");
if ((form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().txtAreaLoc().getValue() == null)
screenErrors.add("Please state a Location");
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
SupportNetworkServicesVo voSupportServices = null;
if (supportNetworkServices == null)
voSupportServices = populateServicesInstanceData();
else
voSupportServices = supportNetworkServices;
//WDEV-14594
String[] arrErrorsProf = voSupportServices.validate();
if(arrErrorsProf != null)
{
engine.showErrors(arrErrorsProf);
return false;
}
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices() == null)
form.getLocalContext().getSelectedRecord().setSupportNetworkServices(new SupportNetworkServicesVoCollection());
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices) >= 0)
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().set(form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices), voSupportServices);
else
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().add(voSupportServices);
String[] arrErrors = form.getLocalContext().getSelectedRecord().validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
form.getLocalContext().setSelectedRecord(domain.saveSupportServices(form.getLocalContext().getSelectedRecord()));
}
catch (StaleObjectException e)
{
engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
openSupportServices();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:openMAXIMS
文件:Logic.java
private void insertServices()
{
form.grdDetails().getRows().clear();
Boolean bActiveOnly = Boolean.TRUE;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);
if (voColl != null && voColl.size()>0)
{
SupportNetworkServicesVo vo = null;
GenForm.grdDetailsRow row = null;
for(int i=0;i<voColl.size();i++)
{
vo = voColl.get(i);
row = form.grdDetails().getRows().newRow();
if (vo.getSuppliedServiceIsNotNull())
row.setComunityService(vo.getSuppliedService().getName());
else if (vo.getServiceIsNotNull())
row.setComunityService(vo.getService().getServiceName());
row.setCurrentFrequency(vo.getFrequencyOfService());
//create Community Service vo
CommunityServiceVo voComSer = new CommunityServiceVo();
voComSer.setCurrentFrequency(vo.getFrequencyOfService());
//copy if supplied
if (vo.getSuppliedServiceIsNotNull())
{
SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
voSerProfDet.setName(vo.getSuppliedService().getName());
voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
voComSer.setSuppliedService(voSerProfDet);
}
voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
voComSer.setService(vo.getService());
voComSer.setLocationService(vo.getLocationService());
voComSer.setIsCurrentlyActive(new Boolean(true));
voComSer.setComments(vo.getComments());
String[] arrErrors = voComSer.validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
}
try
{
domain.saveCommunitService(voComSer);
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
return;
}
row.setValue(voComSer);
}
}
}
项目:openMAXIMS
文件:Logic.java
private boolean saveService()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
ArrayList screenErrors = new ArrayList();
if (form.lyrProServices().tabServices().cmbService().getValue() == null)
{
screenErrors.add("Please select a Service Type");
}
if ((!form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().cmbLocation().getValue() == null)
{
screenErrors.add("Please select a Location");
}
if ((form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().txtAreaLoc().getValue() == null)
{
screenErrors.add("Please state a Location");
}
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
String[] arrErrors = voService.validate();
if (arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
// WDEV-2257 - save based on Patient Only
domain.saveSupportNetworkServicesForPatient(voService, form.getGlobalContext().Core.getPatientShort());
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
open();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:openMAXIMS
文件:Logic.java
private void populateServiceDataFromScreen()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
if (voService.getID_SupportNetworkServices() == null)
{
voService.setIsCurrentlyActive(Boolean.TRUE);
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
{
SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();
voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
// supplied area/location
voService.setSuppliedService(voServiceProf);
}
else
{
if (form.getLocalContext().getlocationService() != null)
voService.setLocationService(form.getLocalContext().getlocationService());
voService.setSuppliedService(null);
}
voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
}
else
{
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
//WDEV-17560
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
{
voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
}
}
form.getLocalContext().setsupportNetworkService(voService);
}
项目:openMAXIMS
文件:Logic.java
private void populateInstanceControl(SupportNetworkServicesVo voService)
{
clearServiceDetails();
form.getLocalContext().setRieRecord(voService);
form.getContextMenus().getLIPUpdateItem().setVisible(true);
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(true);
form.lyrProServices().tabServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrProServices().tabServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrProServices().tabServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrProServices().tabServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getService());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(true);
form.lyrProServices().tabServices().cmbLocation().setVisible(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(false);
if (voService.getLocationService().getLocation() != null)
{
if (locationExistsInCombo(voService.getLocationService().getLocation()) == false)
form.lyrProServices().tabServices().cmbLocation().newRow(voService.getLocationService().getLocation(), voService.getLocationService().getLocation().getName());
form.lyrProServices().tabServices().cmbLocation().setValue(voService.getLocationService().getLocation());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(false);
form.lyrProServices().tabServices().cmbLocation().setVisible(true);
cmbLocationValueChanged();
}
form.lyrProServices().tabServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrProServices().tabServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrProServices().tabServices().txtCommentsService().setValue(voService.getComments());
form.btnUpdate().setEnabled(true);
}
项目:openMAXIMS
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getsupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:openMAXIMS
文件:Logic.java
protected void onCmbEpisodeValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
form.grdServices().getRows().clear();
//09/09/2005 - check for null
CareContextShortVo voCareContext = form.cmbEpisode().getValue();
if(voCareContext == null)
return;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByCareContext(voCareContext, Boolean.TRUE);
SupportNetworkServicesVo voService = null;
GenForm.grdServicesRow row = null;
if(voColl == null)
return;
for(int i=0;i<voColl.size();i++)
{
voService = voColl.get(i);
row = form.grdServices().getRows().newRow();
if(voService.getLocationService() != null)
{
if(voService.getLocationService().getService() != null)
row.setServiceType(voService.getLocationService().getService().getServiceName());
if(voService.getLocationService().getContact() != null)
{
row.setPhone(voService.getLocationService().getContact().getContactNumber());
if(voService.getLocationService().getContact().getName() != null)
{
row.setContact(voService.getLocationService().getContact().getName().toString());
}
}
}
row.setFrequency(voService.getFrequencyOfService());
row.setSelect(true);
row.setValue(voService);
}
}
项目:openMAXIMS
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getSelectedSupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:openMAXIMS
文件:Logic.java
private void populateServicesInstanceControls(SupportNetworkServicesVo voService)
{
clearServiceDetails();
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(true);
form.lyrSupportServices().tabPageServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrSupportServices().tabPageServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrSupportServices().tabPageServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getService());
}
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setValue(voService.getLocationService());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(form.getMode().equals(FormMode.EDIT));
cmbLocationValueChanged();
}
form.lyrSupportServices().tabPageServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrSupportServices().tabPageServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrSupportServices().tabPageServices().txtCommentsService().setValue(voService.getComments());
}
项目:openMAXIMS
文件:Logic.java
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
if (formName.equals(form.getForms().Core.YesNoDialog) && result.equals(DialogResult.YES))
{
if (form.lyrSupportServices().tabPageFamily().isVisible())
{
saveFamily(setRecordActive());
openFamily();
}
else if (form.lyrSupportServices().tabPageProf().isVisible())
{
SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
voProf.setIsCurrActiveProfSupp(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
if (saveProfessional(voProf))
{
openProfessional();
}
}
else if (form.lyrSupportServices().tabPageServices().isVisible())
{
SupportNetworkServicesVo voService = form.getLocalContext().getSelectedSupportNetworkService();
voService.setIsCurrentlyActive(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
if (saveService(voService))
{
openServices();
}
}
//WDEV-17337
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.SAVE);
form.fireCustomControlValueChanged();
}
else //WDEV-17337
{
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.CANCEL);
form.fireCustomControlValueChanged();
}
}
项目:openMAXIMS
文件:Logic.java
private boolean saveService(SupportNetworkServicesVo supportNetworkServices)
{
if (form.getLocalContext().getSelectedRecord() == null)
populateBaseDischargeServices();
ArrayList<String> screenErrors = new ArrayList<String>();
if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
screenErrors.add("Please select a Service Type");
if ((!form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().cmbLocationServices().getValue() == null)
screenErrors.add("Please select a Location");
if ((form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().txtAreaLoc().getValue() == null)
screenErrors.add("Please state a Location");
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
SupportNetworkServicesVo voSupportServices = null;
if (supportNetworkServices == null)
voSupportServices = populateServicesInstanceData();
else
voSupportServices = supportNetworkServices;
//WDEV-14594
String[] arrErrorsProf = voSupportServices.validate();
if(arrErrorsProf != null)
{
engine.showErrors(arrErrorsProf);
return false;
}
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices() == null)
form.getLocalContext().getSelectedRecord().setSupportNetworkServices(new SupportNetworkServicesVoCollection());
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices) >= 0)
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().set(form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices), voSupportServices);
else
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().add(voSupportServices);
String[] arrErrors = form.getLocalContext().getSelectedRecord().validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
form.getLocalContext().setSelectedRecord(domain.saveSupportServices(form.getLocalContext().getSelectedRecord()));
}
catch (StaleObjectException e)
{
engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
openSupportServices();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:openMAXIMS
文件:Logic.java
private void insertServices()
{
form.grdDetails().getRows().clear();
Boolean bActiveOnly = Boolean.TRUE;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);
if (voColl != null && voColl.size()>0)
{
SupportNetworkServicesVo vo = null;
GenForm.grdDetailsRow row = null;
for(int i=0;i<voColl.size();i++)
{
vo = voColl.get(i);
row = form.grdDetails().getRows().newRow();
if (vo.getSuppliedServiceIsNotNull())
row.setComunityService(vo.getSuppliedService().getName());
else if (vo.getServiceIsNotNull())
row.setComunityService(vo.getService().getServiceName());
row.setCurrentFrequency(vo.getFrequencyOfService());
//create Community Service vo
CommunityServiceVo voComSer = new CommunityServiceVo();
voComSer.setCurrentFrequency(vo.getFrequencyOfService());
//copy if supplied
if (vo.getSuppliedServiceIsNotNull())
{
SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
voSerProfDet.setName(vo.getSuppliedService().getName());
voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
voComSer.setSuppliedService(voSerProfDet);
}
voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
voComSer.setService(vo.getService());
voComSer.setLocationService(vo.getLocationService());
voComSer.setIsCurrentlyActive(new Boolean(true));
voComSer.setComments(vo.getComments());
String[] arrErrors = voComSer.validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
}
try
{
domain.saveCommunitService(voComSer);
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
return;
}
row.setValue(voComSer);
}
}
}
项目:openMAXIMS
文件:Logic.java
private boolean saveService()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
ArrayList screenErrors = new ArrayList();
if (form.lyrProServices().tabServices().cmbService().getValue() == null)
{
screenErrors.add("Please select a Service Type");
}
if ((!form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().cmbLocation().getValue() == null)
{
screenErrors.add("Please select a Location");
}
if ((form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().txtAreaLoc().getValue() == null)
{
screenErrors.add("Please state a Location");
}
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
String[] arrErrors = voService.validate();
if (arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
// WDEV-2257 - save based on Patient Only
domain.saveSupportNetworkServicesForPatient(voService, form.getGlobalContext().Core.getPatientShort());
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
open();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:openMAXIMS
文件:Logic.java
private void populateServiceDataFromScreen()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
if (voService.getID_SupportNetworkServices() == null)
{
voService.setIsCurrentlyActive(Boolean.TRUE);
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue())
{
SuppNetworkServiceProfessionDetailVo voServiceProf = new SuppNetworkServiceProfessionDetailVo();
voServiceProf.setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voServiceProf.setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voServiceProf.setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voServiceProf.setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
// supplied area/location
voService.setSuppliedService(voServiceProf);
}
else
{
if (form.getLocalContext().getlocationService() != null)
voService.setLocationService(form.getLocalContext().getlocationService());
voService.setSuppliedService(null);
}
voService.setAuthoringInfo(form.lyrProServices().tabServices().customControlAuthSer().getValue());
voService.setService(form.lyrProServices().tabServices().cmbService().getValue());
}
else
{
voService.setFrequencyOfService(form.lyrProServices().tabServices().txtFrequency().getValue());
voService.setComments(form.lyrProServices().tabServices().txtCommentsService().getValue());
//WDEV-17560
if (form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue() && voService.getSuppliedService() != null)
{
voService.getSuppliedService().setAddress(form.lyrProServices().tabServices().txtAddressService().getValue());
voService.getSuppliedService().setName(form.lyrProServices().tabServices().txtContactPerson().getValue());
voService.getSuppliedService().setServiceLocation(form.lyrProServices().tabServices().txtAreaLoc().getValue());
voService.getSuppliedService().setWorkPhone(form.lyrProServices().tabServices().txtPhoneNoService().getValue());
}
}
form.getLocalContext().setsupportNetworkService(voService);
}
项目:openMAXIMS
文件:Logic.java
private void populateInstanceControl(SupportNetworkServicesVo voService)
{
clearServiceDetails();
form.getLocalContext().setRieRecord(voService);
form.getContextMenus().getLIPUpdateItem().setVisible(true);
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(true);
form.lyrProServices().tabServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrProServices().tabServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrProServices().tabServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrProServices().tabServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrProServices().tabServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrProServices().tabServices().cmbService().setValue(voService.getService());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(true);
form.lyrProServices().tabServices().cmbLocation().setVisible(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrProServices().tabServices().chkSupplyServiceDetail().setValue(false);
if (voService.getLocationService().getLocation() != null)
{
if (locationExistsInCombo(voService.getLocationService().getLocation()) == false)
form.lyrProServices().tabServices().cmbLocation().newRow(voService.getLocationService().getLocation(), voService.getLocationService().getLocation().getName());
form.lyrProServices().tabServices().cmbLocation().setValue(voService.getLocationService().getLocation());
}
form.lyrProServices().tabServices().txtAreaLoc().setVisible(false);
form.lyrProServices().tabServices().cmbLocation().setVisible(true);
cmbLocationValueChanged();
}
form.lyrProServices().tabServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrProServices().tabServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrProServices().tabServices().txtCommentsService().setValue(voService.getComments());
form.btnUpdate().setEnabled(true);
}
项目:openMAXIMS
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getsupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:openMAXIMS
文件:Logic.java
protected void onCmbEpisodeValueChanged() throws ims.framework.exceptions.PresentationLogicException
{
form.grdServices().getRows().clear();
//09/09/2005 - check for null
CareContextShortVo voCareContext = form.cmbEpisode().getValue();
if(voCareContext == null)
return;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByCareContext(voCareContext, Boolean.TRUE);
SupportNetworkServicesVo voService = null;
GenForm.grdServicesRow row = null;
if(voColl == null)
return;
for(int i=0;i<voColl.size();i++)
{
voService = voColl.get(i);
row = form.grdServices().getRows().newRow();
if(voService.getLocationService() != null)
{
if(voService.getLocationService().getService() != null)
row.setServiceType(voService.getLocationService().getService().getServiceName());
if(voService.getLocationService().getContact() != null)
{
row.setPhone(voService.getLocationService().getContact().getContactNumber());
if(voService.getLocationService().getContact().getName() != null)
{
row.setContact(voService.getLocationService().getContact().getName().toString());
}
}
}
row.setFrequency(voService.getFrequencyOfService());
row.setSelect(true);
row.setValue(voService);
}
}
项目:openMAXIMS
文件:Logic.java
private boolean isServicesAuthoringHCPEnabled()
{
SupportNetworkServicesVo voSupportNetworkServices = form.getLocalContext().getSelectedSupportNetworkService();
return voSupportNetworkServices == null || voSupportNetworkServices.getID_SupportNetworkServices() == null;
}
项目:openMAXIMS
文件:Logic.java
private void populateServicesInstanceControls(SupportNetworkServicesVo voService)
{
clearServiceDetails();
if (voService.getLocationService() != null)
{
if (voService.getLocationService().getService() != null)
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getLocationService().getService(), voService.getLocationService().getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getLocationService().getService());
}
cmbServiceValueChanged();
}
if (voService.getSuppliedServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(true);
form.lyrSupportServices().tabPageServices().txtAddressService().setValue(voService.getSuppliedService().getAddress());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setValue(voService.getSuppliedService().getServiceLocation());
form.lyrSupportServices().tabPageServices().txtContactPerson().setValue(voService.getSuppliedService().getName());
form.lyrSupportServices().tabPageServices().txtPhoneNoService().setValue(voService.getSuppliedService().getWorkPhone());
if (voService.getServiceIsNotNull() && voService.getService().getServiceNameIsNotNull())
{
form.lyrSupportServices().tabPageServices().cmbService().newRow(voService.getService(), voService.getService().getServiceName());
form.lyrSupportServices().tabPageServices().cmbService().setValue(voService.getService());
}
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(true);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(false);
}
else if (voService.getLocationServiceIsNotNull())
{
form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().setValue(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setValue(voService.getLocationService());
form.lyrSupportServices().tabPageServices().txtAreaLoc().setVisible(false);
form.lyrSupportServices().tabPageServices().txtAreaLoc().setRequired(false);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setVisible(true);
form.lyrSupportServices().tabPageServices().cmbLocationServices().setEnabled(form.getMode().equals(FormMode.EDIT));
form.lyrSupportServices().tabPageServices().cmbLocationServices().setRequired(form.getMode().equals(FormMode.EDIT));
cmbLocationValueChanged();
}
form.lyrSupportServices().tabPageServices().customControlAuthSer().setValue(voService.getAuthoringInfo());
form.lyrSupportServices().tabPageServices().txtFrequency().setValue(voService.getFrequencyOfService());
form.lyrSupportServices().tabPageServices().txtCommentsService().setValue(voService.getComments());
}
项目:openMAXIMS
文件:Logic.java
@Override
protected void onFormDialogClosed(FormName formName, DialogResult result) throws PresentationLogicException
{
if (formName.equals(form.getForms().Core.YesNoDialog) && result.equals(DialogResult.YES))
{
if (form.lyrSupportServices().tabPageFamily().isVisible())
{
saveFamily(setRecordActive());
openFamily();
}
else if (form.lyrSupportServices().tabPageProf().isVisible())
{
SupportNetworkProfessionalVo voProf = form.getLocalContext().getSelectedSupportNetworkProfessional();
voProf.setIsCurrActiveProfSupp(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkProfessional(voProf);
if (saveProfessional(voProf))
{
openProfessional();
}
}
else if (form.lyrSupportServices().tabPageServices().isVisible())
{
SupportNetworkServicesVo voService = form.getLocalContext().getSelectedSupportNetworkService();
voService.setIsCurrentlyActive(Boolean.FALSE);
form.getLocalContext().setSelectedSupportNetworkService(voService);
if (saveService(voService))
{
openServices();
}
}
//WDEV-17337
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.SAVE);
form.fireCustomControlValueChanged();
}
else //WDEV-17337
{
form.getLocalContext().setSelectedEvent(EdAssessment_CustomControlsEvents.CANCEL);
form.fireCustomControlValueChanged();
}
}
项目:openMAXIMS
文件:Logic.java
private boolean saveService(SupportNetworkServicesVo supportNetworkServices)
{
if (form.getLocalContext().getSelectedRecord() == null)
populateBaseDischargeServices();
ArrayList<String> screenErrors = new ArrayList<String>();
if (form.lyrSupportServices().tabPageServices().cmbService().getValue() == null)
screenErrors.add("Please select a Service Type");
if ((!form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().cmbLocationServices().getValue() == null)
screenErrors.add("Please select a Location");
if ((form.lyrSupportServices().tabPageServices().chkSupplyServiceDetail().getValue()) && form.lyrSupportServices().tabPageServices().txtAreaLoc().getValue() == null)
screenErrors.add("Please state a Location");
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
SupportNetworkServicesVo voSupportServices = null;
if (supportNetworkServices == null)
voSupportServices = populateServicesInstanceData();
else
voSupportServices = supportNetworkServices;
//WDEV-14594
String[] arrErrorsProf = voSupportServices.validate();
if(arrErrorsProf != null)
{
engine.showErrors(arrErrorsProf);
return false;
}
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices() == null)
form.getLocalContext().getSelectedRecord().setSupportNetworkServices(new SupportNetworkServicesVoCollection());
if (form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices) >= 0)
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().set(form.getLocalContext().getSelectedRecord().getSupportNetworkServices().indexOf(voSupportServices), voSupportServices);
else
form.getLocalContext().getSelectedRecord().getSupportNetworkServices().add(voSupportServices);
String[] arrErrors = form.getLocalContext().getSelectedRecord().validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
form.getLocalContext().setSelectedRecord(domain.saveSupportServices(form.getLocalContext().getSelectedRecord()));
}
catch (StaleObjectException e)
{
engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
openSupportServices();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}
项目:openmaxims-linux
文件:Logic.java
private void insertServices()
{
form.grdDetails().getRows().clear();
Boolean bActiveOnly = Boolean.TRUE;
SupportNetworkServicesVoCollection voColl = domain.listSupportNetworkServiceByPatient(form.getGlobalContext().Core.getPatientShort(),bActiveOnly);
if (voColl != null && voColl.size()>0)
{
SupportNetworkServicesVo vo = null;
GenForm.grdDetailsRow row = null;
for(int i=0;i<voColl.size();i++)
{
vo = voColl.get(i);
row = form.grdDetails().getRows().newRow();
if (vo.getSuppliedServiceIsNotNull())
row.setComunityService(vo.getSuppliedService().getName());
else if (vo.getServiceIsNotNull())
row.setComunityService(vo.getService().getServiceName());
row.setCurrentFrequency(vo.getFrequencyOfService());
//create Community Service vo
CommunityServiceVo voComSer = new CommunityServiceVo();
voComSer.setCurrentFrequency(vo.getFrequencyOfService());
//copy if supplied
if (vo.getSuppliedServiceIsNotNull())
{
SuppNetworkServiceProfessionDetailVo voSerProfDet = new SuppNetworkServiceProfessionDetailVo();
voSerProfDet.setAddress(vo.getSuppliedService().getAddress());
voSerProfDet.setEmailAddress(vo.getSuppliedService().getEmailAddress());
voSerProfDet.setMobilePhone(vo.getSuppliedService().getMobilePhone());
voSerProfDet.setName(vo.getSuppliedService().getName());
voSerProfDet.setServiceLocation(vo.getSuppliedService().getServiceLocation());
voSerProfDet.setWorkPhone(vo.getSuppliedService().getWorkPhone());
voComSer.setSuppliedService(voSerProfDet);
}
voComSer.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voComSer.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
voComSer.setService(vo.getService());
voComSer.setLocationService(vo.getLocationService());
voComSer.setIsCurrentlyActive(new Boolean(true));
voComSer.setComments(vo.getComments());
String[] arrErrors = voComSer.validate();
if(arrErrors != null)
{
engine.showErrors(arrErrors);
}
try
{
domain.saveCommunitService(voComSer);
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
return;
}
row.setValue(voComSer);
}
}
}
项目:openmaxims-linux
文件:Logic.java
private boolean saveService()
{
SupportNetworkServicesVo voService = form.getLocalContext().getsupportNetworkService();
ArrayList screenErrors = new ArrayList();
if (form.lyrProServices().tabServices().cmbService().getValue() == null)
{
screenErrors.add("Please select a Service Type");
}
if ((!form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().cmbLocation().getValue() == null)
{
screenErrors.add("Please select a Location");
}
if ((form.lyrProServices().tabServices().chkSupplyServiceDetail().getValue()) && form.lyrProServices().tabServices().txtAreaLoc().getValue() == null)
{
screenErrors.add("Please state a Location");
}
String[] sScreenErrors = screenErrors(screenErrors);
if(sScreenErrors.length > 0)
{
engine.showErrors(sScreenErrors);
return false;
}
String[] arrErrors = voService.validate();
if (arrErrors != null)
{
engine.showErrors(arrErrors);
return false;
}
try
{
// WDEV-2257 - save based on Patient Only
domain.saveSupportNetworkServicesForPatient(voService, form.getGlobalContext().Core.getPatientShort());
}
catch (StaleObjectException e)
{
engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
open();
return false;
}
savePatientNoSupportNetworkServicesInfo(false);
return true;
}