# Project: Report Generator for EHR

**URL:** <https://forums.librehealth.io/t/project-report-generator-for-ehr/2327>\
**Category:** EHR\
**Tags:** gsoc2018, ehr, gsoc2018-project\
**Created:** [April 23, 2018, 6:57pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327 "2018-04-23T18:57:43Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [July 28, 2018, 7:15pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/21 "2018-07-28T19:15:19Z")

</div>

The where clause should be for the tables that they have in the report. So the patient\_data table would have fields in the where selection like lname,fname,DOB,zip code, sex etc.

When the table is being built the enduser will need a knowledge of the fields that are in the table they are working with. (Advanced User/Vendor)

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [July 28, 2018, 7:30pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/22 "2018-07-28T19:30:14Z")

</div>

@teryhill consider a user who drags and drops 4 components that point to 4 different tables in the database. Let’s say patient\_data, appointments, drugs and addresses tables. He then specifies drug\_name==‘Maalohx’ for the where clause.

> [@teryhill](#):
>
> The where clause should be for the tables that they have in the report.

1. Does this mean the report(table) will be generated before the user specifies the where parameter to generate an accurate report?
2. A report may be generated from more than one table at a time. How do we handle this?

> [@teryhill](#):
>
> When the table is being built the enduser will need a knowledge of the fields that are in the table they are working with.

1. How do we achieve this?

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [July 28, 2018, 7:36pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/23 "2018-07-28T19:36:38Z")

</div>

the user , for right now, would select the where clause based on the fields used. I do not think that there are any current users that will understand how to apply the logic of the where clause across the tables that are not included in the report.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [July 28, 2018, 7:37pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/24 "2018-07-28T19:37:43Z")

</div>

1. the user will be an advanced user and will be familiar with PHPmyadmin or adminer for now

---

<div class="post-metadata">

**Author:** ![pri2si17](https://forums.librehealth.io/user_avatar/forums.librehealth.io/pri2si17/32/1320_2.png) [@pri2si17](https://forums.librehealth.io/u/pri2si17)\
**Post date:** [July 29, 2018, 6:42pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/25 "2018-07-29T18:42:17Z")

</div>

Hello @teryhill @tony @aethelwulffe @Trodrige

What Rodrige want to implement is something similar to what we have right now (`Reports->Clients->Patient List->Provider`), and get all the reports. What he is trying to get is something different. What I get is, he wanted to generate report for all patient whose first name is `XYZ` or who resides in street `Honolulu`. @Trodrige correct me if I am wrong.

What he wants is from Admin perspective (To get report depending on various fields.) And what we have is more like Clinic perspective. So my question is, do we need report from Admin perspective? If yes then any reasons?

My understanding is he should generate report with clinic as end user. In that case, one clinic can see reports of patients associated with their clinic or others clinic.

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 2, 2018, 7:20pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/26 "2018-08-02T19:20:04Z")

</div>

We know the fields the user has selected only when the desired draggable components have been submitted. Does this mean that the user will be able to select the where clause after the report has already been generated, then he can specify the where clause, then the final report generated? This doesn’t sound good to me, if that’s what you mean. I think the user should be able to drag components, select where clause (if he wants any), click the ‘Generate report’ button and then the corresponding report is generated.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [August 2, 2018, 7:24pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/27 "2018-08-02T19:24:17Z")

</div>

I think the user should be able to drag components, select where clause (if he wants any), click the ‘Generate report’ button and then the corresponding report is generated.

Yes. The user will need to add the where clause components and then generate the report.

The where clause components would , i think, be based on the dragged components.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [August 2, 2018, 7:25pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/28 "2018-08-02T19:25:08Z")

</div>

In other words the main items for the where clause would be some of the dragged fields.

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 2, 2018, 8:01pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/29 "2018-08-02T20:01:49Z")

</div>

Thank you @teryhill, now I’m clear on this, at least for now. 😄

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 3, 2018, 9:07pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/30 "2018-08-03T21:07:36Z")

</div>

I’ve been thinking of doing something like in the screenshot below. It’s a rough implementation of what I’m thinking. Some of these components map to several table columns. A where clause should refer to one table column, how do we implement this? (interface)

 ![48%20PM](https://forums.librehealth.io/uploads/default/original/1X/1877a9661167798c56999985ccd85c95d88cd997.png)

---

<div class="post-metadata">

**Author:** ![aethelwulffe](https://forums.librehealth.io/user_avatar/forums.librehealth.io/aethelwulffe/32/63_2.png) [@aethelwulffe](https://forums.librehealth.io/u/aethelwulffe)\
**Post date:** [August 4, 2018, 12:02am UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/31 "2018-08-04T00:02:54Z")

</div>

Titling columns…THEN dropping what should go in a column could be a powerful approach as well, if functionality grows to be able to concat() fields, or have columns as sub-queries. This is a good early implementation flow though.

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 6, 2018, 7:27am UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/32 "2018-08-06T07:27:31Z")

</div>

Link to my 6th blog post

> **[6: GSoC18 at LibreHealth — Coding ends! – Tigpezeghe Rodrige – Medium](https://medium.com/@tigrodrige/6-gsoc18-at-librehealth-coding-ends-7c6b012cd839)**
>
> The end of this amazing internship at LibreHealth is coming to an end.

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 6, 2018, 1:08pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/33 "2018-08-06T13:08:30Z")

</div>

Draft final submission for review

> **[7: GSoC18 at LibreHealth – Final Submission](https://tigrodrige.wordpress.com/2018/08/06/gsoc-2018-final-submission/)**
>
> This last article is a description of the project I spent time developing during this Google Summer of Code 2018 session at LibreHealth. Project Title Building a Report Generator for EHR System. Pr…

---

<div class="post-metadata">

**Author:** ![pri2si17](https://forums.librehealth.io/user_avatar/forums.librehealth.io/pri2si17/32/1320_2.png) [@pri2si17](https://forums.librehealth.io/u/pri2si17)\
**Post date:** [August 7, 2018, 3:56pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/34 "2018-08-07T15:56:07Z")

</div>

@Trodrige

Looks good to me. Meets all requirements. 🙂

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 7, 2018, 5:21pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/35 "2018-08-07T17:21:47Z")

</div>

@pri2si17 @aethelwulffe @teryhill

Below is a checklist of steps I wish to follow to move my partially finished work to EHR modules folder. It includes installation procedures. Suggestions and ideas are welcome. 😉

1. Create .env file from .env.example file.
2. Generate application key during installation.
3. Create the database (run artisan database creation command programmatically).
4. Specify database credentials and other variables in the .env file.
5. Run migrations and seed (default draggable components, report formats and system features) commands programmatically. (Seamless execution).
6. serve the application seamlessly (php artisan serve).

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 7, 2018, 6:16pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/36 "2018-08-07T18:16:16Z")

</div>

This is an attempt to document my work. This file will be a .pdf inside the ReportGenerator folder in the Laravel project. It can be used as documentation. Please suggest changes.

> **[LibreHealthEHR Report Generator Doc. GSoC2018](https://docs.google.com/document/d/1kTPaw_Dhu8E2Li_XHW8ZYLA0u1tBIxBEPnCJbuzzPAg/edit?usp=sharing)**
>
> Report Generator A LibreHealth EHR Project Tigpezeghe Rodrige K. tigrodrige@gmail.com Google Summer of Code, 2018 Intern August, 2018 TABLE OF CONTENT 1: OVERVIEW	3 2: OLD vs NEW REPORTS	3 2.1: Old Reports	3 2.2: New reports from Report...

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 9, 2018, 12:01pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/37 "2018-08-09T12:01:16Z")

</div>

Hello, @teryhill @pri2si17 @aethelwulffeShould the report generator install at same time with the EHR system? OR should we make it optional for a user to install the report generator?

What’s the best option to do this?

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [August 9, 2018, 12:20pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/38 "2018-08-09T12:20:54Z")

</div>

Install with the system. You will need a way of adding it as an upgrade to existing users.

---

<div class="post-metadata">

**Author:** ![Trodrige](https://forums.librehealth.io/user_avatar/forums.librehealth.io/trodrige/32/447_2.png) [@Trodrige](https://forums.librehealth.io/u/Trodrige)\
**Post date:** [August 9, 2018, 12:48pm UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/39 "2018-08-09T12:48:38Z")

</div>

ok, great. We’ll start with install and upgrade will follow.

---

<div class="post-metadata">

**Author:** ![r0bby](https://forums.librehealth.io/user_avatar/forums.librehealth.io/r0bby/32/1781_2.png) [@r0bby](https://forums.librehealth.io/u/r0bby)\
**Post date:** [January 6, 2021, 6:45am UTC](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327/40 "2021-01-06T06:45:43Z")

</div>



[Previous page](https://forums.librehealth.io/t/project-report-generator-for-ehr/2327.md?page=1)
