Skip to content

Instantly share code, notes, and snippets.

@vlindhol
Last active April 18, 2017 10:12
Show Gist options
  • Save vlindhol/c29f6ff2e7c56aec1123550db631d4e2 to your computer and use it in GitHub Desktop.
Save vlindhol/c29f6ff2e7c56aec1123550db631d4e2 to your computer and use it in GitHub Desktop.
Different answer types for FHIR QuestionnaireResponse
// QuestionnaireResponse containing all possible answer types
{
"language": "fi",
"questionnaire": "SomeURI",
"resourceType": "QuestionnaireResponse",
"status": "completed",
"item": [
{
"answer": [{
// e.g. age in whole years
"valueInteger": 45
}],
"linkId": "3"
},
{
"answer": [{
// e.g. fever / no fever
"valueBoolean": false
}],
"linkId": "584"
},
{
"answer": [{
// e.g. fever degrees
"valueDecimal": 37.2
}],
"linkId": "35"
},
{
"answer": [{
"valueString": "String answers are ignored by EBMeDS at the moment"
}],
"linkId": "143"
},
{
"answer": [{
// e.g. when symptoms started
// valueDateTime and valueTime are not supported
"valueDate": "2017-04-13"
}],
"linkId": "142"
},
{
"answer": [{
// how to encode a radio button answer
"valueCoding": {
"code": "radio",
"system": "VKT-multiple-choice"
},
"item": [
// only one item allowed for radio buttons
{
"linkId": "165"
}
]
}],
"linkId": "141"
},
{
"answer": [{
// how to encode a checkbox answer
"valueCoding": {
"code": "checkbox",
"system": "VKT-multiple-choice"
},
"item": [
// multiple items allowed for checkbox answer
{
"linkId": "170"
},
{
"linkId": "171"
}
]
}],
"linkId": "145"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment