Update app.py
Browse files
app.py
CHANGED
@@ -33,15 +33,15 @@ 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
|
37 |
meta_analysis_section = ''
|
38 |
if included_meta is not None:
|
39 |
meta_analysis_section = f'''
|
40 |
<line x1="400" y1="490" x2="400" y2="530" class="arrow" />
|
41 |
-
<rect x="250" y="530" width="300" height="
|
42 |
-
<text x="400" y="
|
43 |
-
<text x="400" y="
|
44 |
-
<text x="400" y="
|
45 |
'''
|
46 |
|
47 |
svg_content = f'''
|
@@ -74,66 +74,66 @@ def generate_prisma_flow_chart(records_db, records_other, duplicates, excluded_s
|
|
74 |
</defs>
|
75 |
|
76 |
<!-- Identification Section -->
|
77 |
-
<rect x="
|
78 |
-
<text x="400" y="
|
79 |
-
<text x="400" y="
|
80 |
-
<text x="400" y="
|
81 |
|
82 |
-
<rect x="600" y="30" width="
|
83 |
-
<text x="
|
84 |
-
<text x="
|
85 |
-
<text x="
|
86 |
|
87 |
<!-- Arrows -->
|
88 |
-
<line x1="400" y1="
|
89 |
-
<line x1="
|
90 |
-
<line x1="
|
91 |
|
92 |
<!-- Screening Section -->
|
93 |
-
<rect x="
|
94 |
-
<text x="400" y="
|
95 |
-
<text x="400" y="
|
96 |
-
<text x="400" y="
|
97 |
|
98 |
-
<line x1="400" y1="
|
99 |
|
100 |
-
<rect x="
|
101 |
-
<text x="400" y="
|
102 |
-
<text x="400" y="
|
103 |
-
<text x="400" y="
|
104 |
|
105 |
-
<rect x="600" y="
|
106 |
-
<text x="
|
107 |
-
<text x="
|
108 |
|
109 |
-
<line x1="400" y1="
|
110 |
-
<line x1="
|
111 |
|
112 |
<!-- Eligibility Section -->
|
113 |
-
<rect x="
|
114 |
-
<text x="400" y="
|
115 |
-
<text x="400" y="
|
116 |
-
<text x="400" y="
|
117 |
|
118 |
-
<rect x="600" y="
|
119 |
-
<text x="
|
120 |
-
<text x="
|
121 |
-
<text x="
|
122 |
|
123 |
-
<line x1="400" y1="
|
124 |
-
<line x1="
|
125 |
|
126 |
<!-- Included Section -->
|
127 |
-
<rect x="
|
128 |
-
<text x="400" y="
|
129 |
-
<text x="400" y="
|
130 |
-
<text x="400" y="
|
131 |
|
132 |
<!-- Optional Meta-Analysis Box -->
|
133 |
{meta_analysis_section}
|
134 |
|
135 |
<!-- PRISMA Title -->
|
136 |
-
<text x="
|
137 |
</svg>
|
138 |
'''
|
139 |
|
|
|
33 |
|
34 |
records_after_duplicates = records_db + records_other - duplicates
|
35 |
|
36 |
+
# Create SVG content for PRISMA flow chart with centered layout and larger boxes
|
37 |
meta_analysis_section = ''
|
38 |
if included_meta is not None:
|
39 |
meta_analysis_section = f'''
|
40 |
<line x1="400" y1="490" x2="400" y2="530" class="arrow" />
|
41 |
+
<rect x="250" y="530" width="300" height="80" class="box" />
|
42 |
+
<text x="400" y="570" class="box-title">Meta-Analysis</text>
|
43 |
+
<text x="400" y="595">Studies included in quantitative synthesis</text>
|
44 |
+
<text x="400" y="610">(n = {included_meta})</text>
|
45 |
'''
|
46 |
|
47 |
svg_content = f'''
|
|
|
74 |
</defs>
|
75 |
|
76 |
<!-- Identification Section -->
|
77 |
+
<rect x="200" y="30" width="400" height="80" class="box" />
|
78 |
+
<text x="400" y="70" class="box-title">Identification</text>
|
79 |
+
<text x="400" y="95">Records identified through database searching</text>
|
80 |
+
<text x="400" y="110">(n = {records_db})</text>
|
81 |
|
82 |
+
<rect x="600" y="30" width="200" height="80" class="box" />
|
83 |
+
<text x="700" y="70" class="box-title">Additional</text>
|
84 |
+
<text x="700" y="95">Other sources</text>
|
85 |
+
<text x="700" y="110">(n = {records_other})</text>
|
86 |
|
87 |
<!-- Arrows -->
|
88 |
+
<line x1="400" y1="110" x2="400" y2="150" class="arrow" />
|
89 |
+
<line x1="700" y1="110" x2="700" y2="130" class="arrow" />
|
90 |
+
<line x1="700" y1="130" x2="400" y2="130" class="arrow" />
|
91 |
|
92 |
<!-- Screening Section -->
|
93 |
+
<rect x="200" y="150" width="400" height="80" class="box" />
|
94 |
+
<text x="400" y="190" class="box-title">Screening</text>
|
95 |
+
<text x="400" y="215">Records after duplicates removed</text>
|
96 |
+
<text x="400" y="230">(n = {records_after_duplicates})</text>
|
97 |
|
98 |
+
<line x1="400" y1="230" x2="400" y2="270" class="arrow" />
|
99 |
|
100 |
+
<rect x="200" y="270" width="400" height="80" class="box" />
|
101 |
+
<text x="400" y="310" class="box-title">Title/Abstract Screening</text>
|
102 |
+
<text x="400" y="335">Records screened</text>
|
103 |
+
<text x="400" y="350">(n = {records_after_duplicates})</text>
|
104 |
|
105 |
+
<rect x="600" y="270" width="200" height="80" class="box" />
|
106 |
+
<text x="700" y="310">Records excluded</text>
|
107 |
+
<text x="700" y="325">(n = {excluded_screening})</text>
|
108 |
|
109 |
+
<line x1="400" y1="350" x2="400" y2="390" class="arrow" />
|
110 |
+
<line x1="500" y1="310" x2="600" y2="310" class="arrow" />
|
111 |
|
112 |
<!-- Eligibility Section -->
|
113 |
+
<rect x="200" y="390" width="400" height="80" class="box" />
|
114 |
+
<text x="400" y="430" class="box-title">Eligibility</text>
|
115 |
+
<text x="400" y="455">Full-text articles assessed for eligibility</text>
|
116 |
+
<text x="400" y="470">(n = {fulltext_assessed})</text>
|
117 |
|
118 |
+
<rect x="600" y="390" width="200" height="80" class="box" />
|
119 |
+
<text x="700" y="430">Full-text articles</text>
|
120 |
+
<text x="700" y="445">excluded, with reasons</text>
|
121 |
+
<text x="700" y="460">(n = {excluded_fulltext})</text>
|
122 |
|
123 |
+
<line x1="400" y1="470" x2="400" y2="510" class="arrow" />
|
124 |
+
<line x1="500" y1="430" x2="600" y2="430" class="arrow" />
|
125 |
|
126 |
<!-- Included Section -->
|
127 |
+
<rect x="200" y="510" width="400" height="80" class="box" />
|
128 |
+
<text x="400" y="550" class="box-title">Included</text>
|
129 |
+
<text x="400" y="575">Studies included in qualitative synthesis</text>
|
130 |
+
<text x="400" y="590">(n = {included_studies})</text>
|
131 |
|
132 |
<!-- Optional Meta-Analysis Box -->
|
133 |
{meta_analysis_section}
|
134 |
|
135 |
<!-- PRISMA Title -->
|
136 |
+
<text x="400" y="10" style="font-size: 18px; font-weight: bold; text-anchor: middle;">PRISMA Flow Diagram</text>
|
137 |
</svg>
|
138 |
'''
|
139 |
|