public OrderInvestigationLiteVoCollection listResultedRadiologyInvForReferral(CatsReferralRefVo referralRef, ReferralCodingRefVo referralCodingRef) { if (referralRef == null) { throw new CodingRuntimeException("Cannot get Investigations on null ReferralID"); } DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); hql.append("select orderInvs from CatsReferral as catsRef left join catsRef.investigationOrders as invOrders left join invOrders.investigations as orderInvs left join orderInvs.investigation as investig left join investig.investigationIndex as invIndex left join orderInvs.resultDetails as rezultDet left join orderInvs.ordInvCurrentStatus.ordInvStatus as invStatus where catsRef.id = :catsRefId and invIndex.category.id = :investigationType and invStatus.id <> :cancelledStatus and rezultDet is not null "); ArrayList<String> markers = new ArrayList<String>(); ArrayList<Object> values = new ArrayList<Object>(); markers.add("catsRefId"); values.add(referralRef.getID_CatsReferral()); markers.add("investigationType"); values.add(Category.CLINICALIMAGING.getID()); markers.add("cancelledStatus"); values.add(OrderInvStatus.CANCELLED.getID()); return OrderInvestigationLiteVoAssembler.createOrderInvestigationLiteVoCollectionFromOrderInvestigation(factory.find(hql.toString(), markers, values)).sort(); }
/** * WDEV-13944 * Function used to populate screen with investigation * Component might be used in more than one form - that is why is populating based on parameter */ private void populateScreenFromData() { form.grdResults().getRows().clear(); form.grdResults().setReadOnly(false); OrderInvestigationLiteVoCollection results; try { results = domain.listResults(form.getGlobalContext().Core.getPatientShort()); } catch (DomainInterfaceException e) { updateTotal(); engine.showMessage(e.getMessage()); return; } if (results == null || results.size() == 0) { updateTotal(); return; } Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); for (int x = 0; x < results.size(); x++) { addResult(results.get(x), dateUnseen); } cleanUpResultGrid(); updateTotal(); }
public OrderInvestigationLiteVoCollection listResults(PatientRefVo patient) throws DomainInterfaceException { if (patient == null || !patient.getID_PatientIsNotNull()) return null; String query = "select ordInv from OcsOrderSession as orderSession left join orderSession.patient as patient left join orderSession.investigations as ordInv where patient.id =:PAT_ID order by ordInv.displayDateTime desc"; return OrderInvestigationLiteVoAssembler.createOrderInvestigationLiteVoCollectionFromOrderInvestigation(getDomainFactory().find(query, "PAT_ID", patient.getID_Patient(), ORD_INV_REQUESTED)); }
/** * listResults */ public ims.ocrr.vo.OrderInvestigationLiteVoCollection listResults(ims.RefMan.vo.CatsReferralRefVo referral) throws ims.domain.exceptions.DomainInterfaceException { if(referral == null || referral.getID_CatsReferral() == null) throw new CodingRuntimeException("referral or referral id is null in method listResults"); DomainFactory factory = getDomainFactory(); return OrderInvestigationLiteVoAssembler.createOrderInvestigationLiteVoCollectionFromOrderInvestigation(factory.find("select ordInv from CatsReferral catsRef join catsRef.investigationOrders as ord join ord.investigations ordInv where catsRef.id = '" + referral.getID_CatsReferral() + "' order by ordInv.displayDateTime desc")); }
/** * WDEV-13944 * Function used to list all results */ public OrderInvestigationLiteVoCollection listResults(PatientRefVo patient) throws DomainInterfaceException { if (patient == null || !patient.getID_PatientIsNotNull()) return null; String query = "SELECT ordInv FROM CatsReferral AS cats LEFT JOIN cats.investigationOrders AS ord LEFT JOIN ord.investigations AS ordInv LEFT JOIN cats.patient AS pat WHERE pat.id =:PAT_ID order by ordInv.displayDateTime desc"; return OrderInvestigationLiteVoAssembler.createOrderInvestigationLiteVoCollectionFromOrderInvestigation(getDomainFactory().find(query, "PAT_ID", patient.getID_Patient(), ORD_INV_REQUESTED)); }
private void populateOutpatientInvestigationsGrid() { form.lyrTabs().tabOutpatientCoding().grdInv().getRows().clear(); OrderInvestigationLiteVoCollection voCollInvs = domain.listResultedRadiologyInvForReferral(form.getGlobalContext().RefMan.getCatsReferral(), form.getLocalContext().getCurrentRCVo()); List alreadyAddedInvestigationsIDs = domain.getAlreadyAddedInvestigationsIDs(form.getGlobalContext().RefMan.getCatsReferral()); if (voCollInvs != null) { for (int i = 0; i < voCollInvs.size(); i++) { grdInvRow row = form.lyrTabs().tabOutpatientCoding().grdInv().getRows().newRow(); if (voCollInvs.get(i).getRepDateTime() != null) row.setColDate(voCollInvs.get(i).getRepDateTime().toString()); if (voCollInvs.get(i).getInvestigation() != null && voCollInvs.get(i).getInvestigation().getInvestigationIndex() != null) { row.setColInvestigation(voCollInvs.get(i).getInvestigation().getInvestigationIndex().getName()); row.setTooltipForColInvestigation(row.getColInvestigation()); } if (alreadyAddedInvestigationsIDs != null && alreadyAddedInvestigationsIDs.contains(voCollInvs.get(i).getID_OrderInvestigation())) { row.setBackColor(Color.Red); row.setSelectable(false); } else row.setBackColor(Color.LightYellow); row.setValue(voCollInvs.get(i)); } } }
private void open() { OrderInvestigationLiteVoCollection voColl = domain.listRejectedInvestigations(form.getGlobalContext().RefMan.getCatsReferral()); for(int i = 0 ; voColl != null && i < voColl.size() ; i++) addInvestigationRow(voColl.get(i)); }
/** * WDEV-13944 * Function used to populate screen with investigation * Component might be used in more than one form - that is why is populating based on parameter */ private void populateScreenFromData(boolean listForAllReferrals) { form.grdResults().getRows().clear(); form.grdResults().setReadOnly(false); OrderInvestigationLiteVoCollection results; try { if (listForAllReferrals) { results = domain.listResults(form.getGlobalContext().Core.getPatientShort()); } else { results = domain.listResults(form.getGlobalContext().RefMan.getCatsReferral()); } } catch (DomainInterfaceException e) { updateTotal(); engine.showMessage(e.getMessage()); return; } if (results == null || results.size() == 0) { updateTotal(); return; } Integer nNewResUnseenDays = new Integer(ConfigFlag.DOM.OCS_NEWRES_UNSEEN_CUTOFF.getValue()); Date dateUnseen = new Date().addDay(-1 * nNewResUnseenDays.intValue()); for (int x = 0; x < results.size(); x++) { addResult(results.get(x), dateUnseen); } cleanUpResultGrid(); updateTotal(); }
private void open() { OrderInvestigationLiteVoCollection voColl = domain.listRejectedInvestigations(form.getGlobalContext().CareUk.getCatsReferral()); for(int i = 0 ; voColl != null && i < voColl.size() ; i++) addInvestigationRow(voColl.get(i)); }