New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kaitenzushi

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kaitenzushi

A build system for FHIR Shorthand

0.0.7
latest
npm
Version published
Weekly downloads
2
-33.33%
Maintainers
5
Weekly downloads
 
Created
Source

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

ParameterAliasDescriptionDefault valueRequiredUsage example
--inputPath-iPath to folder or single file.NoneTruenpx kaitenzushi -i fsh
--outputPath-oPlace to keep results./artifactsFalsenpx kaitenzushi -i fsh -o results
--resourceType-rTarget resource to translate.TestScriptFalsenpx kaitenzushi -i fsh -r Patient
--target-tExtension of the result. Can be yaml or json.YAMLFalsenpx kaitenzushi -i fsh -t JSON
--dependency-dLink to GitHub repo with FSH files.NoneFalsenpx kaitenzushi -i fsh -t <reps/github/repo>

How to use as a local package

General

  • ⚙️ Install dependencies
    yarn install
    

For the test you implementation FSH -> JSON

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

To convert files FSH -> YAML/JSON

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

Notes

  • The FSH file should have a similar name to the JSON file (ex: ./fsh/TestScript_test.fsh => ./fhir/TestScript_test.json);
  • 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

  • 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.
  • RuleSet: Rule sets provide the ability to define a group of rules as an independent entity.
  • SUSHI: SUSHI (SUSHI Unshortens ShortHand Inputs) is a FSH compiler. SUSHI converts FSH language to FHIR artifacts.
  • TestScript: A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
  • 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

  • FSHschool;
  • TestScript resource FHIR documentation;
  • RuleSet description FHIR documentation.

Keywords

fhir

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts