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:
BOHUNG 2019-12-17 21:27:11 +08:00
parent 190752a275
commit 74fff06818
3 changed files with 19 additions and 11 deletions

View File

@ -484,10 +484,10 @@ $(document).ready(function(){
};
function calculate_first_lpv(result_json){
result = {}
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);
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);
if( Number(result_json['grade']) == 2)
result['grade_2'] = 1;
else
@ -521,7 +521,7 @@ $(document).ready(function(){
else
result['lvi_yes'] = 0;
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['pstage_3']*1.134+result['pstage_4']*2.172+result['lvi_yes']*0.3321-0.04);
}catch{result['lpv'] = "error"};

View File

@ -3,13 +3,21 @@
}
.head_logo{
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{
top:0 !important;
}
.title_texts{
color:rgb(210, 106, 2);
display:none;
}
.cencer_table_name{
display: inline-block;

View File

@ -41,10 +41,10 @@ class CancerpredictsController < ApplicationController
locale = params['data']['locale'].to_s rescue 'zh_tw'
locale = 'zh_tw' if locale == 'zh_cn'
result = {}
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['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
if params['data']['grade'].to_i == 2
result['grade_2'] = 1
else
@ -85,7 +85,7 @@ class CancerpredictsController < ApplicationController
else
result['lvi_yes'] = 0
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['pstage_3']*1.134+result['pstage_4']*2.172+result['lvi_yes']*0.3321-0.04 rescue 'error')
@years = ['1','3','5']