# Patient Clinical Summary Enhancement-GSOC 2018

**URL:** <https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742>\
**Category:** GSoC\
**Created:** [April 25, 2018, 3:16pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742 "2018-04-25T15:16:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [April 25, 2018, 3:16pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/1 "2018-04-25T15:16:59Z")

</div>

@sthaiya@mwere Hi all, I am Madushan and I am going to work on the aforementioned project in this year’s GSOC. Project Objectives-

1. Create patient summary review/feedback which allows providers

- 

```
to confirm the clinical summary is correct

```

- 

```
to provide recommendation for the changes

```

1. For feedback review, it should allow reviewers

- to accept recommendations and make changes
- to decline the recommednations with reasons

Currently I am hoping to add the first feature. Any guidance from the community who are experienced in this module is highly appreciated.

---

<div class="post-metadata">

**Author:** ![sthaiya](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sthaiya/32/7452_2.png) [@sthaiya](https://talk.openmrs.org/u/sthaiya)\
**Post date:** [April 27, 2018, 1:00pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/2 "2018-04-27T13:00:08Z")

</div>

@madushan we are happy to work with you on this project.

@madushan @mwere Thank you all for today’s e-meeting.

@madushan we have agreed that between now and Tuesday you continue familiarizing yourself with OpenMRS clinical summaries handling as well as derived concepts. We will proceed on Tuesday at the agreed time.

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [April 27, 2018, 1:38pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/3 "2018-04-27T13:38:22Z")

</div>

@sthaiya @mwere Thank you for the meeting. I am extremely sorry for the inconvenience caused. It was out of my control. I will make sure this wouldn’t happen again. I will get familiarized with those during the time.

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 21, 2018, 3:52pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/4 "2018-05-21T15:52:30Z")

</div>

@sthaiya @mwere I am trying to create an html/text based [output](http://demo1.muzima.org/openmrs/module/reporting/reports/renderers/textTemplateReportRenderer.form?type=org.openmrs.module.reporting.report.renderer.TextTemplateRenderer&reportDesignUuid=ea5cfc81-de93-483e-8449-2ce51b885bb4&reportDefinitionUuid=426194d3-7767-42e9-89f7-2f151ccc16b9&successUrl=/openmrs/module/reporting/reports/reportEditor.form?uuid=426194d3-7767-42e9-89f7-2f151ccc16b9) for my [report](http://demo1.muzima.org/openmrs/module/reporting/reports/reportEditor.form?uuid=426194d3-7767-42e9-89f7-2f151ccc16b9) which uses a[sql dataset definition](http://demo1.muzima.org/openmrs/module/reporting/datasets/sqlDataSetEditor.form?type=org.openmrs.module.reporting.dataset.definition.SqlDataSetDefinition&uuid=ee9e6417-e706-4568-9e94-eeb8c3b80a14) named ‘to\_print\_obs’.

I added a weight observation(conceptId = 5089) for patient ‘Dileka’. My sql dataset definition brings the following result.

 ![Screenshot from 2018-05-21 21-17-02](https://talk.openmrs.org/uploads/default/original/2X/0/03b3b5e18917b25cb6f474f41a33c7c6bbdeb946.png)

In my groovy script I added the following code to print obs copying from [openMRS wiki](https://wiki.openmrs.org/display/docs/Text+Template+Renderer+Groovy).

 ![Screenshot from 2018-05-21 21-19-46](https://talk.openmrs.org/uploads/default/original/2X/a/af56e242205fa063561b81644f965563a5f73b42.png)

There is no exception seen and no output is printed. Looking foreward for your help to get this fixed. Thanks

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 21, 2018, 4:59pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/5 "2018-05-21T16:59:36Z")

</div>

Is this reproducible on the demo server? [http://demo.openmrs.org/](http://demo.openmrs.org/)

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 21, 2018, 5:46pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/6 "2018-05-21T17:46:54Z")

</div>

@dkayiwa yes, I could reproduce given the credentials.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 21, 2018, 5:56pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/7 "2018-05-21T17:56:18Z")

</div>

What are the exact steps to reproduce locally?

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 22, 2018, 3:33am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/8 "2018-05-22T03:33:22Z")

</div>

@dkayiwa

1. Add weight obs for a patient

2. Create a sql dataset definition to bring obs of the patient

3. Create a customized report.

4. Add the created sql dataset definition to the report.

5. add html/text based output to the report.

6. In the groovy script add the following code.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 22, 2018, 11:01pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/9 "2018-05-22T23:01:27Z")

</div>

Can you reproduce it on [demo.openmrs.org](http://demo.openmrs.org) and then give me a direct link to check it out?

UserName: admin Password: Admin123

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 23, 2018, 12:27am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/10 "2018-05-23T00:27:07Z")

</div>

@dkayiwa Thank you very much for the support. I reproduced a report ‘to print obs’. Please check it [here](https://demo.openmrs.org/openmrs/module/reporting/reports/reportEditor.form?uuid=822057fb-d9ab-4cce-8a21-55d2ae05866e&expSupportedTypes=java.util.Date&expSupportedTypes=java.lang.String)

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 23, 2018, 6:23am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/11 "2018-05-23T06:23:21Z")

</div>

Can you point me to where you specify the column names that you are referencing in your groovy script?

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 23, 2018, 7:36am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/12 "2018-05-23T07:36:37Z")

</div>

@dkayiwa I have written a [sql query](https://demo.openmrs.org/openmrs/module/reporting/datasets/sqlDataSetEditor.form?type=org.openmrs.module.reporting.dataset.definition.SqlDataSetDefinition&uuid=ae087b38-d52c-4c16-91be-d4a6308205b0) to get all columns from a single row from obs table.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 23, 2018, 11:59am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/13 "2018-05-23T11:59:12Z")

</div>

Take a second look at the documentation you linked above in regards to column names.

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 23, 2018, 12:02pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/14 "2018-05-23T12:02:17Z")

</div>

@dkayiwa the document asks the column to be named ‘weight’. But there are multiple columns in the obs table.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 23, 2018, 12:09pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/15 "2018-05-23T12:09:37Z")

</div>

Is any of them named so?

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 23, 2018, 12:22pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/16 "2018-05-23T12:22:33Z")

</div>

@dkayiwa Thanks for the help. I modified the sql query like this.

`select obs_id as weights, obs_datetime as obsDatetime, value_numeric as valueNumeric, date_created from obs where obs_id = 7`

But it is still the same.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 23, 2018, 12:53pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/17 "2018-05-23T12:53:16Z")

</div>

Can you share a demo server link to your groovy script?

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 23, 2018, 12:57pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/18 "2018-05-23T12:57:13Z")

</div>

@dkayiwa [https://demo.openmrs.org/openmrs/module/reporting/reports/renderers/textTemplateReportRenderer.form?type=org.openmrs.module.reporting.report.renderer.TextTemplateRenderer&reportDesignUuid=da53df5f-04ac-470b-97d7-1ee23b31d547&reportDefinitionUuid=822057fb-d9ab-4cce-8a21-55d2ae05866e&successUrl=/openmrs/module/reporting/reports/reportEditor.form?uuid=822057fb-d9ab-4cce-8a21-55d2ae05866e](https://demo.openmrs.org/openmrs/module/reporting/reports/renderers/textTemplateReportRenderer.form?type=org.openmrs.module.reporting.report.renderer.TextTemplateRenderer&reportDesignUuid=da53df5f-04ac-470b-97d7-1ee23b31d547&reportDefinitionUuid=822057fb-d9ab-4cce-8a21-55d2ae05866e&successUrl=/openmrs/module/reporting/reports/reportEditor.form?uuid=822057fb-d9ab-4cce-8a21-55d2ae05866e)

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [May 23, 2018, 2:39pm UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/19 "2018-05-23T14:39:54Z")

</div>

Your link gives me a null pointer exception

---

<div class="post-metadata">

**Author:** ![madushan](https://talk.openmrs.org/user_avatar/talk.openmrs.org/madushan/32/6965_2.png) [@madushan](https://talk.openmrs.org/u/madushan)\
**Post date:** [May 24, 2018, 11:57am UTC](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742/20 "2018-05-24T11:57:23Z")

</div>

@dkayiwa I am sorry for the inconvenience caused. @sthaiya helped me to figure out the mistake. Thank you very much for your help.

```
`SELECT value_numeric as weights FROM obs' 

```

would solve the issue.

[Next page](https://talk.openmrs.org/t/patient-clinical-summary-enhancement-gsoc-2018/17742.md?page=2)
