private void populateItemFromRow(PatientProcedureVo item, grdProceduresRow childRow) { if(item == null) return; item.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); item.setProcDate(childRow.getcolOnset()); item.setProcedure((ProcedureLiteVo) childRow.getValue()); item.setNotes(childRow.getcolNotes()); item.setProcedureDescription(childRow.getcolNotes()); item.setSpecialty((Specialty) childRow.getParentRow().getValue()); item.setInfoSource(SourceofInformation.CLINICALCONTACT); item.setProcedureStatus(PatientProcedureStatus.PERFORMED); if(item.getAuthoringInformation() == null) { item.setAuthoringInformation(getAuthoringInfo()); } }
/** * Function used to populate the Procedures collection from procedures grid * on ICP tab * * @return */ private ProcedureLiteVoCollection getProcedures() { // Create a new procedures collection ProcedureLiteVoCollection procedures = new ProcedureLiteVoCollection(); // Add each procedure to collection for (int i = 0; i < form.ctnConfiguration().lyrICPTabs().ICP().grdICPProcedures().getRows().size(); i++) { ProcedureLiteVo procedure = form.ctnConfiguration().lyrICPTabs().ICP().grdICPProcedures().getRows().get(i).getValue(); if (procedure == null) continue; procedures.add(procedure); } return procedures; }
@Override protected void onGrdTheatreGridQueryComboBoxTextSubmited(int column, grdTheatreRow row, String text) throws PresentationLogicException { if(form.lyrDetails().tabListOwners().grdListOwner().getRows().size() == 0) return; row.getcolProcedure().clear(); HcpRefVoCollection voCollHcp = new HcpRefVoCollection(); for(int i=0;i<form.lyrDetails().tabListOwners().grdListOwner().getRows().size();i++) voCollHcp.add ((HcpRefVo) form.lyrDetails().tabListOwners().grdListOwner().getRows().get(i).getColHcp().getValue()); ProcedureLiteVoCollection voCollProcedure = domain.listProcedureByHcpAndName(voCollHcp, text); if(voCollProcedure != null) { for(ProcedureLiteVo voProc : voCollProcedure) row.getcolProcedure().newRow(voProc, voProc.getProcedureName()); if(voCollProcedure.size() > 1) row.getcolProcedure().showOpened(); else if(voCollProcedure.size() == 1) row.getcolProcedure().setValue(voCollProcedure.get(0)); else engine.showMessage("No matching records found"); } }
private Boolean checkIfOwnerHasProcedures(HcpRefVo hcpId) { if(hcpId == null) return false; String proceduresId = ""; for (int i = 0; i < form.lyrSessEdit().tabTheatreProcedures().grdTheatre().getRows().size(); i++) { grdTheatreRow tRow = form.lyrSessEdit().tabTheatreProcedures().grdTheatre().getRows().get(i); if(tRow.getcolProcedure().getValue() instanceof ProcedureLiteVo) { proceduresId += ((proceduresId == null || proceduresId.length() == 0) ? "" : ",") + ((ProcedureLiteVo)tRow.getcolProcedure().getValue()).getID_Procedure(); } } return domain.hasSelectedOwnerProcedures(hcpId, proceduresId); }
@Override protected void onGrdTheatreGridQueryComboBoxTextSubmited(int column, grdTheatreRow row, String text) throws PresentationLogicException { if(form.lyrSessEdit().tabListOwners().grdListOwner().getRows().size() == 0) return; row.getcolProcedure().clear(); HcpRefVoCollection voCollHcp = new HcpRefVoCollection(); for(int i=0;i<form.lyrSessEdit().tabListOwners().grdListOwner().getRows().size();i++) voCollHcp.add ((HcpRefVo) form.lyrSessEdit().tabListOwners().grdListOwner().getRows().get(i).getColHcp().getValue()); ProcedureLiteVoCollection voCollProcedure = domain.listProcedureByHcpAndName(voCollHcp, text); if(voCollProcedure != null) { for(ProcedureLiteVo voProc : voCollProcedure) row.getcolProcedure().newRow(voProc, voProc.getProcedureName()); if(voCollProcedure.size() > 1) row.getcolProcedure().showOpened(); else if(voCollProcedure.size() == 1) row.getcolProcedure().setValue(voCollProcedure.get(0)); else engine.showMessage("No matching records found"); } }
private void updateControlState() { Object selectedValue = null; if (form.dyngrdMain().getSelectedRow() != null) selectedValue = form.dyngrdMain().getSelectedRow().getValue(); boolean isConsultantSelected = selectedValue instanceof ConsultantProcedureCategoryVo; boolean isCategorySelected = selectedValue instanceof CategoryProceduresVo; boolean isProcedureSelected = selectedValue instanceof ProcedureLiteVo; boolean viewMode = FormMode.VIEW.equals(form.getMode()); form.getContextMenus().Admin.getConsultantProcedureCategoryAddConsultantItem().setVisible(viewMode); form.getContextMenus().Admin.getConsultantProcedureCategoryAddCategoryItem().setVisible(isConsultantSelected || isCategorySelected); form.getContextMenus().Admin.getConsultantProcedureCategoryAddProcedureItem().setVisible(isCategorySelected || isProcedureSelected); form.getContextMenus().Admin.getConsultantProcedureCategoryRemoveConsultantItem().setVisible(isConsultantSelected); form.getContextMenus().Admin.getConsultantProcedureCategoryRemoveCategoryItem().setVisible(isCategorySelected); form.getContextMenus().Admin.getConsultantProcedureCategoryRemoveProcedureItem().setVisible(isProcedureSelected); if (viewMode) form.btnEdit().setVisible(isCategorySelected || isConsultantSelected || isProcedureSelected); }
private void addProcedures() throws PresentationLogicException { ProcedureLiteVoCollection selectedProcedures = form.getGlobalContext().Clinical.getSelectedProcedures(); if (selectedProcedures == null || selectedProcedures.size() == 0) return; DynamicGridRow selectedRow = form.dyngrdMain().getSelectedRow(); if (selectedRow == null) throw new PresentationLogicException("A selected row was expected"); if (selectedRow.getValue() instanceof ProcedureLiteVo) selectedRow = selectedRow.getParent(); DynamicGridRow newRow = null; for (int i = 0 ; i < selectedProcedures.size() ; i++) newRow = addProcedureToGrid(selectedRow, selectedProcedures.get(i)); form.getLocalContext().setCurrentEditedConsultant(getConsultantParent(selectedRow)); form.getLocalContext().getCurrentEditedConsultant().setExpanded(true,true); selectedRow.setExpanded(true, true); form.dyngrdMain().setSelectedRow(newRow); updateControlState(); if (FormMode.VIEW.equals(form.getMode())) form.setMode(FormMode.EDIT); }
private DynamicGridRow addProcedureToGrid(DynamicGridRow parent, ProcedureLiteVo proc) { if (parent == null || proc == null) throw new RuntimeException("Logic error - non null parameters expected"); DynamicGridColumn mainCol = form.dyngrdMain().getColumns().getByIdentifier(MAIN_COLUMN); DynamicGridRow newRow = parent.getRows().newRow(); newRow.setCollapsedImage(form.getImages().Admin.ProcedureEnabled16); newRow.setExpandedImage(form.getImages().Admin.ProcedureEnabled16); newRow.setValue(proc); DynamicGridCell newCell = newRow.getCells().newCell(mainCol, DynamicCellType.STRING); newCell.setReadOnly(true); newCell.setValue(proc.getProcedureName()); newCell.setAutoPostBack(true); return newRow; }
private PatientProcedureApptDetailVo populatePatientProcedureFromScreen(ProcedureLiteVo procedure, Boolean isPrimary, CatsReferralForClinicalNotesVo referral) { if(procedure == null) return null; PatientProcedureApptDetailVo patientProcedure = new PatientProcedureApptDetailVo(); patientProcedure.setAppointment(form.getGlobalContext().RefMan.getAppointmentForPatientDiagnosisOrProcedures()); patientProcedure.setProcedure(procedure); patientProcedure.setProcedureDescription(procedure.getProcedureName()); patientProcedure.setInfoSource(SourceofInformation.CLINICALCONTACT); patientProcedure.setAuthoringInformation(form.ccAuthoringInfo().getValue()); patientProcedure.setEpisodeOfCare(referral.getCareContext().getEpisodeOfCare()); patientProcedure.setCareContext(referral.getCareContext()); patientProcedure.setProcDate(form.pdtPerformed().getValue()); patientProcedure.setProcedureStatus(OutcomeEnumeration.rdoComplete.equals(form.Outcome().getValue()) ? PatientProcedureStatus.PERFORMED : PatientProcedureStatus.INCOMPLETE); patientProcedure.setIncompleteReason(OutcomeEnumeration.rdoIncomplete.equals(form.Outcome().getValue()) ? form.cmbReason().getValue() : null); patientProcedure.setIsPrimaryProcedure(isPrimary); return patientProcedure; }
private void populateSelectedProcedureGrid(ProcedureLiteVoCollection procedures, HashMap<ProcedureLiteVo, Integer> procCollection) { form.dyngrdProcedures().getRows().clear(); if(procedures == null) return; for(ProcedureLiteVo procedure : procedures) { if(procedure == null) continue; Integer numberOfSameProcedure = procCollection.get(procedure); for(int i=0; i<numberOfSameProcedure; i++) { addSelectedProcedureRow(procedure); } } }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { initialise(); //wdev-18662 form.getLocalContext().setPrimaryProcedureFromPatientElectiveList(null); if (args != null && args.length > 0 && args[0] != null && args[0] instanceof ProcedureLiteVo) { form.getLocalContext().setPrimaryProcedureFromPatientElectiveList((ProcedureLiteVo) args[0]); } //---------- open(); //WDEV-13313 if(!engine.getFormName().equals(form.getForms().RefMan.TheatreAvailability)) loadReferralDetails(); else { form.lyr1().tabReferral().setHeaderVisible(false); form.btnClose().setVisible(false); } }
private void populateTree(ProcedureActivityMappingVoCollection procedureActivities) { form.tre().clear(); if (procedureActivities!=null) for (ProcedureActivityMappingVo item : procedureActivities) { TreeNode node = form.tre().getNodes().add(item,item.getActivityCode()); node.setCollapsedImage(form.getImages().Core.GreenSquare); if (item.getProceduresIsNotNull()) for (int j=0;j<item.getProcedures().size();j++) { ProcedureLiteVo procedure = domain.getProcedure(item.getProcedures().get(j)); TreeNode subNode = node.getNodes().add(procedure, procedure.getProcedureName()); subNode.setCollapsedImage(form.getImages().Core.BlueSquare); } } }
private void addProcedure() { ProcedureLiteVoCollection unavailableProcedures=new ProcedureLiteVoCollection(); ProcedureLiteVoCollection associatedProcedures=new ProcedureLiteVoCollection(); for (int z=0;z<form.tre().getSelectedNode().getNodes().size();z++) { associatedProcedures.add((ProcedureLiteVo) form.tre().getSelectedNode().getNodes().get(z).getValue()); } form.getGlobalContext().RefMan.setAssociatedProcedures(associatedProcedures); for (int i=0;i<form.tre().getNodes().size();i++) { for (int j=0;j<form.tre().getNodes().get(i).getNodes().size();j++) { unavailableProcedures.add((ProcedureLiteVo) form.tre().getNodes().get(i).getNodes().get(j).getValue()); } } form.getGlobalContext().RefMan.setunavailableProcedures(unavailableProcedures); engine.open(form.getForms().RefMan.SelectProcedure); }
protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { ProcedureLiteVoCollection showProcedures=new ProcedureLiteVoCollection(); ProcedureLiteVoCollection procedures = domain.listProcedures(); ProcedureLiteVoCollection existingProcedures = form.getGlobalContext().RefMan.getunavailableProcedures(); if (existingProcedures==null) { showProcedures=procedures; } else { for (ProcedureLiteVo item: procedures) { if (!existingProcedures.contains(item)) showProcedures.add(item); } } populateSelectProceduresGrid(showProcedures); populateSelectedProceduresGrid(form.getGlobalContext().RefMan.getAssociatedProcedures()); }
private boolean isTheatreSlotAlreadyAdded(ProcedureLiteVo voProcedure, SessionTheatreVo voSession) { for(int i=0;i<form.grdTheatreSession().getRows().size();i++) { grdTheatreSessionRow row = form.grdTheatreSession().getRows().get(i); if(row.getValue() != null) { if(row.getValue().getProcedureIsNotNull() && row.getValue().getSessionIsNotNull()) { if(voProcedure != null && voSession != null) { if(row.getValue().getProcedure().equals(voProcedure) && row.getValue().getSession().equals(voSession)) return true; } } } } return false; }
private String allowBooking(SessionTheatreVo session, ProcedureLiteVo voProcedure) { //if we have an overbooking right we disregard all the checks if(engine.hasRight(AppRight.CAN_OVERBOOK_THEATRE_APPTS)) return null; if(session != null && voProcedure != null) { if(session.getTheatreProceduresRemainingIsNotNull()) { //if the procedure is limited and the number of procedures left is 0 for(TheatreProcedureLiteVo voTheatreProc : session.getTheatreProceduresRemaining().getProcedureDetails()) { if(voTheatreProc.getProcedure().equals(voProcedure)) { if(voTheatreProc.getIsLimitedIsNotNull() && voTheatreProc.getIsLimited() && voTheatreProc.getNumberOfProceduresLeftIsNotNull() && voTheatreProc.getNumberOfProceduresLeft() == 0) return "Limit has been reached for this procedure."; } } } } return null; }
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt) { if (appt == null || appt.getID_Booking_Appointment() == null) throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant"); TheatreProcedureServiceAndConsultantLiteVo voPsc = null; Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(appt); if(doAppt != null) { ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null); ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null); HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null); voPsc = new TheatreProcedureServiceAndConsultantLiteVo(); voPsc.setService(voService); voPsc.setProcedure(voProc); voPsc.setConsultant(voMos); } return voPsc; }
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo voAppt) { if (voAppt == null || voAppt.getID_Booking_Appointment() == null) throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant"); TheatreProcedureServiceAndConsultantLiteVo voPsc = null; Booking_Appointment doAppt = (Booking_Appointment)getDomainFactory().getDomainObject(voAppt); if(doAppt != null) { ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null); ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null); HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null); voPsc = new TheatreProcedureServiceAndConsultantLiteVo(); voPsc.setService(voService); voPsc.setProcedure(voProc); voPsc.setConsultant(voMos); } return voPsc; }
public TheatreProcedureServiceAndConsultantLiteVo getTheatreServiceProcedureAndConsultant(Booking_AppointmentRefVo appt) { if (appt == null || appt.getID_Booking_Appointment() == null) throw new CodingRuntimeException("appt is null or id not provided in method getTheatreServiceProcedureAndConsultant"); TheatreProcedureServiceAndConsultantLiteVo voPsc = null; Booking_Appointment doAppt = (Booking_Appointment) getDomainFactory().getDomainObject(appt); if (doAppt != null) { ServiceLiteVo voService = ServiceLiteVoAssembler.create(doAppt.getSession() != null ? doAppt.getSession().getService() : null); ProcedureLiteVo voProc = ProcedureLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getProcedure() : null); HcpLiteVo voMos = HcpLiteVoAssembler.create(doAppt.getTheatreBooking() != null ? doAppt.getTheatreBooking().getConsultant() : null); voPsc = new TheatreProcedureServiceAndConsultantLiteVo(); voPsc.setService(voService); voPsc.setProcedure(voProc); voPsc.setConsultant(voMos); } return voPsc; }
private PatientProcedureSurgicalOpVo createPatientProcedure(ProcedureLiteVo proc) { PatientProcedureSurgicalOpVo patProc = new PatientProcedureSurgicalOpVo(); patProc.setProcedure(proc); patProc.setAuthoringInformation(getAuthoringInfo()); patProc.setProcedureDescription(proc.getProcedureName()); patProc.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); //wdev-11815 patProc.setEpisodeOfCare(form.getGlobalContext().Core.getCurrentCareContext().getEpisodeOfCare()); //----- patProc.setIncludeInDischargeLetter(true); patProc.setInfoSource(SourceofInformation.CLINICALCONTACT); patProc.setProcedureStatus(PatientProcedureStatus.PERFORMED); return patProc; }
private void populateGrid(ProcedureLiteVoCollection procs) { form.grdItems().getRows().clear(); if (procs == null) return; for (int i=0 ; i < procs.size(); i++) { ProcedureLiteVo proc = procs.get(i); if (proc != null ) { grdItemsRow nRow = form.grdItems().getRows().newRow(); nRow.setcolProcedureName(proc.getProcedureName()); nRow.setValue(proc); } } }
private ProcedureLiteVo getGenericRowProcedure(boolean bAll) { ProcedureLiteVo voProcedure = new ProcedureLiteVo(); if (bAll) { voProcedure.setID_Procedure(new Integer(SEARCH_ALL_ITEMS_SELECTED_ID)); voProcedure.setProcedureName(SEARCH_ALL_ITEM_SELECTED + "Procedures"); } else { voProcedure.setID_Procedure(new Integer(NO_CODE_ITEM_SELECTED_ID)); voProcedure.setProcedureName(NO_CODE_ITEM_SELECTED); } return voProcedure; }
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation) { if (description == null || careContext == null || sourceOfInformation == null) return null; PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo(); patientProcedure.setProcedure(procedure); patientProcedure.setProcedureDescription(description); patientProcedure.setCareContext(careContext); patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort()); patientProcedure.setAuthoringInformation(authoringInformation); patientProcedure.setInfoSource(sourceOfInformation); patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED); patientProcedure.setProcDate(form.lyr1().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyr1().tabCareRecord().dteDate().getValue()) : null);// wdev-8393 return patientProcedure; }
@Override protected void onCcClinicalProcedureValueChanged() throws PresentationLogicException { if (form.getMode().equals(FormMode.EDIT) ) { form.cmbLaterality().setEnabled(form.ccClinicalProcedure().getSelectedItem() != null); form.intDuration().setEnabled(form.ccClinicalProcedure().getSelectedItem() != null); if (form.ccClinicalProcedure().getSelectedItem() == null) form.cmbLaterality().setValue(null); if (form.ccClinicalProcedure().getSelectedItem() instanceof ProcedureLiteVo) form.intDuration().setValue(((ProcedureLiteVo)form.ccClinicalProcedure().getSelectedItem()).getDurationInMins()); else form.intDuration().setValue(null); } updateControlsState(); }
private PatientProcedureLiteVo newPatientProcedure(ProcedureLiteVo procedure, String description, CareContextShortVo careContext, AuthoringInformationVo authoringInformation, SourceofInformation sourceOfInformation) { if (description == null || careContext == null || sourceOfInformation == null) return null; PatientProcedureLiteVo patientProcedure = new PatientProcedureLiteVo(); patientProcedure.setProcedure(procedure); patientProcedure.setProcedureDescription(description); patientProcedure.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort()); patientProcedure.setCareContext(careContext); patientProcedure.setAuthoringInformation(authoringInformation); patientProcedure.setInfoSource(sourceOfInformation); patientProcedure.setProcedureStatus(PatientProcedureStatus.PLANNED); patientProcedure.setProcDate(form.lyrMain().tabCareRecord().dteDate().getValue() != null ? new PartialDate(form.lyrMain().tabCareRecord().dteDate().getValue()) : null);// wdev-8393 return patientProcedure; }
private void populateProcedurecombo(ProcedureLiteVoCollection listProcedure) { form.cmbProcedure().clear(); if (listProcedure != null) { for (ProcedureLiteVo item : listProcedure) { form.cmbProcedure().newRow(item, item.getProcedureName()); } if (listProcedure.size() == 1) { form.cmbProcedure().setValue(listProcedure.get(0)); procedureSelected(); } else if (listProcedure.size() > 1) form.cmbProcedure().showOpened(); } else { clearTextControls(); } }
private void populateProcedureQcombo(ProcedureLiteVoCollection listProcedure) { form.qmbProcedure().clear(); if (listProcedure != null) { for (ProcedureLiteVo item : listProcedure) { form.qmbProcedure().newRow(item, item.getProcedureName()); } if (listProcedure.size() == 1) { form.qmbProcedure().setValue(listProcedure.get(0)); procedureSelected(); } else if (listProcedure.size() > 1) form.qmbProcedure().showOpened(); } else { clearTextControls(); } }
/** * will call procedure List Impl to list procedures * @throws DomainInterfaceException */ public ProcedureLiteVoCollection listProcedures(String filter) throws DomainInterfaceException { CCIAdmin impl = (CCIAdmin)getDomainImpl(CCIAdminImpl.class); ProcedureLiteVoCollection coll = new ProcedureLiteVoCollection(); IGenericItem[] items = impl.listIGenericItems(filter, CciType.PROCEDURE, true); if (items != null) { for ( int i = 0; i < items.length; i++) { coll.add((ProcedureLiteVo)items[i]); } return coll; } return null; }
private void populateSecondaryProcedure(ProcedureLiteVoCollection procedures) { form.qmbIntendedProcedure2().clear(); form.cmbLaterality2().setValue(null); if (procedures == null) return; for (ProcedureLiteVo procedure : procedures) { form.qmbIntendedProcedure2().newRow(procedure, procedure.getProcedureName()); } if (procedures.size() == 1) { form.qmbIntendedProcedure2().setValue(procedures.get(0)); form.intSurgeryTime().setValue(null); } else { form.qmbIntendedProcedure2().showOpened(); } }
private void populatePrimaryProcedure(ProcedureLiteVoCollection procedures) { form.qmbIntendedProcedure1().clear(); form.cmbLaterality1().setValue(null); form.intSurgeryTime().setValue(null); if (procedures == null) return; for (ProcedureLiteVo procedure : procedures) { form.qmbIntendedProcedure1().newRow(procedure, procedure.getProcedureName()); } if (procedures.size() == 1) { form.qmbIntendedProcedure1().setValue(procedures.get(0)); form.intSurgeryTime().setValue(form.qmbIntendedProcedure2().getValue() == null ? procedures.get(0).getDurationInMins() : null); } else { form.qmbIntendedProcedure1().showOpened(); } }