Paper AD15 Create Your Customized Case eport Form (CF) Tracking System Tikiri Karunasundera, Medpace Inc., Cincinnati, Ohio Abstract: A case report form (CF) tracking system helps ensure all required CFs are collected. The system may also be useful in determining which monitors or sites are having trouble completing or collecting the CFs in a timely manner. The expected CFs projected for each site by the tracking system may be used to help schedule the frequency and duration of monitor site visits. Some data management systems do not have CF tracking modules or the existing modules do not provide adequate flexibility for all types of trials. A contract research organization (CO) must have a flexible CF tracking system for their varying sponsor and protocol demands. This paper presents an example of a CF tracking system using CF data in SAS datasets. To keep the program simple, it has not been generalized for all situations. How this is done. This is done in 4 easy steps. Step 1: Get the list of actual CFs received. Step 2: Determine subject disposition using data collected in step 1. Step 3: Get the expected list of CFs for each subject using information step 2 and the CF status table. Step 4: Find the projected visit date for each visit using the CF status table and the actual CF data keypunched. The missing/outstanding CFs are found by comparing actual CFs keypunched with the expected. The subject disposition is a factor in determining the expected CFs for each subject. The determination of the subject disposition is done through CF data and the condition table for subject disposition (Table 1, page 1). If the subject disposition is available outside of this program, you could skip step 2 of the process. The example study considered in the paper. The study we have considered has 6 visits. The subjects are randomized at visit three. The screen failed, early terminated or completed subjects are entered through the Study Termination (ST) CF. The study termination visit is labeled visit six for all study termination types. The CF Status Table shows the CFs assigned for each visit/subject disposition combination and the visit date in study days. Step 1: Creating the list of actual CFs received. The actual CFs received should have an entry in at least one database. The datasets can be stacked to form a single dataset (CFDATA) keeping only the variables required to identify the centre, subject visit and visit date and subject disposition. The actual code on page 3 will fully illustrate the idea. The duplicate entries in CFDATA table can be removed by a nodupkey sort. Step 2: Identifying the subject disposition. Examples of a subject disposition are screened, screen failed, randomized, early terminated and completed. The subject disposition is determined by applying the subject disposition conditions to CFDATA data set created on step one. The general form is given by Table 1 below. The screened subjects should have the visit date not missing (visdate >.) on the the vital sign (VS) CF collected at the screening visit. The screen failed subjects should have complete eq 0 and dcreas (reason to discontinue) eq 9 (option 9 = Screen failed) on the termination visit on the study termination (ST) CF. The randomized subject Table 1 Subject Disposition Condition Table Status Visit DB Where Condition Screened 2 VS VISDATE GT. Screen failed 6 ST COMPLETE EQ 0 AND DCEAS eq 9 andomized 3 VS VISDATE GT. EarlyTerminated 6 ST COMPLETE EQ 0 AND DCEAS ne 9 Completed 6 ST COMPLETE EQ 1 should have non-missing visit date on the randomization visit (or randomized = 1). The early terminated subject should have completed =0 (no) on the study termination form (ST) and the visit was entered as visit 6 (termination visit). The completed subjects should have completed=1 (yes) on the study termination form (ST) on the termination visit (visit six). SAS code on page 4 fully illustrates the idea.
Step 3: Creating the list of all expected CFs. The CFs expected of a screen failed subject are not the same as for a randomized, early terminated, ongoing or completed subject. This is resolved by creating a CF status table, which is a table of CFs expected by type of subject disposition (see Table 2, page 2). The table shows which CFs are expected at each visit for each type of subject disposition. The table also shows the schedule of visits in study days. This CF status table is a central part of the program also minimizes the recycling effort of the program. The cartesian product of the subject status with the CF list for each status provides a complete list of CFs expected. The CF status table is entered into an excel worksheet and saved as a tab delimited text file. The changes required for a different study are done on the CF status table instead of the program. The CF status table When the study has six scheduled visits and the subject terminates a study at visit four, the subject should have the CFs keypunched up to visit four. A similar case applies when the subject terminates at visit five. The same is true if the subject is still ongoing. A subject who is either ongoing or early terminated would have an expected CF list that depends on the actual last visit. The ongoing and early terminated subjects will have some CF status as depends on the CF status table. The randomized subjects should have all the CFs in the database on visits leading to the randomization visit. The CFs up to the randomization visit are marked as required (see the worksheet for details) for randomized subjects. All CFs corresponding to visits after the randomization visit will have the status Depends because the actual last visit is unknown. *The DB column shows one data set per form. Some forms may contain data for more than one data set. The data set that contains variables for deciding the subject status or study visit date must be included in the DB column. D = Depends, = equired, N = NO (should not be keypunched), O = Optional. The Optional CFs are not counted as missing. Table 2 CF Status Table Screen DB* Visit PAGE Seq Days Screened Failed The CFs with page PG 6 19 21 60 N D numbers 1 to 8 are ED 6 20 22 60 N D required for all subjects regardless of the study ST 6 22 24 60 N D status. The subjects who are early terminated (should also AE CM SU SU 23 24 25 26 O O O O be randomized) must have the CFs up to the third visit. The CFs expected after randomization depends on the subject s last visit, these are denoted by D (= Depends) in Table 2 above. Step 4: The predicted visit date The visit date for each visit can be predicted using the screening visit date. The column days shows the study day for each visit. The predicted visit date is useful in indicating outstanding CFs, possible lost-to-follow up subjects and missing visits. SAS code on page 5 illustrates the idea. The Final Product of the program The final table with CF information is created by merging all information about CFs and subjects into one table. The final table includes data such as center, subject id, CF id, visit, projected visit date, actual visit date, expected CF status, is CF keypunched, last visit date and last visit. Many reports can be generated using this information. and Early Term DM 1 1 1 0 MH 1 2 2 0 CM 1 3 3 0 VS 1 4 4 0 VS 2 6 6 14 PG 2 7 7 14 ED 2 8 8 14 VS 3 10 10 28 N N D 3 11 12 28 N N ED 3 12 13 28 N N VS 4 14 15 42 N N D D VS 5 16 17 56 N N D D VS 6 18 19 60 N D Completed
Actual Code: Step 1: Collect all data about the actual CFs received. %let path=y:\analysis\testing\pharmasug; libname study "&path\data"; %macro colldata; proc contents data=study._all_ out=cont; proc sort data=cont nodupkey; by memname; data _null_; set cont; call symput( dset compress(_n_),trim(memname)); call symput('num',compress(_n_)); proc format ; value formid %do i=1 %to # &i="&&dset&i" %end; ; data crfdata; length formid $8.; set %do i=1 %to # study.&&dset&i(in=in&i ) %end;; in=in1 %do i=2 %to # +in&i*&i %end;; formid=put(in,formid.); keep formid visit visdate center subj in complete lastdate week dcreas; format visdate date9.; * The variables complete and dcreas are used in determining the subject disposition; %mend; %colldata; /* A macro is used because the %do %end block does not work in open code. */ proc sort data=crfdata nodupkey; by center subj visit formid; Step 2: Get the status of each subject. /* Get the subject disposition conditions into a SAS data set */ Data statusdata; Infile cards firstobs=2 missover dlm=':'; informat where $varying40. status $varying20.; Input ordernum $ status $ visit CF $ where $ ; cvisit=put(visit,1.); Cards; N:Status :Week :DB :Where condition 1:Screened :2 :VS :VISDATE GT. 2:Screenfail :6 :ST :COMPLETE EQ 0 AND DCEAS eq 9 3:andomized :3 :VS :VISDATE GT. 4:EarlyTerminated :6 :ST :COMPLETE EQ 0 AND DCEAS ne 9 5:Completed :6 :ST :COMPLETE EQ 1
; data _null_; set statusdata; call symput('ordnum' left(_n_),compress(ordernum)); call symput('status' left(_n_),trim(status)); call symput('stnum',compress(_n_)); %macro st; proc format ; value status %do i=1 %to &stnum; &&ordnum&i= "&&status&i" %end; ; %mend; %st; proc sql; select distinct 'if ' trim(where) ' and ' 'visit eq ' trim(cvisit) then status= trim(ordernum) into: mstatus separated by ';' from statusdata; quit; /* The status database has only a few rows the macro 'mstatus' will not be very long */ data status; set crfdata; &mstatus; if status ne ' ' then output; proc sort data=status; by center subj status; data status; set status; by center subj status; if last.subj=1 then output; Step 3. Get the Cartesian product between the subjects and crf status. filename paramet "&path\parameters.txt" ; data parameters; infile paramet dsd dlm='09'x firstobs=2; input study $ formid $ visit page seq $ days @; do i= 1 to 5; subjectstatus =i; input crfstatus $ @; output; end; proc sql; create table expcrfs as select a.center, a.subj, a.status, b.formid, b.visit, b.crfstatus from status as a, parameters as b where a.status=b.subjectstatus order by center, subj, formid, visit; quit; proc sort data=crfdata out=actcrfs nodupkey; by center subj formid visit;
/**** get the final data set *****/ data final; merge expcrfs(in=a) actcrfs(in=b); by center subj formid visit; available=a+2*b; if upcase(crfstatus) in ('','D') then output; Step 4: Find the projected visit date for each visit. The parameters table is used to create the informat days. This informat is used to generate the predicted visit date from a base visit. Proc sort data=parameters out= days(keep=visit days) nodupkey; by visit days; where days ne.; data _null_; set days; call symput('visit' left(_n_),trim(visit)); call symput('days' left(_n_),compress(days)); call symput('numv',compress(_n_)); %macro days; proc format ; invalue days %do i=1 %to &numv; &&visit&i= &&days&i %end; ; %mend; %days; proc sql; select min(visit) into:stvisit from days; select max(visit) into:endvisit from days; quit; proc sort data=crfdata(where=(visdate >.)) out=projected(keep=visit visdate center subj); where visit=&stvisit ; data projected; set projected; do visit =&stvisit to &endvisit; projdate=input(visit,days.)+visdate; output; end; format visdate projdate date9.; /**** addd the projected visit date to final table *****/ proc sort data=final; by center subj visit; proc sort data=projected; by center subj visit; data final; merge projected(in=b) final(in=a ) ; by center subj visit; in =a+2*b; if a=1 then output;
/* get the terminated visit date */ proc sort data=actcrfs out=lastdate(keep=center subj lastdate) nodupkey; where lastdate ne. ; data final ; merge lastdate(in=a) final(in=b drop=lastdate); if b=1 then output final; format lastdate date9.; /* get the actual visits */ proc sort data=actcrfs out=visits(keep=center subj visit visdate) nodupkey; by center subj visit; where visdate ne.; proc sort data=final; by center subj visit; data final; merge visits(in=a rename=(visdate=actdate)) final(in=b); by center subj visit; if b=1 then output final; Example reports that can be generated by the system. data missingcrfs; set final(where=(available=1)); if crfstatus="" then output; if crfstatus='d' and projdate<=input("&sysdate",date7.) then output; data missingcrfs; set missingcrfs; outdays=input("&sysdate",date9.) - projdate; proc freq data=missingcrfs; table center*status/out=miss; where crfstatus = ""; proc freq data=missingcrfs; table center*status/out=outstand; where crfstatus = "D" and outdays > 30; data misout; merge miss(in=a rename=(count=mcount)) outstand(in=b); by center status; ods output close; ods html file="&path\missingcf1.xls";
options orientation=landscape; Title 'Number of Missing/Outstanding CFs by Center'; proc report data=misout nowindows split='*'; columns center status,( mcount count); define center/'center' group; define status/across format=status. order=internal; define mcount/'m*'; define count/'o**'; compute after/style={just=left}; line '* Number of Missing CFs. The visit has occured, the CF mut be in'; line '** Number of Outstanding CFs. The scheduled visit was 30 days past'; endcomp; ods html close; The partial output Number of Missing/Outstanding CFs by Center status Screened Screenfail andomized EarlyTerminated Completed Center M O M O M O M O M O 1 2 34 1... 1 2.. 2 5 28 2. 2 9 10 8 6. proc format; value $ miss 'D'="Outstanding" ''='Missing'; ods html file="&path\missingcrf2.xls"; title "Data on Missing or Possibly Outstanding( > 30 days) CFs"; proc report data=missingcrfs nowindows; column center subj visit projdate formid Status lastdate crfstatus; define center/display; define subj/ 'Subject' display; define visit/'visit' display; define projdate/'projected Date' format=date9.; define formid/'form Id' display; define status/'subject Status' format=status.; define lastdate/"last Date"; define crfstatus/'cf Status' format =$miss.; where outdays >30; ods html close; The partial output Data on Missing or Possibly Outstanding( > 30 days) CFs CENTE Subject Visit Projected Date Form Id Subject Status Last Date CF Status 1 6 5 12-Oct-04 CO EarlyTerminated 28-Sep-04 Outstanding 1 7 3 18-Nov-04 CO Screened. Outstanding 2 3 3 14-Sep-04 CO EarlyTerminated 26-Aug-04 Missing 2 3 4 28-Sep-04 CO EarlyTerminated 26-Aug-04 Outstanding 2 12 4 20-Dec-04 CO andomized. Outstanding
title1 Number of Subjcets in Each Status Category by Center ; proc sql; create table patients as select distinct center,subj,status from final; quit; ods html file="&path\status.xls"; proc report data=patients nowindows split='*'; column center status,subj; define center /group; define status/across format=status. order=internal; define subj/"*subjects" n; ods html close; The partial output Number of Subjects By Disposition and Center status CENTE Screened Screenfail andomized EarlyTerminated Completed 1 3 1. 1 1 2 4 2 1 2 3 3. 4 2 1. title CFs Keypunched By Center ; proc freq data=final; table center*available/out=keypunch; proc format ; value avail 1='Not Yet' 3='Done'; ods html file="&path\keypunch.xls"; proc report data=keypunch nowindows split='*'; column center available,count; define center /group; define available/'cfs Keypunched' across format=avail. order=internal; define count/" " ; ods html close; The partial output Number of CFs keypunched by Center CFs Keypunched CENTE Not Yet Done 1 45 85 2 94 168 3 26 106 4 4 116
Extensions The data entry system has a database that follows the CDISC Operational Data Model (ODM). How does all this apply? The CF tracking is easier in CDISC ODM compliant databases. The CF status table and subject disposition condition table are not standard tables in the ODM. But a version of these tables can be implemented without violating the standards. You can follow the step one through four mentioned on page one, but the code would be different. Shown below are example reports from such an implementation. These reports does not require the CF status table. Subject CFs by Page for Study ABC CF PAGE THOUGH DATA ENTY Primary Investigator Subject status 1 2 3 4 5 6 7 8 10 11 12 15 PD TOTAL Investigator 1 001, 001, A-B andomized 1 1 1 1 1 1 1 1. 1 1.. 10 Investigator 1 001, 002, PMB Screen Failure........... 1 1 2 Investigator 2 008, 004, JC andomized 1 1 1 1 1........ 5 Investigator 2 008, 005, LD andomized 1 1 1 1 1........ 5 Investigator 2 008, 006, JED Screen Failure........... 1 1 2 Centerid CONCLUSION Primary Investigator Name Subject Status eport for Study ABC Subject Disposition Early Terminated andomized Screen Failure CFs Subjects CFs Subjects CFs Subjects Total 10 1 151 22 213 106 1 Investigator 1.. 28 3 8 4 2 Investigator 2.... 6 3 Data from other sources There may be other sources to find the subject disposition, such as an IVS database. The subject disposition conditions are applied to CF data to determine the subject disposition. The CF data itself may be incomplete, resulting inaccurate subject disposition information. For example, if the early termination CF is missing, the subject will not be classified as Early Terminated. However this approach is the easiest and generates reasonable results. There is always a lag between the actual visit and the CF being keypunched. The machine generated lab data has much less lag. Use of the lab data can make the CF tracking system more efficient. ACKNOWLEDGMENTS The author wishes to thank Mike Brown, Senior Data manager at Medpace Inc for his support in developing the CF tracking system discussed above and in editing this paper. CONTACT INFOMATION Your comments and questions are valued and encouraged. Contact the author at: Tikiri Karunasundera Medpace, Inc. 4620 Wesley Avenue Cincinnati, Ohio 45212 Work Phone: (513) 579-9911 #2250 Email: t.karunasundera@medpace.com