Excel-to-fhir

A utility to assist in managing FHIR resources in spreadsheets.

1
contributor
13 commits | Last commit 4 months ago

What Excel-to-fhir can do for you

EXCEL to FHIR

This typescript tool helps you manage FHIR resources in a spreadsheet (EXCEL).

This tool converts source data in the spreadsheet to FHIR resources in JSON in following steps:

  • convert format: read the spreadsheet and convert it to JSON
  • transform schema: transform the JSON using JSONATA to FHIR resources (JSON)

We use JSONATA to transform schemas with mapping rules
defined in a .jsonata file.

This package aims to transform GameBus Excel to FHIR R4 (ConceptMap) resources,
for which the mapping rules have been defined in this folder.

If there are changes on GameBus Excel schema (e.g. changes on sheets and colomns),
the mapping rules must be updated accordingly. An example of the GameBus Excel
file is provided as gamebus.xlsx.

Requirements

If you have deno installed, it's a good practice to update it to lastest version
using the command: deno upgrade.

Usage

Run the typescript package directly:

# run conversion
deno run --allow-read --allow-write https://raw.githubusercontent.com/nwo-strap/excel-to-fhir/main/excel-to-fhir.ts -f example-excel.xlsx -s sheetname1 sheetname2 -j mapping1.jsonata mapping2.jsonata

# show help
deno run --allow-read --allow-write https://raw.githubusercontent.com/nwo-strap/excel-to-fhir/main/excel-to-fhir.ts -h

Run the typescript package as a command line tool

If you want to install the package as CLI tool and run:

# install
deno install --allow-read --allow-write https://raw.githubusercontent.com/nwo-strap/excel-to-fhir/main/excel-to-fhir.ts

# run conversion
excel-to-fhir -f example-excel.xlsx -s sheetname1 sheetname2 -j mapping1.jsonata mapping2.jsonata

# show help
excel-to-fhir --help

Run Deno tasks

You can define
Deno tasks in the
deno.json file with specific inputs and options.

In the file you can find the task transform, which is defined to convert
gamebus.xlsx file to FHIR resources with all valid sheets (with
all corresponding jsonata files). You can run the conversion with the following
command:

# clone the repo
git clone https://github.com/nwo-strap/excel-to-fhir.git
cd excel-to-fhir

# run the task
deno task transform
Logo of Excel-to-fhir
Keywords
Programming language
  • TypeScript 100%
License
Not specified
</>Source code
Packages
github.com

Participating organisations

Netherlands eScience Center
Eindhoven University of Technology

Contributors

Related projects

STRAP

Self tracking for prevention and diagnosis of heart disease

Updated 20 months ago
In progress

Related software

GameBus FHIR Layer

GA

Enable FHIR service for GameBus and beyond

Updated 3 months ago
1 5