Skip to content
This repository was archived by the owner on May 10, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7c71034
Adding migrations and models for report generator tables
Trodrige May 26, 2018
3db8a1b
An attempt to add Factories and seeders for the report generator. Add…
Trodrige May 28, 2018
b62f74a
Added the junction table for report format and draggable component re…
Trodrige Jun 4, 2018
ff73094
display draggable components
Trodrige Jun 6, 2018
eae3984
Getting the option IDs of selected components
Jun 11, 2018
2fc50a5
Sending CSRF header and getting response from controller
Jun 12, 2018
84cb384
corrected previous PR. Added command to create two laravel-ehr databases
Trodrige Jun 14, 2018
2e6ac8d
An attempt to get data from selected columns, and send to views
Trodrige Jun 17, 2018
33fc9c7
Attempt to retrieve data
Trodrige Jun 22, 2018
8536b8a
cleaned showReport function, and sending data to view
Trodrige Jun 23, 2018
8d4896c
attempt to display rendered data in the view
Trodrige Jun 23, 2018
eae851d
Displaying rendered data
Trodrige Jun 25, 2018
877388b
Add new system feature
Trodrige Jul 1, 2018
b1cb778
Adding ability to save report format. Adding entries to join table
Trodrige Jul 2, 2018
780e21a
Updating instruction.txt to show Libre EHR Db configurations
Trodrige Jul 2, 2018
8e281b5
Merging install and instruction files in README file
Trodrige Jul 5, 2018
83de3ee
dumping test data for features and report formats
Trodrige Jul 5, 2018
6b70601
updating and deleting system features
Trodrige Jul 16, 2018
c932ea5
Delete report format
Trodrige Jul 16, 2018
4558a47
Edit report format title and description
Trodrige Jul 20, 2018
29bbb2b
View existing report from selected report format
Trodrige Jul 20, 2018
00a4f22
hiding save report format button when showing existing report
Trodrige Jul 23, 2018
bc024c6
Adding pdf_report.php for PDF generation function
Trodrige Jul 27, 2018
7f33e3f
sending for columns for use in pdf generation
Trodrige Jul 28, 2018
ecc9ebc
keeping all draggable components in drop box and draggable pool.
Trodrige Aug 3, 2018
2320022
--amend
Trodrige Aug 3, 2018
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
73 changes: 73 additions & 0 deletions Modules/ReportGenerator/Http/Controllers/PdfController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php

namespace Modules\ReportGenerator\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;

class PdfController extends Controller
{
/**
* Display a listing of the resource.
* @return Response
*/
public function index(Request $request)
{
dd($request->column_names);
return view('reportgenerator::index');
}

/**
* Show the form for creating a new resource.
* @return Response
*/
public function create()
{
return view('reportgenerator::create');
}

/**
* Store a newly created resource in storage.
* @param Request $request
* @return Response
*/
public function store(Request $request)
{
}

/**
* Show the specified resource.
* @return Response
*/
public function show()
{
return view('reportgenerator::show');
}

/**
* Show the form for editing the specified resource.
* @return Response
*/
public function edit()
{
return view('reportgenerator::edit');
}

/**
* Update the specified resource in storage.
* @param Request $request
* @return Response
*/
public function update(Request $request)
{
}

/**
* Remove the specified resource from storage.
* @return Response
*/
public function destroy()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function showReport($option_ids, $hide = False)
}

$data = []; // store the retrieved data
$column_names = []; // st
$column_names = []; // store the column_names
foreach ($column_list as $columns) { // $columns has the list of columns for each component.
$table_name = $columns[0]; // get table name to which each column list points to.
for($i = 1; $i < count($columns); $i++) { // foreach list of columns
Expand Down
4 changes: 1 addition & 3 deletions Modules/ReportGenerator/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

Route::group(['middleware' => 'web', 'prefix' => 'reportgenerator', 'namespace' => 'Modules\ReportGenerator\Http\Controllers'], function()
{
Route::get('pdf_report', function(){
return view('');
});
Route::get('/pdf_report', 'PdfController@index');

Route::get('/', 'ReportGeneratorController@index');

Expand Down
7 changes: 6 additions & 1 deletion Modules/ReportGenerator/Resources/views/report.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#add-report-format">Save report as</button>&nbsp;
@endif
<button type="button" class="btn btn-info" onclick="printReport('report_div')">Print</button>&nbsp;
<a type="button" class="btn btn-info" href="{{ asset('pdf_report.php') }}">PDF</a>&nbsp;
<form method="get" action="{{ url('reportgenerator/pdf_report') }}">
@foreach($column_names as $key => $column_name)
<input name="column_names[]" class="column_names" id="column_names[]" type="hidden" value="{{ $column_name }}" align="absmiddle" />
@endforeach
<button type="submit" class="btn btn-info" id="pdf-button">PDF</button>
</form>&nbsp;
<button type="button" class="btn btn-info">TXT</button>&nbsp;
<button type="button" class="btn btn-info">CSV</button>&nbsp;
<button type="button" class="btn btn-info">ODT</button>
Expand Down
1 change: 0 additions & 1 deletion public/pdf_report.php

This file was deleted.