Sample Mysql from Obs table to compile a register


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


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


cc @darius @mseaton @dkayiwa @burke @sunbiz

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?