def extract_evidence_id(condition):
  """Extracts the id of the evidence resource linked to the Condition.

  In this demo, the evidence is always a QuestionnaireResponse, which is the
  only evidence and set on the detail field.

  Example resource:
  {
    ...
    "evidence":[
      {
        "detail":[
          {"reference":"QuestionnaireResponse/ab376d48-5fdc-4876-9441-c68cf59a8431"}
        ]
      }
    ],
    "resourceType":"Condition",
    ...
  }
  """
  return condition['evidence'][0]['detail'][0]['reference']