MedicalDataSource
@ExperimentalPersonalHealthRecordApi
public final 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 |
|---|
Public methods |
|
|---|---|
boolean |
|
final @NonNull String |
The display name that describes this |
final @NonNull Uri |
The FHIR base URI of this |
final @NonNull FhirVersion |
The FHIR version of this |
final @NonNull String |
getId()The unique identifier of this |
final Instant |
An |
final @NonNull String |
The package name of the app that created this |
int |
hashCode() |
@NonNull String |
toString() |
Public constructors
Public methods
getDisplayName
public final @NonNull String getDisplayName()
The display name that describes this MedicalDataSource. This must be be unique per app.
getFhirBaseUri
public final @NonNull Uri getFhirBaseUri()
The FHIR base URI of this MedicalDataSource.
getFhirVersion
public final @NonNull FhirVersion getFhirVersion()
The FHIR version of this MedicalDataSource. All MedicalResources inserted under this MedicalDataSource must have the same FHIR version.
getId
public final @NonNull String getId()
The unique identifier of this MedicalDataSource, generated by HealthConnect at creation time.
getLastDataUpdateTime
public final Instant getLastDataUpdateTime()
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.
getPackageName
public final @NonNull String getPackageName()
The package name of the app that created this MedicalDataSource.