Annual Report Processing

Annual Report Processing

Create RAM based Disk


mount -F tmpfs -o size=500m swap /kcr/tmp99


Use RAM disk for target data dir

Create Target for Frozen Database

  1. create the target directory (/kcr/YY) or use ram disk
  2. copy /kcr/central/kcr.dbd from central to target directory
  3. set DBDPATH, DBFPATH to target directory
  4. initdb -y /targetdir/kcr
  5. run INITKCR to initialize the new database
  6. import support files
  7. set up the master data record
  8. create a login for arYY which will later be used to create
    the annual report study groups
  9. Later use IDA to modify the registry id string in the master
    data record to indicate that it is the frozen database.

Use SBASE to isolate frozen database


Performance for sbase will be enhanced by:

  1. unsetenv all RDM variables except DBUSERID
  2. modify rdm.ini so that all tmp files are on ramdisk
    • dblog=/kcr/tmp2000/log/
    • dbtaf=/kcr/tmp2000/log/
    • qdbpath=/kcr/tmp2000
    • qrfpath=/kcr/tmp2000
  3. cp db_query.dbd /kcr/tmp2000


SBASE is a program that extracts data from one CPDMS database to another using
selection criteria. NOTE: When using a RAM disk, this may only take a few
minutes. The criteria appear on the main menu which currently appears as follows:

***********************Study Database Extraction Utility************************
* *
* *
* Annual Report Year 97 *
* Beginning Date 01/01/1991 *
* Ending Date 12/31/1997 *
* Beginning County 1 *
* Ending County 239 *
* State KY *
* Source Data Dir /kcr/central/kcr *
* Target Data Dir /kcr/97/kcr *
* *
********************************************************************************

Update Populations from SEER

  • Download current file from SEER website.
  • Extract data file into ~ericd/populations/seer/web/ky69XX.txt where XX is the last year
  • run ~ericd/progs/tool to extract populations indo ~ericd/progs/cpdmspops
  • move new ref files to /kcr/age
  • update /kcr/age/popgroup.hdr (below Standard Population Line)

Run ARQ Program to Create Study Groups and Calculate and Output Rates


ARQ is a program that creates study groups from the frozen database. It uses the file arqYY.frm to
specify which study groups to sort. This file specifies the Title, Query string, risk group, and
file name for each annual report group. Please refer to ARQ97.FRM for details.
ARQ source code should be reviewed and recompiled before running.

  • Set DBDPATH and DBFPATH to point to the frozen database directory
  • Create /kcr/arYY directory
  • Run ARQ and login as arYY
  • In ARQ, create study groups (which will appear in /kcr/stat/arYY.???)
  • In ARQ, create output files. Output files are created in /kcr/arYY
  • FTP files *.txt, *_bwa.eps, and *_bwc.eps to KCR shared drive \AnnualReports\YYYY for processing by Candy

Create Graphics files for annual report

  • sftp .txt files to mordor:/httpd/htdocs/ericd/arYY
  • use CPDMS on frozen data to generate seersexstage.txt document and copy
  • update ar.php program
  • User browser to run ar.php
  • copy resulting png files in mordor:/httpd/htdocs/ericd/output to Novell

Capture Web Pages for Annual Report


Capture pages for annual report using Netscape's save as post script feature.


<!--

Prepare Cover Page for Printing


The final step in this process is prepare the color image of the map for printing of the annual report cover. This involves modifying a copy of the county color eps map for all cases. First edit the eps file to remove extraneous text. Then relocate the legend box and text to fit within the left edge of the state map.


Because of problems with color processing using our HSB color specification we were forced to replace the HSB color commands in the EPS file with CMYK color commands. The perl script to perform this task is included. Perl Script. The perl script makes the following substitutions.

green
my $search1 = "0.330 1.0 1.0 sethsbcolor";
my $replace1 = "1.00 0.00 1.00 0.20 setcmykcolor\n";

yellow (10% magenta, 0% looks better on kodak, 15% was chosen for cover, 10% used)
my $search2 = "0.190 1.0 1.0 sethsbcolor";
my $replace2 = "0.00 0.10 1.00 0.00 setcmykcolor\n";

orange
my $search3 = "0.105 1.0 1.0 sethsbcolor";
my $replace3 = "0.00 0.45 1.00 0.00 setcmykcolor\n";

red
my $search4 = "0.000 1.0 1.0 sethsbcolor";
my $replace4 = "0.00 1.00 1.00 0.30 setcmykcolor\n";

black
my $search5 = "1.0 0.0 1.0 sethsbcolor";
my $replace5 = "0.00 0.00 0.00 1.00 setcmykcolor\n";

-->


By Eric Durbin