HealthConnectManager.ReadMedicalResources Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReadMedicalResources(ReadMedicalResourcesRequest, IExecutor, IOutcomeReceiver) |
Reads |
ReadMedicalResources(IList<MedicalResourceId>, IExecutor, IOutcomeReceiver) |
Reads |
ReadMedicalResources(ReadMedicalResourcesRequest, IExecutor, IOutcomeReceiver)
Reads MedicalResource
s based on ReadMedicalResourcesInitialRequest
or ReadMedicalResourcesPageRequest
.
[Android.Runtime.Register("readMedicalResources", "(Landroid/health/connect/ReadMedicalResourcesRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetReadMedicalResources_Landroid_health_connect_ReadMedicalResourcesRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)]
public virtual void ReadMedicalResources(Android.Health.Connect.ReadMedicalResourcesRequest request, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("readMedicalResources", "(Landroid/health/connect/ReadMedicalResourcesRequest;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetReadMedicalResources_Landroid_health_connect_ReadMedicalResourcesRequest_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)>]
abstract member ReadMedicalResources : Android.Health.Connect.ReadMedicalResourcesRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.ReadMedicalResources : Android.Health.Connect.ReadMedicalResourcesRequest * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- request
- ReadMedicalResourcesRequest
The read request ReadMedicalResourcesInitialRequest
or ReadMedicalResourcesPageRequest
.
- executor
- IExecutor
Executor on which to invoke the callback.
- callback
- IOutcomeReceiver
Callback to receive result of performing this operation.
- Attributes
Remarks
Reads MedicalResource
s based on ReadMedicalResourcesInitialRequest
or ReadMedicalResourcesPageRequest
.
Being permitted to read medical resources is dependent on the following logic, in priority order, earlier statements take precedence.
<ol> <li>A caller with the system permission can get any medical resources in the foreground or background. <li>A caller without any read or write permissions for health data will not be able to get any medical resources and receive an exception with code HealthConnectException#ERROR_SECURITY
via callback.onError()
, even for medical resources the caller has created. <li>Callers can get medical resources they have created, whether this method is called in the foreground or background. Note this only applies if the caller has at least one read or write permission for health data. <li>For any given medical resource, a caller can get that medical resource in the foreground if the caller has the corresponding read permission, or in the background if it also has android.health.connect.HealthPermissions#READ_HEALTH_DATA_IN_BACKGROUND
. <li>In all other cases the caller is not permitted to get the given medical resource and it will not be returned. </ol>
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
ReadMedicalResources(IList<MedicalResourceId>, IExecutor, IOutcomeReceiver)
Reads MedicalResource
s based on a list of MedicalResourceId
s.
[Android.Runtime.Register("readMedicalResources", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetReadMedicalResources_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)]
public virtual void ReadMedicalResources(System.Collections.Generic.IList<Android.Health.Connect.MedicalResourceId> ids, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("readMedicalResources", "(Ljava/util/List;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetReadMedicalResources_Ljava_util_List_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=36)>]
abstract member ReadMedicalResources : System.Collections.Generic.IList<Android.Health.Connect.MedicalResourceId> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.ReadMedicalResources : System.Collections.Generic.IList<Android.Health.Connect.MedicalResourceId> * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
Parameters
- ids
- IList<MedicalResourceId>
Identifiers on which to perform read operation.
- executor
- IExecutor
Executor on which to invoke the callback.
- callback
- IOutcomeReceiver
Callback to receive result of performing this operation.
- Attributes
Remarks
Reads MedicalResource
s based on a list of MedicalResourceId
s.
The number and order of medical resources returned by this API is not guaranteed. The number will depend on the factors below:
<ul> <li>If an empty list of ids
is provided, an empty list will be returned. <li>If the size of ids
is more than 5000, the API will throw an IllegalArgumentException
. <li>If any ID in ids
is invalid, the API will throw an IllegalArgumentException
. <li>If any ID in ids
does not exist, no medical resource will be returned for that ID. <li>Callers will only get medical resources they are permitted to get. See below. </ul>
Being permitted to read medical resources is dependent on the following logic, in priority order, earlier statements take precedence.
<ol> <li>A caller with the system permission can get any medical resources in the foreground or background. <li>A caller without any read or write permissions for health data will not be able to get any medical resources and receive an exception with code HealthConnectException#ERROR_SECURITY
via callback.onError()
, even for medical resources the caller has created. <li>Callers can get medical resources they have created, whether this method is called in the foreground or background. Note this only applies if the caller has at least one read or write permission for health data. <li>For any given medical resource, a caller can get that medical resource in the foreground if the caller has the corresponding read permission, or in the background if it also has android.health.connect.HealthPermissions#READ_HEALTH_DATA_IN_BACKGROUND
. <li>In all other cases the caller is not permitted to get the given medical resource and it will not be returned. </ol>
Each returned MedicalResource
has passed the Health Connect FHIR validation checks at write time, but is not guaranteed to meet all requirements of the Fast Healthcare Interoperability Resources (FHIR) spec. If required, clients should perform their own checks on the data.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.