FhirVersion
@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 |
Public constructors |
---|
FhirVersion(major: Int, minor: Int, patch: Int) |
Public functions |
|
---|---|
open operator Int |
compareTo(other: FhirVersion) |
open operator Boolean |
|
open Int |
hashCode() |
Boolean |
Returns |
open String |
toString() |
Public companion functions
parseFhirVersion
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
Public functions
isSupportedFhirVersion
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.