| 166 | === On Filtering using a Date === |
| 167 | |
| 168 | A further experiment revealed that the filter illustrated below worked, selecting participants with a status of completed where the conclusion questionnaire end date was some time in January, and the participant hadn't been exported before. All the valueTables within the export config file had the same filter. It doesn't take much imagination to work out how to add a further condition to test for year. |
| 169 | |
| 170 | |
| 171 | {{{ |
| 172 | <valueset entityType="Participant" valueTable="Participants"> |
| 173 | <entities> |
| 174 | <excludeAll /> |
| 175 | <script type="INCLUDE"> |
| 176 | <javascript><![CDATA[// Include any ValueSet that has 'COMPLETED' as a value for the 'Participant.Interview.Status' variable |
| 177 | // and the conclusion questionnaire timeEnd is in January |
| 178 | ($('Participants:Admin.Interview.status').any('COMPLETED')). |
| 179 | and($('ConclusionQuestionnaire:QuestionnaireRun.timeEnd').month().trim().any('0')) |
| 180 | ]]></javascript> |
| 181 | </script> |
| 182 | <script type="EXCLUDE"> |
| 183 | <javascript><![CDATA[$('Participants:Admin.Interview.exportLog.destination').any('BRICCS.Participants')]]></javascript> |
| 184 | </script> |
| 185 | </entities> |
| 186 | </valueset> |
| 187 | }}} |
| 188 | |