{"action":"created","issue":{"url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/204","labels_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/204/comments","events_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/204/events","html_url":"https://github.com/jamesagnew/hapi-fhir/issues/204","id":98734069,"number":204,"title":"Problem with Questionnaire Answer validation against questionnaire","user":{"login":"gansoper","id":7899734,"avatar_url":"https://avatars.githubusercontent.com/u/7899734?v=3","gravatar_id":"","url":"https://api.github.com/users/gansoper","html_url":"https://github.com/gansoper","followers_url":"https://api.github.com/users/gansoper/followers","following_url":"https://api.github.com/users/gansoper/following{/other_user}","gists_url":"https://api.github.com/users/gansoper/gists{/gist_id}","starred_url":"https://api.github.com/users/gansoper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gansoper/subscriptions","organizations_url":"https://api.github.com/users/gansoper/orgs","repos_url":"https://api.github.com/users/gansoper/repos","events_url":"https://api.github.com/users/gansoper/events{/privacy}","received_events_url":"https://api.github.com/users/gansoper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-03T12:33:45Z","updated_at":"2015-08-03T12:38:21Z","closed_at":null,"body":"Hello guys,\r\n\r\nIt's me again:) \r\n\r\nI have following Questionnaire: \r\n\r\n```xml\r\n<Bundle xmlns=\"http://hl7.org/fhir\">\r\n   <id value=\"8f1ceb23-d563-4faa-a0e3-c11294541bcb\"/>\r\n   <meta>\r\n      <lastUpdated value=\"2015-08-03T08:22:54.638-04:00\"/>\r\n   </meta>\r\n   <type value=\"searchset\"/>\r\n   <base value=\"http://fhirtest.uhn.ca/baseDstu2\"/>\r\n   <total value=\"1\"/>\r\n   <link>\r\n      <relation value=\"self\"/>\r\n      <url value=\"http://fhirtest.uhn.ca/baseDstu2/Questionnaire?_id=9972&amp;_format=xml\"/>\r\n   </link>\r\n   <entry>\r\n      <resource>\r\n         <Questionnaire xmlns=\"http://hl7.org/fhir\">\r\n            <id value=\"9972\"/>\r\n            <meta>\r\n               <versionId value=\"3\"/>\r\n               <lastUpdated value=\"2015-07-28T11:27:24.325-04:00\"/>\r\n            </meta>\r\n            <identifier>\r\n               <value value=\"Coverage check\"/>\r\n            </identifier>\r\n            <date value=\"2015-07-28T18:30:19+03:00\"/>\r\n            <publisher value=\"Edifecs\"/>\r\n            <group>\r\n               <title value=\"Main Group\"/>\r\n               <group>\r\n                  <text value=\"Coverage check\"/>\r\n                  <question>\r\n                     <linkId value=\"Link0\"/>\r\n                     <text value=\"Full name\"/>\r\n                     <type value=\"string\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link1\"/>\r\n                     <text value=\"Subscriber member ID\"/>\r\n                     <type value=\"string\"/>\r\n                  </question>\r\n                  <question>\r\n                     <extension url=\"http://hl7.org/fhir/StructureDefinition/questionnaire-deReference\">\r\n                        <valueReference>\r\n                           <reference value=\"DataElement/\"/>\r\n                        </valueReference>\r\n                     </extension>\r\n                     <linkId value=\"Link2\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link3\"/>\r\n                     <text value=\"Service date\"/>\r\n                     <type value=\"string\"/>\r\n                  </question>\r\n               </group>\r\n               <group>\r\n                  <text value=\"Analysis of Body Fluids\"/>\r\n                  <question>\r\n                     <linkId value=\"Link4\"/>\r\n                     <text value=\"Blood\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link5\"/>\r\n                     <text value=\"Urine\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link6\"/>\r\n                     <text value=\"Cerebrospinal fluid\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link7\"/>\r\n                     <text value=\"Synovial fluid\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n               </group>\r\n               <group>\r\n                  <text value=\"Imaging\"/>\r\n                  <question>\r\n                     <linkId value=\"Link8\"/>\r\n                     <text value=\"X-Rays\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link9\"/>\r\n                     <text value=\"MRI\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link10\"/>\r\n                     <text value=\"PET\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link11\"/>\r\n                     <text value=\"CT\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n               </group>\r\n               <group>\r\n                  <text value=\"Endoscopy\"/>\r\n                  <question>\r\n                     <linkId value=\"Link12\"/>\r\n                     <text value=\"Bronchoscopy\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link13\"/>\r\n                     <text value=\"Gastroscopy\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link14\"/>\r\n                     <text value=\"Coloscopy\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n                  <question>\r\n                     <linkId value=\"Link15\"/>\r\n                     <text value=\"Cystoscopy\"/>\r\n                     <type value=\"boolean\"/>\r\n                  </question>\r\n               </group>\r\n            </group>\r\n         </Questionnaire>\r\n      </resource>\r\n      <search>\r\n         <mode value=\"match\"/>\r\n      </search>\r\n   </entry>\r\n</Bundle>\r\n'''\r\n\r\nAnd after this I tried to post following QuestionnaireAnswer structure:\r\n\r\n```xml\r\n<QuestionnaireAnswers xmlns=\"http://hl7.org/fhir\">\r\n     <identifier>\r\n         <value value=\"9972\"/>\r\n     </identifier>\r\n     <questionnaire>\r\n         <reference value=\"Questionnaire/9972\"/>\r\n     </questionnaire>\r\n     <subject>\r\n         <reference value=\"Organization/4769\"/>\r\n     </subject>\r\n     <authored value=\"2015-08-03T16:18:21+04:00\"/>\r\n     <group>\r\n         <title value=\"Main Group\"/>\r\n         <group>\r\n              <text value=\"Coverage check\"/>\r\n              <question>\r\n                  <linkId value=\"Link0\"/>\r\n                  <text value=\"Full name\"/>\r\n                  <answer>\r\n                       <valueString value=\"Andrew\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link1\"/>\r\n                  <text value=\"Subscriber member ID\"/>\r\n                  <answer>\r\n                       <valueInteger value=\"123123\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link2\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link3\"/>\r\n                  <text value=\"Service date\"/>\r\n                  <answer>\r\n                       <valueInteger value=\"2323\"/>\r\n                  </answer>\r\n              </question>\r\n         </group>\r\n         <group>\r\n              <text value=\"Analysis of Body Fluids\"/>\r\n              <question>\r\n                  <linkId value=\"Link4\"/>\r\n                  <text value=\"Blood\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"true\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link5\"/>\r\n                  <text value=\"Urine\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"true\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link6\"/>\r\n                  <text value=\"Cerebrospinal fluid\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link7\"/>\r\n                  <text value=\"Synovial fluid\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n         </group>\r\n         <group>\r\n              <text value=\"Imaging\"/>\r\n              <question>\r\n                  <linkId value=\"Link8\"/>\r\n                  <text value=\"X-Rays\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link9\"/>\r\n                  <text value=\"MRI\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link10\"/>\r\n                  <text value=\"PET\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link11\"/>\r\n                  <text value=\"CT\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n         </group>\r\n         <group>\r\n              <text value=\"Endoscopy\"/>\r\n              <question>\r\n                  <linkId value=\"Link12\"/>\r\n                  <text value=\"Bronchoscopy\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link13\"/>\r\n                  <text value=\"Gastroscopy\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link14\"/>\r\n                  <text value=\"Coloscopy\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n              <question>\r\n                  <linkId value=\"Link15\"/>\r\n                  <text value=\"Cystoscopy\"/>\r\n                  <answer>\r\n                       <valueBoolean value=\"false\"/>\r\n                  </answer>\r\n              </question>\r\n         </group>\r\n     </group>\r\n</QuestionnaireAnswers>\r\n'''\r\n\r\n\r\nI got validation error (( \r\n\r\n```xml\r\n<OperationOutcome xmlns=\"http://hl7.org/fhir\">\r\n   <text>\r\n      <status value=\"generated\"/>\r\n      <div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n         <h1>Operation Outcome</h1>\r\n         <table border=\"0\">\r\n            <tr>\r\n               <td style=\"font-weight: bold;\">error</td>\r\n               <td>[//QuestionnaireAnswers/group[0]]</td>\r\n               <td>\r\n                  <pre>Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//QuestionnaireAnswers/group[0]]</td> \r\n               <td>\r\n                  <pre>Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//QuestionnaireAnswers/group[0]]</td> \r\n               <td>\r\n                  <pre>Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//QuestionnaireAnswers/group[0]/group[1]]</td> \r\n               <td>\r\n                  <pre>Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//QuestionnaireAnswers/group[0]/group[0]/question[0]/answer[0]]</td> \r\n               <td>\r\n                  <pre>Answer to question with linkId[Link1] found of type [IntegerType] but this is invalid for question of type [string]</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//QuestionnaireAnswers/group[0]/group[0]/question[0]/answer[0]]</td> \r\n               <td>\r\n                  <pre>Answer to question with linkId[Link3] found of type [IntegerType] but this is invalid for question of type [string]</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link4] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[1]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link5] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[1]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link6] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link7] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[2]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link8] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[2]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link9] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[2]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link10] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link11] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[3]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link12] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[3]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link13] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[3]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link14] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link15] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]]</td> \r\n               <td>\r\n                  <pre>Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[0]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link0] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[0]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link1] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[0]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link2] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link3] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[2]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link8] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[2]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link9] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[2]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link10] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link11] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[3]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link12] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[3]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link13] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[3]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link14] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link15] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]]</td> \r\n               <td>\r\n                  <pre>Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[0]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link0] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[0]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link1] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[0]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link2] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link3] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link4] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[1]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link5] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[1]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link6] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link7] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[3]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link12] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[3]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link13] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[3]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link14] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link15] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]]</td> \r\n               <td>\r\n                  <pre>Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[0]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link0] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[0]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link1] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[0]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link2] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link3] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[1]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link4] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[1]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link5] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[1]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link6] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link7] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[1]/question[2]/group[2]/question[0]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link8] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[2]/group[2]/question[0]/question[1]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link9] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//group[2]/question[0]/question[1]/question[2]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link10] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n            <tr> \r\n               <td style=\"font-weight: bold;\">error</td> \r\n               <td>[//question[0]/question[1]/question[2]/question[3]]</td> \r\n               <td>\r\n                  <pre>Found answer with linkId[Link11] but this ID is not allowed at this position</pre>\r\n               </td> \r\n            </tr> \r\n         </table> \r\n      </div>\r\n   </text>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Questionnaire in invalid, unable to validate QuestionnaireAnswers: Multiple groups found at this position with linkId[]\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]/group[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Answer to question with linkId[Link1] found of type [IntegerType] but this is invalid for question of type [string]\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]/group[0]/question[0]/answer[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Answer to question with linkId[Link3] found of type [IntegerType] but this is invalid for question of type [string]\"/>\r\n      <location value=\"//QuestionnaireAnswers/group[0]/group[0]/question[0]/answer[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link4] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link5] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[1]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link6] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[1]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link7] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link8] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[2]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link9] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[2]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link10] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[2]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link11] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link12] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[3]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link13] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[3]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link14] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[3]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link15] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link0] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[0]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link1] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[0]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link2] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[0]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link3] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link8] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[2]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link9] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[2]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link10] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[2]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link11] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link12] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[3]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link13] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[3]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link14] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[3]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link15] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link0] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[0]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link1] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[0]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link2] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[0]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link3] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link4] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link5] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[1]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link6] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[1]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link7] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link12] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[3]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link13] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[3]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link14] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[3]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link15] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Multiple repetitions of group with linkId[null] found at this position, but this group can not repeat\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link0] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[0]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link1] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[0]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link2] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[0]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link3] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link4] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[1]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link5] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[1]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link6] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[1]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link7] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link8] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[1]/question[2]/group[2]/question[0]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link9] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[2]/group[2]/question[0]/question[1]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link10] but this ID is not allowed at this position\"/>\r\n      <location value=\"//group[2]/question[0]/question[1]/question[2]\"/>\r\n   </issue>\r\n   <issue>\r\n      <severity value=\"error\"/>\r\n      <details value=\"Found answer with linkId[Link11] but this ID is not allowed at this position\"/>\r\n      <location value=\"//question[0]/question[1]/question[2]/question[3]\"/>\r\n   </issue>\r\n</OperationOutcome>\r\n'''\r\n\r\nNot sure what is the problem. Could you please take a look? \r\n"},"comment":{"url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/comments/127219118","html_url":"https://github.com/jamesagnew/hapi-fhir/issues/204#issuecomment-127219118","issue_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/204","id":127219118,"user":{"login":"gansoper","id":7899734,"avatar_url":"https://avatars.githubusercontent.com/u/7899734?v=3","gravatar_id":"","url":"https://api.github.com/users/gansoper","html_url":"https://github.com/gansoper","followers_url":"https://api.github.com/users/gansoper/followers","following_url":"https://api.github.com/users/gansoper/following{/other_user}","gists_url":"https://api.github.com/users/gansoper/gists{/gist_id}","starred_url":"https://api.github.com/users/gansoper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gansoper/subscriptions","organizations_url":"https://api.github.com/users/gansoper/orgs","repos_url":"https://api.github.com/users/gansoper/repos","events_url":"https://api.github.com/users/gansoper/events{/privacy}","received_events_url":"https://api.github.com/users/gansoper/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T12:38:21Z","updated_at":"2015-08-03T12:38:21Z","body":"Additional information. This happens when tried to generate QuestionnaireAnwer for any Questionnaire containing several groups of questions."}}