npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gofsh

v2.3.1

Published

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

Downloads

121

Readme

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.