05-17-2019
AmitChop7391
Obsidian | Level 7
Member since
11-06-2018
- 14 Posts
- 1 Likes Given
- 0 Solutions
- 2 Likes Received
-
Latest posts by AmitChop7391
Subject Views Posted 562 05-16-2019 01:56 PM 5717 05-16-2019 12:59 PM 5721 05-16-2019 12:49 PM 5746 05-16-2019 12:08 PM 5752 05-16-2019 11:56 AM 5760 05-16-2019 11:45 AM 5763 05-16-2019 11:44 AM 5778 05-16-2019 11:27 AM 10147 11-13-2018 07:08 AM 10148 11-13-2018 07:07 AM -
Activity Feed for AmitChop7391
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 01:56 PM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 12:59 PM
- Got a Like for Re: How to check if a column has same value in first and last observation?. 05-16-2019 12:55 PM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 12:49 PM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 12:08 PM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 11:56 AM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 11:45 AM
- Posted Re: How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 11:44 AM
- Posted How to check if a column has same value in first and last observation? on New SAS User. 05-16-2019 11:27 AM
- Posted Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO on SAS Enterprise Guide. 11-13-2018 07:08 AM
- Posted Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO on SAS Enterprise Guide. 11-13-2018 07:07 AM
- Liked Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO for data_null__. 11-13-2018 07:06 AM
- Posted Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO on SAS Enterprise Guide. 11-06-2018 03:41 AM
- Posted Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO on SAS Enterprise Guide. 11-06-2018 03:34 AM
- Posted Re: Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNO on SAS Enterprise Guide. 11-06-2018 03:12 AM
- Posted Help: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNOSIS_ on SAS Enterprise Guide. 11-06-2018 02:52 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 -
My Liked Posts
Subject Likes Posted 2 05-16-2019 12:49 PM
05-16-2019
01:56 PM
Can I check the same simultaneously for multiple DRUG flags. For example, if I want to check the same for flags DRUG_1, DRUG_2, DRUG_3. If they are having same values in first and last observation for each patient or not.
... View more
05-16-2019
12:59 PM
PT_ID DRUG_NAME DRUG_1 DRUG_2 Date 1 A 1 1/1/2017 1 A 1 5/2/2017 1 B 1 8/2/2017 1 B 1 9/2/2017 1 A 1 12/2/2017 1 A 1 12/31/2017 2 A 1 5/3/2017 2 B 1 6/3/2017 2 A 1 9/3/2017 3 A 1 5/6/2017 3 B 1 7/9/2017 3 B 1 9/9/2017 So, I only want PT_ID 1 and 2 to be reported in my final data set as their DRUG_1 flags have same values in first and last observation. Thanks
... View more
05-16-2019
12:49 PM
2 Likes
PT_ID DRUG_NAME DRUG_1 DRUG_2 Date 1 A 1 1/1/2017 1 A 1 5/2/2017 1 B 1 8/2/2017 1 B 1 9/2/2017 1 A 1 12/2/2017 1 A 1 12/31/2017 2 A 1 5/3/2017 2 B 1 6/3/2017 2 A 1 9/3/2017 3 A 1 5/6/2017 3 B 1 7/9/2017 3 B 1 9/9/2017 So, I only want PT_ID 1 and 2 to be reported in my final data set as their DRUG_1 flags have same values in first and last observation.
... View more
05-16-2019
12:08 PM
Yes, I also have a date field which is in ascending order. First record of each patient has min date and last record has max date.
... View more
05-16-2019
11:56 AM
Yes, we have to perform the analysis for each PT_ID. Some variables are character and some are numeric. DRUG_1 and DRUG_2 are numeric variables and I want only those patients where DRUG_1 or DRUG_2 = 1 for first and last observation. We won't consider missing values. Thanks
... View more
05-16-2019
11:45 AM
To be more clear. I have the following data set PT_ID DRUG_CODE DRUG_1 DRUG_2 1 A 1 1 A 1 1 B 1 1 B 1 1 A 1 1 A 1 Similarly, I have multiple patients data. I want to find out those patients which have same value of flag DRUG_1 or DRUG_2 for their first and last observation. For example, if for PT_ID =1, first observations has DRUG_1=1 and last observation has DRUG_1 =1 then this patient should be reported.
... View more
05-16-2019
11:44 AM
To be more clear. I have the following data set PT_ID DRUG_CODE DRUG_1 DRUG_2 1 A 1 1 A 1 1 B 1 1 B 1 1 A 1 1 A 1 Similarly, I have multiple patients data. I want to find out those patients which have same value of flag DRUG_1 or DRUG_2 for their first and last observation. For example, if for PTID =1, first observations has DRUG_1=1 and last observation has DRUG_1 =1 then this patient should be reported.
... View more
05-16-2019
11:27 AM
Hi, I have a data set which contains the following columns: PTID, NDC, DRUG_CLASS1_FLAG, DRUG_CLASS2_FLAG, DRUG_CLASS3_FLAG, DRUG_CLASS4FLAG. I want to find out if these DRUG_CLASS FLAGS have same value in first and last observation of a data set. For example, in first observation, DRUG_CLASS1_FLAG =1 and in last observation, DRUG_CLASS1_FLAG=1, then I want to find out these type of records Any help would be appreciated. Thanks in advance.
... View more
11-13-2018
07:08 AM
Hey, I need to check those codes in all diagnosis fields i.e Diagnosis_1 - Diagnosis_26. Thanks, Amit
... View more
11-13-2018
07:07 AM
Thanks, I will try this one.
... View more
11-06-2018
03:41 AM
Data AC_1; set abc (keep = HEADER_DIAGNOSIS_1_CODE HEADER_DIAGNOSIS_2_CODE HEADER_DIAGNOSIS_3_CODE HEADER_DIAGNOSIS_4_CODE HEADER_DIAGNOSIS_5_CODE HEADER_DIAGNOSIS_6_CODE HEADER_DIAGNOSIS_7_CODE HEADER_DIAGNOSIS_8_CODE HEADER_DIAGNOSIS_9_CODE HEADER_DIAGNOSIS_10_CODE HEADER_DIAGNOSIS_11_CODE HEADER_DIAGNOSIS_12_CODE HEADER_DIAGNOSIS_13_CODE HEADER_DIAGNOSIS_14_CODE HEADER_DIAGNOSIS_15_CODE HEADER_DIAGNOSIS_16_CODE HEADER_DIAGNOSIS_17_CODE HEADER_DIAGNOSIS_18_CODE HEADER_DIAGNOSIS_19_CODE HEADER_DIAGNOSIS_20_CODE HEADER_DIAGNOSIS_21_CODE HEADER_DIAGNOSIS_22_CODE HEADER_DIAGNOSIS_23_CODE HEADER_DIAGNOSIS_24_CODE HEADER_DIAGNOSIS_25_CODE ); array Diag {*} $ HEADER_DIAGNOSIS_:; RespInd = 0; do i = 1 to dim(Diag); If Diag {i} in ('E850','E851', 'E852','E853','E854','E858','E8589','E859') then RespInd = 1; end; drop i; run;
... View more
11-06-2018
03:34 AM
Thanks, it is working but it is taking too much time as compared to Proc sql when I declared 26 variables there. Thanks!
... View more
11-06-2018
03:12 AM
Now, I got this error: array Diag {26} $ HEADER_DIAGNOSIS_:; ERROR: Too few variables defined for the dimension(s) specified for the array Diag.
... View more
11-06-2018
02:52 AM
Hi, I'm getting the following errors on running my code: ERROR: Alphabetic prefixes for enumerated variables (HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNOSIS_25_CODE) are different. ERROR: Too few variables defined for the dimension(s) specified for the array Diag. /**** Pulling Patients ***/ Data AC_1 (keep = a b c); set abc; array Diag {28} $ HEADER_DIAGNOSIS_1_CODE-HEADER_DIAGNOSIS_25_CODE; RespInd = 0; do i = 1 to dim(Diag); If Diag {i} in ('E850','E851', 'E852','E853','E854','E858','E8589','E859') then RespInd = 1; end; drop i; run; Please help!
... View more