@Override public String getValueAsQueryToken(FhirContext theContext) { StringBuilder b= new StringBuilder(); if (getComparatorElement() != null) { b.append(getComparatorElement().getValue()); } if (!getValueElement().isEmpty()) { b.append(getValueElement().getValueAsString()); } b.append('|'); if (!getSystemElement().isEmpty()) { b.append(getSystemElement().getValueAsString()); } b.append('|'); if (!getUnitsElement().isEmpty()) { b.append(getUnitsElement().getValueAsString()); } return b.toString(); }
@Override public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { getComparatorElement().setValue(null); setCode( null); setSystem(null); if (parts[0].startsWith("le")) { getComparatorElement().setValue(ParamPrefixEnum.LESSTHAN_OR_EQUALS.getValue()); setValue(new BigDecimal(parts[0].substring(2))); } else if (parts[0].startsWith("lt")) { getComparatorElement().setValue(ParamPrefixEnum.LESSTHAN.getValue()); setValue(new BigDecimal(parts[0].substring(1))); } else if (parts[0].startsWith("ge")) { getComparatorElement().setValue(ParamPrefixEnum.GREATERTHAN_OR_EQUALS.getValue()); setValue(new BigDecimal(parts[0].substring(2))); } else if (parts[0].startsWith("gt")) { getComparatorElement().setValue(ParamPrefixEnum.GREATERTHAN.getValue()); setValue(new BigDecimal(parts[0].substring(1))); } else {
systemValue = param.getSystemElement().getValueAsString(); unitsValue = param.getUnitsElement().getValueAsString(); cmpValue = ParamPrefixEnum.forValue(param.getComparatorElement().getValueAsString()); valueValue = param.getValueElement().getValue(); } else if (theParam instanceof QuantityParam) {
@Override public String getValueAsQueryToken(FhirContext theContext) { StringBuilder b= new StringBuilder(); if (getComparatorElement() != null) { b.append(getComparatorElement().getValue()); } if (!getValueElement().isEmpty()) { b.append(getValueElement().getValueAsString()); } b.append('|'); if (!getSystemElement().isEmpty()) { b.append(getSystemElement().getValueAsString()); } b.append('|'); if (!getUnitsElement().isEmpty()) { b.append(getUnitsElement().getValueAsString()); } return b.toString(); }
@Override public void setValueAsQueryToken(FhirContext theContext, String theParamName, String theQualifier, String theValue) { getComparatorElement().setValue(null); setCode( null); setSystem(null); if (parts[0].startsWith("le")) { getComparatorElement().setValue(ParamPrefixEnum.LESSTHAN_OR_EQUALS.getValue()); setValue(new BigDecimal(parts[0].substring(2))); } else if (parts[0].startsWith("lt")) { getComparatorElement().setValue(ParamPrefixEnum.LESSTHAN.getValue()); setValue(new BigDecimal(parts[0].substring(1))); } else if (parts[0].startsWith("ge")) { getComparatorElement().setValue(ParamPrefixEnum.GREATERTHAN_OR_EQUALS.getValue()); setValue(new BigDecimal(parts[0].substring(2))); } else if (parts[0].startsWith("gt")) { getComparatorElement().setValue(ParamPrefixEnum.GREATERTHAN.getValue()); setValue(new BigDecimal(parts[0].substring(1))); } else {
systemValue = param.getSystemElement().getValueAsString(); unitsValue = param.getUnitsElement().getValueAsString(); cmpValue = ParamPrefixEnum.forValue(param.getComparatorElement().getValueAsString()); valueValue = param.getValueElement().getValue(); } else if (theParam instanceof QuantityParam) {