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

ca.uhn.fhir.model.dstu2.composite.AnnotationDt Maven / Gradle / Ivy

The newest version!
















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

import java.net.URI;
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.dstu2.valueset.AddressTypeEnum;
import ca.uhn.fhir.model.dstu2.valueset.AddressUseEnum;
import ca.uhn.fhir.model.dstu2.valueset.AggregationModeEnum;
import ca.uhn.fhir.model.dstu2.valueset.BindingStrengthEnum;
import ca.uhn.fhir.model.dstu2.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.CodingDt;
import ca.uhn.fhir.model.dstu2.valueset.ConstraintSeverityEnum;
import ca.uhn.fhir.model.dstu2.valueset.ContactPointSystemEnum;
import ca.uhn.fhir.model.dstu2.valueset.ContactPointUseEnum;
import ca.uhn.fhir.model.dstu2.resource.Device;
import ca.uhn.fhir.model.dstu2.valueset.EventTimingEnum;
import ca.uhn.fhir.model.dstu2.valueset.IdentifierTypeCodesEnum;
import ca.uhn.fhir.model.dstu2.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu2.valueset.NameUseEnum;
import ca.uhn.fhir.model.dstu2.resource.Organization;
import ca.uhn.fhir.model.dstu2.resource.Patient;
import ca.uhn.fhir.model.dstu2.composite.PeriodDt;
import ca.uhn.fhir.model.dstu2.resource.Practitioner;
import ca.uhn.fhir.model.dstu2.valueset.PropertyRepresentationEnum;
import ca.uhn.fhir.model.dstu2.valueset.QuantityComparatorEnum;
import ca.uhn.fhir.model.dstu2.composite.QuantityDt;
import ca.uhn.fhir.model.dstu2.composite.RangeDt;
import ca.uhn.fhir.model.dstu2.resource.RelatedPerson;
import ca.uhn.fhir.model.dstu2.valueset.SignatureTypeCodesEnum;
import ca.uhn.fhir.model.dstu2.valueset.SlicingRulesEnum;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.dstu2.valueset.TimingAbbreviationEnum;
import ca.uhn.fhir.model.dstu2.valueset.UnitsOfTimeEnum;
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
import ca.uhn.fhir.model.dstu2.composite.BoundCodeableConceptDt;
import ca.uhn.fhir.model.dstu2.composite.DurationDt;
import ca.uhn.fhir.model.dstu2.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu2.composite.SimpleQuantityDt;
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.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.MarkdownDt;
import ca.uhn.fhir.model.primitive.PositiveIntDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UnsignedIntDt;
import ca.uhn.fhir.model.primitive.UriDt;

/**
 * HAPI/FHIR AnnotationDt Datatype
 * ()
 *
 * 

* Definition: * A text note which also contains information about who made the statement and when *

* *

* Requirements: * *

*/ @DatatypeDef(name="Annotation") public class AnnotationDt extends BaseIdentifiableElement implements ICompositeDatatype { /** * Constructor */ public AnnotationDt() { // nothing } @Child(name="author", order=0, min=0, max=1, summary=true, modifier=false, type={ Practitioner.class, Patient.class, RelatedPerson.class, StringDt.class }) @Description( shortDefinition="", formalDefinition="The individual responsible for making the annotation." ) private IDatatype myAuthor; @Child(name="time", type=DateTimeDt.class, order=1, min=0, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="Indicates when this particular annotation was made" ) private DateTimeDt myTime; @Child(name="text", type=StringDt.class, order=2, min=1, max=1, summary=true, modifier=false) @Description( shortDefinition="", formalDefinition="The text of the annotation" ) private StringDt myText; @Override public boolean isEmpty() { return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myAuthor, myTime, myText); } @Override public List getAllPopulatedChildElementsOfType(Class theType) { return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myAuthor, myTime, myText); } /** * Gets the value(s) for author[x] (). * creating it if it does * not exist. Will not return null. * *

* Definition: * The individual responsible for making the annotation. *

*/ public IDatatype getAuthor() { return myAuthor; } /** * Sets the value(s) for author[x] () * *

* Definition: * The individual responsible for making the annotation. *

*/ public AnnotationDt setAuthor(IDatatype theValue) { myAuthor = theValue; return this; } /** * Gets the value(s) for time (). * creating it if it does * not exist. Will not return null. * *

* Definition: * Indicates when this particular annotation was made *

*/ public DateTimeDt getTimeElement() { if (myTime == null) { myTime = new DateTimeDt(); } return myTime; } /** * Gets the value(s) for time (). * creating it if it does * not exist. This method may return null. * *

* Definition: * Indicates when this particular annotation was made *

*/ public Date getTime() { return getTimeElement().getValue(); } /** * Sets the value(s) for time () * *

* Definition: * Indicates when this particular annotation was made *

*/ public AnnotationDt setTime(DateTimeDt theValue) { myTime = theValue; return this; } /** * Sets the value for time () * *

* Definition: * Indicates when this particular annotation was made *

*/ public AnnotationDt setTimeWithSecondsPrecision( Date theDate) { myTime = new DateTimeDt(theDate); return this; } /** * Sets the value for time () * *

* Definition: * Indicates when this particular annotation was made *

*/ public AnnotationDt setTime( Date theDate, TemporalPrecisionEnum thePrecision) { myTime = new DateTimeDt(theDate, thePrecision); return this; } /** * Gets the value(s) for text (). * creating it if it does * not exist. Will not return null. * *

* Definition: * The text of the annotation *

*/ public StringDt getTextElement() { if (myText == null) { myText = new StringDt(); } return myText; } /** * Gets the value(s) for text (). * creating it if it does * not exist. This method may return null. * *

* Definition: * The text of the annotation *

*/ public String getText() { return getTextElement().getValue(); } /** * Sets the value(s) for text () * *

* Definition: * The text of the annotation *

*/ public AnnotationDt setText(StringDt theValue) { myText = theValue; return this; } /** * Sets the value for text () * *

* Definition: * The text of the annotation *

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy