protected PatientCurrentConcernVo populateDataFromScreen(PatientCurrentConcernVo value) { value = super.populateDataFromScreen(value); MedicalProbOnAdmisVoCollection voCollProbs = new MedicalProbOnAdmisVoCollection(); for(int i=0;i<form.grdAssocProblem().getRows().size();i++) { GenForm.grdAssocProblemRow row = form.grdAssocProblem().getRows().get(i); if(row.getColSelect() == true) { voCollProbs.add(row.getValue()); } } value.setAssocProblem(voCollProbs); return value; }
private void updateConcern() { PatientCurrentConcernVo voConcern = form.grdConcernList().getValue(); if(voConcern == null) { engine.showMessage("Please select a record to Update"); return; } form.getGlobalContext().SpinalInjuries.setPatientConcern(voConcern); engine.open(form.getForms().SpinalInjuries.SharedNewConcern); }
private void viewConcern() { PatientCurrentConcernVo voConcern = form.grdConcernList().getValue(); if(voConcern == null) { engine.showMessage("Please select a record to View"); return; } form.getGlobalContext().SpinalInjuries.setViewRecord(new Boolean(true)); form.getGlobalContext().SpinalInjuries.setPatientConcern(voConcern); engine.open(form.getForms().SpinalInjuries.SharedNewConcern); }
protected void onGrdConcernListSelectionChanged() throws PresentationLogicException { if(form.grdConcernList().getValue() instanceof PatientCurrentConcernVo) form.getLocalContext().setCurrentConcern(form.grdConcernList().getValue()); updateControlsState(); }
protected void populateScreenFromData(PatientCurrentConcernVo value) { super.populateScreenFromData(value); MedicalProbOnAdmisVoCollection voCollProbs = value.getAssocProblem(); MedicalProbOnAdmisVo voProb; GenForm.grdAssocProblemRow row = null; for(int i=0;i<voCollProbs.size();i++) { voProb = voCollProbs.get(i); for(int j=0;j<form.grdAssocProblem().getRows().size();j++) { row = form.grdAssocProblem().getRows().get(j); if(row.getValue().equals(voProb)) row.setColSelect(true); } } try { onCmbAllocToTeamValueChanged(); onCmbIdByTeamValueChanged(); } catch (PresentationLogicException e){} form.cmbIdByMember().setValue(value.getMemberIdentified()); form.cmbAllocToMember().setValue(value.getAllocToTeamMember()); }
public PatientCurrentConcernVo getConcern(PatientConcernRefVo concernId) { if(concernId == null || !concernId.getID_PatientConcernIsNotNull()) throw new CodingRuntimeException("Can not get PatientConcern on null Id."); return PatientCurrentConcernVoAssembler.create((PatientConcern) getDomainFactory().getDomainObject(PatientConcern.class, concernId.getID_PatientConcern())); }
public ims.core.vo.PatientCurrentConcernVo saveConcern(ims.core.vo.PatientCurrentConcernVo concern, ims.core.vo.PatientShort patient) throws StaleObjectException { if(!concern.isValidated()) { throw new DomainRuntimeException("PatientCurrentConcern Value Object Alert has not been validated"); } DomainFactory factory = getDomainFactory(); PatientConcern doConcern = PatientCurrentConcernVoAssembler.extractPatientConcern(factory,concern); factory.save(doConcern); return PatientCurrentConcernVoAssembler.create(doConcern); }
private void listPatientConcerns(IMos iHcp, PatientConcernStatus status) { form.getGlobalContext().SpinalInjuries.setViewRecord(new Boolean(false)); form.grdConcernList().getRows().clear(); PatientCurrentConcernVo voConcern; PatientCurrentConcernVoCollection voCollConcerns = domain.listPatientConcern(form.getGlobalContext().Core.getPatientShort(),iHcp,status); GenForm.grdConcernListRow row = null; for(int i=0;i<voCollConcerns.size();i++) { row = form.grdConcernList().getRows().newRow(); voConcern = voCollConcerns.get(i); row.setcolConcern(voConcern.getConcernDescription()); if(voConcern.getMemberIdentifiedIsNotNull()) row.setcolIdentifiedBy(voConcern.getMemberIdentified().toString()); if(voConcern.getAllocToTeamMemberIsNotNull()) row.setcolAllocatedTo(voConcern.getAllocToTeamMember().toString()); if(voConcern.getConcernStatusIsNotNull()) row.setcolStatus(voConcern.getConcernStatus().getText()); //30/11/2005 - Replace Recording/Updating date/time with SystemInformation Date creationDate = SysInfoUtil.getCreationDate(voConcern.getSysInfo()); Date lastUpdatedDate = SysInfoUtil.getLastUpdatedDate(voConcern.getSysInfo()); row.setcolDate(creationDate != null?creationDate.toString():""); row.setcolStatusDate(lastUpdatedDate != null?lastUpdatedDate.toString():creationDate.toString()); row.setValue(voConcern); } form.grdConcernList().setValue(form.getLocalContext().getCurrentConcern()); //WDEV-15355 if(form.grdConcernList().getValue() != null) { form.getLocalContext().setCurrentConcern(domain.getConcern(form.grdConcernList().getValue())); } else { form.getLocalContext().setCurrentConcern(null); } }
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { if (form.dteAllocated()!=null) if (form.dteIdentified()!=null) if (form.dteAllocated().getValue()!=null&&form.dteIdentified().getValue()!=null) if (form.dteAllocated().getValue().compareTo(form.dteIdentified().getValue())<0) { ArrayList <String> errors=new ArrayList<String>(); errors.add("Date Identified cannot be after Date Allocated"); engine.showErrors(errors.toArray(new String [0])); return; } PatientCurrentConcernVo voConcern = form.getGlobalContext().SpinalInjuries.getPatientConcern(); voConcern = this.populateDataFromScreen(voConcern); if(voConcern.getID_PatientConcern() == null) voConcern.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); if(voConcern.getID_PatientConcern() != null) { Hcp hcp = (Hcp) domain.getHcpUser(); if(hcp != null) { voConcern.setUpdatingHCP(hcp); } } String[] arrErrors = voConcern.validate(getUIErrors());//WDEV-16017 if( arrErrors != null) { engine.showErrors(arrErrors); return; } try { domain.saveConcern(voConcern, form.getGlobalContext().Core.getPatientShort()); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); form.getGlobalContext().SpinalInjuries.setPatientConcern(domain.getConcern(voConcern)); open(); return; } openPreviousForm(); }
public PatientCurrentConcernVo getConcern(PatientConcernRefVo concernId) { MedConcernOnAdmis impl = (MedConcernOnAdmis) getDomainImpl(MedConcernOnAdmisImpl.class); return impl.getConcern(concernId); }