REST Resource: projects.locations.datasets.fhirStores

Resource: FhirStore

Represents a FHIR store.

JSON representation
{
  "name": string,
  "enableUpdateCreate": boolean,
  "notificationConfig": {
    object(NotificationConfig)
  },
  "disableReferentialIntegrity": boolean,
  "disableResourceVersioning": boolean,
  "labels": {
    string: string,
    ...
  },
  "version": enum(Version),
  "streamConfigs": [
    {
      object(StreamConfig)
    }
  ],
  "defaultSearchHandlingStrict": boolean
}
Fields
name

string

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

enableUpdateCreate

boolean

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. Please treat the audit logs with appropriate levels of care if client-specified resource IDs contain sensitive data such as patient identifiers, those IDs are part of the FHIR resource path recorded in Cloud audit logs and Cloud Pub/Sub notifications.

notificationConfig

object(NotificationConfig)

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

disableReferentialIntegrity

boolean

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.

disableResourceVersioning

boolean

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.

labels

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" }.

version

enum(Version)

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. An empty value is treated as STU3.

streamConfigs[]

object(StreamConfig)

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.

defaultSearchHandlingStrict

boolean

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.

Version

The FHIR specification version.

Enums
VERSION_UNSPECIFIED VERSION_UNSPECIFIED is treated as STU3 to accommodate the existing FHIR stores.
DSTU2 Draft Standard for Trial Use, Release 2
STU3 Standard for Trial Use, Release 3
R4 Release 4

StreamConfig

Contains configuration for streaming FHIR export.

JSON representation
{
  "resourceTypes": [
    string
  ],
  "bigqueryDestination": {
    object(BigQueryDestination)
  }
}
Fields
resourceTypes[]

string

Supply a FHIR resource type (such as "Patient" or "Observation"). See https://www.hl7.org/fhir/valueset-resource-types.html 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.

bigqueryDestination

object(BigQueryDestination)

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, e.g. "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.

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.

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

Results are appended to the corresponding BigQuery tables. 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 will be logged to Cloud Logging (see [Viewing logs](/healthcare/docs/how- tos/logging)).

BigQueryDestination

The configuration for exporting to BigQuery.

JSON representation
{
  "datasetUri": string,
  "schemaConfig": {
    object(SchemaConfig)
  },
  "force": boolean
}
Fields
datasetUri

string

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

schemaConfig

object(SchemaConfig)

The configuration for the exported BigQuery schema.

force

boolean

If this flag is TRUE, all tables will be 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.

SchemaConfig

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

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

enum(SchemaType)

Specifies the output schema type. If unspecified, the default is LOSSLESS.

recursiveStructureDepth

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.

SchemaType

An enum consisting of the supported output schema types.

Enums
SCHEMA_TYPE_UNSPECIFIED No schema type specified. Same as LOSSLESS.
LOSSLESS A data-driven schema generated from the fields present in the FHIR data being exported, with no additional simplification.
ANALYTICS

Analytics schema defined by the FHIR community. See https://github.com/FHIR/sql-on-fhir/blob/master/sql-on-fhir.md.

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.

Methods

create

Creates a new FHIR store within the parent dataset.

deidentify

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

delete

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

export

Export resources from the FHIR store to the specified destination.

get

Gets the configuration of the specified FHIR store.

getIamPolicy

Gets the access control policy for a resource.

import

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

list

Lists the FHIR stores in the given dataset.

patch

Updates the configuration of the specified FHIR store.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.