Manage a healthcare search data store

After you create healthcare data stores and import FHIR R4 data, you can perform the following operations to manage them:

Cancel batch import

To cancel an ongoing batch import operation, do the following:

REST

  1. Find the operation ID for the batch import operation. This operation ID is the same as the one returned when you import the data into your data store. If you already have your operation ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the data store whose import you want to cancel.

    3. On the data store details page, click View details. This is only available after the import operation is created and is in progress.

    4. In the Activity log details panel, get the operation ID.

  2. Cancel an ongoing batch import.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/default_collection/dataStores/DATA_STORE_ID/branches/0/operations/OPERATION_ID:cancel" \
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • DATA_STORE_ID: the ID of the data store whose ongoing batch import you want to cancel.
    • IMPORT_OPERATION_ID: the ID of the ongoing batch import operation that you want to cancel.

    If the operation is cancelled successfully, you should receive an empty JSON object.

Pause or resume streaming

To pause or resume a streaming operation, do the following:

Console

  1. In the Google Cloud console, go to the Agent Builder page.

    Agent Builder

  2. In the navigation menu, click Data Stores.

    The Data Stores page displays a list of data stores in your Google Cloud project with their details.

  3. Click the data store for which you want to pause or resume the streaming.

  4. On the Data page of the data connector, click Pause data streaming to pause streaming or Resume data streaming to resume data streaming.

REST

  1. Find your collection ID. If you already have your collection ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the name of your data connector whose streaming you want to pause or resume.

    3. On the Data page for your data connector, get the collection ID.

  2. Pause or resume streaming within a data connector.

    curl -X PATCH \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector?updateMask=auto_run_disabled" \
    -d ' {
      "name":"projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector",
      "autoRunDisabled": PAUSE_STREAM_TRUE|FALSE
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • COLLECTION_ID: the ID of the data connector whose streaming you want to pause or resume.
    • PAUSE_STREAM_TRUE|FALSE: a boolean when set to true pauses the streaming and when set to false resumes a paused streaming.

Synchronize all documents in a streaming data store

You can manually trigger a backfill for all documents with the supported FHIR resource types. This lets you keep your Vertex AI Search data store up-to-date with your Cloud Healthcare API FHIR store. Data synchronization is possible only in streaming data stores.

To synchronize all documents in a streaming data store, do the following:

Console

  1. In the Google Cloud console, go to the Agent Builder page.

    Agent Builder

  2. In the navigation menu, click Data Stores.

    The Data Stores page displays a list of data stores in your Google Cloud project with their details.

  3. Select the data the data connector that you want to synchronize.

  4. On the data store details page, click Re-import.

  5. In the Re-import data pane, click , select a date after which you want to synchronize the data, and click Close.

  6. In the Resources to re-import section, select all the FHIR resource types. Doing so backfills all documents with the supported FHIR resource types.

  7. Click Re-import.

REST

  1. Find your collection ID. If you already have your collection ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the name of your data connector whose streaming you want to pause or resume.

    3. On the Data page for your data connector, get the collection ID.

  2. Trigger a synchronization or backfill of all documents with supported FHIR resource types.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector:startConnectorRun" \
    -d ' {
      "syncSinceTimestamp": {}
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • COLLECTION_ID: the ID of the collection whose streaming you want to pause or resume.

    If you call the startConnectorRun method again while it's still running, you might get an error.

Synchronize selective documents in a streaming data store

You can import selective documents with the supported FHIR resource types. This is useful when you want to update your Vertex AI Search data store with documents of certain FHIR resources types. Data synchronization is possible only in streaming data stores.

To synchronize selective documents in a streaming data store, do the following:

Console

  1. In the Google Cloud console, go to the Agent Builder page.

    Agent Builder

  2. In the navigation menu, click Data Stores.

    The Data Stores page displays a list of data stores in your Google Cloud project with their details.

  3. Select the data the data connector that you want to synchronize.

  4. On the data store details page, click Re-import.

  5. In the Re-import data pane, click , select a date after which you want to synchronize the data, and click Close.

  6. In the Resources to re-import section, select all the FHIR resource types that you want to import. Doing so imports all documents of the selected FHIR resource types.

  7. Click Re-import.

REST

  1. Find your collection ID. If you already have your collection ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the name of your data connector whose streaming you want to pause or resume.

    3. On the Data page for your data connector, get the collection ID.

  2. Trigger a synchronization or backfill of selective documents with supported FHIR resource types.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector:startConnectorRun" \
    -d ' {
      "syncSinceTimestamp": {},
      "healthcareFhirResourceTypes": "Patient",
      "healthcareFhirResourceTypes": "RESOURCE_TYPE"
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • COLLECTION_ID: the ID of the collection whose streaming you want to pause or resume.
    • RESOURCE_TYPE: the resource type of the FHIR documents that you want to backfill.

    If you call the startConnectorRun method again while it's still running, you might get an error.

Synchronize documents after a given timestamp in a streaming data store

You can import selective documents with the supported FHIR resource types after a given timestamp. Data synchronization is possible only in streaming data stores.

To synchronize documents after a given timestamp, do the following:

Console

  1. In the Google Cloud console, go to the Agent Builder page.

    Agent Builder

  2. In the navigation menu, click Data Stores.

    The Data Stores page displays a list of data stores in your Google Cloud project with their details.

  3. Select the data the data connector that you want to synchronize.

  4. On the data store details page, click Re-import.

  5. In the Re-import data pane, click , select a date after which you want to synchronize the data, and click Close.

  6. In the Resources to re-import section, select all the FHIR resource types that you want to import. Doing so imports all documents of the selected FHIR resource types.

  7. Click Re-import.

REST

  1. Find your collection ID. If you already have your collection ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the name of your data connector whose streaming you want to pause or resume.

    3. On the Data page for your data connector, get the collection ID.

  2. Trigger a synchronization or backfill of all documents with supported FHIR resource types.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector:startConnectorRun" \
    -d ' {
      "syncSinceTimestamp": {
        "seconds": TIMESTAMP_SECONDS,
        "nanos": TIMESTAMP_NANOS
      }
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • COLLECTION_ID: the ID of the collection whose streaming you want to pause or resume.
    • TIMESTAMP_SECONDS: the value of the timestamp in seconds since when you want to import the documents. It follows the Timestamp format.
    • TIMESTAMP_NANOS: the value of the timestamp in seconds since when you want to import the documents. It follows the Timestamp format.

    If you call the startConnectorRun method again while it's still running, you might get an error.

Delete streaming

To delete a streaming operation, do the following:

Console

  1. In the Google Cloud console, go to the Agent Builder page.

    Agent Builder

  2. In the navigation menu, click Data Stores.

    The Data Stores page displays a list of data stores in your Google Cloud project with their details.

  3. In the list of the data stores, click More options for the data connector that you want to delete.

  4. Click Delete.

  5. In the dialog that appears, type yes and click Confirm to confirm the deletion.

REST

  1. Find your collection ID. If you already have your collection ID, skip to the next step.

    1. In the Google Cloud console, go to the Agent Builder page and in the navigation menu, click Data Stores.

      Go to the Data Stores page

    2. Click the name of your data connector whose streaming you want to pause or resume.

    3. On the Data page for your data connector, get the collection ID.

  2. Trigger a synchronization or backfill of all documents with supported FHIR resource types.

    curl -X POST \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    -H "X-Goog-User-Project: PROJECT_ID" \
    "https://us-discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/us/collections/COLLECTION_ID/dataConnector:startConnectorRun" \
    -d ' {
      "syncSinceTimestamp": {
        "seconds": TIMESTAMP_SECONDS,
        "nanos": TIMESTAMP_NANOS
      }
    }'
    

    Replace the following:

    • PROJECT_ID: the ID of your Google Cloud project.
    • COLLECTION_ID: the ID of the collection whose streaming you want to pause or resume.
    • TIMESTAMP_SECONDS: the value of the timestamp in seconds since when you want to import the documents. It follows the Timestamp format.
    • TIMESTAMP_NANOS: the value of the timestamp in seconds since when you want to import the documents. It follows the Timestamp format.

    If you call the startConnectorRun method again while it's still running, you might get an error.