• Stars
    star
    149
  • Rank 248,561 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 2 months ago

Reviews

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

Repository Details

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

Asymmetrik FHIR API Server + Mongo Example

Build Status Known Vulnerabilities

Intro

This project is an example project built on @asymmetrik/node-fhir-server-core and has a MongoDB back end storing sample data. It's built with the ability to run in docker or node.js. To get started developing in Docker, see Getting Started with Docker. To get started developing with Node.js and Mongo, see Getting Started with Node. You can serve multiple versions of FHIR with just one server. By default, R4 (4_0_0) is enabled but DSTU2 (1.0.2) and STU3 (3.0.1) are also supported. You can choose to support all versions or just one version by editing the config.

Getting Started with Docker

  1. Install the latest Docker Community Edition for your OS if you do not already have it installed.
  2. Run docker compose up.

Getting Started with Node

  1. Install the latest LTS for Node.js if you do not already have it installed.
  2. Install the latest Mongo Community Edition if you do not already have it installed.
  3. Make sure the default values defined in env.json are valid.
  4. Run yarn or npm install.
  5. Run yarn start or npm run start.

Next Steps

The server should now be up and running on the default port 3000. You should see the following output:

... - verbose: Server is up and running!

Lets give this a try on your server

Capability Statements

By default, R4 is enabled for the Patient and Organization resource. The capability statements are dynamically generated based on which resources you enable.

Other versions if enabled.

Using any request builder (i.e. Postman), let's create a new patient.

R4 Patient (Content-Type: application/fhir+json)

Create Patient

PUT /4_0_0/Patient/example HTTP/1.1
Host: localhost:3000
Content-Type: application/fhir+json
Cache-Control: no-cache

# Raw Body
{
  "resourceType": "Patient",
  "id": "example",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t<td>Peter James \n              <b>Chalmers</b> (&quot;Jim&quot;)\n            </td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Address</td>\n\t\t\t\t\t\t<td>534 Erewhon, Pleasantville, Vic, 3999</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Contacts</td>\n\t\t\t\t\t\t<td>Home: unknown. Work: (03) 5555 6473</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Id</td>\n\t\t\t\t\t\t<td>MRN: 12345 (Acme Healthcare)</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
  },
  "identifier": [
    {
      "use": "usual",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
            "code": "MR"
          }
        ]
      },
      "system": "urn:oid:1.2.36.146.595.217.0.1",
      "value": "12345",
      "period": {
        "start": "2001-05-06"
      },
      "assigner": {
        "display": "Acme Healthcare"
      }
    }
  ],
  "active": true,
  "name": [
    {
      "use": "official",
      "family": "Chalmers",
      "given": [
        "Peter",
        "James"
      ]
    },
    {
      "use": "usual",
      "given": [
        "Jim"
      ]
    },
    {
      "use": "maiden",
      "family": "Windsor",
      "given": [
        "Peter",
        "James"
      ],
      "period": {
        "end": "2002"
      }
    }
  ],
  "telecom": [
    {
      "use": "home"
    },
    {
      "system": "phone",
      "value": "(03) 5555 6473",
      "use": "work",
      "rank": 1
    },
    {
      "system": "phone",
      "value": "(03) 3410 5613",
      "use": "mobile",
      "rank": 2
    },
    {
      "system": "phone",
      "value": "(03) 5555 8834",
      "use": "old",
      "period": {
        "end": "2014"
      }
    }
  ],
  "gender": "male",
  "birthDate": "1974-12-25",
  "_birthDate": {
    "extension": [
      {
        "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
        "valueDateTime": "1974-12-25T14:35:45-05:00"
      }
    ]
  },
  "deceasedBoolean": false,
  "address": [
    {
      "use": "home",
      "type": "both",
      "text": "534 Erewhon St PeasantVille, Rainbow, Vic  3999",
      "line": [
        "534 Erewhon St"
      ],
      "city": "PleasantVille",
      "district": "Rainbow",
      "state": "Vic",
      "postalCode": "3999",
      "period": {
        "start": "1974-12-25"
      }
    }
  ],
  "contact": [
    {
      "relationship": [
        {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0131",
              "code": "N"
            }
          ]
        }
      ],
      "name": {
        "family": "du Marché",
        "_family": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
              "valueString": "VV"
            }
          ]
        },
        "given": [
          "Bénédicte"
        ]
      },
      "telecom": [
        {
          "system": "phone",
          "value": "+33 (237) 998327"
        }
      ],
      "address": {
        "use": "home",
        "type": "both",
        "line": [
          "534 Erewhon St"
        ],
        "city": "PleasantVille",
        "district": "Rainbow",
        "state": "Vic",
        "postalCode": "3999",
        "period": {
          "start": "1974-12-25"
        }
      },
      "gender": "female",
      "period": {
        "start": "2012"
      }
    }
  ],
  "managingOrganization": {
    "reference": "Organization/1"
  }
}

Read Patient

GET /4_0_0/Patient/example HTTP/1.1
Host: localhost:3000
Content-Type: application/fhir+json
Cache-Control: no-cache

Determine which resources you want to support

In this example, only the Patient and Organization resource is filled out. You will need to fill in the other services for the resources you would like to support. The routes will only be available for the resource you enabled. You can view the available resources over at @asymmetrik/node-fhir-server-core.

License

@asymmetrik/fhir-server-mongo 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

graphql-fhir

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.
JavaScript
167
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