OFFICIAL DOCUMENTATION • v0.2.0

Everything you need to build & deploy.

Comprehensive guides for solo clinicians, rural clinic networks, and hospital engineers. Precompiled binaries, CLI commands, FHIR APIs, and cryptographic proofs.

Production Artifacts

Precompiled Binaries

Zero external dependencies. Self-contained binaries with embedded SQLite engine and web clinical workspace.

x86_64

Windows

Windows 10, 11, Server 2019+. Standalone .zip with 1-click batch launcher.

glibc / musl

Linux

Ubuntu, Debian, Fedora, Alpine. Includes systemd unit template.

ARM64 / Intel

macOS

Apple Silicon (M1/M2/M3/M4) and Intel x86_64. Native POSIX performance.

OCI Image

Docker

Multi-arch container for headless servers and rural micro-data centers.

Getting Started

60-Second T0 Quickstart

Launch a fully functional, encrypted clinical EMR on your workstation in under a minute.

1

Initialize Database

Creates encrypted SQLite tables and the genesis audit block signed with Ed25519:

newloka init --db ./clinic.db
2

Start Local Server

Launches high-performance local Axum engine wired to local SQLite:

newloka-server --tier T0 --db ./clinic.db --port 8080
3

Open Clinical UI

Open any standard browser. 100% offline, zero cloud calls, zero lag:

http://localhost:8080

Polymorphic Scale

The 5 Deployment Tiers

New Loka adapts organically to the regulatory, physical, and infrastructural reality of your practice.

TIER 0

Solo Clinician • Sovereign Practice

Zero config • Offline-first

Designed for independent general practitioners, visiting consultants, or rural field doctors operating on a single laptop without internet or IT support. All data is saved to a single encrypted SQLite file with AES-256-GCM record-level isolation.

Storage: Local SQLite (SQLCipher)
Network: 100% Air-Gapped / Loopback
Security: Single master passphrase + Ed25519
TIER 1

LAN Mesh Clinic • Multi-Room Practice

mDNS discovery • P2P sync

For small private practices, nursing homes, and outpatient centers with multiple rooms (e.g. Reception, Triage, Doctor 1, Doctor 2, Pharmacy). Nodes discover each other over local Wi-Fi or Ethernet using zero-configuration mDNS, replicating records instantly without any WAN connection.

Discovery: Zero-conf mDNS broadcast
Replication: Peer-to-peer conflict-free CRDT sync
Roles: Reception, Clinician, Pharmacy, Admin
TIER 2

Rural Hospital • Ward Offline Resilience

Central hub • Sync-on-reconnect

For 30-200 bed rural community hospitals with frequent electrical brownouts or spotty internal cabling. A central hospital server anchors the records, while ward tablets or nursing stations continue charting completely offline, automatically synchronizing whenever connectivity restores.

Topology: Hub-and-Spoke with offline caching
Failover: Automatic local queueing during outages
Inpatient: Ward admissions, bed tracker, nursing notes
TIER 3 & 4

Enterprise Hospital & Research Federation

ABAC Silos • Differential Privacy

Tier 3 provides departmental isolation (e.g. Oncology, Psychiatry, OB/GYN) with Attribute-Based Access Control (ABAC) and Emergency Breaking-the-Glass audit procedures. Tier 4 enables cross-institutional medical research, querying aggregated cohorts with mathematical differential privacy without exposing individual patient PII.

Access Model: Attribute-Based Access Control (ABAC)
Emergency: Signed "Break-the-Glass" audit logs
Research: Zero-Knowledge Differential Privacy Queries

Command-Line Interface

CLI Engine Cheat Sheet

Full headless automation and scripting with the newloka CLI tool.

Patient Registration

newloka patient create

Creates a new FHIR R4 Patient record in the encrypted storage and signs an audit entry:

newloka patient create --family "Sharma" --given "Aarav" --gender male --birth-date 1985-06-15

List Registered Patients

newloka patient list

Displays active patients in an ASCII formatted table with IDs and demographics:

newloka patient list

Record Clinical Observation

newloka observe

Adds a vital sign or lab result (e.g. Systolic Blood Pressure) linked to a patient ID:

newloka observe --patient <PATIENT_ID> --code "8480-6" --display "Systolic BP" --value 120 --unit "mmHg"

Inspect Cryptographic Audit Trail

newloka audit

Validates the immutable Ed25519 signature chain across all database mutations:

newloka audit

Interoperability

FHIR R4 Schema & REST API

Full standard adherence across 18 implemented clinical resource types.

18 Supported FHIR R4 Resources

• Patient
• Encounter
• Observation
• Condition
• MedicationRequest
• Immunization
• DiagnosticReport
• DocumentReference
• AllergyIntolerance
• Procedure
• CarePlan
• ServiceRequest
• Specimen
• Practitioner
• Organization
• Location
• Provenance
• AuditEvent

Core REST API Endpoints

POST /api/fhir/Patient Create Patient
GET /api/fhir/Patient/{id} Get by ID
POST /api/fhir/Observation Create Observation
GET /api/fhir/Observation?patient={id} Query Vitals
GET /api/audit Audit Trail
POST /api/auth/token Issue Token
BUILT-IN CLINICAL TOOLING

Prescription Engine

eRx Pad Pro & Formulary

New Loka includes an integrated electronic prescription module built specifically for Indian and international generic markets. Powered by an offline database of over 61,000 brand and generic medicines.

  • 61,000+ Generic Brands: Instant offline typeahead search across Indian pharmacopeia.
  • Interaction Engine: Automated cross-checking for severe drug-drug interactions.
  • Dosage Guidance: Built-in pediatric weight-based calculators and renal adjustment rules.
  • Printable Offline PDF: Standard bilingual prescription slips generated instantly.

eRx Pad Pro Architecture

Formulary Data Vault Stored locally in binary SQLite format with BM25 indexing for millisecond search latency.
Drug Safety CDSS Heuristic rules engine checking allergies, duplicate therapies, and contraindications.
FHIR MedicationRequest Every written prescription is atomically stored as a valid FHIR R4 MedicationRequest.