def extract_country(questionnaire_response):
  """Extracts country information from a QuestionnaireResponse resource.

  Example resource:

  {
    ...
    "item": [
      {
        "answer": [{"valueString": "countryA"}],
        "linkId": "1"
      },
      {
        "item": [
          {
            "answer": [{"valueDate": "2018-10-15"}],
            "linkId": "2.1"
          },
          {
            "answer": [{"valueDate": "2018-10-22"}],
            "linkId": "2.2"
          }
        ],
        "linkId": "2"
      }
    ],
    "resourceType": "QuestionnaireResponse",
    ...
  }

  Right now the answers are fixed (i.e. first is country, then dates). So
  we hardcoded the indexes here and below.
  """
  return questionnaire_response['item'][0]['answer'][0]['valueString']