Data Model Libraries
    Preparing search index...

    Coding Class

    Base StructureDefinition for Coding Type: A reference to a code defined by a terminology system.

    References to codes are very common in healthcare models.

    FHIR Specification

    • Short: A reference to a code defined by a terminology system
    • Definition: A reference to a code defined by a terminology system.
    • Comment: Codes may be defined very casually in enumerations or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.
    • FHIR Version: 4.0.1

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    system?: any

    Coding.system Element

    FHIR Specification

    • Short: Identity of the terminology system
    • Definition: The identification of the code system that defines the meaning of the symbol in the code.
    • Comment: The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.
    • Requirements: Need to be unambiguous about the source of the definition of the symbol.
    • FHIR Type: uri
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    version?: any

    Coding.version Element

    FHIR Specification

    • Short: Version of the system - if relevant
    • Definition: The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
    • Comment: Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    code?: any

    Coding.code Element

    FHIR Specification

    • Short: Symbol in syntax defined by the system
    • Definition: A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
    • Requirements: Need to refer to a particular code in the system.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    display?: any

    Coding.display Element

    FHIR Specification

    • Short: Representation defined by the system
    • Definition: A representation of the meaning of the code in the system, following the rules of the system.
    • Requirements: Need to be able to carry a human-readable meaning of the code for readers that do not know the system.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true
    userSelected?: any

    Coding.userSelected Element

    FHIR Specification

    • Short: If this coding was chosen directly by the user
    • Definition: Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).
    • Comment: Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.
    • Requirements: This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: true

    Methods

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

      Parameters

      • sourceJson: Value

        JSON representing FHIR Coding

      • OptionaloptSourceField: string

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

      Returns undefined | Coding

      Coding data model or undefined for Coding

      JsonError if the provided JSON is not a valid JSON object

    • Returns UriType

      the system property value as a UriType object if defined; else an empty UriType object

    • Assigns the provided PrimitiveType value to the system property.

      Parameters

      • element: undefined | UriType

        the system value

      Returns this

      this

    • Returns boolean

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

    • Returns undefined | string

      the system property value as a fhirUri if defined; else undefined

    • Assigns the provided primitive value to the system property.

      Parameters

      • value: undefined | string

        the system value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

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

    • Returns StringType

      the version property value as a StringType object if defined; else an empty StringType object

    • Assigns the provided PrimitiveType value to the version property.

      Parameters

      Returns this

      this

    • Returns boolean

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

    • Returns undefined | string

      the version property value as a fhirString if defined; else undefined

    • Assigns the provided primitive value to the version property.

      Parameters

      • value: undefined | string

        the version value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

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

    • Returns CodeType

      the code property value as a CodeType object if defined; else an empty CodeType object

    • Assigns the provided PrimitiveType value to the code property.

      Parameters

      • element: undefined | CodeType

        the code value

      Returns this

      this

    • Returns boolean

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

    • Returns undefined | string

      the code property value as a fhirCode if defined; else undefined

    • Assigns the provided primitive value to the code property.

      Parameters

      • value: undefined | string

        the code value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

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

    • Returns StringType

      the display property value as a StringType object if defined; else an empty StringType object

    • Assigns the provided PrimitiveType value to the display property.

      Parameters

      Returns this

      this

    • Returns boolean

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

    • Returns undefined | string

      the display property value as a fhirString if defined; else undefined

    • Assigns the provided primitive value to the display property.

      Parameters

      • value: undefined | string

        the display value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

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

    • Returns BooleanType

      the userSelected property value as a BooleanType object if defined; else an empty BooleanType object

    • Assigns the provided PrimitiveType value to the userSelected property.

      Parameters

      • element: undefined | BooleanType

        the userSelected value

      Returns this

      this

    • Returns boolean

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

    • Returns undefined | boolean

      the userSelected property value as a fhirBoolean if defined; else undefined

    • Assigns the provided primitive value to the userSelected property.

      Parameters

      • value: undefined | boolean

        the userSelected value

      Returns this

      this

      PrimitiveTypeError for invalid primitive types

    • Returns boolean

      true if the userSelected 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 Coding

      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: Coding

        the copied instance

      Returns void