Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,19 @@ import (
_ "github.com/googleapis/genai-toolbox/internal/tools/firestore/firestorequerycollection"
_ "github.com/googleapis/genai-toolbox/internal/tools/firestore/firestoreupdatedocument"
_ "github.com/googleapis/genai-toolbox/internal/tools/firestore/firestorevalidaterules"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/fhirfetchpage"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/fhirpatienteverything"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/fhirpatientsearch"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/getfhirresource"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/getfhirstore"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/getfhirstoremetrics"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/gethealthcaredataset"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/listdicomstores"
_ "github.com/googleapis/genai-toolbox/internal/tools/healthcare/listfhirstores"
_ "github.com/googleapis/genai-toolbox/internal/tools/http"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookeradddashboardelement"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateprojectfile"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerconversationalanalytics"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookercreateprojectfile"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdeleteprojectfile"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookerdevmode"
_ "github.com/googleapis/genai-toolbox/internal/tools/looker/lookergetdashboards"
Expand Down
18 changes: 18 additions & 0 deletions docs/en/resources/sources/healthcare.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ If you are new to the Healthcare API, you can try to
- [`list-dicom-stores`](../tools/healthcare/list-dicom-stores.md)
Lists the available DICOM stores in the healthcare dataset.

- [`get-fhir-store`](../tools/healthcare/get-fhir-store.md)
Retrieves information about a FHIR store.

- [`get-fhir-store-metrics`](../tools/healthcare/get-fhir-store-metrics.md)
Retrieves metrics for a FHIR store.

- [`get-fhir-resource`](../tools/healthcare/get-fhir-resource.md)
Retrieves a specific FHIR resource from a FHIR store.

- [`fhir-patient-search`](../tools/healthcare/fhir-patient-search.md)
Searches for patients in a FHIR store based on a set of criteria.

- [`fhir-patient-everything`](../tools/healthcare/fhir-patient-everything.md)
Retrieves all information for a given patient.

- [`fhir-fetch-page`](../tools/healthcare/fhir-fetch-page.md)
Fetches a page of FHIR resources from a given URL.

## Requirements

### IAM Permissions
Expand Down
44 changes: 44 additions & 0 deletions docs/en/resources/tools/healthcare/fhir-fetch-page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "fhir-fetch-page"
linkTitle: "fhir-fetch-page"
type: docs
weight: 1
description: >
A "fhir-fetch-page" tool fetches a page of FHIR resources from a given URL.
aliases:
- /resources/tools/healthcare-fhir-fetch-page
---

## About

A `fhir-fetch-page` tool fetches a page of FHIR resources from a given URL. It's
compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`fhir-fetch-page` can be used for pagination when a previous tool call (like
`fhir-patient-search` or `fhir-patient-everything`) returns a 'next' link in the response bundle.

## Example

```yaml
tools:
get_fhir_store:
kind: fhir-fetch-page
source: my-healthcare-source
description: Use this tool to fetch a page of FHIR resources from a FHIR Bundle's entry.link.url
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "fhir-fetch-page". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|-----------|:----------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| pageURL | string | true | The full URL of the FHIR page to fetch. This would usually be the value of `Bundle.entry.link.url` field within the response returned from FHIR search or FHIR patient everything operations. |
50 changes: 50 additions & 0 deletions docs/en/resources/tools/healthcare/fhir-patient-everything.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: "fhir-patient-everything"
linkTitle: "fhir-patient-everything"
type: docs
weight: 1
description: >
A "fhir-patient-everything" tool retrieves all information for a given patient.
aliases:
- /resources/tools/healthcare-fhir-patient-everything
---

## About

A `fhir-patient-everything` tool retrieves resources related to a given patient
from a FHIR store. It's compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`fhir-patient-everything` returns all the information available for a given
patient ID. It can be configured to only return certain resource types, or only
resources that have been updated after a given time.

## Example

```yaml
tools:
fhir_patient_everything:
kind: fhir-patient-everything
source: my-healthcare-source
description: Use this tool to retrieve all the information about a given patient.
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "fhir-patient-everything". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|---------------------|:----------:|:------------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| patientID | string | true | The ID of the patient FHIR resource for which the information is required. |
| resourceTypesFilter | string | false | String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are returned. |
| sinceFilter | string | false | If provided, only resources updated after this time are returned. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. The time must be specified to the second and include a time zone. For example, 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z. |
| storeID | string | true* | The FHIR store ID to search in. |

*If the `allowedFHIRStores` in the source has length 1, then the `storeID` parameter is not needed.
64 changes: 64 additions & 0 deletions docs/en/resources/tools/healthcare/fhir-patient-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "fhir-patient-search"
linkTitle: "fhir-patient-search"
type: docs
weight: 1
description: >
A "fhir-patient-search" tool searches for patients in a FHIR store.
aliases:
- /resources/tools/healthcare-fhir-patient-search
---

## About

A `fhir-patient-search` tool searches for patients in a FHIR store based on a
set of criteria. It's compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`fhir-patient-search` returns a list of patients that match the given criteria.

## Example

```yaml
tools:
fhir_patient_search:
kind: fhir-patient-search
source: my-healthcare-source
description: Use this tool to search for patients in the FHIR store.
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "fhir-patient-search". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|------------------|:----------:|:------------:|--------------------------------------------------------------------------------------------------------------|
| active | string | false | Whether the patient record is active. |
| city | string | false | The city of the patient's address. |
| country | string | false | The country of the patient's address. |
| postalcode | string | false | The postal code of the patient's address. |
| state | string | false | The state of the patient's address. |
| addressSubstring | string | false | A substring to search for in any address field. |
| birthDateRange | string | false | A date range for the patient's birth date in the format YYYY-MM-DD/YYYY-MM-DD. |
| deathDateRange | string | false | A date range for the patient's death date in the format YYYY-MM-DD/YYYY-MM-DD. |
| deceased | string | false | Whether the patient is deceased. |
| email | string | false | The patient's email address. |
| gender | string | false | The patient's gender. |
| addressUse | string | false | The use of the patient's address. |
| name | string | false | The patient's name. |
| givenName | string | false | A portion of the given name of the patient. |
| familyName | string | false | A portion of the family name of the patient. |
| phone | string | false | The patient's phone number. |
| language | string | false | The patient's preferred language. |
| identifier | string | false | An identifier for the patient. |
| summary | boolean | false | Requests the server to return a subset of the resource. True by default. |
| storeID | string | true* | The FHIR store ID to search in. |

*If the `allowedFHIRStores` in the source has length 1, then the `storeID` parameter is not needed.
47 changes: 47 additions & 0 deletions docs/en/resources/tools/healthcare/get-fhir-resource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "get-fhir-resource"
linkTitle: "get-fhir-resource"
type: docs
weight: 1
description: >
A "get-fhir-resource" tool retrieves a specific FHIR resource.
aliases:
- /resources/tools/healthcare-get-fhir-resource
---

## About

A `get-fhir-resource` tool retrieves a specific FHIR resource from a FHIR store.
It's compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`get-fhir-resource` returns a single FHIR resource, identified by its type and ID.

## Example

```yaml
tools:
get_fhir_resource:
kind: get-fhir-resource
source: my-healthcare-source
description: Use this tool to retrieve a specific FHIR resource.
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "get-fhir-resource". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|--------------|:----------:|:------------:|--------------------------------------------------------------------------------------------------------------|
| resourceType | string | true | The FHIR resource type to retrieve (e.g., Patient, Observation). |
| resourceID | string | true | The ID of the FHIR resource to retrieve. |
| storeID | string | true* | The FHIR store ID to retrieve the resource from. |

*If the `allowedFHIRStores` in the source has length 1, then the `storeID` parameter is not needed.
45 changes: 45 additions & 0 deletions docs/en/resources/tools/healthcare/get-fhir-store-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "get-fhir-store-metrics"
linkTitle: "get-fhir-store-metrics"
type: docs
weight: 1
description: >
A "get-fhir-store-metrics" tool retrieves metrics for a FHIR store.
aliases:
- /resources/tools/healthcare-get-fhir-store-metrics
---

## About

A `get-fhir-store-metrics` tool retrieves metrics for a FHIR store. It's
compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`get-fhir-store-metrics` returns the metrics of a FHIR store.

## Example

```yaml
tools:
get_fhir_store_metrics:
kind: get-fhir-store-metrics
source: my-healthcare-source
description: Use this tool to get metrics for a FHIR store.
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "get-fhir-store-metrics". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|-----------|:----------:|:------------:|---------------------------------------|
| storeID | string | true* | The FHIR store ID to get metrics for. |

*If the `allowedFHIRStores` in the source has length 1, then the `storeID` parameter is not needed.
45 changes: 45 additions & 0 deletions docs/en/resources/tools/healthcare/get-fhir-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "get-fhir-store"
linkTitle: "get-fhir-store"
type: docs
weight: 1
description: >
A "get-fhir-store" tool retrieves information about a FHIR store.
aliases:
- /resources/tools/healthcare-get-fhir-store
---

## About

A `get-fhir-store` tool retrieves information about a FHIR store. It's
compatible with the following sources:

- [healthcare](../../sources/healthcare.md)

`get-fhir-store` returns the details of a FHIR store.

## Example

```yaml
tools:
get_fhir_store:
kind: get-fhir-store
source: my-healthcare-source
description: Use this tool to get information about a FHIR store.
```

## Reference

| **field** | **type** | **required** | **description** |
|-------------|:------------------------------------------:|:------------:|----------------------------------------------------|
| kind | string | true | Must be "get-fhir-store". |
| source | string | true | Name of the healthcare source. |
| description | string | true | Description of the tool that is passed to the LLM. |

### Parameters

| **field** | **type** | **required** | **description** |
|-----------|:----------:|:------------:|---------------------------------------|
| storeID | string | true* | The FHIR store ID to get details for. |

*If the `allowedFHIRStores` in the source has length 1, then the `storeID` parameter is not needed.
Loading
Loading