All Projects → Vermonster → Fhir Kit Client

Vermonster / Fhir Kit Client

Licence: mit
Node.js FHIR client library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Fhir Kit Client

shd
Show pretty HDD/SSD list
Stars: ✭ 37 (-56.98%)
Mutual labels:  smart
Flutter whirlpool
Flutter UI challenge (with Box2D physic)- Smart washing machine app
Stars: ✭ 453 (+426.74%)
Mutual labels:  smart
Prometheus smart exporter
Configurable S.M.A.R.T. metric exporter for Prometheus
Stars: ✭ 38 (-55.81%)
Mutual labels:  smart
automate-home
Yet another python home automation (iot) project. Because a smart light is more than just on or off.
Stars: ✭ 59 (-31.4%)
Mutual labels:  smart
Home Assistant EDP Box
Integração das EDP Box com Home Assistant Core
Stars: ✭ 91 (+5.81%)
Mutual labels:  smart
Smart App Rate
An Android library that encourages users to rate the app on the Google Play.
Stars: ✭ 609 (+608.14%)
Mutual labels:  smart
gsmartcontrol
GSmartControl - Hard disk drive and SSD health inspection tool
Stars: ✭ 183 (+112.79%)
Mutual labels:  smart
Smart Commit
Commit with current branch name.
Stars: ✭ 63 (-26.74%)
Mutual labels:  smart
Burpsmartbuster
A Burp Suite content discovery plugin that add the smart into the Buster!
Stars: ✭ 361 (+319.77%)
Mutual labels:  smart
Hass Components
My Home Assistant custom components
Stars: ✭ 21 (-75.58%)
Mutual labels:  smart
homebridge-konnected
A Homebridge plugin for Konnected Alarm Panel devices
Stars: ✭ 25 (-70.93%)
Mutual labels:  smart
everdev
Everscale Development Environment - Set up all the core Developer tools and work with Everscale blockchain from a single interface
Stars: ✭ 55 (-36.05%)
Mutual labels:  smart
Coapnet
CoAPnet is a high performance .NET library for CoAP based communication. It provides a CoAP client and a CoAP server. It also has DTLS support out of the box.
Stars: ✭ 23 (-73.26%)
Mutual labels:  smart
ethereum-dex
Decentralized exchange implementation for the 0xcert protocol on the Ethereum blockchain.
Stars: ✭ 18 (-79.07%)
Mutual labels:  smart
Waykichain
Public Blockchain as a Decentralized Finance Infrastructure Service Platform
Stars: ✭ 1,117 (+1198.84%)
Mutual labels:  smart
domoticz gaspar
Get Gaspar smart meter index to domoticz
Stars: ✭ 23 (-73.26%)
Mutual labels:  smart
Smarthotel360 Mobile
SmartHotel360 Mobile
Stars: ✭ 535 (+522.09%)
Mutual labels:  smart
Data Models
🔠 Code and specifications to support harmonized data models
Stars: ✭ 79 (-8.14%)
Mutual labels:  smart
Thorify
A web3 adaptor for VeChain Thor RESTful HTTP API.
Stars: ✭ 62 (-27.91%)
Mutual labels:  smart
Watchio
A programmable smart watch based on esp32-pico-d4
Stars: ✭ 25 (-70.93%)
Mutual labels:  smart

FHIRKit Client

npm version Build Status Coverage Status GitHub license

Node FHIR client library

Features

  • Support for R4 (4.0.1, 4.0.0, 3.5.0, 3.3.0, 3.2.0), STU3 (3.0.1, 1.8.0, 1.6.0, 1.4.0, 1.1.0) and DSTU2 (1.0.2)
  • Support for all FHIR REST actions
  • Support for FHIR operations
  • Pagination support for search results
  • Batch and transaction support
  • Support for absolute, in-bundle, and contained references
  • Metadata caching on client instance
  • SMART security support
  • Capability-checking tool based on server capability statements
  • Minimal dependencies
  • Contemporary async/await structure
  • Modern ES6 Classes
  • TDD with Mocha
  • URL polyfill (so it works in client-only apps without much trouble)
  • Support optional parameters for the request, such as TLS key and cert

Examples

Examples using promises...

const Client = require('fhir-kit-client');
const fhirClient = new Client({
  baseUrl: 'https://sb-fhir-stu3.smarthealthit.org/smartstu3/open'
  });

// Get SMART URLs for OAuth
fhirClient.smartAuthMetadata().then((response) => {
  console.log(response);
  });


// Direct request
fhirClient.request('Patient/123')
  .then(respose => console.log(response));

fhirClient.request('Patient/123', { method: 'DELETE' })
  .then(respose => console.log(response));

// Read a patient
fhirClient
  .read({ resourceType: 'Patient', id: '2e27c71e-30c8-4ceb-8c1c-5641e066c0a4' })
  .then((response) => {
    console.log(response);
  });


// Search for patients, and page through results
fhirClient
  .search({ resourceType: 'Patient', searchParams: { _count: '3', gender: 'female' } })
  .then((response) => {
    console.log(response);
    return response;
  })
  .then((response) => {
    console.log(response);
    return fhirClient.nextPage(response);
  })
  .then((response) => {
    console.log(response);
    return fhirClient.prevPage(response);
  })
  .catch((error) => {
    console.error(error);
  });

Examples using async/await...

const Client = require('fhir-kit-client');
const fhirClient = new Client({
  baseUrl: 'https://sb-fhir-stu3.smarthealthit.org/smartstu3/open'
  });

async function asyncExamples() {
  // Get SMART URLs for OAuth
  let response = await fhirClient.smartAuthMetadata();
  console.log(response);


  // Read a patient
  response = await fhirClient
    .read({ resourceType: 'Patient', id: '2e27c71e-30c8-4ceb-8c1c-5641e066c0a4' });
  console.log(response);


  // Search for a patient with name matching abbott, then paging
  let searchResponse = await fhirClient
    .search({ resourceType: 'Patient', searchParams: { name: 'abbott ' } })
  console.log(searchResponse);

  searchResponse = await fhirClient.nextPage(searchResponse);
  console.log(searchResponse);

  searchResponse = await fhirClient.prevPage(searchResponse);
  console.log(searchResponse);
}

asyncExamples();

For more examples see the JS Docs and Launch Examples below.

Documentation

JSDoc-generated documentation with plenty of examples

Launch Examples (SMART, CDS Hooks)

To see how to follow launch and authorization workflows for FHIR applications, see the examples directory and examples README.

Example React App

FHIRKit Create React App provides a create-react-app template that can be used to create a sample React app using FHIRKit Client.

Even more Examples (client-side ones)

See https://github.com/Vermonster/fhir-kit-client-examples for examples in React, Angular, and React Native.

Logging

The debug library can provide logging during development. Two different logging namespaces are provided, fhir-kit- client:info logs each request and response, and fhir-kit-client:error logs errors. To enable logging during development, add one of the namespaces to the DEBUG environment variable, or use fhir-kit-client:* to enable both.

$ DEBUG=fhir-kit-client:* node smart-launch.js

Contributing

FHIRKit Client is an open source Node.js FHIR client library that welcomes community contributions with enthusiasm.

All are welcome to participate. By participating in this project, you agree to follow the Code of Conduct.

Please see our Contributing document for more details on how to get started.

License

MIT

Copyright (c) 2018 Vermonster LLC

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].