<commit_before>-# Copyright (C) 2007, 2008, 2009, 2010, 2011 The Collaborative Software Foundation
-#
-# This file is part of TriSano.
-#
-# TriSano is free software: you can redistribute it and/or modify it under the terms of the
-# GNU Affero General Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# TriSano is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License along with TriSano.
-# If not, see http://www.gnu.org/licenses/agpl-3.0.txt.

-# In an effort to speed up event listings we used native SQL (see HumanEvent.find_by_filtered_view)
-# However, when showing a single event we still use oridnary AR.  But this view is rendered by both.
-# So, rather than duplicate the visual aspects, we are making all the data conditional on who is
-# rendering this file.

%tr.roll
  %td.forminformation
    - event_div_class(assessment_event) do
      = person_name_for_event(assessment_event, view_mode)
      %br
      %span{ :style => 'font-style: italic; font-size: small;'}
        ="#{t 'assessment_event'}"
  %td
    %b= h((view_mode == :index) ? assessment_event['disease_name'] : assessment_event.try(:disease).try(:disease).try(:disease_name))
  %td
    %b= h((view_mode == :index) ? i18n_jurisdiction_short_name(assessment_event['jurisdiction_short_name']) : assessment_event.primary_jurisdiction.short_name)
    %br
    .tools
      = jurisdiction_routing_control(assessment_event)
    %div{:id => 'secondary_jurisdictions'}
      %small
        - if (view_mode == :index)
          = h(pg_array(assessment_event['secondary_jurisdictions']).map { |j| j.gsub(/\"/, '')}.join(', '))
        - else
          = h(assessment_event.associated_jurisdictions.map { |j| j.short_name }.join(", "))
  %td
    %b= h(assessment_event.state_description)

    - queue_name = (view_mode == :index) ? assessment_event['queue_name'] : assessment_event.try(:event_queue).try(:queue_name)
    - unless queue_name.blank?
      %div{:id => 'queue_info'}
        %small
          =ct 'queue'
          &nbsp;
          %b= h(queue_name)

    - inv_name = (view_mode == :index) ? assessment_event['investigator_name'] : assessment_event.try(:investigator).try(:best_name)
    - unless inv_name.blank?
      %div{:id => 'investigator_info'}
        %small
          =ct 'investigator'
          &nbsp;
          %b= h(inv_name)

    .tools
      = state_controls(assessment_event)
  %td
    = ld(assessment_event.created_at.to_date)
%tr
  %td{:colspan => "5"}
    .tools
      = basic_human_event_controls(assessment_event, view_mode)
      = render :partial => 'assessment_events/print_options', :locals => { :event => assessment_event }
      = extra_tools if (view_mode != :index)<commit_msg>PT 32085813, formatting Assessment summary<commit_after>-# Copyright (C) 2007, 2008, 2009, 2010, 2011 The Collaborative Software Foundation
-#
-# This file is part of TriSano.
-#
-# TriSano is free software: you can redistribute it and/or modify it under the terms of the
-# GNU Affero General Public License as published by the Free Software Foundation, either
-# version 3 of the License, or (at your option) any later version.
-#
-# TriSano is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
-# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License along with TriSano.
-# If not, see http://www.gnu.org/licenses/agpl-3.0.txt.

-# In an effort to speed up event listings we used native SQL (see HumanEvent.find_by_filtered_view)
-# However, when showing a single event we still use oridnary AR.  But this view is rendered by both.
-# So, rather than duplicate the visual aspects, we are making all the data conditional on who is
-# rendering this file.

%tr.roll
  %td.forminformation
    - event_div_class(assessment_event) do
      = person_name_for_event(assessment_event, view_mode)
      %br
      %span{ :style => 'font-style: italic; font-size: small;'}
        ="#{t 'assessment_event'}"
    .tools
      = basic_human_event_controls(assessment_event, view_mode)
      = render :partial => 'assessment_events/print_options', :locals => { :event => assessment_event }
      = extra_tools if (view_mode != :index)
  %td
    %b= h((view_mode == :index) ? assessment_event['disease_name'] : assessment_event.try(:disease).try(:disease).try(:disease_name))
  %td
    %b= h((view_mode == :index) ? i18n_jurisdiction_short_name(assessment_event['jurisdiction_short_name']) : assessment_event.primary_jurisdiction.short_name)
    %br
    .tools
      = jurisdiction_routing_control(assessment_event)
    %div{:id => 'secondary_jurisdictions'}
      %small
        - if (view_mode == :index)
          = h(pg_array(assessment_event['secondary_jurisdictions']).map { |j| j.gsub(/\"/, '')}.join(', '))
        - else
          = h(assessment_event.associated_jurisdictions.map { |j| j.short_name }.join(", "))
  %td
    %b= h(assessment_event.state_description)

    - queue_name = (view_mode == :index) ? assessment_event['queue_name'] : assessment_event.try(:event_queue).try(:queue_name)
    - unless queue_name.blank?
      %div{:id => 'queue_info'}
        %small
          =ct 'queue'
          &nbsp;
          %b= h(queue_name)

    - inv_name = (view_mode == :index) ? assessment_event['investigator_name'] : assessment_event.try(:investigator).try(:best_name)
    - unless inv_name.blank?
      %div{:id => 'investigator_info'}
        %small
          =ct 'investigator'
          &nbsp;
          %b= h(inv_name)

    .tools
      = state_controls(assessment_event)
  %td
    = ld(assessment_event.created_at.to_date)
{'fraction_non_alphanumeric': 0.11877268228307489, 'fraction_numerical': 0.009732761464863082, 'mean_word_length': 3.555221637866266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6613625', 'n_tokens_mistral': 2005, 'n_tokens_neox': 1895, 'n_words': 534}