MedicalDataSource


@ExperimentalPersonalHealthRecordApi
class MedicalDataSource


A class to hold the data source information of medical data. Each MedicalResource is associated with a MedicalDataSource.

The medical data is represented using the Fast Healthcare Interoperability Resources (FHIR) standard.

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 constructors

MedicalDataSource(
    id: String,
    packageName: String,
    fhirBaseUri: Uri,
    displayName: String,
    fhirVersion: FhirVersion,
    lastDataUpdateTime: Instant?
)

Public functions

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

Public properties

String

The display name that describes this MedicalDataSource.

Uri

The FHIR base URI of this MedicalDataSource.

FhirVersion

The FHIR version of this MedicalDataSource.

String

The unique identifier of this MedicalDataSource, generated by HealthConnect at creation time.

Instant?

An Instant indicating a point in time when this MedicalDataSource was last used to update or insert any MedicalResource.

String

The package name of the app that created this MedicalDataSource.

Public constructors

MedicalDataSource

Added in 1.1.0-beta02
MedicalDataSource(
    id: String,
    packageName: String,
    fhirBaseUri: Uri,
    displayName: String,
    fhirVersion: FhirVersion,
    lastDataUpdateTime: Instant?
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

displayName

Added in 1.1.0-beta02
val displayNameString

The display name that describes this MedicalDataSource. This must be be unique per app.

fhirBaseUri

Added in 1.1.0-beta02
val fhirBaseUriUri

The FHIR base URI of this MedicalDataSource.

fhirVersion

Added in 1.1.0-beta02
val fhirVersionFhirVersion

The FHIR version of this MedicalDataSource. All MedicalResources inserted under this MedicalDataSource must have the same FHIR version.

id

Added in 1.1.0-beta02
val idString

The unique identifier of this MedicalDataSource, generated by HealthConnect at creation time.

lastDataUpdateTime

Added in 1.1.0-beta02
val lastDataUpdateTimeInstant?

An Instant indicating a point in time when this MedicalDataSource was last used to update or insert any MedicalResource. null if that has never happened or no data is linked to this MedicalDataSource.

packageName

Added in 1.1.0-beta02
val packageNameString

The package name of the app that created this MedicalDataSource.