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)
    }
  ],
  "validationConfig": {
    object(ValidationConfig)
  },
  "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. 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 Cloud Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources.

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

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.

disableResourceVersioning

boolean

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.

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)

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.

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.

validationConfig

object(ValidationConfig)

Configuration for how to validate incoming FHIR resources against configured profiles.

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 error logs in Cloud Logging).

BigQueryDestination

The configuration for exporting to BigQuery.

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

string

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

schemaConfig

object(SchemaConfig)

The configuration for the exported BigQuery schema.

force

boolean

Use writeDisposition instead. 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.

writeDisposition

enum(WriteDisposition)

Determines whether existing tables in the destination dataset are overwritten or appended to. If a writeDisposition is specified, the force parameter is ignored.

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. Schema type is required.

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. This type is unsupported.
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.

WriteDisposition

The BigQuery WriteDispostion used by the export operation.

Enums
WRITE_DISPOSITION_UNSPECIFIED Default behavior is the same as WRITE_EMPTY.
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.

ValidationConfig

Contains the configuration for FHIR profiles and validation.

JSON representation
{
  "disableProfileValidation": boolean,
  "enabledImplementationGuides": [
    string
  ]
}
Fields
disableProfileValidation

boolean

Whether to disable profile validation for this FHIR store. Set this to true to disable checking incoming resources for conformance against StructureDefinitions in this FHIR store.

enabledImplementationGuides[]

string

A list of ImplementationGuide URLs in this FHIR store that are used to configure the profiles to use for validation. For example, to use the US Core profiles for validation, set enabledImplementationGuides to ["http://hl7.org/fhir/us/core/ImplementationGuide/ig"]. If enabledImplementationGuides is empty or omitted, then incoming resources are only required to conform to the base FHIR profiles. Otherwise, a resource must conform to at least one profile listed in the global property of one of the enabled ImplementationGuides.

The Cloud Healthcare API does not currently enforce all of the rules in a StructureDefinition. The following rules are supported:

- min/max
- minValue/maxValue
- maxLength
- type
- fixed[x]
- pattern[x] on simple types
- slicing, when using "value" as the discriminator type

When a URL cannot be resolved (for example, in a type assertion), the server does not return an error.

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.