ReadMedicalResourcesInitialRequest


@ExperimentalPersonalHealthRecordApi
class ReadMedicalResourcesInitialRequest : ReadMedicalResourcesRequest


A class to make initial requests when reading MedicalResources with HealthConnectClient.readMedicalResources.

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

ReadMedicalResourcesInitialRequest(
    medicalResourceType: Int,
    medicalDataSourceIds: Set<String>,
    pageSize: Int
)

Public functions

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

Public properties

Set<String>

Only MedicalResources belong to one of the MedicalDataSources represented by these IDs will be returned.

Int

Only MedicalResources with this MedicalResourceType will be returned.

Inherited properties

From androidx.health.connect.client.request.ReadMedicalResourcesRequest
Int

The maximum number of MedicalResources to be read.

Public constructors

ReadMedicalResourcesInitialRequest

Added in 1.1.0-beta02
ReadMedicalResourcesInitialRequest(
    medicalResourceType: Int,
    medicalDataSourceIds: Set<String>,
    pageSize: Int = DEFAULT_PAGE_SIZE
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

medicalDataSourceIds

Added in 1.1.0-beta02
val medicalDataSourceIdsSet<String>

Only MedicalResources belong to one of the MedicalDataSources represented by these IDs will be returned. An empty set is permitted, it means MedicalResources from all available apps will be included in the response. An IllegalArgumentException might be thrown if any ID is deemed as invalid.

medicalResourceType

Added in 1.1.0-beta02
val medicalResourceTypeInt

Only MedicalResources with this MedicalResourceType will be returned. An IllegalArgumentException might be thrown if an invalid type is used, see MedicalResourceType for valid values.