Create a multi-table pdf report for each entry in a database

Reply
N/A
Posts: 1

Create a multi-table pdf report for each entry in a database

Hi

I've been asked to reproduce a pdf report produced from a SQL database using SAS EG. The report is one page for each patient_id that contains several output tables of similar information, for instance basic demographics, diagnosis and treatment information (and these are usually contained in separate corresponding tables within the database). I need to produce this for approximately 300 patient_ids.

Some of the information exists at a 1:1 level, ie one patient_id will have one value for "gender", but other information such as in the "treatment" table will have a 1:many where one patient has had multiple treatments.

I have looked at proc report and I can get this to create a new table for each patient_id with a subset of demographic columns, however I'm not sure how to extend this to get multiple tables per patient_id. As most of the information is text based the summary functions/tabulate don't really apply..

It would also be nice to have the "columns" run down the page, rather than across as some of the text entries can be long.

Do I need to use this in combination with ods to create a multi-table single page report? Or is there another procedure I should be using?

I have tried searching for examples, but cannot find anything along the same lines as what I have started with. But I know this may be because I don't yet know the term that I need to be searching for!

I would appreciate it if you could point me in the right direction.

I've included an example below of what this should eventually look like..(please ignore the poor formatting I couldn't attach an image).

Thank you for your help.

Alice


Example report

Summary for 0001234

Personal Details

Name:

Patient_name

Date of Birth:

07 Jul 1973

Sex:

Female

Born in:

Australia

Mostly lived:

Australia

Background:

Culture

Contact Details

Name:

Demo User

Address:

test

Postcode:

Suburb:

State:

Country:

United Kingdom

Email:

Test_email@email.com

Phone:

Second Contact Details

Name:

Peter Pan

Email:

peter@pan.edu.au

 


 

Diagnosis

Tumor type:

Date of Diagnosis:

12 Jan 2013

Tumour site (primary):

Tumour sites (secondary):

Treatment side effects

Treatment name

Experienced side effects

Methotrexate

Abdominal pain

Methotrexate

Constipation

Methotrexate

Eye irritation

Hospitals

Hospital Name

Address

Code

Suburb

State

Country

Hospital 1

Australia

Hospital 2

China

Hospital 3

Australia


Ask a Question
Discussion stats
  • 0 replies
  • 114 views
  • 0 likes
  • 1 in conversation