Validation of QuestionnaireResponse instances

The following rules of validity must be used for all QuestionnaireResponse instances (i.e. answers to Questionnaires) tht correspond to Questionnaire resources defined in this IG. We say that a Questionnaire is versioned if the field Questionnaire.version is filled, regardless of whether multiple versions actually exist. There can never be both versioned and non-versioned instances of the same Questionnaires (i.e. for the same canonical URL in Questionnaire.url).

  • Every QuestionnaireResponse must indicate the Questionnaire it matches by giving the corresponding canonical URL in the field QuestionnaireResponse.questionnaire.
  • Every QuestionnaireResponse must be valid against the Questionnaire it claims to match.
  • If a Questionnaire is versioned, a matching QuestionnaireResponse instance must declare the version it matches. That is, QuestionnaireResponse.questionnaire must hold a versioned canonical URL containing the pipe symbol ('|'), e.g. http://www.example.com/myQuestionnaire|1.0.2.
  • Conversely, if a Questionnaire is non-versioned, a matching QuestionnaireResponse instance must use a canonical URL without version when pointing to it.