Re: looping and for statements

2004-09-09 Thread Brant Winter
> sounds complicated ... im not sure how you can create a new page in a 
> pdf

not really ! I have purchased the cfx_pdf custom tag - it really makes it a breeze !

www.easel2.com

i will try your method later tonight.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: looping and for statements

2004-09-09 Thread joe velez
sounds complicated ... im not sure how you can create a new page in a pdf, but you got that covered from what i can tell. or maybe you just create a new pdf altogether. ..and im also not sure if i understand you correctly, but if i do

just use a counter.

 
 
 

 
 
 
 
  
  
  



i think this is all you need to do... you can use cfloop instead of cfoutput query; the concept is the same.

joe velez
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




looping and for statements

2004-09-08 Thread Brant Winter
Hi again - I just cant get my head around this looping statement I have to
write !

The test data I have limited to say five rows as below:

 ** All patient data is de-identified below **



Name

MedicareNo

Surname

Title

DispenseDate

DrugDescription

Qty

SRXNO

1

John

12345678910

Smith

MR

02/09/2004

NAVOBAN CAP 5mg

2

245949

2

John

12345678910

Smith

MR

02/09/2004

NAVOBAN AMP 5mg/5mL

1

245947

3

John

12345678910

Smith

MR

02/09/2004

CYCLOPHOSPHAMIDE AMP 1g

1

245946

4

John

12345678910

Smith

MR

02/09/2004

EPIRUBICIN (BL) VL 50mg/25ml

3

245945

5

Jane

10987654321

Doe

MRS

01/09/2004

MITOZANTRONE (PU) VL 10mg/5ml

1

244505



To write a script for a drug in Australia there is other data, but this will
get the idea across:

I can only have 3 drugs per script, and I cannot issue the same drug twice
on one day. So from the data above I need to write a cfloop statement to go
over the query recordset ( above ) and grab the first 3 drugs on that day,
02/02/2004 and generate the pdf with cfx_pdf. I then have to have some sort
of conditional statement to grab the 4th drug and add in the cfx_pdf tag to
generate a new page in the pdf, and hence another script.


So basically I need to do the following:

Get recordset of outstanding scripts that need to be written.

My query is ordered by medicare number then surname, and then dispensing
date - as the scripts need to be generated each day.

Loop over the recordset and start a new pdf page with cfx_pdf ( I have used
cfx_pdf before so I am familiar generating a pdf file from CF )









If the patient has 3 or less drugs on one day put them on one piece of paper
and then start a new pdf page, if they have 4 to 6 start a new pdf page etc
etc.


size="8">#SDOCNAME# *** Using this I can place a dynamic
element on a pdf page for each part of the electronic script ***

So I use a cf_pdf_text tag for each part of the script / drug names etc.



 *** this tage could be used in the cfloop to generate a new
page when the amount of drugs exceeds 3 per patient per day - but I don't
know how to write the statement ***





I am just not sure how to make the cfloop statement ?






The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. It is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. Please carry out such virus and other checks, as you consider appropriate. To the fullest extent allowed by law, no responsibility is accepted by Haematology & Oncology Clinics of Australasia for any virus damage caused by this message.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]