DF_QCfax

DF_QCfax — Fax or email Query Reports

Synopsis

DF_QCfax {study} [-t] [-f #] [-F replyto] [ [-p password] | [-P] ] [-r #] [-d #] [-q #] [-A4] [-font FontName] [-label SignatureLineLabel] [-h hostname] [-w hh:mm] [ [-u report(s)] | [-s report(s)] | [-i name] | [-b yymmdd] | [-a ] ]

Description

DF_QCfax converts Query Reports into PDF documents, includes DFdiscover bar coding, and transmits them to the clinical sites and/or other destinations by fax or email.

Often, DF_QCfax will be run shortly after creating a new batch of Query Reports, to send them to the clinical sites. When this is the case, it is not necessary to specify the reports to be sent. The default is to send all reports listed in file reports/QC/QC_NEW, which is re-created each time DF_QCreports is used to create a new batch of external Query Reports. If some of the reports listed in this file have already been transmitted by a previous run of DF_QCfax they will be skipped, and not sent out again.

When not sending a batch of newly created external Query Reports, the reports to be transmitted must be specified explicitly using one of 5 options, only one of which can be used at a time. The -s and -u options are used to identified previously sent and unsent external Query Reports respectively, and the -i option is used to identify internal Query Reports, whether previously sent or not. Each of these 3 options must be followed by a space delimited list of the report names to be transmitted.

The 4th option, -b, is used to re-transmit the backlog of transmission failures (if any) from a previous run of DF_QCfax for a set of external Query Reports created on a particular date. The -b option is followed by a single report date in yymmdd format. This identifies the creation date of the set of Query Reports to be re-tried if they have not yet been successfully transmitted. (Note: This is the date included in the Query Report name. It is the report creation date and may be different from the date on which the Query Reports were transmitted by DF_QCfax). This is the option to use to ensure that Query Reports are re-transmitted to all of the destinations listed for each clinical site in the sites database. While re-running DF_QCfax with no options will keep trying to send any Query Reports listed in file reports/QC/QC_NEW which have not been delivered, it only does this for the primary destination for each external Query Report. The -b option will do it for the secondary destinations as well.

The 5th and final option, -a, is used to transmit all unsent reports, residing in the QC directory. Use this option carefully. Each time DF_QCreports is run, Query Reports are created in the study QC directory. If any of these reports are not transmitted using DF_QCfax, or marked as sent using DF_QCsent, they remain in this directory. Subsequently running DF_QCfax with the -a option will fax all of the Query Reports found in the QC directory. This could result in sending old Query Reports that are no longer relevant. In many cases the -b option will be a better choice.

[Warning]Use of -b

The backlog option relies on finding a record of all previous transmission attempts in file , a journal of Query Report transmissions maintained by DF_QCfax. Thus changes to the sites database to modify or add destinations for any of the clinical sites, will not be used by the backlog option. Only destinations registered in are considered for re-transmission. Changes to the destinations listed in the sites database only become effective for Query Reports sent by DF_QCfax after the changes were made.

DF_QCfax needs to know whether any given transmission is bound for a primary or secondary destination. Thus when the backlog option is used it looks for at least one entry in with the PRIMARY keyword, and will not attempt to re-send any of the FAILED Query Reports unless this keyword is found.

When sending external Query Reports to the clinical sites, it is not necessary to specify the destination fax number or email address for each site. By default, DF_QCfax will send the external Query Report created for each clinical site to all of the fax or email destinations listed in the Primary Fax field of the sites database for that site. This field can contain one or more fax numbers and/or email addresses. The first fax number or email address in the field is considered the primary destination for the clinical site and all others are secondary destinations. However, it is also possible to override the destination(s) specified in the sites database by using the -f option followed by a space delimited list of fax numbers and/or email addresses. With this option, each of the specified reports is sent to all of the specified destinations. Since there is no site ID automatically associated with internal Query Reports, the -f option must be used to specify at least one destination fax number and/or email address, when sending internal reports.

When sending an external Query Report to multiple destinations, the first fax number or email address in the list of destinations is considered the primary destination for that site, and all others are considered secondary destinations. This is true whether the destination list is specified explicitly using the -f option, or is obtained from the Primary Fax field of the sites database. On successful transmission of an external Query Report to a primary destination DF_QCfax runs DF_QCsent which marks all of the queries in the report sent, and moves the report to the QC/sent directory. This does not happen on successful transmission to secondary destinations. Reports which could not be transmitted to their primary destination remain in the QC directory, and their queries retain their old status of in report.

If a transmission is successful the report name, date, time and fax number is registered in with the keyword FAXED, and if it failed it is registered with the keyword FAILED. The keyword PRIMARY identifies those transmissions bound for the primary destination for a clinical site.

[Warning]Emailing Query Reports

Due to the limitations of email technology, it is not always possible to accurately determine the final status of emailed reports, and thus they are always considered to have been successful, and are registered in with the keyword FAXED. Since emailed Query Reports are always considered successful, DF_QCsent will always execute if the primary destination has an email address, and thus it is possible that query status may be changed to sent and the Query Report moved to the sent directory even though the Query Report was not delivered.

It is recommended that a fax number be used as the primary destination for a site whenever one is available, and email address(s) (and additional fax numbers) be used as secondary destinations. Use an email address as the primary destination when it is the only method available.

[Warning]

Since both DF_QCfaxlog and the -b option rely on the existence of information in , it is critical that this file not be deleted or modified in any way. Using DF_QCfaxlog to check the transmission status of Query Reports is the safe way to review the records in .

If transmission is by email, DFdiscover converts the Query Report to PDF format (if it is not already in that format) and then sends it as a MIME attachment to the specified email address. This PDF attachment can optionally be password protected and encrypted using the -p password to specify a password, or the -P option to use the user's default password.

When emailing an external Query Report the email return address is taken from the REPLY TO field of the sites database. The -F option can be used to override this value or to add a return address when emailing an internal Query Report. If a return address is not supplied in either of these ways the email will be identified as coming from user datafax and any reply sent to this address will be delivered to the DFdiscover problem mail recipient.

In Query Reports sent via email, the subject line of the email has the following format: Query Report for studyname: site site #, year/month/day where studyname is determined from /opt/dfdiscover/lib/DFstudies.db. If studyname cannot be determined, the subject line of the email has the following format: Query Report for study #: site site #, year/month/day

By default reports are sent immediately. The -w option can be used to delay transmission to a specified time. This option accepts the following values:

  • hh:mm: the next occurrence of a specified time (using a 24 hr clock)
  • now: transmit immediately (default)
  • midnight: transmit at midnight tonight
  • noon: transmit at noon

The complete list of values which are legal for this option matches those available for DFsendfax and can be found in Programmer Guide, Delayed Sending.

[Important]Sending documents manually

If for some reason you decide not to distribute Query Reports using DF_QCfax, but instead to send them to the clinical sites some other way, remember to run DF_QCsent to register these documents as having been sent. Otherwise and the queries will not be updated. As a result, DF_QCfaxlog could not be used to track report transmissions, the -b backlog option could not be used, the -o of DF_QCreports would not operate as intended, and the true status of queries would not be accurately reflected in DFexplore or DFexport.rpc.

Options

-f #

Use the specified destination fax number or email address for all reports. Fax numbers must be specified as you would dial them from your fax machine (including long distance and/or area codes where necessary). Email addresses must be specified in the format mailto:email_address, where mailto: is fixed and required, and email_address is a valid email address.

-F replyto

Use the specified return email address for all reports. The email return address must be a fully qualified, valid email address. Do not include the mailto: prefix used with the -f option. No prefix is required or allowed.

-p password

Encrypt the file to be emailed using the supplied password.

-P

Encrypt the file to be emailed using the password specified in the password file ~/.dfpdfpasswd.

-r #

Specify the number of retries for each document to send. The total number of attempts is this number of retries plus 1. The default number of retries is 2.

-d #

Specify the number of minutes to wait before retrying a failed attempt. The default delay wait is 10 minutes.

-q #

Specify the outgoing document queue number to be used for sending. The default is to add all documents to the same queue.

-A4

Format the output for A4-sized paper. The default is to format for US letter-sized paper.

-font FontName

Use the specified font, or the default "Courier New" if the specified font is not found on the DFdiscover server.

-label SignatureLineLabel

Send Query Reports with a customized label for the investigator signature line at the top of each page. Label text must be enclosed in double quotes. Empty double quotes allow the signature line to be omitted from all pages of the report. The default signature line label is "Study Coordinator Sign and Date".

-h hostname

Specify the outgoing HylaFAX fax server hostname. The default is the HylaFAX fax server on the DFdiscover master machine.

-w hh:mm

Delay transmission until the specified time (hour and minute)

-a

Fax all unsent Query Reports found in the study QC directory. See the warning before using this option.

-u report(s)

Fax the specified unsent report(s) (from the QC directory)

-s report(s)

Fax the specified previously sent report(s) (from the QC/sent directory). This option is used to resend one or more external Query Reports, which have already been registered as successfully sent to the clinical site(s).

-i name

Fax the named internal report(s) (from the QC/internal directory). This option requires the name(s) of one or more internal Query Reports (from the study QC/internal directory) and a destination fax number specified with -f.

-b yymmdd

Re-send a Query Report to all destinations to which it has so far failed on all attempts. yymmdd represents the date on which the report was created (the second part of the Query Report name). Only one date may be specified on each run of DF_QCfax with the -b option.

-t

Test mode. Echo what would be done without actually doing it. Use this argument to check that everything is set up properly, and that the desired documents have been correctly identified for transmission. The execution commands from DF_QCfax are displayed as the output, but they are not executed. Each Query Report is identified as to where it would have been sent but not when.

Examples

Example 2.42. Send two unsent Query Reports, created for sites 120 and 122 on Aug 15/04

-u 120-040815 122-040815

Example 2.43. Fax an internal report named test to 555-1212 from dan at 2am

-w 02:00 -f 555-1212 -i test -F dan@hotmail.com

Example 2.44. Send an unsent Query Report created for site 123 on June 3/04, retrying once, if necessary, after a delay of 30 minutes

-r 1 -d 30 -u 123-040603

Example 2.45. Email a previously sent external Query Report created for site 150 on June 25/04 to dan@hotmail.com.

-s 150-040625 -f mailto:dan@hotmail.com

Example 2.46. Re-send all failed Query Reports created on October 3, 2017.

-b 041003

Example 2.47. Email the unsent external Query Report created for site 123 on August 8, 2010 to dan@hotmail.com with a customized signature line

-u 123-100808 -f mailto:dan@hotmail.com -label "Please review and sign"

See Also

DF_QCfaxlog
DF_QCsent
DF_QCreports