# CareSterile — Caresoft CSSD Module (complete package)

Build: Phases 0–6 (foundation, core CSSD cycle, quality & recall, integrations, enterprise, analytics & content, go-live pack). 349 automated tests pass on a fresh install.

## What is in this zip

| Folder / file | Contents |
| --- | --- |
| `01-Scope-of-Work.pdf` | Scope of work — modules, 3-level login, client-wise databases, marketing (SEO / AEO / GEO), phase plan |
| `02-Source-Code/caresterile/` | Full application (PHP 8.1+ / MySQL 8 or MariaDB 10.6+), marketing site, installers, migrations, tests |
| `03-Docs/README.md` | Feature list by phase, structure, configuration |
| `03-Docs/DEPLOY.md` | Server set-up (cPanel / Nginx), cron, email, backups, monitoring, upgrades, restore, per-hospital go-live runbook |
| `03-Docs/API.md` | API for HIS teams — REST, HL7 v2, FHIR, webhooks, RFID, machine data |
| `04-Screenshots/` | Screens from every phase |

## Quick start (local or server)

```bash
cd 02-Source-Code/caresterile
cp config/config.sample.php config/config.php        # set DB, base_url, app_key, mail
php install/install.php --name="Caresoft Admin" --email=you@caresoft.co.in --password='Strong#Pass1' --demo
php -S localhost:8080 -t public install/dev-router.php   # local only; on a server follow DEPLOY.md
```

- Caresoft Level 1 admin: `/admin` — the email and password given above (+ email sign-in code)
- Demo hospital: `/login` — client code **DEMO**, any role user (`admin`, `supervisor`, `tech1`, `otnurse`, `icn`, `mgmt`…), password **Demo#2026**, floor PIN **1234**
- New client hospitals: created from Level 1 → Client hospitals → Add (own database each)

## Before the first live hospital

Set `env` to `production`, configure SMTP, add the two cron jobs (worker every 5 min, nightly backup), copy backups off the server, and run `php install/check.php`. Details in `03-Docs/DEPLOY.md`.

## Tests

```bash
php -S localhost:8099 tests/webhook_receiver.php &      # needed by phase3 test
for t in smoke_e2e phase1_cycle phase2_quality phase3_integration phase4_enterprise phase5_analytics phase6_golive; do python3 tests/$t.py; done
```
(Tests expect a dev install with env=dev and the Level 1 login superadmin@example.com / Admin#2026x.)
