Update cancerpredictfields.rb

This commit is contained in:
chiu 2019-11-21 20:44:39 +08:00
parent d4afee639d
commit d9be851646
1 changed files with 4 additions and 4 deletions

View File

@ -7,10 +7,10 @@ class Cancerpredictfields
include OrbitTag::Taggable
include OrbitCategory::Categorizable
field :title ,type:String ,default:""
field :form_show , :type=> Hash ,default:{"cancer_form"=>{:names=>{'age'=>{:is_num=>1, :comment_text=>{'zh_tw'=>'年齡為該婦女於確診罹患乳癌時之年齡',:en=>''}, :fields=> [],range=[18,93]},
'tumor_size'=>{:is_num=>1, :comment_text=>{'zh_tw'=>'若有多個原發腫瘤,請輸入最大尺寸之原發腫瘤',:en=>''}, :fields=> [],range=[1]},
'node-positive_ratio'=>{:is_num=>1, :comment_text=>{'zh_tw'=>'',:en=>''}, :fields=> [],range=[0,1]},
'tumor_grade'=>{:is_num=>0, :comment_text=>{'zh_tw'=>'腫瘤級數代表腫瘤組織與正常組織間的分化程度,若無分化級數資訊,請選擇“未知”選項,將以級數 1 進行預測。',:en=>''}, :fields=> ['1','2','3','未知'],range=[0,1]},
field :form_show , :type=> Hash ,default:{"cancer_form"=>{:names=>{'age'=>{:is_num=>1,:hint=>{'zh_tw'=>'從 18 歲(含)開始至 93 歲','en'=>}, :comment_text=>{'zh_tw'=>'年齡為該婦女於確診罹患乳癌時之年齡','en'=>''}, :fields=> [],range=[18,93]},
'tumor_size'=>{:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'若有多個原發腫瘤,請輸入最大尺寸之原發腫瘤','en'=>''}, :fields=> [],range=[1]},
'node-positive_ratio'=>{:is_num=>1,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'','en'=>''}, :fields=> [],range=[0,1]},
'tumor_grade'=>{:is_num=>0,:hint=>{'zh_tw'=>'','en'=>''}, :comment_text=>{'zh_tw'=>'腫瘤級數代表腫瘤組織與正常組織間的分化程度,若無分化級數資訊,請選擇“未知”選項,將以級數 1 進行預測。','en'=>''}, :fields=> ['1','2','3'],range=[0,1],unknownable=>1},
}},
# before_destroy :destroy_email
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])}