• Stars
    star
    167
  • Rank 226,587 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A secure GraphQL implementation for the HL7 FHIR specification based on the current implementation guide for GraphQL with FHIR and developed with Node.js and Express.

GraphQL-FHIR Build Status Coverage Status GitHub license

A secure GraphQL implementation for the HL7 FHIR specification based on the current implementation guide for GraphQL with FHIR and developed with Node.js and Express.

Prerequisites

You should have a basic understanding of working in Node.js and at least a basic understanding of what GraphQL is and how it works.

Getting Started

  1. Installation
git clone https://github.com/Asymmetrik/graphql-fhir.git
cd graphql-fhir
yarn install
  1. Start a local dev server
# For development
yarn nodemon
  1. View http://localhost:3000/3_0_1/$graphiql to explore the available queries and mutations in the graphiql interface. The standard graphql endpoint is available at http://localhost:3000/3_0_1/$graphql.

What's next

See our Frequently Asked Questions for explanations on how to configure the server, connect to an actual database, setup authentication, and more. You can also read up on the project structure under the Architecture section if you are curious about that kind of thing. If you are want to know about our future plans, see our Roadmap. If you have any other questions, please ask them on StackOverflow with the tag graphql-fhir.

Frequently Asked Questions

Architecture

We designed this project in the way that we did so we can support multiple versions simultaneously and add new versions very quickly. Everything in src/resources is generated by an internal tool that reads Structure Definitions downloaded from the official FHIR website. The tool output's schemas, inputs, parameter files, custom scalars, and profile endpoints, which includes files used to register queries and mutations with the server as well as resolvers.

If you decide to use this server, you will rarely need to modify code in src/resources except for code in the profiles, since this is where you add resolver logic and configure which profiles you want to support.

The folder structure for the project looks like this:

src
| - config.js
| # Contains server and version configuration 
| - index.js
| # Entry to the application
| - src/lib
| # Contains custom libs we use, server, logger's, etc
| - src/middleware
| # Custom express middleware
| - src/scripts
| # Scripts for local development and testing.
| - src/utils
| # Various utilities used throughout the application
| - src/resources
| # All the code in here is auto generated for each version
|  | - 3_0_1
|  | # This directory contains all the 3_0_1 logic
|  |  | - inputs
|  |  | # Contains all input schemas for mutations
|  |  | - parameters
|  |  | # Defines what arguments can be provided to search operations.
|  |  | - scalars
|  |  | # Contains some custom FHIR types.
|  |  | - schemas
|  |  |  # Defines all the output schemas.
|  |  | - profiles
|  |  |  # Contains all the configurable profiles for GraphQL.
|  |  |  | - patient # or any other resource for that matter
|  |  |  |  | - index.js
|  |  |  |  | # File used to register capabilities with the server
|  |  |  |  | - mutation.js
|  |  |  |  | # Mutations configuration. Auto-Generated and should not modify
|  |  |  |  | - query.js
|  |  |  |  | # Query configuration. Auto-Generated and should not modify 
|  |  |  |  | - resolver.js
|  |  |  |  | # Contains placeholders, your logic to query your backend goes here.

Roadmap

  • Authentication Initializers and passport support
  • Better documentation on setup and configurations
  • Change return format for ResourceList queries to a FHIR Bundle instead of a GraphQLList
  • Implementation guides and demos
  • Support for more resources
    • USCore resources.
  • Support for more versions
    • DSTU2 (1.0.2).
    • STU3 (3.0.1).
    • R4
  • Work with community to continue to establish best practices for FHIR with GraphQL and implement them here.

Contributing

Please see CONTRIBUTING.md for more details regarding contributing issues or code.

License

graphql-fhir is MIT licensed.

More Repositories

1

ngx-leaflet

Core Leaflet package for Angular.io
TypeScript
766
star
2

node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
JavaScript
391
star
3

leaflet-d3

Collection of plugins for using d3.js with Leaflet
JavaScript
261
star
4

node-fhir-server-mongo

Open Source FHIR Server made with @asymmetrik/fhir-server-core backed by MongoDB
JavaScript
149
star
5

ngx-leaflet-draw

TypeScript
88
star
6

akin

Node.js Recommendation Engine based on Collaborative Filtering
JavaScript
86
star
7

ansible-roles

Reusable Ansible roles
Jinja
63
star
8

ngx-leaflet-markercluster

TypeScript
61
star
9

ansible-role-nifi

Jinja
43
star
10

fhir-app-starter

🔥 Open Source FHIR App project starter. Start building your app right away.
JavaScript
26
star
11

ngx-leaflet-tutorial-plugins

TypeScript
22
star
12

ngx-leaflet-d3

TypeScript
21
star
13

phx-tools

A suite of tools developed for JavaScript based FHIR servers.
JavaScript
15
star
14

node-rest-starter

A Node.js starter containing common components and services as a reference API.
TypeScript
14
star
15

fhir-facade-starter

Node FHIR facade server built on Asymmetrik node-fhir-server-core.
JavaScript
13
star
16

nifi-nar-bundles

Java
13
star
17

ngx-starter

An @angular/cli based starter containing common components and services as well as a reference site.
TypeScript
12
star
18

angular-leaflet-directive-ext

Angular directive for integrating the leaflet-hexbin plugin for leaflet.
JavaScript
10
star
19

elastic-querybuilder

A query builder for Elasticsearch.
JavaScript
9
star
20

ngx-leaflet-tutorial-ngcli

TypeScript
8
star
21

leaflet-filter

Leaflet plugin that leverages leaflet.draw to allow the user to draw a bounding box filter on a map.
JavaScript
6
star
22

ngx-instrumentation

Helper components, classes, and services for instrumenting an Angular.io application
TypeScript
6
star
23

ngx-leaflet-filter

TypeScript
5
star
24

kyruus-php-sdk

An SDK to use the Kyruus ProviderMatch search APIs in your PHP application
PHP
4
star
25

yadda

Yet Another Docker Deployment Application
JavaScript
4
star
26

node-cds-hooks

A framework for creating CDS Hooks applications
TypeScript
4
star
27

mean2-starter

JavaScript
4
star
28

workamajig-node

A Node SDK for the Workamajig API
JavaScript
4
star
29

node-cds-hooks-starter

Open Source CDS Hooks starter project. Start building your CDS Hooks App right away
JavaScript
4
star
30

react-starter

Starter package for a React based single page application.
JavaScript
3
star
31

ngx-template

Angular.io Component Template
JavaScript
2
star
32

sentio

JavaScript
2
star
33

a11y-standards

Accessibility Standards for Developers
2
star
34

nifi-nars

Assorted Apache NiFi processors, controller services, etc.
Java
2
star
35

nest-starter

A Nest starter containing common components and services as a reference API.
TypeScript
2
star
36

broad-hammer

JavaScript
1
star
37

ngx-sentio

Components for integrating Sentio with Angular.io
TypeScript
1
star
38

meanjs-starter

Starter project for MEAN application
JavaScript
1
star
39

kyruus-node-sdk

An SDK to use the Kyruus ProviderMatch search APIs in your NodeJS application
JavaScript
1
star
40

broad-tsv-converter

JavaScript
1
star
41

generator-mean2starter

A yeoman generator that creates a Node/Express/Mongo/Angular2 starter framework for applications and Docker-based microservices.
JavaScript
1
star