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

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
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
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);
- You can use ./fsh/Aliases.fsh to share your aliases between any *.fsh file;
- You can use ./fsh.RuleSet.fsh to share your rule sets between any *.fsh file;
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