...
ClinSpark supports “Formal Expressions” through Javascript. This is the Javascript code which gets executed to accomplish the task. It is the contents of a method, which makes some calculation, performs whatever logic is required to implement either the MethodDef or the RangeCheck.
Info |
---|
ClinSpark currently uses the Mozilla Rhino Javascript engine bundled with Java 7. This implementation of Rhino is based on version 1.7R3 pre-release sources with Oracle modifications. The ClinSpark product team is evaluating support for more modern Javascript engines in a future release. Customers that have feedback on this topic are encouraged to reach out via service desk with questions or concerns. |
Here’s an example of a method in ClinSpark which calculates BMI. It is designed to be associated with a Item who has other Items named Height and Weight. It retrieves these values from JSON passed to the method, performs the calculation, then returns a JSON response which includes the units.
...