Introduction

Dreams EMR Dreams EMR - Electronic Medical Record Admin Dashboard Template

Dreams EMR - Electronic Medical Record Admin Dashboard Template

Contact Support Create Support ticket

Requirements

System Overview

The Dreams EMR Yii 2 template requires a modern web server environment with Yii 2.0+ framework support, PHP 8.2+ compatibility, essential extensions, and development tools for optimal performance and development experience.

Core Technologies
Yii
Backend Framework

Yii 2.0.53

Frontend Framework

Bootstrap 5.3.8

Core Language

PHP 8.4

System Requirements
Node.js

Npm for sass compilation

PHP Extensions

intl, pdo, xml, ctype, iconv, json, mbstring, openssl, session, tokenizer, fileinfo

Composer

Latest version for dependency management

Development Tools

Vscode, Terminal

Development Tools
Local Server

XAMPP/WAMP/MAMP

Version Control

Git

Web Browser

Any modern browser

Important Note

Ensure all PHP extensions are enabled in your server configuration. For production deployment, consider using a managed hosting service that supports Yii 2.0+ and PHP 8.2+.

Features

Core Features
Patient Management

Registration, profiles, medical history tracking, and comprehensive patient data management.

Doctor Management

Doctor profiles, specialties, schedule management, and professional credential tracking.

Appointment System

Calendar integration, email notifications, status tracking, and automated scheduling.

Billing & Invoices

Invoice generation, payment tracking, financial reports, and automated billing.

Medical Records

Secure patient data storage, retrieval, and comprehensive medical history management.

Dashboard & Analytics

Real-time insights, performance metrics, and comprehensive healthcare analytics.

Technical Features
Yii 2 Framework

Modern PHP MVC architecture

Composer Management

Dependencies & autoloading

Service Container

Dependency injection & configuration

PHP Views

Native PHP templating with layouts

URL Management

Pretty URLs & custom routing rules

Component System

Configurable application components

Debug Extension

Development debugging tools

Gii Code Generator

Rapid code generation tools

Performance

Optimized cache & HTTP handling

UI/UX Features
Modern Design

Creative and contemporary UI

Responsive Bootstrap 5.3.8

Mobile-first responsive design

SCSS Styling

Advanced CSS preprocessing

Font Awesome & Tabler

Comprehensive icon libraries

Easy Customization

Color and font customization

W3C Validated

Cross-browser compatibility

Yii Project Structure

Project Overview

This Yii 2 project follows the standard MVC architecture with clear separation of concerns, organized into logical directories for controllers, models, views, and configuration files.

dreams-emr/ (Root Project)
yii/ (Main Application)
template/ (template files)
assets/
AppAssets.php
commands/
HelloController.php
config/
_autocomplete.php
console.php
db.php
params.php
test_db.php
test.php
web.php
controllers/
PagesController.php
helpers/
jsonHelper.php
mail/
layouts/
html.php
text.php
models/
ContactForm.php
LoginForm.php
User.php
runtime/
cache/
debug/
logs/
tests/
_data/
_output/
_support/
acceptance/
bin/
functional/
unit/
_bootstrap.php
views/
layouts/
partials/ (Reusable components)
body.php
footer.php
head-css.php
modal-popup.php
sidebar.php
theme-settings.php
title-meta.php
topbar.php
vendor-scripts.php
auth_main.php (Authentication layout)
main.php (Main application layout)
index.php (Dashboard Home)
login.php (Login Page)
patients.php (Patients Management)
doctors.php (Doctors Management)
appointments.php (Patient Appointments)
visits.php (Patient Visits)
pharmacy.php (Pharmacy Management)
ui-*.php (UI Components)
layout-*.php (Layout Variations)
*.php (Additional View Files)
web/
assets/ (Asset files)
css/
Stylesheets
img/
Images & Icons
js/
JavaScript Files
json/
Json data files
scss/
Sass Source Files
plugins/
Third-party Libraries
.htaccess (Entry file)
index.php
.gitignore
composer.json (PHP dependencies)
package.json (Package dependencies)
requirements.php
yii
yii.bat
Legend
Directories
PHP Files
JavaScript Files
CSS Files
Git Files
SCSS Files
Node.js Files
Image Files
Json Files
Other Files

Yii Template Structure

views/layouts/main.php: Main Layout Template

This file serves as the main layout template using Yii 2's PHP view system. It provides the common HTML structure and includes partial views for consistent page elements.

Uses $this->render('partials/...') for partial includes and $content variable for content injection.

    
<?php
use yii\helpers\Html;
use yii\web\View;

/* @var $this View */
/* @var $content string */
?>

<!DOCTYPE html>
<?= $this->render('partials/theme-settings') ?>

<head>
    <?= $this->render('partials/title-meta') ?>
    <?= $this->render('partials/head-css') ?>
</head>

<?= $this->render('partials/body') ?>

    <!-- Begin Wrapper -->
    <div class="main-wrapper">

        <?= $this->render('partials/topbar') ?>
        <?= $this->render('partials/sidebar') ?>

        <?= $content ?> <!-- Main content of the page -->

    </div>
    <!-- End Wrapper -->

    <?= $this->render('partials/modal-popup') ?>
    <?= $this->render('partials/vendor-scripts') ?>
</body>
</html>
    

views/layouts/auth_main.php: Authentication Layout

This layout is specifically designed for authentication pages (login, register, password reset, etc.) that don't require the main navigation menu.

It provides a clean, focused interface without the main navigation elements.

    
<?php
use yii\helpers\Html;
use yii\web\View;

/* @var $this View */
/* @var $content string */
?>

<!DOCTYPE html>
<?= $this->render('partials/theme-settings') ?>

<head>
    <?= $this->render('partials/title-meta') ?>
    <?= $this->render('partials/head-css') ?>
</head>

<?= $this->render('partials/body') ?>

    <!-- Begin Wrapper -->
    <div class="main-wrapper">

        <?= $content ?> <!-- Main content of the page -->

    </div>
    <!-- End Wrapper -->

    <?= $this->render('partials/vendor-scripts') ?>
</body>
</html>
    

views/index.php: Content Page Template

Each view is rendered within the layout using the $content variable. Controllers specify which layout to use and pass data to the view.

This approach provides clean separation of concerns and maintains consistent layout across all pages while allowing flexible content.

    
<div class="page-wrapper">

    <div class="content">
        
		<!-- Your specific page content here -->
        
    </div>

	<?= $this->render('partials/footer') ?>

</div>
    
Yii 2 PHP View System

This project uses Yii 2's native PHP view system. Key features include:

  • Partial view rendering with $this->render() method
  • Built-in helpers and widgets for UI components

Installation Guide

Follow these steps to set up Dreams EMR Yii 2 application on your local development environment. This guide covers environment setup, Yii 2 installation, and configuration.

Installation Steps
1
System Requirements

Ensure you have the required software installed for Yii 2:

PHP 8.2+
Database (MySQL/MariaDB)
Composer
2
Install Dependencies

Open terminal/command prompt in the project root directory and run:

composer install
3
Start Development Server

Start the Yii 2 development server and access the application:

php yii serve

Or use PHP's built-in server:

php -S localhost:8080 -t web/
Access the application at:
http://localhost:8000

Sass, Scss Installation

Overview

Sass (Syntactically Awesome Style Sheets) is a CSS preprocessor that extends CSS with variables, nesting, mixins, and more. This guide covers the installation and setup of Sass for the Dreams EMR Yii 2 template.

Prerequisites
Node.js Installation

Before installing Sass, ensure you have Node.js installed on your system:

Installation Steps
1
Install NPM Package Manager

Install the latest version of npm package manager:

npm install -g npm@latest
Note: This ensures you have the latest npm version
2
Install Sass Globally

Install Dart Sass globally using npm:

npm install -g sass
3
Verify Installation

Check if Sass is installed correctly:

sass --version
Compilation Methods
Method Description Default Sass Command npm Script Command
One-time Compilation (Production)

Compile SCSS files once for production with minified output

sass web/assets/scss/main.scss:web/assets/css/style.css npm run sass
Watch Mode (Development)

Automatically recompile on file changes for real-time development

sass web/assets/scss/main.scss:web/assets/css/style.css --watch npm run sass:watch
Run Without Source Map (Production/Optional)

Compile SCSS without generating source maps, ideal for production builds

sass web/assets/scss/main.scss:web/assets/css/style.css --style=compressed --no-source-map npm run sass:no-map
Best Practices
Development
  • Use watch mode for real-time updates
  • Enable source maps for debugging
  • Organize SCSS with partials
Production
  • Use compressed output style
  • Minimize file size
  • Optimize for performance

Dynamic Title Feature

Overview

The Dreams EMR Yii 2 application implements an intelligent title generation system using PHP that analyzes route names and converts them into user-friendly page titles. This system processes route names through multiple transformation steps to create readable, properly formatted titles.

File Location: layouts/partials/title-meta.php
This partial view contains the title generation logic
Key Features
Extensible

Easily extendable with custom title generation rules

Smart Suffix Detection

Automatically customize suffixes like "Icons", "Charts", etc.

Title Formatting

Converts route names to properly formatted page titles

Yii 2 Integration

Easily accessible in Yii 2 views via the $this->title property

Smart Acronym Detection

Automatically detects and formats common acronyms in route names

Professional Appearance

Consistent and polished title formatting

Examples
  • index → "Admin Dashboard"
  • appointment-consultation → "Appointment Consultation"
  • all-patients-list → "Patients List"
  • ui-alerts → "Alerts"
  • chart-js → "JS Charts"
  • reset-password-1 → "Reset Password"
How It Works
  1. The system captures the current route name from the Yii 2 router
  2. Removes common prefixes and numeric suffixes
  3. Converts underscores and hyphens to spaces
  4. Applies proper title case formatting and handles acronyms
  5. Processes special cases and exceptions
  6. Returns the formatted title for display in the view
Title Format

All generated titles follow this consistent format:

<title> {Generated Title} | Dreams EMR - Responsive Bootstrap 5 Medical Admin Template</title>
Example Output

For starter-page

Starter Page | Dreams EMR - Responsive Bootstrap 5 Medical Admin Template

Note

The system automatically handles title generation using Yii 2 Controllers. For custom acronyms and suffixes like "Icons" or "Charts", you may need to manually add them to the title generation logic in layouts/partials/title-meta.php.

JSON Data Management

The Dreams EMR Yii 2 app uses JSON files to store and retrieve data through a helper system. This offers a simple and lightweight alternative to databases and works smoothly with Yii 2’s MVC structure.

Key Features
Yii 2 Helper Class

JsonHelper.php component for data loading

Error Handling

Automatic fallback to empty array on errors

Fast Processing

Direct file access with helper class methods

Easy Maintenance

Simple to read, modify, and version control

MVC Integration

Seamlessly works with Yii 2 controllers

Structured Data

Consistent JSON schema with component validation

Complete Implementation Flow
JSON Helper Function
File: helpers/JsonHelper.php
This helper automatically loads and validates JSON files
// helpers/JsonHelper.php
<?php

namespace app\helpers;

use Yii;

class JsonHelper
{
    public static function loadJson(string $fileName): array
    {
        // Store JSON inside web/assets/json/ (public) or @app/data/json (private)
        $file = Yii::getAlias('@webroot') . '/assets/json/' . $fileName;

        if (is_file($file)) {
            $jsonContent = file_get_contents($file);
            return json_decode($jsonContent, true) ?? [];
        }

        return [];
    }
}
Routes Configuration
File: controllers/PagesController.php
Define URL routes that map to controller methods
//controllers/PagesController.php
<?php

namespace app\controllers;

use Yii;
use yii\filters\AccessControl;
use yii\web\Controller;
use app\helpers\JsonHelper;
use yii\web\Response;
use yii\filters\VerbFilter;

class PagesController extends Controller
{
    public function actionCalendar()
    {
        $this->layout = 'main';
        return $this->render('/calendar');  
    }   

    // Auth Pages (without sidebar, topbar, modal-popup)
    public function actionChangePassword()
    {
        $this->layout = 'auth_main';
        return $this->render('/change-password');  
    } 

    // Json Injected routes
    public function actionPatientDetailsAppointments()
    {
        $this->layout = 'main';
        $patients = JsonHelper::loadJson('patient-details-appointments.json');
        return $this->render('/patient-details-appointments', [
            'patients' => $patients
        ]);
    }

    public function actionPatientDetailsDocuments()
    {
        $this->layout = 'main';
        $patients = JsonHelper::loadJson('patient-details-documents.json');
        return $this->render('/patient-details-documents', [
            'patients' => $patients
        ]);
    }
}
View Implementation
File: Views/all-patients-list.php
View displays the JSON data in a user-friendly format
// Views/all-patients-list.php
<div class="table-responsive">
	<table class="table table-hover table-center mb-0">
		<thead>
			<tr>
				<th>ID</th>
				<th>Name</th>
				<th>Email</th>
				<th>Phone</th>
				<th>Actions</th>
			</tr>
		</thead>
		<tbody>
			<?php if (!empty($patients)): ?>
				<?php foreach ($patients as $patient): ?>
					<tr>
						<td><?= htmlspecialchars($patient['id']) ?></td>
						<td><?= htmlspecialchars($patient['name']) ?></td>
						<td><?= htmlspecialchars($patient['email']) ?></td>
						<td><?= htmlspecialchars($patient['phone']) ?></td>
						<td>
							<a href="patient-details" class="btn btn-sm btn-primary">View</a>
						</td>
					</tr>
				<?php endforeach; ?>
			<?php else: ?>
				<tr>
					<td colspan="5" class="text-center">No data found</td>
				</tr>
			<?php endif; ?>
		</tbody>
	</table>
</div>
Complete Flow Summary
  1. Helper Class: JsonHelper.php provides the loadJson() static method
  2. Controller: Uses helper class to load JSON data and prepare it for views
  3. URL Manager: PagesController.php configures URL rules that map to controller actions
  4. View: Displays the JSON data in HTML format using Yii 2's formatting helpers

RTL Language Support

Overview

The application provides comprehensive RTL (Right-to-Left) language support for languages like Arabic, Hebrew, and Persian. It uses Yii 2 PHP templating to conditionally load RTL-specific styles and assets.

RTL Implementation

RTL support is implemented through the following components:

RTL CSS Loading

The application uses PHP conditionals in views/layouts/partials/head-css.php to load the appropriate CSS file based on the current page:

<?php
use yii\helpers\Url;

$path = Yii::$app->request->getPathInfo();
// Handle root path - if empty, treat as index page
$page = empty($path) ? 'index' : basename($path);
?>

<?php if ($page !== 'layout-rtl'){?>
    <!-- Bootstrap CSS -->
    <link rel = 'stylesheet' href ="<?= Url::to('@web/assets/css/bootstrap.min.css') ?>">
<?php }?> 

<?php if ($page === 'layout-rtl'){?>
    <!-- Bootstrap RTL CSS -->
    <link rel="stylesheet" href="<?= Url::to('@web/assets/css/bootstrap.rtl.min.css') ?>">
<?php }?>
RTL Layout Structure

The application uses a dedicated RTL layout template that can be extended by other templates when RTL support is needed. The RTL layout includes:

  • RTL-specific CSS classes and overrides
  • Right-aligned navigation and UI elements
  • Mirrored layout for RTL languages
Key Features
  • PHP-Powered Conditional Loading - Dynamically loads RTL or LTR styles based on the current route
  • Bootstrap RTL Support - Leverages Bootstrap's built-in RTL CSS framework
  • Component-Based Architecture - Leverages Yii 2's component system for modular RTL support
  • Page-Based Detection - Automatically detects RTL pages and loads appropriate stylesheets
Note

The conditional CSS loading automatically detects RTL pages using Yii 2's routing system and loads appropriate Bootstrap stylesheets. This approach ensures that RTL-specific styles are only loaded when needed, improving performance and maintainability while leveraging Yii 2's built-in asset management capabilities.

Theme Mode Switcher

Overview

The template includes a live dark mode toggle in the header that allows users to switch between light and dark themes instantly. This feature provides better user experience in different lighting conditions.

How to Access

Dark mode is accessible through the header toggle button:

<!-- Light/Dark Mode Button -->
<div class="header-item d-none d-sm-flex me-2">
    <button class="topbar-link btn topbar-link" id="light-dark-mode" type="button">
        <i class="ti ti-moon fs-16"></i>
    </button>
</div>
Implementation

Dark mode is implemented using JavaScript in theme-script.js:

// JavaScript implementation in theme-script.js
document.getElementById("light-dark-mode").addEventListener("click", function(e) {
    "light" === config.theme ? 
        changeLayoutColor("dark") : 
        changeLayoutColor("light")
});
Key Features
  • Live theme switching without page reload
  • User preference persistence
  • Bootstrap 5 dark theme integration
  • Improved readability in low light
Note

The dark mode toggle is available in the header on all pages. Users can switch themes instantly without losing their current work.

How to change Font ?

You can change the font you can edit it from Scss file.

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

	body {
		font-family: 'Manrope', sans-serif;
	}
		

How to change Header Background Color ?

You can change the header background color in style.css as per your wish


	.header {
		background: #fff;
		left: 0;
		position: fixed;
		right: 0;
		top: 0;
		height: 66px;
	}
		

Typography

h1. Bootstrap heading

h2. Bootstrap heading

h3. Bootstrap heading

h4. Bootstrap heading

h5. Bootstrap heading
h6. Bootstrap heading

Icons

Use Font Awesome icons with spesific class


	<!DOCTYPE html>
	<html lang="en">
		<head>
			<link rel="stylesheet" href="<?= Url::to('@web/assets/plugins/fontawesome/css/fontawesome.min.css') ?>">
			<link rel="stylesheet" href="<?= Url::to('@web/assets/plugins/fontawesome/css/all.min.css') ?>">
		</head>
	</html>


	<i class="fas fa-times"></i>
	<i class="fas fa-chevron-down"></i>
	<i class="fa-regular fa-user"></i>
	

FAQs

With one purchase code you can use it on one domain name. You need to get new license for every new domain name, please check Envato Help Page for more information about licenses.

If you need support, or if you're facing any problems, please contact us via Envato Support
Please note that our respond can take up to 2 business days.

  • Availability to answer questions, Answering technical questions about item's features, Assistance with reported bugs and issues, Help with included 3rd party assets.
  • Any customization request will be ignored.
  • Please make sure to read more about the support policy.

Support

If this documentation does not address your questions, please feel free to contact us via email at Item Support Page

We are in the GMT+5:30 time zone and typically respond to inquiries on weekdays within 12-24 hours. Please note that in rare cases, the response time may extend to 48 hours, especially during holiday seasons.

Note:

We strive to offer top-notch support, but it's only available to verified buyers and for template-related issues such as bugs and errors. Custom changes and third-party module setups are not covered.

Don't forget to Rate Dreams EMR!
Please take a moment to rate our product on Themeforest. Your support means a lot to us. Just go to your Themeforest Profile > Downloads Tab, and you can leave a review for our script. Thank you!

License

Dreams EMR is developed by Dreams Technologies and is available under both Envato Extended & Regular License options.

Regular License

Usage by either yourself or a single client is permitted for a single end product, provided that end users are not subject to any charges.

Extended License

For use by you or one client in a single end product for which end users may be charged.

What are the main differences between the Regular License and the Extended License?

Note

If you operate as a freelancer or agency, you have the option to acquire the Extended License, which permits you to utilize the item across multiple projects on behalf of your clients.

Do you need a customized application for your business?

If you need a customized application for your business depends on your specific requirements and goals, Please contact us.

Customization can be the key to success, ensuring your project perfectly aligns with your unique goals and requirements.

Don't Miss Out on the Benefits of Customization!

Unlock the potential of your project. It's time to ensure that your project isn't just another cookie-cutter solution but a truly unique and effective one.

Discover how customization can make a difference in your project's success. Let's create a solution that's as unique as your vision!

  • We'll tailor the application to meet your specific needs and preferences.
  • We will upload your website to the server and ensure it is live.
thanks

Thank You

Thank you once again for downloading Dreams EMR.
We hope you're enjoying your experience, and we kindly request that you take a moment to share your valuable review and rating with us.

Review Link:https://themeforest.net/downloads