@ikim-ui/fhir-client
v0.1.2
Published
TypeScript FHIR client wrapping the [client-js](https://github.com/smart-on-fhir/client-js) library developed at the [IKIM](https://www.ikim.uk-essen.de/).
Readme
FHIR Client
TypeScript FHIR client wrapping the client-js library developed at the IKIM.
Note: This library is currently in development and not all functionality is available. Any part might be changed or removed without prior notice.
Important: This is a browser-based library designed for use with module bundlers in frontend applications. It is not intended for direct use with browser script tags or in Node.js backends.
Installation
yarn add ikim-fhirclientUsage
import { R4Client } from "ikim-fhirclient";
const client = new R4Client({
serverUrl: "http://hapi.fhir.org/baseR4",
});Search Operations
Strongly typed search operations with full intellisense support:
// Basic search
const patients = await client.search({
resourceType: "Patient",
searchParameters: {
given: "Edward",
family: "Elric",
},
});
// Advanced search with tokens and quantities
const observations = await client.search({
resourceType: "Observation",
searchParameters: {
code: token("http://snomed.info/sct", "248337003"),
valueQuantity: multipleAnd(
greaterThan(quantity(160, "cm")),
lessThan(quantity(180, "cm"))
),
},
});CRUD Operations
// Create
const created = await client.create({ resource });
// Read
const resource = await client.read({ resourceType, id });
// Update
const updated = await client.update({ resource });
// Delete
await client.delete({ resourceType, id });Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
