REST Resource: projects.locations.datasets.fhirStores

Resource: FhirStore

Represents a FHIR store.

JSON representation
  "name": string,
  "enableUpdateCreate": boolean,
  "notificationConfig": {
  "disableReferentialIntegrity": boolean,
  "disableResourceVersioning": boolean,
  "labels": {
    string: string,
  "version": enum(Version),
  "streamConfigs": [
  "defaultSearchHandlingStrict": boolean


Output only. Resource name of the FHIR store, of the form projects/{projectId}/datasets/{datasetId}/fhirStores/{fhirStoreId}.



Whether this FHIR store has the updateCreate capability. This determines if the client can use an Update operation to create a new resource with a client-specified ID. If false, all IDs are server-assigned through the Create operation and attempts to update a non-existent resource return errors. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources.



If non-empty, publish all resource modifications of this FHIR store to this destination. The Pub/Sub message attributes contain a map with a string describing the action that has triggered the notification. For example, "action":"fhir.create".



Immutable. Whether to disable referential integrity in this FHIR store. This field is immutable after FHIR store creation. The default value is false, meaning that the API enforces referential integrity and fails the requests that result in inconsistent state in the FHIR store. When this field is set to true, the API skips referential integrity checks. Consequently, operations that rely on references, such as fhir.Patient-everything, do not return all the results if broken references exist.



Immutable. Whether to disable resource versioning for this FHIR store. This field can not be changed after the creation of FHIR store. If set to false, which is the default behavior, all write operations cause historical versions to be recorded automatically. The historical versions can be fetched through the history APIs, but cannot be updated. If set to true, no historical versions are kept. The server sends errors for attempts to read the historical versions.


map (key: string, value: string)

User-supplied key-value pairs used to organize FHIR stores.

Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}

Label values are optional, must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63}

No more than 64 labels can be associated with a given store.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.



Immutable. The FHIR specification version that this FHIR store supports natively. This field is immutable after store creation. Requests are rejected if they contain FHIR resources of a different version. Version is required for every FHIR store.



A list of streaming configs that configure the destinations of streaming export for every resource mutation in this FHIR store. Each store is allowed to have up to 10 streaming configs. After a new config is added, the next resource mutation is streamed to the new location in addition to the existing ones. When a location is removed from the list, the server stops streaming to that location. Before adding a new config, you must add the required bigquery.dataEditor role to your project's Cloud Healthcare Service Agent service account. Some lag (typically on the order of dozens of seconds) is expected before the results show up in the streaming destination.



If true, overrides the default search behavior for this FHIR store to handling=strict which returns an error for unrecognized search parameters. If false, uses the FHIR specification default handling=lenient which ignores unrecognized search parameters. The handling can always be changed from the default on an individual API call by setting the HTTP header Prefer: handling=strict or Prefer: handling=lenient.


The FHIR specification version.

VERSION_UNSPECIFIED Users must specify a version on store creation or an error is returned.
DSTU2 Draft Standard for Trial Use, Release 2
STU3 Standard for Trial Use, Release 3
R4 Release 4


Contains configuration for streaming FHIR export.

JSON representation
  "resourceTypes": [
  "bigqueryDestination": {


Supply a FHIR resource type (such as "Patient" or "Observation"). See for a list of all FHIR resource types. The server treats an empty list as an intent to stream all the supported resource types in this FHIR store.



The destination BigQuery structure that contains both the dataset location and corresponding schema config.

The output is organized in one table per resource type. The server reuses the existing tables (if any) that are named after the resource types. For example, "Patient", "Observation". When there is no existing table for a given resource type, the server attempts to create one.

When a table schema doesn't align with the schema config, either because of existing incompatible schema or out of band incompatible modification, the server does not stream in new data.

BigQuery imposes a 1 MB limit on streaming insert row size, therefore any resource mutation that generates more than 1 MB of BigQuery data is not streamed.

One resolution in this case is to delete the incompatible table and let the server recreate one, though the newly created table only contains data after the table recreation.

Results are written to BigQuery tables according to the parameters in BigQueryDestination.WriteDisposition. Different versions of the same resource are distinguishable by the meta.versionId and meta.lastUpdated columns. The operation (CREATE/UPDATE/DELETE) that results in the new version is recorded in the meta.tag.

The tables contain all historical resource versions since streaming was enabled. For query convenience, the server also creates one view per table of the same name containing only the current resource version.

The streamed data in the BigQuery dataset is not guaranteed to be completely unique. The combination of the id and meta.versionId columns should ideally identify a single unique row. But in rare cases, duplicates may exist. At query time, users may use the SQL select statement to keep only one of the duplicate rows given an id and meta.versionId pair. Alternatively, the server created view mentioned above also filters out duplicates.

If a resource mutation cannot be streamed to BigQuery, errors are logged to Cloud Logging. For more information, see Viewing error logs in Cloud Logging).


The configuration for exporting to BigQuery.

JSON representation
  "datasetUri": string,
  "schemaConfig": {
  "force": boolean,
  "writeDisposition": enum(WriteDisposition)


BigQuery URI to an existing dataset, up to 2000 characters long, in the format bq://projectId.bqDatasetId.



The configuration for the exported BigQuery schema.



If this flag is TRUE, all tables are deleted from the dataset before the new exported tables are written. If the flag is not set and the destination dataset contains tables, the export call returns an error.

If writeDisposition is specified, this parameter is ignored. force=false is equivalent to writeDisposition=WRITE_EMPTY and force=true is equivalent to writeDisposition=WRITE_TRUNCATE.



Determines if existing data in the destination dataset is overwritten, appended to, or not written if the tables contain data. If a writeDisposition is specified, the force parameter is ignored.


Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.

JSON representation
  "schemaType": enum(SchemaType),
  "recursiveStructureDepth": string


Specifies the output schema type. Schema type is required.


string (int64 format)

The depth for all recursive structures in the output analytics schema. For example, concept in the CodeSystem resource is a recursive structure; when the depth is 2, the CodeSystem table will have a column called concept.concept but not concept.concept.concept. If not specified or set to 0, the server will use the default value 2. The maximum depth allowed is 5.


An enum consisting of the supported output schema types.

SCHEMA_TYPE_UNSPECIFIED No schema type specified. This type is unsupported.

Analytics schema defined by the FHIR community. See

BigQuery only allows a maximum of 10,000 columns per table. Due to this limitation, the server will not generate schemas for fields of type Resource, which can hold any resource type. The affected fields are Parameters.parameter.resource, Bundle.entry.resource, and Bundle.entry.response.outcome.


The BigQuery WriteDispostion used by the export operation.

WRITE_EMPTY Only export data if the destination tables are empty.
WRITE_TRUNCATE Erase all existing data in the tables before writing the instances.
WRITE_APPEND Append data to the existing tables.



Creates a new FHIR store within the parent dataset.


De-identifies data from the source store and writes it to the destination store.


Deletes the specified FHIR store and removes all resources within it.


Export resources from the FHIR store to the specified destination.


Gets the configuration of the specified FHIR store.


Gets the access control policy for a resource.


Imports resources to the FHIR store by loading data from the specified sources.


Lists the FHIR stores in the given dataset.


Updates the configuration of the specified FHIR store.


Sets the access control policy on the specified resource.


Returns permissions that a caller has on the specified resource.