protected void onDyngrdCorrespondenceRowSelectionChanged(ims.framework.controls.DynamicGridRow row) { enableContextMenu(); if (form.dyngrdCorrespondence().getSelectedRow().getValue() != null) { ClinicalCorrespondenceLiteVo voCCLite = (ClinicalCorrespondenceLiteVo) form.dyngrdCorrespondence().getSelectedRow().getValue(); form.getGlobalContext().Core.setPatientShort(domain.getPatientForCareContextId(voCCLite.getCareContext())); form.getGlobalContext().Clinical.setCurrentCorrespondanceSearchCriteria(createSearchCriteria()); form.getGlobalContext().Clinical.setReturnToFormName(form.getForms().Core.CorrespondenceList); form.getGlobalContext().Core.setCurrentClinicalContact(voCCLite.getClinicalContact()); } }
private void displayCorrespondance(ClinicalCorrespondenceLiteVoCollection collection) { formatGrid(); form.dyngrdCorrespondence().getRows().clear(); for (int i = 0; collection != null && i < collection.size(); i++) { ClinicalCorrespondenceLiteVo voCCLite = collection.get(i); DynamicGridRow row = form.dyngrdCorrespondence().getRows().newRow(); DynamicGridCell cellAuthorDate = row.getCells().newCell(getColByIdentifier(COL_AUTH_DATE), DynamicCellType.LABEL); cellAuthorDate.setValue(voCCLite.getAuthoringInformation().getAuthoringDateTimeIsNotNull() ? voCCLite.getAuthoringInformation().getAuthoringDateTime().toString() : ""); cellAuthorDate.setIdentifier(COL_AUTH_DATE); cellAuthorDate.setWidth(130); DynamicGridCell cellAuthorHCP = row.getCells().newCell(getColByIdentifier(COL_AUTH_HCP), DynamicCellType.LABEL); cellAuthorHCP.setValue(voCCLite.getAuthoringInformation().getAuthoringHcpIsNotNull() ? voCCLite.getAuthoringInformation().getAuthoringHcp().toString() : ""); cellAuthorHCP.setIdentifier(COL_AUTH_HCP); cellAuthorHCP.setWidth(140); DynamicGridCell cellPatName = row.getCells().newCell(getColByIdentifier(COL_PAT_NAME), DynamicCellType.LABEL); PatientShort patient = null; if(voCCLite.getCareContextIsNotNull() && voCCLite.getCareContext().getEpisodeOfCareIsNotNull() && voCCLite.getCareContext().getEpisodeOfCare().getCareSpellIsNotNull()) patient = voCCLite.getCareContext().getEpisodeOfCare().getCareSpell().getPatient(); cellPatName.setValue(patient != null? patient.getName().toShortForm() : ""); cellPatName.setIdentifier(COL_PAT_NAME); cellPatName.setWidth(140); DynamicGridCell cellPatNumber = row.getCells().newCell(getColByIdentifier(COL_PAT_NUM), DynamicCellType.LABEL); cellPatNumber.setValue(patient != null && patient.getDisplayId() != null? patient.getDisplayId().getValue() : ""); cellPatNumber.setIdentifier(COL_PAT_NUM); cellPatNumber.setWidth(70); if (form.cmbStatus().getValue() == null) { DynamicGridCell cellStatus = row.getCells().newCell(getColByIdentifier(COL_STATUS), DynamicCellType.LABEL); cellStatus.setValue(voCCLite.getCurrentStatusIsNotNull() ? voCCLite.getCurrentStatus().getCorrespondenceStatus().toString() : ""); cellStatus.setIdentifier(COL_STATUS); cellStatus.setWidth(100); } DynamicGridCell cellRespHCP = row.getCells().newCell(getColByIdentifier(COL_RESP_HCP), DynamicCellType.LABEL); cellRespHCP.setValue(voCCLite.getCareContext().getEpisodeOfCare().getResponsibleHCPIsNotNull() ? voCCLite.getCareContext().getEpisodeOfCare().getResponsibleHCP().toString() : ""); cellRespHCP.setIdentifier(COL_RESP_HCP); cellRespHCP.setWidth(140); DynamicGridCell cellNote = row.getCells().newCell(getColByIdentifier(COL_NOTE), DynamicCellType.HTMLVIEW); if (voCCLite.getTypeIsNotNull() && voCCLite.getType().equals(ClinicalCorrespondenceType.MEDICALINPATIENTDISCHARGE) ) { if (voCCLite.getInpatientDischargeSummaryIsNotNull()) cellNote.setValue(voCCLite.getInpatientDischargeSummary().getClinicalNoteIsNotNull() ? voCCLite.getInpatientDischargeSummary().getClinicalNote().getClinicalNote().toString() : ""); } else if (voCCLite.getTypeIsNotNull() && voCCLite.getType().equals(ClinicalCorrespondenceType.MEDICALOUTPATIENTLETTER) ) { if (voCCLite.getOPDNotesIsNotNull()) cellNote.setValue(voCCLite.getOPDNotes().getClinicalNoteIsNotNull() ? voCCLite.getOPDNotes().getClinicalNote().getClinicalNote().getClinicalNote().toString() : ""); } cellNote.setIdentifier(COL_NOTE); cellNote.setWidth(-1); row.setValue(voCCLite); } }