Update app.py
Browse files
app.py
CHANGED
@@ -33,19 +33,19 @@ def generate_prisma_flow_chart(records_db, records_other, duplicates, excluded_s
|
|
33 |
|
34 |
records_after_duplicates = records_db + records_other - duplicates
|
35 |
|
36 |
-
# Create SVG content for PRISMA flow chart with
|
37 |
meta_analysis_section = ''
|
38 |
if included_meta is not None:
|
39 |
meta_analysis_section = f'''
|
40 |
-
<line x1="400" y1="
|
41 |
-
<rect x="
|
42 |
-
<text x="400" y="
|
43 |
-
<text x="400" y="
|
44 |
-
<text x="400" y="
|
45 |
'''
|
46 |
|
47 |
svg_content = f'''
|
48 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800
|
49 |
<style>
|
50 |
.box {{
|
51 |
fill: #f9f9f9;
|
@@ -80,59 +80,59 @@ def generate_prisma_flow_chart(records_db, records_other, duplicates, excluded_s
|
|
80 |
|
81 |
<!-- Identification Section -->
|
82 |
<rect x="250" y="60" width="300" height="80" class="box" />
|
83 |
-
<text x="400" y="
|
84 |
-
<text x="400" y="
|
85 |
-
<text x="400" y="
|
86 |
|
87 |
<rect x="550" y="60" width="200" height="80" class="box" />
|
88 |
-
<text x="650" y="
|
89 |
-
<text x="650" y="
|
90 |
-
<text x="650" y="
|
91 |
|
92 |
<!-- Arrows -->
|
93 |
-
<line x1="400" y1="140" x2="400" y2="
|
94 |
-
<line x1="650" y1="140" x2="650" y2="
|
95 |
-
<line x1="650" y1="
|
96 |
|
97 |
<!-- Screening Section -->
|
98 |
-
<rect x="250" y="
|
99 |
-
<text x="400" y="
|
100 |
-
<text x="400" y="
|
101 |
-
<text x="400" y="
|
102 |
|
103 |
-
<line x1="400" y1="
|
104 |
|
105 |
<!-- Title/Abstract Screening Section -->
|
106 |
-
<rect x="250" y="
|
107 |
-
<text x="400" y="
|
108 |
-
<text x="400" y="
|
109 |
-
<text x="400" y="
|
110 |
|
111 |
-
<rect x="550" y="
|
112 |
-
<text x="650" y="
|
113 |
-
<text x="650" y="
|
114 |
|
115 |
-
<line x1="400" y1="
|
116 |
-
<line x1="
|
117 |
|
118 |
<!-- Eligibility Section -->
|
119 |
-
<rect x="250" y="
|
120 |
-
<text x="400" y="
|
121 |
-
<text x="400" y="
|
122 |
-
<text x="400" y="
|
123 |
|
124 |
-
<rect x="550" y="
|
125 |
-
<text x="650" y="
|
126 |
-
<text x="650" y="
|
127 |
|
128 |
-
<line x1="400" y1="
|
129 |
-
<line x1="
|
130 |
|
131 |
<!-- Included Section -->
|
132 |
-
<rect x="250" y="
|
133 |
-
<text x="400" y="
|
134 |
-
<text x="400" y="
|
135 |
-
<text x="400" y="
|
136 |
|
137 |
<!-- Optional Meta-Analysis Box -->
|
138 |
{meta_analysis_section}
|
|
|
33 |
|
34 |
records_after_duplicates = records_db + records_other - duplicates
|
35 |
|
36 |
+
# Create SVG content for PRISMA flow chart with improved arrows, spacing, and centered text
|
37 |
meta_analysis_section = ''
|
38 |
if included_meta is not None:
|
39 |
meta_analysis_section = f'''
|
40 |
+
<line x1="400" y1="650" x2="400" y2="690" class="arrow" />
|
41 |
+
<rect x="250" y="690" width="300" height="80" class="box" />
|
42 |
+
<text x="400" y="710" class="box-title">Meta-Analysis</text>
|
43 |
+
<text x="400" y="730">Studies included in quantitative</text>
|
44 |
+
<text x="400" y="750">synthesis (n = {included_meta})</text>
|
45 |
'''
|
46 |
|
47 |
svg_content = f'''
|
48 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 900" width="700" height="800">
|
49 |
<style>
|
50 |
.box {{
|
51 |
fill: #f9f9f9;
|
|
|
80 |
|
81 |
<!-- Identification Section -->
|
82 |
<rect x="250" y="60" width="300" height="80" class="box" />
|
83 |
+
<text x="400" y="90" class="box-title">Identification</text>
|
84 |
+
<text x="400" y="110">Records identified through</text>
|
85 |
+
<text x="400" y="125">database searching (n = {records_db})</text>
|
86 |
|
87 |
<rect x="550" y="60" width="200" height="80" class="box" />
|
88 |
+
<text x="650" y="90" class="box-title">Additional</text>
|
89 |
+
<text x="650" y="110">Other sources</text>
|
90 |
+
<text x="650" y="125">(n = {records_other})</text>
|
91 |
|
92 |
<!-- Arrows -->
|
93 |
+
<line x1="400" y1="140" x2="400" y2="190" class="arrow" />
|
94 |
+
<line x1="650" y1="140" x2="650" y2="165" class="arrow" />
|
95 |
+
<line x1="650" y1="165" x2="400" y2="165" class="arrow" />
|
96 |
|
97 |
<!-- Screening Section -->
|
98 |
+
<rect x="250" y="210" width="300" height="80" class="box" />
|
99 |
+
<text x="400" y="240" class="box-title">Screening</text>
|
100 |
+
<text x="400" y="260">Records after duplicates removed</text>
|
101 |
+
<text x="400" y="275">(n = {records_after_duplicates})</text>
|
102 |
|
103 |
+
<line x1="400" y1="290" x2="400" y2="340" class="arrow" />
|
104 |
|
105 |
<!-- Title/Abstract Screening Section -->
|
106 |
+
<rect x="250" y="360" width="300" height="80" class="box" />
|
107 |
+
<text x="400" y="390" class="box-title">Title/Abstract Screening</text>
|
108 |
+
<text x="400" y="410">Records screened</text>
|
109 |
+
<text x="400" y="425">(n = {records_after_duplicates})</text>
|
110 |
|
111 |
+
<rect x="550" y="360" width="200" height="80" class="box" />
|
112 |
+
<text x="650" y="390">Records excluded</text>
|
113 |
+
<text x="650" y="410">(n = {excluded_screening})</text>
|
114 |
|
115 |
+
<line x1="400" y1="440" x2="400" y2="490" class="arrow" />
|
116 |
+
<line x1="550" y1="400" x2="600" y2="400" class="arrow" />
|
117 |
|
118 |
<!-- Eligibility Section -->
|
119 |
+
<rect x="250" y="510" width="300" height="80" class="box" />
|
120 |
+
<text x="400" y="540" class="box-title">Eligibility</text>
|
121 |
+
<text x="400" y="560">Full-text articles assessed for</text>
|
122 |
+
<text x="400" y="575">eligibility (n = {fulltext_assessed})</text>
|
123 |
|
124 |
+
<rect x="550" y="510" width="200" height="80" class="box" />
|
125 |
+
<text x="650" y="540">Full-text articles excluded,</text>
|
126 |
+
<text x="650" y="555">with reasons (n = {excluded_fulltext})</text>
|
127 |
|
128 |
+
<line x1="400" y1="590" x2="400" y2="640" class="arrow" />
|
129 |
+
<line x1="550" y1="550" x2="600" y2="550" class="arrow" />
|
130 |
|
131 |
<!-- Included Section -->
|
132 |
+
<rect x="250" y="660" width="300" height="80" class="box" />
|
133 |
+
<text x="400" y="690" class="box-title">Included</text>
|
134 |
+
<text x="400" y="710">Studies included in qualitative</text>
|
135 |
+
<text x="400" y="725">synthesis (n = {included_studies})</text>
|
136 |
|
137 |
<!-- Optional Meta-Analysis Box -->
|
138 |
{meta_analysis_section}
|