1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
import random
import os
import glob
diagnosis = {
"1.png": (2, "retrosternales Struma"),
"2.png": (2, "retrosternales struma"),
"3.jpg": (2, "Lungenemphysem"),
"4.jpg": (2, "Lungenemphysem"),
"5.png": (2, "freie Luft"),
"6.png": (2, "freie Luft"),
"7.png": (2, "Pneumonie"),
"8.png": (2, "Pneumonie"),
"9.jpg": (2, "karzinom"),
"10.jpg": (2, "karzinom"),
"11.jpg": (2, "Lymphom"),
"12.jpg": (2, "Lymphom"),
"13.png": (2, "Pleuraerguss"),
"14.png": (2, "Pleuraerguss"),
"15.png": (2, "Pneumothorax links"),
"16.png": (2, "Pneumothorax links"),
"17.jpg": (2, "Metastasen"),
"18.jpg": (2, "Metastasen"),
"19.jpg": (2, "Lungenfibrose"),
"20.jpg": (2, "Lungenfibrose"),
"21.jpg": (1, "Kardiale Stauung"),
"22.jpg": (1, "Kardiale Stauung"),
"23.jpg": (2, "Lymphadenopathie"),
"24.png": (2, "Lymphadenopathie"),
"25.jpg": (2, "Oberlappenatelektase"),
"26.jpg": (2, "Oberlappenatelektase"),
"rt\\ atelektase.png": (1, "untarlappenatelektase"),
"rt\\ bronchial\\ ca.png": (1, "bronchial ca"),
"rt\\ freie\\ intraabdominelle\\ luft.png":
(1, "freie intraabdominelle luft"),
"rt\\ hiatushernie.png": (1, "hiatushernie"),
"rt\\ luft.png": (1, "weichteilemphysem"),
"rt\\ pulmonal\\ alveoläre\\ stauung.png":
(1, "pulmonal alveoläre stauung"),
"rt\\ pulmon\\ st\\ die\\ zweite\\ kerley.png": (1, "pulmonale stauung"),
"rt\\ spannungspneu.png": (1, "spannungspneumothorax"),
"rt\\ struma.png": (1, "struma"),
"rt\\ weichteilemphysem.png": (1, "weichteilemphysem"),
}
# get all files matching the pattern
#files = glob.glob("res/*")
# clear screen function
#def cls():
# os.system('cls' if os.name == 'nt' else 'clear')
# extract number x from res/x.png
#def getint(name):
# basename = name.partition('.')[0]
# _, num = basename.split('/')
# return int(num)
# sort files by number
#files.sort(key=getint)
fdiag = list(range(1, 36))
random.shuffle(fdiag)
# print greeting
print("Ultimativer Osce-Trainer!\n")
for x in fdiag:
# uncomment for debug purposes
#print(files[x])
# the -F enabeles fullscreen mode
f = list(diagnosis.keys())[x]
if x <= 26:
f1 = list(diagnosis.keys())[x & (~1)]
f2 = list(diagnosis.keys())[x | 1]
os.system(f"feh -F res/{f1}")
if diagnosis[f][0] == 2:
os.system(f"feh -F res/{f2}")
else:
os.system(f"feh -F res/{f}")
p = input(" Was ist deine Diagnose? \n")
if p.lower() in diagnosis[f][1].lower() and len(p) > 2:
print("richtig")
else:
print("falsch, die richtige Lösung ist: " + diagnosis[f][1])
input("Press enter to continue")
print("\n\n\nAlles Geschaff!!!!\nHerzlichen Glückwunsch")
|