EDM Health Services — Enterprise Platform

Enterprise console for Empowered Disease Management Health Services. A unified backend + UI for five operating areas (Legal, OKR Cascade, Book Proposal, 90-Day Infrastructure, Pre-Development), an interconnected relational database, an R Shiny analytics layer, and a contractor-coordination agent.

Founder: Dr. Darrell A. Hall, MD, MSCIS, Toledo, OH.


1. Architecture

                          ┌────────────────────────────────┐
                          │     Frontend (Nginx :8080)     │
                          │  Single-file dark mission UI   │
                          │  Calls /api/* via fetch        │
                          └────────────────┬───────────────┘
                                           │
                          ┌────────────────▼───────────────┐
                          │   FastAPI Backend (:8000)      │
                          │   /api/dt          DT engine   │
                          │   /api/legal,okr,book,...      │
                          │   /api/knowledge, funding      │
                          │   /api/agent       Pre-Dev     │
                          └────────────────┬───────────────┘
                                           │ asyncpg
                          ┌────────────────▼───────────────┐
                          │   PostgreSQL 16  (:5432)       │
                          │   28 tables · 3 views          │
                          │   Cross-cutting: dt_sessions,  │
                          │   companies, people, docs,     │
                          │   funding_opportunities        │
                          └────────────────▲───────────────┘
                                           │ RPostgres
                          ┌────────────────┴───────────────┐
                          │  R Shiny Analytics (:3838)     │
                          │  OKR / Funding / Pre-Dev /     │
                          │  Decision-Tree / Mission KPIs  │
                          └────────────────────────────────┘

The four functional areas plus Pre-Development are interconnected through dt_sessions, companies, people, documents, and funding_opportunities so a single decision-tree run produces artifacts that flow into legal filings, OKRs, infrastructure milestones, contractor engagements, and grant pipelines.


2. Repository layout

edm-platform/
├── backend/                     FastAPI service
│   ├── main.py                  Gateway, routers, CORS, lifespan
│   ├── db.py                    asyncpg connection pool
│   ├── routes/
│   │   ├── dt_engine.py         Generic decision-tree engine
│   │   ├── legal.py             Legal entity & agreement CRUD
│   │   ├── okr.py               OKR periods, objectives, KRs
│   │   ├── book.py              Book proposals, chapters, outreach
│   │   ├── infra.py             Milestones, assets, compliance
│   │   ├── predev.py            Contractors, engagements, meetings
│   │   ├── knowledge.py         Documents & resources hub
│   │   └── funding.py           Funding opportunities & applications
│   ├── decision_trees/          Recommender engines (rule-based)
│   │   ├── legal_dt.py
│   │   ├── okr_dt.py
│   │   ├── book_dt.py
│   │   ├── infra_dt.py
│   │   └── predev_dt.py
│   ├── agent/
│   │   └── contractor_agent.py  Pre-Dev contractor agent
│   ├── requirements.txt
│   └── Dockerfile
├── database/
│   ├── schema.sql               28 tables + 3 views
│   └── seed.sql                 50 DT questions + sample data
├── frontend/
│   └── index.html               Mission-control dark UI (single file)
├── analytics/
│   ├── app.R                    R Shiny dashboard
│   └── Dockerfile
├── docs/
│   └── architecture.md
├── docker-compose.yml
├── Makefile
├── .env.example
└── README.md

3. Quickstart

git clone <repo>
cd edm-platform
cp .env.example .env

# Build and start the entire stack
make up

# Endpoints
#   Frontend:   http://localhost:8080
#   Backend:    http://localhost:8000/docs
#   Analytics:  http://localhost:3838
#   Postgres:   localhost:5432  (user: edm, pass: edm)

# To wipe and restart fresh (re-runs schema + seed):
make reset

# Tail logs:
make logs

# psql:
make db-shell

The frontend defaults to mock mode (works without backend). Append ?api=local to point at the live backend: http://localhost:8080/?api=local.


4. The decision-tree workflow

Every operating area follows the same pattern:

  1. User starts a session for one area (POST /api/dt/sessions).
  2. Frontend serves questions sequentially (10 per area, branching where appropriate).
  3. Answers are recorded (POST /api/dt/answers).
  4. Session completion (POST /api/dt/sessions/{id}/complete) dispatches answers to the area-specific recommender (backend/decision_trees/{area}_dt.py), which produces a prioritized list of recommendations (P1 = highest).
  5. Recommendations flow into area entities — e.g., an INFRA session’s recommendations seed infra_milestones; a PREDEV session’s results seed predev_engagements.

The recommenders are rule-based today. They can be upgraded to LLM-backed by replacing the recommend() function body with anthropic.messages.create() calls. The interface (Dict[int, Any] -> List[Dict]) stays stable so no other code changes.


5. The Pre-Development Department

The Pre-Dev department coordinates contractor engagements through both an autonomous agent and in-person meetings.

Agent capabilities (backend/agent/contractor_agent.py)

Endpoint Purpose Human review
POST /api/agent/draft-outreach Drafts personalized first-contact email Required before send
POST /api/agent/summarize-meeting Transcript → action items, decisions, risks, sentiment Optional
POST /api/agent/extract-requirements Discovery transcript → structured requirements list Required for SOW
POST /api/agent/risk-scan Scans draft SOW for HIPAA/IP/budget/regulatory risks Required
GET /api/agent/pipeline-status/{id} Roll-up of engagement state, meetings, agent log

Operating principle: the agent never auto-sends outbound communications. Every email, meeting invite, or signed document goes through human approval. All actions are logged to predev_agent_log.

Vetting workflow (every contractor)

  1. Capability questionnaire
  2. Two references (one current, one completed engagement)
  3. Sample deliverable / portfolio review
  4. Financial health check (D-U-N-S, simple credit report)
  5. Required certifications (ISO 13485, GCP, Bar registration, etc. — depends on contractor type)
  6. BAA signature if PHI is in scope

6. Operating model — daily and yearly

Daily operations (founder-led, ≤8 FTE)

   CEO/CMIO (Dr. Hall)
    ├── Clinical & Curriculum  ← curriculum, SOAP, CDS, CME, clinical QA
    ├── Engineering & Platform ← PMSG SaaS, EFE Intake, Research Hub, RAG, GeoCode
    ├── Devices & Hardware     ← NABS, wearables, integration
    └── Operations & Compliance← HIPAA / 42 CFR Part 2 / BAAs / billing / HR / grants
   Pre-Development Dept. (cuts across all four divisions)

Yearly OKR cascade

Level Owner Cadence
Corporate CEO + Board Annual
Division Division leads Quarterly
Individual Each FTE Monthly

KRs are quantitative, capped at 3–5 per objective, with confidence scores updated weekly. The v_okr_progress view rolls up automatically into the R Shiny dashboard.


7. Profit centers (ranked by commercial readiness)

Tier Profit Center Status Notes
1 Behavioral Health & SUD Consulting Active Bridge revenue. High margin. Founder-led.
1 PMSG Curriculum Licensing Productize Q1 8-week, 32-session, 80-contact-hour. CME path adds price.
1 EFE Intake (HIPAA + 42 CFR Part 2 SaaS) Productize Q1–Q2 Narrow scope, obvious buyer (small SUD/BH practices).
2 PMSG Platform (SaaS) 6–12 months FastAPI/React/PG; sell to integrative pain programs.
2 GeoCode Analytics 6–12 months County PH depts + harm-reduction coalitions + payers.
3 NABS Device 18–36 months FDA pathway; ISO 13485; capex-heavy.
3 Wearable + GeoCode relapse prediction 18–36 months IRB-validated feasibility → CPT 99453/99454/99457 RPM.
3 RAG Medical Intelligence Chatbot 18–36 months License to medical-ed and CDS markets.

8. Funding pipeline (seeded)

Agency Mechanism Title Deadline Ceiling
NSF SBIR Phase I AI-driven relapse prediction 2026-06-04 $305K
HRSA Rural Health Network Integrated chronic pain management 2026-07-31 $300K
SAMHSA Cooperative Agreement Provider’s Clinical Support System for MOUD 2026-08-15 $750K
NIH/NIMH R41 STTR Phase I STTR — Behavioral Health AI 2026-09-05 $300K
RWJF Pioneering Ideas Bold ideas for the future of health & health care 2026-12-01 $250K

Total identified ceiling: $1.905M.


9. Compliance scope (Year 1)

Framework Why Y1 Target
HIPAA Security Rule All PHI processing SRA complete; BAAs signed
42 CFR Part 2 SUD treatment programs receiving federal funds Single-consent model in EFE Intake
SOC 2 Type 1 Enterprise sales prerequisite Auditor selected; gap assessment
FDA 21 CFR Part 11 NABS electronic records (if Class II) Pre-submission filed
ACCME accreditation PMSG curriculum CME credit Joint provider agreement

10. The book

Working title: Empowered Disease Management — Integrating Traditional Medicine, Machine Learning, and Population Health in the Post-Opioid Era.

Memoir-driven 14-chapter outline lives in backend/decision_trees/book_dt.py. Submit via the Book module to generate a personalized publication plan, target press list, and chapter outline.


11. Roadmap (post-scaffold)


12. License

Proprietary — EDM Health Services. All rights reserved.