SELECT p.name, p.age, c.malady AS Malady,
COALESCE(p.notes, 'New patient') AS Notes
FROM patients p
LEFT JOIN conditions c ON p.condition_id = c.id
LEFT JOIN (
SELECT id, CONCAT('**', malady, '** - ', details) AS malady FROM conditions WHERE is_urgent = true
) u ON p.id = u.id AND p.malady IS NULL
WHERE
(u.malady IS NOT NULL OR p.status_id IN (SELECT id FROM status WHERE name = 'Active'))
ORDER BY CASE WHEN u.malady IS NOT NULL THEN 1 ELSE 2 END, p.name;
Name | Age | Malady | Notes | State |
---|---|---|---|---|
Carlos Rodriguez | 35 | Nanite Overload Syndrome (NOS) - Excessive nanites in the bloodstream causing organ failure. | Stable, but needs constant monitoring. Recommending a slow detox regimen. | DEC. |
Aisha Patel | 42 | Genetic Drift Disorder (GDD) - Rapid genetic mutation due to prolonged exposure to biotech superfund toxins. | Deteriorating rapidly. Needs immediate genetic stabilization and organ replacement. | |
Jamal Washington | 51 | Cybernetic Rejection Syndrome (CRS) - Body rejecting cybernetic implants, causing severe pain and organ damage. | Pain management is challenging. Considering experimental cybernetic reintegration therapy. | |
Maria Garcia | 28 | Neurotoxin Poisoning - Exposure to advanced neurotoxins used in corporate espionage, causing memory loss and cognitive decline. | Memory loss improving with neurotoxin antidote treatment. Long-term prognosis uncertain. | |
Ravi Kumar | 39 | Clonal Degeneration Syndrome (CDS) - Rapid aging and cellular degradation due to off-brand cloning procedures. | Aging process slowed, but CDS progression still evident. Requires regular cellular regeneration treatments. | |
Latoya Johnson | 47 | Bioluminescent Infection - Infective bioluminescent organisms causing internal organ illumination and severe pain. | Infection contained, but bioluminescent organisms are adapting to antibiotics. Need alternative treatment options. | |
Antonio Martinez | 32 | Nanite Swarm Infestation (NSI) - Nanites forming swarms in the body, causing tissue damage and organ failure. | Nanite swarm activity reduced with targeted nanite disruptors. Long-term solution needed to prevent recurrence. | |
Meena Shah | 54 | Gene-Edited Cancer - Rapidly metastasizing cancer caused by faulty gene-editing procedures. | Cancer growth slowed with gene-editing correction therapy. Requires regular check-ups for potential relapse. | |
Tyrone Davis | 26 | Cyberpsychosis - Mental instability and violent behavior due to improper cybernetic brain integration. | Cyberpsychosis episodes decreasing in frequency and intensity with medication and therapy. Discharge pending. | |
Sofia Lopez | 37 | Nanite-Enhanced Allergies (NEA) - Severe allergic reactions to common substances due to nanite enhancement. | Allergies managed with nanite suppression regimen. Long-term solution needed to prevent future reactions. | |
Eva Martinez | 29 | Nanite-Infused Drug Overdose. Symptoms include excessive bleeding, organ failure, and rapid cellular degradation. | New patient - Requires immediate attention for detoxification and organ stabilization. |
Another patient has died, like Death Alert - Carlos Rodriguez. Generate the notice: