Skip to content

SpencerRaw/sle-skill-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLE Skill-as-a-Service — AI Phenotype Diagnosis for Lupus

Upload patient data → Get phenotype classification + interpretable explanation. 18 AI skills distilled from 1,049 real SLE patient records.


What This Is

A deployable web service that classifies SLE patients into 4 clinical phenotypes using interpretable text skills (not black-box models).

Every prediction comes with a READABLE explanation.

Patient: Female, 32
  → Phenotype: Renal-dominant SLE (12% of cohort)
  → Why: proteinuria 2+, edema present, 24h protein 3407mg, albumin low (27 g/L)
  → Recommendation: Monitor renal function, consider biopsy if SLEDAI >12

The 4 SLE Phenotypes

Phenotype Prevalence Key Features
Mild/Inactive 52% Near-normal labs, low disease activity
Renal-dominant 12% Proteinuria↑, edema, hypoalbuminemia, elevated SLEDAI
Systemic Inflammatory 24% Fever↑, IgG↑, ESR↑, multi-system involvement
Vascular 12% Carotid plaque↑, intimal thickening, osteoporosis

Quick Start

git clone https://github.com/SpencerRaw/sle-skill-service.git
cd sle-skill-service
uv pip install -r requirements.txt
python app/main.py

Open http://localhost:8000 → upload patient data → get phenotype diagnosis.

API

POST /api/diagnose
Content-Type: application/json

{
  "proteinuria": 2,
  "edema": 1,
  "albumin": 27.0,
  "sledai": 14,
  ...
}

Response:
{
  "phenotype": "Renal-dominant SLE",
  "confidence": 0.89,
  "explanation": "Proteinuria 2+ (cohort avg 0.6), edema present...",
  "matching_rules": [...],
  "recommendations": [...]
}

Built With

  • data2skills — unsupervised phenotype discovery engine
  • FastAPI — web framework
  • 1,049 real SLE patient records — distilled into interpretable skills

License

MIT

Install

git clone https://github.com/SpencerRaw/sle-skill-service.git
cd sle-skill-service
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt

Usage

python app/main.py
# Open http://localhost:8000
# Upload patient data → get phenotype diagnosis + explanation

See API section above for programmatic integration.

Contributing

Issues and PRs welcome. Data from 1,049 SLE patient records — contact for access to the skill extraction pipeline.

About

🧬 AI phenotype diagnosis for lupus — interpretable text skills from 1,049 SLE patients. Every prediction comes with a readable explanation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages