Hello everyone, I have a problem creating a macro variable made up of values in different length needed. Here I tried to store the list of icd10 code corresponding to a certain value of another variable called ccs10Cat. proc sql noprint;
select distinct quote(compress(icd10Code)) format $7., "CCS10_&ccsValue."
into :icd10list separated by ",",
:ccs10Var
from Ccs.Icd10ccsmapping
where compress(ccs10Cat) in ("&ccsValue.");
quit;
%put &icd10list;
%put &ccs10Var; Ideally, i could save the icd10 codes like 'I8000', 'I8001', .....'I80201', 'I80202'........ 'Z86718', 'Z8672' into the list for a value of the corresponding ccs equal to 118. In general, an icd10 code could be up to 7 characters in length. But here the maximum that i saved is 5. As you can see the value like "I8012" was supposed to be 'I80201'. SYMBOLGEN: Macro variable ICD10LIST resolves to
"I8000","I8001","I8002","I8003","I8010","I8011","I8012","I8013","I8020","I8021","I8022","I8023","I8029","I803","I80
8","I809","I81","I820","I821","I8221","I8222","I8229","I823","I8240","I8241","I8242","I8243","I8244","I8249","I824Y
","I824Z","I8250","I8251","I8252","I8253","I8254","I8259","I825Y","I825Z","I8260","I8261","I8262","I8270","I8271","
I8272","I8281","I8289","I8290","I8291","I82A1","I82A2","I82B1","I82B2","I82C1","I82C2","Z8671","Z8672"
I'm hoping some experts here could help me fix my errors and your inputs will be highly appreciated. Thank you so much!
... View more