Data Model Libraries
    Preparing search index...

    Period Class

    Base StructureDefinition for Period Type: A time period defined by a start and end date and optionally time.

    FHIR Specification

    • Short: Time range defined by start and end date/time
    • Definition: A time period defined by a start and end date and optionally time.
    • Comment: A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. "the patient was an inpatient of the hospital for this time range") or one value from the range applies (e.g. "give to the patient between these two times"). Period is not used for a duration (a measure of elapsed time). See Duration.
    • FHIR Version: 4.0.1

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    start?: any

    Period.start Element

    FHIR Specification

    • Short: Starting time with inclusive boundary
    • Definition: The start of the period. The boundary is inclusive.
    • Comment: If the low element is missing, the meaning is that the low boundary is not known.
    • FHIR Type: dateTime
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    end?: any

    Period.end Element

    FHIR Specification

    • Short: End time with inclusive boundary, if not ongoing
    • Definition: The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. 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.
    • Comment: The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.
    • FHIR Type: dateTime
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Methods

    • Parse the provided Period JSON to instantiate the Period data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR Period

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to Period

      Returns undefined | Period

      Period data model or undefined for Period

      JsonError if the provided JSON is not a valid JSON object

    • Returns DateTimeType

      the start property value as a DateTimeType object if defined; else an empty DateTimeType object

    • Assigns the provided PrimitiveType value to the start property.

      Parameters

      Returns this

      this

    • Returns boolean

      true if the start property exists and has a value; false otherwise

    • Returns undefined | string

      the start property value as a fhirDateTime if defined; else undefined

    • Assigns the provided primitive value to the start property.

      Parameters

      • value: undefined | string

        the start value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the start property exists and has a value; false otherwise

    • Returns DateTimeType

      the end property value as a DateTimeType object if defined; else an empty DateTimeType object

    • Assigns the provided PrimitiveType value to the end property.

      Parameters

      Returns this

      this

    • Returns boolean

      true if the end property exists and has a value; false otherwise

    • Returns undefined | string

      the end property value as a fhirDateTime if defined; else undefined

    • Assigns the provided primitive value to the end property.

      Parameters

      • value: undefined | string

        the end value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the end property exists and has a value; false otherwise

    • Returns string

      the FHIR type defined in the FHIR standard

    • Returns boolean

      true if the instance is empty; false otherwise

    • Creates a copy of the current instance.

      Returns Period

      the a new instance copied from the current instance

    • Returns boolean

      true if the instance is a FHIR complex datatype; false otherwise

    • Returns string

      the complex or primitive data model type name (e.g., 'Period", 'StringType', `UriType', etc.)

    • Returns undefined | Value

      the JSON value or undefined if the instance is empty

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise

    • Returns undefined | string

      the id property value

    • Assigns the provided value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid value

    • Returns boolean

      true if id exists and has a value; false otherwise

    • Assigns the provided array of Extension values to the extension property.

      Parameters

      • extension: undefined | IExtension[]

        array of Extensions

      Returns this

      this

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Determines if the extension property exists.

      Parameters

      • url: string

        the url that identifies a specific Extension

      Returns undefined | IExtension

      an Extension having the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Returns boolean

      true if and only if the data model has required fields (min cardinality > 0) and at least one of those required fields in the instance is empty; false otherwise

    • Returns boolean

      true if the instance is a FHIR resource; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive datatype; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive boolean datatype; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive string-based datatype; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive number-based datatype; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive bigint-based datatype; false otherwise

    • Returns boolean

      true if the instance is a FHIR primitive datetime-based datatype; false otherwise

    • Protected

      Copies the current instance's elements into the provided object.

      Parameters

      • dest: Period

        the copied instance

      Returns void