Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,48 +4,48 @@ import streamlit as st
|
|
4 |
st.title("Case-Based Learning: Compartment Syndrome")
|
5 |
st.write("**Case:** A 25-year-old male with a tibial fracture from a motorcycle accident.")
|
6 |
st.write("**Presentation:** Severe pain in the lower leg, swelling, and difficulty moving his toes.")
|
7 |
-
st.image("1.jpg", caption="Initial Presentation",
|
8 |
|
9 |
# Scene 1: Initial choice
|
10 |
st.subheader("Scene 1: Patient Arrives at ER")
|
11 |
choice_1 = st.radio(
|
12 |
"What will you do first?",
|
13 |
["Examine the leg", "Send for X-ray", "Administer strong analgesics"],
|
14 |
-
index
|
15 |
)
|
16 |
|
17 |
if choice_1 == "Examine the leg":
|
18 |
-
st.image("2.jpg", caption="Examination Findings",
|
19 |
st.write("Findings: Swollen, tense leg with pain on passive stretching and decreased sensation.")
|
20 |
st.subheader("What is your next step?")
|
21 |
choice_2 = st.radio(
|
22 |
"Choose an action:",
|
23 |
["Measure compartment pressure", "Monitor and wait", "Repeat physical exam after medication"],
|
24 |
-
index
|
25 |
)
|
26 |
if choice_2 == "Measure compartment pressure":
|
27 |
-
st.image("3.jpg", caption="Pressure Measurement",
|
28 |
st.success("Pressure >30 mmHg. Confirmed Compartment Syndrome.")
|
29 |
st.write("**Action:** Perform fasciotomy immediately.")
|
30 |
-
st.image("4.jpg", caption="Fasciotomy Procedure",
|
31 |
st.success("Outcome: Patient improves, damage prevented.")
|
32 |
elif choice_2 == "Monitor and wait":
|
33 |
-
st.image("5.jpg", caption="Monitoring Patient",
|
34 |
st.error("Condition worsens. Outcome: Permanent damage or amputation.")
|
35 |
elif choice_2 == "Repeat physical exam after medication":
|
36 |
-
st.image("6.jpg", caption="Repeat Examination",
|
37 |
st.warning("Findings: Swelling worsens, sensory loss increases.")
|
38 |
st.write("**Action:** Proceed to measure compartment pressure.")
|
39 |
-
st.image("3.jpg", caption="Pressure Measurement",
|
40 |
st.success("Outcome: Pressure >30 mmHg. Perform fasciotomy.")
|
41 |
|
42 |
elif choice_1 == "Send for X-ray":
|
43 |
-
st.image("7.jpg", caption="X-ray Findings",
|
44 |
st.write("Findings: Tibial fracture noted. Still suspect Compartment Syndrome based on symptoms.")
|
45 |
st.write("Proceed to re-evaluate the patient.")
|
46 |
|
47 |
elif choice_1 == "Administer strong analgesics":
|
48 |
-
st.image("8.jpg", caption="Administering Pain Relief",
|
49 |
st.warning("Pain worsens despite medication. Signs of compartment syndrome persist.")
|
50 |
st.write("**Action:** Reassess and proceed to examination or measure compartment pressure.")
|
51 |
|
|
|
4 |
st.title("Case-Based Learning: Compartment Syndrome")
|
5 |
st.write("**Case:** A 25-year-old male with a tibial fracture from a motorcycle accident.")
|
6 |
st.write("**Presentation:** Severe pain in the lower leg, swelling, and difficulty moving his toes.")
|
7 |
+
st.image("1.jpg", caption="Initial Presentation", use_container_width=True)
|
8 |
|
9 |
# Scene 1: Initial choice
|
10 |
st.subheader("Scene 1: Patient Arrives at ER")
|
11 |
choice_1 = st.radio(
|
12 |
"What will you do first?",
|
13 |
["Examine the leg", "Send for X-ray", "Administer strong analgesics"],
|
14 |
+
index=-1 # No default selection
|
15 |
)
|
16 |
|
17 |
if choice_1 == "Examine the leg":
|
18 |
+
st.image("2.jpg", caption="Examination Findings", use_container_width=True)
|
19 |
st.write("Findings: Swollen, tense leg with pain on passive stretching and decreased sensation.")
|
20 |
st.subheader("What is your next step?")
|
21 |
choice_2 = st.radio(
|
22 |
"Choose an action:",
|
23 |
["Measure compartment pressure", "Monitor and wait", "Repeat physical exam after medication"],
|
24 |
+
index=-1 # No default selection
|
25 |
)
|
26 |
if choice_2 == "Measure compartment pressure":
|
27 |
+
st.image("3.jpg", caption="Pressure Measurement", use_container_width=True)
|
28 |
st.success("Pressure >30 mmHg. Confirmed Compartment Syndrome.")
|
29 |
st.write("**Action:** Perform fasciotomy immediately.")
|
30 |
+
st.image("4.jpg", caption="Fasciotomy Procedure", use_container_width=True)
|
31 |
st.success("Outcome: Patient improves, damage prevented.")
|
32 |
elif choice_2 == "Monitor and wait":
|
33 |
+
st.image("5.jpg", caption="Monitoring Patient", use_container_width=True)
|
34 |
st.error("Condition worsens. Outcome: Permanent damage or amputation.")
|
35 |
elif choice_2 == "Repeat physical exam after medication":
|
36 |
+
st.image("6.jpg", caption="Repeat Examination", use_container_width=True)
|
37 |
st.warning("Findings: Swelling worsens, sensory loss increases.")
|
38 |
st.write("**Action:** Proceed to measure compartment pressure.")
|
39 |
+
st.image("3.jpg", caption="Pressure Measurement", use_container_width=True)
|
40 |
st.success("Outcome: Pressure >30 mmHg. Perform fasciotomy.")
|
41 |
|
42 |
elif choice_1 == "Send for X-ray":
|
43 |
+
st.image("7.jpg", caption="X-ray Findings", use_container_width=True)
|
44 |
st.write("Findings: Tibial fracture noted. Still suspect Compartment Syndrome based on symptoms.")
|
45 |
st.write("Proceed to re-evaluate the patient.")
|
46 |
|
47 |
elif choice_1 == "Administer strong analgesics":
|
48 |
+
st.image("8.jpg", caption="Administering Pain Relief", use_container_width=True)
|
49 |
st.warning("Pain worsens despite medication. Signs of compartment syndrome persist.")
|
50 |
st.write("**Action:** Reassess and proceed to examination or measure compartment pressure.")
|
51 |
|