...
Expand | ||
---|---|---|
| ||
Now we are in the Translator! Every Translator component contains a Main.lua module with a main function that is called each time a message is received or on a configured poll time. Notice we can see our sample data (variable Variable named Data) passed to main functionby looking at the Annotation Windows. If we click on the sample data in the annotations, we can view it using The string viewing window. |
Expand | |||||
---|---|---|---|---|---|
| |||||
In main, parse the JSON sample data by passing Data. Create and assign the parsed data to a patient Variable variable.
JSON objects are parsed into Lua tables as dictionaries with key-value pairs. You can see this by clicking the resulting table in the Annotation Window. |
...