---
title: "POST /v1/{+parent}/fhirStores"
method: POST
path: "/v1/{+parent}/fhirStores"
tags: ["projects"]
---

# POST /v1/{+parent}/fhirStores

`POST /v1/{+parent}/fhirStores`

Creates a new FHIR store within the parent dataset.

## Path parameters

- `parent` string, required

## Query parameters

- `fhirStoreId` string

## Request body

- FhirStore — Represents a FHIR store.
  - `name` string — Output only. Identifier. Resource name of the FHIR store, of the form `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.
  - `bulkExportGcsDestination` BulkExportGcsDestination — The configuration for exporting to Cloud Storage using the bulk export API.
    - `uriPrefix` string — Optional. URI for a Cloud Storage directory where the server writes result files, in the format `gs://{bucket-id}/{path/to/destination/dir}`. If there is no trailing slash, the service appends one when composing the object path. The user is responsible for creating the Cloud Storage bucket referenced in `uri_prefix`.
  - `version` 'VERSION_UNSPECIFIED' | 'DSTU2' | 'STU3' | 'R4' | 'R5' — Required. 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.
  - `enableUpdateCreate` boolean — Optional. Whether this FHIR store has the [updateCreate capability](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). 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. Defaults to false.
  - `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 GetPatientEverything, do not return all the results if broken references exist.
  - `consentConfig` ConsentConfig — Configures whether to enforce consent for the FHIR store and which consent enforcement version is being used.
    - `version` 'CONSENT_ENFORCEMENT_VERSION_UNSPECIFIED' | 'V1' — Required. Specifies which consent enforcement version is being used for this FHIR store. This field can only be set once by either CreateFhirStore or UpdateFhirStore. After that, you must call ApplyConsents to change the version.
    - `accessDeterminationLogConfig` AccessDeterminationLogConfig — Configures consent audit log config for FHIR create, read, update, and delete (CRUD) operations. Cloud audit log for healthcare API must be [enabled](https://cloud.google.com/logging/docs/audit/configure-data-access#config-console-enable). The consent-related logs are included as part of `protoPayload.metadata`.
      - `logLevel` 'LOG_LEVEL_UNSPECIFIED' | 'DISABLED' | 'MINIMUM' | 'VERBOSE' — Optional. Controls the amount of detail to include as part of the audit logs.
    - `accessEnforced` boolean — Optional. The default value is false. If set to true, when accessing FHIR resources, the consent headers will be verified against consents given by patients. See the ConsentEnforcementVersion for the supported consent headers.
    - `consentHeaderHandling` ConsentHeaderHandling — How the server handles the consent header.
      - `profile` 'SCOPE_PROFILE_UNSPECIFIED' | 'PERMIT_EMPTY_SCOPE' | 'REQUIRED_ON_READ' — Optional. Specifies the default server behavior when the header is empty. If not specified, the `ScopeProfile.PERMIT_EMPTY_SCOPE` option is used.
    - `enforcedAdminConsents` string[] — Output only. The versioned names of the enforced admin Consent resource(s), in the format `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR stores with `disable_resource_versioning=true`, the format is `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Consent/{resource_id}`. This field can only be updated using ApplyAdminConsents.
  - `complexDataTypeReferenceParsing` 'COMPLEX_DATA_TYPE_REFERENCE_PARSING_UNSPECIFIED' | 'DISABLED' | 'ENABLED' — Optional. Enable parsing of references within complex FHIR data types such as Extensions. If this value is set to ENABLED, then features like referential integrity and Bundle reference rewriting apply to all references. If this flag has not been specified the behavior of the FHIR store will not change, references in complex data types will not be parsed. New stores will have this value set to ENABLED after a notification period. Warning: turning on this flag causes processing existing resources to fail if they contain references to non-existent resources. Cannot be disabled in R5.
  - `labels` object — 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}{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.
  - `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, 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. Defaults to false.
  - `validationConfig` ValidationConfig — Contains the configuration for FHIR profiles and validation.
    - `disableReferenceTypeValidation` boolean — Optional. Whether to disable reference type validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against reference type requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.
    - `disableFhirpathValidation` boolean — Optional. Whether to disable FHIRPath validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against FHIRPath requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.
    - `disableProfileValidation` boolean — Optional. Whether to disable profile validation for this FHIR store. The default value is false. Set this to true to disable checking incoming resources for conformance against structure definitions in this FHIR store.
    - `enableFhirpathProfileValidation` boolean — Optional. Whether to enable FHIRPath validation for incoming resource types that have profiles configured for them in the `enabled_implementation_guides` list. Set this to true to enable checking incoming resources for conformance against FHIRPath requirements defined in the configured profiles.
    - `enabledImplementationGuides` string[] — Optional. A list of implementation guide 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 `enabled_implementation_guides` to `["http://hl7.org/fhir/us/core/ImplementationGuide/ig"]`. If `enabled_implementation_guides` 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 - FHIRPath constraints (only when `enable_fhirpath_profile_validation` is true) When a URL cannot be resolved (for example, in a type assertion), the server does not return an error.
    - `disableRequiredFieldValidation` boolean — Optional. Whether to disable required fields validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against required fields requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.
  - `defaultSearchHandlingStrict` boolean — Optional. 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`. Defaults to false.
  - `notificationConfigs` FhirNotificationConfig[] — Optional. Specifies where and whether to send notifications upon changes to a FHIR store.
    - `pubsubTopic` string — Optional. The [Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. The notification is a `PubsubMessage` with the following fields: * `PubsubMessage.Data` contains the resource name. * `PubsubMessage.MessageId` is the ID of this notification. It is guaranteed to be unique within the topic. * `PubsubMessage.PublishTime` is the time when the message was published. Note that notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. The Cloud Healthcare API service account, service-@gcp-sa-healthcare.iam.gserviceaccount.com, must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail (https://cloud.google.com/healthcare-api/docs/permissions-healthcare-api-gcp-products#dicom_fhir_and_hl7v2_store_cloud_pubsub_permissions). If a notification can't be published to Pub/Sub, errors are logged to Cloud Logging. For more information, see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare-api/docs/how-tos/logging).
    - `sendFullResource` boolean — Optional. Whether to send full FHIR resource to this Pub/Sub topic. The default value is false.
    - `sendPreviousResourceOnDelete` boolean — Optional. Whether to send full FHIR resource to this Pub/Sub topic for deleting FHIR resource. The default value is false. Note that setting this to true does not guarantee that all previous resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the "payloadType" label from a Pub/Sub message to determine whether it needs to fetch the full previous resource as a separate operation.
  - `notificationConfig` NotificationConfig — Specifies where to send notifications upon changes to a data store.
    - `sendForBulkImport` boolean — Indicates whether or not to send Pub/Sub notifications on bulk import. Only supported for DICOM imports.
    - `pubsubTopic` string — The [Pub/Sub](https://cloud.google.com/pubsub/docs/) topic that notifications of changes are published on. Supplied by the client. PubsubMessage.Data contains the resource name. PubsubMessage.MessageId is the ID of this message. It is guaranteed to be unique within the topic. PubsubMessage.PublishTime is the time at which the message was published. Notifications are only sent if the topic is non-empty. [Topic names](https://cloud.google.com/pubsub/docs/overview#names) must be scoped to a project. Cloud Healthcare API service account must have publisher permissions on the given Pub/Sub topic. Not having adequate permissions causes the calls that send notifications to fail. If a notification can't be published to Pub/Sub, errors are logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). If the number of errors exceeds a certain rate, some aren't submitted. Note that not all operations trigger notifications, see [Configuring Pub/Sub notifications](https://cloud.google.com/healthcare/docs/how-tos/pubsub) for specific details.
  - `streamConfigs` StreamConfig[] — Optional. 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`](https://cloud.google.com/bigquery/docs/access-control#bigquery.dataEditor) role to your project's **Cloud Healthcare Service Agent** [service account](https://cloud.google.com/iam/docs/service-accounts). Some lag (typically on the order of dozens of seconds) is expected before the results show up in the streaming destination.
    - `deidentifiedStoreDestination` DeidentifiedStoreDestination — Contains configuration for streaming de-identified FHIR export.
      - `store` string — Optional. The full resource name of a Cloud Healthcare FHIR store, for example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.
      - `config` DeidentifyConfig — Configures de-id options specific to different types of content. Each submessage customizes the handling of an https://tools.ietf.org/html/rfc6838 media type or subtype. Configs are applied in a nested manner at runtime.
        - `text` TextConfig
          - `transformations` InfoTypeTransformation[] — Optional. The transformations to apply to the detected data. Deprecated. Use `additional_transformations` instead.
            - `replaceWithInfoTypeConfig` ReplaceWithInfoTypeConfig — When using the INSPECT_AND_TRANSFORM action, each match is replaced with the name of the info_type. For example, "My name is Jane" becomes "My name is [PERSON_NAME]." The TRANSFORM action is equivalent to redacting.
            - `redactConfig` RedactConfig — Define how to redact sensitive values. Default behaviour is erase. For example, "My name is Jane." becomes "My name is ."
            - `cryptoHashConfig` CryptoHashConfig — Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. Outputs a base64-encoded representation of the hashed output (for example, `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`).
              - …
            - `infoTypes` string[] — Optional. InfoTypes to apply this transformation to. If this is not specified, the transformation applies to any info_type.
            - `dateShiftConfig` DateShiftConfig — Shift a date forward or backward in time by a random amount which is consistent for a given patient and crypto key combination.
              - …
            - `characterMaskConfig` CharacterMaskConfig — Mask a string by replacing its characters with a fixed character.
              - …
          - `excludeInfoTypes` string[] — Optional. InfoTypes to skip transforming, overriding `additional_transformations`.
          - `additionalTransformations` InfoTypeTransformation[] — Optional. Transformations to apply to the detected data, overridden by `exclude_info_types`.
            - `replaceWithInfoTypeConfig` ReplaceWithInfoTypeConfig — When using the INSPECT_AND_TRANSFORM action, each match is replaced with the name of the info_type. For example, "My name is Jane" becomes "My name is [PERSON_NAME]." The TRANSFORM action is equivalent to redacting.
            - `redactConfig` RedactConfig — Define how to redact sensitive values. Default behaviour is erase. For example, "My name is Jane." becomes "My name is ."
            - `cryptoHashConfig` CryptoHashConfig — Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. Outputs a base64-encoded representation of the hashed output (for example, `L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=`).
              - …
            - `infoTypes` string[] — Optional. InfoTypes to apply this transformation to. If this is not specified, the transformation applies to any info_type.
            - `dateShiftConfig` DateShiftConfig — Shift a date forward or backward in time by a random amount which is consistent for a given patient and crypto key combination.
              - …
            - `characterMaskConfig` CharacterMaskConfig — Mask a string by replacing its characters with a fixed character.
              - …
        - `dicom` DicomConfig — Specifies the parameters needed for de-identification of DICOM stores.
          - `keepList` TagFilterList — List of tags to be filtered.
            - `tags` string[] — Optional. Tags to be filtered. Tags must be DICOM Data Elements, File Meta Elements, or Directory Structuring Elements, as defined at: https://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,. They may be provided by "Keyword" or "Tag". For example "PatientID", "00100010".
          - `filterProfile` 'TAG_FILTER_PROFILE_UNSPECIFIED' | 'MINIMAL_KEEP_LIST_PROFILE' | 'ATTRIBUTE_CONFIDENTIALITY_BASIC_PROFILE' | 'KEEP_ALL_PROFILE' | 'DEIDENTIFY_TAG_CONTENTS' — Tag filtering profile that determines which tags to keep/remove.
          - `removeList` TagFilterList — List of tags to be filtered.
            - `tags` string[] — Optional. Tags to be filtered. Tags must be DICOM Data Elements, File Meta Elements, or Directory Structuring Elements, as defined at: https://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,. They may be provided by "Keyword" or "Tag". For example "PatientID", "00100010".
          - `skipIdRedaction` boolean — Optional. If true, skip replacing StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, and MediaStorageSOPInstanceUID and leave them untouched. The Cloud Healthcare API regenerates these UIDs by default based on the DICOM Standard's reasoning: "Whilst these UIDs cannot be mapped directly to an individual out of context, given access to the original images, or to a database of the original images containing the UIDs, it would be possible to recover the individual's identity." https://dicom.nema.org/medical/dicom/current/output/chtml/part15/sect_E.3.9.html
        - `useRegionalDataProcessing` boolean — Optional. Ensures in-flight data remains in the region of origin during de-identification. The default value is false. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.
        - `image` ImageConfig — Specifies how to handle de-identification of image pixels.
          - `textRedactionMode` 'TEXT_REDACTION_MODE_UNSPECIFIED' | 'REDACT_ALL_TEXT' | 'REDACT_SENSITIVE_TEXT' | 'REDACT_NO_TEXT' — Optional. Determines how to redact text from image.
        - `fhir` FhirConfig — Specifies how to handle de-identification of a FHIR store.
          - `defaultKeepExtensions` boolean — Optional. The behaviour for handling FHIR extensions that aren't otherwise specified for de-identification. If true, all extensions are preserved during de-identification by default. If false or unspecified, all extensions are removed during de-identification by default.
          - `fieldMetadataList` FieldMetadata[] — Optional. Specifies FHIR paths to match and how to transform them. Any field that is not matched by a FieldMetadata is passed through to the output dataset unmodified. All extensions will be processed according to `default_keep_extensions`.
            - `action` 'ACTION_UNSPECIFIED' | 'TRANSFORM' | 'INSPECT_AND_TRANSFORM' | 'DO_NOT_TRANSFORM' — Optional. Deidentify action for one field.
            - `paths` string[] — Optional. List of paths to FHIR fields to be redacted. Each path is a period-separated list where each component is either a field name or FHIR type name, for example: Patient, HumanName. For "choice" types (those defined in the FHIR spec with the form: field[x]) we use two separate components. For example, "deceasedAge.unit" is matched by "Deceased.Age.unit". Supported types are: AdministrativeGenderCode, Base64Binary, Boolean, Code, Date, DateTime, Decimal, HumanName, Id, Instant, Integer, LanguageCode, Markdown, Oid, PositiveInt, String, UnsignedInt, Uri, Uuid, Xhtml.
    - `bigqueryDestination` GoogleCloudHealthcareV1FhirBigQueryDestination — The configuration for exporting to BigQuery.
      - `datasetUri` string — Optional. BigQuery URI to an existing dataset, up to 2000 characters long, in the format `bq://projectId.bqDatasetId`.
      - `schemaConfig` SchemaConfig — Configuration for the FHIR BigQuery schema. Determines how the server generates the schema.
        - `schemaType` 'SCHEMA_TYPE_UNSPECIFIED' | 'ANALYTICS' | 'ANALYTICS_V2' — Specifies the output schema type. Schema type is required.
        - `lastUpdatedPartitionConfig` TimePartitioning — Configuration for FHIR BigQuery time-partitioned tables.
          - `type` 'PARTITION_TYPE_UNSPECIFIED' | 'HOUR' | 'DAY' | 'MONTH' | 'YEAR' — Type of partitioning.
          - `expirationMs` string, int64 — Number of milliseconds for which to keep the storage for a partition.
        - `recursiveStructureDepth` string, int64 — 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.
      - `force` boolean — Optional. The default value is false. 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 `write_disposition` is specified, this parameter is ignored. force=false is equivalent to write_disposition=WRITE_EMPTY and force=true is equivalent to write_disposition=WRITE_TRUNCATE.
      - `writeDisposition` 'WRITE_DISPOSITION_UNSPECIFIED' | 'WRITE_EMPTY' | 'WRITE_TRUNCATE' | 'WRITE_APPEND' — Optional. Determines if existing data in the destination dataset is overwritten, appended to, or not written if the tables contain data. If a write_disposition is specified, the `force` parameter is ignored.
    - `resourceTypes` string[] — Optional. 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.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/healthcare.md) · [All operations](https://skmtc.net/google/apis/healthcare/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/healthcare/revisions/cdec6fe2315f/schema)
