edit the calculate of the predict and edit css to make the logo in the right place and right size
This commit is contained in:
parent
190752a275
commit
74fff06818
|
@ -484,10 +484,10 @@ $(document).ready(function(){
|
||||||
};
|
};
|
||||||
function calculate_first_lpv(result_json){
|
function calculate_first_lpv(result_json){
|
||||||
result = {}
|
result = {}
|
||||||
result['age1'] = -Math.pow((Number(result_json['age'])/100),0.5);
|
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['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['size1'] = Math.log(Number(result_json['size'])/10);
|
||||||
result['nposit'] = -Math.pow(((Number(result_json['ratio'])+0.1)/0.1),0.5);
|
result['nposit'] = Math.pow(((Number(result_json['ratio'])+0.1)/0.1),0.5);
|
||||||
if( Number(result_json['grade']) == 2)
|
if( Number(result_json['grade']) == 2)
|
||||||
result['grade_2'] = 1;
|
result['grade_2'] = 1;
|
||||||
else
|
else
|
||||||
|
@ -521,7 +521,7 @@ $(document).ready(function(){
|
||||||
else
|
else
|
||||||
result['lvi_yes'] = 0;
|
result['lvi_yes'] = 0;
|
||||||
try{
|
try{
|
||||||
result['lpv'] = ((result['age1']-0.7276655)*(10.87)+(result['age2']+0.4540707)*8.968+(result['size1']-0.643632)*0.7678+(result['nposit']-1.346932)*0.5339+
|
result['lpv'] = ((result['age1']-0.7276655)*(-10.87)+(result['age2']+0.4540707)*8.968+(result['size1']-0.643632)*0.7678+(result['nposit']-1.346932)*0.5339+
|
||||||
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['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);
|
result['pstage_3']*1.134+result['pstage_4']*2.172+result['lvi_yes']*0.3321-0.04);
|
||||||
}catch{result['lpv'] = "error"};
|
}catch{result['lpv'] = "error"};
|
||||||
|
|
|
@ -3,13 +3,21 @@
|
||||||
}
|
}
|
||||||
.head_logo{
|
.head_logo{
|
||||||
float:left;
|
float:left;
|
||||||
height: 6em;
|
height: 4em;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 48em) .navbar-brand{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.navbar-brand>img.head_logo{
|
||||||
|
width: 70%;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
.header-nav{
|
.header-nav{
|
||||||
top:0 !important;
|
top:0 !important;
|
||||||
}
|
}
|
||||||
.title_texts{
|
.title_texts{
|
||||||
color:rgb(210, 106, 2);
|
color:rgb(210, 106, 2);
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
.cencer_table_name{
|
.cencer_table_name{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -41,10 +41,10 @@ class CancerpredictsController < ApplicationController
|
||||||
locale = params['data']['locale'].to_s rescue 'zh_tw'
|
locale = params['data']['locale'].to_s rescue 'zh_tw'
|
||||||
locale = 'zh_tw' if locale == 'zh_cn'
|
locale = 'zh_tw' if locale == 'zh_cn'
|
||||||
result = {}
|
result = {}
|
||||||
result['age1'] = -(params['data']['age'].to_f/100)**(0.5)
|
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['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['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['nposit'] = ((params['data']['ratio'].to_f+0.1)/0.1)**0.5
|
||||||
if params['data']['grade'].to_i == 2
|
if params['data']['grade'].to_i == 2
|
||||||
result['grade_2'] = 1
|
result['grade_2'] = 1
|
||||||
else
|
else
|
||||||
|
@ -85,7 +85,7 @@ class CancerpredictsController < ApplicationController
|
||||||
else
|
else
|
||||||
result['lvi_yes'] = 0
|
result['lvi_yes'] = 0
|
||||||
end
|
end
|
||||||
result['lpv'] = ((result['age1']-0.7276655)*(10.87)+(result['age2']+0.4540707)*8.968+(result['size1']-0.643632)*0.7678+(result['nposit']-1.346932)*0.5339+
|
result['lpv'] = ((result['age1']-0.7276655)*(-10.87)+(result['age2']+0.4540707)*8.968+(result['size1']-0.643632)*0.7678+(result['nposit']-1.346932)*0.5339+
|
||||||
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['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')
|
result['pstage_3']*1.134+result['pstage_4']*2.172+result['lvi_yes']*0.3321-0.04 rescue 'error')
|
||||||
@years = ['1','3','5']
|
@years = ['1','3','5']
|
||||||
|
|
Loading…
Reference in New Issue