public MemberOfStaffShortVo removeLinkedHcp(MemberOfStaffShortVo mosVo) throws StaleObjectException { if (mosVo.getID_MemberOfStaff() == null) { throw new DomainRuntimeException("Cannot remove a HCP from a MOS with NULL id!"); } DomainFactory factory = getDomainFactory(); MemberOfStaff mosBo = (MemberOfStaff) factory.getDomainObject(MemberOfStaff.class, mosVo.getID_MemberOfStaff()); if (mosBo.getHcp() == null) { return mosVo; } mosBo.getHcp().setIsActive(Boolean.FALSE); factory.save(mosBo.getHcp()); mosBo.setHcp(null); mosBo.setStaffType(null); factory.save(mosBo); mosVo.setHcp(null); return mosVo; }
@Override protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException { form.qmbReferredTo().clear(); MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(value); voMOS.setName(personName); voMOS.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS); if(coll != null) { for (int i = 0; i < coll.size(); i++) form.qmbReferredTo().newRow(coll.get(i), coll.get(i).toString()); if (coll.size() == 1) form.qmbReferredTo().setValue(coll.get(0)); else if (coll.size() > 1) form.qmbReferredTo().showOpened(); } }
private void initalize() throws FormOpenException { form.getLocalContext().setsuplementryLetterVisible(new Boolean(ConfigFlag.UI.DISCHARGE_LETTERS_SUPPLEMENTARY_BUTTON.getValue())); MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) domain.getMosUser(); if (null == voMos) { throw new FormOpenException("Current user not associated with a Member Of Staff"); } else { form.getLocalContext().setloggedInMos(voMos); } // get full paseventvo form.getLocalContext().setpasEventVo(domain.getPasEvent(form.getGlobalContext().Core.getPasEvent())); if (form.getGlobalContext().Correspondence.getGenerateFormModeIsNotNull()) form.setMode(form.getGlobalContext().Correspondence.getGenerateFormMode()); // set caption // TODO // if (form.getGlobalContext().Core.getPasEvent().gettype == inpat) // String strTitle() }
private boolean saveCorrespondence(ims.core.vo.lookups.DocumentStatus docStatus) { CorrespondenceDetailsVo voCorrespondenceDetails = form.getLocalContext().getcorrespondenceDetails(); if (null == voCorrespondenceDetails) return false; MemberOfStaffShortVo voMos = (MemberOfStaffShortVo) domain.getMosUser(); if (null == voMos) return false; populateDataFromScreen(voCorrespondenceDetails); // WDEV-2774 // update Status History voCorrespondenceDetails.setCspStatusHistory(updateHistoryStatus(voCorrespondenceDetails, voCorrespondenceDetails.getCurrentStatus())); // update the current status voCorrespondenceDetails.setCurrentStatus(docStatus); if (!saveDocumentDetails(voCorrespondenceDetails)) return false; return true; }
@Override protected void onQmbReferredToTextSubmited(String value) throws PresentationLogicException { form.lyr().tabReferralDetails().qmbReferredTo().clear(); MemberOfStaffShortVo voMOS = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(value); voMOS.setName(personName); voMOS.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection coll = domain.listMembersOfStaff(voMOS); if(coll != null) { for (int i = 0; i < coll.size(); i++) form.lyr().tabReferralDetails().qmbReferredTo().newRow(coll.get(i), coll.get(i).toString()); if (coll.size() == 1) form.lyr().tabReferralDetails().qmbReferredTo().setValue(coll.get(0)); else if (coll.size() > 1) form.lyr().tabReferralDetails().qmbReferredTo().showOpened(); } }
private boolean testDiscipline() { MemberOfStaffVo fullVo = null; MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser(); if (mos != null) fullVo = domain.getMemberOfStaff(mos); if (fullVo != null) { if (fullVo.getHcpIsNotNull()) { if (fullVo.getHcp().getHcpTypeIsNotNull()) { if (form.customControlAuthoring().getValue() != null && form.customControlAuthoring().getValue().getAuthoringHcpIsNotNull() && form.customControlAuthoring().getValue().getAuthoringHcp().getHcpTypeIsNotNull()) { if (form.customControlAuthoring().getValue().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType())) return true; } } } } return false; }
protected void onBtnNewClick() throws PresentationLogicException { clearScreen(); form.setMode(FormMode.EDIT); form.txtComments().setFocus(); TransferNote voTran = new TransferNote(); form.getLocalContext().setRecord(voTran); if (domain.getMosUser() != null) form.txtHCP().setValue(((MemberOfStaffShortVo) domain.getMosUser()).toString()); form.dteRecording().setValue(new Date()); form.timRecording().setValue(new Time()); form.dteTransfer().setValue(new Date()); form.timTransfer().setValue(new Time()); form.btnUpdate().setEnabled(false); }
void makeHandlingHeaderInfoNew(Boolean bDefaultValues) { if(bDefaultValues.booleanValue() == true) { form.layerControl1().screening().dateScreening().setValue(new Date()); form.layerControl1().screening().timeScreening().setValue(new Time()); if(domain.getMosUser() != null) form.layerControl1().screening().txtRecordingHcpScreening().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); } else //null values { form.layerControl1().screening().dateScreening().setValue(null); form.layerControl1().screening().timeScreening().setValue(null); form.layerControl1().screening().txtRecordingHcpScreening().setValue(null); } }
void makeMovementHeaderInfoNew(Boolean bDefaultValues) { if(bDefaultValues.booleanValue() == true) { form.layerControl1().movement().dateMovement().setValue(new Date()); form.layerControl1().movement().timeMovement().setValue(new Time()); if(domain.getMosUser() != null) form.layerControl1().movement().txtRecordingHcpMOVE().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); } else //null values { form.layerControl1().movement().dateMovement().setValue(null); form.layerControl1().movement().timeMovement().setValue(null); form.layerControl1().movement().txtRecordingHcpMOVE().setValue(null); } }
private PainAssessmentReview getReviewVOfromFindingVO(PainAssessmentFindings pafVO) { PainAssessmentReview painAssVo = getReviewRecord(pafVO); if(painAssVo.getID_PainAssessmentReview() == null) painAssVo.setID_PainAssessmentReview(pafVO.getID_PainAssessmentFindings()); painAssVo.setDepth(pafVO.getDepth()); painAssVo.setOnset(pafVO.getOnset()); painAssVo.setProgression(pafVO.getProgression()); painAssVo.setRecordingDateTime(new DateTime(form.dteRecording().getValue(), form.timRecording().getValue())); painAssVo.setAssessmentDateTime(new DateTime(form.dteAssessment().getValue(), form.timAssessment().getValue())); MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser(); if(memStaffShortVo != null && memStaffShortVo.getHcp() != null) painAssVo.setRecordingHCP(memStaffShortVo.getHcp()); painAssVo.setSeverity(pafVO.getSeverity()); painAssVo.setSiteDetails(pafVO.getSiteDetails()); painAssVo.setType(pafVO.getType()); return painAssVo; }
protected void onBNewClick() throws ims.framework.exceptions.PresentationLogicException { //------- Add a new review VO and set it in the Context to be used in the dialog PainAssessmentReview reviewVO = new PainAssessmentReview(); MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser(); if(memStaffShortVo != null && memStaffShortVo.getHcp() != null) reviewVO.setRecordingHCP(memStaffShortVo.getHcp()); form.getGlobalContext().COE.PainBodyChart.setPainAssReviewVO(reviewVO); //------------------------------------------------------------------------------ //set the to be used in the Review dialog form.getGlobalContext().COE.PainBodyChart.setReviewPage(new Boolean(true)); //Open the dialog engine.open(form.getForms().Nursing.PainReviewDialog); }
public MemberOfStaffShortVo deactivateMos(MemberOfStaffShortVo mosVo) throws StaleObjectException { if (mosVo.getID_MemberOfStaff() == null) { throw new DomainRuntimeException("Cannot Activate/Deactivate an MOS with NULL id!"); } DomainFactory factory = getDomainFactory(); MemberOfStaff mosBo = MemberOfStaffShortVoAssembler.extractMemberOfStaff(getDomainFactory(), mosVo); mosBo.setIsActive(!(Boolean.TRUE.equals(mosBo.isIsActive()))); if (mosBo.getHcp() != null) { mosBo.getHcp().setIsActive(mosBo.isIsActive()); } factory.save(mosBo); return MemberOfStaffShortVoAssembler.create(mosBo); }
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell) { if (cell.getColumn().equals(getColumn(QUERY_COL))) { cell.getItems().clear(); String value = cell.getTypedText(); PersonName name = new PersonName(); MemberOfStaffShortVo filter = new MemberOfStaffShortVo(); name.setSurname(value); filter.setIsActive(Boolean.TRUE); filter.setName(name); MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter); for (int i = 0; i < voColl.size(); i++) { cell.getItems().newItem(voColl.get(i)); } int cellItemSize = cell.getItems().size(); if (cellItemSize > 0) { if (cellItemSize == 1) cell.setValue(cell.getItems().get(0)); cell.showOpened(); } } }
public HcpCollection listHcps(HcpFilter filter) { if (filter.getQueryName() == null) { MemberOfStaffShortVo voMos = new MemberOfStaffShortVo(); voMos.setStaffType(StaffType.HCP); MemberOfStaffShortVoCollection coll = this.listMembersOfStaff(voMos); HcpCollection voCollHcp = new HcpCollection(); for (int i = 0; i < coll.size(); i++) { MemberOfStaffShortVo voLocalMos = coll.get(i); voCollHcp.add(voLocalMos.getHcp()); } return voCollHcp; } else { HcpAdmin hcpAdmin = (HcpAdmin) getDomainImpl(HcpAdminImpl.class); return hcpAdmin.listHCPs(filter); } }
private boolean testOpDiscipline() { MemberOfStaffVo fullVo = null; MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser(); if (mos != null) fullVo = domain.getMemberOfStaff(mos); if (fullVo != null) { if (fullVo.getHcpIsNotNull()) { if (fullVo.getHcp().getHcpTypeIsNotNull()) { if (form.lyrTabs().tabOPDNote().customControlOPAuthoring().getValue() != null && form.lyrTabs().tabOPDNote().customControlOPAuthoring().getValue().getAuthoringHcpIsNotNull() && form.lyrTabs().tabOPDNote().customControlOPAuthoring().getValue().getAuthoringHcp().getHcpTypeIsNotNull()) { if (form.lyrTabs().tabOPDNote().customControlOPAuthoring().getValue().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType())) return true; } } } } return false; }
private boolean testDiscipline(ClinicalNotesShortVo voNote) { MemberOfStaffVo fullVo = null; MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser(); if (mos != null) fullVo = domain.getMemberOfStaff(mos); if (fullVo != null) { if (fullVo.getHcpIsNotNull()) { if (fullVo.getHcp().getHcpTypeIsNotNull()) { if (voNote.getAuthoringInfoIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcpIsNotNull() && voNote.getAuthoringInfo().getAuthoringHcp().getHcpTypeIsNotNull()) { if (voNote.getAuthoringInfo().getAuthoringHcp().getHcpType().equals(fullVo.getHcp().getHcpType())) return true; } } } } return false; }
protected final void renderMemberOfStaffShortVoToXCNNatCode(MemberOfStaffShortVo mos, XCN xcn,ProviderSystemVo providerSystem) throws DataTypeException { LOG.debug("VoMapper renderMemberOfStaffShortVoToXCNNatCode: entry"); if(mos!=null&&mos.getNameIsNotNull()&&mos.getName().getForenameIsNotNull()) xcn.getGivenName().setValue(mos.getName().getForename()); if(mos!=null&&mos.getNameIsNotNull()&&mos.getName().getSurnameIsNotNull()) xcn.getFamilyName().getSurname().setValue(mos.getName().getSurname()); if(mos!=null&&mos.getNationalConsCode()!=null) { xcn.getIDNumber().setValue(mos.getNationalConsCode()); } else if(mos!=null) { TaxonomyMap mapping = mos.getExternalCode(providerSystem.getCodeSystem()); if (mapping != null) { xcn.getIDNumber().setValue(mapping.getTaxonomyCode()); } } LOG.debug("VoMapper renderMemberOfStaffShortVoToXCNNatCode: exit"); }
private void addMosToGrid(MemberOfStaffShortVoCollection memberOfStaffShortVoCollection) { for(int i = 0; i < memberOfStaffShortVoCollection.size(); i++) { MemberOfStaffShortVo mosVo = memberOfStaffShortVoCollection.get(i); if(isAddedToGrid(mosVo) == false) { grdRecipientsRow row = form.lyrDetails().tabRecipents().grdRecipients().getRows().newRow(); ClinicalCorrespondenceRecipientsVo recipient = new ClinicalCorrespondenceRecipientsVo(); recipient.setMemberOfStaff(mosVo); recipient.setPatient(Boolean.FALSE); row.setValue(recipient); row.setcolName(getMosText(mosVo)); row.setcolPrimary(false); } } }
@Override protected void onQmbMosValueChanged() throws PresentationLogicException { if (form.qmbMos().getValue()!=null) { MemberOfStaffShortVo mos = form.qmbMos().getValue(); if (mos.getCommChannelsIsNotNull()) for (int i=0;i<mos.getCommChannels().size();i++) { if (mos.getCommChannels().get(i).getChannelType().equals(ChannelType.EMAIL)) { form.getGlobalContext().Admin.setuserEmailAccount(domain.getEmailData(form.getLocalContext().getAppUserVo().toAppUserRefVo())); } } form.lnkEmailAccountInfo().setEnabled(true); } }
private boolean selectMosFromGlobalContext() throws PresentationLogicException { // if there is a MOS id in global context populated in WorkQueue // then we select it and display its details Integer targetId = form.getGlobalContext().NTPF.getTargetObjectId(); if (targetId == null) return false; form.getLocalContext().setShowLinkBack(Boolean.TRUE); form.getLocalContext().setPreviousForm(getPreviousForm()); // MemberOfStaffShortVo filterVo = new MemberOfStaffShortVo(); // filterVo.setID_MemberOfStaff(targetId); populateMosTree(); if (form.lyrLHS().tabMos().treMemberOfStaff().getNodes().size() == 1) { TreeNode mosNode = form.lyrLHS().tabMos().treMemberOfStaff().getNodes().get(0); MemberOfStaffShortVo voMosShort = (MemberOfStaffShortVo) form.lyrLHS().tabMos().treMemberOfStaff().getNodes().get(0).getValue(); onTreMemberOfStaffTreeViewSelectionChanged(mosNode); form.lyrLHS().tabMos().treMemberOfStaff().setValue(voMosShort); onContextMenuItemClick(GenForm.ContextMenus.MosOrganisation.EDIT, form.lyrLHS().tabMos().treMemberOfStaff()); } return false; }
private void clearMosNodes(TreeNode node) { TreeNode childNode; ArrayList l = new ArrayList(); for (int i = 0; i < node.getNodes().size(); i++) { childNode = node.getNodes().get(i); if (childNode.getValue() instanceof MemberOfStaffShortVo) { l.add(childNode); } } for (int i = 0; i < l.size(); i++) { node.getNodes().remove((TreeNode) l.get(i)); } }
protected void onImbSetLocsClick() throws PresentationLogicException { MemberOfStaffShortVo voMos = form.getGlobalContext().Admin.getSelectedMos(); populateMosVoFromScreen(voMos);// Need to ensure StaffType is set wdev-3971 if (voMos != null) { form.getLocalContext().setbAdding(Boolean.FALSE); if (voMos.getID_MemberOfStaffIsNotNull()) { MemberOfStaffVo voCouldContainsUnsavedLocationAccreditationMos = form.getGlobalContext().Admin.getSelectedMos(); //setContextVariables(voMos); WDEV-16222 mergeSavedAccreditation(voCouldContainsUnsavedLocationAccreditationMos); } if (ConfigFlag.DOM.ENABLE_EXCHEQUER_CODES_VALIDATION.getValue()) engine.open(form.getForms().Admin.MOSHospitalAccreditationDialog); else engine.open(form.getForms().Admin.MosOrganisationDlg, new Object[]{Boolean.FALSE}); } }
protected void onQmbMemberOfStaffTextSubmited(String value) throws PresentationLogicException { if (value != null) { MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo(); PersonName name = new PersonName(); name.setSurname(value); voMemberOfStaffFilter.setName(name); voMemberOfStaffFilter.setIsAppUser(new Boolean(true)); MemberOfStaffShortVoCollection voCollMemberOfStaff = domain.listStaff(voMemberOfStaffFilter); voCollMemberOfStaff.sort(); form.lyrActivity().tabNtpf().qmbMemberOfStaff().clear(); for (int i = 0; i < voCollMemberOfStaff.size(); i++) { form.lyrActivity().tabNtpf().qmbMemberOfStaff().newRow(voCollMemberOfStaff.get(i), voCollMemberOfStaff.get(i).getName().getForename() + " " + voCollMemberOfStaff.get(i).getName().getSurname()); } if (voCollMemberOfStaff.size() == 1) form.lyrActivity().tabNtpf().qmbMemberOfStaff().setValue(voCollMemberOfStaff.get(0)); else if (voCollMemberOfStaff.size() > 1) form.lyrActivity().tabNtpf().qmbMemberOfStaff().showOpened(); } }
public MemberOfStaffShortVoCollection listMembersOfStaffWithPrimaryLocations(MemberOfStaffShortVo filter) { List mosList = listDomMos(filter); MemberOfStaffVoCollection voCollMos = MemberOfStaffVoAssembler.createMemberOfStaffVoCollectionFromMemberOfStaff(mosList); MemberOfStaffShortVoCollection voCollReturn = new MemberOfStaffShortVoCollection(); if (voCollMos != null) { for (int i = 0; i < voCollMos.size(); i++) { MemberOfStaffShortVo voShortMos = new MemberOfStaffShortVo(); voShortMos = voCollMos.get(i); for (int j = 0; j < voCollMos.get(i).getLocations().size(); j++) { if ( voCollMos.get(i).getLocations().get(j).getIsPrimary() != null && voCollMos.get(i).getLocations().get(j).getIsPrimary().equals(Boolean.TRUE)) voShortMos.setPrimaryLocation(voCollMos.get(i).getLocations().get(j).getLocation()); } voCollReturn.add(voShortMos); } } return voCollReturn; }
@Override protected void onBtnNewClick() throws ims.framework.exceptions.PresentationLogicException { form.setMode(FormMode.EDIT); form.lyr().tabReferralDetails().qmbReferredBy().setEnabled(true); form.lyr().tabReferralDetails().cmbLocations().setEnabled(true); clearScreen(); form.lyr().showtabReferralDetails(); form.getLocalContext().setSelectedReferral(new ReferralsRecordingVo()); // form.customControlAuthoringInfo().initializeComponent(); if (engine.getLoggedInUser().getMosId() != null) { MemberOfStaffRefVo voRef = new MemberOfStaffRefVo(); voRef.setID_MemberOfStaff(engine.getLoggedInUser().getMosId()); MemberOfStaffShortVo voMOSShort = domain.getMemberOfStaff(voRef); form.lyr().tabReferralDetails().txtRecordingUser().setValue(voMOSShort.getNameIsNotNull() ? (voMOSShort.getName().getTitleIsNotNull() ? voMOSShort.getName().getTitle() : "" )+ " " + voMOSShort.getName().getForename() + " " + voMOSShort.getName().getSurname() : ""); form.getLocalContext().setLoggedInMOS(voMOSShort); } form.lyr().tabReferralDetails().dtimRecordingDate().setValue(new DateTime());//getAuthoringInfo()); if (form.getLocalContext().getUserAssessmentVo() != null) { PatientAssessmentVo voPatientAssessmentVo = populatePatientAssessmentFromUserAssessmentShort(form.getLocalContext().getUserAssessmentVo()); form.lyr().tabAssessment().customControlAssessment().setPatientAssessment(voPatientAssessmentVo); } }
public MemberOfStaffShortVo getMemberOfStaff(MemberOfStaffRefVo mosRefVo) { MosAdmin mosadm = (MosAdmin) getDomainImpl(MosAdminImpl.class); MemberOfStaffShortVo mosVo = new MemberOfStaffShortVo(); mosVo.setID_MemberOfStaff(mosRefVo.getID_MemberOfStaff()); return mosadm.getMemberOfStaff(mosVo); }
@Override protected void onQmbDictatedByTextSubmited(String value) throws PresentationLogicException { form.qmbDictatedBy().clear(); if (value != null) { MemberOfStaffShortVo mos = null; MemberOfStaffShortVo filter = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(value); filter.setName(personName); filter.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection voMemberOfStaffShortColl = domain.listMembersOfStaff(filter); if (voMemberOfStaffShortColl != null) { for (int i = 0; i < voMemberOfStaffShortColl.size(); i++) { mos = voMemberOfStaffShortColl.get(i); form.qmbDictatedBy().newRow(mos, mos.toString()); } } if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() == 1) form.qmbDictatedBy().setValue(voMemberOfStaffShortColl.get(0)); else if (voMemberOfStaffShortColl != null && voMemberOfStaffShortColl.size() > 1) form.qmbDictatedBy().showOpened(); Integer id = engine.getLoggedInUser().getMosId(); if (mos != null && id != null &&id.equals(mos.getID_MemberOfStaff())) form.qmbDictatedBy().setValue(mos); } }
@Override protected void onQmbChangingUserTextSubmited(String value) throws PresentationLogicException { form.qmbChangingUser().clear(); MemberOfStaffShortVo voMemberOfStaffFilter = new MemberOfStaffShortVo(); PersonName name = new PersonName(); name.setSurname(value); voMemberOfStaffFilter.setName(name); voMemberOfStaffFilter.setIsAppUser(new Boolean(true)); voMemberOfStaffFilter.setIsActive(Boolean.TRUE); MemberOfStaffShortVoCollection voColl = null; try { voColl = domain.listMembersOfStaff(voMemberOfStaffFilter); } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage()); return; } for (int i = 0 ; voColl != null && i < voColl.size() ;i++) form.qmbChangingUser().newRow(voColl.get(i), voColl.get(i).getNameIsNotNull() ? voColl.get(i).getName().toString() : ""); if (voColl == null || voColl.size() == 0) { engine.showMessage("No Members of Staff found for you search criteria.", "No Data Found", MessageButtons.OK, MessageIcon.INFORMATION); return; } if (voColl.size() == 1) form.qmbChangingUser().setValue(voColl.get(0)); else if (voColl.size() > 1) form.qmbChangingUser().showOpened(); }
private MemberOfStaffShortVo getDisciplineForLoggedInUser(ClinicalNotesVo clinicalNotesVo) { MemberOfStaffVo fullVo = null; MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser(); if (mos != null) fullVo = domain.getMemberOfStaff(mos); if (fullVo != null) { if (fullVo.getHcpIsNotNull() && fullVo.getHcp() instanceof MedicVo) { MedicVo voMedic = (MedicVo)fullVo.getHcp(); if (voMedic.getHcpTypeIsNotNull()) clinicalNotesVo.setDiscipline(voMedic.getHcpType()); else { engine.showMessage("Please select a Discipline type for the logged in user."); return null; } } else { if (form.customControlAuthoring().getValue()!=null && form.customControlAuthoring().getValue().getAuthoringHcpIsNotNull()) clinicalNotesVo.setDiscipline(form.customControlAuthoring().getValue().getAuthoringHcp().getHcpType()); else { engine.showMessage("No Discipline is available. Please choose an authoring user."); return null; } } } else { engine.showMessage("Member of Staff is Null."); return null; } return mos; }
private void initializeCorrespondenceDetails(MemberOfStaffShortVo voMos) { if (null == voMos) { m_strError = "Member of Staff details not supplied."; m_CorrespondenceDetails = null; } //Set PasEventVo m_CorrespondenceDetails.setPasEvent(m_PasEvent); CorrespondenceStatusHistoryVoCollection voCollStatusHistory = new CorrespondenceStatusHistoryVoCollection(); CorrespondenceStatusHistoryVo voStatusHistory = new CorrespondenceStatusHistoryVo(); voStatusHistory.setStatus(DocumentStatus.LETTERREQUIRED); voStatusHistory.setTemplateName(StatusHelper.getGenericTemplateName()); voStatusHistory.setMos(voMos);//wdev-2677 voCollStatusHistory.add(voStatusHistory); m_CorrespondenceDetails.setCspStatusHistory(voCollStatusHistory); //Initialise the current document DocumentVo voCurrentDocument = new DocumentVo(); voCurrentDocument.setStatus(DocumentStatus.LETTERREQUIRED); voCurrentDocument.setPatient(m_PasEvent.getPatient()); //TODO Review voCurrentDocument.setClinicalContact(null); m_CorrespondenceDetails.setCurrentDocument(voCurrentDocument); }
public void saveInpatientEpisodes(InpatientEpisodeVoCollection collInpatientEpisodeVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException { for(int i=0; i<collInpatientEpisodeVo.size(); i++){ if (!collInpatientEpisodeVo.get(i).isValidated()) { throw new DomainRuntimeException("Episode VO has not been validated!"); } DomainFactory factory = getDomainFactory(); InpatientEpisode ipDo = InpatientEpisodeVoAssembler.extractInpatientEpisode(factory, collInpatientEpisodeVo.get(i)); factory.save(ipDo); saveDocumentStatus(collInpatientEpisodeVo.get(i).getPasEvent().getCspDocumentStatus(), collInpatientEpisodeVo.get(i).getPasEvent(), mos); } }
public void saveDischargeEpisodes(DischargedEpisodeVoCollection collDischargedEpisodeVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException { for(int i=0; i<collDischargedEpisodeVo.size(); i++){ if (!collDischargedEpisodeVo.get(i).isValidated()) { throw new DomainRuntimeException("Episode VO has not been validated!"); } DomainFactory factory = getDomainFactory(); DischargedEpisode diDo = DischargedEpisodeVoAssembler.extractDischargedEpisode(factory, collDischargedEpisodeVo.get(i)); factory.save(diDo); saveDocumentStatus(collDischargedEpisodeVo.get(i).getPasEvent().getCspDocumentStatus(), collDischargedEpisodeVo.get(i).getPasEvent(), mos); } }
private void populateControls() { //Prepopulate Controls if(domain.getMosUser() != null) form.textBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); form.dateAssess().setValue(new Date()); form.timeAssess().setValue(new Time()); form.chkSkinIntact().setValue(false); //Save the previous Assessment form.getLocalContext().setPreviousSkinAssessment(form.getGlobalContext().COE.SkinBodyChart.getSkinAssessmentVO()); SkinAssessment skinAssVO = new SkinAssessment(); DrawingImageVersionVo drawingVO = new DrawingImageVersionVo(); //Set the Current Image Name & Version No drawingVO.setImageName(getCurrentImageName()); if(getCurrentVersionNumber() != null) drawingVO.setVersionNumber(getCurrentVersionNumber()); skinAssVO.setImageVersion(drawingVO); skinAssVO.setSkinAssessmentFindings(new SkinAssessmentFindingsCollection()); //Copy the previous Findings getPreviousFindings(skinAssVO); //Set back to the context the SkinAssVO form.getGlobalContext().COE.SkinBodyChart.setSkinAssessmentVO(skinAssVO); form.bNew().setEnabled(false); form.setMode(FormMode.EDIT); }
private void setButtonsCorrectMode() { form.setMode(FormMode.EDIT); form.labelCorrectionReason().setVisible(true); form.textBoxCorrectionReason().setVisible(true); form.checkBoxCorrection().setVisible(true); form.labelCorrectionConfirmed().setVisible(true); form.checkBoxCorrection().setEnabled(true); form.labelCorrectionConfirmed().setEnabled(true); form.chkHospitalReport().setEnabled(false); form.labelCorrectionReason().setVisible(true); form.textBoxClinicalNotes().setEnabled(false); form.textBoxCorrectionReason().setEnabled(true); form.bCorrection().setVisible(false); form.bNew().setVisible(false); form.bSave().setVisible(true);//WDEV-14976 form.bSave().setEnabled(true); form.bCancel().setEnabled(true); form.dateNote().setValue(new ims.framework.utils.Date()); MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo) domain.getMosUser(); if (memStaffShortVo != null && memStaffShortVo.getHcp() != null) { form.getLocalContext().setCurrentHcp(domain.getHcpLite(memStaffShortVo.getHcp().getID_Hcp())); form.textBoxHCP().setValue((memStaffShortVo).toString()); } else form.getLocalContext().setCurrentHcp(null); form.timeNote().setValue(new ims.framework.utils.Time()); }
private void setDefaultMosValue(DynamicGridCell cell) { MemberOfStaffShortVo mos = (MemberOfStaffShortVo) domain.getMosUser(); if (mos != null && mos.getNameIsNotNull()) { cell.getItems().newItem(mos); cell.setValue(mos); } }
private void populateScreen() { DateTime now = new DateTime(new Date(), new Time()); //Prepopulate Controls---------------------------------------------------- if(domain.getMosUser() != null) form.txtBoxHCP().setValue(((MemberOfStaffShortVo)domain.getMosUser()).toString()); form.dteAssessment().setValue(new Date()); form.timAssessment().setValue(new Time()); form.dteRecording().setValue(new Date()); form.timRecording().setValue(new Time()); //------------------------------------------------------------------------- //Save previous PainAssessment form.getLocalContext().setPreviousPainAssessment(form.getGlobalContext().COE.PainBodyChart.getPainAssessmentVO()); PainAssessment painAssessmentVO = new PainAssessment(); painAssessmentVO.setAssessmentDateTime(now); painAssessmentVO.setDateTimeInitiated(now); Object hcpLite = domain.getHcpLiteUser(); painAssessmentVO.setHcpInitiated(hcpLite != null ? ((HcpLiteVo)hcpLite) : null); painAssessmentVO.setSiteDetails(new PainAssessmentFindingsCollection()); DrawingImageVersionVo versionNoVo = new DrawingImageVersionVo(); versionNoVo.setImageName(getCurrentImageName()); if(getCurrentVersionNumber() != null) versionNoVo.setVersionNumber(getCurrentVersionNumber()); painAssessmentVO.setImageVersion(versionNoVo); //Copy the previous Active(Not Discontinued) Findings copyPreviousFindings(painAssessmentVO); //Add a new VO form.getGlobalContext().COE.PainBodyChart.setPainAssessmentVO(painAssessmentVO); }
protected void onBNewClick() throws ims.framework.exceptions.PresentationLogicException { form.getGlobalContext().COE.SkinBodyChart.setReviewDialog(new Boolean(true)); SkinAssessmentReview skinAssReviewVO = new SkinAssessmentReview(); MemberOfStaffShortVo memStaffShortVo = (MemberOfStaffShortVo)domain.getMosUser(); if(memStaffShortVo != null && memStaffShortVo.getHcp() != null) skinAssReviewVO.setHCPReview(memStaffShortVo.getHcp()); skinAssReviewVO.setDateTimeReview(new DateTime(new Date(), new Time())); form.getGlobalContext().COE.SkinBodyChart.setReviewVO(skinAssReviewVO); engine.open(form.getForms().Nursing.SkinReviewDialog); }
private void listMOS(DynamicGridCell cell) { MemberOfStaffShortVo filter = new MemberOfStaffShortVo(); PersonName personName = new PersonName(); personName.setSurname(cell.getTypedText()); filter.setName(personName); filter.setIsActive(Boolean.TRUE); populateCellItems(cell, domain.listMembersOfStaff(filter)); }