<commit_before>- projects.each do |project|
  - subject = current_user&.subjects&.find_by(project: project)
  .research-study-fullscreen-backdrop{ data: { object: "close-research-study research-study-backdrop", research_study: project.id } }
    .card.research-study-fullscreen-content
      %h4.card-header
        .float-right
          = link_to "#", class: "link-unstyled", data: { object: "close-research-study", research_study: project.id } do
            &times;
        = project.name
        Report
      .card-body.research-study-fullscreen-backdrop-body
        - if subject
          .consent-administrative.small
            .mb-3
              %strong Study
              = project.name
              = link_to ">> DELETE <<", [:slice, subject], method: :delete, class: "text-danger small"
            .mb-3
              %strong Consented At
              = subject.consented_at
            .mb-3
              %strong Consent Revoked At
              = subject.consent_revoked_at
            .mb-3
              %strong Subject Code
              %code= subject.slice_subject_id
              = subject.slice_subject_code_cache

        .mb-5{ style: "background-color: #fff3e0;margin-top: -1.25rem;margin-left: -1.25rem;margin-right: -1.25rem;padding: 1.25rem;"}
          .brand-subtitle
            After completing the
            = project.name
            surveys, you can
            %span.text-accent print out a personalized report
            that you can take to your next doctor visit! Click the
            %span.text-accent
              %i.fa.fa-book
              book icon
            to read articles written by our staff.

        .brand-subtitle.text-center
          Here's a glimpse about what we've found among the 10,000
          participants in this study.

        .mb-5
          .brand-title AGE
          .brand-subtitle
            The average age is
            = succeed "." do
              %strong {avg-age}
            Our youngest participant is
            %strong {min-age}
            and our oldest is
            = succeed "." do
              %strong {max-age > 90 ? 90 : max-age}

        .mb-5
          .brand-title SEX
          .brand-subtitle
            Sleep apnea is
            %span.text-accent more common in men
            than in women.
            Both sexes benefit
            from treatment.

        .mb-5
          .brand-title DIAGNOSIS
          .brand-subtitle
            More than
            %strong {diagnosed-with-sleep-apnea}%
            of participants have been diagnosed with sleep apnea.
            Here is a breakdown of how old participants were when diagnosed.

            The average participant thinks they had sleep apnea for
            %strong {sa-years-before-diagnosis}
            years before diagnosis.

        .mb-5
          .brand-title EPWORTH
          .brand-subtitle
            The ESS is commonly used to assess levels of daytime sleepiness,
            which is a common symptom of sleep apnea.

      .card-footer.text-muted
        .float-right
          = link_to slice_consent_path(project), class: "text-accent" do
            Get started
            %i.fa.fa-caret-right
        = link_to "#", class: "link-unstyled", data: { turbolinks: false } do
          %i.fa.fa-print
          Print<commit_msg>Cleaned up research study popup<commit_after>- projects.each do |project|
  - subject = current_user&.subjects&.find_by(project: project)
  .research-study-fullscreen-backdrop{ data: { object: "close-research-study research-study-backdrop", research_study: project.id } }
    .card.research-study-fullscreen-content
      %h4.card-header
        .float-right
          = link_to "#", class: "link-unstyled", data: { object: "close-research-study", research_study: project.id } do
            &times;
        = project.name
        Report
      .card-body.research-study-fullscreen-backdrop-body
        .mb-5{ style: "background-color: #fff3e0;margin-top: -1.25rem;margin-left: -1.25rem;margin-right: -1.25rem;padding: 1.25rem;"}
          .brand-subtitle
            After completing the
            = project.name
            surveys, you can
            %span.text-accent print out a personalized report
            that you can take to your next doctor visit.

        .brand-subtitle.text-center
          Here's a glimpse about what we've found among the 10,000
          participants in this study.

        .mb-5
          .brand-title AGE
          .brand-subtitle
            The average age is
            - avg_age = 58
            = succeed "." do
              %strong= avg_age
            Our youngest participant is
            - min_age = 18
            %strong= [min_age, 18].max
            and our oldest is
            - max_age = 78
            = succeed "." do
              %strong= [max_age, 90].min

        .mb-5
          .brand-title SEX
          .brand-subtitle
            Sleep apnea is
            %span.text-accent more common in men
            than in women.
            Both sexes benefit
            from treatment.

        .mb-5
          .brand-title DIAGNOSIS
          .brand-subtitle
            More than
            %strong 77.8%
            of participants have been diagnosed with sleep apnea.
            Here is a breakdown of how old participants were when diagnosed.

            The average participant thinks they had sleep apnea for
            %strong 2
            years before diagnosis.

      .card-footer.text-muted
        .float-right
          - if subject
            = link_to slice_surveys_path(project), class: "text-accent" do
              Take surveys
              %i.fa.fa-caret-right
          - else
            = link_to slice_consent_path(project), class: "text-accent" do
              Get started
              %i.fa.fa-caret-right
        = link_to "#", class: "link-unstyled", data: { turbolinks: false } do
          %i.fa.fa-print
          Print
{'fraction_non_alphanumeric': 0.08712439147221757, 'fraction_numerical': 0.011918751049185832, 'mean_word_length': 1.5331632653061225, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '2884685', 'n_tokens_mistral': 1713, 'n_tokens_neox': 1618, 'n_words': 459}