Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump y18n from 4.0.0 to 4.0.1 #13

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_DATABASE=medical
DB_USERNAME=mint
DB_PASSWORD=C7wx17rs

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand Down
31 changes: 27 additions & 4 deletions Release Notes
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
Release Notes
Version 4 (commit 20210203)
Add comments to Family History table
Add version to About menu item
Standardize Pagination
Fix pagination link color
clean up css
added popovers

version 3.1 (commit 20191123)
todo:
delete labtests table (keep labs table)
Upgrade to Laravel 6.20.14 & PHP 7.2

-- Reformatted home/welcme page and added centerPage style sheet
Version 3 (commit 20200310)
Menu Updates (and associated MVCs):
Removed Reports
Added Top Menu (Profile, health records)
Added profile menu item 'family history'
Added health records menu items 'imaging', 'immunization', 'medications'
Added text search and column sorting to Lab and Immunization views
Removed BP and weight from Surgery views
Improved field edits

version 2.2 (commit 20191123)

-- Reformatted home/welcome page and added centerPage style sheet
-- Fixed topPage style sheet
-- Iconized views and menus
-- widened doctor and doctor specialty fields
Expand All @@ -19,7 +40,7 @@ Work-In-Progress
-- medications


Version 3 (commit 20191031)
Version 2.1 (commit 20191031)

-- Added Doctor Specialty auto-populate
-- Added Menu to home page
Expand All @@ -41,4 +62,6 @@ Version 2 (commit 20190812)
-- Added Create view edits for weight and value
-- ReSize db
-- Edit views: add dropdown for patientName/doctorName
-- Index views: add scrollable text box
-- Index views: add scrollable text box

Version 1 (initial)
10 changes: 10 additions & 0 deletions app/Famhist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Famhist extends Model
{
//
}
15 changes: 15 additions & 0 deletions app/Filters/DateFilter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/// TopicFilter.php
// required for search filter
// This TopicFilter class is responsible for filtering the data based on the topic. We pass the type in the query string, and according to that, we get out the result.

namespace App\Filters;

class DateFilter
{
public function filter($builder, $value)
{
return $builder->where('testDate','like', $value);
}
}
17 changes: 17 additions & 0 deletions app/Filters/ImageFilter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

// BlogFilter.php
// required for search filter

namespace App\Filters;

use App\Filters\AbstractFilter;
use Illuminate\Database\Eloquent\Builder;

class ImageFilter extends AbstractFilter
{
protected $filters = [
// 'patientName' => PatientFilter::class
'doctorName' => DoctorFilter::class
];
}
17 changes: 17 additions & 0 deletions app/Filters/LabsumFilter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

// BlogFilter.php
// required for search filter

namespace App\Filters;

use App\Filters\AbstractFilter;
use Illuminate\Database\Eloquent\Builder;

class LabsumFilter extends AbstractFilter
{
protected $filters = [
// 'patientName' => PatientFilter::class
'labDate' => DateFilter::class
];
}
78 changes: 78 additions & 0 deletions app/Helper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php

function random_num() {
rand(1000,5000);
}

function get_package_json() {
$start = false;
$jsondata = file_get_contents("c:\\xampp\\htdocs\\MyHealth-master\\package.json");

$jsonIterator = new RecursiveIteratorIterator(
new RecursiveArrayIterator(json_decode($jsondata, TRUE)),
RecursiveIteratorIterator::SELF_FIRST);

foreach ($jsonIterator as $key => $val) {
if ($key == 'devDependencies')
{
$start = true;
}

if($start == true) {
if(is_array($val)) {
echo "packages\n";
} else {
print "$key => $val\n";
}
}
}
}

function get_package_json2($pkg) {

$jsondata = file_get_contents("c:\\xampp\\htdocs\\MyHealth-master\\package.json");

$jsonIterator = new RecursiveIteratorIterator(
new RecursiveArrayIterator(json_decode($jsondata, TRUE)),
RecursiveIteratorIterator::SELF_FIRST);

foreach ($jsonIterator as $key => $val) {

if ($key == $pkg) {
if(is_array($val)) {
echo "package\n";
} else {
print "$key => $val\n";
}
}
}
}

function cwd() {
echo getcwd() . "\n";
}

function php_ver()
{
print 'PHP => ' . phpversion();
}

function mysql_ver()
{
$ver = exec("mysql -V");
print('MySql Version => ' . substr($ver,24,7));
}

function mysql_db_ver()
{
$results = DB::select( DB::raw('SHOW VARIABLES LIKE "version"') );
$test = json_encode($results);
$test2 = strrchr($test,":");
// var_dump($test2);
$len = strlen($test2);
$pos = strpos($test2,"}");
$test3 = substr($test2,1,$pos-1);
echo 'MySql => ' . $test3;
echo '';

}
41 changes: 33 additions & 8 deletions app/Http/Controllers/DoctorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,35 @@ class DoctorController extends Controller
*
* @return \Illuminate\Http\Response
*/
public function index()

public function index(Request $request)
{
$doc = Doctor::orderBy('name')->paginate(5);
$items = $request->items ?? 10; // get the pagination number or a default
$doc = Doctor::orderBy('name')->paginate($items)->onEachSide(1);

return view('doctors.index',compact('doc'));
return view('doctor.index',compact('doc','items'));
}

Public function fetchData(Request $request)
{

if($request->ajax())
{

$sort_by = $request->get('sortby');
$sort_type = $request->get('sorttype');
$query = $request->get('query');
$query = str_replace(" ", "%", $query);
$items = $request->get('items');
$doc = DB::table('doctors')
->where('name', 'like', '%'.$query.'%')
->orWhere('specialty', 'like', '%'.$query.'%')
->orderBy($sort_by, $sort_type)
->paginate($items);

return view('doctor.index_data', compact('doc'))->render();

}
}

/**
Expand All @@ -30,7 +54,7 @@ public function index()
*/
public function create()
{
return view('doctors.create');
return view('doctor.create');
}

/**
Expand All @@ -50,7 +74,7 @@ public function store(Request $request)
$newRec->specialty = $request->get('specialty');
$newRec->save();

return redirect('Doctor')->with('success','Doctor has been added');
return redirect('doctor')->with('success','Doctor has been added');
}

/**
Expand All @@ -73,7 +97,7 @@ public function show($id)
public function edit($id)
{
$doc = Doctor::find($id);
return view('doctors.edit',compact('doc','id'));
return view('doctor.edit',compact('doc','id'));
}

/**
Expand All @@ -93,7 +117,7 @@ public function update(Request $request, $id)
$doc->name = $request->get('name');
$doc->specialty = $request->get('specialty');
$doc->save();
return redirect('Doctor');
return redirect('doctor');
}

/**
Expand All @@ -105,6 +129,7 @@ public function update(Request $request, $id)
public function destroy($id)
{
DB::table("doctors")->delete($id);
return response()->json(['success'=>"Doctor Deleted successfully.", 'tr'=>'tr_'.$id]);
//return response()->json(['success'=>"Doctor Deleted successfully.", 'tr'=>'tr_'.$id]);
return redirect('doctor')->with('success','Doctor Record has been deleted');
}
}
Loading