public PatientSummaryNoteByHcpShortVo getLastSummaryNote(PatientRefVo patient) { if (patient == null || !patient.getID_PatientIsNotNull()) throw new DomainRuntimeException("Can not search after null patient"); String query = " from PatientSummaryNoteByHCP as sumNote where sumNote.patient.id = :ID order by sumNote.authoringInformation.authoringDateTime desc"; ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("ID"); paramValues.add(patient.getID_Patient()); List summarynotes = getDomainFactory().find(query, paramNames, paramValues); if(summarynotes != null && summarynotes.size() > 0) { PatientSummaryNoteByHcpShortVoCollection coll = PatientSummaryNoteByHcpShortVoAssembler.createPatientSummaryNoteByHcpShortVoCollectionFromPatientSummaryNoteByHCP(summarynotes); if(coll != null && coll.size() > 0) return coll.get(0); } return null; }
private void populateSummaryNoteCombo() { form.cmbSummaryNote().clear(); PatientSummaryNoteByHcpShortVoCollection tempColl = domain.listSummaryNotes(form.getGlobalContext().Core.getPatientShort()); if(tempColl != null && tempColl.size() > 0) { for(int i = 0; i < tempColl.size();i++) { // Skip null notes if (tempColl.get(i) == null) continue; // Build string to be displayed StringBuilder displayText = new StringBuilder(); displayText.append(tempColl.get(i).getAuthoringInformation().getAuthoringHcpIsNotNull() ? tempColl.get(i).getAuthoringInformation().getAuthoringHcp().toString() : ""); displayText.append(" - " + tempColl.get(i).getAuthoringInformation().getAuthoringDateTime().toString()); if (tempColl.get(i).getSystemInformationIsNotNull() && tempColl.get(i).getSystemInformation().getLastupdateDateTime() != null) displayText.append(" - " + tempColl.get(i).getSystemInformation().getLastupdateDateTime().toString()); // Add note to record browser form.cmbSummaryNote().newRow(tempColl.get(i), displayText.toString()); } } }
private void populateSummaryNoteCombo() { //form.lyrLetterCreate().tabTemplate().cmbSummaryNote().clear(); PatientSummaryNoteByHcpShortVoCollection tempColl = domain.listSummaryNotes(form.getGlobalContext().Core.getPatientShort()); if(tempColl != null && tempColl.size() > 0) { for(int i = 0; i < tempColl.size();i++) { // Skip null notes if (tempColl.get(i) == null) continue; // Build string to be displayed StringBuilder displayText = new StringBuilder(); displayText.append(tempColl.get(i).getAuthoringInformation().getAuthoringHcpIsNotNull() ? tempColl.get(i).getAuthoringInformation().getAuthoringHcp().toString() : ""); displayText.append(" - " + tempColl.get(i).getAuthoringInformation().getAuthoringDateTime().toString()); if (tempColl.get(i).getSystemInformationIsNotNull() && tempColl.get(i).getSystemInformation().getLastupdateDateTime() != null) displayText.append(" - " + tempColl.get(i).getSystemInformation().getLastupdateDateTime().toString()); // Add note to record browser //form.lyrLetterCreate().tabTemplate().cmbSummaryNote().newRow(tempColl.get(i), displayText.toString()); } } }
private void populateSummaryNoteDynamicGrid() { form.lyrLetterCreate().tabTemplate().dyngrdSummaryNotes().getRows().clear(); for(int i=0; i<form.lyrLetterCreate().tabClinicList().grdPatient().getRows().size(); i++) { if(form.lyrLetterCreate().tabClinicList().grdPatient().getRows().get(i).getcolDocCreate()) { OutPatientListVo tempVo = form.lyrLetterCreate().tabClinicList().grdPatient().getRows().get(i).getValue(); if(tempVo.getPasEventIsNotNull() && tempVo.getPasEvent().getPatientIsNotNull()) { DynamicGridRow patientRow = form.lyrLetterCreate().tabTemplate().dyngrdSummaryNotes().getRows().newRow(); patientRow.setValue(tempVo); DynamicGridCell patientCell = patientRow.getCells().newCell(getColumnSummaryNotes(COLUMN_NAME), DynamicCellType.STRING); patientCell.setValue(tempVo.getPasEvent().getPatient().getName().getSurname()); PatientSummaryNoteByHcpShortVoCollection tempColl = domain.listSummaryNotes(tempVo.getPasEvent().getPatient()); DynamicGridCell summaryNoteCell = patientRow.getCells().newCell(getColumnSummaryNotes(COLUMN_SUMMARY), DynamicCellType.ENUMERATION); for(int j = 0; j < tempColl.size();j++) { if (tempColl.get(j) == null) continue; // Build string to be displayed StringBuilder displayText = new StringBuilder(); displayText.append(tempColl.get(j).getAuthoringInformation().getAuthoringHcpIsNotNull() ? tempColl.get(j).getAuthoringInformation().getAuthoringHcp().toString() : ""); displayText.append(" - " + tempColl.get(j).getAuthoringInformation().getAuthoringDateTime().toString()); if (tempColl.get(j).getSystemInformationIsNotNull() && tempColl.get(j).getSystemInformation().getLastupdateDateTime() != null) displayText.append(" - " + tempColl.get(j).getSystemInformation().getLastupdateDateTime().toString()); summaryNoteCell.getItems().newItem(tempColl.get(j), displayText.toString()); } } } } }
public PatientSummaryNoteByHcpShortVoCollection listSummaryNotes(PatientRefVo patient) { if (patient == null || !patient.getID_PatientIsNotNull()) throw new DomainRuntimeException("Can not search after null patient"); String query = " from PatientSummaryNoteByHCP as sumNote where sumNote.patient.id = :ID order by sumNote.authoringInformation.authoringDateTime desc"; ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); paramNames.add("ID"); paramValues.add(patient.getID_Patient()); return PatientSummaryNoteByHcpShortVoAssembler.createPatientSummaryNoteByHcpShortVoCollectionFromPatientSummaryNoteByHCP(getDomainFactory().find(query, paramNames, paramValues)); }
private void populateRecordBrowser(PatientSummaryNoteByHcpShortVoCollection summaryNotes) { // Clear record browser form.recbrNotes().clear(); form.getLocalContext().setHcpRecordExists(Boolean.FALSE); // Terminate function if notes collection is null if (summaryNotes == null) return; // Iterate notes collection for (PatientSummaryNoteByHcpShortVo note : summaryNotes) { // Skip null notes if (note == null) continue; // Build string to be displayed StringBuilder displayText = new StringBuilder(); displayText.append(note.getAuthoringInformation().getAuthoringHcpIsNotNull() ? note.getAuthoringInformation().getAuthoringHcp().toString() : ""); displayText.append(" - " + note.getAuthoringInformation().getAuthoringDateTime().toString()); if (note.getSystemInformationIsNotNull() && note.getSystemInformation().getLastupdateDateTime() != null) displayText.append(" - " + note.getSystemInformation().getLastupdateDateTime().toString()); // Add note to record browser form.recbrNotes().newRow(note, displayText.toString()); if (note.getAuthoringInformation().getAuthoringHcpIsNotNull() && note.getAuthoringInformation().getAuthoringHcp().equals(domain.getHcpLiteUser())) form.getLocalContext().setHcpRecordExists(Boolean.TRUE); } // Selected last recorded note (if any) if (summaryNotes.size() > 0) form.recbrNotes().setValue(summaryNotes.get(0)); // Reselect previously saved note (or last selected note) if (form.getLocalContext().getSelectedSummaryNoteIsNotNull()) form.recbrNotes().setValue(form.getLocalContext().getSelectedSummaryNote()); }