CreateMedicalDataSourceRequest


@ExperimentalPersonalHealthRecordApi
class CreateMedicalDataSourceRequest


A create request for androidx.health.connect.client.HealthConnectClient.createMedicalDataSource.

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 FEATURE_PERSONAL_HEALTH_RECORD as an argument. An UnsupportedOperationException would be thrown if the feature is not available.

Summary

Public constructors

CreateMedicalDataSourceRequest(
    fhirBaseUri: Uri,
    displayName: String,
    fhirVersion: FhirVersion
)

Public functions

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

Public properties

String

The display name that describes the data source.

Uri

The FHIR base URI of the data source.

FhirVersion

The FHIR version of the medical data that will be linked to this data source.

Public constructors

CreateMedicalDataSourceRequest

Added in 1.1.0-beta02
CreateMedicalDataSourceRequest(
    fhirBaseUri: Uri,
    displayName: String,
    fhirVersion: FhirVersion
)

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 the data source. The maximum length for the display name is 90 characters. This must be unique per app.

fhirBaseUri

Added in 1.1.0-beta02
val fhirBaseUriUri

The FHIR base URI of the data source. For data coming from a FHIR server this should be the FHIR base URL (e.g. https://example.com/fhir/). If the data is generated by an app without a FHIR URL, fhirBaseUri should be a unique and understandable URI defined by the app (e.g. myapp://..) that points to the source of the data. As an example, if a client app supports an app deep linking, this deeplink could be used as fhirBaseUri. The maximum length for the URI is 2000 characters.

fhirVersion

Added in 1.1.0-beta02
val fhirVersionFhirVersion

The FHIR version of the medical data that will be linked to this data source. This has to be a version supported by Health Connect, as documented on the FhirVersion.