Data Model Libraries
    Preparing search index...

    Ratio Class

    Ratio Type: A relationship of two Quantity values - expressed as a numerator and a denominator.

    Need to able to capture ratios for some measurements (titers) and some rates (costs).

    FHIR Specification

    • Short: A ratio of two Quantity values - a numerator and a denominator
    • Definition: A relationship of two Quantity values - expressed as a numerator and a denominator.
    • Comment: The Ratio datatype should only be used to express a relationship of two numbers if the relationship cannot be suitably expressed using a Quantity and a common unit. Where the denominator value is known to be fixed to "1", Quantity should be used instead of Ratio.
    • FHIR Version: 5.0.0

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    numerator?: Quantity

    Ratio.numerator Element

    FHIR Specification

    • Short: Numerator value
    • Definition: The value of the numerator.
    • FHIR Type: Quantity
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    denominator?: Quantity

    Ratio.denominator Element

    FHIR Specification

    • Short: Denominator value
    • Definition: The value of the denominator.
    • FHIR Type: Quantity
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Methods

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

      Parameters

      • sourceJson: Value

        JSON representing FHIR Ratio

      • OptionaloptSourceField: string

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

      Returns undefined | Ratio

      Ratio data model or undefined for Ratio

      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