@Search() public List<Observation> getObservationsByQuantity( @RequiredParam(name=Observation.SP_VALUE_QUANTITY) QuantityParam theQuantity) { List<Observation> retVal = new ArrayList<Observation>(); ParamPrefixEnum prefix = theQuantity.getPrefix(); BigDecimal value = theQuantity.getValue(); String units = theQuantity.getUnits(); // .. Apply these parameters .. // ... populate ... return retVal; } //END SNIPPET: quantity
if (quantity.getSystem() == null && quantity.getUnits() == null) { if (getValue().equals(quantity.getValue())) { retval = true; if (getUnits().equalsIgnoreCase(quantity.getUnits()) && getValue().equals(quantity.getValue())) { retval = true; } else if (quantity.getUnits() == null) { if (getSystem().equalsIgnoreCase(quantity.getSystem()) && getValue().equals(quantity.getValue())) { getUnits().equalsIgnoreCase(quantity.getUnits()) && getValue().equals(quantity.getValue())) { retval = true;
QuantityParam param = (QuantityParam) theParam; systemValue = param.getSystem(); unitsValue = param.getUnits(); cmpValue = param.getPrefix(); valueValue = param.getValue();
QuantityParam param = (QuantityParam) theParam; systemValue = param.getSystem(); unitsValue = param.getUnits(); cmpValue = param.getPrefix(); valueValue = param.getValue();