DevSoftTech HMS E-Atria ABDM https://www.e-atria.net
Go to file
2026-10-01 20:07:50 +05:30
.github/agents Add Ayushman package import, billing claim sheet, and reporting dashboards 2026-03-26 15:42:40 +05:30
ABDM_FHIR feat(abdm): proper FHIR bundles for lab reports and IPD discharge 2026-05-23 04:41:59 +05:30
android_opd_queue_tv feat(medical-store): ABDM-compatible multi-building pharmacy, POS desktop keyboard workflow, unit dispensing, and split payments 2026-09-08 02:19:11 +05:30
app fix(abdm): fix recordsFetch health_records latest row selection and guard opd_fhir_documents fallback 2026-10-01 20:07:50 +05:30
build_artifacts feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
docs fix(abdm): isolate Aadhaar mobile from ABHA registered mobile and sanitize asterisk placeholders in verification flow 2026-09-12 00:35:51 +05:30
middleware-gateway feat: commit all pending page and ABDM gateway updates 2026-05-26 06:04:34 +05:30
old_code_ci3 Update master schema/seed snapshots and Medical backpanel changes 2026-04-15 08:39:47 +05:30
postmn_abdm feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
public docs: remove technical URLs, database fields and developer codes from user help guide 2026-09-30 00:24:40 +05:30
scratch fix(medical-store): remove third-party brand Marg from application and replace with generic Excel/CSV import 2026-09-10 04:58:59 +05:30
scripts fix(abdm): evaluate cooling from clinical event date and prevent reset on taskboard view 2026-10-01 08:03:44 +05:30
tests feat(abdm): add task status filtering, search, and completed task visibility on task board 2026-10-01 19:40:32 +05:30
writable Complete Surgery/Procedure autocomplete implementation and testing docs 2026-06-06 06:35:32 +05:30
.copilot-instructions feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
.gitignore fix(abdm): add concurrency lock, optimize hiu-poll query, and add composite indexes 2026-09-24 08:03:57 +05:30
ABDM_CARD_DOWNLOAD_IMPLEMENTATION.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_CARD_DOWNLOAD_VERIFICATION.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_GATEWAY_PHP_DEPLOYMENT.md ABDM M2 care-context outbound sync and server cron automation 2026-07-23 15:12:46 +05:30
ABDM_IPD_DISCHARGE_FHIR_REFERENCE.md fix(abdm): align IPD discharge summary FHIR bundle with NRCES standards and eliminate NA values in PHR 2026-09-06 08:09:11 +05:30
ABDM_LOG_940_ANALYSIS.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_LOG_940_COMPLETE_REPORT.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_LOG_940_QUICK_REFERENCE.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_LOG_940_README.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
ABDM_M1_M2_M3_SESSION_HANDOVER.md docs: add session handover document for ABDM M1, M2, and M3 HIU fixes 2026-09-10 00:57:33 +05:30
ABDM_M2_M3_LIVE_FETCH_SESSION.md docs: add ABDM M2/M3 live fetch and task board session handover 2026-09-28 03:42:34 +05:30
ABDM_M2_PUSH_SYNC_IMPLEMENTATION.md ABDM M2 care-context outbound sync and server cron automation 2026-07-23 15:12:46 +05:30
ABDM_M2_TEST_SESSION_HANDOVER.md docs: update ABDM M2 handover guide with invoice care context linking and test suite stats 2026-09-30 12:36:42 +05:30
ABDM_MASTER_INDEX.md feat(ipd): align IPD Discharge prescribed medicine form design and autotext with OPD Consult 2026-08-27 04:33:10 +05:30
abdm-bridge-le-ssl.conf feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
ACTION_PLAN_DUAL_BRIDGE.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
BED_MANAGEMENT_FIX_SUMMARY.md feat: Complete bed management system with transfer and time tracking 2026-06-09 08:39:48 +05:30
BRIDGE_SYNC_SERVICE_IMPLEMENTATION.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
builds Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
check_after_screenshot.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
check_bed_history.php Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
check_current_admission.php Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
check_hiu_documents.php Make check_hiu_documents.php read DB creds from .env instead of hardcoded local root credentials 2026-07-28 22:27:26 +05:30
check_hospital_setting_cols.php chore: add ABDM M3 HIU diagnostic scripts for consent workflow debugging 2026-07-28 03:08:52 +05:30
check_instruction_data.php Fix: Re-initialize CKEditor after Save Discharge Advice button 2026-06-07 19:48:33 +05:30
check_instruction_db.php Fix: Data mixing between instruction_other and instruction_remark fields 2026-06-07 20:00:59 +05:30
check_ipd2_bed.php Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
check_legacy_food.php Fix: Data mixing between instruction_other and instruction_remark fields 2026-06-07 20:00:59 +05:30
check_new_docs.php ABDM bridge: allow opt-in SSL verify bypass via ABDM_BRIDGE_SSL_VERIFY env for envs with stale local CA bundles 2026-07-28 03:37:23 +05:30
check_opd_master.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
check_opd_visit_list.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
check_other_test_patients.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
check_patient_master_devender.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
check_patient11_history.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
check_patient11_latest.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
check_rows_80_89.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
check_ssl_setting.php ABDM Gateway settings: add admin UI toggle for SSL certificate verification 2026-07-28 03:47:06 +05:30
check_table_structure.php Fix: Template delete page refresh + add debug logging 2026-06-07 11:32:24 +05:30
check_template.php Fix: Skip auto-generated patient info table when template has demographic tokens 2026-06-06 11:49:52 +05:30
check_transaction_lookup.php check_transaction_lookup.php: add optional operation filter + limit args 2026-07-28 23:12:13 +05:30
check_workflow_response.php Add one-off diagnostic script to dump full abdm_hiu_workflows response_json 2026-07-28 20:38:56 +05:30
clear_discharge_cache.php Fix: SIGNATURE_BLOCK placeholder and cached content issue 2026-06-07 20:12:58 +05:30
clear_discharge_content.php Simplify clear_discharge_content.php script - remove CI4 bootstrap dependency 2026-06-06 11:50:52 +05:30
clear_legacy_food.php Fix: Data mixing between instruction_other and instruction_remark fields 2026-06-07 20:00:59 +05:30
compare_abha_operations.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
composer.json Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
composer.lock Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
debug_bed_query.php Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
debug_discharge_content.php Fix: SIGNATURE_BLOCK placeholder and cached content issue 2026-06-07 20:12:58 +05:30
dedupe_abdm_documents.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
delete_abdm_old_request.php chore: add ABDM M3 HIU diagnostic scripts for consent workflow debugging 2026-07-28 03:08:52 +05:30
delete_hiu_documents_for_abha.php Add safe delete script for abdm_hiu_documents rows by abha_address (dry-run by default, --confirm to delete) 2026-07-28 23:10:03 +05:30
deploy.sh Fix cron installer to use php83 instead of incompatible default php CLI 2026-07-28 20:21:23 +05:30
DICOM_AI_IMPLEMENTATION.md Implement finance phase 2 pharmacy workflow and admin hospital/pharmacy profile settings 2026-03-17 04:05:02 +05:30
DISCHARGE_CSS_CLASSES.md Remove all inline styles and use semantic CSS classes 2026-06-07 07:56:11 +05:30
DISCHARGE_PLACEHOLDER_HTML_REFERENCE.md \Update documentation - {{DISCHARGE_SUMMARY}} now header only 2026-06-07 08:12:36 +05:30
DISCHARGE_PLACEHOLDERS_REFERENCE.md Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
DISCHARGE_SUMMARY_HTML_EDITOR_FIX.md Fix discharge summary not appearing in PDF after HTML editor conversion 2026-06-11 07:38:40 +05:30
DISCHARGE_TEMPLATE_GUIDE.md Add new discharge template tokens: PATIENT_PHONE, INSURANCE_COMPANY, DOCTOR_NAMES 2026-06-06 12:21:37 +05:30
DISCHARGE_TEMPLATE_PLACEHOLDERS.md Add PATIENT_TITLE discharge placeholder 2026-08-01 16:13:13 +05:30
DISCHARGE_TEMPLATE_TOKENS.md Add PATIENT_TITLE discharge placeholder 2026-08-01 16:13:13 +05:30
DUAL_BRIDGE_ARCHITECTURE.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
env config: enable CSNOtk SNOMED lookup with base URL and 8s timeout 2026-05-19 23:48:39 +05:30
FILE_INDEX_ABDM_GATEWAY.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
find_abdm_tables.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
find_opd_tables.php chore: add more ABDM diagnostic scripts (multi-patient consent flow comparison) 2026-07-28 03:11:43 +05:30
find_request_6dbbe21b.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
fix_bed_management.sql feat: Complete bed management system with transfer and time tracking 2026-06-09 08:39:48 +05:30
har_1.txt chore: checkpoint before discharge history panel refactor 2026-06-22 02:05:24 +05:30
HMS_FEATURES_PRESENTATION.html fix: repair broken @media print CSS and add PDF tips modal 2026-08-04 02:30:38 +05:30
HMS_FEATURES_PRESENTATION.md docs: add HMS feature presentation (HTML + Markdown) 2026-08-04 02:02:26 +05:30
HMS_MEDICAL_STORE_SESSION.md fix(medical-store): remove third-party brand Marg from application and replace with generic Excel/CSV import 2026-09-10 04:58:59 +05:30
info_script.sh feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
LICENSE Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
list_instruction_records.php Fix: Data mixing between instruction_other and instruction_remark fields 2026-06-07 20:00:59 +05:30
M1_ABHA_CREATION_AND_VERIFICATION_WITH_APIS_UPDATED_V1_1_f656c93440.xlsx feat(abdm-m1): implement Create / Find ABHA Record wizard aligned with ABDM M1 specifications 2026-09-11 22:11:17 +05:30
M2_BUILDING_HIP_WITH_APIS_UPDATED_22_Aug_871c2f7fcd(1).xlsx feat: add IPD census PDF, collection payment filter, fix report panel visibility, and implement ABDM HIP linking 2026-09-15 23:21:30 +05:30
MPDF_HINDI_FONT_CONFIGURATION.md Change mPDF default font from thin dejavusans to medium-weight freeserif for better Hindi/Devanagari rendering 2026-06-06 11:19:35 +05:30
MPDF_REFERENCE.md Add mPDF reference doc; fix discharge PDF rendering 2026-08-18 16:02:46 +05:30
OPEN_SOURCE_NOTICE.md chore(ui-docs): add help/license links, favicon, and branding asset tracking 2026-04-02 12:23:22 +05:30
pdf_test_html.html Add text alignment and enhanced CKEditor tools to IPD discharge templates 2026-06-07 11:07:29 +05:30
phpunit.xml.dist Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
preload.php Implement OPD template builder, doctor template selection, and OPD print integration fixes 2026-02-27 19:44:36 +05:30
raw_bridge_status_check.php chore: add ABDM M3 HIU diagnostic scripts for consent workflow debugging 2026-07-28 03:08:52 +05:30
README.md Allow allowedHostnames via .env and document usage 2026-04-28 06:32:29 +05:30
run_bed_fix.php feat: Complete bed management system with transfer and time tracking 2026-06-09 08:39:48 +05:30
SESSION_SUMMARY_ABDM_SANDBOX.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
SESSION_SUMMARY_MIDDLEWARE_GATEWAY.md feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
setup_git_config.sh refactor: use local repository git config instead of global 2026-08-04 03:11:43 +05:30
SOFTWARE_USE_LICENSE.md Clarify open source use and paid services 2026-08-12 21:28:43 +05:30
spark Add report panel updates and related billing/discharge enhancements 2026-03-10 02:43:35 +05:30
SURGERY_PROCEDURE_AUTOCOMPLETE_TESTING.md Update testing docs with Quick-Add feature tests 2026-06-06 06:40:18 +05:30
SYSTEM_OPS_TEST.md test: create test file for git pull verification 2026-08-04 02:54:30 +05:30
TEST_DEPLOYMENT.txt test: add deployment verification test file 2026-08-04 03:23:05 +05:30
test_panel_tab.php Simplify discharge summary placeholders - eliminate confusion 2026-06-11 08:18:43 +05:30
upload.exp feat: ABDM OPD Queue + ABHA Register flow + patient ABHA search fix 2026-05-16 04:21:31 +05:30
verify_no_dupes.php ABDM OPD tab: fix duplicate fetched-document rows + add dedicated Fetch Records action 2026-07-28 04:34:08 +05:30
wipe_hiu_data_for_abha.php Add wipe_hiu_data_for_abha.php: full M3 HIU data wipe (documents+workflows+artifacts) for fresh consent testing 2026-07-28 23:54:31 +05:30
WORKLOG_COPILOT.md feat(abdm): add digital share records 2026-08-16 17:35:42 +05:30

HMS — Hospital Management System (CI4)

Framework: CodeIgniter 4.7 · PHP: 8.2+ · DB: MySQL 5.7+ / MariaDB 10.4+

A full-featured hospital management system covering OPD, IPD, Billing, Pathology Lab, Radiology, Finance, Pharmacy Stock, and more.


Table of Contents

  1. Server Requirements
  2. Fresh Installation
  3. Web Server Configuration
  4. Environment Configuration
  5. Database Setup
  6. Seed Master Data
  7. File Permissions
  8. First Login
  9. Updating an Existing Installation
  10. OEM / Multi-Site Deployment
  11. Lab Template Workflow
  12. Useful Spark Commands
  13. Project Documents

1. Server Requirements

Requirement Minimum Recommended
PHP 8.2 8.3
MySQL 5.7 8.0+
MariaDB (alternative) 10.4 10.11+
Web server Apache 2.4 / Nginx Apache with mod_rewrite
Composer 2.x latest

Required PHP extensions:

intl  mbstring  mysqlnd  json  curl  gd  zip  fileinfo  xml

Recommended php.ini settings:

memory_limit       = 256M
upload_max_filesize = 20M
post_max_size       = 25M
max_execution_time  = 120

2. Fresh Installation

# 1. Clone the repository
git clone https://github.com/infodevsofttech-admin/devsofttech_hms_ci4.git hms
cd hms

# 2. Install PHP dependencies
composer install --no-dev --optimize-autoloader

# 3. Copy environment file
cp env .env

# 4. Edit .env  (see Section 4)
nano .env

# 5. Run database migrations
php spark migrate

# 6. Seed all master data  (see Section 6)
php spark db:seed LabTemplateSeeder
php spark db:seed InvestigationMasterSeeder
php spark db:seed ClinicalTemplateWorkspaceSeeder
php spark db:seed ComplaintsMasterSeeder

Windows (WAMP/Laragon): use php spark from the project root in Command Prompt or PowerShell.


3. Web Server Configuration

Apache

Point your virtual host DocumentRoot to the public/ folder — not the project root.

<VirtualHost *:80>
    ServerName hms.yourhospital.in
    DocumentRoot /var/www/hms/public

    <Directory /var/www/hms/public>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

mod_rewrite must be enabled:

sudo a2enmod rewrite
sudo systemctl restart apache2

Nginx

server {
    listen 80;
    server_name hms.yourhospital.in;
    root /var/www/hms/public;
    index index.php index.html;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
}

4. Environment Configuration

Edit .env (copied from env in step 3):

#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------
CI_ENVIRONMENT = production          # use "development" while installing

#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'https://hms.yourhospital.in/'
app.allowedHostnames = localhost,hms.yourhospital.in,100001.dhms.in
# or JSON format:
# app.allowedHostnames = ["localhost","hms.yourhospital.in","100001.dhms.in"]
app.appTimezone = 'Asia/Kolkata'     # adjust to your timezone

#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------
database.default.hostname = localhost
database.default.database = hms_ci4
database.default.username = hms_user
database.default.password = StrongPassword123
database.default.DBDriver = MySQLi
database.default.port     = 3306

#--------------------------------------------------------------------
# ENCRYPTION KEY (generate once: php spark key:generate)
#--------------------------------------------------------------------
# encryption.key = hex2bin:...

Generate encryption key:

php spark key:generate

ABDM via Eka.care (existing routes, provider switch)

This project keeps the same ABDM controller routes and queue events, and can switch the queue dispatcher to Eka for ABDM/NHCX integrations.

Add these keys in .env:

ABDM_SYNC_PROVIDER = eka
EKA_BASE_URL = https://api.eka.care
EKA_BEARER_TOKEN = your-token
# Optional alternatives
# EKA_API_KEY = your-api-key
# EKA_CLIENT_ID = your-client-id
# EKA_EVENT_ENDPOINTS_JSON = {"abdm.abha.validate":"/your/path"}
# EKA_WEBHOOK_SECRET = shared-secret-for-callback-signature

HealthPlix callback secret fallback

If HEALTHPLIX_FETCH_SECRET is set in .env, POST /healthplix/fetch uses it as fallback when the hospital setting value is empty.

HEALTHPLIX_FETCH_SECRET = your-shared-secret

Then process queue normally:

php spark bridge:sync

If EKA_WEBHOOK_SECRET is set, callback endpoints require a valid HMAC-SHA256 signature in X-Eka-Signature, X-Signature, or X-Hub-Signature-256.


5. Database Setup

Create database and user (MySQL)

CREATE DATABASE hms_ci4 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'hms_user'@'localhost' IDENTIFIED BY 'StrongPassword123';
GRANT ALL PRIVILEGES ON hms_ci4.* TO 'hms_user'@'localhost';
FLUSH PRIVILEGES;

Run migrations

Migrations create all application tables (billing, IPD, finance, stock, etc.):

php spark migrate

The legacy lab/radiology tables (lab_repo, lab_rgroups, lab_tests, etc.) are not managed by migrations — they are created automatically by the seeders in Step 6.


6. Seed Master Data

Run in this order:

# Lab & radiology report templates (creates tables too)
php spark db:seed LabTemplateSeeder

# Investigation/test master list for OPD order panel
php spark db:seed InvestigationMasterSeeder

# OPD clinical workspace templates (complaint, examination, advice templates)
php spark db:seed ClinicalTemplateWorkspaceSeeder

# Complaint master list
php spark db:seed ComplaintsMasterSeeder

All seeders are idempotent — safe to re-run; they use INSERT IGNORE.

Optional: OPD demo data

# Loads all OPD master data at once (calls Clinical + Investigation seeders)
php spark db:seed OpdDemoMasterSeeder

7. File Permissions

The web server user (www-data on Ubuntu, apache on CentOS) must have write access to these directories:

# Linux / CentOS / Ubuntu
chmod -R 775 writable/
chmod -R 775 public/assets/uploads/
chmod -R 775 public/uploads/

chown -R www-data:www-data writable/ public/assets/uploads/ public/uploads/

On Windows (WAMP/Laragon) no permission changes are needed.


8. First Login

  1. Open https://hms.yourhospital.in/ in your browser.
  2. Register the first user — this account automatically becomes superadmin.
  3. Go to Setup → Hospital Info and enter your hospital name, address, and logo.
  4. Go to Setup → Users to create additional staff accounts and assign roles.

Available roles:

Role Access
superadmin Full system access
admin Day-to-day administration
stock_manager Stock masters, approvals, procurement
storekeeper Item issuance and stock receiving
department_head Department stock indents
user General / reception access

9. Updating an Existing Installation

# Pull latest code
git pull origin main

# Install any new Composer packages
composer install --no-dev --optimize-autoloader

# Run any new migrations
php spark migrate

# If lab templates were updated by the developer, re-seed them
php spark db:seed LabTemplateSeeder

Always run php spark migrate after every git pull — it is safe to run on an already-migrated database (it skips already-applied migrations).


10. OEM / Multi-Site Deployment

For deploying to multiple hospital sites from one codebase:

  1. Follow Steps 2–8 on each server.
  2. Each site gets its own .env with its own database credentials and baseURL.
  3. When the main developer adds new features/templates, sites update with:
git pull
php spark migrate
php spark db:seed LabTemplateSeeder    # if lab templates were exported

11. Lab Template Workflow

Lab and radiology report templates are stored in the database. When templates are added or edited via the admin UI, the developer exports them so all OEM sites can receive them via git:

On the main/development server (after editing templates in UI):

php spark oem:export-lab-templates
git add app/Database/Seeds/LabOemData/
git commit -m "OEM: update lab template seed data"
git push

On each remote/OEM server:

git pull
php spark db:seed LabTemplateSeeder

Tables covered by this workflow:

Table Description
lab_rgroups Report group names (Haematology, BioChemistry …)
hc_items (itype 5,6) Billing charge items linked to lab reports
lab_repo Pathology report templates (with HTML layout)
lab_tests Individual test / parameter definitions
lab_tests_option Dropdown options for test parameters
lab_repotests Report ↔ test assignments and sort order
radiology_ultrasound_template US / MRI / CT / Xray / Echo templates

12. Useful Spark Commands

# Show all available commands
php spark list

# Run pending migrations
php spark migrate

# Rollback last migration batch
php spark migrate:rollback

# Seed a specific seeder
php spark db:seed LabTemplateSeeder

# Export current lab templates to git-trackable SQL files
php spark oem:export-lab-templates

# Import Ayushman package master from Excel/CSV
php spark ayushman:import

# Generate a new encryption key (first install only)
php spark key:generate

# Built-in development server (local only)
php spark serve

13. Project Documents