File size: 8,975 Bytes
ba2715f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
"""
Declarative field definitions for the dynamic Patient Analysis form.

Each infection site maps to a list of site-specific fields and contextual
suspected-source options. Universal fields (age, sex, weight, height,
creatinine, medications, allergies, comorbidities, risk factors) are always
shown and are NOT listed here.
"""

SITE_SPECIFIC_FIELDS: dict[str, list[dict]] = {
    "urinary": [
        {
            "key": "catheter_status",
            "label": "Catheter status",
            "type": "selectbox",
            "options": [
                "No catheter",
                "Indwelling (Foley)",
                "Intermittent",
                "Suprapubic",
                "Recently removed (<48 h)",
            ],
        },
        {
            "key": "urinary_symptoms",
            "label": "Urinary symptoms",
            "type": "multiselect",
            "options": [
                "Dysuria",
                "Frequency",
                "Urgency",
                "Hematuria",
                "Suprapubic pain",
                "Flank pain",
                "Fever / chills",
            ],
        },
        {
            "key": "urine_appearance",
            "label": "Urine appearance",
            "type": "selectbox",
            "options": ["Clear", "Cloudy", "Turbid", "Malodorous", "Hematuria"],
        },
    ],
    "respiratory": [
        {
            "key": "o2_saturation",
            "label": "O\u2082 Saturation (%)",
            "type": "number_input",
            "min": 50.0,
            "max": 100.0,
            "default": 97.0,
            "step": 0.5,
        },
        {
            "key": "ventilation_status",
            "label": "Ventilation status",
            "type": "selectbox",
            "options": [
                "Room air",
                "Supplemental O\u2082 (nasal cannula)",
                "Supplemental O\u2082 (mask)",
                "Non-invasive (BiPAP / CPAP)",
                "Mechanical ventilation",
            ],
        },
        {
            "key": "cough_type",
            "label": "Cough type",
            "type": "selectbox",
            "options": ["None", "Dry", "Productive", "Hemoptysis"],
        },
        {
            "key": "sputum_character",
            "label": "Sputum character",
            "type": "selectbox",
            "options": [
                "None",
                "Clear / white",
                "Yellow",
                "Green / purulent",
                "Rust-colored",
                "Blood-tinged",
            ],
        },
    ],
    "bloodstream": [
        {
            "key": "central_line_present",
            "label": "Central line present",
            "type": "checkbox",
            "default": False,
        },
        {
            "key": "temperature_c",
            "label": "Temperature (\u00b0C)",
            "type": "number_input",
            "min": 34.0,
            "max": 43.0,
            "default": 38.5,
            "step": 0.1,
        },
        {
            "key": "heart_rate_bpm",
            "label": "Heart rate (bpm)",
            "type": "number_input",
            "min": 30,
            "max": 250,
            "default": 90,
            "step": 1,
        },
        {
            "key": "respiratory_rate",
            "label": "Respiratory rate (/min)",
            "type": "number_input",
            "min": 5,
            "max": 60,
            "default": 18,
            "step": 1,
        },
        {
            "key": "wbc_count",
            "label": "WBC count (\u00d710\u2079/L)",
            "type": "number_input",
            "min": 0.0,
            "max": 100.0,
            "default": 12.0,
            "step": 0.1,
        },
        {
            "key": "lactate_mmol",
            "label": "Lactate (mmol/L)",
            "type": "number_input",
            "min": 0.0,
            "max": 30.0,
            "default": 1.0,
            "step": 0.1,
        },
        {
            "key": "shock_status",
            "label": "Shock status",
            "type": "selectbox",
            "options": [
                "No shock",
                "Compensated (SBP > 90, tachycardia)",
                "Septic shock (vasopressors required)",
            ],
        },
    ],
    "skin": [
        {
            "key": "wound_type",
            "label": "Wound type",
            "type": "selectbox",
            "options": [
                "Laceration",
                "Ulcer (diabetic / pressure)",
                "Bite (animal / human)",
                "Surgical site",
                "Burn",
                "Abscess",
                "Cellulitis (no wound)",
            ],
        },
        {
            "key": "cellulitis_extent",
            "label": "Cellulitis extent",
            "type": "selectbox",
            "options": [
                "None",
                "Localized (< 5 cm)",
                "Moderate (5\u201310 cm)",
                "Extensive (> 10 cm)",
                "Rapidly spreading",
            ],
        },
        {
            "key": "abscess_present",
            "label": "Abscess present",
            "type": "checkbox",
            "default": False,
        },
        {
            "key": "foreign_body",
            "label": "Foreign body / implant",
            "type": "checkbox",
            "default": False,
        },
    ],
    "intra-abdominal": [
        {
            "key": "abdominal_pain_location",
            "label": "Pain location",
            "type": "selectbox",
            "options": [
                "Diffuse",
                "RUQ",
                "LUQ",
                "RLQ",
                "LLQ",
                "Epigastric",
                "Periumbilical",
            ],
        },
        {
            "key": "peritonitis_signs",
            "label": "Peritonitis signs",
            "type": "multiselect",
            "options": [
                "Guarding",
                "Rebound tenderness",
                "Rigidity",
                "Absent bowel sounds",
            ],
        },
        {
            "key": "perforation_suspected",
            "label": "Perforation suspected",
            "type": "checkbox",
            "default": False,
        },
        {
            "key": "ascites",
            "label": "Ascites present",
            "type": "checkbox",
            "default": False,
        },
    ],
    "CNS": [
        {
            "key": "csf_obtained",
            "label": "CSF obtained",
            "type": "checkbox",
            "default": False,
        },
        {
            "key": "neuro_symptoms",
            "label": "Neurological symptoms",
            "type": "multiselect",
            "options": [
                "Headache",
                "Neck stiffness",
                "Photophobia",
                "Altered mental status",
                "Seizures",
                "Focal deficits",
            ],
        },
        {
            "key": "recent_neurosurgery",
            "label": "Recent neurosurgery",
            "type": "checkbox",
            "default": False,
        },
        {
            "key": "gcs_score",
            "label": "GCS score",
            "type": "number_input",
            "min": 3,
            "max": 15,
            "default": 15,
            "step": 1,
        },
    ],
    "other": [],
}


# Sites where serum creatinine is shown prominently in demographics.
# For all other sites a "renal impairment?" toggle is shown instead.
CREATININE_PROMINENT_SITES: frozenset[str] = frozenset(
    {"urinary", "bloodstream", "CNS", "respiratory"}
)

SUSPECTED_SOURCE_OPTIONS: dict[str, list[str]] = {
    "urinary": [
        "Community-acquired UTI",
        "Catheter-associated UTI (CAUTI)",
        "Complicated UTI",
        "Pyelonephritis",
        "Urosepsis",
        "Other",
    ],
    "respiratory": [
        "Community-acquired pneumonia (CAP)",
        "Hospital-acquired pneumonia (HAP)",
        "Ventilator-associated pneumonia (VAP)",
        "Aspiration pneumonia",
        "Lung abscess",
        "Empyema",
        "Other",
    ],
    "bloodstream": [
        "Primary bacteremia",
        "Catheter-related BSI (CRBSI)",
        "Secondary bacteremia (from known source)",
        "Endocarditis",
        "Unknown source",
        "Other",
    ],
    "skin": [
        "Cellulitis",
        "Surgical site infection",
        "Diabetic foot infection",
        "Bite wound infection",
        "Necrotizing fasciitis",
        "Abscess",
        "Other",
    ],
    "intra-abdominal": [
        "Appendicitis",
        "Cholecystitis / cholangitis",
        "Diverticulitis",
        "Peritonitis (SBP)",
        "Post-surgical",
        "Liver abscess",
        "Other",
    ],
    "CNS": [
        "Community-acquired meningitis",
        "Post-neurosurgical meningitis",
        "Healthcare-associated ventriculitis",
        "Brain abscess",
        "Other",
    ],
    "other": [],
}