Class Period

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.ICompositeType

    public class Period
    extends Type
    implements org.hl7.fhir.instance.model.api.ICompositeType
    A time period defined by a start and end date and optionally time.
    See Also:
    Serialized Form
    • Field Detail

      • start

        protected DateTimeType start
        The start of the period. The boundary is inclusive.
      • end

        protected DateTimeType end
        The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.
    • Constructor Detail

      • Period

        public Period()
        Constructor
    • Method Detail

      • getStartElement

        public DateTimeType getStartElement()
        Returns:
        start (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
      • setStartElement

        public Period setStartElement​(DateTimeType value)
        Parameters:
        value - start (The start of the period. The boundary is inclusive.). This is the underlying object with id, value and extensions. The accessor "getStart" gives direct access to the value
      • getStart

        public Date getStart()
        Returns:
        The start of the period. The boundary is inclusive.
      • setStart

        public Period setStart​(Date value)
        Parameters:
        value - The start of the period. The boundary is inclusive.
      • getEndElement

        public DateTimeType getEndElement()
        Returns:
        end (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
      • hasEnd

        public boolean hasEnd()
      • setEndElement

        public Period setEndElement​(DateTimeType value)
        Parameters:
        value - end (The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
      • getEnd

        public Date getEnd()
        Returns:
        The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.
      • setEnd

        public Period setEnd​(Date value)
        Parameters:
        value - The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.
      • setStart

        public Period setStart​(Date theDate,
                               ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
        Sets the value for start ()

        Definition: The start of the period. The boundary is inclusive.

      • setEnd

        public Period setEnd​(Date theDate,
                             ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
        Sets the value for end ()

        Definition: The end of the period. The boundary is inclusive.

      • getProperty

        public Base[] getProperty​(int hash,
                                  String name,
                                  boolean checkValid)
                           throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        getProperty in class Element
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • addChild

        public Base addChild​(String name)
                      throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        addChild in class Element
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • fhirType

        public String fhirType()
        Specified by:
        fhirType in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        fhirType in class Element
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        isEmpty in class Element