Getting Started

The Questionnaire API provides a flexible method of obtaining data to support an objective such as requesting a visit, an annual Health Risk Assessment, post visit surveys, and more.\

How to use Questionnaires


Step 1

To begin, select the questionnaire you would like the user to participate in by Requesting a list of Questionnaires. You will be returned a list of questionnaires your account has access to and should look something like the below example.\

Example response


[
	{
		"id": "quesna_d948a513327c4185b9ec683dc1bf83c6",
		"type": "Hypertension"
	},
	{
		"id": "quesna_af039ac9a905488481d63aa32df92477",
		"type": "Health Risk Assessment: Lifestyle"
	}
]

For this example, we are going to choose the "Health Risk Assessment: Lifestyle" questionnaire, so we will need the corresponding id: quesna_af039ac9a905488481d63aa32df92477.\

Step 2

Now that we have chosen a questionnaireId, we need to Request Questionnaire Questions to fetch the questions and responses to be presented to the user. You will be returned a list of questions as shown in the example below.\

Example response (abbreviated for brevity)


[
	{
		"questionId": "quesqu_703078c24a9144dd996497948de51d94",
		"questionnaireId": "quesna_af039ac9a905488481d63aa32df92477",
		"questionType": "strict",
		"questionText": "How many times in the past 12 months have you had 4 or more drinks in a day? One drink is 12 ounces of beer, 5 ounces of wine, or 1.5 ounces of 80-proof spirits.",
		"questionSequence": 1,
		"questionLevel": 1,
		"questionMinResponses": 1,
		"questionMaxResponses": 1,
		"questionResponseMinCharsAllowed": 0,
		"questionResponseMaxCharsAllowed": 0,
		"questionResponses": [
			{
				"responseId": "quesqr_b18795574c9549a480cdddeee4f245e3",
				"response": "Never",
				"questionId": "quesqu_703078c24a9144dd996497948de51d94",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_7de211a2a1ee40c5b79489b28d7fcad6",
				"response": "Once or Twice",
				"questionId": "quesqu_703078c24a9144dd996497948de51d94",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_a8ac616831e449b991a391f6eb8cd278",
				"response": "Monthly",
				"questionId": "quesqu_703078c24a9144dd996497948de51d94",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_69895ea4a96d400f81c20392e8ebe9ae",
				"response": "Weekly",
				"questionId": "quesqu_703078c24a9144dd996497948de51d94",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_e842f752eddb4e798cbfd2287f2fedd1",
				"response": "Daily or Almost Daily",
				"questionId": "quesqu_703078c24a9144dd996497948de51d94",
				"followUpQuestions": []
			}
		]
	},
	{
		"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
		"questionnaireId": "quesna_af039ac9a905488481d63aa32df92477",
		"questionType": "strict",
		"questionText": "How many times in the past 12 months have you used tobacco products (like cigarettes, cigars, snuff, chew, electronic cigarettes)?",
		"questionSequence": 2,
		"questionLevel": 1,
		"questionMinResponses": 1,
		"questionMaxResponses": 1,
		"questionResponseMinCharsAllowed": 0,
		"questionResponseMaxCharsAllowed": 0,
		"questionResponses": [
			{
				"responseId": "quesqr_7507529d1ffb4e1c9391385ea7c4ff45",
				"response": "Never",
				"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_2bdc62ba04134c5bbf5bb4fe3d14ed3b",
				"response": "Once or Twice",
				"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_1fd134fe727041869012e1f15ed7f6dc",
				"response": "Monthly",
				"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_025066a0e9df46f6877b9f95e8463191",
				"response": "Weekly",
				"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_82328566563342a59d2d223878cbd3b9",
				"response": "Daily or Almost Daily",
				"questionId": "quesqu_fb1f7ab678ef40a7bf259db0b44a32cf",
				"followUpQuestions": []
			}
		]
	},
	{
		"questionId": "quesqu_3aa21b2ac4c841ce9a640c555c6b816b",
		"questionnaireId": "quesna_af039ac9a905488481d63aa32df92477",
		"questionType": "strict",
		"questionText": "Over the past 7 days, how many servings of fruits or vegetables did you eat each day on average?",
		"questionSequence": 4,
		"questionLevel": 1,
		"questionMinResponses": 1,
		"questionMaxResponses": 1,
		"questionResponseMinCharsAllowed": 0,
		"questionResponseMaxCharsAllowed": 0,
		"questionResponses": [
			{
				"responseId": "quesqr_8c8ec01a9661488492bd28a8de350b84",
				"response": "0 servings",
				"questionId": "quesqu_3aa21b2ac4c841ce9a640c555c6b816b",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_b1f0ae344864464d891dfd6252002974",
				"response": "1 serving",
				"questionId": "quesqu_3aa21b2ac4c841ce9a640c555c6b816b",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_599bfdef98614403b8ffdac2f9bf13c9",
				"response": "2 servings",
				"questionId": "quesqu_3aa21b2ac4c841ce9a640c555c6b816b",
				"followUpQuestions": []
			},
			{
				"responseId": "quesqr_98e1e4bbcb1e47bb8fc154e9b4b734c6",
				"response": "3 or more servings",
				"questionId": "quesqu_3aa21b2ac4c841ce9a640c555c6b816b",
				"followUpQuestions": []
			}
		]
	}
]

Start by reading the Question Object documentation to get a better understanding of what each of the properties in the response represent.

At a high level though, the most important elements to keep track of is the questionId and the response value. The response value will be either a value provided by the API (strict) or a free-form value provided by the user (open).\

Step 3

Now that we have asked all of our questions and have a response for each, we need to submit a "Questionnaire Submittal". Read the Create Questionnaire Submittal documentation to learn more.