#!/bin/bash #
# Script : crprottmpl # Version : 1.6 # Author : Roland Rashleigh-Berry # Date : 25-Jun-2007 # Purpose : Production script to create file "protocol.template" in the study # programs directory. # SubScripts : getfields # Notes : none # Usage : crprottmpl #=============================================================================== # PARAMETERS: #-pos- -------------------------------description------------------------------- # N/A Do not supply any parameters #=============================================================================== # AMENDMENT HISTORY: # init --date-- mod-id ----------------------description------------------------ # rrb 22Feb07 Uses fields 7, 8 and 9 plus new defaults # rrb 25Feb07 Fields 5 and 6 used as well # rrb 02Mar07 Reference to "der." removed # rrb 04Mar07 "getfields" script used # rrb 07Mar07 "pagexofy" line added for "Page x of Y" label style # rrb 25Jun07 "pagemac" line added for "Page x of Y" label macro #=============================================================================== # This is public domain software. No guarantee as to suitability or accuracy is # given or implied. User uses this code entirely at their own risk. #=============================================================================== # No parameters allowed if [ $# -gt 0 ] ; then echo "Error: (crprottmpl) Do not supply any parameters" 1>&2 exit 1 fi # strip out information returned by the "getfields" script client=$(getfields | cut -d/ -f1) office=$(getfields | cut -d/ -f2) drug=$(getfields | cut -d/ -f3) study=$(getfields | cut -d/ -f4) inc=$(getfields | cut -d/ -f5) # format today's date in DD-Mon-YYYY form date=$(date '+%d-%b-%Y') cat > protocol.template << -----FINISH----- #=========================================================================================================================================== # Template for Make a copy of this in the programs directory and call it "protocol.txt". # protocol.txt This file contains the list of protocol details that will be written to protocol dataset. # # # This member was generated by the script "crprottmpl" for: # # CLIENT: $client # OFFICE: $office # DRUG: $drug # STUDY: $study # INC: $inc # # DATE: $date # #===================== THE LINES BELOW THAT START WITH A # ARE A GUIDE TO TELL YOU HOW TO FILL IN THE INFORMATION ========================== # # drugname: FKXYZ (XXXXX) (this information will appear in the headers) # # protocol: Protocol No. XY-XXX-YY-ZZ (this information will appear in the headers) # # report: Report No. XYZZ-XXX-YY, Draft version, (this information will appear in the headers) # # titlestyle: xy Set this to the prefix of the client titles macro # # dflayout: p10 Default layout to use when no layout is specified in the titles member. This must be one of the allowed # layouts as listed in "titles.template". # # dfllayout: l10 Default landscape layout when only "l" is specified as the layout in the titles member. # # dfplayout: p10 Default portrait layout when only "p" is specified as the layout in the titles member. # # dfltlayout: lt10 Default landscape tight (i.e. lines are closer together) layout when only "lt" is specified as the layout in the titles member. # # dfptlayout: pt10 Default portrait tight (i.e. lines are closer together) layout when only "pt" is specified as the layout in the titles member. # # paper: A4 Must be either "A4" or "Letter" # # margin: 1.0 All-round page margin in inches # # lmargin: Left margin in inches if different from all-round margin value assigned to margin: (left in sense of portrait orientation). # Leave this blank if there is the same all-round margin. # # rmargin: Right margin in inches if different from all-round margin value assigned to margin: (right in sense of portrait orientation). # Leave this blank if there is the same all-round margin. # # tmargin: Top margin in inches if different from all-round margin value assigned to margin: (top in sense of portrait orientation). # Leave this blank if there is the same all-round margin. # # bmargin: Bottom margin in inches if different from all-round margin value assigned to margin: (bottom in sense of portrait orientation). # Leave this blank if there is the same all-round margin. # # clean: clean in (0,1) Selection criteria for selecting clean/unclean patients from the acct dataset. # # pagexofy: Page x of Y Style of the "Page x of Y" label to use (no quotes) # # pagemac: pagexofy Macro to use to add "Page x of Y" labels to output # # pop1: FAS First set of analysis set abbreviation and its label. What the programmer puts in their .titles file # poplabel1: Full Analysis Set for the analysis set will be checked against the list you put in this member. # # pop2: Second set of analysis set abbreviation and its label. # poplabel2: There are a maximum of 9 sets allowed. # #============================================================================================================================================ drugname: XYZ (XXXXX) protocol: Protocol No. XY-XXX-YY-ZZ report: Report No. XYZZ-XXX-YY, Draft version, titlestyle: xy dflayout: p10 dfllayout: l10 dfplayout: p10 dfltlayout: lt10 dfptlayout: pt10 paper: A4 margin: 1.0 lmargin: rmargin: tmargin: bmargin: clean: pagexofy: Page x of Y pagemac: pagexofy pop1: FAS poplabel1: Full Analysis Set pop2: PPS poplabel2: Per-Protocol Set pop3: ITT poplabel3: Intent-to-Treat pop4: SAF poplabel4: Safety population pop5: poplabel5: pop6: poplabel6: pop7: poplabel7: pop8: poplabel8: pop9: poplabel9: -----FINISH-----