diff --git a/app/assets/javascripts/react.js b/app/assets/javascripts/react.js index dcee495..bce11ff 100644 --- a/app/assets/javascripts/react.js +++ b/app/assets/javascripts/react.js @@ -1328,7 +1328,7 @@ if (typeof Math.imul == "undefined" || (Math.imul(0xffffffff, 5) == 0)) { null), new R(null, 2, 5, S, [XE, "Curves"], null), new R(null, 2, 5, S, [$v, "Chart"], null), new R(null, 2, 5, S, [Qp, "Texts"], null), new R(null, 2, 5, S, [ru, "Icons"], null)], null), null, Vr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), NB.c(wL(new m(null, 1, [NB, on], null)))), BL(eo, "Enable bisphosphonates", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [cF, "No"], null), new R(null, 2, 5, S, [Bm, "Yes"], null)], null), null, Vr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), eo.c(wL(new m(null, 1, [eo, Bm], null)))), BL(fF, "Enable 10 year hormone treatment?", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [cF, "No"], null), new R(null, 2, 5, S, [cF, "Not yet implemented"], null)], null), null, Vr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), fF.c(wL(new m(null, 1, [fF, cF], null)))), BL(VA, "Enable disease free survival", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [cF, "No"], null), new R(null, 2, 5, S, [cF, "Not yet implemented"], null)], null), null, Vr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), VA.c(wL(new m(null, 1, [VA, cF], null)))), BL(PF, "Hormone Therapy", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [null, "No"], null), new R(null, 2, 5, S, [Bm, "Yes"], null)], null), null, Ip, new Ri(null, new m(null, 2, ["v1.2", null, "v2.1", null], null), null), null), BL($m, "Bisphosphonates", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [null, "No"], null), new R(null, 2, 5, S, [Bm, "Yes"], null)], null), null, Ip, new Ri(null, new m(null, 1, ["v2.1", null], null), null), null), BL(up, "Trastuzumab", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [null, "No"], null), new R(null, 2, 5, S, [Bm, "Yes"], null)], null), null, Ip, new Ri(null, new m(null, 2, ["v1.2", null, "v2.1", null], - null), null), null), BL(BA, "Prior treatments", At, "Surgery is assumed", !1, Bp, new Ri(null, new m(null, 1, ["v2.1", null], null), null), null), BL(fn, "Age at diagnosis", mx, new m(null, 4, [Ll, 25, yx, 85, fD, 1, Qq, 0], null), !0, yr, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), ""), BL(Zk, "Post Menopausal?", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bz, "Yes"], null), new R(null, 2, 5, S, [Ln, "No"], null)], null), !0, yr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), null), BL(Br, "Detected by", + null), null), null), BL(BA, "Prior treatments", At, "Surgery is assumed", !1, Bp, new Ri(null, new m(null, 1, ["v2.1", null], null), null), null), BL(fn, <%=t(cancerpredict)%>, mx, new m(null, 4, [Ll, 25, yx, 85, fD, 1, Qq, 0], null), !0, yr, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), ""), BL(Zk, "Post Menopausal?", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bz, "Yes"], null), new R(null, 2, 5, S, [Ln, "No"], null)], null), !0, yr, new Ri(null, new m(null, 1, ["v2.1", null], null), null), null), BL(Br, "Detected by", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [ln, "Screening"], null), new R(null, 2, 5, S, [uB, "Symptoms"], null)], null), !0, Bp, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), null), BL(Qw, "Tumour grade", Wl, new R(null, 3, 5, S, [new R(null, 2, 5, S, [sp, 1], null), new R(null, 2, 5, S, [Ko, 2], null), new R(null, 2, 5, S, [Dx, 3], null)], null), !1, Bp, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), null), BL(vu, "Tumour size (mm)", mx, new m(null, 4, [Ll, 0, yx, 500, fD, 5, Qq, 0], null), !0, Bp, new Ri(null, new m(null, 2, ["v1.2", null, "v2.1", null], null), null), ""), BL(Pw, "Positive nodes", mx, new m(null, 4, [Ll, 0, yx, 100, fD, 1, Qq, 0], null), !0, kl, new Ri(null, new m(null, 2, ["v1.2", null, "v2.1", null], null), null), ""), BL(tC, "Micrometastases only", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bm, "Yes"], null), new R(null, 2, 5, S, [cF, "No"], null)], null), !0, kl, new Ri(null, new m(null, 2, ["v2.1", null, "research", null], null), null), ho), BL(SB, "ER status", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bm, "Positive"], null), new R(null, 2, 5, S, [cF, "Negative"], null)], null), !1, kl, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), null), BL(Tp, "HER2 status", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bm, "Positive"], null), new R(null, 2, 5, S, [cF, "Negative"], null)], null), !0, kl, new Ri(null, new m(null, 4, ["next-gen", null, "v1.2", null, "v2.1", null, "research", null], null), null), null), BL(Kt, "Ki-67 status", Wl, new R(null, 2, 5, S, [new R(null, 2, 5, S, [Bm, "Positive"], null), new R(null, 2, diff --git a/app/controllers/admin/cancerpredicts_controller.rb b/app/controllers/admin/cancerpredicts_controller.rb index b3abb99..3dbc1e4 100644 --- a/app/controllers/admin/cancerpredicts_controller.rb +++ b/app/controllers/admin/cancerpredicts_controller.rb @@ -1,7 +1,7 @@ # encoding: utf-8 require 'rubyXL' class Admin::CancerpredictsController < OrbitAdminController - include Admin::CancerpredictsHelper + #include Admin::CancerpredictsHelper before_action ->(module_app = @app_title) { set_variables module_app } #before_action :load_access_levels def initialize diff --git a/app/controllers/cancerpredicts_controller.rb b/app/controllers/cancerpredicts_controller.rb new file mode 100644 index 0000000..0812c49 --- /dev/null +++ b/app/controllers/cancerpredicts_controller.rb @@ -0,0 +1,27 @@ +# encoding: utf-8 +require 'rubyXL' +class CancerpredictsController < ApplicationController + before_filter :set_I18n + before_action ->(module_app = @app_title) { set_variables module_app } + #before_action :load_access_levels + def initialize + super + @app_title = "cancerpredict" + end + + def index + uid = OrbitHelper.params[:uid] rescue "" + tags = OrbitHelper.widget_tags + categories = OrbitHelper.widget_categories || [] + locale = OrbitHelper.get_site_locale.to_s + end + def widget + uid = OrbitHelper.params[:uid] rescue "" + tags = OrbitHelper.widget_tags + categories = OrbitHelper.widget_categories || [] + locale = OrbitHelper.get_site_locale.to_s + end + def set_I18n + I18n.locale = params[:lang] if params[:lang].present? + end +end \ No newline at end of file diff --git a/app/views/cancerpredicts/index.html.erb b/app/views/cancerpredicts/index.html.erb new file mode 100644 index 0000000..648b75c --- /dev/null +++ b/app/views/cancerpredicts/index.html.erb @@ -0,0 +1 @@ +<%= render_view %> \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 2cd82fa..b4b6017 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -11,7 +11,7 @@ en: HER2: HER2 status PR: PR status Tumoursize: Tumour size(mm) - Tumourgrade :Tumour grade + Tumourgrade: Tumour grade lymphnodes: lymph nodes positive: positive negative: negative diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index ad59eaa..7dc965c 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,8 +1,8 @@ zh_tw: cancerpredict: cancerpredict: 乳癌預測 - table: - welcome:歡迎使用台灣準備乳癌癒後系統!\n若要開始 請在下方輸入相關資訊 + table: + welcome: 歡迎使用台灣準備乳癌癒後系統!\n若要開始 請在下方輸入相關資訊 Reset: 重置 Submit: 提交 age: 確認年齡 @@ -11,7 +11,7 @@ zh_tw: HER2: HER2狀態 PR: PR狀態 Tumoursize: 腫瘤大小(mm) - Tumourgrade :腫瘤分級 + Tumourgrade: 腫瘤分級 lymphnodes: 淋巴結數目 positive: 陽性 negative: 陰性 diff --git a/lib/cancerpredict/engine.rb b/lib/cancerpredict/engine.rb index 6aa69c1..4747a8e 100644 --- a/lib/cancerpredict/engine.rb +++ b/lib/cancerpredict/engine.rb @@ -9,11 +9,12 @@ module Cancerpredict authorizable widget_methods ["widget"] widget_settings [{"data_count"=>1}] + frontend_enabled side_bar do head_label_i18n 'cancerpredict.cancerpredict', icon_class: "icons-megaphone" available_for "users" active_for_controllers (['admin/cancerpredicts']) - head_link_path "admin_cancerPredicts_path" + head_link_path "admin_cancerpredicts_path" context_link 'cancerpredict.cancerpredict', :link_path=>"admin_cancerpredicts_path" , diff --git a/modules/cancerpredict/_cancer_predict_widget.html.erb b/modules/cancerpredict/_cancer_predict_widget.html.erb new file mode 100644 index 0000000..e7cfe43 --- /dev/null +++ b/modules/cancerpredict/_cancer_predict_widget.html.erb @@ -0,0 +1,20 @@ +