Skip to content

Instantly share code, notes, and snippets.

@jacqui
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacqui/dc91d8de272a2f00f742 to your computer and use it in GitHub Desktop.
Save jacqui/dc91d8de272a2f00f742 to your computer and use it in GitHub Desktop.
engima.io cdc vaccine reaction data
{
"Blocks": [
{
"Id": "14",
"Type": "webRequest",
"Rule": {
"BodyPath": ".",
"Headers": {},
"Method": "GET",
"Url": "https://api.enigma.io/v2/data/2d7e8330098f1146ff192effbdb03f71/us.gov.cdc.vaers.symptoms.2014?conjunction=and",
"UrlPath": ""
},
"Position": {
"X": 289,
"Y": 163
}
},
{
"Id": "15",
"Type": "bang",
"Rule": null,
"Position": {
"X": 183,
"Y": 69
}
},
{
"Id": "17",
"Type": "tolog",
"Rule": null,
"Position": {
"X": 298,
"Y": 427
}
},
{
"Id": "5",
"Type": "cache",
"Rule": {
"KeyPath": ".id",
"TimeToLive": "24h",
"ValuePath": ".symptoms"
},
"Position": {
"X": 466,
"Y": 403
}
},
{
"Id": "19",
"Type": "unpack",
"Rule": {
"ArrayPath": ".body.result",
"LabelPath": ""
},
"Position": {
"X": 266,
"Y": 248
}
},
{
"Id": "3",
"Type": "javascript",
"Rule": {
"MessageIn": "input",
"MessageOut": "output",
"Script": "var symptoms = [];\n\n[1,2,3,4,5].forEach(function(element, index, array) {\n\n if (input['symptom' + element] != null) {\n symptoms.push(input['symptom' + element]);\n }\n});\n\n\noutput = {\n\"id\": input.vaers_id,\n\"symptoms\": symptoms\n}"
},
"Position": {
"X": 231,
"Y": 327
}
}
],
"Connections": [
{
"Id": "16",
"FromId": "15",
"ToId": "14",
"ToRoute": "in"
},
{
"Id": "20",
"FromId": "14",
"ToId": "19",
"ToRoute": "in"
},
{
"Id": "6",
"FromId": "3",
"ToId": "5",
"ToRoute": "in"
},
{
"Id": "7",
"FromId": "3",
"ToId": "17",
"ToRoute": "in"
},
{
"Id": "4",
"FromId": "19",
"ToId": "3",
"ToRoute": "in"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment