Skip to content

Provisional Quarterly Patient Reported Outcome Measures (PROMs) in England - April 2015 to March 2016, November 2016 release

License

Notifications You must be signed in to change notification settings

david0963658/sample-patients-prom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-patients-prom

Provisional Quarterly Patient Reported Outcome Measures (PROMs) in England - April 2015 to March 2016, November 2016 release

This tool was written only to reduce the amount of manual work that was needed in order to convert the raw data into fhir bundles that can be inserted into the server. It's primary purpose is to parse CSV files and generate STU3 transaction bundles.

The behavior of this tool depends on the settings in the config file src/config.js. It contains one object called "types" holding settings for different resources. For example:

// type
Patient: {

    // the CSV file at `input_files/csv/Patient.csv` should be parsed
    source: "input_files/csv/Patient.csv",

    // the first `3` lines of the CSV file should be skipped (because they are headers)
    csvHeaders: 3,

    // Then the extracted data should be passed to the template function imported from `src/templates/Patient.js`.
    template: require("./templates/Patient.js"),

    // If true, write the result to "out/{type}/{resource-id}.json"
    // If false do not create files
    write: true
}

Once all the resources described in the config file are processed, the script will create transaction bundles that are ready to be uploaded and save them in out/Transaction.

Installation

First make sure you have new version of Node that supports async functions (tested with v7.9.0) and then do:

git clone https://github.com/smart-on-fhir/sample-patients-prom.git
cd sample-patients-prom
npm i

Usage

cd sample-patients-prom

# run
npm start

# test
npm test

# remove files generated by previous runs
npm run clean

About

Provisional Quarterly Patient Reported Outcome Measures (PROMs) in England - April 2015 to March 2016, November 2016 release

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%