From e2bc83ec2efbf1e6a756ae8f6da146a6c817fae3 Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Sat, 21 Dec 2019 23:50:17 +0800 Subject: [PATCH] finish edit content of tools before 2019/12/21(include the user choices) --- app/assets/javascripts/cancer_predict.js | 68 +++++++++++++++--- app/assets/stylesheets/cancer_predict.css | 8 ++- .../admin/cancerpredicts_controller.rb | 4 +- app/controllers/cancerpredicts_controller.rb | 69 ++++++++++++++++--- app/models/cancerpredictfields.rb | 25 ++++--- 5 files changed, 141 insertions(+), 33 deletions(-) diff --git a/app/assets/javascripts/cancer_predict.js b/app/assets/javascripts/cancer_predict.js index 91695b2..8af32b1 100644 --- a/app/assets/javascripts/cancer_predict.js +++ b/app/assets/javascripts/cancer_predict.js @@ -4,6 +4,7 @@ $(document).ready(function(){ $('.header-nav').html(head_images.responseJSON['head_images']); $('.navbar-brand').html(head_images.responseJSON['title']) }); + $('#font_size_choices .cancer_table_btn').eq(0).addClass('active'); Array.prototype.remove_item_from_array = function(){ var result_array = this; for(var i=0;i請注意紅框的輸入資料是否符合要求'); + ($('#danger_texts').length == 0) ? $('#cancer_table_submit').parent().before('請注意紅框的輸入資料是否符合要求') : null; $('#danger_texts').css('margin-left',$(window).width()/2-$('#danger_texts').width()/2); }else{ $('#danger_texts').remove(); @@ -216,7 +217,7 @@ $(document).ready(function(){ if(result.responseJSON.lpv != "error"){ var load_heml = $('#result_table_content').html(result.responseJSON.table); load_heml.ready(function(){ - $('#result_table_content .cancer_years').eq(0).addClass('active'); + $('#result_table_content .cancer_years').eq(-1).addClass('active'); for(var i = 0;i < $('#result_table_content .cancer_years').length;i++){ $('#result_table_content .cancer_years').eq(i).attr('index',i) }; @@ -232,7 +233,7 @@ $(document).ready(function(){ }); load_heml = $('#result_text_content').html(result.responseJSON.texts); load_heml.ready(function(){ - $('#result_text_content .cancer_years').eq(0).addClass('active'); + $('#result_text_content .cancer_years').eq(-1).addClass('active'); for(var i = 0;i < $('#result_text_content .cancer_years').length;i++){ $('#result_text_content .cancer_years').eq(i).attr('index',i) }; @@ -252,8 +253,8 @@ $(document).ready(function(){ $('#cancer_table_right_result .cancer-btn-group .cancer_table_btn').removeClass('active'); $('#cancer_table_right_result .cancer-btn-group >input').attr('value',"0"); for(var i = 0;i < $('#cancer_table_left_result .cancer-btn-group').length;i++){ - $('#cancer_table_right_result .cancer-btn-group').eq(i).find('.cancer_table_btn').eq(0).addClass('active'); - $('#cancer_table_right_result .cancer-btn-group').eq(i).find('>input').eq(0).attr('value',"1"); + $('#cancer_table_left_result .cancer-btn-group').eq(i).find('.cancer_table_btn').eq(0).addClass('active'); + $('#cancer_table_left_result .cancer-btn-group').eq(i).find('>input').eq(0).attr('value',"1"); }; for(var i = 0;i < $('#cancer_table_right_result .cancer-btn-group').length;i++){ $('#cancer_table_right_result .cancer-btn-group').eq(i).find('.cancer_table_btn').eq(0).addClass('active'); @@ -487,7 +488,52 @@ $(document).ready(function(){ result['age1'] = Math.pow((Number(result_json['age'])/100),0.5); result['age2'] = Math.pow((Number(result_json['age'])/100),0.5)*Math.log(result_json['age']/100); result['size1'] = Math.log(Number(result_json['size'])/10); - result['nposit'] = Math.pow(((Number(result_json['ratio'])+0.1)/0.1),0.5); + try{result['ratio'] = Number(result_json['lymph_nodes_positive'])/Number(result_json['lymph_nodes_examined'])}catch{result['ratio'] = 0} + if(result['ratio'] > 1) + result['ratio'] = 1 + result['nposit'] = Math.pow(((Number(result['ratio'])+0.1)/0.1),0.5); + var T = ''; + if(Number(result_json['tumor_direct_extension']) != 1){ + if(Number(result_json['size']) <= 20) + T = 'T1'; + else if(Number(result_json['size']) > 20 && Number(result_json['size']) <= 50) + T = 'T2'; + else if(Number(result_json['size']) > 50) + T = 'T3'; + }else{ + T = 'T4'; + }; + var N = ''; + if(Number(result_json['lymph_nodes_positive']) == 0) + N = 'N0'; + else if(Number(result_json['lymph_nodes_positive']) >= 1 && Number(result_json['lymph_nodes_positive']) <= 3 && Number(result_json['micrometastasis']) != 1) + N = 'N1'; + else if(Number(result_json['lymph_nodes_positive']) >= 1 && Number(result_json['lymph_nodes_positive']) <= 3 && Number(result_json['micrometastasis']) == 1) + N = 'N1mi'; + else if(Number(result_json['lymph_nodes_positive']) >= 4 && Number(result_json['lymph_nodes_positive']) <= 9) + N = 'N2'; + else if(Number(result_json['lymph_nodes_positive']) >= 10) + N = 'N3'; + M = ''; + if(Number(result_json['Distant_Metastasis']) != 1) + M = 'M0'; + else + M = 'M1'; + if(Number(M == 'M0')) + if(T == 'T1' && (N == 'N0' || N == 'N1mi')) + result['pstage'] = 1; + else if(((T == 'T2' || T == 'T3') && (N == 'N0')) || ((T == 'T1' || T == 'T2') && (N == 'N1'))) + result['pstage'] = 2; + else if((T == 'T4' && N == 'N0') || ((T == 'T3' || T == 'T4') && N == 'N1') || (N == 'N2' || N == 'N3')) + result['pstage'] = 3; + else + result['pstage'] = 4 + if((Number(result_json['ER_status']) != 2 || Number(result_json['PR_status']) != 2) && (Number(result_json['HER2_status']) != 1)) + result['subtype'] = 1; + else if(Number(result_json['ER_status']) == 2 && Number(result_json['PR_status']) == 2 && (Number(result_json['HER2_status']) == 1)) + result['subtype'] = 2; + else if(Number(result_json['ER_status']) == 2 && Number(result_json['PR_status']) == 2 && (Number(result_json['HER2_status']) != 1)) + result['subtype'] = 3; if( Number(result_json['grade']) == 2) result['grade_2'] = 1; else @@ -496,23 +542,23 @@ $(document).ready(function(){ result['grade_3'] = 1; else result['grade_3'] = 0; - if( Number(result_json['subtype']) == 2) + if( Number(result['subtype']) == 2) result['subtype_HER2'] = 1; else result['subtype_HER2'] = 0; - if( Number(result_json['subtype']) == 3) + if( Number(result['subtype']) == 3) result['subtype_triple'] = 1; else result['subtype_triple'] = 0; - if( Number(result_json['pstage']) == 2) + if( Number(result['pstage']) == 2) result['pstage_2'] = 1; else result['pstage_2'] = 0; - if( Number(result_json['pstage']) == 3) + if( Number(result['pstage']) == 3) result['pstage_3'] = 1; else result['pstage_3'] = 0; - if( Number(result_json['pstage']) == 4) + if( Number(result['pstage']) == 4) result['pstage_4'] = 1; else result['pstage_4'] = 0; diff --git a/app/assets/stylesheets/cancer_predict.css b/app/assets/stylesheets/cancer_predict.css index 0484b66..a3ad786 100644 --- a/app/assets/stylesheets/cancer_predict.css +++ b/app/assets/stylesheets/cancer_predict.css @@ -2,7 +2,6 @@ padding: 0.375em 0; } .head_logo{ - float:left; height: 4em; } @media screen and (max-width: 48em) .navbar-brand{ @@ -158,6 +157,7 @@ input.float_num{ padding: 0.125em 0.5em; border-radius: 0.5em; font-size: 1.25em; + float: left; } .result_tab{ background: #023d79; @@ -276,6 +276,9 @@ input.float_num{ #cancer_predict_result_block{ display:none; font-size: 0.825em; + margin-top: 3em; + border-top: #666 solid; + padding-top: 2em; } p.texts_show{ display: list-item; @@ -327,4 +330,7 @@ div.texts_show{ width: 50%; float: left; } + .result_title{ + margin-top: 1em; + } } \ No newline at end of file diff --git a/app/controllers/admin/cancerpredicts_controller.rb b/app/controllers/admin/cancerpredicts_controller.rb index 83dc03b..05f461c 100644 --- a/app/controllers/admin/cancerpredicts_controller.rb +++ b/app/controllers/admin/cancerpredicts_controller.rb @@ -118,7 +118,7 @@ class Admin::CancerpredictsController < OrbitAdminController end else @file_name = image['temp_file'].original_filename.gsub('(','_').gsub(')','_').gsub(' ','_') rescue next - @headimages = Headimages.new(:cancerpredictfields_id => @form_to_show.id,:title => @app_title) + @headimages = Headimages.new(:cancerpredictfields_id => @form_to_show.id,:title => @app_title+'head_images') @headimages.temp_file = image['temp_file'] @headimages.sort_number = image['sort_number'].to_i if !image['sort_number'].nil? @headimages.save @@ -155,7 +155,7 @@ class Admin::CancerpredictsController < OrbitAdminController end else @file_name = image['temp_file'].original_filename.gsub('(','_').gsub(')','_').gsub(' ','_') rescue next - @headimages = Headimages.new(:cancerpredictfields_id => @form_to_show.id,:title => @app_title) + @headimages = Headimages.new(:cancerpredictfields_id => @form_to_show.id,:title => @app_title+'title_images' ) @headimages.temp_file = image['temp_file'] @headimages.sort_number = image['sort_number'].to_i if !image['sort_number'].nil? @headimages.save diff --git a/app/controllers/cancerpredicts_controller.rb b/app/controllers/cancerpredicts_controller.rb index 7501f93..341b862 100644 --- a/app/controllers/cancerpredicts_controller.rb +++ b/app/controllers/cancerpredicts_controller.rb @@ -44,7 +44,57 @@ class CancerpredictsController < ApplicationController result['age1'] = (params['data']['age'].to_f/100)**(0.5) result['age2'] = ((params['data']['age'].to_f/100)**(0.5))*Math.log(params['data']['age'].to_f/100,Math.exp(1)) result['size1'] = Math.log(params['data']['size'].to_f/10,Math.exp(1)) - result['nposit'] = ((params['data']['ratio'].to_f+0.1)/0.1)**0.5 + result['ratio'] = params['data']['lymph_nodes_positive'].to_f/params['data']['lymph_nodes_examined'].to_f rescue 0 + result['ratio'] = 1 if result['ratio'] > 1 + result['nposit'] = ((result['ratio'].to_f+0.1)/0.1)**0.5 + @T = '' + if params['data']['tumor_direct_extension'].to_i != 1 + if params['data']['size'].to_i <= 20 + @T = 'T1' + elsif params['data']['size'].to_i > 20 && params['data']['size'].to_i <= 50 + @T = 'T2' + elsif params['data']['size'].to_i > 50 + @T = 'T3' + end + else + @T = 'T4' + end + @N = '' + if params['data']['lymph_nodes_positive'].to_i == 0 + @N = 'N0' + elsif params['data']['lymph_nodes_positive'].to_i >= 1 && params['data']['lymph_nodes_positive'].to_i <= 3 && params['data']['micrometastasis'].to_i != 1 + @N = 'N1' + elsif params['data']['lymph_nodes_positive'].to_i >= 1 && params['data']['lymph_nodes_positive'].to_i <= 3 && params['data']['micrometastasis'].to_i == 1 + @N = 'N1mi' + elsif params['data']['lymph_nodes_positive'].to_i >= 4 && params['data']['lymph_nodes_positive'].to_i <= 9 + @N = 'N2' + elsif params['data']['lymph_nodes_positive'].to_i >= 10 + @N = 'N3' + end + @M = '' + if params['data']['Distant_Metastasis'].to_i != 1 + @M = 'M0' + else + @M = 'M1' + end + if @M == 'M0' + if @T == 'T1' && (@N == 'N0' || @N == 'N1mi') + result['pstage'] = 1 + elsif ((@T == 'T2' || @T == 'T3') && (@N == 'N0')) || ((@T == 'T1' || @T == 'T2') && (@N == 'N1')) + result['pstage'] = 2 + elsif (@T == 'T4' && @N == 'N0') || ((@T == 'T3' || @T == 'T4') && @N == 'N1') || (@N == 'N2' || @N == 'N3') + result['pstage'] = 3 + end + else + result['pstage'] = 4 + end + if (params['data']['ER_status'].to_i != 2 || params['data']['PR_status'].to_i != 2) && (params['data']['HER2_status'].to_i != 1) + result['subtype'] = 1 + elsif params['data']['ER_status'].to_i == 2 && params['data']['PR_status'].to_i == 2 && (params['data']['HER2_status'].to_i == 1) + result['subtype'] = 2 + elsif params['data']['ER_status'].to_i == 2 && params['data']['PR_status'].to_i == 2 && (params['data']['HER2_status'].to_i != 1) + result['subtype'] = 3 + end if params['data']['grade'].to_i == 2 result['grade_2'] = 1 else @@ -55,27 +105,27 @@ class CancerpredictsController < ApplicationController else result['grade_3'] = 0 end - if params['data']['subtype'].to_i == 2 + if result['subtype'].to_i == 2 result['subtype_HER2'] = 1 else result['subtype_HER2'] = 0 end - if params['data']['subtype'].to_i == 3 + if result['subtype'].to_i == 3 result['subtype_triple'] = 1 else result['subtype_triple'] = 0 end - if params['data']['pstage'].to_i == 2 + if result['pstage'].to_i == 2 result['pstage_2'] = 1 else result['pstage_2'] = 0 end - if params['data']['pstage'].to_i == 3 + if result['pstage'].to_i == 3 result['pstage_3'] = 1 else result['pstage_3'] = 0 end - if params['data']['pstage'].to_i == 4 + if result['pstage'].to_i == 4 result['pstage_4'] = 1 else result['pstage_4'] = 0 @@ -89,7 +139,7 @@ class CancerpredictsController < ApplicationController result['grade_2']*0.4795+result['grade_3']*0.818+result['subtype_HER2']*0.1806+result['subtype_triple']*0.6457+result['pstage_2']*0.5311+ result['pstage_3']*1.134+result['pstage_4']*2.172+result['lvi_yes']*0.3321-0.04 rescue 'error') @years = ['1','3','5'] - result['table'] = '

此分析微針對已接受手術後病人,下表為此病人分別在第1年、3及5年下,根據選定的術後治療所估計的存活率

' + result['table'] = '

此分析微針對已接受手術後病人,下表為此病人分別在第1年、3及5年下,根據選定的術後治療所估計的存活率

' result['table'] += '' result['years'] = @years @years.each{|year| result['table'] += ('')} @@ -114,8 +164,9 @@ class CancerpredictsController < ApplicationController result['texts'] = '此研究分析來自已接受根除性手術後之婦女所得之結果,根據您所輸入的資訊以及治療方式,'+'
'+'在術後第' @years.each{|year| result['texts'] += ('')} result['texts'] += ',' - @servive_ratio = ((Math.exp(-0.001476145)**(Math.exp(result['lpv'])))*100).round - result['texts'] += ('

100 位只接受根除性手術的婦女中,有 '+ ''+@servive_ratio.round.to_s+''+' 位婦女,術後 '+''+@years[0].to_s+''+'年仍為存活

') + @lpv_calc = [-0.001476145,-0.01261639,-0.02519608] + @servive_ratio = ((Math.exp(@lpv_calc[-1])**(Math.exp(result['lpv'])))*100).round + result['texts'] += ('

100 位只接受根除性手術的婦女中,有 '+ ''+@servive_ratio.round.to_s+''+' 位婦女,術後 '+''+@years[-1].to_s+''+'年仍為存活

') result['texts'] += ''+',此外' result['servive_ratio'] = @servive_ratio diff --git a/app/models/cancerpredictfields.rb b/app/models/cancerpredictfields.rb index a2712a1..53e2e1a 100644 --- a/app/models/cancerpredictfields.rb +++ b/app/models/cancerpredictfields.rb @@ -9,28 +9,33 @@ class Cancerpredictfields field :title ,type:String ,default:"" field :form_show , :type=> Hash ,default:{0=>{:variable=>"age",:name=>{"zh_tw"=>"年齡
(age)","en"=>"age"},:is_num=>1, :hint=>{'zh_tw'=>'從 18 歲(含)開始至 93 歲','en'=>''} , :comment_text=>{'zh_tw'=>'年齡為該婦女於確診罹患乳癌時之年齡','en'=>''}, :choice_fields=> {"zh_tw"=>[],"en"=>[]},:range=>[18,93],:right=>0,:is_float=>0}, 1=>{:variable=>"size",:name=>{"zh_tw"=>"腫瘤大小
(tumor size)","en"=>"tumor size"},:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若有多個原發腫瘤,請輸入最大尺寸之原發腫瘤','en'=>''}, :choice_fields=> {"zh_tw"=>[],"en"=>[]},:range=>[1,300],:right=>0,:is_float=>0}, - 2=>{:variable=>"ratio",:name=>{"zh_tw"=>"淋巴結陽性比例
(node-positive ratio)","en"=>"node-positive ratio"},:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>[],"en"=>[]},:range=>[0,1],:right=>0,:is_float=>1}, - 3=>{:variable=>"grade",:name=>{"zh_tw"=>"腫瘤級數
(tumor grade)","en"=>"tumor grade"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'腫瘤級數代表腫瘤組織與正常組織間的分化程度,若無分化級數資訊,請選擇“未知”選項,將以級數 1 進行預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['1','2','3','未知'],"en"=>['1','2','3','unknown']},:range=>[],:right=>0,:is_float=>0}, - 4=>{:variable=>"subtype",:name=>{"zh_tw"=>"乳癌分型
(breast cancer subtype)","en"=>"breast cancer subtype"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'

HER2:第二型人類上皮成長因子接受器蛋白(HER2-enriched)過度表現型

若無分型資訊,請選擇“未知”選項,將以佔多數比例的管腔類進行預測。

','en'=>''}, :choice_fields=> {"zh_tw"=>['管腔類','HER2','三陰性','未知'],"en"=>['Luminal-like','HER2','Triple negative','unknown']},:range=>[],:right=>1,:is_float=>0}, - 5=>{:variable=>"pstage",:name=>{"zh_tw"=>"病理分期
(pathologic stage)","en"=>"pathologic stage"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無分期資訊,請選擇“未知”選項,將以病理分期第 1 期進行預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['1','2','3','4','未知'],"en"=>['1','2','3','4','unknown']},:range=>[],:right=>1,:is_float=>0}, - 6=>{:variable=>"lvi",:name=>{"zh_tw"=>"淋巴管或血管侵犯
(lymph vessel or vascular invasion, LVI)","en"=>"lymph vessel or vascular invasion, LVI"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無淋巴管或血管侵犯資訊,請選擇“未知”選項,將以佔多數比例的淋巴管或血管未侵犯進行預測','en'=>''}, :choice_fields=> {"zh_tw"=>['是','否','未知'],"en"=>['yes','no','unknown']},:range=>[],:right=>1,:is_float=>0} + 2=>{:variable=>"lymph_nodes_examined",:name=>{"zh_tw"=>"區域淋巴結檢查數目
(Regional lymph nodes examined)","en"=>"Regional lymph nodes examined"},:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>[],"en"=>[]},:range=>[0,90],:right=>0,:is_float=>0}, + 3=>{:variable=>"lymph_nodes_positive",:name=>{"zh_tw"=>"區域淋巴結侵犯數目
(Regional lymph nodes positive)","en"=>"Regional lymph nodes positive"},:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>[],"en"=>[]},:range=>[0,90],:right=>0,:is_float=>0}, + 4=>{:variable=>"grade",:name=>{"zh_tw"=>"腫瘤級數
(tumor grade)","en"=>"tumor grade"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'腫瘤級數代表腫瘤組織與正常組織間的分化程度,若無分化級數資訊,請選擇“未知”選項,將以級數 1 進行預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['1','2','3','未知'],"en"=>['1','2','3','unknown']},:range=>[],:right=>0,:is_float=>0}, + 5=>{:variable=>"ER_status",:name=>{"zh_tw"=>"ER 狀態
(ER status)","en"=>"ER status"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'ER:雌激素受體,若無 ER 資訊請選擇未知,將以佔多數比例陽性作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['陽性','陰性','未知'],"en"=>['positive','negative','unknown']},:range=>[],:right=>1,:is_float=>0}, + 6=>{:variable=>"PR_status",:name=>{"zh_tw"=>"PR 狀態
(PR status)","en"=>"PR status"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'PR:黃體素受體,若無 PR 資訊請選擇未知,將以佔多數比例陽性作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['陽性','陰性','未知'],"en"=>['positive','negative','unknown']},:range=>[],:right=>1,:is_float=>0}, + 7=>{:variable=>"HER2_status",:name=>{"zh_tw"=>"HER2 狀態
(HER2 status),","en"=>"HER2 status"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'HER2:第二型人類上皮成長因子接受器蛋白,若無 HER2 資訊請選擇未知,將以佔多數比例陰性作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['陽性','陰性','未知'],"en"=>['positive','negative','unknown']},:range=>[],:right=>1,:is_float=>0}, + 8=>{:variable=>"Distant_Metastasis",:name=>{"zh_tw"=>"遠端轉移
(DistantMetastasis)","en"=>"pathologic stage"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無遠轉移資訊請選擇未知,將以佔多數比例未遠端轉移作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['是','否','未知'],"en"=>['yes','no','unknown']},:range=>[],:right=>1,:is_float=>0}, + 9=>{:variable=>"micrometastasis",:name=>{"zh_tw"=>"顯微轉移
(micrometastasis)","en"=>"pathologic stage"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無顯微移資訊請選擇未知,將以無顯微轉移作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['是','否','未知'],"en"=>['yes','no','unknown']},:range=>[],:right=>1,:is_float=>0}, + 10=>{:variable=>"tumor_direct_extension",:name=>{"zh_tw"=>"腫瘤浸潤至胸壁和/或皮膚
(tumor direct extension to the chest wall and/or to the skin)","en"=>"tumor direct extension to the chest wall and/or to the skin"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無腫瘤浸潤至胸壁或皮膚資訊請選擇未知,將以佔多數比例無腫瘤浸潤至胸壁作為後續預測。','en'=>''}, :choice_fields=> {"zh_tw"=>['是','否','未知'],"en"=>['yes','no','unknown']},:range=>[],:right=>1,:is_float=>0}, + 11=>{:variable=>"lvi",:name=>{"zh_tw"=>"淋巴管或血管侵犯
(lymph vessel or vascular invasion, LVI)","en"=>"lymph vessel or vascular invasion, LVI"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若無淋巴管或血管侵犯資訊,請選擇“未知”選項,將以佔多數比例的淋巴管或血管未侵犯進行預測','en'=>''}, :choice_fields=> {"zh_tw"=>['是','否','未知'],"en"=>['yes','no','unknown']},:range=>[],:right=>1,:is_float=>0} } - field :form_show_in_result , :type=> Hash ,default:{0=>{:variable=>"hormone_therapy",:name=>{"zh_tw"=>"賀爾蒙治療","en"=>"Hormone/steroid therapy"},:is_num=>0, :hint=>{'zh_tw'=>'賀爾蒙治療適用於ER狀態為陽性之病人','en'=>'Hormone (endocrine) therapy is available when ER-status is positive'} , :comment_text=>{'zh_tw'=>'','en'=>'

Hormone therapy, or endocrine therapy, involves a woman taking drugs to prevent the growth of tumour cells that are boosted by the hormone oestrogen. Drugs of this kind include tamoxifen (brand names include Nolvadex, Istabul, Valodex, and Soltamox) and aromatase inhibitors such as anastrozole, exemestane, and letrozole (brand names Arimidex, Aromasin, and Femara).

'+ + field :form_show_in_result , :type=> Hash ,default:{0=>{:variable=>"hormone_therapy",:name=>{"zh_tw"=>"賀爾蒙治療","en"=>"Hormone/steroid therapy"},:is_num=>0, :hint=>{'zh_tw'=>'適用賀爾蒙受體陽性病人','en'=>'Hormone (endocrine) therapy is available when ER-status is positive'} , :comment_text=>{'zh_tw'=>'','en'=>'

Hormone therapy, or endocrine therapy, involves a woman taking drugs to prevent the growth of tumour cells that are boosted by the hormone oestrogen. Drugs of this kind include tamoxifen (brand names include Nolvadex, Istabul, Valodex, and Soltamox) and aromatase inhibitors such as anastrozole, exemestane, and letrozole (brand names Arimidex, Aromasin, and Femara).

'+ '

Some hormone therapy drugs act by blocking the action of oestrogen on the cells and some work by lowering the amount of oestrogen in the body (NB hormone therapy for breast cancer is the opposite of hormone replacement therapy or HRT, which is taken by women to help INCREASE oestrogen levels to help deal with side-effects of the menopause).

'+ '

Treatments usually have the potential to cause harm as well as benefit. It is important to weigh up the risks of potential harm against the potential benefits of treatment in order to reach a decision. Some may cause more harm than benefit to some people.

'+ '

It is useful to switch between 1 and 5 years hormone therapy to compare the survival outcomes.

'}, :choice_fields=> {"zh_tw"=>['否','是'],"en"=>['No','Yes']},:range=>[]}, 1=>{:variable=>"Chemotherapy",:name=>{"zh_tw"=>"化學治療","en"=>"Chemotherapy"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>['否','是'],"en"=>['No','Yes']},:range=>[]}, 2=>{:variable=>"Radiotherapy",:name=>{"zh_tw"=>"放射治療","en"=>"Radiotherapy"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>['否','是'],"en"=>['No','Yes']},:range=>[]}, - 3=>{:variable=>"Targeted_therapy",:name=>{"zh_tw"=>"標靶治療","en"=>"Targeted therapy"},:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>['否','是'],"en"=>['No','Yes']},:range=>[]} + 3=>{:variable=>"Targeted_therapy",:name=>{"zh_tw"=>"標靶治療","en"=>"Targeted therapy"},:is_num=>0,:hint=>{'zh_tw'=>'抗HER2治療','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :choice_fields=> {"zh_tw"=>['否','是'],"en"=>['No','Yes']},:range=>[]} } - field :form_result_is_right , :type=> Integer ,default: 1 + field :form_result_is_right , :type=> Integer ,default: 0 field :text_descibe ,type:Hash ,default:{"zh_tw"=>"歡迎使用台灣準備乳癌癒後系統!
若要開始 請在下方輸入相關資訊","en"=>" Welcome to The after breast cancer healing system of Taiwanprepare!\nTo start, please enter the relevant information below."} field :small ,type:String ,default:"0.825em" field :medium ,type:String ,default:"1em" field :large ,type:String ,default:"1.25em" field :image_path ,type:String ,default:"1.25em" - field :head_images_id ,type:Array , default: [] - field :title_images_id ,type:Array , default: [] + field :head_images_id ,type:Array , default: [BSON::ObjectId('5df62cfc8cd8924e79000009'), BSON::ObjectId('5df745a58cd8924491000006'), BSON::ObjectId('5df745a58cd8924491000007'), BSON::ObjectId('5df745a58cd8924491000008'), BSON::ObjectId('5df745a58cd8924491000009')] + field :title_images_id ,type:Array , default: [BSON::ObjectId('5df87cd88cd8924491000036')] field :title_texts ,type:String ,default:"" #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])}