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

kaitenzushi

v0.0.7

Published

A build system for FHIR Shorthand

Downloads

16

Readme

Kaitenzushi (回転寿司) is a build system for FHIR Shorthand.

Kaitenzushi banner

Motivation

For research purposes...

As developers of healthcare applications, we manipulate FHIR resources every day, which often have a large number of rows. FSH allows us to reduce the amount of code and thanks to tools such as RuleSet, we can create reusable pieces in FHIR-first applications. We want to find a way to write simple, maintainable FHIR resources for our projects.

The current main goal is to understand how FSH could help us to create comfortable for developers TestScript resources.

How to use it as a package

npx kaitenzushi -i <path/to/sources> -o <path/to/output/dir> -r <FHIR resource name>

Available Parameters

| Parameter | Alias | Description | Default value | Required | Usage example | |----------------|-------|-----------------------------------------------|---------------|----------|----------------------------------------------| | --inputPath | -i | Path to folder or single file. | None | True | npx kaitenzushi -i fsh | | --outputPath | -o | Place to keep results. | /artifacts | False | npx kaitenzushi -i fsh -o results | | --resourceType | -r | Target resource to translate. | TestScript | False | npx kaitenzushi -i fsh -r Patient | | --target | -t | Extension of the result. Can be yaml or json. | YAML | False | npx kaitenzushi -i fsh -t JSON | | --dependency | -d | Link to GitHub repo with FSH files. | None | False | npx kaitenzushi -i fsh -t <reps/github/repo> |

How to use as a local package

General

  1. ⚙️ Install dependencies
    yarn install

For the test you implementation FSH -> JSON

  1. 🐟 Add your FSH file to the /fsh folder;
  2. 🔥 Add your FHIR file in JSON format to the /fhir folder (the expected result of the transform from FSH to FHIR);
  3. 🧪 Run tests
    yarn test

To convert files FSH -> YAML/JSON

  1. Base translate
yarn fshToFHIR -i path/to/source/or/single/file
  1. Translate with all parameters
yarn fshToFHIR -i path/to/source/or/single/file -o path/to/output/folder -r TestScript -e yaml

Notes

  1. The FSH file should have a similar name to the JSON file (ex: ./fsh/TestScript_test.fsh => ./fhir/TestScript_test.json);
  2. File names should include a prefix with target resourceType (Because in some cases to generate an FHIR resource you should create a few FHIR artifacts and the SUSHI compilator will return back a list of the resources. We should mark a target resource for test purposes);

Dictionary

  1. FSH: FHIR Shorthand (FSH) is a domain-specific language for defining the contents of FHIR Implementation Guides (IG). FSH can be created and updated using any text editor. Because it is text, it enables distributed, team-based development using source code control tools such as GitHub.
  2. RuleSet: Rule sets provide the ability to define a group of rules as an independent entity.
  3. SUSHI: SUSHI (SUSHI Unshortens ShortHand Inputs) is a FSH compiler. SUSHI converts FSH language to FHIR artifacts.
  4. TestScript: A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
  5. Kaitenzushi: Kaitenzushi (回転寿司), also known as conveyor belt sushi or sushi train, is a convenient and affordable type of sushi restaurant characterized by the conveyor belt that winds through the restaurant. The conveyor belt carries plates of sushi past the diners, who can take whatever they wish. The price per plate starts around 100 yen. Kaitenzushi tend to be considerably cheaper than conventional sushi-ya.

References

  1. FSHschool;
  2. TestScript resource FHIR documentation;
  3. RuleSet description FHIR documentation.