private void populateSummaryClinicalInformation(OcsOrderVo order) { // Only update the value of the text box first time if (form.getGlobalContext().OCRR.getOrderAwaitingAuthorisation() != null) { form.lyrDetails().tabSummaryClinicalInfo().txtSummaryClinicalInfo().setValue(order.getSummaryClinicalInformation()); } else { SummaryClinicalInformationVo clinicalInfo = domain.getLatestSummaryClinicalInformation(form.getGlobalContext().Core.getPatientShort()); if (clinicalInfo != null) { form.lyrDetails().tabSummaryClinicalInfo().txtSummaryClinicalInfo().setValue(clinicalInfo.getSummaryClinicalInfo()); } } }
private void populateCollectionType(OcsOrderVo voOcsOrder) { grdTestRow[] rows = form.lyrDetails().tabPathDetails().lyrPathology().tabRequestedTests().grdTest().getAllRows(); for (int i = 0; i < rows.length; i++) { GenForm.lyrDetailsLayer.tabPathDetailsContainer.lyrPathologyLayer.tabRequestedTestsContainer.grdTestRow row = rows[i]; if (isRowEditable(row) && !row.isColTypeEmpty()) { for (int y = 0; y < voOcsOrder.getInvestigations().size(); y++) if (row.getValue().getInvestigation().getID_Investigation().equals(voOcsOrder.getInvestigations().get(y).getInvestigation().getID_Investigation())) for (int m = 0; m < voOcsOrder.getSpecimens().size(); m++) if (row.getValue().getSiteCdIsNotNull() && voOcsOrder.getSpecimens().get(m).getSiteCdIsNotNull() && voOcsOrder.getSpecimens().get(m).getInvestigations().contains(voOcsOrder.getInvestigations().get(y)) && row.getValue().getSiteCd().getID() == voOcsOrder.getSpecimens().get(m).getSiteCd().getID()) { row.getColType().setValue(voOcsOrder.getSpecimens().get(m).getRequestedType()); } else if (row.getValue().getSiteCd() == null && voOcsOrder.getSpecimens().get(m).getInvestigations().contains(voOcsOrder.getInvestigations().get(y))) { row.getColType().setValue(voOcsOrder.getSpecimens().get(m).getRequestedType()); } } } }
/** * WDEV-13999 */ private void fillInRefManClinicalDetails(OcsOrderVo order) { if (order == null) return; // Copy & default in 'Responsible HCP' from order to amend form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().clear(); form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().newRow(order.getResponsibleClinician(), order.getResponsibleClinician().toString()); form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().setValue(order.getResponsibleClinician()); // Copy 'Ordering HCP' form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().clear(); HcpLiteVo orderingHCP = domain.getHCPbyMoS(order.getOrderedBy()); if (orderingHCP != null) // Old orders might not have this fields filled in { form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().newRow(orderingHCP, orderingHCP.toString()); form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().setValue(orderingHCP); } }
/** * WDEV-13999 */ private void fillInCareUkClinicalDetails(OcsOrderVo order) { if (order == null) return; // Copy & default in 'Responsible HCP' from order to amend form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().clear(); form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().newRow(order.getResponsibleClinician(), order.getResponsibleClinician().toString()); form.lyrDetails().tabClinicalNotes().qmbResponsibleHCP().setValue(order.getResponsibleClinician()); // Copy 'Ordering HCP' form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().clear(); HcpLiteVo orderingHCP = domain.getHCPbyMoS(order.getOrderedBy()); if (orderingHCP != null) // Old orders might not have this fields filled in { form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().newRow(orderingHCP, orderingHCP.toString()); form.lyrDetails().tabClinicalNotes().qmbOrderingHCP().setValue(orderingHCP); } }
private OrderInvestigationVo getOrderInvestigationFromOriginalOrder(OcsOrderVo orderSession, Integer investigationID) { if (orderSession == null || orderSession.getInvestigations() == null) return null; for (OrderInvestigationVo orderInvestigation : orderSession.getInvestigations()) { if (orderInvestigation.getID_OrderInvestigation() != null && orderInvestigation.getInvestigation().getID_Investigation().equals(investigationID)) // equals because we are comparing value of objects return orderInvestigation; } return null; }
private void rebuildComponentsFromData(OcsOrderVo voOcsOrder) { // gather the orderinvestigation records and populate the // MyOrderComponents Global Context MyOrderComponentVoCollection components = new MyOrderComponentVoCollection(); if (voOcsOrder.getInvestigationsIsNotNull()) { for (int i = 0; i < voOcsOrder.getInvestigations().size(); i++) { OrderInvestigationVo voOrderInv = voOcsOrder.getInvestigations().get(i); if (OrderInvStatus.CANCELLED.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus()) || OrderInvStatus.CANCEL_REQUEST.equals(voOrderInv.getOrdInvCurrentStatus().getOrdInvStatus())) continue; MyOrderComponentVo component = new MyOrderComponentVo(); component.setCategory(voOrderInv.getInvestigation().getInvestigationIndex().getCategory()); component.setAdditionalLocationInfo(voOrderInv.getInvestigation().getNameWithLocationInfo()); component.setComponentType(SelectAndOrderComponentType.INVESTIGATION); component.setGenderSpecific(voOrderInv.getInvestigation().getInvestigationIndex().getGenderSpecific()); component.setHelpText(voOrderInv.getInvestigation().buildHelpTextTooltip()); component.setID(voOrderInv.getInvestigation().getID_Investigation()); component.setIsAddon(voOrderInv.getInvestigation().getIsAddon()); component.setPhlebMayCollect(voOrderInv.getInvestigation().getInvestigationIndex().getPhlebMayCollect()); component.setRequiresSite(voOrderInv.getInvestigation().getInvestigationIndex().getRequiresSiteSpecifier()); component.setServiceID(voOrderInv.getInvestigation().getProviderService() != null && voOrderInv.getInvestigation().getProviderService().getLocationService() != null ? voOrderInv.getInvestigation().getProviderService().getLocationService().getService().getID_Service() : null); component.setText(voOrderInv.getInvestigation().getInvestigationIndex().getName()); component.setTooltip(voOrderInv.getInvestigation().getInvestigationIndex().getDescription()); components.add(component); } components.sort(new MyOrderComponentComparator());//WDEV-14912 form.getGlobalContext().OCRR.setMyOrderComponents(components); } }
/** * Function used to determine if the modality has changed * It will analyse the first investigation from the new order with the investigation to amend. * If in either investigation the modality can not be reached it will consider that modality has changed */ private boolean hasModalityChanged(OcsOrderVo newOrder, OrderInvestigationLiteVo investigationToAmend) { // Check new order for investigations if (newOrder == null || newOrder.getInvestigations() == null || newOrder.getInvestigations().size() == 0) return true; OrderInvestigationVo investigation = newOrder.getInvestigations().get(0); // Check first OrderInvestigation for modality (Speciality in the Investigation.ProviderService.LocationService.Service) // If the modality can not be retrieved - consider that the modality has changed if (investigation == null || investigation.getInvestigation() == null || investigation.getInvestigation().getProviderService() == null || investigation.getInvestigation().getProviderService().getLocationService() == null || investigation.getInvestigation().getProviderService().getLocationService().getService() == null) return true; ServiceVo newModality = investigation.getInvestigation().getProviderService().getLocationService().getService(); // Check modality for OrderInvestigation to amend if (investigationToAmend == null || investigationToAmend.getInvestigation() == null || investigationToAmend.getInvestigation().getProviderService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService() == null || investigationToAmend.getInvestigation().getProviderService().getLocationService().getService() == null) return true; ServiceLiteVo oldModality = investigationToAmend.getInvestigation().getProviderService().getLocationService().getService(); // Keep in mind that the objects are of different types (cast is only to point this out) // and use the root of them as base for equals if (oldModality.equals((ServiceLiteVo)newModality)) return false; return true; }
private void populateSpecimenInstanceData(OcsOrderVo voOcsOrder) { OrderSpecimenVoCollection voCollSpecimen = new OrderSpecimenVoCollection(); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabNow().dyngrdNow(), voCollSpecimen); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabPatient().dyngrdPatient(), voCollSpecimen); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabOther().dyngrdOther(), voCollSpecimen); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdInpat(), voCollSpecimen); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabPhlebotomy().dyngrdOutPat(), voCollSpecimen); populateSpecimenInstanceDataFromGrid(voOcsOrder, form.lyrDetails().tabPathDetails().lyrPathology().tabSpecAlreadyCollected().dyngrdSpecAlreadyCollected(), voCollSpecimen); voOcsOrder.setSpecimens(voCollSpecimen); }
/** * For SpecimenWorklist items created for DFT investigation remove the OrderSpecimen entry */ private void processSpecimenWorklistItems(OcsOrderVo order, SpecimenWorkListItemVoCollection specimenWorklistItems) { if (specimenWorklistItems != null) { for (SpecimenWorkListItemVo specimen : specimenWorklistItems) { if (specimen.getDFTOrderInvestigation() != null) specimen.setSpecimen(null); } } }
public OcsOrderVo getOcsOrder(OcsOrderSessionRefVo ocsOrder) { if(ocsOrder == null || ocsOrder.getID_OcsOrderSession() == null) return null; OcsOrderSession doOcsOrder = (OcsOrderSession) getDomainFactory().getDomainObject(ocsOrder); return OcsOrderVoAssembler.create(doOcsOrder); }
/** * WDEV-13999 * Retrieve full Order details */ public OcsOrderVo getOrderFullDetails(OcsOrderSessionRefVo order)//WDEV-16232 { if (order == null || !order.getID_OcsOrderSessionIsNotNull())//WDEV-16232 throw new CodingRuntimeException("Order ref is null"); return OcsOrderVoAssembler.create((OcsOrderSession) getDomainFactory().getDomainObject(order));//WDEV-16232 }