Git Product home page Git Product logo

module-builder's Introduction

SyntheaTM Module Builder

The SyntheaTM Module Builder is a visual editor for creating and modifying SyntheaTM Patient Generator modules using the SyntheaTM Generic Module Framework. It supports the entire Generic Module Framework specification and allows users to create full-featured modules without needing to directly edit JSON files. It is preloaded with all modules contained within the current SyntheaTM Github Repository. Users can either edit these modules or create new ones to extend the capabilities of SyntheaTM.

Getting Started

Users are encouraged to use the hosted version of the Module Builder:

https://synthetichealth.github.io/module-builder/

If you are new to authoring SyntheaTM modules, please review the Generic Module Framework (GMF) Documentation. Some familiarity with the GMF is required before beginning the authoring process.

Local Installation

Local installation typically is not necessary, unless you plan on contributing improvements the Module Builder itself. It is written in Javascript using React and requires Node.js to run locally. Once Node.js is installed, run the following commands to run a local copy of the Module Builder:

npm install
npm start

This will start a local copy running at http://localhost:3000/

Saving Modules

Download as JSON

Modules created and edited through the Module Builder can be downloaded and saved as a JSON file. Click the Download button at the top of the interface, and you can either copy the JSON in the modal text box, or click the Download button on the bottom of the modal to save as a local file.

Once saved as a JSON file (using the .json extension), you can use the module within your own local installation of Synthea. See the Generic Module Framework for information on where to place the file.

Save to Local Storage

Modules can also be saved to local storage in the browser. Click the Download button at the top of the interface, and click the Save to Local Storage button at the bottom of the modal. To load an existing module from local storage, select it from the Local Storage list when opening an existing module.

Developer Tasks

The following information is only relevant to developers improving the Module Builder itself.

Synchronizing Generic Modules in Synthea

This application currently embeds all generic modules within the application. In order to update these modules to match the most recent ones available in the Synthea repository, run the build-modules script, pointing to the modules directory within a local copy of Synthea.

npm run build-modules ../synthea/src/main/resources/modules # Point to the modules directory of synthea
git status # This should have changed ./src/data/modules.js
npm test # Run tests to ensure the new modules file valid

Running Tests

To run tests on the Module Builder, execute the following command:

npm test

Deploying Updated Version of Synthea

If you have administrative access to the Generic Module Builder repository, you can deploy updates to the Module Builder site. Before deploying, you should consider synchronizing the modules in the repository and must run the tests.

npm run deploy

This updates the gh-pages branch on the repository with the new build, and changes will be reflected on the site within a few minutes.

License

Copyright 2016-2020 The MITRE Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

module-builder's People

Contributors

amol-wani-elimu avatar arscan avatar cjduffett avatar dehall avatar dependabot[bot] avatar dubem7 avatar eedrummer avatar hadleynet avatar jawalonoski avatar kaicode avatar laambrosino avatar mdube7 avatar mrnosal avatar schreiaj avatar shabiel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.