PatientConsentEnforcementStatus method

Future<HttpBody> PatientConsentEnforcementStatus(
  1. String name, {
  2. int? P_count,
  3. String? P_pageToken,
  4. String? $fields,
})

Returns the consent enforcement status of all consent resources for a patient.

On success, the response body contains a JSON-encoded representation of a bundle of Parameters (http://hl7.org/fhir/parameters.html) FHIR resources, containing the current enforcement status for each consent resource of the patient. Does not support DSTU2.

Request parameters:

name - Required. The name of the patient to find enforcement statuses, in the format projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Patient/{patient_id} Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/datasets/\[^/\]+/fhirStores/\[^/\]+/fhir/Patient/\[^/\]+$.

P_count - Optional. The maximum number of results on a page. If not specified, 100 is used. May not be larger than 1000.

P_pageToken - Optional. Used to retrieve the first, previous, next, or last page of consent enforcement statuses when using pagination. Value should be set to the value of _page_token set in next or previous page links' URLs. Next and previous page are returned in the response bundle's links field, where link.relation is "previous" or "next". Omit _page_token if no previous request has been made.

$fields - Selector specifying which fields to include in a partial response.

Completes with a HttpBody.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<HttpBody> PatientConsentEnforcementStatus(
  core.String name, {
  core.int? P_count,
  core.String? P_pageToken,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (P_count != null) '_count': ['${P_count}'],
    if (P_pageToken != null) '_page_token': [P_pageToken],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v1/' + core.Uri.encodeFull('$name') + r'/$consent-enforcement-status';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return HttpBody.fromJson(response_ as core.Map<core.String, core.dynamic>);
}