private void open() { AttendanceClinicalNotesVo voAttendanceClinicalNote = form.getGlobalContext().Emergency.getAttendanceClinicalNotes(); if (voAttendanceClinicalNote==null) { initialize(); form.ccAuthoringInfo().initializeComponent(); return; } clear(); form.ccAuthoringInfo().setValue(voAttendanceClinicalNote.getAuthoringInformation()); form.richTextNote().setValue(voAttendanceClinicalNote.getClinicalNote()); form.ctnNoteDetails().cmbAttendance().setValue(voAttendanceClinicalNote.getAttendance()); form.ctnNoteDetails().cmbNoteType().setValue(voAttendanceClinicalNote.getNoteType()); form.ctnNoteDetails().cmbDiscipline().setValue(voAttendanceClinicalNote.getDiscipline()); form.ctnNoteDetails().cmbSpecialty().setValue(voAttendanceClinicalNote.getSpecialty()); }
@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { if (FormMode.EDIT.equals(form.getLocalContext().getParentDialogMode())) { AttendanceClinicalNotesVo voAttendanceClinicalNoteToSave = populateDataFromScreen(form.getGlobalContext().Emergency.getAttendanceClinicalNotes()); String[] errors = voAttendanceClinicalNoteToSave.validate(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return ; } form.getGlobalContext().Emergency.setAttendanceClinicalNotes(voAttendanceClinicalNoteToSave); engine.close(DialogResult.OK); return; } if (save()) { engine.close(DialogResult.OK); } }
public int compare(Object ob1, Object ob2) { DateTime date1 = null; DateTime date2 = null; if(ob1 instanceof AttendanceClinicalNotesVo ) { AttendanceClinicalNotesVo note1 = (AttendanceClinicalNotesVo)ob1; date1 = note1 != null ? note1.getAuthoringInformation().getAuthoringDateTime():null; } if(ob2 instanceof AttendanceClinicalNotesVo ) { AttendanceClinicalNotesVo note2 = (AttendanceClinicalNotesVo)ob2; date2 = note2 != null ? note2.getAuthoringInformation().getAuthoringDateTime():null; } if(date1 != null ) return date1.compareTo(date2)*direction; if(date2 != null) return (-1)*direction; return 0; }
public void markSeenByHCPAsRIE(SeenByHCPVo seenByHCP, TrackingForSeenByHCPVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException { if(seenByHCP == null) return; if(seenByHCP.getSeenByHCPNotes() != null) { for(AttendanceClinicalNotesVo note : seenByHCP.getSeenByHCPNotes()) { if(note == null) continue; markAsRie(note, formName, patientId, null, careContextId, rieMessage); } } markAsRie(seenByHCP, formName, patientId, null, careContextId, rieMessage); if(tracking != null) { DomainFactory factory = getDomainFactory(); factory.save(TrackingForSeenByHCPVoAssembler.extractTracking(factory, tracking)); } }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { //wdev-17113 form.getLocalContext().setAttendanceClinicalNotesVo(null); if( args!=null && args.length>0 && args[0]!=null && args[0] instanceof AttendanceClinicalNotesVo) { form.getLocalContext().setAttendanceClinicalNotesVo((AttendanceClinicalNotesVo)args[0]); } //-------- initialise(); }
private AttendanceClinicalNotesVo populateDataFromScreenA() { AttendanceClinicalNotesVo attendanceClinNotesVo = form.getLocalContext().getAttendanceClinicalNotesVo(); attendanceClinNotesVo.setIsCorrected(Boolean.TRUE); attendanceClinNotesVo.setCorrectedAuthoringInformation(form.ccAuthoring().getValue()); attendanceClinNotesVo.setCorrectionComments(form.richTextCorrectionComments().getValue()); return attendanceClinNotesVo; }
private boolean save() { AttendanceClinicalNotesVo voAttendanceClinicalNoteToSave = populateDataFromScreen(form.getGlobalContext().Emergency.getAttendanceClinicalNotes()); String[] errors = voAttendanceClinicalNoteToSave.validate(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { if (form.getLocalContext().getSelectedParentRecordIsNotNull()) { //Save the entire ReferralToSpecialty form.getGlobalContext().Emergency.setAttendanceClinicalNotes(domain.save(voAttendanceClinicalNoteToSave,form.getLocalContext().getSelectedParentRecord())); } else { form.getGlobalContext().Emergency.setAttendanceClinicalNotes(domain.save(voAttendanceClinicalNoteToSave,null)); } } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); engine.close(DialogResult.ABORT); return false; } return true; }
private String getEditCorrectButtonText(AttendanceClinicalNotesVo note) { if(note == null) return FormMode.EDIT.equals(form.getMode()) ? EDIT_CAPTION : CORRECT_CAPTION; if(note.getID_AttendanceClinicalNotes() == null) return EDIT_CAPTION; return CORRECT_CAPTION; }
private void addRowToNotesGrid(AttendanceClinicalNotesVo referralNote) { if (referralNote==null) return; StringBuffer tooltip = new StringBuffer(); grdNotesRow newrow = form.grdNotes().getRows().newRow(); if (Boolean.TRUE.equals(referralNote.getIsCorrected())) { newrow.setBackColor(ConfigFlag.UI.CORRECTION_ROW_COLOUR.getValue()); if(referralNote.getCorrectedAuthoringInformation() != null) { tooltip.append("<br><b>Correction HCP: </b>" + referralNote.getCorrectedAuthoringInformation().getAuthoringHcp()); tooltip.append("<br><b>Corrected Date/Time: </b>" + referralNote.getCorrectedAuthoringInformation().getAuthoringDateTime()); tooltip.append(referralNote.getCorrectionCommentsIsNotNull() ? "<br><b>Correction comments: </b>" + referralNote.getCorrectionComments(): "<br><b>No Comments</b>"); } } if(referralNote.getAuthoringInformation().getAuthoringHcp() != null) { newrow.setcolAuthoringHCP(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getAuthoringInformation().getAuthoringHcp().toString().toString() + "</s>" : referralNote.getAuthoringInformation().getAuthoringHcp().toString()); newrow.setCellcolAuthoringHCPTooltip(referralNote.getAuthoringInformation().getAuthoringHcp().toString() + tooltip.toString()); } if(referralNote.getAuthoringInformation().getAuthoringDateTime() != null) { newrow.setcolDate(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getAuthoringInformation().getAuthoringDateTime().toString() + "</s>" : referralNote.getAuthoringInformation().getAuthoringDateTime().toString()); newrow.setCellcolDateTooltip(referralNote.getAuthoringInformation().getAuthoringDateTime().toString() + tooltip.toString()); } newrow.setcolComments(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getClinicalNote() + "</s>" : referralNote.getClinicalNote()); newrow.setCellcolCommentsTooltip(referralNote.getClinicalNote() + tooltip.toString()); newrow.setValue(referralNote); }
private void updateRowToNotesGrid(AttendanceClinicalNotesVo attClinicalNote) { grdNotesRow row = form.grdNotes().getSelectedRow(); row.setcolAuthoringHCP(attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString()); row.setcolDate(attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString()); row.setcolComments(attClinicalNote.getClinicalNote()); //WDEV-17302 row.setCellcolAuthoringHCPTooltip(attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString()); row.setCellcolDateTooltip(attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString()); row.setCellcolCommentsTooltip(attClinicalNote.getClinicalNote()); row.setValue(attClinicalNote); }
private void addRowToNotesGrid(AttendanceClinicalNotesVo attClinicalNote) { if (attClinicalNote==null) return; StringBuffer tooltip = new StringBuffer(); grdNotesRow newrow = form.grdNotes().getRows().newRow(); if (Boolean.TRUE.equals(attClinicalNote.getIsCorrected())) { newrow.setBackColor(ConfigFlag.UI.CORRECTION_ROW_COLOUR.getValue()); if(attClinicalNote.getCorrectedAuthoringInformation() != null) { tooltip.append("<br><b>Correction HCP: </b>" + attClinicalNote.getCorrectedAuthoringInformation().getAuthoringHcp()); tooltip.append("<br><b>Corrected Date/Time: </b>" + attClinicalNote.getCorrectedAuthoringInformation().getAuthoringDateTime()); tooltip.append(attClinicalNote.getCorrectionCommentsIsNotNull() ? "<br><b>Correction comments: </b>" + attClinicalNote.getCorrectionComments(): "<br><b>No Comments</b>"); } } if(attClinicalNote.getAuthoringInformation().getAuthoringHcp() != null) { newrow.setcolAuthoringHCP(Boolean.TRUE.equals(attClinicalNote.getIsCorrected()) ? "<s>" + attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString().toString() + "</s>" : attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString()); newrow.setCellcolAuthoringHCPTooltip(attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString() + tooltip.toString()); } if(attClinicalNote.getAuthoringInformation().getAuthoringDateTime() != null) { newrow.setcolDate(Boolean.TRUE.equals(attClinicalNote.getIsCorrected()) ? "<s>" + attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString() + "</s>" : attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString()); newrow.setCellcolDateTooltip(attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString() + tooltip.toString()); } newrow.setcolComments(Boolean.TRUE.equals(attClinicalNote.getIsCorrected()) ? "<s>" + attClinicalNote.getClinicalNote() + "</s>" : attClinicalNote.getClinicalNote()); newrow.setCellcolCommentsTooltip(attClinicalNote.getClinicalNote() + tooltip.toString()); newrow.setValue(attClinicalNote); }
private void updateRowToNotesGrid(AttendanceClinicalNotesVo attClinicalNote) { grdNotesRow row = form.grdNotes().getSelectedRow(); row.setcolAuthoringHCP(attClinicalNote.getAuthoringInformation().getAuthoringHcp().toString()); row.setcolDate(attClinicalNote.getAuthoringInformation().getAuthoringDateTime().toString()); row.setcolComments(attClinicalNote.getClinicalNote()); row.setTooltipForcolComments(attClinicalNote.getClinicalNote()); row.setValue(attClinicalNote); }
private void doRIE() { boolean isStale = false; if(form.getLocalContext().getRIERecord() instanceof AttendanceClinicalNotesVo) { if(domain.isStale((AttendanceClinicalNotesVo)form.getLocalContext().getRIERecord())) { isStale = true; } } if(isStale) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return; } try { domain.markAsRie(form.getLocalContext().getRIERecord(), engine.getFormName(), form.getLocalContext().getPatient().getID_Patient(), null, form.getLocalContext().getCareContext().getID_CareContext(), form.getGlobalContext().Core.getRieMessage()); } catch (StaleObjectException e) { e.printStackTrace(); engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); return; } }
private void populateGrid(AttendanceClinicalNotesVoCollection collAttendanceClinicalNotes) { form.grdNotes().getRows().clear(); if (collAttendanceClinicalNotes == null || collAttendanceClinicalNotes.size() == 0) return; for(AttendanceClinicalNotesVo note : collAttendanceClinicalNotes) { if(note == null) continue; addNoteRow(note); } }
private boolean userHasRightToCorrect(AttendanceClinicalNotesVo attendanceClinicalNotesVo) { if (form.getForms().Emergency.EDTriageWorklistToAssessmentForm.equals(form.getLocalContext().getparentFormName())) { return AttendanceClinicalNoteType.TRIAGE.equals(attendanceClinicalNotesVo.getNoteType()) && engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_TRIAGE_NOTE); //WDEV-17304 } else if (form.getForms().Emergency.EDClinicianWorklistToAssessmentForm.equals(form.getLocalContext().getparentFormName())) { return AttendanceClinicalNoteType.MEDIC.equals(attendanceClinicalNotesVo.getNoteType()) && engine.hasRight(AppRight.ED_ALLOW_CORRECTION_OF_ANY_MEDIC_NOTE);//WDEV-17304 } return false; }
public void saveAttendanceClinicalNotes(AttendanceClinicalNotesVo record) throws StaleObjectException { if(record == null ) throw new CodingRuntimeException("AttendanceClinicalNotesVo not provided"); DomainFactory factory = getDomainFactory(); AttendanceClinicalNotes doAttendanceClinicalNotes = AttendanceClinicalNotesVoAssembler.extractAttendanceClinicalNotes(factory, record); factory.save(doAttendanceClinicalNotes); }
private void addRowToNotesGrid(AttendanceClinicalNotesVo referralNote) { if (referralNote==null) return; StringBuffer tooltip = new StringBuffer(); ims.emergency.forms.edseenbynurseandcompletedialog.GenForm.grdNotesRow newrow = form.grdNotes().getRows().newRow(); if (Boolean.TRUE.equals(referralNote.getIsCorrected())) { newrow.setBackColor(ConfigFlag.UI.CORRECTION_ROW_COLOUR.getValue()); if(referralNote.getCorrectedAuthoringInformation() != null) { tooltip.append("<br><b>Correction HCP: </b>" + referralNote.getCorrectedAuthoringInformation().getAuthoringHcp()); tooltip.append("<br><b>Corrected Date/Time: </b>" + referralNote.getCorrectedAuthoringInformation().getAuthoringDateTime()); tooltip.append(referralNote.getCorrectionCommentsIsNotNull() ? "<br><b>Correction comments: </b>" + referralNote.getCorrectionComments(): "<br><b>No Comments</b>"); } } if(referralNote.getAuthoringInformation().getAuthoringHcp() != null) { newrow.setcolAuthoringHCP(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getAuthoringInformation().getAuthoringHcp().toString().toString() + "</s>" : referralNote.getAuthoringInformation().getAuthoringHcp().toString()); newrow.setCellcolAuthoringHCPTooltip(referralNote.getAuthoringInformation().getAuthoringHcp().toString() + tooltip.toString()); } if(referralNote.getAuthoringInformation().getAuthoringDateTime() != null) { newrow.setcolDate(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getAuthoringInformation().getAuthoringDateTime().toString() + "</s>" : referralNote.getAuthoringInformation().getAuthoringDateTime().toString()); newrow.setCellcolDateTooltip(referralNote.getAuthoringInformation().getAuthoringDateTime().toString() + tooltip.toString()); } newrow.setcolComments(Boolean.TRUE.equals(referralNote.getIsCorrected()) ? "<s>" + referralNote.getClinicalNote() + "</s>" : referralNote.getClinicalNote()); newrow.setCellcolCommentsTooltip(referralNote.getClinicalNote() + tooltip.toString()); newrow.setValue(referralNote); }
@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { //wdev-17113 form.getLocalContext().setAttendanceClinicalNotesVo(null); if( args!=null && args.length>0 && args[0]!=null ) { if (args[0] instanceof AttendanceClinicalNotesVo) form.getLocalContext().setAttendanceClinicalNotesVo((AttendanceClinicalNotesVo)args[0]); } //-------- initialise(); }