All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.fhir.model.dstu.composite.CodeableConceptDt Maven / Gradle / Ivy

There is a newer version: 7.6.1
Show newest version
















package ca.uhn.fhir.model.dstu.composite;

import java.math.BigDecimal;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import ca.uhn.fhir.model.api.*;
import ca.uhn.fhir.model.primitive.*;
import ca.uhn.fhir.model.api.annotation.*;
import ca.uhn.fhir.model.base.composite.*;

import ca.uhn.fhir.model.dstu.valueset.AddressUseEnum;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.NameUseEnum;
import ca.uhn.fhir.model.dstu.resource.Organization;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum;
import ca.uhn.fhir.model.dstu.resource.ValueSet;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;

/**
 * HAPI/FHIR CodeableConceptDt Datatype
 * (Concept - reference to a terminology or just  text)
 *
 * 

* Definition: * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text *

* *

* Requirements: * This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept *

*/ @DatatypeDef(name="CodeableConceptDt") public class CodeableConceptDt extends BaseIdentifiableElement implements ICompositeDatatype { /** * Constructor */ public CodeableConceptDt() { // nothing } /** * Constructor which creates a CodeableConceptDt with one coding repetition, containing * the given system and code */ public CodeableConceptDt(String theSystem, String theCode) { addCoding().setSystem(theSystem).setCode(theCode); } @Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false) @Description( shortDefinition="Code defined by a terminology system", formalDefinition="A reference to a code defined by a terminology system" ) private java.util.List myCoding; @Child(name="text", type=StringDt.class, order=1, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="Plain text representation of the concept", formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user" ) private StringDt myText; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCoding, myText); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myCoding, myText); } /** * Gets the value(s) for coding (Code defined by a terminology system). * creating it if it does * not exist. Will not return null. * *

* Definition: * A reference to a code defined by a terminology system *

*/ public java.util.List getCoding() { if (myCoding == null) { myCoding = new java.util.ArrayList(); } return myCoding; } /** * Gets the value(s) for coding (Code defined by a terminology system). * creating it if it does * not exist. Will not return null. * *

* Definition: * A reference to a code defined by a terminology system *

*/ public java.util.List getCodingElement() { if (myCoding == null) { myCoding = new java.util.ArrayList(); } return myCoding; } /** * Sets the value(s) for coding (Code defined by a terminology system) * *

* Definition: * A reference to a code defined by a terminology system *

*/ public CodeableConceptDt setCoding(java.util.List theValue) { myCoding = theValue; return this; } /** * Adds and returns a new value for coding (Code defined by a terminology system) * *

* Definition: * A reference to a code defined by a terminology system *

*/ public CodingDt addCoding() { CodingDt newType = new CodingDt(); getCoding().add(newType); return newType; } /** * Gets the first repetition for coding (Code defined by a terminology system), * creating it if it does not already exist. * *

* Definition: * A reference to a code defined by a terminology system *

*/ public CodingDt getCodingFirstRep() { if (getCoding().isEmpty()) { return addCoding(); } return getCoding().get(0); } /** * Gets the value(s) for text (Plain text representation of the concept). * creating it if it does * not exist. Will not return null. * *

* Definition: * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user *

*/ public StringDt getText() { if (myText == null) { myText = new StringDt(); } return myText; } /** * Gets the value(s) for text (Plain text representation of the concept). * creating it if it does * not exist. Will not return null. * *

* Definition: * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user *

*/ public StringDt getTextElement() { if (myText == null) { myText = new StringDt(); } return myText; } /** * Sets the value(s) for text (Plain text representation of the concept) * *

* Definition: * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user *

*/ public CodeableConceptDt setText(StringDt theValue) { myText = theValue; return this; } /** * Sets the value for text (Plain text representation of the concept) * *

* Definition: * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user *

*/ public CodeableConceptDt setText( String theString) { myText = new StringDt(theString); return this; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy