/** * Convenience method which adds a token to this OR list using the system and code from a coding */ public void add(BaseCodingDt theCodingDt) { add(new TokenParam(theCodingDt)); }
/** * Sets the lower bound to be greaterthan or equal to the given date */ public DateRangeParam setLowerBoundInclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound); return this; }
/** * Sets the lower bound using a string that is compliant with * FHIR dateTime format (ISO-8601). * <p> * This lower bound is assumed to have a <code>ge</code> * (greater than or equals) modifier. * </p> */ public DateRangeParam setLowerBound(String theLowerBound) { setLowerBound(new DateParam(GREATERTHAN_OR_EQUALS, theLowerBound)); return this; }
public void setLastUpdated(DateRangeParam theLastUpdated) { if (theLastUpdated == null) { myLastUpdatedLow = null; myLastUpdatedHigh = null; } else { myLastUpdatedLow = theLastUpdated.getLowerBoundAsInstant(); myLastUpdatedHigh = theLastUpdated.getUpperBoundAsInstant(); } }
@Override String doGetValueAsQueryToken(FhirContext theContext) { StringBuilder b = new StringBuilder(); if (getPrefix() != null) { b.append(ParameterUtil.escapeWithDefault(getPrefix().getValue())); } b.append(ParameterUtil.escapeWithDefault(getValueAsString())); b.append('|'); b.append(ParameterUtil.escapeWithDefault(mySystem)); b.append('|'); b.append(ParameterUtil.escapeWithDefault(myUnits)); return b.toString(); }
@Override String doGetValueAsQueryToken(FhirContext theContext) { StringBuilder b = new StringBuilder(); if (getPrefix() != null) { b.append(ParameterUtil.escapeWithDefault(getPrefix().getValue())); } if (myValue != null) { b.append(ParameterUtil.escapeWithDefault(myValue.getValueAsString())); } return b.toString(); }
public List<BaseCodingDt> getListAsCodings() { ArrayList<BaseCodingDt> retVal = new ArrayList<BaseCodingDt>(); for (TokenParam next : getValuesAsQueryTokens()) { InternalCodingDt nextCoding = next.getValueAsCoding(); if (!nextCoding.isEmpty()) { retVal.add(nextCoding); } } return retVal; }
/** * Sets the upper bound using a string that is compliant with * FHIR dateTime format (ISO-8601). * <p> * This upper bound is assumed to have a <code>le</code> * (less than or equals) modifier. * </p> */ public DateRangeParam setUpperBound(String theUpperBound) { setUpperBound(new DateParam(LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
/** * Returns a new param containing the same value as this param, but with the type copnverted * to {@link StringParam}. This is useful if you are using reference parameters and want to handle * chained parameters of different types in a single method. * <p> * See <a href="http://jamesagnew.github.io/hapi-fhir/doc_rest_operations.html#dynamic_chains">Dynamic Chains</a> * in the HAPI FHIR documentation for an example of how to use this method. * </p> */ public StringParam toStringParam(FhirContext theContext) { StringParam retVal = new StringParam(); retVal.setValueAsQueryToken(theContext, null, null, getValueAsQueryToken(theContext)); return retVal; }
@Override String doGetQueryParameterQualifier() { if (getModifier() != null) { return getModifier().getValue(); } return null; }
/** * Sets the value of the param to the given date (sets to the {@link TemporalPrecisionEnum#MILLI millisecond} * precision, and will be encoded using the system local time zone). */ public DateParam setValue(Date theValue) { myValue.setValue(theValue, TemporalPrecisionEnum.MILLI); return this; }
/** * Returns null if there is no last updated value */ public DateRangeParam getLastUpdated() { if (myLastUpdated != null) { if (myLastUpdated.isEmpty()) { myLastUpdated = null; } } return myLastUpdated; }
/** * Add a new token to this list * @param theSystem * The system to use for the one token to pre-populate in this list */ public TokenOrListParam add(String theSystem, String theValue) { add(new TokenParam(theSystem, theValue)); return this; }
/** * Sets the upper bound to be greaterthan or equal to the given date */ public DateRangeParam setUpperBoundInclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound)); return this; }
/** * Convenience method which adds a token to this OR list using the system and value from an identifier */ public void add(BaseIdentifierDt theIdentifierDt) { add(new TokenParam(theIdentifierDt)); }
/** * Sets the lower bound to be greaterthan to the given date */ public DateRangeParam setLowerBoundExclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN, theLowerBound), myUpperBound); return this; }
/** * Sets the upper bound to be greaterthan to the given date */ public DateRangeParam setUpperBoundExclusive(Date theUpperBound) { validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN, theUpperBound)); return this; }