 -- Do not set locks, allow dirty reads.
 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 
-CREATE VIEW cdm.src_clean AS
+INSERT INTO cdm.src_clean
 SELECT
     pa.participant_id               AS participant_id,
+    co_b.value                      AS survey_name,
     qr.created                      AS date_of_survey,
     co_q.short_value                AS question_ppi_code,
     qq.code_id                      AS question_code_id,

        OR qra.value_date IS NOT NULL
        OR qra.value_datetime IS NOT NULL
        OR qra.value_string IS NOT NULL
);

-- Reset ISOLATION level to previous setting
COMMIT;

-- -------------------------------------------------------------------
-- source_file: src/src_mapped.sql

            WHEN qra.value_datetime IS NOT NULL THEN 'dtime'
            WHEN qra.value_string IS NOT NULL THEN 'str'
            ELSE ''
        END)                        AS unit_id,
    0                               AS filter

FROM rdr.participant pa
JOIN rdr.hpo hp
    ON  pa.hpo_id = hp.hpo_id
JOIN rdr.questionnaire_response qr
    ON  qr.participant_id = pa.participant_id
JOIN rdr.questionnaire_concept qc
    ON qr.questionnaire_id = qc.questionnaire_id
JOIN rdr.questionnaire_response_answer qra
    ON  qra.questionnaire_response_id = qr.questionnaire_response_id
JOIN rdr.questionnaire_question qq
