-
Notifications
You must be signed in to change notification settings - Fork 663
Generic Module Framework
dehall edited this page Sep 22, 2016
·
38 revisions
Synthea contains a framework for defining modules using JSON. A JSON module configuration describes a progression of states and the transitions between them. On each Synthea generation time-step, the generic framework processes states one at a time to trigger conditions, encounter, medications, and other clinical events.
Future plans for the generic module framework include a web interface to allow clinicians or other healthcare professionals to design Synthea modules with no programming experience required.
Detail and examples for these concepts is available on the following pages:
Within the synthea repository, the following files and paths are relevant to the generic module framework:
- lib/generic/modules/: the path containing the JSON module files that Synthea should process
-
lib/generic/context.rb: the
Context
class definition; responsible for maintaining a modules state definition, state history, and current state for each patient. TheContext
class also processes states and transitions. -
lib/generic/logic.rb: the
Logic
module implements the methods corresponding to the support logical condition types -
lib/generic/states.rb: the
States
module implements the support state types -
modules/generic.rb: the
Generic
module defines the Synthearule
that is executed on every time-step. It loops through the modules in lib/generic/modules/, setting up and running the context for each module. - test/fixtures/generic/*.json: the test fixtures for all of the generic module framework unit tests
- test/generic_*_test.rb: the unit tests for the generic module framework's context, logic, and state implementations