# pathling-client

> Client library for the Pathling FHIR API.

Latest version **2.1.4** (published 2025-03-04) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install pathling-client
pnpm add pathling-client
yarn add pathling-client
bun add pathling-client
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2025-03-04 |
| First published | 2021-11-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 133.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 140 |
| Author | Australian e-Health Research Centre, CSIRO |
| Maintainers | johngrimes |
| Keywords | pathling, fhir, analytics, spark, standards, terminology |

## Links

- npm: https://www.npmjs.com/package/pathling-client
- Repository: https://github.com/aehrc/pathling
- Homepage: https://github.com/aehrc/pathling/tree/master/lib/js#readme
- Issues: https://github.com/aehrc/pathling/issues
- npm.io page: https://npm.io/package/pathling-client

## Dependencies (1)

- [p-retry](https://npm.io/package/p-retry.md) ^5.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.1.4 (latest) — 2025-03-04
- 2.1.3 — 2023-12-01
- 2.1.2 — 2023-07-08
- 2.1.1 — 2023-01-08
- 2.1.0 — 2022-12-29
- 2.0.10 — 2022-11-15
- 2.0.9 — 2022-11-03
- 2.0.8 — 2022-10-26
- 2.0.6 — 2022-07-12
- 2.0.5 — 2022-07-10
- 2.0.4 — 2022-06-15
- 2.0.3 — 2022-06-08
- 2.0.2 — 2022-05-28
- 2.0.1 — 2022-03-11
- 2.0.0 — 2022-01-11
- … 8 more at https://npm.io/package/pathling-client/versions

## README

# pathling-client

This is a client library for the Pathling FHIR API, for use with JavaScript and
TypeScript.

## Example usage

```typescript
import PathlingClient from 'pathling-client';

const client = new PathlingClient("https://demo.pathling.app/fhir");

// Invoke the import operation.
client.import({
  sources: [
    { resourceType: "Patient", url: "s3://somebucket/Patient.ndjson" },
    { resourceType: "Condition", url: "s3://somebucket/Condition.ndjson" },
  ]
}).then(result => console.log(result));

// Invoke the aggregate operation.
client.aggregate({
  subjectResource: "Patient",
  aggregations: ["count()"],
  groupings: [
    "reverseResolve(Condition.subject).code.coding" +
    ".where(subsumedBy(http://snomed.info/sct|73211009))"
  ]
}).then(result => console.log(result));

// Invoke the search operation.
client.search({
  subjectResource: "Patient",
  filters: [
    "(reverseResolve(Condition.subject).code.coding" +
    ".where($this.subsumedBy(http://snomed.info/sct|73211009))) " +
    "contains http://snomed.info/sct|427089005||'Diabetes from Cystic Fibrosis'"
  ],
}).then(result => console.log(result));

// Invoke the extract operation.
client.extract({
  subjectResource: "Patient",
  columns: [
    "id", 
    "reverseResolve(Condition.subject).code.coding"
  ],
  filters: [
    "reverseResolve(Condition.subject).code" +
    ".subsumedBy(http://snomed.info/sct|73211009).anyTrue"
  ]
}).then(result => console.log(result));
```

Pathling and "pathling-client" are copyright © 2023, Commonwealth
Scientific and Industrial Research Organisation (CSIRO) ABN 41 687 119 230.
Licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0).

---
_Source: https://npm.io/package/pathling-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
