# Sample Mysql from Obs table to compile a register

**URL:** <https://talk.openmrs.org/t/sample-mysql-from-obs-table-to-compile-a-register/1498>\
**Category:** Implementing\
**Created:** [March 25, 2015, 4:30am UTC](https://talk.openmrs.org/t/sample-mysql-from-obs-table-to-compile-a-register/1498 "2015-03-25T04:30:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![judy](https://talk.openmrs.org/user_avatar/talk.openmrs.org/judy/32/2072_2.png) [@judy](https://talk.openmrs.org/u/judy)\
**Post date:** [March 25, 2015, 4:30am UTC](https://talk.openmrs.org/t/sample-mysql-from-obs-table-to-compile-a-register/1498/1 "2015-03-25T04:30:18Z")

</div>

Hello

I have some patient information in the obs table , and i am having trouble extracting them into rows of repeating values for each patient into the following format

`pt1|cough_obsdate1|cough_obsdate2|cough_obsdate3`

I have tried working with the reporting module but i am unable to run this query

Am looking for examples for persons with working examples

Thanks

cc @darius @mseaton@dkayiwa @burke @sunbiz

---

<div class="post-metadata">

**Author:** ![sunbiz](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sunbiz/32/520_2.png) [@sunbiz](https://talk.openmrs.org/u/sunbiz)\
**Post date:** [March 25, 2015, 4:00pm UTC](https://talk.openmrs.org/t/sample-mysql-from-obs-table-to-compile-a-register/1498/2 "2015-03-25T16:00:05Z")

</div>

So, I am guessing pt1 is patient, cough is the concept in an obs and you need the date the obs was recorded and then the next date and the so on… with a pipe (’|’) character between them? Do you want to deploy this on a form or HTML report? If its an HTML report, then why not use the web services for a patient obs and parse it and display in an HTML report?
