<commit_before>- @active_top_nav_link = :participate

.content-main-header
  %h1.f300 Research Surveys

.panel
  .panel-body
    - if current_user.is_provider? or current_user.is_only_researcher?
      %p.lead
        MyApnea.Org is part of a growing national network of patients, health care providers and researchers. This partnership is built upon the open exchange of information about sleep apnea. Here we provide a series of questions to help the sleep apnea community better understand the symptoms found in patients with sleep apnea or at risk for sleep apnea, their experiences with getting diagnosed, and their health conditions.
      %p.lead
        As an academic member of the community, you may view aggregate data for these surveys. All information is reported from community members, and should be used in accordance with our
        = link_to('Terms of Access', terms_of_access_path) + '.'
    - else
      %p.lead MyApnea.Org is part of a growing national network of patients, health care providers and researchers. This partnership is built upon the open exchange of information about sleep apnea. Here we provide a series of questions to help the sleep apnea community better understand the symptoms found in patients with sleep apnea or at risk for sleep apnea, their experiences with getting diagnosed, and their health conditions. Many of you will have answered some of these questions before but it is important for us to ask them again so that we have an understanding of the MyApnea community now and over time. After you complete each survey, you will see how your answers compare to the others within the network.
      %p.lead
        You may navigate away from the surveys at any time and your answers will be
        saved for you to complete upon your return. Each
        %b completed survey
        earns you an entry into our monthly drawing for a chance to win a $250
        %i.fa.fa-cc-visa
        Visa Gift card*! The more surveys you complete the more chances to win! Drawings are
        held the last day of each month.

      %p.lead{ style: 'font-style:italic'}
        %i *Must be a United States resident to be eligible to win. Proof of eligibility must be given (i.e. SSN) upon notification of award.

.panel
  .panel-body
    .row
      - @surveys.each do |survey|
        .col-sm-4.centered-text
          = render partial: 'surveys/partials/survey_progress', locals: { survey: survey, can_complete_surveys: !(current_user.is_provider? or current_user.is_only_researcher?) }
<commit_msg>Updated survey index page to match different views based on user type<commit_after>- @active_top_nav_link = :participate

.content-main-header
  %h1.f300 Research Surveys

.panel
  .panel-body
    - if current_user.is_provider? or current_user.is_only_researcher?
      %p.lead
        MyApnea.Org is part of a growing national network of patients, health care providers and researchers. This partnership is built upon the open exchange of information about sleep apnea. Here we provide a series of questions to help the sleep apnea community better understand the symptoms found in patients with sleep apnea or at risk for sleep apnea, their experiences with getting diagnosed, and their health conditions.
      %p.lead
        As an academic member of the community, you may view aggregate data for these surveys. All information is reported from community members, and should be used in accordance with our
        = link_to('Terms of Access', terms_of_access_path) + '.'
    - else
      %p.lead MyApnea.Org is part of a growing national network of patients, health care providers and researchers. This partnership is built upon the open exchange of information about sleep apnea. Here we provide a series of questions to help the sleep apnea community better understand the symptoms found in patients with sleep apnea or at risk for sleep apnea, their experiences with getting diagnosed, and their health conditions. Many of you will have answered some of these questions before but it is important for us to ask them again so that we have an understanding of the MyApnea community now and over time. After you complete each survey, you will see how your answers compare to the others within the network.
      %p.lead
        You may navigate away from the surveys at any time and your answers will be
        saved for you to complete upon your return. Each
        %b completed survey
        earns you an entry into our monthly drawing for a chance to win a $250
        %i.fa.fa-cc-visa
        Visa Gift card*! The more surveys you complete the more chances to win! Drawings are
        held the last day of each month.

      %p.lead{ style: 'font-style:italic'}
        %i *Must be a United States resident to be eligible to win. Proof of eligibility must be given (i.e. SSN) upon notification of award.

.panel
  .panel-body
    .row
      - if current_user.is_provider? or current_user.is_only_researcher?
        - Survey.viewable.where.not(slug: nil).each_with_index do |survey, index|
          - if (index)%3==0
            %div{style: 'clear:both'}
          .col-sm-4.centered-text
            = image_tag 'myapnea/icons/data_display'+rand(1..3).to_s+'.png', class: 'img-responsive', style: 'margin: 0 auto; width: 80%; max-width:250px; border-radius: 10px;'
            %h4.f300.centered-text
              = survey.name
            %h5.f300.primary-blue{ style: 'margin-bottom:30px;' }
              = link_to 'View Data', survey_report_path(slug: survey)
      - else
        - if current_user.assigned_surveys.blank? and !current_user.has_user_type?
          .centered-text{ style: 'display:block' }
            = image_tag 'myapnea/user_types/role_confused.png', class: 'img-responsive', style: 'margin: 0 auto; width: 150px;'
            %h4.f300{ style: 'margin: 0 10px;' }
              You have not listed your role in the sleep apnea community. In order to participate in this part of the research community, please
              = link_to 'select a role.', user_type_path
        - else
          - current_user.assigned_surveys.first(3).each do |survey|
            .col-sm-4.centered-text
              = render partial: 'surveys/partials/survey_progress', locals: { survey: survey, can_complete_surveys: true }

{'fraction_non_alphanumeric': 0.06140629971364938, 'fraction_numerical': 0.008113267578746421, 'mean_word_length': 3.1498349834983497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4368815', 'n_tokens_mistral': 1701, 'n_tokens_neox': 1637, 'n_words': 790}