@ExperimentalPersonalHealthRecordApi
class FhirVersion : Comparable


Represents the FHIR version. This is designed according to the official FHIR versions of the Fast Healthcare Interoperability Resources (FHIR) standard. "label", which represents a 'working' version, is not supported for now.

The versions R4 (4.0.1) and R4B (4.3.0) are supported in Health Connect. Use isSupportedFhirVersion to check whether a FHIR version is supported.

This feature is dependent on the version of HealthConnect installed on the device. To check if it's available call HealthConnectFeatures.getFeatureStatus and pass HealthConnectFeatures.FEATURE_PERSONAL_HEALTH_RECORD as an argument. An UnsupportedOperationException would be thrown if the feature is not available.

Summary

Public companion functions

FhirVersion
parseFhirVersion(fhirVersionString: String)

Creates a FhirVersion object with the version of string format.

Public constructors

FhirVersion(major: Int, minor: Int, patch: Int)

Public functions

open operator Int
open operator Boolean
equals(other: Any?)
open Int
Boolean

Returns true if this FhirVersion is supported, false otherwise.

open String

Public properties

Int
Int
Int

Public companion functions

parseFhirVersion

Added in 1.1.0-beta02
fun parseFhirVersion(fhirVersionString: String): FhirVersion

Creates a FhirVersion object with the version of string format.

The format should look like "4.0.1" which contains 3 numbers - major, minor and patch, separated by ".". This aligns with the official FHIR versions. Note that the "label" is not supported for now, which represents a 'working' version.

Public constructors

FhirVersion

Added in 1.1.0-beta02
FhirVersion(major: Int, minor: Int, patch: Int)

Public functions

compareTo

Added in 1.1.0-beta02
open operator fun compareTo(other: FhirVersion): Int

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

isSupportedFhirVersion

Added in 1.1.0-beta02
fun isSupportedFhirVersion(): Boolean

Returns true if this FhirVersion is supported, false otherwise.

This method is dependent on the version of HealthConnect installed on the device. To check if it's available call HealthConnectFeatures.getFeatureStatus and pass HealthConnectFeatures.FEATURE_PERSONAL_HEALTH_RECORD as an argument.

toString

open fun toString(): String

Public properties

major

Added in 1.1.0-beta02
val majorInt

minor

Added in 1.1.0-beta02
val minorInt

patch

Added in 1.1.0-beta02
val patchInt