diff --git a/app/models/cancerpredictfields.rb b/app/models/cancerpredictfields.rb index 00fc1d7..f1fa1af 100644 --- a/app/models/cancerpredictfields.rb +++ b/app/models/cancerpredictfields.rb @@ -6,14 +6,12 @@ class Cancerpredictfields # encoding: utf-8 include OrbitTag::Taggable include OrbitCategory::Categorizable - field :font_array , :type => Hash, default:{} - field :new_add_font, type: String, default:"" - field :delete_font, type: String, default:"" - field :used_font , :type => Array, default:[] - field :un_used_font , :type => Array, default:[] field :title ,type:String ,default:"" - field :subtitle, localize: true - field :text, localize: true + 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]}, + }}, # 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])} scope :is_approved, ->{where(:approved => true)}