1 | <?php
|
---|
2 | /*
|
---|
3 | * Copyright 2014 Google Inc.
|
---|
4 | *
|
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
---|
6 | * use this file except in compliance with the License. You may obtain a copy of
|
---|
7 | * the License at
|
---|
8 | *
|
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 | *
|
---|
11 | * Unless required by applicable law or agreed to in writing, software
|
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
---|
13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
---|
14 | * License for the specific language governing permissions and limitations under
|
---|
15 | * the License.
|
---|
16 | */
|
---|
17 |
|
---|
18 | namespace Google\Service\CloudHealthcare\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudHealthcare\HealthcareEmpty;
|
---|
21 | use Google\Service\CloudHealthcare\HttpBody;
|
---|
22 | use Google\Service\CloudHealthcare\SearchResourcesRequest;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "fhir" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $healthcareService = new Google\Service\CloudHealthcare(...);
|
---|
29 | * $fhir = $healthcareService->projects_locations_datasets_fhirStores_fhir;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsDatasetsFhirStoresFhir extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates a FHIR Binary resource. This method can be used to create a Binary
|
---|
36 | * resource either by using one of the accepted FHIR JSON content types, or as a
|
---|
37 | * raw data stream. If a resource is created with this method using the FHIR
|
---|
38 | * content type this method's behavior is the same as
|
---|
39 | * [`fhir.create`](https://cloud.google.com/healthcare-api/docs/reference/rest/v
|
---|
40 | * 1/projects.locations.datasets.fhirStores.fhir/create). If a resource type
|
---|
41 | * other than Binary is used in the request it's treated in the same way as non-
|
---|
42 | * FHIR data (e.g., images, zip archives, pdf files, documents). When a non-FHIR
|
---|
43 | * content type is used in the request, a Binary resource will be generated, and
|
---|
44 | * the uploaded data will be stored in the `content` field (`DSTU2` and `STU3`),
|
---|
45 | * or the `data` field (`R4`). The Binary resource's `contentType` will be
|
---|
46 | * filled in using the value of the `Content-Type` header, and the
|
---|
47 | * `securityContext` field (not present in `DSTU2`) will be populated from the
|
---|
48 | * `X-Security-Context` header if it exists. At this time `securityContext` has
|
---|
49 | * no special behavior in the Cloud Healthcare API. Note: the limit on data
|
---|
50 | * ingested through this method is 1 GB. For best performance, use a non-FHIR
|
---|
51 | * data type instead of wrapping the data in a Binary resource. Some of the
|
---|
52 | * Healthcare API features, such as [exporting to
|
---|
53 | * BigQuery](https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-
|
---|
54 | * bigquery) or [Pub/Sub notifications](https://cloud.google.com/healthcare-
|
---|
55 | * api/docs/fhir-
|
---|
56 | * pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high) with
|
---|
57 | * full resource content, do not support Binary resources that are larger than
|
---|
58 | * 10 MB. In these cases the resource's `data` field will be omitted. Instead,
|
---|
59 | * the "http://hl7.org/fhir/StructureDefinition/data-absent-reason" extension
|
---|
60 | * will be present to indicate that including the data is `unsupported`. On
|
---|
61 | * success, an empty `201 Created` response is returned. The newly created
|
---|
62 | * resource's ID and version are returned in the Location header. Using `Prefer:
|
---|
63 | * representation=resource` is not allowed for this method. The definition of
|
---|
64 | * the Binary REST API can be found at https://hl7.org/fhir/binary.html#rest.
|
---|
65 | * (fhir.BinaryCreate)
|
---|
66 | *
|
---|
67 | * @param string $parent Required. The name of the FHIR store this resource
|
---|
68 | * belongs to.
|
---|
69 | * @param HttpBody $postBody
|
---|
70 | * @param array $optParams Optional parameters.
|
---|
71 | * @return HttpBody
|
---|
72 | * @throws \Google\Service\Exception
|
---|
73 | */
|
---|
74 | public function BinaryCreate($parent, HttpBody $postBody, $optParams = [])
|
---|
75 | {
|
---|
76 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
77 | $params = array_merge($params, $optParams);
|
---|
78 | return $this->call('Binary-create', [$params], HttpBody::class);
|
---|
79 | }
|
---|
80 | /**
|
---|
81 | * Gets the contents of a FHIR Binary resource. This method can be used to
|
---|
82 | * retrieve a Binary resource either by using the FHIR JSON mimetype as the
|
---|
83 | * value for the Accept header, or as a raw data stream. If the FHIR Accept type
|
---|
84 | * is used this method will return a Binary resource with the data
|
---|
85 | * base64-encoded, regardless of how the resource was created. The resource data
|
---|
86 | * can be retrieved in base64-decoded form if the Accept type of the request
|
---|
87 | * matches the value of the resource's `contentType` field. The definition of
|
---|
88 | * the Binary REST API can be found at https://hl7.org/fhir/binary.html#rest.
|
---|
89 | * (fhir.BinaryRead)
|
---|
90 | *
|
---|
91 | * @param string $name Required. The name of the Binary resource to retrieve.
|
---|
92 | * @param array $optParams Optional parameters.
|
---|
93 | * @return HttpBody
|
---|
94 | * @throws \Google\Service\Exception
|
---|
95 | */
|
---|
96 | public function BinaryRead($name, $optParams = [])
|
---|
97 | {
|
---|
98 | $params = ['name' => $name];
|
---|
99 | $params = array_merge($params, $optParams);
|
---|
100 | return $this->call('Binary-read', [$params], HttpBody::class);
|
---|
101 | }
|
---|
102 | /**
|
---|
103 | * Updates the entire contents of a Binary resource. If the specified resource
|
---|
104 | * does not exist and the FHIR store has enable_update_create set, creates the
|
---|
105 | * resource with the client-specified ID. It is strongly advised not to include
|
---|
106 | * or encode any sensitive data such as patient identifiers in client-specified
|
---|
107 | * resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud
|
---|
108 | * Audit Logs and Pub/Sub notifications. Those IDs can also be contained in
|
---|
109 | * reference fields within other resources. This method can be used to update a
|
---|
110 | * Binary resource either by using one of the accepted FHIR JSON content types,
|
---|
111 | * or as a raw data stream. If a resource is updated with this method using the
|
---|
112 | * FHIR content type this method's behavior is the same as `update`. If a
|
---|
113 | * resource type other than Binary is used in the request it will be treated in
|
---|
114 | * the same way as non-FHIR data. When a non-FHIR content type is used in the
|
---|
115 | * request, a Binary resource will be generated using the ID from the resource
|
---|
116 | * path, and the uploaded data will be stored in the `content` field (`DSTU2`
|
---|
117 | * and `STU3`), or the `data` field (`R4`). The Binary resource's `contentType`
|
---|
118 | * will be filled in using the value of the `Content-Type` header, and the
|
---|
119 | * `securityContext` field (not present in `DSTU2`) will be populated from the
|
---|
120 | * `X-Security-Context` header if it exists. At this time `securityContext` has
|
---|
121 | * no special behavior in the Cloud Healthcare API. Note: the limit on data
|
---|
122 | * ingested through this method is 2 GB. For best performance, use a non-FHIR
|
---|
123 | * data type instead of wrapping the data in a Binary resource. Some of the
|
---|
124 | * Healthcare API features, such as [exporting to
|
---|
125 | * BigQuery](https://cloud.google.com/healthcare-api/docs/how-tos/fhir-export-
|
---|
126 | * bigquery) or [Pub/Sub notifications](https://cloud.google.com/healthcare-
|
---|
127 | * api/docs/fhir-
|
---|
128 | * pubsub#behavior_when_a_fhir_resource_is_too_large_or_traffic_is_high) with
|
---|
129 | * full resource content, do not support Binary resources that are larger than
|
---|
130 | * 10 MB. In these cases the resource's `data` field will be omitted. Instead,
|
---|
131 | * the "http://hl7.org/fhir/StructureDefinition/data-absent-reason" extension
|
---|
132 | * will be present to indicate that including the data is `unsupported`. On
|
---|
133 | * success, an empty 200 OK response will be returned, or a 201 Created if the
|
---|
134 | * resource did not exit. The resource's ID and version are returned in the
|
---|
135 | * Location header. Using `Prefer: representation=resource` is not allowed for
|
---|
136 | * this method. The definition of the Binary REST API can be found at
|
---|
137 | * https://hl7.org/fhir/binary.html#rest. (fhir.BinaryUpdate)
|
---|
138 | *
|
---|
139 | * @param string $name Required. The name of the resource to update.
|
---|
140 | * @param HttpBody $postBody
|
---|
141 | * @param array $optParams Optional parameters.
|
---|
142 | * @return HttpBody
|
---|
143 | * @throws \Google\Service\Exception
|
---|
144 | */
|
---|
145 | public function BinaryUpdate($name, HttpBody $postBody, $optParams = [])
|
---|
146 | {
|
---|
147 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
148 | $params = array_merge($params, $optParams);
|
---|
149 | return $this->call('Binary-update', [$params], HttpBody::class);
|
---|
150 | }
|
---|
151 | /**
|
---|
152 | * Gets the contents of a version (current or historical) of a FHIR Binary
|
---|
153 | * resource by version ID. This method can be used to retrieve a Binary resource
|
---|
154 | * version either by using the FHIR JSON mimetype as the value for the Accept
|
---|
155 | * header, or as a raw data stream. If the FHIR Accept type is used this method
|
---|
156 | * will return a Binary resource with the data base64-encoded, regardless of how
|
---|
157 | * the resource version was created. The resource data can be retrieved in
|
---|
158 | * base64-decoded form if the Accept type of the request matches the value of
|
---|
159 | * the resource version's `contentType` field. The definition of the Binary REST
|
---|
160 | * API can be found at https://hl7.org/fhir/binary.html#rest. (fhir.BinaryVread)
|
---|
161 | *
|
---|
162 | * @param string $name Required. The name of the Binary resource version to
|
---|
163 | * retrieve.
|
---|
164 | * @param array $optParams Optional parameters.
|
---|
165 | * @return HttpBody
|
---|
166 | * @throws \Google\Service\Exception
|
---|
167 | */
|
---|
168 | public function BinaryVread($name, $optParams = [])
|
---|
169 | {
|
---|
170 | $params = ['name' => $name];
|
---|
171 | $params = array_merge($params, $optParams);
|
---|
172 | return $this->call('Binary-vread', [$params], HttpBody::class);
|
---|
173 | }
|
---|
174 | /**
|
---|
175 | * Retrieves a Patient resource and resources related to that patient.
|
---|
176 | * Implements the FHIR extended operation Patient-everything
|
---|
177 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/patient-
|
---|
178 | * operations.html#everything),
|
---|
179 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/patient-
|
---|
180 | * operations.html#everything),
|
---|
181 | * [R4](http://hl7.org/implement/standards/fhir/R4/patient-
|
---|
182 | * operations.html#everything)). On success, the response body contains a JSON-
|
---|
183 | * encoded representation of a `Bundle` resource of type `searchset`, containing
|
---|
184 | * the results of the operation. Errors generated by the FHIR store contain a
|
---|
185 | * JSON-encoded `OperationOutcome` resource describing the reason for the error.
|
---|
186 | * If the request cannot be mapped to a valid API method on a FHIR store, a
|
---|
187 | * generic GCP error might be returned instead. The resources in scope for the
|
---|
188 | * response are: * The patient resource itself. * All the resources directly
|
---|
189 | * referenced by the patient resource. * Resources directly referencing the
|
---|
190 | * patient resource that meet the inclusion criteria. The inclusion criteria are
|
---|
191 | * based on the membership rules in the patient compartment definition
|
---|
192 | * ([DSTU2](http://hl7.org/fhir/DSTU2/compartment-patient.html),
|
---|
193 | * [STU3](http://www.hl7.org/fhir/stu3/compartmentdefinition-patient.html),
|
---|
194 | * [R4](http://hl7.org/fhir/R4/compartmentdefinition-patient.html)), which
|
---|
195 | * details the eligible resource types and referencing search parameters. For
|
---|
196 | * samples that show how to call `Patient-everything`, see [Getting all patient
|
---|
197 | * compartment resources](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
198 | * resources#getting_all_patient_compartment_resources).
|
---|
199 | * (fhir.PatientEverything)
|
---|
200 | *
|
---|
201 | * @param string $name Required. Name of the `Patient` resource for which the
|
---|
202 | * information is required.
|
---|
203 | * @param array $optParams Optional parameters.
|
---|
204 | *
|
---|
205 | * @opt_param int _count Optional. Maximum number of resources in a page. If not
|
---|
206 | * specified, 100 is used. May not be larger than 1000.
|
---|
207 | * @opt_param string _page_token Used to retrieve the next or previous page of
|
---|
208 | * results when using pagination. Set `_page_token` to the value of _page_token
|
---|
209 | * set in next or previous page links' url. Next and previous page are returned
|
---|
210 | * in the response bundle's links field, where `link.relation` is "previous" or
|
---|
211 | * "next". Omit `_page_token` if no previous request has been made.
|
---|
212 | * @opt_param string _since Optional. If provided, only resources updated after
|
---|
213 | * this time are returned. The time uses the format YYYY-MM-
|
---|
214 | * DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` or
|
---|
215 | * `2017-01-01T00:00:00Z`. The time must be specified to the second and include
|
---|
216 | * a time zone.
|
---|
217 | * @opt_param string _type Optional. String of comma-delimited FHIR resource
|
---|
218 | * types. If provided, only resources of the specified resource type(s) are
|
---|
219 | * returned. Specifying multiple `_type` parameters isn't supported. For
|
---|
220 | * example, the result of `_type=Observation&_type=Encounter` is undefined. Use
|
---|
221 | * `_type=Observation,Encounter` instead.
|
---|
222 | * @opt_param string end Optional. The response includes records prior to the
|
---|
223 | * end date. The date uses the format YYYY-MM-DD. If no end date is provided,
|
---|
224 | * all records subsequent to the start date are in scope.
|
---|
225 | * @opt_param string start Optional. The response includes records subsequent to
|
---|
226 | * the start date. The date uses the format YYYY-MM-DD. If no start date is
|
---|
227 | * provided, all records prior to the end date are in scope.
|
---|
228 | * @return HttpBody
|
---|
229 | * @throws \Google\Service\Exception
|
---|
230 | */
|
---|
231 | public function PatientEverything($name, $optParams = [])
|
---|
232 | {
|
---|
233 | $params = ['name' => $name];
|
---|
234 | $params = array_merge($params, $optParams);
|
---|
235 | return $this->call('Patient-everything', [$params], HttpBody::class);
|
---|
236 | }
|
---|
237 | /**
|
---|
238 | * Deletes all the historical versions of a resource (excluding the current
|
---|
239 | * version) from the FHIR store. To remove all versions of a resource, first
|
---|
240 | * delete the current version and then call this method. This is not a FHIR
|
---|
241 | * standard operation. For samples that show how to call `Resource-purge`, see
|
---|
242 | * [Deleting historical versions of a FHIR
|
---|
243 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
244 | * resources#deleting_historical_versions_of_a_fhir_resource).
|
---|
245 | * (fhir.ResourcePurge)
|
---|
246 | *
|
---|
247 | * @param string $name Required. The name of the resource to purge.
|
---|
248 | * @param array $optParams Optional parameters.
|
---|
249 | * @return HealthcareEmpty
|
---|
250 | * @throws \Google\Service\Exception
|
---|
251 | */
|
---|
252 | public function ResourcePurge($name, $optParams = [])
|
---|
253 | {
|
---|
254 | $params = ['name' => $name];
|
---|
255 | $params = array_merge($params, $optParams);
|
---|
256 | return $this->call('Resource-purge', [$params], HealthcareEmpty::class);
|
---|
257 | }
|
---|
258 | /**
|
---|
259 | * Validates an input FHIR resource's conformance to its profiles and the
|
---|
260 | * profiles configured on the FHIR store. Implements the FHIR extended operation
|
---|
261 | * $validate ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resource-
|
---|
262 | * operations.html#validate),
|
---|
263 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/resource-
|
---|
264 | * operations.html#validate), or
|
---|
265 | * [R4](http://hl7.org/implement/standards/fhir/R4/resource-operation-
|
---|
266 | * validate.html)). The request body must contain a JSON-encoded FHIR resource,
|
---|
267 | * and the request headers must contain `Content-Type: application/fhir+json`.
|
---|
268 | * The `Parameters` input syntax is not supported. The `profile` query parameter
|
---|
269 | * can be used to request that the resource only be validated against a specific
|
---|
270 | * profile. If a profile with the given URL cannot be found in the FHIR store
|
---|
271 | * then an error is returned. Errors generated by validation contain a JSON-
|
---|
272 | * encoded `OperationOutcome` resource describing the reason for the error. If
|
---|
273 | * the request cannot be mapped to a valid API method on a FHIR store, a generic
|
---|
274 | * GCP error might be returned instead. (fhir.ResourceValidate)
|
---|
275 | *
|
---|
276 | * @param string $parent Required. The name of the FHIR store that holds the
|
---|
277 | * profiles being used for validation.
|
---|
278 | * @param string $type Required. The FHIR resource type of the resource being
|
---|
279 | * validated. For a complete list, see the FHIR Resource Index
|
---|
280 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
281 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html), or
|
---|
282 | * [R4](http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). Must
|
---|
283 | * match the resource type in the provided content.
|
---|
284 | * @param HttpBody $postBody
|
---|
285 | * @param array $optParams Optional parameters.
|
---|
286 | *
|
---|
287 | * @opt_param string profile Required. The canonical URL of a profile that this
|
---|
288 | * resource should be validated against. For example, to validate a Patient
|
---|
289 | * resource against the US Core Patient profile this parameter would be
|
---|
290 | * `http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient`. A
|
---|
291 | * StructureDefinition with this canonical URL must exist in the FHIR store.
|
---|
292 | * @return HttpBody
|
---|
293 | * @throws \Google\Service\Exception
|
---|
294 | */
|
---|
295 | public function ResourceValidate($parent, $type, HttpBody $postBody, $optParams = [])
|
---|
296 | {
|
---|
297 | $params = ['parent' => $parent, 'type' => $type, 'postBody' => $postBody];
|
---|
298 | $params = array_merge($params, $optParams);
|
---|
299 | return $this->call('Resource-validate', [$params], HttpBody::class);
|
---|
300 | }
|
---|
301 | /**
|
---|
302 | * Gets the FHIR capability statement ([STU3](http://hl7.org/implement/standards
|
---|
303 | * /fhir/STU3/capabilitystatement.html),
|
---|
304 | * [R4](http://hl7.org/implement/standards/fhir/R4/capabilitystatement.html)),
|
---|
305 | * or the [conformance
|
---|
306 | * statement](http://hl7.org/implement/standards/fhir/DSTU2/conformance.html) in
|
---|
307 | * the DSTU2 case for the store, which contains a description of functionality
|
---|
308 | * supported by the server. Implements the FHIR standard capabilities
|
---|
309 | * interaction
|
---|
310 | * ([STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#capabilities),
|
---|
311 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#capabilities)), or
|
---|
312 | * the [conformance interaction](http://hl7.org/implement/standards/fhir/DSTU2/h
|
---|
313 | * ttp.html#conformance) in the DSTU2 case. On success, the response body
|
---|
314 | * contains a JSON-encoded representation of a `CapabilityStatement` resource.
|
---|
315 | * (fhir.capabilities)
|
---|
316 | *
|
---|
317 | * @param string $name Required. Name of the FHIR store to retrieve the
|
---|
318 | * capabilities for.
|
---|
319 | * @param array $optParams Optional parameters.
|
---|
320 | * @return HttpBody
|
---|
321 | * @throws \Google\Service\Exception
|
---|
322 | */
|
---|
323 | public function capabilities($name, $optParams = [])
|
---|
324 | {
|
---|
325 | $params = ['name' => $name];
|
---|
326 | $params = array_merge($params, $optParams);
|
---|
327 | return $this->call('capabilities', [$params], HttpBody::class);
|
---|
328 | }
|
---|
329 | /**
|
---|
330 | * Deletes a FHIR resource that match an identifier search query. Implements the
|
---|
331 | * FHIR standard conditional delete interaction, limited to searching by
|
---|
332 | * resource identifier. If multiple resources match, 412 Precondition Failed
|
---|
333 | * error will be returned. Search term for identifier should be in the pattern
|
---|
334 | * `identifier=system|value` or `identifier=value` - similar to the `search`
|
---|
335 | * method on resources with a specific identifier. Note: Unless resource
|
---|
336 | * versioning is disabled by setting the disable_resource_versioning flag on the
|
---|
337 | * FHIR store, the deleted resource is moved to a history repository that can
|
---|
338 | * still be retrieved through vread and related methods, unless they are removed
|
---|
339 | * by the purge method. For samples that show how to call `conditionalDelete`,
|
---|
340 | * see [Conditionally deleting a FHIR
|
---|
341 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
342 | * resources#conditionally_deleting_a_fhir_resource). (fhir.conditionalDelete)
|
---|
343 | *
|
---|
344 | * @param string $parent Required. The name of the FHIR store this resource
|
---|
345 | * belongs to.
|
---|
346 | * @param string $type Required. The FHIR resource type to delete, such as
|
---|
347 | * Patient or Observation. For a complete list, see the FHIR Resource Index
|
---|
348 | * ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
349 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/resourcelist.html),
|
---|
350 | * [R4](https://hl7.org/implement/standards/fhir/R4/resourcelist.html)).
|
---|
351 | * @param array $optParams Optional parameters.
|
---|
352 | * @return HealthcareEmpty
|
---|
353 | * @throws \Google\Service\Exception
|
---|
354 | */
|
---|
355 | public function conditionalDelete($parent, $type, $optParams = [])
|
---|
356 | {
|
---|
357 | $params = ['parent' => $parent, 'type' => $type];
|
---|
358 | $params = array_merge($params, $optParams);
|
---|
359 | return $this->call('conditionalDelete', [$params], HealthcareEmpty::class);
|
---|
360 | }
|
---|
361 | /**
|
---|
362 | * If a resource is found with the identifier specified in the query parameters,
|
---|
363 | * updates part of that resource by applying the operations specified in a [JSON
|
---|
364 | * Patch](http://jsonpatch.com/) document. Implements the FHIR standard
|
---|
365 | * conditional patch interaction, limited to searching by resource identifier.
|
---|
366 | * DSTU2 doesn't define a conditional patch method, but the server supports it
|
---|
367 | * in the same way it supports STU3. Search term for identifier should be in the
|
---|
368 | * pattern `identifier=system|value` or `identifier=value` - similar to the
|
---|
369 | * `search` method on resources with a specific identifier. If the search
|
---|
370 | * criteria identify more than one match, the request returns a `412
|
---|
371 | * Precondition Failed` error. The request body must contain a JSON Patch
|
---|
372 | * document, and the request headers must contain `Content-Type:
|
---|
373 | * application/json-patch+json`. On success, the response body contains a JSON-
|
---|
374 | * encoded representation of the updated resource, including the server-assigned
|
---|
375 | * version ID. Errors generated by the FHIR store contain a JSON-encoded
|
---|
376 | * `OperationOutcome` resource describing the reason for the error. If the
|
---|
377 | * request cannot be mapped to a valid API method on a FHIR store, a generic GCP
|
---|
378 | * error might be returned instead. For samples that show how to call
|
---|
379 | * `conditionalPatch`, see [Conditionally patching a FHIR
|
---|
380 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
381 | * resources#conditionally_patching_a_fhir_resource). (fhir.conditionalPatch)
|
---|
382 | *
|
---|
383 | * @param string $parent Required. The name of the FHIR store this resource
|
---|
384 | * belongs to.
|
---|
385 | * @param string $type Required. The FHIR resource type to update, such as
|
---|
386 | * Patient or Observation. For a complete list, see the FHIR Resource Index
|
---|
387 | * ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
388 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/resourcelist.html),
|
---|
389 | * [R4](https://hl7.org/implement/standards/fhir/R4/resourcelist.html)).
|
---|
390 | * @param HttpBody $postBody
|
---|
391 | * @param array $optParams Optional parameters.
|
---|
392 | * @return HttpBody
|
---|
393 | * @throws \Google\Service\Exception
|
---|
394 | */
|
---|
395 | public function conditionalPatch($parent, $type, HttpBody $postBody, $optParams = [])
|
---|
396 | {
|
---|
397 | $params = ['parent' => $parent, 'type' => $type, 'postBody' => $postBody];
|
---|
398 | $params = array_merge($params, $optParams);
|
---|
399 | return $this->call('conditionalPatch', [$params], HttpBody::class);
|
---|
400 | }
|
---|
401 | /**
|
---|
402 | * If a resource is found with the identifier specified in the query parameters,
|
---|
403 | * updates the entire contents of that resource. Implements the FHIR standard
|
---|
404 | * conditional update interaction, limited to searching by resource identifier.
|
---|
405 | * Search term for identifier should be in the pattern `identifier=system|value`
|
---|
406 | * or `identifier=value` - similar to the `search` method on resources with a
|
---|
407 | * specific identifier. If the search criteria identify more than one match, the
|
---|
408 | * request returns a `412 Precondition Failed` error. If the search criteria
|
---|
409 | * identify zero matches, and the supplied resource body contains an `id`, and
|
---|
410 | * the FHIR store has enable_update_create set, creates the resource with the
|
---|
411 | * client-specified ID. It is strongly advised not to include or encode any
|
---|
412 | * sensitive data such as patient identifiers in client-specified resource IDs.
|
---|
413 | * Those IDs are part of the FHIR resource path recorded in Cloud Audit Logs and
|
---|
414 | * Pub/Sub notifications. Those IDs can also be contained in reference fields
|
---|
415 | * within other resources. If the search criteria identify zero matches, and the
|
---|
416 | * supplied resource body does not contain an `id`, the resource is created with
|
---|
417 | * a server-assigned ID as per the create method. The request body must contain
|
---|
418 | * a JSON-encoded FHIR resource, and the request headers must contain `Content-
|
---|
419 | * Type: application/fhir+json`. On success, the response body contains a JSON-
|
---|
420 | * encoded representation of the updated resource, including the server-assigned
|
---|
421 | * version ID. Errors generated by the FHIR store contain a JSON-encoded
|
---|
422 | * `OperationOutcome` resource describing the reason for the error. If the
|
---|
423 | * request cannot be mapped to a valid API method on a FHIR store, a generic GCP
|
---|
424 | * error might be returned instead. For samples that show how to call
|
---|
425 | * `conditionalUpdate`, see [Conditionally updating a FHIR
|
---|
426 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
427 | * resources#conditionally_updating_a_fhir_resource). (fhir.conditionalUpdate)
|
---|
428 | *
|
---|
429 | * @param string $parent Required. The name of the FHIR store this resource
|
---|
430 | * belongs to.
|
---|
431 | * @param string $type Required. The FHIR resource type to update, such as
|
---|
432 | * Patient or Observation. For a complete list, see the FHIR Resource Index
|
---|
433 | * ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
434 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/resourcelist.html),
|
---|
435 | * [R4](https://hl7.org/implement/standards/fhir/R4/resourcelist.html)). Must
|
---|
436 | * match the resource type in the provided content.
|
---|
437 | * @param HttpBody $postBody
|
---|
438 | * @param array $optParams Optional parameters.
|
---|
439 | * @return HttpBody
|
---|
440 | * @throws \Google\Service\Exception
|
---|
441 | */
|
---|
442 | public function conditionalUpdate($parent, $type, HttpBody $postBody, $optParams = [])
|
---|
443 | {
|
---|
444 | $params = ['parent' => $parent, 'type' => $type, 'postBody' => $postBody];
|
---|
445 | $params = array_merge($params, $optParams);
|
---|
446 | return $this->call('conditionalUpdate', [$params], HttpBody::class);
|
---|
447 | }
|
---|
448 | /**
|
---|
449 | * Creates a FHIR resource. Implements the FHIR standard create interaction
|
---|
450 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#create),
|
---|
451 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#create),
|
---|
452 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#create)), which
|
---|
453 | * creates a new resource with a server-assigned resource ID. Also supports the
|
---|
454 | * FHIR standard conditional create interaction
|
---|
455 | * ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU2/http.html#ccreate),
|
---|
456 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#ccreate),
|
---|
457 | * [R4](https://hl7.org/implement/standards/fhir/R4/http.html#ccreate)),
|
---|
458 | * specified by supplying an `If-None-Exist` header containing a FHIR search
|
---|
459 | * query, limited to searching by resource identifier. If no resources match
|
---|
460 | * this search query, the server processes the create operation as normal. When
|
---|
461 | * using conditional create, the search term for identifier should be in the
|
---|
462 | * pattern `identifier=system|value` or `identifier=value` - similar to the
|
---|
463 | * `search` method on resources with a specific identifier. The request body
|
---|
464 | * must contain a JSON-encoded FHIR resource, and the request headers must
|
---|
465 | * contain `Content-Type: application/fhir+json`. On success, the response body
|
---|
466 | * contains a JSON-encoded representation of the resource as it was created on
|
---|
467 | * the server, including the server-assigned resource ID and version ID. Errors
|
---|
468 | * generated by the FHIR store contain a JSON-encoded `OperationOutcome`
|
---|
469 | * resource describing the reason for the error. If the request cannot be mapped
|
---|
470 | * to a valid API method on a FHIR store, a generic GCP error might be returned
|
---|
471 | * instead. For samples that show how to call `create`, see [Creating a FHIR
|
---|
472 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
473 | * resources#creating_a_fhir_resource). (fhir.create)
|
---|
474 | *
|
---|
475 | * @param string $parent Required. The name of the FHIR store this resource
|
---|
476 | * belongs to.
|
---|
477 | * @param string $type Required. The FHIR resource type to create, such as
|
---|
478 | * Patient or Observation. For a complete list, see the FHIR Resource Index
|
---|
479 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
480 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html),
|
---|
481 | * [R4](http://hl7.org/implement/standards/fhir/R4/resourcelist.html)). Must
|
---|
482 | * match the resource type in the provided content.
|
---|
483 | * @param HttpBody $postBody
|
---|
484 | * @param array $optParams Optional parameters.
|
---|
485 | * @return HttpBody
|
---|
486 | * @throws \Google\Service\Exception
|
---|
487 | */
|
---|
488 | public function create($parent, $type, HttpBody $postBody, $optParams = [])
|
---|
489 | {
|
---|
490 | $params = ['parent' => $parent, 'type' => $type, 'postBody' => $postBody];
|
---|
491 | $params = array_merge($params, $optParams);
|
---|
492 | return $this->call('create', [$params], HttpBody::class);
|
---|
493 | }
|
---|
494 | /**
|
---|
495 | * Deletes a FHIR resource. Implements the FHIR standard delete interaction
|
---|
496 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#delete),
|
---|
497 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#delete),
|
---|
498 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#delete)). Note:
|
---|
499 | * Unless resource versioning is disabled by setting the
|
---|
500 | * disable_resource_versioning flag on the FHIR store, the deleted resources
|
---|
501 | * will be moved to a history repository that can still be retrieved through
|
---|
502 | * vread and related methods, unless they are removed by the purge method. For
|
---|
503 | * samples that show how to call `delete`, see [Deleting a FHIR
|
---|
504 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
505 | * resources#deleting_a_fhir_resource). (fhir.delete)
|
---|
506 | *
|
---|
507 | * @param string $name Required. The name of the resource to delete.
|
---|
508 | * @param array $optParams Optional parameters.
|
---|
509 | * @return HttpBody
|
---|
510 | * @throws \Google\Service\Exception
|
---|
511 | */
|
---|
512 | public function delete($name, $optParams = [])
|
---|
513 | {
|
---|
514 | $params = ['name' => $name];
|
---|
515 | $params = array_merge($params, $optParams);
|
---|
516 | return $this->call('delete', [$params], HttpBody::class);
|
---|
517 | }
|
---|
518 | /**
|
---|
519 | * Executes all the requests in the given Bundle. Implements the FHIR standard
|
---|
520 | * batch/transaction interaction ([DSTU2](https://hl7.org/implement/standards/fh
|
---|
521 | * ir/DSTU2/http.html#transaction),
|
---|
522 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#transaction),
|
---|
523 | * [R4](https://hl7.org/implement/standards/fhir/R4/http.html#transaction)).
|
---|
524 | * Supports all interactions within a bundle, except search. This method accepts
|
---|
525 | * Bundles of type `batch` and `transaction`, processing them according to the
|
---|
526 | * batch processing rules ([DSTU2](https://hl7.org/implement/standards/fhir/DSTU
|
---|
527 | * 2/http.html#2.1.0.16.1),
|
---|
528 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.1),
|
---|
529 | * [R4](https://hl7.org/implement/standards/fhir/R4/http.html#brules)) and
|
---|
530 | * transaction processing rules ([DSTU2](https://hl7.org/implement/standards/fhi
|
---|
531 | * r/DSTU2/http.html#2.1.0.16.2),
|
---|
532 | * [STU3](https://hl7.org/implement/standards/fhir/STU3/http.html#2.21.0.17.2),
|
---|
533 | * [R4](https://hl7.org/implement/standards/fhir/R4/http.html#trules)). The
|
---|
534 | * request body must contain a JSON-encoded FHIR `Bundle` resource, and the
|
---|
535 | * request headers must contain `Content-Type: application/fhir+json`. For a
|
---|
536 | * batch bundle or a successful transaction, the response body contains a JSON-
|
---|
537 | * encoded representation of a `Bundle` resource of type `batch-response` or
|
---|
538 | * `transaction-response` containing one entry for each entry in the request,
|
---|
539 | * with the outcome of processing the entry. In the case of an error for a
|
---|
540 | * transaction bundle, the response body contains a JSON-encoded
|
---|
541 | * `OperationOutcome` resource describing the reason for the error. If the
|
---|
542 | * request cannot be mapped to a valid API method on a FHIR store, a generic GCP
|
---|
543 | * error might be returned instead. This method checks permissions for each
|
---|
544 | * request in the bundle. The `executeBundle` permission is required to call
|
---|
545 | * this method, but you must also grant sufficient permissions to execute the
|
---|
546 | * individual requests in the bundle. For example, if the bundle contains a
|
---|
547 | * request to create a FHIR resource, the caller must also have been granted the
|
---|
548 | * `healthcare.fhirResources.create` permission. You can use audit logs to view
|
---|
549 | * the permissions for `executeBundle` and each request in the bundle. For more
|
---|
550 | * information, see [Viewing Cloud Audit
|
---|
551 | * logs](https://cloud.google.com/healthcare-api/docs/how-tos/audit-logging).
|
---|
552 | * For samples that show how to call `executeBundle`, see [Managing FHIR
|
---|
553 | * resources using FHIR bundles](https://cloud.google.com/healthcare/docs/how-
|
---|
554 | * tos/fhir-bundles). (fhir.executeBundle)
|
---|
555 | *
|
---|
556 | * @param string $parent Required. Name of the FHIR store in which this bundle
|
---|
557 | * will be executed.
|
---|
558 | * @param HttpBody $postBody
|
---|
559 | * @param array $optParams Optional parameters.
|
---|
560 | * @return HttpBody
|
---|
561 | * @throws \Google\Service\Exception
|
---|
562 | */
|
---|
563 | public function executeBundle($parent, HttpBody $postBody, $optParams = [])
|
---|
564 | {
|
---|
565 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
566 | $params = array_merge($params, $optParams);
|
---|
567 | return $this->call('executeBundle', [$params], HttpBody::class);
|
---|
568 | }
|
---|
569 | /**
|
---|
570 | * Lists all the versions of a resource (including the current version and
|
---|
571 | * deleted versions) from the FHIR store. Implements the per-resource form of
|
---|
572 | * the FHIR standard history interaction
|
---|
573 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#history),
|
---|
574 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#history),
|
---|
575 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#history)). On
|
---|
576 | * success, the response body contains a JSON-encoded representation of a
|
---|
577 | * `Bundle` resource of type `history`, containing the version history sorted
|
---|
578 | * from most recent to oldest versions. Errors generated by the FHIR store
|
---|
579 | * contain a JSON-encoded `OperationOutcome` resource describing the reason for
|
---|
580 | * the error. If the request cannot be mapped to a valid API method on a FHIR
|
---|
581 | * store, a generic GCP error might be returned instead. For samples that show
|
---|
582 | * how to call `history`, see [Listing FHIR resource
|
---|
583 | * versions](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
584 | * resources#listing_fhir_resource_versions). (fhir.history)
|
---|
585 | *
|
---|
586 | * @param string $name Required. The name of the resource to retrieve.
|
---|
587 | * @param array $optParams Optional parameters.
|
---|
588 | *
|
---|
589 | * @opt_param string _at Only include resource versions that were current at
|
---|
590 | * some point during the time period specified in the date time value. The date
|
---|
591 | * parameter format is yyyy-mm-ddThh:mm:ss[Z|(+|-)hh:mm] Clients may specify any
|
---|
592 | * of the following: * An entire year: `_at=2019` * An entire month:
|
---|
593 | * `_at=2019-01` * A specific day: `_at=2019-01-20` * A specific second:
|
---|
594 | * `_at=2018-12-31T23:59:58Z`
|
---|
595 | * @opt_param int _count The maximum number of search results on a page. If not
|
---|
596 | * specified, 100 is used. May not be larger than 1000.
|
---|
597 | * @opt_param string _page_token Used to retrieve the first, previous, next, or
|
---|
598 | * last page of resource versions when using pagination. Value should be set to
|
---|
599 | * the value of `_page_token` set in next or previous page links' URLs. Next and
|
---|
600 | * previous page are returned in the response bundle's links field, where
|
---|
601 | * `link.relation` is "previous" or "next". Omit `_page_token` if no previous
|
---|
602 | * request has been made.
|
---|
603 | * @opt_param string _since Only include resource versions that were created at
|
---|
604 | * or after the given instant in time. The instant in time uses the format YYYY-
|
---|
605 | * MM-DDThh:mm:ss.sss+zz:zz (for example 2015-02-07T13:28:17.239+02:00 or
|
---|
606 | * 2017-01-01T00:00:00Z). The time must be specified to the second and include a
|
---|
607 | * time zone.
|
---|
608 | * @return HttpBody
|
---|
609 | * @throws \Google\Service\Exception
|
---|
610 | */
|
---|
611 | public function history($name, $optParams = [])
|
---|
612 | {
|
---|
613 | $params = ['name' => $name];
|
---|
614 | $params = array_merge($params, $optParams);
|
---|
615 | return $this->call('history', [$params], HttpBody::class);
|
---|
616 | }
|
---|
617 | /**
|
---|
618 | * Updates part of an existing resource by applying the operations specified in
|
---|
619 | * a [JSON Patch](http://jsonpatch.com/) document. Implements the FHIR standard
|
---|
620 | * patch interaction
|
---|
621 | * ([STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#patch),
|
---|
622 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#patch)). DSTU2
|
---|
623 | * doesn't define a patch method, but the server supports it in the same way it
|
---|
624 | * supports STU3. The request body must contain a JSON Patch document, and the
|
---|
625 | * request headers must contain `Content-Type: application/json-patch+json`. On
|
---|
626 | * success, the response body contains a JSON-encoded representation of the
|
---|
627 | * updated resource, including the server-assigned version ID. Errors generated
|
---|
628 | * by the FHIR store contain a JSON-encoded `OperationOutcome` resource
|
---|
629 | * describing the reason for the error. If the request cannot be mapped to a
|
---|
630 | * valid API method on a FHIR store, a generic GCP error might be returned
|
---|
631 | * instead. For samples that show how to call `patch`, see [Patching a FHIR
|
---|
632 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
633 | * resources#patching_a_fhir_resource). (fhir.patch)
|
---|
634 | *
|
---|
635 | * @param string $name Required. The name of the resource to update.
|
---|
636 | * @param HttpBody $postBody
|
---|
637 | * @param array $optParams Optional parameters.
|
---|
638 | * @return HttpBody
|
---|
639 | * @throws \Google\Service\Exception
|
---|
640 | */
|
---|
641 | public function patch($name, HttpBody $postBody, $optParams = [])
|
---|
642 | {
|
---|
643 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
644 | $params = array_merge($params, $optParams);
|
---|
645 | return $this->call('patch', [$params], HttpBody::class);
|
---|
646 | }
|
---|
647 | /**
|
---|
648 | * Gets the contents of a FHIR resource. Implements the FHIR standard read
|
---|
649 | * interaction
|
---|
650 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#read),
|
---|
651 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#read),
|
---|
652 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#read)). Also
|
---|
653 | * supports the FHIR standard conditional read interaction
|
---|
654 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#cread),
|
---|
655 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#cread),
|
---|
656 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#cread)) specified
|
---|
657 | * by supplying an `If-Modified-Since` header with a date/time value or an `If-
|
---|
658 | * None-Match` header with an ETag value. On success, the response body contains
|
---|
659 | * a JSON-encoded representation of the resource. Errors generated by the FHIR
|
---|
660 | * store contain a JSON-encoded `OperationOutcome` resource describing the
|
---|
661 | * reason for the error. If the request cannot be mapped to a valid API method
|
---|
662 | * on a FHIR store, a generic GCP error might be returned instead. For samples
|
---|
663 | * that show how to call `read`, see [Getting a FHIR
|
---|
664 | * resource](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
665 | * resources#getting_a_fhir_resource). (fhir.read)
|
---|
666 | *
|
---|
667 | * @param string $name Required. The name of the resource to retrieve.
|
---|
668 | * @param array $optParams Optional parameters.
|
---|
669 | * @return HttpBody
|
---|
670 | * @throws \Google\Service\Exception
|
---|
671 | */
|
---|
672 | public function read($name, $optParams = [])
|
---|
673 | {
|
---|
674 | $params = ['name' => $name];
|
---|
675 | $params = array_merge($params, $optParams);
|
---|
676 | return $this->call('read', [$params], HttpBody::class);
|
---|
677 | }
|
---|
678 | /**
|
---|
679 | * Searches for resources in the given FHIR store according to criteria
|
---|
680 | * specified as query parameters. Implements the FHIR standard search
|
---|
681 | * interaction
|
---|
682 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search),
|
---|
683 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search),
|
---|
684 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the
|
---|
685 | * search semantics described in the FHIR Search specification
|
---|
686 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html),
|
---|
687 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html),
|
---|
688 | * [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four
|
---|
689 | * methods of search defined by the specification: * `GET [base]?[parameters]`
|
---|
690 | * to search across all resources. * `GET [base]/[type]?[parameters]` to search
|
---|
691 | * resources of a specified type. * `POST [base]/_search?[parameters]` as an
|
---|
692 | * alternate form having the same semantics as the `GET` method across all
|
---|
693 | * resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form
|
---|
694 | * having the same semantics as the `GET` method for the specified type. The
|
---|
695 | * `GET` and `POST` methods do not support compartment searches. The `POST`
|
---|
696 | * method does not support `application/x-www-form-urlencoded` search
|
---|
697 | * parameters. On success, the response body contains a JSON-encoded
|
---|
698 | * representation of a `Bundle` resource of type `searchset`, containing the
|
---|
699 | * results of the search. Errors generated by the FHIR store contain a JSON-
|
---|
700 | * encoded `OperationOutcome` resource describing the reason for the error. If
|
---|
701 | * the request cannot be mapped to a valid API method on a FHIR store, a generic
|
---|
702 | * GCP error might be returned instead. The server's capability statement,
|
---|
703 | * retrieved through capabilities, indicates what search parameters are
|
---|
704 | * supported on each FHIR resource. A list of all search parameters defined by
|
---|
705 | * the specification can be found in the FHIR Search Parameter Registry
|
---|
706 | * ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-
|
---|
707 | * registry.html),
|
---|
708 | * [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-
|
---|
709 | * registry.html)). FHIR search parameters for DSTU2 can be found on each
|
---|
710 | * resource's definition page. Supported search modifiers: `:missing`, `:exact`,
|
---|
711 | * `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`,
|
---|
712 | * `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search
|
---|
713 | * result parameters: `_sort`, `_count`, `_include`, `_revinclude`,
|
---|
714 | * `_summary=text`, `_summary=data`, and `_elements`. The maximum number of
|
---|
715 | * search results returned defaults to 100, which can be overridden by the
|
---|
716 | * `_count` parameter up to a maximum limit of 1000. The server might return
|
---|
717 | * fewer resources than requested to prevent excessively large responses. If
|
---|
718 | * there are additional results, the returned `Bundle` contains a link of
|
---|
719 | * `relation` "next", which has a `_page_token` parameter for an opaque
|
---|
720 | * pagination token that can be used to retrieve the next page. Resources with a
|
---|
721 | * total size larger than 5MB or a field count larger than 50,000 might not be
|
---|
722 | * fully searchable as the server might trim its generated search index in those
|
---|
723 | * cases. Note: FHIR resources are indexed asynchronously, so there might be a
|
---|
724 | * slight delay between the time a resource is created or changed, and the time
|
---|
725 | * when the change reflects in search results. The only exception is resource
|
---|
726 | * identifier data, which is indexed synchronously as a special index. As a
|
---|
727 | * result, searching using resource identifier is not subject to indexing delay.
|
---|
728 | * To use the special synchronous index, the search term for identifier should
|
---|
729 | * be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and
|
---|
730 | * any of the following search result parameters can be used: * `_count` *
|
---|
731 | * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
|
---|
732 | * any other search parameters, the standard asynchronous index will be used
|
---|
733 | * instead. Note that searching against the special index is optimized for
|
---|
734 | * resolving a small number of matches. The search isn't optimized if your
|
---|
735 | * identifier search criteria matches a large number (i.e. more than 2,000) of
|
---|
736 | * resources. For a search query that will match a large number of resources,
|
---|
737 | * you can avoiding using the special synchronous index by including an
|
---|
738 | * additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
|
---|
739 | * want to keep the default sorting order. Note: The special synchronous
|
---|
740 | * identifier index are currently disabled for DocumentReference and
|
---|
741 | * DocumentManifest searches. For samples and detailed information, see
|
---|
742 | * [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-
|
---|
743 | * tos/fhir-search) and [Advanced FHIR search
|
---|
744 | * features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-
|
---|
745 | * search). (fhir.search)
|
---|
746 | *
|
---|
747 | * @param string $parent Required. Name of the FHIR store to retrieve resources
|
---|
748 | * from.
|
---|
749 | * @param SearchResourcesRequest $postBody
|
---|
750 | * @param array $optParams Optional parameters.
|
---|
751 | * @return HttpBody
|
---|
752 | * @throws \Google\Service\Exception
|
---|
753 | */
|
---|
754 | public function search($parent, SearchResourcesRequest $postBody, $optParams = [])
|
---|
755 | {
|
---|
756 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
757 | $params = array_merge($params, $optParams);
|
---|
758 | return $this->call('search', [$params], HttpBody::class);
|
---|
759 | }
|
---|
760 | /**
|
---|
761 | * Searches for resources in the given FHIR store according to criteria
|
---|
762 | * specified as query parameters. Implements the FHIR standard search
|
---|
763 | * interaction
|
---|
764 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#search),
|
---|
765 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#search),
|
---|
766 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#search)) using the
|
---|
767 | * search semantics described in the FHIR Search specification
|
---|
768 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/search.html),
|
---|
769 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/search.html),
|
---|
770 | * [R4](http://hl7.org/implement/standards/fhir/R4/search.html)). Supports four
|
---|
771 | * methods of search defined by the specification: * `GET [base]?[parameters]`
|
---|
772 | * to search across all resources. * `GET [base]/[type]?[parameters]` to search
|
---|
773 | * resources of a specified type. * `POST [base]/_search?[parameters]` as an
|
---|
774 | * alternate form having the same semantics as the `GET` method across all
|
---|
775 | * resources. * `POST [base]/[type]/_search?[parameters]` as an alternate form
|
---|
776 | * having the same semantics as the `GET` method for the specified type. The
|
---|
777 | * `GET` and `POST` methods do not support compartment searches. The `POST`
|
---|
778 | * method does not support `application/x-www-form-urlencoded` search
|
---|
779 | * parameters. On success, the response body contains a JSON-encoded
|
---|
780 | * representation of a `Bundle` resource of type `searchset`, containing the
|
---|
781 | * results of the search. Errors generated by the FHIR store contain a JSON-
|
---|
782 | * encoded `OperationOutcome` resource describing the reason for the error. If
|
---|
783 | * the request cannot be mapped to a valid API method on a FHIR store, a generic
|
---|
784 | * GCP error might be returned instead. The server's capability statement,
|
---|
785 | * retrieved through capabilities, indicates what search parameters are
|
---|
786 | * supported on each FHIR resource. A list of all search parameters defined by
|
---|
787 | * the specification can be found in the FHIR Search Parameter Registry
|
---|
788 | * ([STU3](http://hl7.org/implement/standards/fhir/STU3/searchparameter-
|
---|
789 | * registry.html),
|
---|
790 | * [R4](http://hl7.org/implement/standards/fhir/R4/searchparameter-
|
---|
791 | * registry.html)). FHIR search parameters for DSTU2 can be found on each
|
---|
792 | * resource's definition page. Supported search modifiers: `:missing`, `:exact`,
|
---|
793 | * `:contains`, `:text`, `:in`, `:not-in`, `:above`, `:below`, `:[type]`,
|
---|
794 | * `:not`, and `recurse` (DSTU2 and STU3) or `:iterate` (R4). Supported search
|
---|
795 | * result parameters: `_sort`, `_count`, `_include`, `_revinclude`,
|
---|
796 | * `_summary=text`, `_summary=data`, and `_elements`. The maximum number of
|
---|
797 | * search results returned defaults to 100, which can be overridden by the
|
---|
798 | * `_count` parameter up to a maximum limit of 1000. The server might return
|
---|
799 | * fewer resources than requested to prevent excessively large responses. If
|
---|
800 | * there are additional results, the returned `Bundle` contains a link of
|
---|
801 | * `relation` "next", which has a `_page_token` parameter for an opaque
|
---|
802 | * pagination token that can be used to retrieve the next page. Resources with a
|
---|
803 | * total size larger than 5MB or a field count larger than 50,000 might not be
|
---|
804 | * fully searchable as the server might trim its generated search index in those
|
---|
805 | * cases. Note: FHIR resources are indexed asynchronously, so there might be a
|
---|
806 | * slight delay between the time a resource is created or changed, and the time
|
---|
807 | * when the change reflects in search results. The only exception is resource
|
---|
808 | * identifier data, which is indexed synchronously as a special index. As a
|
---|
809 | * result, searching using resource identifier is not subject to indexing delay.
|
---|
810 | * To use the special synchronous index, the search term for identifier should
|
---|
811 | * be in the pattern `identifier=[system]|[value]` or `identifier=[value]`, and
|
---|
812 | * any of the following search result parameters can be used: * `_count` *
|
---|
813 | * `_include` * `_revinclude` * `_summary` * `_elements` If your query contains
|
---|
814 | * any other search parameters, the standard asynchronous index will be used
|
---|
815 | * instead. Note that searching against the special index is optimized for
|
---|
816 | * resolving a small number of matches. The search isn't optimized if your
|
---|
817 | * identifier search criteria matches a large number (i.e. more than 2,000) of
|
---|
818 | * resources. For a search query that will match a large number of resources,
|
---|
819 | * you can avoiding using the special synchronous index by including an
|
---|
820 | * additional `_sort` parameter in your query. Use `_sort=-_lastUpdated` if you
|
---|
821 | * want to keep the default sorting order. Note: The special synchronous
|
---|
822 | * identifier index are currently disabled for DocumentReference and
|
---|
823 | * DocumentManifest searches. For samples and detailed information, see
|
---|
824 | * [Searching for FHIR resources](https://cloud.google.com/healthcare/docs/how-
|
---|
825 | * tos/fhir-search) and [Advanced FHIR search
|
---|
826 | * features](https://cloud.google.com/healthcare/docs/how-tos/fhir-advanced-
|
---|
827 | * search). (fhir.searchType)
|
---|
828 | *
|
---|
829 | * @param string $parent Required. Name of the FHIR store to retrieve resources
|
---|
830 | * from.
|
---|
831 | * @param string $resourceType Required. The FHIR resource type to search, such
|
---|
832 | * as Patient or Observation. For a complete list, see the FHIR Resource Index
|
---|
833 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/resourcelist.html),
|
---|
834 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/resourcelist.html),
|
---|
835 | * [R4](http://hl7.org/implement/standards/fhir/R4/resourcelist.html)).
|
---|
836 | * @param SearchResourcesRequest $postBody
|
---|
837 | * @param array $optParams Optional parameters.
|
---|
838 | * @return HttpBody
|
---|
839 | * @throws \Google\Service\Exception
|
---|
840 | */
|
---|
841 | public function searchType($parent, $resourceType, SearchResourcesRequest $postBody, $optParams = [])
|
---|
842 | {
|
---|
843 | $params = ['parent' => $parent, 'resourceType' => $resourceType, 'postBody' => $postBody];
|
---|
844 | $params = array_merge($params, $optParams);
|
---|
845 | return $this->call('search-type', [$params], HttpBody::class);
|
---|
846 | }
|
---|
847 | /**
|
---|
848 | * Updates the entire contents of a resource. Implements the FHIR standard
|
---|
849 | * update interaction
|
---|
850 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#update),
|
---|
851 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#update),
|
---|
852 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#update)). If the
|
---|
853 | * specified resource does not exist and the FHIR store has enable_update_create
|
---|
854 | * set, creates the resource with the client-specified ID. It is strongly
|
---|
855 | * advised not to include or encode any sensitive data such as patient
|
---|
856 | * identifiers in client-specified resource IDs. Those IDs are part of the FHIR
|
---|
857 | * resource path recorded in Cloud Audit Logs and Pub/Sub notifications. Those
|
---|
858 | * IDs can also be contained in reference fields within other resources. The
|
---|
859 | * request body must contain a JSON-encoded FHIR resource, and the request
|
---|
860 | * headers must contain `Content-Type: application/fhir+json`. The resource must
|
---|
861 | * contain an `id` element having an identical value to the ID in the REST path
|
---|
862 | * of the request. On success, the response body contains a JSON-encoded
|
---|
863 | * representation of the updated resource, including the server-assigned version
|
---|
864 | * ID. Errors generated by the FHIR store contain a JSON-encoded
|
---|
865 | * `OperationOutcome` resource describing the reason for the error. If the
|
---|
866 | * request cannot be mapped to a valid API method on a FHIR store, a generic GCP
|
---|
867 | * error might be returned instead. For samples that show how to call `update`,
|
---|
868 | * see [Updating a FHIR resource](https://cloud.google.com/healthcare/docs/how-
|
---|
869 | * tos/fhir-resources#updating_a_fhir_resource). (fhir.update)
|
---|
870 | *
|
---|
871 | * @param string $name Required. The name of the resource to update.
|
---|
872 | * @param HttpBody $postBody
|
---|
873 | * @param array $optParams Optional parameters.
|
---|
874 | * @return HttpBody
|
---|
875 | * @throws \Google\Service\Exception
|
---|
876 | */
|
---|
877 | public function update($name, HttpBody $postBody, $optParams = [])
|
---|
878 | {
|
---|
879 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
880 | $params = array_merge($params, $optParams);
|
---|
881 | return $this->call('update', [$params], HttpBody::class);
|
---|
882 | }
|
---|
883 | /**
|
---|
884 | * Gets the contents of a version (current or historical) of a FHIR resource by
|
---|
885 | * version ID. Implements the FHIR standard vread interaction
|
---|
886 | * ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/http.html#vread),
|
---|
887 | * [STU3](http://hl7.org/implement/standards/fhir/STU3/http.html#vread),
|
---|
888 | * [R4](http://hl7.org/implement/standards/fhir/R4/http.html#vread)). On
|
---|
889 | * success, the response body contains a JSON-encoded representation of the
|
---|
890 | * resource. Errors generated by the FHIR store contain a JSON-encoded
|
---|
891 | * `OperationOutcome` resource describing the reason for the error. If the
|
---|
892 | * request cannot be mapped to a valid API method on a FHIR store, a generic GCP
|
---|
893 | * error might be returned instead. For samples that show how to call `vread`,
|
---|
894 | * see [Retrieving a FHIR resource
|
---|
895 | * version](https://cloud.google.com/healthcare/docs/how-tos/fhir-
|
---|
896 | * resources#retrieving_a_fhir_resource_version). (fhir.vread)
|
---|
897 | *
|
---|
898 | * @param string $name Required. The name of the resource version to retrieve.
|
---|
899 | * @param array $optParams Optional parameters.
|
---|
900 | * @return HttpBody
|
---|
901 | * @throws \Google\Service\Exception
|
---|
902 | */
|
---|
903 | public function vread($name, $optParams = [])
|
---|
904 | {
|
---|
905 | $params = ['name' => $name];
|
---|
906 | $params = array_merge($params, $optParams);
|
---|
907 | return $this->call('vread', [$params], HttpBody::class);
|
---|
908 | }
|
---|
909 | }
|
---|
910 |
|
---|
911 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
912 | class_alias(ProjectsLocationsDatasetsFhirStoresFhir::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsFhirStoresFhir');
|
---|