private ChartResultVoCollection getResultsFromDFTOrderInvestigation(boolean isTabularView) { if(form.getLocalContext().getDFTOrderInvestigation() == null || form.getLocalContext().getDFTOrderInvestigation().getResultDetails() == null || form.getLocalContext().getDFTOrderInvestigation().getResultDetails().getPathologyResultDetails() == null) return null; OrderInvestigationChartVo oi = domain.getOrderInvestigation(form.getLocalContext().getDFTOrderInvestigation()); ChartResultVoCollection results = new ChartResultVoCollection(); for(PathologyResultDetailsForCumulateResultsVo pathResult : form.getLocalContext().getDFTOrderInvestigation().getResultDetails().getPathologyResultDetails()) { if(pathResult == null || pathResult.getResultComponents() == null) continue; for(ChartResultVo component : pathResult.getResultComponents()) { if(component == null) continue; if(ResultValueType.NM.equals(component.getResValType()) || (isTabularView && (ResultValueType.SN.equals(component.getResValType()) || ResultValueType.ST.equals(component.getResValType())))) { component.setInvestigationData(oi); component.setSpecimenComments(pathResult.getOrderSpecimen()); component.setPathologyResultId(pathResult.getID_PathResultDetails()); results.add(component); } } } return results; }
/** * @param msgVo * @param newOrder * @param order * @throws HL7Exception * @throws DataTypeException */ private void populateNonSpecimenClinicalDetailsSeparateSegments(IfOrderInvestigationVo inv,ProviderSystemVo providerSystem, IfOutOcsOrderVo newOrder, ORM_O01 order,boolean useNTE) throws HL7Exception, DataTypeException { GeneralQuestionAnswerVoCollection radiologyQuestions = ocsIf.getRadiologyQuestions(inv); if ((radiologyQuestions!=null&&radiologyQuestions.size()>0) ||newOrder.getAdditClinNotesIsNotNull() ||newOrder.getSummaryClinicalInformationIsNotNull()) { int i=0; String FT = svc.getRemoteLookup(ResultValueType.FT.getId(), providerSystem.getCodeSystem().getText()); String orderDetail= svc.getRemoteLookup(ResultStatus.ORDERDETAIL.getId(), providerSystem.getCodeSystem().getText()); if(!useNTE) { i++; renderOBX(getNextOBX(order, i), i, "Relevant clinical information : ", FT, orderDetail); // Only needed for OBXs } String alertText = getAlertsText(newOrder.getPatient(),providerSystem); if (alertText!=null&&!alertText.equals("")) { i++; if(useNTE) renderNTE(getNextNTE(order, i), alertText,i); else renderOBX(getNextOBX(order, i), i, alertText, FT, orderDetail); } for (GeneralQuestionAnswerVo qAVo : radiologyQuestions) { String answers = UserAssessmentInstHelper.getAnswersAsText(qAVo); if(answers!=null) { i++; if(useNTE) renderNTE(getNextNTE(order, i),qAVo.getQuestion().getShortText()+": "+ answers, i); else renderOBX(getNextOBX(order, i), i, answers, FT, orderDetail,qAVo.getQuestion().getShortText()); } } if (newOrder.getAdditClinNotesIsNotNull()) { i++; if(useNTE) renderNTE(getNextNTE(order, i), newOrder.getAdditClinNotes(),i); else renderOBX(getNextOBX(order, i), i, newOrder.getAdditClinNotes(), FT, orderDetail); } if(newOrder.getSummaryClinicalInformationIsNotNull()) { i++; if(useNTE) renderNTE(getNextNTE(order, i),newOrder.getSummaryClinicalInformation(),i); else renderOBX(getNextOBX(order, i),i,newOrder.getSummaryClinicalInformation(),FT,orderDetail); } if(inv.getReorderReasonIsNotNull()&&!"".equals(inv.getReorderReason())) { i++; if(useNTE) renderNTE(getNextNTE(order, i),"Reason for Re-Order: "+inv.getReorderReason(),i); else renderOBX(getNextOBX(order, i),i,"Reason for Re-Order: "+inv.getReorderReason(),FT,orderDetail); } } }