protected void onFormModeChanged() { if (form.getMode().equals(FormMode.VIEW)) { isBtnCloseVisible(isDialog()); } else { isBtnCloseVisible(false); form.ctnDetails().chkPMH().setEnabled(form.ctnDetails().chkPMH().getValue() == false); PatientDiagnosisVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo(); boolean newRecord = voPatientDiagnosis == null || voPatientDiagnosis.getID_PatientDiagnosis() == null; form.ctnDetails().setcustomControlAuthoringEnabled(newRecord); } enableChkResolved(); updateControlsState(); }
private void grdDiagnosisSelectionChanged() { form.getLocalContext().setSelectedPatientDiagnosisVo(null); if (form.grdDiagnosis().getValue() != null) { form.ctnDetails().setCollapsed(false); PatientDiagnosisListVo voPatDiagShort = form.grdDiagnosis().getValue(); PatientDiagnosisVo voPatDiag = domain.getDiagnosisVo(voPatDiagShort); if (voPatDiag != null && voPatDiag.getStatusHistoryIsNotNull()) // WDEV-2535 setTooltip(voPatDiag); else setTooltip(null); populateInstanceControls(voPatDiag); boolean isPrimaryDiagnosis = isPrimaryDiagnosisActive(voPatDiagShort); form.ctnDetails().chkPrimaryDiagnosis().setValue(isPrimaryDiagnosis); form.getContextMenus().getPastMedicalHistoryLinkingItem().setVisible(!isPrimaryDiagnosis); form.getLocalContext().setSelectedPatientDiagnosisVo(voPatDiag); } updateControlsState(); updateContextMenus(); }
private void setCsPrimaryDiagnosis(PatientDiagnosisVo voPatDiagnosis, boolean isChkPrimaryChecked) { CSPrimaryDiagnosisVo voCSPrimaryDiagnosis = getPrimaryDiagnosisRecord(voPatDiagnosis); if (voCSPrimaryDiagnosis != null || isChkPrimaryChecked) { if (voCSPrimaryDiagnosis == null) { voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(new CSPrimaryDiagnosisVo(), voPatDiagnosis, isChkPrimaryChecked); if (voPatDiagnosis.getPrimaryForCareSpells() == null) voPatDiagnosis.setPrimaryForCareSpells(new CSPrimaryDiagnosisVoCollection()); voPatDiagnosis.getPrimaryForCareSpells().add(voCSPrimaryDiagnosis); } else { int index = voPatDiagnosis.getPrimaryForCareSpells().indexOf(voCSPrimaryDiagnosis); if (index >= 0) { voCSPrimaryDiagnosis = populatePrimaryDiagnosisDataFromScreen(voCSPrimaryDiagnosis, voPatDiagnosis, isChkPrimaryChecked); voPatDiagnosis.getPrimaryForCareSpells().set(index, voCSPrimaryDiagnosis); } } } }
public boolean save() throws PresentationLogicException { Boolean savePmh = isPMHToBeSaved(); PatientDiagnosisVo voPatientDiagnosis = populateDataFromScreen(); //wdev-11963 if(form.ctnDetails().customControlAuthoring().getValue() == null) { engine.showErrors(new String[]{"Authoring HCP and Date/Time are mandatory."}); return false; } //---------------- String[] uiErrors = validateUIRules(); return saveDiagnosisRecord(voPatientDiagnosis, savePmh, uiErrors); }
private void setReturnToFormDescription(PatientDiagnosisVo voPatientDiagnosis) { 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(voPatientDiagnosis.getDiagnosisDescription()); form.getGlobalContext().Clinical.setReturnToFormCDIDescription(sb.toString()); form.getGlobalContext().Clinical.setReturnToFormMode(FormMode.EDIT); } }
private void setTooltip(PatientDiagnosisVo vo) { if (vo != null && vo.getStatusHistoryIsNotNull() && vo.getStatusHistory().size() > 0) { PatientDiagnosisStatusVoCollection collVo = vo.getStatusHistory().sort(SortOrder.DESCENDING); String tooltip = ""; String setFont = "<FONT FACE='Times New Roman' SIZE='2'>"; String endFont = "</FONT>"; String table = "<TABLE CELLPADDING='1' CELLSPACING='1' BORDER='3' ><TR><TD BGCOLOR=\'#BBBBFF\' ALIGN='LEFT'>"; String endStatus = endFont + "<B></TD></TR><TR>"; String dateTime = "<TD colspan=1 width=60% align=\'LEFT\'> " + setFont; String hcp = endFont + "</TD><TD colspan=1 width=60% align=\'LEFT\'>" + setFont; String end = endFont + "</TD></TR><TR></TABLE>"; for (int i = 0; i < collVo.size(); i++) { tooltip += table + setFont + "<B>" + (i + 1) + ". " + collVo.get(i).getStatus() + endStatus + endFont + dateTime + collVo.get(i).getAuthoringDateTime() + hcp + collVo.get(i).getAuthoringHCP() + end; } form.ctnDetails().imbStatus().setTooltip(tooltip); } else form.ctnDetails().imbStatus().setTooltip("No history"); //wdev-17357 }
private void setPrimaryDiagnosis(ClinicalDIAssociationVoCollection voDIAssociation) { PatientDiagnosisVo voPatientDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo(); for (int i = 0; voPatientDiagnosis != null && voDIAssociation != null && i < voDIAssociation.size(); i++) { if (voDIAssociation.get(i).getPrimDiagnosis() == null || voDIAssociation.get(i).getPrimDiagnosis().getID_PatientDiagnosis() == null) voDIAssociation.get(i).setPrimDiagnosis(voPatientDiagnosis); } }
private void markProblemasPrimary() throws PresentationLogicException { PatientDiagnosisListVo voPatientDiagnosisList = form.grdDiagnosis().getValue(); if (voPatientDiagnosisList == null) { engine.showErrors(new String[]{"Please select a Diagnosis / Complication"}); return; } PatientDiagnosisVo voPatientDiagnosis = domain.getDiagnosisVo(voPatientDiagnosisList); setCsPrimaryDiagnosis(voPatientDiagnosis, true); if (saveDiagnosisRecord(voPatientDiagnosis, Boolean.FALSE, null)) { PatientDiagnosisVo voPatDiagnosis = form.getLocalContext().getSelectedPatientDiagnosisVo(); GenForm.grdDiagnosisRow row = form.grdDiagnosis().getRowByValue(voPatDiagnosis); if (row != null) { setPatientDiagnosisRowData(row, voPatDiagnosis); grdDiagnosisSelectionChanged(); } } }
private CSPrimaryDiagnosisVo getPrimaryDiagnosisRecord(PatientDiagnosisVo voPatDiagnosis) { if (voPatDiagnosis == null || voPatDiagnosis.getPrimaryForCareSpells() == null) return null; CSPrimaryDiagnosisVoCollection voColl = voPatDiagnosis.getPrimaryForCareSpells(); for (int i = 0; voColl != null && i < voColl.size(); i++) { boolean sameDiagnosis = voColl.get(i).getDiagnosisIsNotNull() && voColl.get(i).getDiagnosis().equals(voPatDiagnosis); // WDEV-11693 - Also check for EpisodeOfCare - as now PatientDiagnosis & CSPrimaryDiagnosis are recorded at this level boolean sameEpisodeOfCare = voColl.get(i).getEpisodeOfCareIsNotNull() && voColl.get(i).getEpisodeOfCare().equals(form.getGlobalContext().Core.getEpisodeofCareShort()); boolean sameCareContext = (voColl.get(i).getCareContextIsNotNull() && voColl.get(i).getCareContext().equals(form.getGlobalContext().Core.getCurrentCareContext())) || (!form.getGlobalContext().Core.getCurrentCareContextIsNotNull() && !voColl.get(i).getCareContextIsNotNull()); if (sameDiagnosis && sameEpisodeOfCare && sameCareContext) return voColl.get(i); } return null; }
protected void onBtnUpdateClick() throws ims.framework.exceptions.PresentationLogicException { form.setMode(FormMode.EDIT); form.getLocalContext().setbUpdatingRecord(Boolean.TRUE); form.getLocalContext().setRieRecord(null); if (form.grpType().getValue().equals(GenForm.grpTypeEnumeration.rdoDiagnosis)) form.getLocalContext().setDiagnosis((PatientDiagnosisVo) form.gridDiagnosis().getValue()); else form.getLocalContext().setProcedure((PatientProcedureShortVo) form.gridDiagnosis().getValue()); //form.setcustomControlDiagProcEnabled(false); form.grpType().setEnabled(false); form.btnUpdate().setVisible(false); form.setcustomControlAuthoringInfoEnabled(false); form.customControlDiagProc().setEnabled(false); //form.setcustomControlDiagProcEnabled(true); onRadioButtongrpTypeValueChanged(); }
private PatientAbsentDiagnosisVo populateAbsentDiagnosisData(grdChecklistRow row) { PatientAbsentDiagnosisVo voPatientAbsentDiagnosis = new PatientAbsentDiagnosisVo(); DiagLiteVo diagnosis = null; if (row.getValue() != null) { if (row.getValue() instanceof PatientDiagnosisVo) { diagnosis = (((PatientDiagnosisVo)row.getValue()).getDiagnosis()); } else if (row.getValue() instanceof PatientAbsentDiagnosisVo) { diagnosis = (((PatientAbsentDiagnosisVo)row.getValue()).getDiagnosis()); } else if (row.getValue() instanceof DiagLiteVo) { diagnosis =((DiagLiteVo) row.getValue()); } } voPatientAbsentDiagnosis.setDiagnosis(diagnosis); voPatientAbsentDiagnosis.setStatus(row.getColSelect()); voPatientAbsentDiagnosis.setSourceofInformation(row.getColSource()); return voPatientAbsentDiagnosis; }
private DischargeDetails getDischargeDetails(PatientDiagnosisVo voDiagnosis) { if (voDiagnosis == null || voDiagnosis.getCareContext() == null || voDiagnosis.getCareContext().getEpisodeOfCare() == null) return null; StringBuilder hql = new StringBuilder(); ArrayList<String> marques = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); DomainFactory domainFactory = getDomainFactory(); hql.append("select dd from DischargeDetails as dd left join dd.careContext as ccontext left join ccontext.episodeOfCare as epis where dd.dischargeLetterStatus.id = :LETTER_STATUS and epis.id = :EPISODE_ID"); marques.add("LETTER_STATUS"); marques.add("EPISODE_ID"); values.add(DischargeLetterStatus.IN_PROGRESS.getID()); values.add(voDiagnosis.getCareContext().getEpisodeOfCare().getID_EpisodeOfCare()); List<?> ddList = domainFactory.find(hql.toString(),marques,values); if (ddList == null || ddList.isEmpty()) return null; return (DischargeDetails) ddList.get(0); }