Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency and rename to bluehalo #361

Merged
merged 11 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

70 changes: 0 additions & 70 deletions .eslintrc

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
**/node_modules/**
**/dist/**
**/__tmp__/**
lerna.json
coverage/
coverage/
**/resources/**
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Asymmetrik FHIR API Server
# Bluehalo FHIR API Server

> A Secure Rest implementation for the [HL7 FHIR Specification](https://www.hl7.org/fhir/). For API documentation, please see [our documents](https://github.com/Asymmetrik/node-fhir-server-core/tree/master/docs).
> A Secure Rest implementation for the [HL7 FHIR Specification](https://www.hl7.org/fhir/). For API documentation, please see [our documents](https://github.com/Bluehalo/node-fhir-server-core/tree/master/docs).

[![Build Status](https://travis-ci.org/Asymmetrik/node-fhir-server-core.svg?branch=develop)](https://travis-ci.org/Asymmetrik/node-fhir-server-core) [![Known Vulnerabilities](https://snyk.io/test/github/asymmetrik/node-fhir-server-core/badge.svg?targetFile=package.json)](https://snyk.io/test/github/asymmetrik/node-fhir-server-core?targetFile=package.json)
[![Build Status](https://travis-ci.org/Bluehalo/node-fhir-server-core.svg?branch=develop)](https://travis-ci.org/Bluehalo/node-fhir-server-core) [![Known Vulnerabilities](https://snyk.io/test/github/bluehalo/node-fhir-server-core/badge.svg?targetFile=package.json)](https://snyk.io/test/github/bluehalo/node-fhir-server-core?targetFile=package.json)

ekdeveloper marked this conversation as resolved.
Show resolved Hide resolved
The Asymmetrik Extensible Server Framework for Healthcare allows organizations to build secure, interoperable solutions that can aggregate and expose healthcare resources via a common HL7® FHIR®-compatible REST API. This server framework currently supports **DSTU2** (1.0.2), **STU3** (3.0.1), and **R4** (4.0.0) simultaneously. You can decide to support all three or just one by editing the configuration.
The Bluehalo Extensible Server Framework for Healthcare allows organizations to build secure, interoperable solutions that can aggregate and expose healthcare resources via a common HL7® FHIR®-compatible REST API. This server framework currently supports **DSTU2** (1.0.2), **STU3** (3.0.1), and **R4** (4.0.0) simultaneously. You can decide to support all three or just one by editing the configuration.

The framework defines a core server, `node-fhir-server-core`, a simple, secure Node.js module built according to the FHIR specification and compliant with the [US Core](http://www.hl7.org/fhir/us/core/) implementation.

For an example implementation using MongoDB, please refer to our Github repository that we used for the ONC FHIR Secure API Server Showdown Challenge: [https://github.com/Asymmetrik/node-fhir-server-mongo](https://github.com/Asymmetrik/node-fhir-server-mongo).
For an example implementation using MongoDB, please refer to our Github repository that we used for the ONC FHIR Secure API Server Showdown Challenge: [https://github.com/Bluehalo/node-fhir-server-mongo](https://github.com/Bluehalo/node-fhir-server-mongo).

<img src="https://www.asymmetrik.com/wp-content/uploads/2018/01/FHIR-Server-Architecture_Update.png" width="800">
<img src="https://www.bluehalo.com/wp-content/uploads/2018/01/FHIR-Server-Architecture_Update.png" width="800" alt="">

## [email protected]

Please view the [Migration Guide](https://github.com/Asymmetrik/node-fhir-server-core/blob/master/docs/MIGRATION_2.0.0.md) for version `2.0.0`. We **will absolutely** continue supporting previous versions but **will prioritize** new features going to `2.0.0` unless we receive requests to retrofit them to older versions.
Please view the [Migration Guide](https://github.com/Bluehalo/node-fhir-server-core/blob/master/docs/MIGRATION_2.0.0.md) for version `2.0.0`. We **will absolutely** continue supporting previous versions but **will prioritize** new features going to `2.0.0` unless we receive requests to retrofit them to older versions.

## Prerequisites

Expand All @@ -37,20 +37,20 @@ Please see our [Getting Started](./docs/GettingStarted.md) guide for a walkthrou

Our project vision is to build an easy to use FHIR server that supports all resource profiles defined in the [US Core implementation guide](http://www.hl7.org/fhir/us/core/) and is built with security in mind from the ground up. We decided to use a plugin style architecture so implementors could focus on writing queries and not worry about all the other technical difficulties of securing the server. As this project matures, we plan to support more resources, custom extensions, versions, write capabilities, etc.

We believe in establishing a robust security, especially when it comes to health information. Part of the ONC Secure API Server Challenge was to stand up a server and let penetration testers have a go at it (you can see their results [here](https://github.com/Asymmetrik/node-fhir-server-core/issues?utf8=%E2%9C%93&q=label%3A%22ONC+FHIR+Challenge+Vulnerability%22+)). We are committed to continuing this practice and we will continue fixing any vulnerabilities discovered so we can do our best to make this server as secure as possible. For authentication, we are actively working on methods for simplifying integration with [SMART on FHIR](http://docs.smarthealthit.org/).
We believe in establishing a robust security, especially when it comes to health information. Part of the ONC Secure API Server Challenge was to stand up a server and let penetration testers have a go at it (you can see their results [here](https://github.com/Bluehalo/node-fhir-server-core/issues?utf8=%E2%9C%93&q=label%3A%22ONC+FHIR+Challenge+Vulnerability%22+)). We are committed to continuing this practice and we will continue fixing any vulnerabilities discovered so we can do our best to make this server as secure as possible. For authentication, we are actively working on methods for simplifying integration with [SMART on FHIR](http://docs.smarthealthit.org/).

## Contributing

Please see [CONTRIBUTING.md](https://github.com/Asymmetrik/node-fhir-server-core/blob/master/CONTRIBUTING.md) for more details regarding contributing issues or code.
Please see [CONTRIBUTING.md](https://github.com/Bluehalo/node-fhir-server-core/blob/master/CONTRIBUTING.md) for more details regarding contributing issues or code.

## Questions

If you are experiencing a bug, please feel free to file an [issue](https://github.com/Asymmetrik/node-fhir-server-core/issues). For general questions, please post them to [StackOverflow](https://stackoverflow.com/) with the tag `node-fhir-server-core` or `javascript-fhir`.
If you are experiencing a bug, please feel free to file an [issue](https://github.com/Bluehalo/node-fhir-server-core/issues). For general questions, please post them to [StackOverflow](https://stackoverflow.com/) with the tag `node-fhir-server-core` or `javascript-fhir`.

## Attention

This library makes use of node's path module. This is potentially exploitable in node version `8.5`, see [here](https://nodejs.org/en/blog/vulnerability/september-2017-path-validation/). When deploying this, you need to deploy with a node version later than `>7.6` but **NOT** `8.5`.

## License

`@asymmetrik/node-fhir-server-core` is [MIT licensed](https://github.com/Asymmetrik/node-fhir-server-core/blob/master/LICENSE).
`@bluehalo/node-fhir-server-core` is [MIT licensed](https://github.com/Bluehalo/node-fhir-server-core/blob/master/LICENSE).
10 changes: 0 additions & 10 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,5 @@
}
]
],
"build": {
"ignore": [
"**/*.test.ts",
"**/*.test.ts",
"**/*.story.tsx",
"__snapshots__",
"__tests__",
"__stories__"
]
},
"ignore": ["node_modules"]
}
12 changes: 6 additions & 6 deletions docs/AccessControl.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We have built-in support if you are using [SMART on FHIR](http://docs.smarthealt
When setting up your FHIR server, add the following config entries to your current configuration:

```javascript
const FHIRServer = require('@asymmetrik/node-fhir-server-core');
const FHIRServer = require('@bluehalo/node-fhir-server-core');

let server = FHIRServer.initialize({
auth: {
Expand All @@ -37,7 +37,7 @@ And that is all that is needed as far as config goes, but let's take a look at h
If you are not familiar with writing passport strategies, you can use [`@asymmetrik/sof-strategy`](https://github.com/Asymmetrik/node-fhir-server-core/tree/master/packages/sof-strategy). To use this, create a file that looks like this:

```javascript
const smartBearerStrategy = require('@asymmetrik/sof-strategy');
const smartBearerStrategy = require('@bluehalo/sof-strategy');

module.exports.strategy = smartBearerStrategy({
introspectionUrl: process.env.INTROSPECTION_URL,
Expand All @@ -49,7 +49,7 @@ module.exports.strategy = smartBearerStrategy({
You will also need to add `@asymmetrik/sof-strategy` as a dependency by running:

```shell
yarn add @asymmetrik/sof-strategy
yarn add @bluehalo/sof-strategy
```

And define these environment variables: `INTROSPECTION_URL`, `CLIENT_ID`, and `CLIENT_SECRET`.
Expand Down Expand Up @@ -102,15 +102,15 @@ There are also more advanced ways to set up the server. By default, if you do no
In our [Getting Started](GettingStarted.md) section, we showed you how to create a FHIR server by calling `initialize` and giving it some config, like so:

```javascript
const FHIRServer = require('@asymmetrik/node-fhir-server-core');
const FHIRServer = require('@bluehalo/node-fhir-server-core');

let server = FHIRServer.initialize({ ...someConfig });
```

What initialize is actually doing is just calling several internal methods. You can replicate the initialize method by doing the following:

```javascript
const { Server } = require('@asymmetrik/node-fhir-server-core');
const { Server } = require('@bluehalo/node-fhir-server-core');

let server = new Server(config)
.configureMiddleware()
Expand All @@ -127,7 +127,7 @@ let server = new Server(config)
You can `initialize` a server with your own express app if you need further customization.

```javascript
const { initialize, loggers, constants } = require('@asymmetrik/node-fhir-server-core');
const { initialize, loggers, constants } = require('@bluehalo/node-fhir-server-core');
const express = require('express');

let config = {};
Expand Down
20 changes: 10 additions & 10 deletions docs/ConfiguringProfiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Each profile has a pre-defined set of methods it can implement. If you do not wa
**NOTE** - We used to pass the logger in as an argument. We have made several changes to loggers in general to make them more flexible and less annoying to pass around. You now need to load them yourselves from the core library. You also need to load the schemas and return the objects explicitly as we no longer do the casting ourselves. A service will commonly at least have the following setup:

```javascript
const { loggers, resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { loggers, resolveSchema } = require('@bluehalo/node-fhir-server-core');
const logger = loggers.get('default');
```

Expand All @@ -69,7 +69,7 @@ const logger = loggers.get('default');
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.search = async (args, context) => {
let BundleEntry = resolveSchema(args.base_version, 'bundleentry');
Expand All @@ -93,7 +93,7 @@ module.exports.search = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.searchById = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand All @@ -111,7 +111,7 @@ module.exports.searchById = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.searchByVersionId = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand All @@ -129,7 +129,7 @@ module.exports.searchByVersionId = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.history = async (args, context) => {
let BundleEntry = resolveSchema(args.base_version, 'bundleentry');
Expand All @@ -154,7 +154,7 @@ module.exports.history = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.historyById = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand All @@ -172,7 +172,7 @@ module.exports.historyById = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.create = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand All @@ -196,7 +196,7 @@ module.exports.create = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.update = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand Down Expand Up @@ -224,7 +224,7 @@ module.exports.update = async (args, context) => {
- **Example:**

```javascript
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.patch = async (args, context) => {
let Patient = resolveSchema(args.base_version, 'patient');
Expand Down Expand Up @@ -255,7 +255,7 @@ module.exports.patch = async (args, context) => {
- **Example:**

```javascript
const { ServerError } = require('@asymmetrik/node-fhir-server-core');
const { ServerError } = require('@bluehalo/node-fhir-server-core');
// In patient service
module.exports.remove = async (args, context) => {
try {
Expand Down
4 changes: 2 additions & 2 deletions docs/CustomCapability.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ First, we're going to require the Asymmetrik FHIR Server source code. This will

```javascript
// require the Asymmetrik FHIR Server
const FHIRServer = require('@asymmetrik/node-fhir-server-core');
const FHIRServer = require('@bluehalo/node-fhir-server-core');
```

Then we'll create a function that will require the `CapabilityStatement` class, and return a new instance that contains your information. Please make sure you remain compliant with the FHIR specification.
Expand Down Expand Up @@ -102,7 +102,7 @@ module.exports.generateStatements = (args) => {
Now that we've built out our Statement Generator and have customized the Capability Statement info to our liking, we can add it to our configuration by doing the following:

```javascript
const FHIRServer = require('@asymmetrik/node-fhir-server-core');
const FHIRServer = require('@bluehalo/node-fhir-server-core');
const generateCapabilityStatement = require('path to your statement generator file').generateStatements; // require the statement generator file

let config = {
Expand Down
6 changes: 3 additions & 3 deletions docs/CustomizeLogging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ If you simply need to use the core fhir server `winston` Container you can do so

```javascript
// Your patient.service.js
const { resolveSchema } = require('@asymmetrik/node-fhir-server-core');
const { loggers } = require('@asymmetrik/node-fhir-server-core');
const { resolveSchema } = require('@bluehalo/node-fhir-server-core');
const { loggers } = require('@bluehalo/node-fhir-server-core');
const logger = loggers.get('default');

module.exports.search = async (args, context) => {
Expand Down Expand Up @@ -36,7 +36,7 @@ You can access the core `winston` Transports manually using `Server.configureLog

```javascript
// Example server with write to file logging
const { initialize } = require('@asymmetrik/node-fhir-server-core');
const { initialize } = require('@bluehalo/node-fhir-server-core');

const fhirServerConfig = {
profiles: {
Expand Down
6 changes: 3 additions & 3 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ fhir-server
Next, run:

```shell
yarn add @asymmetrik/node-fhir-server-core
yarn add @bluehalo/node-fhir-server-core
```

### Create an entry file and a start script

Let's start by creating an `index.js` file in the root of the project and add the following code to it:

```javascript
const { initialize, loggers, constants } = require('@asymmetrik/node-fhir-server-core');
const { initialize, loggers, constants } = require('@bluehalo/node-fhir-server-core');

let config = {};
let server = initialize(config);
Expand Down Expand Up @@ -127,7 +127,7 @@ The next thing we need to do is update our config in `index.js` to tell it we wa
In `index.js`, add the following to the top of the file:

```javascript
const { initialize, loggers, constants } = require('@asymmetrik/node-fhir-server-core');
const { initialize, loggers, constants } = require('@bluehalo/node-fhir-server-core');
const { VERSIONS } = constants;
```

Expand Down
Loading
Loading