/** * Sets the value for <b>code</b> () * * <p> * <b>Definition:</b> * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) * </p> */ public CodingDt setCode( String theCode) { myCode = new CodeDt(theCode); return this; }
@Override public boolean isEmpty() { return super.isBaseEmpty() && isBlank(getValueAsString()); }
/** * Returns true if <code>this</code> Coding has the same {@link #getCodeElement() Code} and {@link #getSystemElement() system} (as compared by simple equals comparison). Does not compare other * Codes (e.g. getUseElement()) or any extensions. */ public boolean matchesSystemAndCode(BaseCodingDt theCoding) { if (theCoding == null) { return false; } return getCodeElement().equals(theCoding.getCodeElement()) && getSystemElement().equals(theCoding.getSystemElement()); }
@SuppressWarnings("unchecked") @Override public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException { super.readExternal(theIn); myBinder = (IValueSetEnumBinder<T>) theIn.readObject(); }
/** * returns true if <code>this</code> Coding matches a search for the coding specified by <code>theSearchParam</code>, according * to the following: * <ul> * <li>[parameter]=[namespace]|[code] matches a code/value in the given system namespace</li> * <li>[parameter]=[code] matches a code/value irrespective of it's system namespace</li> * <li>[parameter]=|[code] matches a code/value that has no system namespace</li> * </ul> * @param theSearchParam - coding to test <code>this</code> against * @return true if the coding matches, false otherwise */ public boolean matchesToken(BaseCodingDt theSearchParam) { if (theSearchParam.isSystemPresent()) { if (theSearchParam.isSystemBlank()) { // [parameter]=|[code] matches a code/value that has no system namespace if (isSystemPresent() && !isSystemBlank()) return false; } else { // [parameter]=[namespace]|[code] matches a code/value in the given system namespace if (!isSystemPresent()) return false; if (!getSystemElement().equals(theSearchParam.getSystemElement())) return false; } } else { // [parameter]=[code] matches a code/value irrespective of it's system namespace // (nothing to do for system for this case) } return getCodeElement().equals(theSearchParam.getCodeElement()); }
@SuppressWarnings("unchecked") @Override public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException { super.readExternal(theIn); myBinder = (IValueSetEnumBinder<T>) theIn.readObject(); }
/** * Gets the value(s) for <b>language</b> (). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * Identifies the computable language in which mapping.map is expressed. * </p> */ public String getLanguage() { return getLanguageElement().getValue(); }
/** * Sets the value for <b>code</b> (Symbol in syntax defined by the system) * * <p> * <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) * </p> */ @Override public InternalCodingDt setCode(String theCode) { myCode = new CodeDt(theCode); return this; }
/** * {@inheritDoc} */ @Override public String getValueAsQueryToken(FhirContext theContext) { if (getSystemElement().getValueAsString() != null) { return ParameterUtil.escape(StringUtils.defaultString(getSystemElement().getValueAsString())) + '|' + ParameterUtil.escape(getCodeElement().getValueAsString()); } return ParameterUtil.escape(getCodeElement().getValueAsString()); }
/** * Returns true if <code>this</code> Coding has the same {@link #getCodeElement() Code} and {@link #getSystemElement() system} (as compared by simple equals comparison). Does not compare other * Codes (e.g. getUseElement()) or any extensions. */ public boolean matchesSystemAndCode(BaseCodingDt theCoding) { if (theCoding == null) { return false; } return getCodeElement().equals(theCoding.getCodeElement()) && getSystemElement().equals(theCoding.getSystemElement()); }
/** * Gets the value(s) for <b>code</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Name of Data type or Resource that is a(or the) type used for this element * </p> */ public String getCode() { return getCodeElement().getValue(); }
/** * Sets the value for <b>code</b> () * * <p> * <b>Definition:</b> * A computer processable form of the unit in some unit representation system * </p> */ public QuantityDt setCode( String theCode) { myCode = new CodeDt(theCode); return this; }
@Override public boolean isEmpty() { return super.isBaseEmpty() && isBlank(getValueAsString()); }
/** * returns true if <code>this</code> Coding matches a search for the coding specified by <code>theSearchParam</code>, according * to the following: * <ul> * <li>[parameter]=[namespace]|[code] matches a code/value in the given system namespace</li> * <li>[parameter]=[code] matches a code/value irrespective of it's system namespace</li> * <li>[parameter]=|[code] matches a code/value that has no system namespace</li> * </ul> * @param theSearchParam - coding to test <code>this</code> against * @return true if the coding matches, false otherwise */ public boolean matchesToken(BaseCodingDt theSearchParam) { if (theSearchParam.isSystemPresent()) { if (theSearchParam.isSystemBlank()) { // [parameter]=|[code] matches a code/value that has no system namespace if (isSystemPresent() && !isSystemBlank()) return false; } else { // [parameter]=[namespace]|[code] matches a code/value in the given system namespace if (!isSystemPresent()) return false; if (!getSystemElement().equals(theSearchParam.getSystemElement())) return false; } } else { // [parameter]=[code] matches a code/value irrespective of it's system namespace // (nothing to do for system for this case) } return getCodeElement().equals(theSearchParam.getCodeElement()); }
/** * Gets the value(s) for <b>code</b> (). * creating it if it does * not exist. Will not return <code>null</code>. * * <p> * <b>Definition:</b> * A computer processable form of the unit in some unit representation system * </p> */ public String getCode() { return getCodeElement().getValue(); }
/** * Sets the value for <b>code</b> () * * <p> * <b>Definition:</b> * Name of Data type or Resource that is a(or the) type used for this element * </p> */ public Type setCode( String theCode) { myCode = new CodeDt(theCode); return this; }
/** * {@inheritDoc} */ @Override public String getValueAsQueryToken(FhirContext theContext) { if (getSystemElement().getValueAsString() != null) { return ParameterUtil.escape(StringUtils.defaultString(getSystemElement().getValueAsString())) + '|' + ParameterUtil.escape(getCodeElement().getValueAsString()); } return ParameterUtil.escape(getCodeElement().getValueAsString()); }
/** * Gets the value(s) for <b>contentType</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate * </p> */ public String getContentType() { return getContentTypeElement().getValue(); }
/** * Sets the value for <b>value</b> () * * <p> * <b>Definition:</b> * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value * </p> */ public ComposeIncludeFilter setValue( String theCode) { myValue = new CodeDt(theCode); return this; }