Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Hospital_Dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
staff = {
101: {"name": "Dr. Smith", "role": "Cardiologist", "station": "ER"},
202: {"name": "Nurse Lee", "role": "ICU", "station": "Ward 3B"},
303: {"name": "Dr. Patel", "role": "Radiologist", "station": "Lab 2"}
303: {"name": "Dr. Patel", "role": "Radiologist", "station": "Lab 2"},
404: {"name": "Dr. Hussain", "role" "Supervisor", "station", "theater"}
}

# Patient Records (ID → Medical History)
patients = {
"P881": {"name": "John Munae", "allergies": ["Penicillin"], "ward": "ICU"},
"P882": {"name": "Maria Garcia", "allergies": ["Smoke"], "ward": "Ward 4A"}
"P882": {"name": "Maria Garcia", "allergies": ["Smoke"], "ward": "Ward 4A"},
"p882": {"name": "Hassana Musa", "allergies": ["Maternity"], "ward": "Maternity ward"]
}

# Access data
print("Cardiologist on duty:", staff[101]['name']) # Dr. Smith
print("John's allergies:", patients["P881"]["allergies"]) # ['Penicillin']

# Add new patient
patients["P883"] = {"name": "Alex Kim", "allergies": ["Latex"], "ward": "ER"}
patients["P883"] = {"name": "Alex Kim", "allergies": ["Latex"], "ward": "ER"}