CreateMedicalDataSourceRequest


@ExperimentalPersonalHealthRecordApi
public final 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(
    @NonNull Uri fhirBaseUri,
    @NonNull String displayName,
    @NonNull FhirVersion fhirVersion
)

Public methods

boolean
equals(Object other)
final @NonNull String

The display name that describes the data source.

final @NonNull Uri

The FHIR base URI of the data source.

final @NonNull FhirVersion

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

int
@NonNull String

Public constructors

CreateMedicalDataSourceRequest

Added in 1.1.0-beta02
public CreateMedicalDataSourceRequest(
    @NonNull Uri fhirBaseUri,
    @NonNull String displayName,
    @NonNull FhirVersion fhirVersion
)

Public methods

equals

public boolean equals(Object other)

getDisplayName

Added in 1.1.0-beta02
public final @NonNull String getDisplayName()

The display name that describes the data source. The maximum length for the display name is 90 characters. This must be unique per app.

getFhirBaseUri

Added in 1.1.0-beta02
public final @NonNull Uri getFhirBaseUri()

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.

getFhirVersion

Added in 1.1.0-beta02
public final @NonNull FhirVersion getFhirVersion()

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.

hashCode

public int hashCode()

toString

public @NonNull String toString()