'; new_text += (extra_therapy_texts+'
'); $('#result_text_content .extra-text .texts_show').eq(-1).after(new_text) @@ -396,13 +399,13 @@ $(document).ready(function(){ if(index < this.length - 1){ for(var i = index + 1;i < this.length; i++){ lpv_real[i] -= lpv_dict[arguments[0]]; - var servive_ratio = Math.round((Math.exp(lpv_calc[year])**Math.exp(lpv_real[i]))*100); + var servive_ratio = round((Math.exp(lpv_calc[year])**Math.exp(lpv_real[i]))*100,2); servive_ratio_arr[i] = servive_ratio; var benefit = servive_ratio - ((i == index+1) ? servive_ratio_arr[index - 1] : servive_ratio_arr[i - 1]); $('tr.'+active_treatment[i]+' td.Overall_Survival').html(servive_ratio+'%'); - $('.'+active_treatment[i]+'.Overall_Survival').html(servive_ratio); - $('tr.'+active_treatment[i]+' td.Additional_Benefit').html(benefit+'%'); - $('.'+active_treatment[i]+'.Additional_Benefit').html(benefit); + $('.'+active_treatment[i]+'.Overall_Survival').html(Math.round(servive_ratio)); + $('tr.'+active_treatment[i]+' td.Additional_Benefit').html(round(benefit,2)+'%'); + $('.'+active_treatment[i]+'.Additional_Benefit').html(Math.round(benefit)); }; var add_choices = []; for(var i = 1;i < this.length; i++){ @@ -412,9 +415,9 @@ $(document).ready(function(){ for(var j = 0;j')
@surgery_only_texts = @surgery_only_texts.gsub('{{Surgery_only}}',''+@servive_ratio.round.to_s+'')
@@ -211,229 +211,7 @@ class CancerpredictsController < ApplicationController
uid = OrbitHelper.params[:uid] rescue ""
tags = OrbitHelper.widget_tags
categories = OrbitHelper.widget_categories || []
- create_first_field
- @size = {}
- @size_name = ['small','medium','large']
- @size_name.each{|name| @size[name] = @form_to_show[name]['font_size']}
- @size_active_size = ''
- @size.each{|size_key,size_value| (@form_to_show[size_key]['active'].to_i == 1) ? ( @size_active_size = size_value ): nil }
- @table_str = '
本預測系統由台灣癌症登記資料庫2011至2015年間共90,841位乳癌病人所建立
若要開始 請在下方輸入相關資訊","en"=>"Welcome to the Taiwan Breast Cancer Prediction System!
The prediction system is constructed using 90,841 breast cancer patients’ clinical data from the Taiwan Cancer Registry database between 2011 and 2015, and validated by using 49,374 breast cancer patients’ clinical data from the US-based Surveillance, Epidemiology, and End Results (SEER) database.
To start, please enter the information below."}
+ field :text_descibe ,type:Hash ,default:{"zh_tw"=>"歡迎使用台灣準備乳癌預後系統!
本預測系統由台灣癌症登記資料庫2011至2015年間共90,841位乳癌病人所建立
若要開始 請在下方輸入相關資訊","en"=>"Welcome to the Taiwan Breast Cancer Prediction System!
The prediction system is constructed using clinical data from 90,841 breast cancer patients in the Taiwan Cancer Registry database between 2011 to 2015, and validated using clinical data from 49,374 breast cancer patients in the U.S.-based Surveillance, Epidemiology and End Results (SEER) database.
To start, please select the information below."}
field :small ,type:Hash ,default:{'font_size'=>"0.825em",'active'=>0}
field :medium ,type:Hash ,default:{'font_size'=>"1em",'active'=>1}
field :large ,type:Hash ,default:{'font_size'=>"1.25em",'active'=>0}
@@ -34,12 +34,13 @@ class Cancerpredictfields
field :title_images_id ,type:Array , default: [BSON::ObjectId('5df87cd88cd8924491000036')]
field :title_texts ,type:Hash ,default:{'zh_tw'=>'華人癌症存活預測','en'=>'Asian breast cancer prediction'}
field :table_above_texts ,type:Hash ,default:{'zh_tw'=>"下表之分析為針對手術後病人,根據選定的術後治療,分別估計在第1年、3及5年的存活率。",'en'=>'The analysis is for women who had undergone surgery.The table shows the 1-, 3- and 5-year survival rates,based on the treatment you have selected.'}
- field :text_above_texts ,type:Hash ,default:{'zh_tw'=>"此研究分析來自已接受根除性手術後之婦女所得之結果,根據您所輸入的資訊以及治療方式,在術後第{{years}}年,",'en'=>'The analysis is for women who had undergone surgery. Base on the information and the treatment you have selected, the predictions of survival status{{years}}'}
+ field :text_above_texts ,type:Hash ,default:{'zh_tw'=>"此研究分析來自已接受根除性手術後之婦女所得之結果,根據您所輸入的資訊以及治療方式,在術後
第{{years}}年,",'en'=>'The analysis is for women who had undergone surgery. Base on the information and the treatment you have selected, the predictions of survival status
{{years}}'}
field :surgery_only_texts ,type:Hash ,default:{'zh_tw'=>'100 位只接受根除性手術的婦女中,有{{Surgery_only}}位婦女,術後{{surgery_year}}年仍為存活','en'=>'after surgery are as follows:
{{Surgery_only}} out of 100 women treated with surgery only are alive at {{surgery_year}} years.'}
field :extra_texts ,type:Hash ,default:{'zh_tw'=>',此外','en'=>''}
field :extra_therapy_texts ,type:Hash ,default:{'zh_tw'=>'100 位在術後有接受{{extra_therapy}}的婦女中,有{{survival_num}}位婦女,術後{{surgery_year}}年仍為存活(多了{{Additional_Benefit}}位)','en'=>'{{survival_num}} out of 100 women treated with {{extra_therapy}} are alive (an extra {{Additional_Benefit}})'}
field :danger_texts ,type:Hash ,default:{'zh_tw'=>'請注意紅框的輸入資料是否符合要求!','en'=>'Please check whether input data in red blocks are correct!'}
field :years ,type:Array ,default:[1,3,5]
+ field :texts_between_Result_and_result_block ,type:Hash ,default:{'zh_tw'=>'如果欲將預測結果應用於臨床上,請務必與您的主治醫師討論後再做最後決定。','en'=>'Please note that the patients need to consult with their medical doctors before making any decision.'}
#field :image_uploader ,type:Object
scope :can_display, ->{where(:is_hidden=>false,:is_preview => false).any_of({:postdate.lt=>Time.now, :deadline.gt=>Time.now},{:postdate.lt=>Time.now, :deadline=>nil}).order_by([:is_top, :desc],[:postdate, :desc])}
scope :is_approved, ->{where(:approved => true)}
diff --git a/app/views/admin/cancerpredicts/index.html.erb b/app/views/admin/cancerpredicts/index.html.erb
index b5afb3c..c6bf933 100644
--- a/app/views/admin/cancerpredicts/index.html.erb
+++ b/app/views/admin/cancerpredicts/index.html.erb
@@ -205,7 +205,7 @@
<% if !@results[0].nil? %>
+ <%=((I18n.locale=="en") ? 'submit time' : '提交時間') %>
<% @results[0].names.each do |key,name|%>
<%=name[I18n.locale.to_s].to_s.html_safe %>
<%end%>
@@ -17,6 +18,7 @@
+
<% end %>
<%=((I18n.locale=="en") ? 'submit time' : '提交時間') %>
<% result.names.each do |key,name|%>
<%=name[I18n.locale.to_s].to_s.html_safe %>
<%end%>
@@ -25,6 +27,7 @@
+ <%= result.created_at %>
<% result.result.each do |key,value| %>
<% @key_len %>
<% if key != "locale" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 38abef7..45486c7 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -22,6 +22,7 @@ en:
extra_texts: Extra texts
extra_therapy_texts: Extra therapy texts
danger_texts: Warning texts
+ texts_between_Result_and_result_block: Texts between "Result" and "Result block"
table:
welcome: Welcome to The after breast cancer healing system of Taiwanprepare!\nTo start, please enter the relevant information below.
Reset: Reset
diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml
index d8f1114..07c3ae3 100644
--- a/config/locales/zh_tw.yml
+++ b/config/locales/zh_tw.yml
@@ -22,6 +22,7 @@ zh_tw:
extra_texts: 額外文字
extra_therapy_texts: 額外治療的文字
danger_texts: 警告文字
+ texts_between_Result_and_result_block: 在"結果"和"結果區塊"之間的文字
table:
welcome: 歡迎使用台灣準備乳癌癒後系統!\n若要開始 請在下方輸入相關資訊
Reset: 重置