Skip to content

Instantly share code, notes, and snippets.

@denniskigen
Last active April 14, 2020 09:20
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 denniskigen/50673442f6687d07b0305f93b147670a to your computer and use it in GitHub Desktop.
Save denniskigen/50673442f6687d07b0305f93b147670a to your computer and use it in GitHub Desktop.
Snippet from the Oncology VIA form showing the `prior via result` question
{
"label": "Prior VIA result:",
"id": "priorviaresult",
"type": "obs",
"historicalExpression": "HD.getObject('prevEnc').getValue('f165c64a-9354-4145-9b06-4ee437630218')",
"questionOptions": {
"concept": "f165c64a-9354-4145-9b06-4ee437630218",
"rendering": "select",
"answers": [
{
"concept": "a896f3a6-1350-11df-a1f1-0026b9348838",
"label": "Positive"
},
{
"concept": "a896d2cc-1350-11df-a1f1-0026b9348838",
"label": "Negative"
}
],
"showDate": "true",
"shownDateOptions": {
"validators": [
{
"type": "date"
},
{
"type": "js_expression",
"failsWhenExpression": "isEmpty(priorviaresult) && isEmpty(myValue)",
"message": "Date result is required."
}
],
"hide": {
"hideWhenExpression": "isEmpty(priorviaresult)"
}
}
},
"validators": [],
"hide": {
"hideWhenExpression": "priorviatest !== 'a899b35c-1350-11df-a1f1-0026b9348838'"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment