private GenForm.grdPeripheralRow findPeripheralChildNode(MskJointVo voJointToFind, LateralityLRonly lkpLateralityToFind) { GenForm.grdPeripheralRow row = null; for (int i = 0; i < form.grdPeripheral().getRows().size(); i++) { // Looking for a match for the joint and laterality here MskJointVo voJoint = ((RangeOfMovementDetailVo) form.grdPeripheral().getRows().get(i).getValue()).getJoint(); LateralityLRonly lkpLaterality = ((RangeOfMovementDetailVo) form.grdPeripheral().getRows().get(i).getValue()).getLaterality(); if (voJoint != null && voJoint.equals(voJointToFind) && lkpLaterality != null && lkpLaterality.equals(lkpLateralityToFind)) { row = form.grdPeripheral().getRows().get(i); break; } } return row; }
/** * Node population methods - Coded hierarchically from laterality through the details collection and detail followed by digit and joint * * * This method is called twice to add the two basic nodes in the parent tree namely a row for Right Laterality and a node for Left laterality */ private void nodeLateralityPopulate(LateralityLRonly lkpLaterality) { grdMovementRow lateralityRow = form.grdMovement().getRows().newRow(); lateralityRow.setColLaterality(lkpLaterality.getIItemText()); lateralityRow.setcolLateralityForLookup(lkpLaterality); if (lkpLaterality.equals(LateralityLRonly.LEFT)) { lateralityRow.setCollapsedImage(form.getImages().Core.AnswerBox_Left); lateralityRow.setExpandedImage(form.getImages().Core.AnswerBox_Left); } else { lateralityRow.setCollapsedImage(form.getImages().Core.AnswerBox_Right); lateralityRow.setExpandedImage(form.getImages().Core.AnswerBox_Right); } lateralityRow.setBackColor(Color.Beige); lateralityRow.setBold(true); }
private grdMovementRow findLateralityNode(LateralityLRonly lkpLaterality) { GenForm.grdMovementRow lateralityRow = null; for (int i = 0; i < form.grdMovement().getRows().size(); i++) { if (form.grdMovement().getRows().get(i).getcolLateralityForLookup().equals(lkpLaterality)) { lateralityRow = form.grdMovement().getRows().get(i); break; } } if (lateralityRow == null) throw new CodingRuntimeException("Laterality row expected but not found."); return lateralityRow; }
private RangeOfMovementDetailVo getDetailForLateralityDigitJoint(LateralityLRonly lkpLaterality, MskGroupLiteVo voGroup, MskJointVo voJoint) { if (lkpLaterality == null || voGroup == null || voJoint == null) return null; RangeOfMovementDetailVo voRom = null; for (int i = 0; i < form.getLocalContext().getSelectedHandRangeOfMovementInstance().getDetails().size(); i++) { if ((form.getLocalContext().getSelectedHandRangeOfMovementInstance().getDetails().get(i).getLaterality().equals(lkpLaterality) && form.getLocalContext().getSelectedHandRangeOfMovementInstance().getDetails().get(i).getGroup().equals(voGroup) && form.getLocalContext().getSelectedHandRangeOfMovementInstance().getDetails().get(i).getJoint().equals(voJoint))) { voRom = form.getLocalContext().getSelectedHandRangeOfMovementInstance().getDetails().get(i); break; } } if (voRom == null) throw new CodingRuntimeException("getDetailForLateralityDigitJoint failed in to find laterality group joint ."); else return voRom; }
private void populateMotorChartDetails(MotorChartDetailsVoCollection coll, LateralityLRonly lateralityLR, MotorAreaRefVo areaRefVo, MuscleGroupRefVo groupRefVo, MuscleRefVo muscleRefVo, Object score) { MotorChartDetailsVo voMotorChartDetails = new MotorChartDetailsVo(); voMotorChartDetails.setLaterality(lateralityLR); voMotorChartDetails.setScore((Integer) score); voMotorChartDetails.setMotorArea(areaRefVo); voMotorChartDetails.setMuscleGroup(groupRefVo); voMotorChartDetails.setMuscle(muscleRefVo); coll.add(voMotorChartDetails); }
/** * @param voJoint * @param bAll * Loads the laterality combo on the forms peripheral tab. If the passed in joint can be found in the peripheral tree then the lateralities present in the tree are NOT loaded into the combo. */ private void loadAvailableLateralities(MskJointVo voJoint, boolean bAll) { form.lyrDetails().tabPeripheral().cmbLaterality().clear(); if (bAll == true) { LateralityLRonlyCollection coll = LookupHelper.getLateralityLRonly(domain.getLookupService()); for (int i = 0; i < coll.size(); i++) form.lyrDetails().tabPeripheral().cmbLaterality().newRow(coll.get(i), coll.get(i).getIItemText()); } else { GenForm.grdPeripheralRow row = null; row = findPeripheralChildNode(voJoint, LateralityLRonly.LEFT); if (row == null) { form.lyrDetails().tabPeripheral().cmbLaterality().newRow(LateralityLRonly.LEFT, LateralityLRonly.LEFT.getIItemText()); } row = findPeripheralChildNode(voJoint, LateralityLRonly.RIGHT); if (row == null) { form.lyrDetails().tabPeripheral().cmbLaterality().newRow(LateralityLRonly.RIGHT, LateralityLRonly.RIGHT.getIItemText()); } } }
private void populateGrid(RangeOfMovementDetailVoCollection voCollRangeOfMovementDetails) { form.grdMovement().getRows().clear(); // Add Left and Right Lateralitites.. nodeLateralityPopulate(LateralityLRonly.LEFT); nodeLateralityPopulate(LateralityLRonly.RIGHT); if (voCollRangeOfMovementDetails != null) nodesDetailsPopulate(voCollRangeOfMovementDetails); }
private void populateScreenFromData(HandTestVo voHandTest) { form.getLocalContext().setHandVo(voHandTest); if(voHandTest.getAuthoringCPIsNotNull()){ form.qmbAuthoringHCP().newRow(voHandTest.getAuthoringCP(), voHandTest.getAuthoringCP().getName().toString()); form.qmbAuthoringHCP().setValue(voHandTest.getAuthoringCP()); } if(voHandTest.getAuthoringDateTimeIsNotNull()) form.dtimAuthoring().setValue(voHandTest.getAuthoringDateTime()); if(voHandTest.getDominantHandIsNotNull()) form.cmbDominantHand().setValue(voHandTest.getDominantHand()); if(voHandTest.getLeftPinchStrengthIsNotNull()) form.intLeftPinch().setValue(voHandTest.getLeftPinchStrength()); if(voHandTest.getLeftThumbIndexSpanExtensionIsNotNull()) form.decLeftThumb().setValue(voHandTest.getLeftThumbIndexSpanExtension()); if(voHandTest.getRightPinchStrengthIsNotNull()) form.intRightPinch().setValue(voHandTest.getRightPinchStrength()); if(voHandTest.getRightThumbIndexSpanExtensionIsNotNull()) form.decRightThumb().setValue(voHandTest.getRightThumbIndexSpanExtension()); if(voHandTest.getLeftBulbDynamometerIsNotNull()) form.intLeftBulb().setValue(voHandTest.getLeftBulbDynamometer()); if(voHandTest.getRightBulbDynamometerIsNotNull()) form.intRightBulb().setValue(voHandTest.getRightBulbDynamometer()); GenForm.grdGripRow rowGrip; if(voHandTest.getGripStrengthIsNotNull()) for (int i = 0; i< voHandTest.getGripStrength().size(); i++) { HandJaymarVo voHandJaymar = voHandTest.getGripStrength().get(i); rowGrip = form.grdGrip().getRows().newRow(); rowGrip.setcolTree(voHandJaymar.getJaymarLevel()); if(voHandJaymar.getJaymarFindingIsNotNull()){ for (int j = 0; j< voHandJaymar.getJaymarFinding().size(); j++) { HandJaymarFindingsVo voHandJaymarFinding = voHandJaymar.getJaymarFinding().get(j); if(voHandJaymarFinding.getLaterality().equals(LateralityLRonly.RIGHT)){ if(voHandJaymarFinding.getTest1IsNotNull()) rowGrip.setColTest1Right(voHandJaymarFinding.getTest1()); else rowGrip.setColTest1Right(new Float(0)); if(voHandJaymarFinding.getTest2IsNotNull()) rowGrip.setColTest2Right(voHandJaymarFinding.getTest2()); else rowGrip.setColTest2Right(new Float(0)); if(voHandJaymarFinding.getTest3IsNotNull()) rowGrip.setColTest3Right(voHandJaymarFinding.getTest3()); else rowGrip.setColTest3Right(new Float(0)); rowGrip.setColAvgRight(voHandJaymarFinding.getLevelAverage()); } else if(voHandJaymarFinding.getLaterality().equals(LateralityLRonly.LEFT)){ if(voHandJaymarFinding.getTest1IsNotNull()) rowGrip.setColTest1Left(voHandJaymarFinding.getTest1()); else rowGrip.setColTest1Left(new Float(0)); if(voHandJaymarFinding.getTest2IsNotNull()) rowGrip.setColTest2Left(voHandJaymarFinding.getTest2()); else rowGrip.setColTest2Left(new Float(0)); if(voHandJaymarFinding.getTest3IsNotNull()) rowGrip.setColTest3Left(voHandJaymarFinding.getTest3()); else rowGrip.setColTest3Left(new Float(0)); rowGrip.setColAvgLeft(voHandJaymarFinding.getLevelAverage()); } } } } }
private HandTestVo populateDataFromScreem(HandTestVo voHandTest) { if(voHandTest.getClinicalContact()==null) voHandTest.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); if(voHandTest.getCareContext()==null) voHandTest.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voHandTest.setAuthoringCP(form.qmbAuthoringHCP().getValue()); if(form.dtimAuthoring().getValue()==null || form.dtimAuthoring().getValue().getDate()==null){ engine.showErrors(new String[]{"Authoring Date/Time is mandatory."}); //wdev-13070 return null; } if(form.dtimAuthoring().getValue()==null || form.dtimAuthoring().getValue().getTime()==null){ engine.showErrors(new String[]{"Authoring Date/Time is mandatory."}); //wdev-13070 return null; } voHandTest.setAuthoringDateTime(form.dtimAuthoring().getValue()); voHandTest.setDominantHand(form.cmbDominantHand().getValue()); voHandTest.setLeftPinchStrength(form.intLeftPinch().getValue()); voHandTest.setLeftThumbIndexSpanExtension(form.decLeftThumb().getValue()); voHandTest.setRightPinchStrength(form.intRightPinch().getValue()); voHandTest.setRightThumbIndexSpanExtension(form.decRightThumb().getValue()); voHandTest.setLeftBulbDynamometer(form.intLeftBulb().getValue()); voHandTest.setRightBulbDynamometer(form.intRightBulb().getValue()); GenForm.grdGripRow rowGrip; HandJaymarVoCollection collHandJaymar = new HandJaymarVoCollection(); for(int i=0; i<form.grdGrip().getRows().size(); i++){ rowGrip = form.grdGrip().getRows().get(i); HandJaymarFindingsVoCollection collHandJaymarFindings = new HandJaymarFindingsVoCollection(); HandJaymarFindingsVo voHandJaymarRight = new HandJaymarFindingsVo(); HandJaymarVo voHandJaymar = new HandJaymarVo(); voHandJaymar.setJaymarLevel(rowGrip.getcolTree()); voHandJaymarRight.setLaterality(LateralityLRonly.RIGHT); voHandJaymarRight.setTest1(rowGrip.getColTest1Right()); voHandJaymarRight.setTest2(rowGrip.getColTest2Right()); voHandJaymarRight.setTest3(rowGrip.getColTest3Right()); voHandJaymarRight.setLevelAverage(getAverage(rowGrip.getColTest1Right(), rowGrip.getColTest2Right(), rowGrip.getColTest3Right())); collHandJaymarFindings.add(voHandJaymarRight); HandJaymarFindingsVo voHandJaymarLeft = new HandJaymarFindingsVo(); voHandJaymarLeft.setLaterality(LateralityLRonly.LEFT); voHandJaymarLeft.setTest1(rowGrip.getColTest1Left()); voHandJaymarLeft.setTest2(rowGrip.getColTest2Left()); voHandJaymarLeft.setTest3(rowGrip.getColTest3Left()); voHandJaymarLeft.setLevelAverage(getAverage(rowGrip.getColTest1Left(), rowGrip.getColTest2Left(), rowGrip.getColTest3Left())); collHandJaymarFindings.add(voHandJaymarLeft); voHandJaymar.setJaymarFinding(collHandJaymarFindings); collHandJaymar.add(voHandJaymar); } voHandTest.setGripStrength(collHandJaymar); return voHandTest; }