public void search() { String[] errors = validateSearchCriteria(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return; } PathologyResultListShortVoCollection pathologyResults = domain.listPathology(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue()); RadiologyResultListVoCollection clinicalImagingResults = domain.listClinicalImaging(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue()); if ((pathologyResults == null || pathologyResults.size() == 0) && (clinicalImagingResults == null || clinicalImagingResults.size() == 0)) { engine.showMessage("No results found."); } populatePathologyResults(pathologyResults); populateClinicalImagingResults(clinicalImagingResults); }
public boolean search() { String[] errors = validateSearchCriteria(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return false; } PathologyResultListShortVoCollection pathologyResults = domain.listPathology(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue()); RadiologyResultListVoCollection clinicalImagingResults = domain.listClinicalImaging(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue()); if ((pathologyResults == null || pathologyResults.size() == 0) && (clinicalImagingResults == null || clinicalImagingResults.size() == 0)) { engine.showMessage("No results found."); } populatePathologyResults(pathologyResults); populateClinicalImagingResults(clinicalImagingResults); return true; }
public void search() { String[] errors = validateSearchCriteria(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return; } PathologyResultListShortVoCollection pathologyResults = domain.listPathology(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue(), form.grdDiscipline().getValues()); RadiologyResultListVoCollection clinicalImagingResults = domain.listClinicalImaging(form.getGlobalContext().Core.getPatientShort(), form.dteFrom().getValue(), form.dteTo().getValue(), form.grdDiscipline().getValues()); if ((pathologyResults == null || pathologyResults.size() == 0) && (clinicalImagingResults == null || clinicalImagingResults.size() == 0)) { engine.showMessage("No results found."); } populatePathologyResults(pathologyResults); populateClinicalImagingResults(clinicalImagingResults); }
/** * */ public RadiologyResultListVoCollection listClinicalImaging(PatientRefVo patient, Date fromDate, Date toDate) { if (patient == null || patient.getID_Patient() == null) throw new CodingRuntimeException("Patient parameter can not be null when listing pathology results"); StringBuilder query = new StringBuilder(); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); query.append("SELECT orderInv FROM OrderInvestigation AS orderInv "); query.append(" LEFT JOIN FETCH orderInv.orderDetails AS details LEFT JOIN details.patient AS patient "); query.append("WHERE patient.id = :PATIENT_ID "); paramNames.add("PATIENT_ID"); paramValues.add(patient.getID_Patient()); query.append("AND orderInv.investigation.investigationIndex.category.id = :CATEGORY "); paramNames.add("CATEGORY"); paramValues.add(Category.CLINICALIMAGING.getID()); if (fromDate != null && toDate != null) { query.append(" AND orderInv.displayDateTime BETWEEN :FROM_DATE AND :END_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(0, 0, 0)).getJavaDate()); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate == null && toDate != null) { query.append(" AND orderInv.displayDateTime <= :END_DATE "); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate != null && toDate == null) { query.append(" AND orderInv.dislayDateTime >= :FROM_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(23,59, 59)).getJavaDate()); } query.append(" ORDER BY orderInv.displayDateTime DESC, orderInv.ordInvSeq ASC, orderInv.systemInformation.creationDateTime, orderInv.systemInformation.creationUser"); return RadiologyResultListVoAssembler.createRadiologyResultListVoCollectionFromOrderInvestigation(getDomainFactory().find(query.toString(), paramNames, paramValues)); }
/** * */ public RadiologyResultListVoCollection listClinicalImaging(PatientRefVo patient, Date fromDate, Date toDate) { if (patient == null || patient.getID_Patient() == null) throw new CodingRuntimeException("Patient parameter can not be null when listing pathology results"); StringBuilder query = new StringBuilder(); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); query.append("SELECT orderInv FROM OrderInvestigation AS orderInv "); query.append(" LEFT JOIN FETCH orderInv.orderDetails AS details LEFT JOIN details.patient AS patient "); query.append("WHERE patient.id = :PATIENT_ID "); paramNames.add("PATIENT_ID"); paramValues.add(patient.getID_Patient()); query.append("AND orderInv.investigation.investigationIndex.category.id = :CATEGORY "); paramNames.add("CATEGORY"); paramValues.add(Category.CLINICALIMAGING.getID()); if (fromDate != null && toDate != null) { query.append(" AND orderInv.systemInformation.creationDateTime BETWEEN :FROM_DATE AND :END_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(0, 0, 0)).getJavaDate()); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate == null && toDate != null) { query.append(" AND orderInv.systemInformation.creationDateTime <= :END_DATE "); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate != null && toDate == null) { query.append(" AND orderInv.systemInformation.creationDateTime >= :FROM_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(23,59, 59)).getJavaDate()); } query.append(" ORDER BY orderInv.displayDateTime DESC, orderInv.ordInvSeq ASC, orderInv.systemInformation.creationDateTime, orderInv.systemInformation.creationUser"); return RadiologyResultListVoAssembler.createRadiologyResultListVoCollectionFromOrderInvestigation(getDomainFactory().find(query.toString(), paramNames, paramValues)); }
private boolean doSearch() { form.grdClinicalImaging().getRows().clear(); DateTime dt1 = null; DateTime dt2 = null; if(form.dteFrom().getValue() != null && form.dteTo().getValue() == null) { engine.showMessage("A 'To' date must be entered."); return false; } if(form.dteFrom().getValue() == null && form.dteTo().getValue() != null) { engine.showMessage("A 'From' date must be entered."); return false; } if(form.dteFrom().getValue() != null && form.dteTo().getValue() != null) { if(form.dteFrom().getValue().isGreaterThan(form.dteTo().getValue())) { engine.showMessage("'From' date must not be after 'To' date."); return false; } Time t1 = new Time(0, 0, 0); Time t2 = new Time(23, 59, 50); dt1 = new DateTime(form.dteFrom().getValue(), t1); dt2 = new DateTime(form.dteTo().getValue(), t2); } Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); RadiologyResultListVoCollection coll = domain.listResults(dt1, dt2, form.cmbDepartment().getValue(), form.qmbResultType().getValue(), form.qmbClinician().getValue(), getInpatientOutpatientSearchType(), form.Group1().getValue().equals(Group1Enumeration.rdoResults) ? Boolean.TRUE : Boolean.FALSE, form.getGlobalContext().Core.getPatientShortIsNotNull() ? form.getGlobalContext().Core.getPatientShort() : null, form.Group1().getValue().equals(Group1Enumeration.rdoComplete) ? Boolean.TRUE : Boolean.FALSE, form.chkChecked().getValue(), form.chkUnchecked().getValue()); displayResults(coll, dateUnseen); return true; }
public RadiologyResultListVoCollection listClinicalImaging(PatientRefVo patient, Date fromDate, Date toDate, ServiceLiteVoCollection selectedDisciplines) { if (patient == null || patient.getID_Patient() == null) throw new CodingRuntimeException("Patient parameter can not be null when listing pathology results"); StringBuilder query = new StringBuilder(); ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); query.append("SELECT orderInv FROM OrderInvestigation AS orderInv "); query.append(" LEFT JOIN FETCH orderInv.orderDetails AS details LEFT JOIN details.patient AS patient "); query.append("WHERE patient.id = :PATIENT_ID "); paramNames.add("PATIENT_ID"); paramValues.add(patient.getID_Patient()); query.append("AND orderInv.investigation.investigationIndex.category.id = :CATEGORY "); paramNames.add("CATEGORY"); paramValues.add(Category.CLINICALIMAGING.getID()); if (fromDate != null && toDate != null) { query.append(" AND orderInv.displayDateTime BETWEEN :FROM_DATE AND :END_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(0, 0, 0)).getJavaDate()); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate == null && toDate != null) { query.append(" AND orderInv.displayDateTime <= :END_DATE "); paramNames.add("END_DATE"); paramValues.add(new DateTime(toDate, new Time(23, 59, 59)).getJavaDate()); } else if (fromDate != null && toDate == null) { query.append(" AND orderInv.displayDateTime >= :FROM_DATE "); paramNames.add("FROM_DATE"); paramValues.add(new DateTime(fromDate, new Time(23,59, 59)).getJavaDate()); } if (selectedDisciplines != null && selectedDisciplines.size() > 0) { String disciplineList = getDisciplineList(selectedDisciplines); query.append(" AND orderInv.investigation.providerService.locationService.service.id in (" + disciplineList + ") "); } query.append(" ORDER BY orderInv.displayDateTime DESC, orderInv.ordInvSeq ASC, orderInv.systemInformation.creationDateTime, orderInv.systemInformation.creationUser"); return RadiologyResultListVoAssembler.createRadiologyResultListVoCollectionFromOrderInvestigation(getDomainFactory().find(query.toString(), paramNames, paramValues)); }
private void doSearch() { form.grdClinicalImaging().getRows().clear(); DateTime dt1 = null; DateTime dt2 = null; if(form.dteFrom().getValue() != null && form.dteTo().getValue() == null) { engine.showMessage("A 'To' date must be entered."); return; } if(form.dteFrom().getValue() == null && form.dteTo().getValue() != null) { engine.showMessage("A 'From' date must be entered."); return; } if(form.dteFrom().getValue() != null && form.dteTo().getValue() != null) { if(form.dteFrom().getValue().isGreaterThan(form.dteTo().getValue())) { engine.showMessage("'From' date must not be after 'To' date."); return; } Time t1 = new Time(0, 0, 0); Time t2 = new Time(23, 59, 50); dt1 = new DateTime(form.dteFrom().getValue(), t1); dt2 = new DateTime(form.dteTo().getValue(), t2); } Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); RadiologyResultListVoCollection coll = domain.listResults(dt1, dt2, form.cmbDepartment().getValue(), form.qmbResultType().getValue(), form.qmbClinician().getValue(), form.Group1().getValue().equals(Group1Enumeration.rdoResults) ? Boolean.TRUE : Boolean.FALSE, form.getGlobalContext().Core.getPatientShortIsNotNull() ? form.getGlobalContext().Core.getPatientShort() : null, form.Group1().getValue().equals(Group1Enumeration.rdoComplete) ? Boolean.TRUE : Boolean.FALSE); displayResults(coll, dateUnseen); }