Healthcare CRM · PHP 8.4
Patient data.
Encrypted.
Protected.
Dual-database architecture with AES-256-GCM encryption for PII. JWT-authenticated REST API built with PHP 8.4.
AES-256-GCM
Encryption
Dual DB
Architecture
JWT HS256
Authentication
PHP 8.4
Runtime
API Endpoints
All patient endpoints require a valid Bearer token in the Authorization header.
Authentication
POST
/api/login
Patient Records Auth required
GET
/api/patients
POST
/api/patients
GET
/api/patients/{id}
PUT
/api/patients/{id}
DELETE
/api/patients/{id}
System
GET
/api/health
Dual-Database PII Isolation
Patient identifiable data is stored in a separate rigicon_pii database, fully encrypted with AES-256-GCM. The primary database rigicon_primary never contains plaintext PII.
- AES-256-GCM with random IV per field
- HMAC-SHA256 for searchable email lookup
- Soft delete — PII preserved for audit trail
- JWT HS256 with configurable expiry
- Prepared statements on all queries
rigicon_primary · patients
id CHAR(36) · UUID
status ENUM · active|inactive|archived
created_at DATETIME
deleted_at DATETIME · soft delete
rigicon_pii · patient_pii
encrypted_name TEXT · AES-256-GCM
encrypted_email TEXT · AES-256-GCM
encrypted_phone TEXT · AES-256-GCM
email_hash CHAR(64) · HMAC-SHA256
Quick Start
1 · Obtain token
POST
curl -X POST https://rigicon.per10.net/api/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "secret"
}'
// Response
{
"status": "success",
"token": "eyJhbGci...",
"expires_at": "2026-04-03 13:00:00"
}
2 · Create patient
POST
curl -X POST https://rigicon.per10.net/api/patients \
-H "Authorization: Bearer eyJhbGci..." \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+1-555-0100"
}'
// Response 201
{
"id": "a1b2c3...",
"name": "Jane Smith",
"status": "active"
}