Hello,
I am working with Medicaid claims data. I want to restrict data from claims records to include only family planning claims, and then merge that data with records in a cohort I created. For the most part, I have been writing my own codes to create annual cohorts and restrict eligibility by certain criteria. However, selection of family planning claims records is based on diagnostic, procedural, and drug codes. There are numerous codes that qualify, all of which I am unfamiliar with. Fortunately, a federal agency has provided SAS code to create macros for applicable selection codes. Here is my problem.
The published code is advanced beyond my programing skills and includes a step where it downloads SAS datasets from a government website, creates a file in a specified location, and converts the downloaded SAS datasets to temporary datasets.
#1 - For HIPAA compliance, my institution requires that I maintain data on a secure network which blocks internet access while I use it.
#2 - The hyperlink provided in the code is no longer valid.
To overcome these obstacles, I manually downloaded the datasets from the new hyperlink and saved the permanent datasets which contain the appropriate family planning codes on the server I am working off of. I believe I have deciphered the code enough so that, if I convert the downloaded datasets to temporary datasets in my work library, the rest of the code will run.
My question is this. There are numerous datasets in the downloaded file. They have a common naming convention, lookup_'type'_'year' (ex. lookup_diaphram_2013). Is there an efficient way to convert all datasets contained in my download file to temporary SAS datasets, maintaining their original naming convention?
Thanks,
Ted
Take a loop at PROC COPY. The program will be very short, along the lines of:
libname perm "path to your folder with permanent data";
proc copy in=perm out=work;
You might need to add another statement such as "select all" but the documentation for PROC COPY will guide you.
Take a loop at PROC COPY. The program will be very short, along the lines of:
libname perm "path to your folder with permanent data";
proc copy in=perm out=work;
You might need to add another statement such as "select all" but the documentation for PROC COPY will guide you.
Hi Astounding,
Wow. Thank you. That worked perfectly. I was unaware of that procedure!
Sincerely,
Ted
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.