module-builder icon indicating copy to clipboard operation
module-builder copied to clipboard

Add multi-module attribute inspection

Open mrnosal opened this issue 6 years ago • 2 comments
trafficstars

When writing a module, it can be useful to know what attributes are available from other modules, and to see which modules may set and attribute's value, and which ones may read an attribute's value. An inspector for attributes could give the user a list of attributes available from other modules, and to let them see sample values.

mrnosal avatar Mar 20 '19 21:03 mrnosal

This would be a great feature. The plan was to include this in two of the tabs, but due to time constraints we had to cut back on scope. Though these features should fit right in if someone to implement them.

The 'Attributes List' tab would provide a list of all available attributes, so that a user could search through them to get a hint of what data is available to use.

The 'Related Modules' tab would provide a list of all modules that affect and are affected by the current module, including through the use of attributes. That would help users reason about how the current module affects overall system behavior. The use of attributes as global variables is simple and flexible, but will likely result in unintended (or forgotten) interdependencies as the number of modules increases.

arscan avatar May 17 '19 16:05 arscan

We can generate an attributes.json file in Synthea now, so it could be something we could push/pull directly from the Synthea master build.

If you run ./gradlew attributes it generates the file in the /output folder.

The file has a list of attributes and which modules and states read and write to those attributes.

See https://github.com/synthetichealth/synthea/pull/489

jawalonoski avatar May 17 '19 17:05 jawalonoski