First of all, show us example data so we have something to work with. Use a data step with datalines so we can easily create the dataset with copy/paste and submit.
Next, define what you mean by "supplementary". What should the new dataset contain in terms of structure (columns) and data? Supply rules for filling columns, if such are given.
Please take more time to read and understand our answers. You have
Below what providing sample data as a SAS data step means. This is work you should be doing for us so we can spend the time for solving the problem you need help with.
data have;
infile datalines truncover dlm=' ,' dsd;
input Sub Visit $ HR PR QRS QT Find $20.;
datalines;
101 Scr 73 154 110 428 Abnormal, not clsg
101 EOT 63 166 130 430 Abnormal, not clsg
101 FU 70 164 142 410 Abnormal, not clsg
102 Scr 70 150 86 428. normal
102 EOT 69 160 86 482 normal
102 FU 62 158 93 362 normal
103 Scr. 73. 154. 110. 428 Abnormal, not clsg
;
proc print;
run;
"The Variable 'Find' should be in the SUPPEG, because that variable not fit to the EG main domain."
I have no idea what that means. Can you please try and explain to us what you have and what you need in a different way.
Ideally just show us how the desired state should look like if using the sample Have data as source.
After Googling a bit it appears that's Clinical Trials, CDISC stuff.
SAS gets used in many different industries and for many different purposes. Don't assume everybody just knows what SUPPEG means. You need to provide such background in your questions. You ideally also abstract the technical problem you need to solve to a level where also people without the specific industry background can provide an answer.
@sasuser123123 wrote:
Sir, I hope you know structure of the SUPPEG data set
It contains the variables
Studyid,rdomain,usubjid,idvar,idvarval,qnam,qlabel,qval,qorig and qeval
No, I don't, because I am not a clinical SAS programmer. I needed to consult google to find out what you're talking about.
I will move your question to the Clinical Development community.
usually supplementary data for EG domain contains BEAT number or Repetition number for that particular ECG test. It is not necessary that every EG domains will contain supplementary information. Hence can you please elaborate as to what information do you need to populate in SUPPEG? Also if you have already created EG domain, can you please share that as well?
Especially with the "EG" acronym, which usually means Enterprise Guide around here 😉
data have;
infile datalines truncover dlm=' ,' dsd;
input Sub Visit $ HR PR QRS QT Find $20.;
datalines;
101 Scr 73 154 110 428 Abnormal, not clsg
101 EOT 63 166 130 430 Abnormal, not clsg
101 FU 70 164 142 410 Abnormal, not clsg
102 Scr 70 150 86 428. normal
102 EOT 69 160 86 482 normal
102 FU 62 158 93 362 normal
103 Scr. 73. 154. 110. 428 Abnormal, not clsg
;
proc print;
run;
/*1. get egseq by key variables*/
data EG;
set HAVE;
by SUB ;
EGSEQ+1;
if first.SUB then EGSEQ=1;
DOMAIN='EG';
run;
/*2. transpose data*/
proc transpose data=eg out=suppeg1(where=(col1^=''));
by SUB egSEQ DOMAIN;
var Find;
quit;
data suppeg2;
length QVAL $200 QLABEL $40 QNAM $8 ;
set suppEG1( rename=(DOMAIN=RDOMAIN) );
IDVAR="EGSEQ";
IDVARVAL=strip(put(EGSEQ,best.));
if upcase(_NAME_)="FIND" then do;
QNAM="FIND";
QLABEL="FIND";
end;
QVAL=COL1;
QORIG="CRF";
run;
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.