Data Model Libraries
    Preparing search index...

    Duration Class

    Base StructureDefinition for Duration Type: A length of time.

    FHIR Specification

    • Short: A length of time
    • Definition: A length of time.
    • Comment: The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator.
    • FHIR Version: 4.3.0

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    value?: DecimalType

    Duration.value Element

    FHIR Specification

    • Short: Numerical value (with implicit precision)
    • Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value.
    • Comment: The implicit precision in the value should always be honored. Monetary values have their own rules for handling precision (refer to standard accounting text books).
    • Requirements: Precision is handled implicitly in almost all cases of measurement.
    • FHIR Type: decimal
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    quantityComparatorEnum: QuantityComparatorEnum

    FHIR CodeSystem: QuantityComparator

    comparator?: EnumCodeType

    Duration.comparator Element

    FHIR Specification

    • Short: < | <= | >= | > - how to understand the value
    • Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues; e.g. if the comparator is "<" , then the real value is < stated value.
    • Requirements: Need a framework for handling measures where the value is <5ug/L or >400mg/L due to the limitations of measuring methodology.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: true
    • isModifierReason: This is labeled as "Is Modifier" because the comparator modifies the interpretation of the value significantly. If there is no comparator, then there is no modification of the value
    • isSummary: true

    CodeSystem Enumeration: QuantityComparatorEnum

    unit?: StringType

    Duration.unit Element

    FHIR Specification

    • Short: Unit representation
    • Definition: A human-readable form of the unit.
    • Requirements: There are many representations for units of measure and in many contexts, particular representations are fixed and required. I.e. mcg for micrograms.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    system?: UriType

    Duration.system Element

    FHIR Specification

    • Short: System that defines coded unit form
    • Definition: The identification of the system that provides the coded form of the unit.
    • Requirements: Need to know the system that defines the coded form of the unit.
    • FHIR Type: uri
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    code?: CodeType

    Duration.code Element

    FHIR Specification

    • Short: Coded form of the unit
    • Definition: A computer processable form of the unit in some unit representation system.
    • Comment: The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency. The context of use may additionally require a code from a particular system.
    • Requirements: Need a computable form of the unit that is fixed across all forms. UCUM provides this for quantities, but SNOMED CT provides many units of interest.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Methods

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

      Parameters

      • sourceJson: Value

        JSON representing FHIR Duration

      • OptionaloptSourceField: string

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

      Returns undefined | Duration

      Duration data model or undefined for Duration

      JsonError if the provided JSON is not a valid JSON object

    • 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