Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions website/pages/bunny/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The database connection is configured by the variables prefixed with `DATASOURCE
| `DATASOURCE_DB_DRIVERNAME` | `"postgresql,mssql,duckdb,snowflake-connector-python"` | Database dialect | `postgresql` |
| `OMOP_SPECIMEN_ENABLED` | 'boolean' | Specifies whether to enable searching on the Specimen table. Available from 1.7 | `false` |
| `OMOP_LOCATION_ENABLED` | 'boolean' | Enable support for filtering by geo-radius against the OMOP Location table. Available from v1.8 | `false` |
| `OMOP_DEATH_ENABLED` | 'boolean' | Enable support for querying the OMOP Death table. Available from v1.9 | `false` |

### Managed Identity

Expand Down
3 changes: 3 additions & 0 deletions website/pages/bunny/deployment/requirements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ Optional tables set by configuration:
|------------|------------------------------------------------------------|----------------|
| Specimen | specimen_id, person_id, specimen_concept_id, specimen_date | v1.7 onwards |
| Location | location_id, latitude†, longitude† | v1.8 onwards |
| Death | person_id, death_date, cause_concept_id‡ | v1.9 onwards |

Location is joined via `person.location_id` → `location.location_id`.

_*Not included in the HDR Gateway minimum data model._

_†`latitude` and `longitude` were added to the Location table in OMOP CDM v5.4 — a v5.3 database cannot use the geo-radius filter._

_‡`cause_concept_id` is nullable — only required to allow filtering by specific causes of death, without this, Bunny is still able to query on any death record._

The following indexes are also recommended from the CDM to ensure queries are processed quickly.

| OMOP Table | Recommended Indexes |
Expand Down
49 changes: 49 additions & 0 deletions website/pages/concepts/availability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,55 @@ recorded latitude/longitude are never matched.
This example matches patients within 5km of central London. Set `"oper": "!="` to exclude patients
within the radius instead.

## Death filtering

`varcat: "Death"` filters patients by whether, and how, they died, using the OMOP `death` table. It
must be enabled with `OMOP_DEATH_ENABLED` (see [Configuration](/bunny/config#database)).

`type: "TEXT"` is used for all Death rules. The `value` field is optional — leave it empty to match
on the presence of a death record at all, or set it to an OMOP concept ID to match a specific cause
of death (`death.cause_concept_id`).

**Deceased patients (any cause):**

```json
{
"varname": "OMOP",
"varcat": "Death",
"type": "TEXT",
"oper": "=",
"value": ""
}
```

**Living patients** — set `"oper": "!="` with an empty `value` to match patients with *no* death record:

```json
{
"varname": "OMOP",
"varcat": "Death",
"type": "TEXT",
"oper": "!=",
"value": ""
}
```

**Specific cause of death** — set `value` to a concept ID to match patients whose recorded cause of
death is that concept:

```json
{
"varname": "OMOP",
"varcat": "Death",
"type": "TEXT",
"oper": "=",
"value": "4329847"
}
```

Combine a Death rule with rules from other varcats in the same group (`rules_oper: "AND"`) to find,
for example, deceased patients who also have a specific condition recorded.

## Response Schema

Bunny returns a structured JSON response upon completing an Availability Query.
Expand Down
Loading