Code Monkey home page Code Monkey logo

gofsh's Introduction

GoFSH

GoFSH is a FHIR Shorthand (FSH) decompiler, able to convert formal FHIR definitions from JSON to FSH.

FHIR Shorthand (FSH) is a specially-designed language for defining the content of FHIR Implementation Guides (IG). It is simple and compact, with tools to produce Fast Healthcare Interoperability Resources (FHIR) profiles, extensions and implementation guides (IG). Because it is a language, written in text statements, FHIR Shorthand encourages distributed, team-based development using conventional source code control tools such as Github.

For more information about the evolving FSH syntax see the FHIR Shorthand Reference Manual.

Installation for GoFSH Users

GoFSH requires Node.js to be installed on the user's system. Users should install Node.js 18. Although previous versions of Node.js may work, they are not officially supported.

Once Node.js is installed, run the following command to install or update GoFSH:

$ npm install -g gofsh

After installation, the gofsh commandline will be available on your path:

$ gofsh --help

Usage: goFSH [path-to-fhir-resources] [options]

Options:
  -o, --out <out>                    the path to the output folder
  -l, --log-level <level>            specify the level of log messages: error, warn, info (default), debug
  -d, --dependency <dependency...>   specify dependencies to be loaded using format dependencyId@version (FHIR R4 included by default)
  -s, --style <style>                specify how the output is organized into files: file-per-definition (default), group-by-fsh-type, group-by-profile, single-file
  -f, --fshing-trip                  run SUSHI on the output of GoFSH and generate a comparison of the round trip results
  -i, --installed-sushi              use the locally installed version of SUSHI when generating comparisons with the "-f" option
  -t, --file-type <type>             specify which file types GoFSH should accept as input: json-only (default), xml-only, json-and-xml
  --indent                           output FSH with indented rules using context paths
  --meta-profile <mode>              specify how meta.profile on Instances should be applied to the InstanceOf keyword: only-one (default), first, none
  -a, --alias-file <alias-filePath>  specify an existing FSH file containing aliases to be loaded.
  --no-alias                         output FSH without generating Aliases
  -u, --useFHIRVersion <fhirVersion> specify which FHIR version to use when it cannot be inferred
  -v, --version                      print goFSH version
  -h, --help                         display help for command

Installation for Developers

GoFSH is a TypeScript project. At a minimum, GoFSH requires Node.js to build, test, and run the CLI. Developers should install Node.js 18. Although previous versions of Node.js may work, they are not officially supported.

Once Node.js is installed, run the following command from this project's root folder:

$ npm install

NPM tasks

The following NPM tasks are useful in development:

Task Description
build compiles src/**/*.ts files to dist/**/*.js files using the TypeScript compiler (tsc)
test runs all unit tests using Jest
test:watch similar to test, but automatically runs affected tests when changes are detected in src files
coverage launches your browser to display the test coverage report
lint checks all src files to ensure they follow project code styles and rules
lint:fix fixes lint errors when automatic fixes are available for them
prettier checks all src files to ensure they follow project formatting conventions
prettier:fix fixes prettier errors by rewriting files using project formatting conventions
check runs all the checks performed as part of ci (test, lint, prettier)
prepare runs the build task before this project is packed or published
prepublishOnly runs the check task before this project is published

To run any of these tasks, use npm run. For example:

$ npm run check

Recommended Development Environment

For the best experience, developers should use Visual Studio Code with the following plugins:

License

Copyright 2020 Health Level Seven International

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

gofsh's People

Contributors

mint-thompson avatar cmoesel avatar ngfreiter avatar jafeltra avatar julianxcarter avatar guhanthuran avatar danieldubrovski avatar aymericgrassart avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.