giuseppericcio commited on
Commit
0b64aaf
·
1 Parent(s): cbaa3bb

Update .gitignore

Browse files
.gitignore CHANGED
@@ -1 +0,0 @@
1
- streamlit_results/
 
 
streamlit_results/explain_graph.html ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+
5
+ <script>function neighbourhoodHighlight(params) {
6
+ // console.log("in nieghbourhoodhighlight");
7
+ allNodes = nodes.get({ returnType: "Object" });
8
+ // originalNodes = JSON.parse(JSON.stringify(allNodes));
9
+ // if something is selected:
10
+ if (params.nodes.length > 0) {
11
+ highlightActive = true;
12
+ var i, j;
13
+ var selectedNode = params.nodes[0];
14
+ var degrees = 2;
15
+
16
+ // mark all nodes as hard to read.
17
+ for (let nodeId in allNodes) {
18
+ // nodeColors[nodeId] = allNodes[nodeId].color;
19
+ allNodes[nodeId].color = "rgba(200,200,200,0.5)";
20
+ if (allNodes[nodeId].hiddenLabel === undefined) {
21
+ allNodes[nodeId].hiddenLabel = allNodes[nodeId].label;
22
+ allNodes[nodeId].label = undefined;
23
+ }
24
+ }
25
+ var connectedNodes = network.getConnectedNodes(selectedNode);
26
+ var allConnectedNodes = [];
27
+
28
+ // get the second degree nodes
29
+ for (i = 1; i < degrees; i++) {
30
+ for (j = 0; j < connectedNodes.length; j++) {
31
+ allConnectedNodes = allConnectedNodes.concat(
32
+ network.getConnectedNodes(connectedNodes[j])
33
+ );
34
+ }
35
+ }
36
+
37
+ // all second degree nodes get a different color and their label back
38
+ for (i = 0; i < allConnectedNodes.length; i++) {
39
+ // allNodes[allConnectedNodes[i]].color = "pink";
40
+ allNodes[allConnectedNodes[i]].color = "rgba(150,150,150,0.75)";
41
+ if (allNodes[allConnectedNodes[i]].hiddenLabel !== undefined) {
42
+ allNodes[allConnectedNodes[i]].label =
43
+ allNodes[allConnectedNodes[i]].hiddenLabel;
44
+ allNodes[allConnectedNodes[i]].hiddenLabel = undefined;
45
+ }
46
+ }
47
+
48
+ // all first degree nodes get their own color and their label back
49
+ for (i = 0; i < connectedNodes.length; i++) {
50
+ // allNodes[connectedNodes[i]].color = undefined;
51
+ allNodes[connectedNodes[i]].color = nodeColors[connectedNodes[i]];
52
+ if (allNodes[connectedNodes[i]].hiddenLabel !== undefined) {
53
+ allNodes[connectedNodes[i]].label =
54
+ allNodes[connectedNodes[i]].hiddenLabel;
55
+ allNodes[connectedNodes[i]].hiddenLabel = undefined;
56
+ }
57
+ }
58
+
59
+ // the main node gets its own color and its label back.
60
+ // allNodes[selectedNode].color = undefined;
61
+ allNodes[selectedNode].color = nodeColors[selectedNode];
62
+ if (allNodes[selectedNode].hiddenLabel !== undefined) {
63
+ allNodes[selectedNode].label = allNodes[selectedNode].hiddenLabel;
64
+ allNodes[selectedNode].hiddenLabel = undefined;
65
+ }
66
+ } else if (highlightActive === true) {
67
+ // console.log("highlightActive was true");
68
+ // reset all nodes
69
+ for (let nodeId in allNodes) {
70
+ // allNodes[nodeId].color = "purple";
71
+ allNodes[nodeId].color = nodeColors[nodeId];
72
+ // delete allNodes[nodeId].color;
73
+ if (allNodes[nodeId].hiddenLabel !== undefined) {
74
+ allNodes[nodeId].label = allNodes[nodeId].hiddenLabel;
75
+ allNodes[nodeId].hiddenLabel = undefined;
76
+ }
77
+ }
78
+ highlightActive = false;
79
+ }
80
+
81
+ // transform the object into an array
82
+ var updateArray = [];
83
+ if (params.nodes.length > 0) {
84
+ for (let nodeId in allNodes) {
85
+ if (allNodes.hasOwnProperty(nodeId)) {
86
+ // console.log(allNodes[nodeId]);
87
+ updateArray.push(allNodes[nodeId]);
88
+ }
89
+ }
90
+ nodes.update(updateArray);
91
+ } else {
92
+ // console.log("Nothing was selected");
93
+ for (let nodeId in allNodes) {
94
+ if (allNodes.hasOwnProperty(nodeId)) {
95
+ // console.log(allNodes[nodeId]);
96
+ // allNodes[nodeId].color = {};
97
+ updateArray.push(allNodes[nodeId]);
98
+ }
99
+ }
100
+ nodes.update(updateArray);
101
+ }
102
+ }
103
+
104
+ function filterHighlight(params) {
105
+ allNodes = nodes.get({ returnType: "Object" });
106
+ // if something is selected:
107
+ if (params.nodes.length > 0) {
108
+ filterActive = true;
109
+ let selectedNodes = params.nodes;
110
+
111
+ // hiding all nodes and saving the label
112
+ for (let nodeId in allNodes) {
113
+ allNodes[nodeId].hidden = true;
114
+ if (allNodes[nodeId].savedLabel === undefined) {
115
+ allNodes[nodeId].savedLabel = allNodes[nodeId].label;
116
+ allNodes[nodeId].label = undefined;
117
+ }
118
+ }
119
+
120
+ for (let i=0; i < selectedNodes.length; i++) {
121
+ allNodes[selectedNodes[i]].hidden = false;
122
+ if (allNodes[selectedNodes[i]].savedLabel !== undefined) {
123
+ allNodes[selectedNodes[i]].label = allNodes[selectedNodes[i]].savedLabel;
124
+ allNodes[selectedNodes[i]].savedLabel = undefined;
125
+ }
126
+ }
127
+
128
+ } else if (filterActive === true) {
129
+ // reset all nodes
130
+ for (let nodeId in allNodes) {
131
+ allNodes[nodeId].hidden = false;
132
+ if (allNodes[nodeId].savedLabel !== undefined) {
133
+ allNodes[nodeId].label = allNodes[nodeId].savedLabel;
134
+ allNodes[nodeId].savedLabel = undefined;
135
+ }
136
+ }
137
+ filterActive = false;
138
+ }
139
+
140
+ // transform the object into an array
141
+ var updateArray = [];
142
+ if (params.nodes.length > 0) {
143
+ for (let nodeId in allNodes) {
144
+ if (allNodes.hasOwnProperty(nodeId)) {
145
+ updateArray.push(allNodes[nodeId]);
146
+ }
147
+ }
148
+ nodes.update(updateArray);
149
+ } else {
150
+ for (let nodeId in allNodes) {
151
+ if (allNodes.hasOwnProperty(nodeId)) {
152
+ updateArray.push(allNodes[nodeId]);
153
+ }
154
+ }
155
+ nodes.update(updateArray);
156
+ }
157
+ }
158
+
159
+ function selectNode(nodes) {
160
+ network.selectNodes(nodes);
161
+ neighbourhoodHighlight({ nodes: nodes });
162
+ return nodes;
163
+ }
164
+
165
+ function selectNodes(nodes) {
166
+ network.selectNodes(nodes);
167
+ filterHighlight({nodes: nodes});
168
+ return nodes;
169
+ }
170
+
171
+ function highlightFilter(filter) {
172
+ let selectedNodes = []
173
+ let selectedProp = filter['property']
174
+ if (filter['item'] === 'node') {
175
+ let allNodes = nodes.get({ returnType: "Object" });
176
+ for (let nodeId in allNodes) {
177
+ if (allNodes[nodeId][selectedProp] && filter['value'].includes((allNodes[nodeId][selectedProp]).toString())) {
178
+ selectedNodes.push(nodeId)
179
+ }
180
+ }
181
+ }
182
+ else if (filter['item'] === 'edge'){
183
+ let allEdges = edges.get({returnType: 'object'});
184
+ // check if the selected property exists for selected edge and select the nodes connected to the edge
185
+ for (let edge in allEdges) {
186
+ if (allEdges[edge][selectedProp] && filter['value'].includes((allEdges[edge][selectedProp]).toString())) {
187
+ selectedNodes.push(allEdges[edge]['from'])
188
+ selectedNodes.push(allEdges[edge]['to'])
189
+ }
190
+ }
191
+ }
192
+ selectNodes(selectedNodes)
193
+ }</script>
194
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
195
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <center>
205
+ <h1></h1>
206
+ </center>
207
+
208
+ <!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
209
+ <script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->
210
+ <link
211
+ href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
212
+ rel="stylesheet"
213
+ integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
214
+ crossorigin="anonymous"
215
+ />
216
+ <script
217
+ src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
218
+ integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
219
+ crossorigin="anonymous"
220
+ ></script>
221
+
222
+
223
+ <center>
224
+ <h1></h1>
225
+ </center>
226
+ <style type="text/css">
227
+
228
+ #mynetwork {
229
+ width: 100%;
230
+ height: 500px;
231
+ background-color: #ffffff;
232
+ border: 1px solid lightgray;
233
+ position: relative;
234
+ float: left;
235
+ }
236
+
237
+
238
+
239
+
240
+
241
+
242
+ </style>
243
+ </head>
244
+
245
+
246
+ <body>
247
+ <div class="card" style="width: 100%">
248
+
249
+
250
+ <div id="mynetwork" class="card-body"></div>
251
+ </div>
252
+
253
+
254
+
255
+
256
+ <script type="text/javascript">
257
+
258
+ // initialize global variables.
259
+ var edges;
260
+ var nodes;
261
+ var allNodes;
262
+ var allEdges;
263
+ var nodeColors;
264
+ var originalNodes;
265
+ var network;
266
+ var container;
267
+ var options, data;
268
+ var filter = {
269
+ item : '',
270
+ property : '',
271
+ value : []
272
+ };
273
+
274
+
275
+
276
+
277
+
278
+ // This method is responsible for drawing the graph, returns the drawn network
279
+ function drawGraph() {
280
+ var container = document.getElementById('mynetwork');
281
+
282
+
283
+
284
+ // parsing and collecting nodes and edges from the python
285
+ nodes = new vis.DataSet([{"color": "#20b2aa", "id": "patient_0", "label": "patient_0", "opacity": 2.7773168683052063, "shape": "dot", "size": 10, "type": "patient"}, {"color": "#fa8072", "id": "visit_0", "label": "visit_0", "opacity": 11.941373348236084, "shape": "dot", "size": 11, "type": "visit"}, {"color": "#98fb98", "id": "Unspecified problem with special functions", "label": "Unspecified problem with special functions", "opacity": 0.2980312518775463, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Systemic lupus erythematosus", "label": "Systemic lupus erythematosus", "opacity": 0.32912302762269974, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Atresia and stenosis of aorta", "label": "Atresia and stenosis of aorta", "opacity": 0.2311965450644493, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Coarctation of aorta (preductal) (postductal)", "label": "Coarctation of aorta (preductal) (postductal)", "opacity": 0.434977151453495, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#cd853f", "id": "Atrioventricular block, complete", "label": "Atrioventricular block, complete", "opacity": 0.37939630448818207, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#98fb98", "id": "Conduction disorder, unspecified", "label": "Conduction disorder, unspecified", "opacity": 0.29761018231511116, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Heart failure, unspecified", "label": "Heart failure, unspecified", "opacity": 0.269064512103796, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Anemia, unspecified", "label": "Anemia, unspecified", "opacity": 0.23666711524128914, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Generalized pain", "label": "Generalized pain", "opacity": 0.3131905570626259, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Aortic valve disorders", "label": "Aortic valve disorders", "opacity": 0.34145116806030273, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#98fb98", "id": "Portal hypertension", "label": "Portal hypertension", "opacity": 0.23520531132817268, "shape": "dot", "size": 10, "type": "symptom"}, {"color": "#cd853f", "id": "Cardiac complications, not elsewhere classified", "label": "Cardiac complications, not elsewhere classified", "opacity": 0.2846589684486389, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#cd853f", "id": "Diseases of tricuspid valve", "label": "Diseases of tricuspid valve", "opacity": 0.33642858266830444, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#cd853f", "id": "Atrial flutter", "label": "Atrial flutter", "opacity": 0.3480660915374756, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#cd853f", "id": "Rheumatic heart failure (congestive)", "label": "Rheumatic heart failure (congestive)", "opacity": 0.42175475507974625, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#cd853f", "id": "Acute posthemorrhagic anemia", "label": "Acute posthemorrhagic anemia", "opacity": 0.32012488692998886, "shape": "dot", "size": 10, "type": "diagnosis"}, {"color": "#da70d6", "id": "Extracorporeal circulation auxiliary to open heart surgery", "label": "Extracorporeal circulation auxiliary to open heart surgery", "opacity": 0.5365786328911781, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#da70d6", "id": "Transfusion of other serum", "label": "Transfusion of other serum", "opacity": 0.47056324779987335, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#da70d6", "id": "Open and other replacement of mitral valve", "label": "Open and other replacement of mitral valve", "opacity": 0.9560432285070419, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#da70d6", "id": "Annuloplasty", "label": "Annuloplasty", "opacity": 0.3526274859905243, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#da70d6", "id": "Other endoscopy of small intestine", "label": "Other endoscopy of small intestine", "opacity": 0.51371019333601, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#da70d6", "id": "Other electric countershock of heart", "label": "Other electric countershock of heart", "opacity": 0.447126105427742, "shape": "dot", "size": 10, "type": "procedure"}, {"color": "#87ceeb", "id": "HMG CoA reductase inhibitors, plain lipid modifying drugs", "label": "HMG CoA reductase inhibitors, plain lipid modifying drugs", "opacity": 4.706129431724548, "shape": "dot", "size": 10, "type": "medication"}]);
286
+ edges = new vis.DataSet([{"color": "#20b2aa", "from": "patient_0", "to": "visit_0", "type": ["patient", "visit"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Unspecified problem with special functions", "type": ["visit", "symptom"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Systemic lupus erythematosus", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Atresia and stenosis of aorta", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Coarctation of aorta (preductal) (postductal)", "type": ["visit", "symptom"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Atrioventricular block, complete", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Conduction disorder, unspecified", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Heart failure, unspecified", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Anemia, unspecified", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Generalized pain", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Aortic valve disorders", "type": ["visit", "symptom"], "width": 1}, {"color": "#98fb98", "from": "visit_0", "to": "Portal hypertension", "type": ["visit", "symptom"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Cardiac complications, not elsewhere classified", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Diseases of tricuspid valve", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Atrial flutter", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Rheumatic heart failure (congestive)", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#cd853f", "from": "visit_0", "to": "Acute posthemorrhagic anemia", "type": ["visit", "diagnosis"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Extracorporeal circulation auxiliary to open heart surgery", "type": ["visit", "procedure"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Transfusion of other serum", "type": ["visit", "procedure"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Open and other replacement of mitral valve", "type": ["visit", "procedure"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Annuloplasty", "type": ["visit", "procedure"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Other endoscopy of small intestine", "type": ["visit", "procedure"], "width": 1}, {"color": "#da70d6", "from": "visit_0", "to": "Other electric countershock of heart", "type": ["visit", "procedure"], "width": 1}, {"color": "#87ceeb", "from": "visit_0", "to": "HMG CoA reductase inhibitors, plain lipid modifying drugs", "type": ["visit", "medication"], "width": 1}]);
287
+
288
+ nodeColors = {};
289
+ allNodes = nodes.get({ returnType: "Object" });
290
+ for (nodeId in allNodes) {
291
+ nodeColors[nodeId] = allNodes[nodeId].color;
292
+ }
293
+ allEdges = edges.get({ returnType: "Object" });
294
+ // adding nodes and edges to the graph
295
+ data = {nodes: nodes, edges: edges};
296
+
297
+ var options = {"layout": {"randomSeed": 5}, "interaction": {"hover": true, "navigationButtons": true}};
298
+
299
+
300
+
301
+
302
+
303
+
304
+ network = new vis.Network(container, data, options);
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+ return network;
316
+
317
+ }
318
+ drawGraph();
319
+ </script>
320
+ </body>
321
+ </html>
streamlit_results/feature_importance_20240722_112914.png ADDED

Git LFS Details

  • SHA256: 6aa9d3dde08fd0174dea44fd4fe78d1f0e93768a9d0806b91115741c85c84f39
  • Pointer size: 130 Bytes
  • Size of remote file: 50.5 kB
streamlit_results/feature_importance_20240722_151906.png ADDED

Git LFS Details

  • SHA256: 50bcc308b416e9562c00a203ff186bc479038cbe35f45d4913fc1bb62c24dd10
  • Pointer size: 130 Bytes
  • Size of remote file: 51.2 kB
streamlit_results/feature_importance_20240722_173758.png ADDED

Git LFS Details

  • SHA256: f1920bd3548d94aa7b779b1d6941239a2576b1f048eeb43f73c5797ebefe1e32
  • Pointer size: 130 Bytes
  • Size of remote file: 53.1 kB
streamlit_results/feature_importance_20240730_094256.png ADDED

Git LFS Details

  • SHA256: f1920bd3548d94aa7b779b1d6941239a2576b1f048eeb43f73c5797ebefe1e32
  • Pointer size: 130 Bytes
  • Size of remote file: 53.1 kB
streamlit_results/feature_importance_20241003_174255.png ADDED

Git LFS Details

  • SHA256: a681a30956e6a27dd1693e1157e0ddfb5a6276924a48053eb9aec1d8eef0f7d4
  • Pointer size: 130 Bytes
  • Size of remote file: 50.8 kB
streamlit_results/feature_importance_20241004_101741.png ADDED

Git LFS Details

  • SHA256: 3b982b0dfe9d4f88d5320ade80f79c5bcc4ac982addca9fe3c0fd81cc5aac561
  • Pointer size: 130 Bytes
  • Size of remote file: 46.4 kB
streamlit_results/feature_importance_20250201_171443.png ADDED

Git LFS Details

  • SHA256: 4f45bd3ee650b271fc244597f2e8e7e98be5aa11ce89574d09e16b3b5cd3504c
  • Pointer size: 130 Bytes
  • Size of remote file: 46.8 kB
streamlit_results/feature_importance_20250202_172734.png ADDED

Git LFS Details

  • SHA256: 51100dd68bb4c251e43cdf8572ebe84a203567cb42efecc0f1c2f18879ecd18a
  • Pointer size: 130 Bytes
  • Size of remote file: 49.1 kB
streamlit_results/feature_importance_20250202_173758.png ADDED

Git LFS Details

  • SHA256: f46a57709d7e1df8e3ff6a8ac141e32fd6bf360fa7e1ef8d55880cf46c82b086
  • Pointer size: 130 Bytes
  • Size of remote file: 49.8 kB
streamlit_results/feature_importance_20250203_104518.png ADDED

Git LFS Details

  • SHA256: 3229625ccbf2452aeb9f72d5d805562a1b1152f746343017bb58e5150e614423
  • Pointer size: 130 Bytes
  • Size of remote file: 48.9 kB
streamlit_results/feature_importance_20250219_105049.png ADDED

Git LFS Details

  • SHA256: f46a57709d7e1df8e3ff6a8ac141e32fd6bf360fa7e1ef8d55880cf46c82b086
  • Pointer size: 130 Bytes
  • Size of remote file: 49.8 kB
streamlit_results/medical_scenario.txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **Symptoms** presented by the patient found to be important from the system (ordered by level of importance):
2
+
3
+ - Coarctation of aorta (preductal) (postductal) - Importance level: 0.0217
4
+ - Aortic valve disorders - Importance level: 0.0171
5
+ - Systemic lupus erythematosus - Importance level: 0.0165
6
+ - Generalized pain - Importance level: 0.0157
7
+ - Unspecified problem with special functions - Importance level: 0.0149
8
+ - Conduction disorder, unspecified - Importance level: 0.0149
9
+ - Heart failure, unspecified - Importance level: 0.0135
10
+ - Anemia, unspecified - Importance level: 0.0118
11
+ - Portal hypertension - Importance level: 0.0118
12
+ - Atresia and stenosis of aorta - Importance level: 0.0116
13
+
14
+ **Procedures** performed on the patient results important from the system (ordered by level of importance):
15
+
16
+ - Open and other replacement of mitral valve - Importance level: 0.0478
17
+ - Extracorporeal circulation auxiliary to open heart surgery - Importance level: 0.0268
18
+ - Other endoscopy of small intestine - Importance level: 0.0257
19
+ - Transfusion of other serum - Importance level: 0.0235
20
+ - Other electric countershock of heart - Importance level: 0.0224
21
+ - Annuloplasty - Importance level: 0.0176
22
+
23
+ Patient **diagnosis** important from the system (ordered by level of importance):
24
+
25
+ - Rheumatic heart failure (congestive) - Importance level: 0.0211
26
+ - Atrioventricular block, complete - Importance level: 0.019
27
+ - Atrial flutter - Importance level: 0.0174
28
+ - Diseases of tricuspid valve - Importance level: 0.0168
29
+ - Systemic lupus erythematosus - Importance level: 0.0161
30
+ - Acute posthemorrhagic anemia - Importance level: 0.016
31
+ - Cardiac complications, not elsewhere classified - Importance level: 0.0142
32
+
33
+ **Medications** already administered to the patient found important from the system (ordered by level of importance):
34
+
35
+ - No medications found
streamlit_results/prompt_internist_doctor.txt ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ANALYZE the medical scenario of Visit 0, in which the MEDICATION RECOMMENDATION system recommended: "HMG CoA reductase inhibitors, plain lipid modifying drugs".
2
+ USE MEDICAL EXPERTISE to EXPLAIN the recommendation and evaluate its CORRECTNESS.
3
+ Provide guidance on the ALIGNMENT between the patient's condition in the medical scenario and the recommended medication, emphasizing key factors.
4
+ Ensure clarity and conciseness in the analysis in 100 words.
5
+
6
+ THE FOLLOWING MEDICAL SCENARIO of the patient in the visit 0, in which the importance values of each condition are highlighted, is obtained from the explainability phase of the recommendation system, which aims to provide the conditions that the system has deemed important for recommendation purposes. In particular, the scenario includes:
7
+
8
+ **Symptoms** presented by the patient found to be important from the system (ordered by level of importance):
9
+
10
+ - Coarctation of aorta (preductal) (postductal) - Importance level: 0.0217
11
+ - Aortic valve disorders - Importance level: 0.0171
12
+ - Systemic lupus erythematosus - Importance level: 0.0165
13
+ - Generalized pain - Importance level: 0.0157
14
+ - Unspecified problem with special functions - Importance level: 0.0149
15
+ - Conduction disorder, unspecified - Importance level: 0.0149
16
+ - Heart failure, unspecified - Importance level: 0.0135
17
+ - Anemia, unspecified - Importance level: 0.0118
18
+ - Portal hypertension - Importance level: 0.0118
19
+ - Atresia and stenosis of aorta - Importance level: 0.0116
20
+
21
+ **Procedures** performed on the patient results important from the system (ordered by level of importance):
22
+
23
+ - Open and other replacement of mitral valve - Importance level: 0.0478
24
+ - Extracorporeal circulation auxiliary to open heart surgery - Importance level: 0.0268
25
+ - Other endoscopy of small intestine - Importance level: 0.0257
26
+ - Transfusion of other serum - Importance level: 0.0235
27
+ - Other electric countershock of heart - Importance level: 0.0224
28
+ - Annuloplasty - Importance level: 0.0176
29
+
30
+ Patient **diagnosis** important from the system (ordered by level of importance):
31
+
32
+ - Rheumatic heart failure (congestive) - Importance level: 0.0211
33
+ - Atrioventricular block, complete - Importance level: 0.019
34
+ - Atrial flutter - Importance level: 0.0174
35
+ - Diseases of tricuspid valve - Importance level: 0.0168
36
+ - Systemic lupus erythematosus - Importance level: 0.0161
37
+ - Acute posthemorrhagic anemia - Importance level: 0.016
38
+ - Cardiac complications, not elsewhere classified - Importance level: 0.0142
39
+
40
+ **Medications** already administered to the patient found important from the system (ordered by level of importance):
41
+
42
+ - No medications found
43
+
44
+ COMPOSE a summary JUSTIFYING the recommendation of the medication. HIGHLIGHT the positive and negative aspects of administering the medication to the patient taking into account the medical scenario.
45
+ Clearly articulate the rationale for administering the prescribed medication.
46
+ In the absence of a discernible correlation between the patient's condition and the recommended medication, explain why the recommendation is not justified.
streamlit_results/prompt_recruiter_doctors.txt ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a MEDICAL EXPERT specialised in classifying a specific medical scenario in specific areas of medicine.
2
+ Generate a JSON file that lists a maximum of 5 MOST RELEVANT and COMPETENT doctors/specialists in the administration of the medication:
3
+ "HMG CoA reductase inhibitors, plain lipid modifying drugs" at visit 0 and on the patient's condition.
4
+
5
+ THE FOLLOWING MEDICAL SCENARIO of the patient in the visit 0, in which the importance values of each condition are highlighted, is obtained from the explainability phase of the recommendation system, which aims to provide the conditions that the system has deemed important for recommendation purposes. In particular, the scenario includes:
6
+
7
+ **Symptoms** presented by the patient found to be important from the system (ordered by level of importance):
8
+
9
+ - Coarctation of aorta (preductal) (postductal) - Importance level: 0.0217
10
+ - Aortic valve disorders - Importance level: 0.0171
11
+ - Systemic lupus erythematosus - Importance level: 0.0165
12
+ - Generalized pain - Importance level: 0.0157
13
+ - Unspecified problem with special functions - Importance level: 0.0149
14
+ - Conduction disorder, unspecified - Importance level: 0.0149
15
+ - Heart failure, unspecified - Importance level: 0.0135
16
+ - Anemia, unspecified - Importance level: 0.0118
17
+ - Portal hypertension - Importance level: 0.0118
18
+ - Atresia and stenosis of aorta - Importance level: 0.0116
19
+
20
+ **Procedures** performed on the patient results important from the system (ordered by level of importance):
21
+
22
+ - Open and other replacement of mitral valve - Importance level: 0.0478
23
+ - Extracorporeal circulation auxiliary to open heart surgery - Importance level: 0.0268
24
+ - Other endoscopy of small intestine - Importance level: 0.0257
25
+ - Transfusion of other serum - Importance level: 0.0235
26
+ - Other electric countershock of heart - Importance level: 0.0224
27
+ - Annuloplasty - Importance level: 0.0176
28
+
29
+ Patient **diagnosis** important from the system (ordered by level of importance):
30
+
31
+ - Rheumatic heart failure (congestive) - Importance level: 0.0211
32
+ - Atrioventricular block, complete - Importance level: 0.019
33
+ - Atrial flutter - Importance level: 0.0174
34
+ - Diseases of tricuspid valve - Importance level: 0.0168
35
+ - Systemic lupus erythematosus - Importance level: 0.0161
36
+ - Acute posthemorrhagic anemia - Importance level: 0.016
37
+ - Cardiac complications, not elsewhere classified - Importance level: 0.0142
38
+
39
+ **Medications** already administered to the patient found important from the system (ordered by level of importance):
40
+
41
+ - No medications found
42
+
43
+ For each doctor in the JSON file, include:
44
+ - 'role': 'Specify medical speciality'
45
+ - 'description': 'You are a [role identified] with expertise in [describe skills]'
46
+
47
+ The structure of the JSON:
48
+ 'doctors': [
49
+ 'role':
50
+ 'description':
51
+ ]
streamlit_results/recruited_doctors.json ADDED
@@ -0,0 +1 @@
 
 
1
+ "{\n\"doctors\": [\n{\n\"role\": \"Cardiologist\",\n\"description\": \"You are a cardiologist with expertise in diagnosing and treating heart conditions, including aortic valve disorders, coarctation of the aorta, and heart failure.\"\n},\n{\n\"role\": \"Rheumatologist\",\n\"description\": \"You are a rheumatologist with expertise in treating autoimmune diseases such as systemic lupus erythematosus, and managing related conditions like anemia and portal hypertension.\"\n},\n{\n\"role\": \"Gastroenterologist\",\n\"description\": \"You are a gastroenterologist with expertise in performing endoscopies, including small intestine endoscopy, and managing conditions related to the digestive system.\"\n},\n{\n\"role\": \"Anesthesiologist\",\n\"description\": \"You are an anesthesiologist with expertise in managing anesthesia during surgical procedures, including open heart surgery, and monitoring patients' vital signs during medical procedures.\"\n},\n{\n\"role\": \"Electrophysiologist\",\n\"description\": \"You are an electrophysiologist with expertise in diagnosing and treating heart rhythm disorders, including atrial flutter and complete atrioventricular block.\"\n}\n]\n}"