Example #1
0
 private boolean haveSomeOrAllNonRepeatableOutputParameterValues() {
   InstrumentType instrumentType = getInstrumentType();
   InstrumentRun instrumentRun = activeInstrumentRunService.getInstrumentRun();
   for (InstrumentOutputParameter instrumentOutputParameter :
       instrumentType.getOutputParameters()) {
     InstrumentRunValue instrumentRunValue =
         instrumentRun.getInstrumentRunValue(instrumentOutputParameter);
     if (instrumentRunValue != null) {
       if (instrumentRunValue.getData(instrumentOutputParameter.getDataType()).getValue() != null)
         return true;
     }
   }
   return false; // No values found
 }
Example #2
0
 private boolean haveSomeOrAllRepeatingOutputParameterValues() {
   InstrumentType instrumentType = getInstrumentType();
   InstrumentRun instrumentRun = activeInstrumentRunService.getInstrumentRun();
   Participant participant = activeInstrumentRunService.getParticipant();
   if (instrumentType.getExpectedMeasureCount(participant) == 0) return false; // No values
   for (Measure measure : instrumentRun.getMeasures()) {
     InstrumentRun measureInstrumentRun = measure.getInstrumentRun();
     for (InstrumentOutputParameter instrumentOutputParameter :
         instrumentType.getOutputParameters()) {
       InstrumentRunValue instrumentRunValue =
           measureInstrumentRun.getInstrumentRunValue(instrumentOutputParameter);
       if (instrumentRunValue != null) {
         if (instrumentRunValue.getData(instrumentOutputParameter.getDataType()).getValue()
             != null) return true;
       }
     }
   }
   return false; // No values found
 }
Example #3
0
 /**
  * Returns true if at least one interpretive parameter has a value.
  *
  * @return True if we have at least one interpretive parameter value.
  */
 private boolean hasSomeOrAllInterpretiveParameterValues() {
   InstrumentType instrumentType = getInstrumentType();
   InstrumentRun instrumentRun = activeInstrumentRunService.getInstrumentRun();
   for (InterpretativeParameter interpretiveParameter :
       instrumentType.getInterpretativeParameters()) {
     InstrumentRunValue instrumentRunValue =
         instrumentRun.getInstrumentRunValue(interpretiveParameter);
     if (instrumentRunValue != null) {
       if (instrumentRunValue.getData(interpretiveParameter.getDataType()).getValue() != null)
         return true;
     }
   }
   for (InstrumentInputParameter instrumentInputParameter :
       instrumentType.getInputParameters(false)) {
     InstrumentRunValue instrumentRunValue =
         instrumentRun.getInstrumentRunValue(instrumentInputParameter);
     if (instrumentRunValue != null) {
       if (instrumentRunValue.getData(instrumentInputParameter.getDataType()).getValue() != null)
         return true;
     }
   }
   return false;
 }