Changes between Version 7 and Version 8 of Onyx to CiviCRM


Ignore:
Timestamp:
12/09/13 15:50:14 (10 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Onyx to CiviCRM

    v7 v8  
    5656{{{#!sql
    5757
     58SELECT
     59      p.id AS ParticipantID
     60    , p.barcode AS StudyID
     61    , p.first_name
     62    , p.last_name
     63    , p.birth_date
     64    , p.gender
     65    , p.enrollment_id AS UhlSystemNumber
     66    , consent_q1.value AS consent_q1
     67FROM participant p
     68LEFT JOIN (
     69    SELECT
     70          qp.participant_id
     71        , ca.category_name AS value
     72    FROM question_answer qa
     73    JOIN category_answer ca ON ca.question_answer_id = qa.id
     74    JOIN questionnaire_participant qp ON qp.id = qa.questionnaire_participant_id
     75         AND qp.questionnaire_name = 'ManualConsentQuestionnaire'
     76    WHERE qa.question_name = 'consent_q1'
     77    ) consent_q1 ON consent_q1.participant_id = p.id
     78;
     79
    5880}}}