commit
483fbb002c
26 changed files with 675 additions and 0 deletions
@ -0,0 +1,39 @@ |
|||||
|
ARG pyversion=3.9 |
||||
|
FROM python:${pyversion}-bullseye |
||||
|
ARG pyversion=3.9 |
||||
|
ENV PYVERSION ${pyversion:-3.9} |
||||
|
|
||||
|
# Install packages |
||||
|
RUN apt-get -yqq update && \ |
||||
|
apt-get -yqq install apache2 apache2-dev locales libapache2-mod-wsgi-py3 && \ |
||||
|
apt-get clean |
||||
|
|
||||
|
# Install locale |
||||
|
COPY ./locale.gen /etc/locale.gen |
||||
|
RUN locale-gen |
||||
|
|
||||
|
COPY gerincmet/prog_calc /var/www/html/gerincmet/prog_calc |
||||
|
|
||||
|
RUN chown -R www-data:www-data /var/www/ |
||||
|
RUN chmod -R 755 /var/www/ |
||||
|
|
||||
|
USER www-data |
||||
|
|
||||
|
# Prepare virtualenv |
||||
|
WORKDIR /var/www/html/gerincmet/prog_calc/prog_calc/ |
||||
|
COPY ./requirements.txt . |
||||
|
RUN python3 -m venv ./venv |
||||
|
RUN . ./venv/bin/activate |
||||
|
RUN ./venv/bin/pip install --upgrade pip setuptools |
||||
|
RUN ./venv/bin/pip install -r ./requirements.txt |
||||
|
|
||||
|
# Configure Apache |
||||
|
USER root |
||||
|
COPY ./start-apache.sh / |
||||
|
RUN a2dismod mpm_event && a2enmod mpm_prefork |
||||
|
COPY ./prog-calc.conf /etc/apache2/sites-available/000-default.conf |
||||
|
|
||||
|
# Start Apache |
||||
|
EXPOSE 80 |
||||
|
CMD ["/bin/sh", "/start-apache.sh"] |
||||
|
|
||||
@ -0,0 +1,13 @@ |
|||||
|
#!/var/www/html/gerincmet/prog_calc/prog_calc/venv/bin/python |
||||
|
import sys |
||||
|
import logging |
||||
|
import os |
||||
|
|
||||
|
APP_HOME = "/var/www/html/gerincmet/prog_calc/prog_calc/" |
||||
|
sys.path.insert(0,"/var/www/html/gerincmet/prog_calc/prog_calc/venv/lib/python3.9/site-packages") |
||||
|
|
||||
|
logging.basicConfig(stream=sys.stderr) |
||||
|
sys.path.insert(0,APP_HOME) |
||||
|
os.chdir(APP_HOME) |
||||
|
|
||||
|
from main import app as application |
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,77 @@ |
|||||
|
import pandas as pd |
||||
|
import numpy as np |
||||
|
import matplotlib.pyplot as plt |
||||
|
import lifelines as lf |
||||
|
import pickle |
||||
|
import io |
||||
|
import base64 |
||||
|
|
||||
|
|
||||
|
def get_timeline_loc(timeline, val, dur): |
||||
|
typestr = f"timedelta64[{dur}]" |
||||
|
res = timeline[np.equal(timeline.astype('timedelta64[D]').astype(typestr), np.array(val).astype(typestr))] |
||||
|
if len(res) > 0: |
||||
|
res = res[0] |
||||
|
else: |
||||
|
res = np.NaN |
||||
|
return res |
||||
|
|
||||
|
|
||||
|
def get_risk(cox, X, val, dur): |
||||
|
timeline = cox.predict_survival_function(X).index.to_numpy() |
||||
|
l = get_timeline_loc(timeline, val, dur) |
||||
|
risk = 1 - cox.predict_survival_function(X)[0][l] |
||||
|
return risk |
||||
|
|
||||
|
|
||||
|
def cox_model(primer_tumor_score, age_score, mobility_score, metastasis_score, protein_score): |
||||
|
# Predict for this |
||||
|
score = primer_tumor_score + age_score + mobility_score + metastasis_score + protein_score |
||||
|
if 0 <= score <= 17: |
||||
|
nmstpc_category = 1 |
||||
|
elif 18 <= score <= 24: |
||||
|
nmstpc_category = 2 |
||||
|
elif 25 <= score <= 39: |
||||
|
nmstpc_category = 3 |
||||
|
X = {"primer_tumor": np.array([primer_tumor_score]), |
||||
|
"age": np.array([age_score]), |
||||
|
"mobility": np.array([mobility_score]), |
||||
|
"metastasis": np.array([metastasis_score]), |
||||
|
"protein": np.array([protein_score]), |
||||
|
"categories": np.array([nmstpc_category])} |
||||
|
X = pd.DataFrame(X) |
||||
|
# Model is built from this: |
||||
|
|
||||
|
# Get KM-curve for population |
||||
|
label = "population" |
||||
|
km_in = open("km_model.pickle","rb") |
||||
|
km = pickle.load(km_in) |
||||
|
km_in.close() |
||||
|
fig, ax = plt.subplots() |
||||
|
fig.set_figheight(4) |
||||
|
fig.set_figwidth(8) |
||||
|
ax.plot(1 - km.survival_function_, color='b', label="Populáció") |
||||
|
ax.fill_between(km.timeline, 1 - km.confidence_interval_[f"{label}_lower_0.95"], |
||||
|
1 - km.confidence_interval_[f"{label}_upper_0.95"], color='b', alpha=.1) |
||||
|
|
||||
|
# Fit Cox-modell |
||||
|
cox_in = open("cox_model.pickle","rb") |
||||
|
cox = pickle.load(cox_in) |
||||
|
cox_in.close() |
||||
|
ax.plot(1 - cox.predict_survival_function(X)[0], color="r", label="Jelenlegi beteg") |
||||
|
ax.set_xlabel("Halál ideje (napokban)") |
||||
|
ax.set_ylabel("Halál kockázata") |
||||
|
ax.legend(loc="lower right") |
||||
|
ax.grid() |
||||
|
fig.show() |
||||
|
buf = io.BytesIO() |
||||
|
fig.savefig(buf,format = "png") |
||||
|
encoded_img = base64.b64encode(buf.getvalue()) |
||||
|
|
||||
|
# Recover risk of death for certain times |
||||
|
vals = [1, 3, 6, 1, 2, 4, 8] |
||||
|
durs = ["M", "M", "M", "Y", "Y", "Y", "Y"] |
||||
|
risks = [] |
||||
|
for val, dur in zip(vals, durs): |
||||
|
risks.append(round(get_risk(cox, X, val, dur) * 100, 1)) |
||||
|
return risks,encoded_img |
||||
Binary file not shown.
@ -0,0 +1,109 @@ |
|||||
|
from flask_wtf import FlaskForm |
||||
|
|
||||
|
from wtforms import SelectField,SubmitField |
||||
|
from wtforms.validators import DataRequired |
||||
|
|
||||
|
class Prognosis_Form(FlaskForm): |
||||
|
# Prognostic Factors |
||||
|
# Primer tumor |
||||
|
primer_tumor_types = [ |
||||
|
(1, "Hematológiai malginitás"), |
||||
|
(2, "Pajzsmirigy carcinoma"), |
||||
|
(3, "Emlő daganat"), |
||||
|
(4, "Prostata daganat"), |
||||
|
(5, "Angiosarcoma"), |
||||
|
(6, "Chondrosarcoma"), |
||||
|
(7, "Osteosarcoma"), |
||||
|
(8, "Ewing-sarcoma"), |
||||
|
(9, "Húgyhólyag"), |
||||
|
(10, "Colorectalis"), |
||||
|
(11, "Garat"), |
||||
|
(12, "Vese"), |
||||
|
(13, "Máj"), |
||||
|
(14, "Melanoma"), |
||||
|
(15, "Ovarium"), |
||||
|
(16, "Uterus"), |
||||
|
(17, "Parotis"), |
||||
|
(18, "Gyomor"), |
||||
|
(19, "Ismeretlen primer tumor"), |
||||
|
(20, "Méhnyak"), |
||||
|
(21, "Nyelőcső"), |
||||
|
(22, "Gége"), |
||||
|
(23, "Tüdő"), |
||||
|
(24, "Hasnyálmirigy"), |
||||
|
(25, "Orrmelléküreg eredet")] |
||||
|
primer_tumor = SelectField(f"Primer tumor típusa", choices = primer_tumor_types, validators = [DataRequired()]) |
||||
|
|
||||
|
# Age |
||||
|
age_class = [ |
||||
|
(0,"40 év alatt"), |
||||
|
(8,"40 év felett")] |
||||
|
age = SelectField(f"Életkor", choices = age_class, validators = [DataRequired()]) |
||||
|
|
||||
|
# Status |
||||
|
status_calss = [ |
||||
|
(0, "Járóképes"), |
||||
|
(5, "Ágyhoz kötött (járásképtelen)")] |
||||
|
status = SelectField(f"Ambulátoros státusz", choices = status_calss, validators = [DataRequired()]) |
||||
|
|
||||
|
# Metastasis |
||||
|
has_metastasis = [ |
||||
|
(0, "Nincs"), |
||||
|
(4, "Van")] |
||||
|
metastasis = SelectField(f"Belszervi áttétek jelenléte", choices = has_metastasis, validators = [DataRequired()]) |
||||
|
|
||||
|
# Protein levels |
||||
|
protein_class = [ |
||||
|
(0, "Normál tartomány (>6,5 g/dl)"), |
||||
|
(3, "Hypoproteinaemia (<6,5 g/dl)")] |
||||
|
protein_levels = SelectField(f"Szérum fehérje szint", choices = protein_class, validators = [DataRequired()]) |
||||
|
|
||||
|
#------------- |
||||
|
# SINS factors |
||||
|
# Localization |
||||
|
localization_class = [ |
||||
|
(3, "Junctionális (occiput-CII, CVII-ThII, ThII-LI, LV-SI)"), |
||||
|
(2, "Mobilis gerincszakasz (CIII-VI, LII-IV)"), |
||||
|
(1, "Semirigid gerincszakasz (ThIII-X)"), |
||||
|
(0, "Rigid (SII-V)")] |
||||
|
localization = SelectField(f"Lokalizáció", choices = localization_class, validators = [DataRequired()]) |
||||
|
|
||||
|
# Pain |
||||
|
has_pain = [ |
||||
|
(3, "Van"), |
||||
|
(2, "Időszakosan"), |
||||
|
(0, "Nincs")] |
||||
|
pain = SelectField(f"Fájdalom", choices = has_pain, validators = [DataRequired()]) |
||||
|
|
||||
|
# Bone lesion |
||||
|
bone_lesion_class = [ |
||||
|
(2, "Osteolyticus"), |
||||
|
(1, "Kevert"), |
||||
|
(0, "Osteoblasticus")] |
||||
|
bone_lesion = SelectField(f"Csontlézió típusa", choices=bone_lesion_class, validators=[DataRequired()]) |
||||
|
|
||||
|
# Spinal stability |
||||
|
stability_class = [ |
||||
|
(4, "Subluxatio/luxatio"), |
||||
|
(2, "De novo kialakult deformitás (kyphosis, scoliosis)"), |
||||
|
(0, "Normál")] |
||||
|
stability = SelectField(f"Gerincstabilitás", choices=stability_class, validators=[DataRequired()]) |
||||
|
|
||||
|
# Compression |
||||
|
compression_class = [ |
||||
|
(3, ">50% komprimált"), |
||||
|
(2, "<50% komprimált"), |
||||
|
(1, "Nincs kompresszió a csigolyatest 50%-os involváltság mellett"), |
||||
|
(0, "A fentiek közül egyik sem")] |
||||
|
compression = SelectField(f"Csigolyatest kompresszió mértéke", choices=compression_class, validators=[DataRequired()]) |
||||
|
|
||||
|
# Involvement |
||||
|
involvement_class = [ |
||||
|
(3, "Bilateralis"), |
||||
|
(2, "Unilateralis"), |
||||
|
(1, "A fentiek közül egyik sem")] |
||||
|
involvement = SelectField(f"A spinalis elemek postero-lateralis érintettsége", choices=involvement_class, validators=[DataRequired()]) |
||||
|
|
||||
|
#------- |
||||
|
# Result |
||||
|
submit = SubmitField("Eredmény") |
||||
Binary file not shown.
@ -0,0 +1,24 @@ |
|||||
|
from flask import Flask, render_template |
||||
|
from form import Prognosis_Form |
||||
|
from cox import cox_model |
||||
|
from tumor_type_to_score import type_to_score |
||||
|
|
||||
|
app = Flask(__name__) |
||||
|
app.config["SECRET_KEY"] = "S(JK5Re,7*7Rbm#A" |
||||
|
|
||||
|
@app.route("/",methods = ["GET","POST"]) |
||||
|
def index(): |
||||
|
form = Prognosis_Form() |
||||
|
if form.validate_on_submit(): |
||||
|
tumor_score = type_to_score(int(form.primer_tumor.data)) |
||||
|
risks,encoded_img = cox_model(tumor_score , int(form.age.data) , int(form.status.data) , int(form.metastasis.data) , int(form.protein_levels.data)) |
||||
|
nmstpc_score = tumor_score + int(form.age.data) + int(form.status.data) + int(form.metastasis.data) + int(form.protein_levels.data) |
||||
|
sins_score = int(form.localization.data) + int(form.pain.data) + int(form.bone_lesion.data) + int(form.stability.data) + int(form.compression.data) + int(form.involvement.data) |
||||
|
return render_template("prognosis_block.html",nmstpc_score = nmstpc_score,sins_score=sins_score,m1r=risks[0],m3r=risks[1],m6r=risks[2],y1r=risks[3],y2r=risks[4],y4r=risks[5],y8r=risks[6],form=form, tumor_score=tumor_score,encoded_img = encoded_img.decode('utf-8')) |
||||
|
return render_template("form.html",form=form,tumor_score = None) |
||||
|
@app.route("/contact_us") |
||||
|
def contact_us(): |
||||
|
return render_template("contact_us.html") |
||||
|
|
||||
|
if __name__ == "__main__": |
||||
|
app.run() |
||||
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 110 KiB |
@ -0,0 +1,137 @@ |
|||||
|
body { |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; |
||||
|
color: #808080; |
||||
|
} |
||||
|
/* |
||||
|
* Formatting the header area |
||||
|
*/ |
||||
|
header { |
||||
|
padding: 10px 0px 100px 0px; |
||||
|
background-color: #ffffff; |
||||
|
height: 35px; |
||||
|
width: 1200px; |
||||
|
opacity: .9; |
||||
|
margin: 0 auto; |
||||
|
border-style: hidden hidden hidden hidden; |
||||
|
-webkit-border-radius: 6px; |
||||
|
-moz-border-radius: 6px; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
header div.container { |
||||
|
width: 1200px; |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
|
||||
|
header img.head { |
||||
|
position: absolute; |
||||
|
z-index: -5; |
||||
|
} |
||||
|
|
||||
|
header h1.logo { |
||||
|
margin-top: 65px; |
||||
|
margin-left: 175px; |
||||
|
font-family: 'neos', Arial, Verdana, Helvetica; |
||||
|
font-size: 1.6em; |
||||
|
text-transform: uppercase; |
||||
|
float: left; |
||||
|
} |
||||
|
|
||||
|
/* |
||||
|
* Centering the body content #F0801A |
||||
|
*/ |
||||
|
.container { |
||||
|
width: 1200px; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
div.home { |
||||
|
padding: 10px 10px 10px 10px; |
||||
|
background-color: #ffffff; |
||||
|
-webkit-border-radius: 6px; |
||||
|
-moz-border-radius: 6px; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
|
||||
|
.result_image { |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
width: 70%; |
||||
|
-webkit-border-radius: 6px; |
||||
|
-moz-border-radius: 6px; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
|
||||
|
.emk_logo { |
||||
|
-webkit-border-radius: 6px; |
||||
|
-moz-border-radius: 6px; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
|
||||
|
hr { |
||||
|
border: 1px solid #808080; |
||||
|
border-radius: 0px; |
||||
|
} |
||||
|
|
||||
|
div.about { |
||||
|
padding: 10px 10px 10px 10px; |
||||
|
background-color: #808080; |
||||
|
color: white; |
||||
|
-webkit-border-radius: 6px; |
||||
|
-moz-border-radius: 6px; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
|
||||
|
h2 { |
||||
|
font-size: 1.7em; |
||||
|
margin-top: 10px; |
||||
|
margin-bottom: 10px; |
||||
|
text-align: left; |
||||
|
letter-spacing: -2px; |
||||
|
color: #F0801A; |
||||
|
} |
||||
|
h3 { |
||||
|
font-size: 1.5em; |
||||
|
font-weight: 100; |
||||
|
margin-top: 0px; |
||||
|
margin-bottom: 0px; |
||||
|
text-align: left; |
||||
|
letter-spacing: -1px; |
||||
|
color: #3873BA; |
||||
|
} |
||||
|
h3.about { |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.menu { |
||||
|
float: right; |
||||
|
margin-top: -105px; |
||||
|
margin-right: 0px; |
||||
|
} |
||||
|
.menu li { |
||||
|
display: inline; |
||||
|
} |
||||
|
.menu li + li { |
||||
|
margin-left: 10px; |
||||
|
} |
||||
|
.menu li a { |
||||
|
color: #3873BA; |
||||
|
background-color: transparent; |
||||
|
text-decoration: none; |
||||
|
} |
||||
|
.menu li a:visited { |
||||
|
color: #3873BA; |
||||
|
background-color: transparent; |
||||
|
text-decoration: none; |
||||
|
} |
||||
|
.menu li a:hover { |
||||
|
color: #F0801A; |
||||
|
background-color: transparent; |
||||
|
text-decoration: none; |
||||
|
} |
||||
|
.menu li a:active { |
||||
|
color: #F0801A; |
||||
|
background-color: transparent; |
||||
|
text-decoration: none; |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
{% extends "main.html" %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<div class="container"><div class="home"> |
||||
|
<p>A weboldallal kapcsolatos problémákat a <a href="mailto:baskayj@student.elte.hu">baskayj@student.elte.hu</a> címen jelezzék.</p> |
||||
|
</div></div> |
||||
|
{% endblock %} |
||||
@ -0,0 +1,60 @@ |
|||||
|
{% extends "main.html" %} |
||||
|
|
||||
|
{% block content %} |
||||
|
<div class="container"><div class="home"> |
||||
|
<form action="" method="post" novalidate> |
||||
|
|
||||
|
{{ form.hidden_tag() }} |
||||
|
<p> |
||||
|
<h3>Prognosztikai faktorok</h3> |
||||
|
{{ form.primer_tumor.label }}{% if not tumor_score == None %}: <b style="color:red">{{ tumor_score }} pont</b>{% endif %}<br> |
||||
|
{{ form.primer_tumor() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.age.label }}{% if not form.age.data == None %}: <b style="color:red">{{ form.age.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.age() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.status.label }}{% if not form.status.data == None %}: <b style="color:red">{{ form.status.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.status() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.metastasis.label }}{% if not form.metastasis.data == None %}: <b style="color:red">{{ form.metastasis.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.metastasis() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.protein_levels.label }}{% if not form.protein_levels.data == None %}: <b style="color:red">{{ form.protein_levels.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.protein_levels() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
<h3>SINS (Spinal Instability Neoplastic Score)<sup>1</sup></h3> |
||||
|
{{ form.localization.label }}{% if not form.localization.data == None %}: <b style="color:red">{{ form.localization.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.localization() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.pain.label }}{% if not form.pain.data == None %}: <b style="color:red">{{ form.pain.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.pain() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.bone_lesion.label }}{% if not form.bone_lesion.data == None %}: <b style="color:red">{{ form.bone_lesion.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.bone_lesion() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.stability.label }}{% if not form.stability.data == None %}: <b style="color:red">{{ form.stability.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.stability() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.compression.label }}{% if not form.compression.data == None %}: <b style="color:red">{{ form.compression.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.compression() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.involvement.label }}{% if not form.involvement.data == None %}: <b style="color:red">{{ form.involvement.data }} pont</b>{% endif %}<br> |
||||
|
{{ form.involvement() }} |
||||
|
</p> |
||||
|
<p> |
||||
|
{{ form.submit() }} |
||||
|
</p> |
||||
|
</form> |
||||
|
</div> |
||||
|
{% block results %}{% endblock %} |
||||
|
{% endblock %} |
||||
@ -0,0 +1,46 @@ |
|||||
|
<!doctpye html> |
||||
|
<html lang="hu"> |
||||
|
<head> |
||||
|
<meta charset="UTF-8"> |
||||
|
<meta http-equiv="X-Clacks-Overhead" content="GNU Terry Pratchett" /> |
||||
|
<title>OMIII MGPK</title> |
||||
|
<link rel="stylesheet" type="text/css" href="{{url_for('static',filename = 'style.css')}}"> |
||||
|
</head> |
||||
|
<body> |
||||
|
<header> |
||||
|
<img src="{{url_for('static',filename='head.jpg')}}" width="1200" height="138" class="head"> |
||||
|
<div class="container"> |
||||
|
<h1 class="logo"> |
||||
|
Országos Mentális, Ideggyógyászati és Idegsebészeti Intézet |
||||
|
Metasztatikus Gerincdaganat Prognózis Kalkulátor |
||||
|
</h1> |
||||
|
<strong><nav><ul class="menu"> |
||||
|
<li><a class="link" href="{{ url_for('index') }}">Kalkulátor</a></li> |
||||
|
<li><a class="link" href="{{ url_for('contact_us') }}">Kapcsolat</a></li> |
||||
|
<li><a onclick="window.print()">Nyomtatás</a></li> |
||||
|
</ul></nav></strong> |
||||
|
</div> |
||||
|
</header> |
||||
|
{% block content %}{% endblock %} |
||||
|
<div class="container"><div class="about"> |
||||
|
<p> <img src="{{url_for('static', filename='sote_logo.png')}}" width="150" height="150"> |
||||
|
<img src="{{url_for('static', filename='sote_phd.png')}}" width="150" height="150"> |
||||
|
<img src="{{url_for('static', filename='elte_logo.png')}}" width="150" height="150"> |
||||
|
<img src="{{url_for('static', filename='sote_emk.png')}}" width="150" height="150" class="emk_logo"> |
||||
|
|
||||
|
</p> |
||||
|
<p> |
||||
|
Amennyiben kutatásunkat, pontrendszerünket hasznosnak találta, kérjük hivatkozza kéziratainkat a további fejlődés elősegítése céljából. |
||||
|
<ul> |
||||
|
<li>Czigléczki G., Mezei T., Pollner P., Horváth A., Banczerowski P. (2018) <i>Prognostic factors of surgical complications and overall survival of patients with metastatic spinal tumor</i> World Neurosurgery, 113:e20-e28. DOI:<a href="https://doi.org/10.1016/j.wneu.2018.01.092">10.1016/j.wneu.2018.01.092</a></li> |
||||
|
<li>Pollner P.*, Horváth A.*, Mezei T., Banczerowski P., Czigléczki G. (2018) <i>Analysis of four scoring systems for the prognosis of patients with metastasis of the vertebral column</i> World Neurosurgery, 112:e675-e682. DOI:<a href="https://doi.org/10.1016/j.wneu.2018.01.124">10.1016/j.wneu.2018.01.124</a></li> |
||||
|
<li>Mezei T., Horváth A., Pollner P., Czigléczki G., Banczerowski P. (2020) <i>Research on the predicting power of the revised Tokuhashi system: how much time can surgery give to patients with short life expectancy?</i> International Journal of Clinical Oncology, 25 (4):755-764. DOI:<a href="https://doi.org/10.1007/s10147-019-01612-w">10.1007/s10147-019-01612-w</a></li> |
||||
|
</ul> |
||||
|
</p> |
||||
|
<p> |
||||
|
<h3 class="about">Felhasznált Irodalom</h3> |
||||
|
[1.] Fisher, C.G. et al. (2010) <i>A novel classification system for spinal instability in neoplastic disease: an evidence-based approach and expert consensus from the Spine Oncology Study Group.</i> Spine (Phila Pa 1976) 35 (22):E1221-1229. DOI:<a href="https://doi.org/10.1097/brs.0b013e3181e16ae2">10.1097/BRS.0b013e3181e16ae2</a> |
||||
|
</p> |
||||
|
</div></div> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,61 @@ |
|||||
|
{% extends "form.html" %} |
||||
|
|
||||
|
{% block results %} |
||||
|
<hr> |
||||
|
<h2>Eredmény</h2> |
||||
|
<div class="container"><div class="home"> |
||||
|
<h3>Prognosztikai csoportok</h3> |
||||
|
{% if 0 <= nmstpc_score <= 17 %} |
||||
|
<div><p><b>Kedvező életkilátású csoport</b> <i>(0-17: <span style="color:red">{{ nmstpc_score }} pont</span>)</i> Műtéti kezelés javasolt. A radiológiai morfológia alapján választandó meg a pontos műtéttechnika, javasoljuk a maximálisan lehetséges radikális eltávolítást („excízionális műtét").</p></div> |
||||
|
{% elif 18 <= nmstpc_score <= 24 %} |
||||
|
<div><p><b>Közepes életkilátású csoport</b> <i>(18-24: <span style="color:red">{{ nmstpc_score }} pont</span>)</i> Műtéti ellátás javasolt, azonban „kevésbé invazív beavatkozást” preferálandó ebben a csoportban.</p></div> |
||||
|
{% elif 25 <= nmstpc_score <= 39 %} |
||||
|
<div><p><b>Gyenge életkilátású csoport</b> <i>(24-39: <span style="color:red">{{ nmstpc_score }} pont</span>)</i> Elsősorban palliatív onko-radioterápia javasolt, amennyiben minimal invazív beavatkozással jelentős funkciójavulást, életminőség növekedést, fájdalomcsillapítást érhetünk el, abban az esetben műtéti ellátás is szóba jön.</p></div> |
||||
|
{% else %} |
||||
|
<div><p>ERROR: nmstpc_score > 39 </p></div> |
||||
|
{% endif %} |
||||
|
<p>Stabilizáció szükségességének megítéléséhez SINS nyújthat segítséget.</p> |
||||
|
<h3>A feltételezett instabilitás mértéke</h3> |
||||
|
{% if 0 <= sins_score <= 6 %} |
||||
|
<div><p><b>Stabil gerincszakasz.</b> <i>(0-6: <span style="color:red">{{ sins_score }} pont</span>)</i></p></div> |
||||
|
{% elif 7 <= sins_score <= 12 %} |
||||
|
<div><p><b>Pontenciálisan instabil gerincszakasz.</b> <i>(7-12: <span style="color:red">{{ sins_score }} pont</span>)</i></p></div> |
||||
|
{% elif 13 <= sins_score <= 18 %} |
||||
|
<div><p><b>Instabil gerincszakasz.</b> <i>(13-18: <span style="color:red">{{ sins_score }} pont</span>)</i></p></div> |
||||
|
{% else %} |
||||
|
<div><p>ERROR: sins_score > 18 </p></div> |
||||
|
{% endif %} |
||||
|
<h3> Halál kockázata </h3> |
||||
|
<table> |
||||
|
<tr> |
||||
|
<td>1 hónap:</td> |
||||
|
<td><b>{{ m1r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>3 hónap:</td> |
||||
|
<td><b>{{ m3r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>6 hónap:</td> |
||||
|
<td><b>{{ m6r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>1 év:</td> |
||||
|
<td><b>{{ y1r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>2 év:</td> |
||||
|
<td><b>{{ y2r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>4 év:</td> |
||||
|
<td><b>{{ y4r }} %</b></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td>8 év:</td> |
||||
|
<td><b>{{ y8r }} %</b></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<img src="data:image/png;base64,{{ encoded_img }}" class="result_image"> |
||||
|
</div></div> |
||||
|
{% endblock %} |
||||
@ -0,0 +1,33 @@ |
|||||
|
primer_tumor_score = [ |
||||
|
(0, 1), |
||||
|
(0, 2), |
||||
|
(6, 3), |
||||
|
(6, 4), |
||||
|
(12, 5), |
||||
|
(12, 6), |
||||
|
(12, 7), |
||||
|
(12, 8), |
||||
|
(12, 9), |
||||
|
(12, 10), |
||||
|
(12, 11), |
||||
|
(12, 12), |
||||
|
(12, 13), |
||||
|
(12, 14), |
||||
|
(12, 15), |
||||
|
(12, 16), |
||||
|
(12, 17), |
||||
|
(12, 18), |
||||
|
(12, 19), |
||||
|
(19, 20), |
||||
|
(19, 21), |
||||
|
(19, 22), |
||||
|
(19, 23), |
||||
|
(19, 24), |
||||
|
(19, 25)] |
||||
|
|
||||
|
def type_to_score(typ): |
||||
|
score = 0 |
||||
|
for i in range(len(primer_tumor_score)): |
||||
|
if typ == primer_tumor_score[i][1]: |
||||
|
score = primer_tumor_score[i][0] |
||||
|
return int(score) |
||||
@ -0,0 +1 @@ |
|||||
|
hu_HU.UTF-8 UTF-8 |
||||
@ -0,0 +1,23 @@ |
|||||
|
<VirtualHost *:80> |
||||
|
ServerAdmin baskayj |
||||
|
DocumentRoot /var/www/html/gerincmet |
||||
|
|
||||
|
WSGIDaemonProcess prog_calc python-home=/var/www/html/gerincmet/prog_calc/prog_calc/venv python-path=/var/www/html/gerincmet/prog_calc/prog_calc:/var/www/html/gerincmet/prog_calc/prog_calc/venv/local/lib/python3.9/site-packages threads=5 |
||||
|
# WSGIScriptAlias /omiiimgpk /var/www/html/gerincmet/prog_calc/prog_calc.wsgi |
||||
|
WSGIScriptAlias /gerincmet /var/www/html/gerincmet/prog_calc/prog_calc.wsgi |
||||
|
WSGIApplicationGroup %{GLOBAL} |
||||
|
<Directory /var/www/html/gerincmet/prog_calc/prog_calc/> |
||||
|
WSGIProcessGroup prog_calc |
||||
|
WSGIApplicationGroup %{GLOBAL} |
||||
|
Order deny,allow |
||||
|
Allow from all |
||||
|
</Directory> |
||||
|
Alias /static /var/www/html/gerincmet/prog_calc/prog_calc/static |
||||
|
<Directory /var/www/html/gerincmet/prog_calc/prog_calc/static/> |
||||
|
Order allow,deny |
||||
|
Allow from all |
||||
|
</Directory> |
||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log |
||||
|
LogLevel warn |
||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined |
||||
|
</VirtualHost> |
||||
@ -0,0 +1,36 @@ |
|||||
|
Flask==2.0.2 |
||||
|
Flask-WTF==1.0.0 |
||||
|
Jinja2==3.0.3 |
||||
|
MarkupSafe==2.0.1 |
||||
|
Pillow==8.4.0 |
||||
|
WTForms==3.0.0 |
||||
|
Werkzeug==2.0.2 |
||||
|
altgraph==0.17.2 |
||||
|
astor==0.8.1 |
||||
|
autograd==1.3 |
||||
|
autograd-gamma==0.5.0 |
||||
|
click==8.0.3 |
||||
|
cycler==0.11.0 |
||||
|
fonttools==4.28.1 |
||||
|
formulaic==0.2.4 |
||||
|
future==0.18.2 |
||||
|
interface-meta==1.2.4 |
||||
|
itsdangerous==2.0.1 |
||||
|
kiwisolver==1.3.2 |
||||
|
lifelines==0.26.3 |
||||
|
matplotlib==3.5.0 |
||||
|
numpy==1.21.4 |
||||
|
packaging==21.2 |
||||
|
pandas==1.3.4 |
||||
|
pip==20.0.2 |
||||
|
pyinstaller==4.7 |
||||
|
pyinstaller-hooks-contrib==2021.3 |
||||
|
pyparsing==2.4.7 |
||||
|
python-dateutil==2.8.2 |
||||
|
pytz==2021.3 |
||||
|
scipy==1.7.2 |
||||
|
setuptools==44.0.0 |
||||
|
setuptools-scm==6.3.2 |
||||
|
six==1.16.0 |
||||
|
tomli==1.2.2 |
||||
|
wrapt==1.13.3 |
||||
@ -0,0 +1,9 @@ |
|||||
|
#!/bin/sh |
||||
|
|
||||
|
set -e |
||||
|
|
||||
|
. /etc/apache2/envvars |
||||
|
ulimit -n 8192 |
||||
|
chown root:www-data /var/lock/apache2 |
||||
|
chown -R www-data:www-data /var/www/html |
||||
|
exec /usr/sbin/apache2 -k start -DFOREGROUND |
||||
Loading…
Reference in new issue