added IBaseReference constructor to TokenParam

This commit is contained in:
Ken Stevens 2019-08-14 15:32:06 -04:00 committed by James Agnew
parent 2d35db877e
commit f29c37a654
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hl7.fhir.instance.model.api.IBaseCoding;
import static org.apache.commons.lang3.StringUtils.defaultString;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@ -67,6 +68,16 @@ public class TokenParam extends BaseParam /*implements IQueryParameterType*/ {
this(toSystemValue(theIdentifierDt.getSystemElement()), theIdentifierDt.getValueElement().getValue());
}
/**
* Construct a {@link TokenParam} from the {@link IBaseCoding#getSystem()} () system} and
* {@link IBaseCoding#getCode()} () code} of a {@link IBaseCoding} instance.
*
* @param theCoding The coding
*/
public TokenParam(IBaseCoding theCoding) {
this(theCoding.getSystem(), theCoding.getCode());
}
public TokenParam(String theSystem, String theValue) {
setSystem(theSystem);
setValue(theValue);