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()); } }
private boolean getRowSelected(DynamicGridRow dynamicGridRow, PatientProcedureVo patientProcedureVo) { if (dynamicGridRow.getValue().equals(form.getLocalContext().getPatientProcedureVo())) { form.dyngrdProcedure().setValue(dynamicGridRow.getValue()); if(dynamicGridRow.getParent() != null) dynamicGridRow.getParent().setExpanded(true); return true; } for(int i=0; i<dynamicGridRow.getRows().size(); i++) { return getRowSelected(dynamicGridRow.getRows().get(i), patientProcedureVo); } return false; }
private void setReturnToFormDescription(PatientProcedureVo voPatientProc) { if ((form.getGlobalContext().Clinical.getReturnToFormNameIsNotNull()) && (form.getGlobalContext().Clinical.getReturnToFormName().equals(engine.getPreviousNonDialogFormName()))) { // Set the CDI Description for the return to form link String str = form.getGlobalContext().Clinical.getReturnToFormCDIDescriptionIsNotNull() ? form.getGlobalContext().Clinical.getReturnToFormCDIDescription() : ""; StringBuffer sb = new StringBuffer(); sb.append(str); if (sb.length() > 0) sb.append(", "); sb.append(voPatientProc.getProcedureDescription()); form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString()); form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT); } }
private void gridProcedureSelChange() { // PatientProcedureShortListVo voPatientProcedureShortList = form.grdProcedure().getValue(); PatientProcedureShortListVo voPatientProcedureShortList = (PatientProcedureShortListVo) form.dyngrdProcedure().getValue(); if (voPatientProcedureShortList == null) { engine.showMessage("Please select a Planned Procedure"); return; } PatientProcedureVo voPatProc = domain.getProcedure(voPatientProcedureShortList); form.getLocalContext().setPatientProcedureVo(voPatProc); form.getGlobalContext().Clinical.setPatientProcedureForIntraOperativeDialog(voPatProc); selectIntraOperativeRecords(voPatProc); populateScreenFromData(voPatProc); enableContextMenu(); }
/** * WDEV-8399 * Selects the intra operative care record. * If the current patient procedure has an intra operative detail than it selects * that record. If not it verifies if the planned procedure exists and has a intra * operative detail. * @param voPatProc - the patient procedure correspondent to the current row */ private void selectIntraOperativeRecords(PatientProcedureVo voPatProc) { if (voPatProc == null) return; form.getLocalContext().setIntraOperativeCareCurrentRecord(null); if (form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialogIsNotNull() && form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog().getIntraOperativeRecordIsNotNull()) { form.getLocalContext().setIntraOperativeCareCurrentRecord(domain.getIntraOperativeCareRecord(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog().getIntraOperativeRecord())); } else { if (voPatProc.getPlannedProcIsNotNull()) { form.getGlobalContext().Clinical.setPatientProcedureForIntraOperativeDialog(domain.getProcedure(voPatProc.getPlannedProc())); if (form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialogIsNotNull() && form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog().getIntraOperativeRecordIsNotNull()) { form.getLocalContext().setIntraOperativeCareCurrentRecord(domain.getIntraOperativeCareRecord(form.getGlobalContext().Clinical.getPatientProcedureForIntraOperativeDialog().getIntraOperativeRecord())); } } } }
private void populatePresentProceduresControls(PatientProcedureVoCollection presentProcedures) { for (int i=0; i < presentProcedures.size(); i++){ PatientProcedureVo voPatientProcedure = presentProcedures.get(i); grdChecklistRow row = form.grdChecklist().getRows().newRow(); if(voPatientProcedure.getProcedureIsNotNull()) { row.setColProcedure(voPatientProcedure.getProcedure().getProcedureName()); } row.setColPresentAbsent(PresentAbsentUnknown.PRESENT); if(voPatientProcedure.getInfoSourceIsNotNull()) row.setColSource(voPatientProcedure.getInfoSource()); if(voPatientProcedure.getProcDateIsNotNull()) row.setColProcedureDate(voPatientProcedure.getProcDate()); if(voPatientProcedure.getProcedureDescriptionIsNotNull()) row.setColDescription(voPatientProcedure.getProcedureDescription()); row.setValue(voPatientProcedure); setGridUIForPresent(row); } }
public int compare(Object ob1, Object ob2) { PartialDate pdate1 = null; PartialDate pdate2 = null; if (ob1 instanceof PatientProcedureVo) { PatientProcedureVo proc1 = (PatientProcedureVo) ob1; pdate1 = proc1.getProcDateIsNotNull() ? proc1.getProcDate():null; } if (ob2 instanceof PatientProcedureVo) { PatientProcedureVo proc2 = (PatientProcedureVo) ob2; pdate2 = proc2.getProcDateIsNotNull() ? proc2.getProcDate():null; } if (pdate1 != null) return pdate1.compareTo(pdate2)*direction; if (pdate2 != null) return (-1)*direction; return 0; }
protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { PatientProcedureVo voProc = form.getGlobalContext().Core.getSelectedPatientProcedure(); voProc.setCancelledDate(form.dteCancelled().getValue()); voProc.setCancelledReason(form.txtReason().getValue()); form.getGlobalContext().Core.setSelectedPatientProcedure(voProc); engine.close(DialogResult.OK); }
private PatientProcedureVo getInstantiatedProcedure(ProcedureListVo procedure, Specialty specialty, PatientProcedureVoCollection list) { if(list == null) return null; for (int i = 0; i < list.size(); i++) { if(list.get(i).getSpecialtyIsNotNull() && list.get(i).getSpecialty().equals(specialty) && list.get(i).getProcedureIsNotNull() && list.get(i).getProcedure().getID_Procedure().equals(procedure.getProcedure().getID_Procedure())) return list.get(i); } return null; }
@Override protected void onBtnAmendClick() throws PresentationLogicException { if(!(form.recbrIOCR().getValue() instanceof IntraOperativeCareRecordLiteVo)) return; PatientProcedureVo plannedProcedure = domain.getPlannedProcedure(form.recbrIOCR().getValue()); if(plannedProcedure != null) { form.getGlobalContext().Clinical.setPatientProcedureForIntraOperativeDialog(plannedProcedure); engine.open(form.getForms().Clinical.IntraOperativeCareRecordDialog); } }
private void linkNewSFS(PatientProcedureShortWithCareIntraOperativeVo value) { if (form.grdProcedures().getValue() != null && form.grdProcedures().getValue().getPlannedProcIsNotNull()) { PatientProcedureVo voProc = new PatientProcedureVo(form.grdProcedures().getValue().getPlannedProc().getID_PatientProcedure(), form.grdProcedures().getValue().getPlannedProc().getVersion_PatientProcedure()); form.getGlobalContext().Clinical.setPatientProcedureForIntraOperativeDialog(voProc); engine.open(form.getForms().RefMan.ReferralCodingProcedureToSFSAssessmentDialog); } }
private void newInstance() { clearInstanceControls(); form.ctnDetails().GroupExclude().setValue(GroupExcludeEnumeration.rdoNo); form.ctnDetails().customControlCodingItem().setIsRequired(true); PatientProcedureVo voPatProc = new PatientProcedureVo(); if (voPatProc.getID_PatientProcedure() == null) { // Set default data voPatProc.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); voPatProc.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voPatProc.setEpisodeOfCare(form.getGlobalContext().Core.getEpisodeofCareShort()); form.ctnDetails().setCollapsed(false); voPatProc.setProcedureStatus(PatientProcedureStatus.PLANNED); voPatProc.setInfoSource(SourceofInformation.CLINICALCONTACT); voPatProc.setSignifProc(new Boolean(false)); } form.getLocalContext().setPatientProcedureVo(voPatProc); // WDEV-1038 setResponsibleHcp(form.getGlobalContext().Core.getCurrentCareContext()); form.ctnDetails().dtimUser().setValue(new DateTime()); Object hcpLite = domain.getHcpLiteUser(); form.ctnDetails().txtRecordingHCP().setValue(hcpLite != null ? (((HcpLiteVo) hcpLite).getName() != null ? ((HcpLiteVo) hcpLite).getName().toString() : null) : null); form.ctnDetails().customControlAuthoringInfo().initializeComponent(); form.ctnDetails().GroupStatus().setValue(GenForm.ctnDetailsContainer.GroupStatusEnumeration.rdoPlanned); form.ctnDetails().grpProcedureType().setValue(GenForm.ctnDetailsContainer.grpProcedureTypeEnumeration.rdoSpecialty); setInitialCustomControlCodingSettings(); form.setMode(FormMode.EDIT); enableAuthoringControls(Boolean.TRUE); hideOrDisplayUrgencyAndPerformedControls(); }
private void setPrimaryProcedure(ClinicalDIAssociationVoCollection voDIAssociation) { PatientProcedureVo voPatientProcedure = form.getLocalContext().getPatientProcedureVo(); for (int i = 0; voPatientProcedure != null && voDIAssociation != null && i < voDIAssociation.size(); i++) { if (voDIAssociation.get(i).getPrimProcedure() == null || voDIAssociation.get(i).getPrimProcedure().getID_PatientProcedure() == null) voDIAssociation.get(i).setPrimProcedure(voPatientProcedure); } }
private PatientAbsentProcedureVo populateAbsentProceduresData(grdChecklistRow row) { PatientAbsentProcedureVo voPatientAbsentProcedure = new PatientAbsentProcedureVo(); ProcedureLiteVo voProcedureVo = null; if (row.getValue() != null) { if (row.getValue() instanceof PatientAbsentProcedureVo) { voProcedureVo =((PatientAbsentProcedureVo) row.getValue()).getProcedure(); } else if (row.getValue() instanceof PatientProcedureVo) { voProcedureVo =((PatientProcedureVo) row.getValue()).getProcedure(); } else if (row.getValue() instanceof ProcedureLiteVo) { voProcedureVo =((ProcedureLiteVo) row.getValue()); } } voPatientAbsentProcedure.setProcedure(voProcedureVo); voPatientAbsentProcedure.setSelected(row.getColPresentAbsent()); voPatientAbsentProcedure.setSourceofInformation(row.getColSource()); row.setValue(voPatientAbsentProcedure); return voPatientAbsentProcedure; }
private PatientProcedureVo searchExistingProcedures(grdChecklistRow row) { PatientProcedureShortListVoCollection collPatientProcedureShortListVo = form.getLocalContext().getPatientProcedureShortListVoCollection(); if(collPatientProcedureShortListVo!=null) for(int i=0; i<collPatientProcedureShortListVo.size(); i++) { //if was linked if(collPatientProcedureShortListVo.get(i).getProcedureIsNotNull() && collPatientProcedureShortListVo.get(i).getProcedure().getProcedureName().equals(row.getColProcedure()) && collPatientProcedureShortListVo.get(i).getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact())) { return new PatientProcedureVo(); } else { PatientProcedureVo procedureVo = domain.getProcedure(collPatientProcedureShortListVo.get(i)); if(collPatientProcedureShortListVo.get(i).getProcedureIsNotNull() && (!(collPatientProcedureShortListVo.get(i).getProcedureIsNotNull() && collPatientProcedureShortListVo.get(i).getProcedure().getProcedureName().equals(row.getColProcedure()) && row.getColProcedure().equals((procedureVo.getProcedure().getProcedureName()))))) { return procedureVo; } else if (collPatientProcedureShortListVo.get(i).getProcedureIsNotNull() && ((collPatientProcedureShortListVo.get(i).getProcedureIsNotNull() && collPatientProcedureShortListVo.get(i).getProcedure().getProcedureName().equals(row.getColProcedure()) && row.getColProcedure().equals((procedureVo.getProcedure().getProcedureName()))) && !collPatientProcedureShortListVo.get(i).getClinicalContact().getID_ClinicalContact().equals(form.getGlobalContext().Core.getCurrentClinicalContact().getID_ClinicalContact()))) { return procedureVo; } } } return new PatientProcedureVo(); }
@Override protected void ongrdChecklistGridColPresentAbsentColumnAnswerBoxValueChanged(grdChecklistRow row) throws PresentationLogicException { if (row.getColPresentAbsent() !=null) { if (row.getColPresentAbsent().equals(PresentAbsentUnknown.ABSENT)) { row.setColSource(null); row.setColDescription(null); setGridUIForAbsent(row); } else if (row.getColPresentAbsent().equals(PresentAbsentUnknown.PRESENT)) { if (row.getValue() instanceof PatientAbsentProcedureVo){ PatientAbsentProcedureVo voPatientAbsentProcedure = (PatientAbsentProcedureVo)row.getValue(); if(voPatientAbsentProcedure.getSourceofInformationIsNotNull()) row.setColSource(voPatientAbsentProcedure.getSourceofInformation()); row.setColDescription(row.getColProcedure()); } else if (row.getValue() instanceof PatientProcedureVo){ PatientProcedureVo voPatientProcedure = (PatientProcedureVo)row.getValue(); if(voPatientProcedure.getInfoSourceIsNotNull()) row.setColSource(voPatientProcedure.getInfoSource()); row.setColDescription(row.getColProcedure()); } else { row.setColDescription(row.getColProcedure()); } setGridUIForPresent(row); } } }
private void doAddFromLocalSearch() { ProcedureLiteVoCollection procList = form.getGlobalContext().Clinical.getSelectedProcedures(); for (int i=0; i < procList.size(); i++) { boolean bFound = false; for (int j=0; j < form.grdChecklist().getRows().size(); j++) { if (form.grdChecklist().getRows().get(j).getColProcedure()!=null && form.grdChecklist().getRows().get(j).getColProcedure().equals(procList.get(i).getProcedureName())) { bFound = true; engine.showMessage("Procedure record called \"" + procList.get(i).getProcedureName() + "\" is already in list."); break; } } if(!bFound) { grdChecklistRow row = form.grdChecklist().getRows().newRow(); row.setColProcedure(procList.get(i).getProcedureName()); row.setColPresentAbsent(PresentAbsentUnknown.PRESENT); row.setColDescription(procList.get(i).getProcedureName()); PatientProcedureVo voPatientProcedure = new PatientProcedureVo(); voPatientProcedure.setProcedure(procList.get(i)); voPatientProcedure.setProcedureDescription(procList.get(i).getProcedureName()); row.setValue(voPatientProcedure); } } }
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedureRefVo) { if( patientProcedureRefVo == null) throw new DomainRuntimeException("PatientProcedure cannot be null."); if( patientProcedureRefVo.getID_PatientProcedure() == null) throw new DomainRuntimeException("PatientProcedure ID cannot be null."); DomainFactory factory = getDomainFactory(); PatientProcedure doPatProcedure = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedureRefVo.getID_PatientProcedure()); return PatientProcedureVoAssembler.create(doPatProcedure); }
public PatientProcedureVo getPatientProcedure(PatientProcedureRefVo procedureRef) { if (procedureRef == null || !procedureRef.getID_PatientProcedureIsNotNull()) return null; return PatientProcedureVoAssembler.create((PatientProcedure) getDomainFactory().getDomainObject(PatientProcedure.class, procedureRef.getID_PatientProcedure())); }
public PatientProcedureVo getProcedure(PatientProcedureRefVo patientProcedure) { if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null) throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure"); DomainFactory factory = getDomainFactory(); return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure())); }
public PatientProcedureVo saveProcedure(PatientProcedureVo voPatientProcedure, PatientShort patientShortVo) throws StaleObjectException, UniqueKeyViolationException { if (voPatientProcedure == null) throw new RuntimeException("Cannot save null PatientProcedureVo"); if (voPatientProcedure.isValidated() == false) throw new RuntimeException("PatientProcedureVo is not validated"); Procedures plannedProcedureImpl = (Procedures) getDomainImpl(PlannedProcedureImpl.class); return plannedProcedureImpl.savePlannedProcedure(voPatientProcedure, patientShortVo); }
public ims.core.vo.PatientProcedureVo getProcedure(ims.core.clinical.vo.PatientProcedureRefVo patientProcedure) { if (patientProcedure == null || patientProcedure.getID_PatientProcedure() == null) throw new CodingRuntimeException("patientProcedure is null or id not provided in method getProcedure"); DomainFactory factory = getDomainFactory(); return PatientProcedureVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, patientProcedure.getID_PatientProcedure())); }