Appendix A: Files included with this documentation
Download all files!
Note that all output data sets have the following sub-portions:
[DIAGNOSIS][PCT]_[FILE IDENTIFIER]
For example: [ami][05]_[indx]
SAS program to define directory macros used to define libraries (directory: ~/
)
|
|
set_up_directory.sas |
File which defines locations of libraries by saving them in macro variables. Allows you to control all directories from single file. |
set_up_directory.do |
File which defines locations of directories used in Stata. Allows control of all directories from single file. |
1A: Flag Candidate Index Events
1B: Impose Denominator Restrictions
|
|
medpar_clm_window.sas |
Extracts the MedPAR claims corresponding to each AMI episode defined in 1B. |
carrier_clm_window.sas |
Extracts the Carrier claims corresponding to each AMI episode defined in 1B. Data set is at the line items level. |
ip_clm_window.sas |
Extracts the Inpatient claims and revenue centers corresponding to each AMI episode defined in 1B. |
op_clm_window.sas |
Extracts the Outpatient claims and revenue centers corresponding to each AMI episode defined in 1B. |
0PreProcess Macros - already generated for NBER users (directory: 0PreProcess
)
|
|
CW_create.sas |
Script formats and copies the crosswalk to a local directory. Creates indexes which are useful in speeding the merges. Provided for reference only |
CreatePopDenominatorFile.sas |
Script formats the enrollment files into a wide format for the population. In addition creates a bene_id to Dartmouth Atlas HRR crosswalk by year. Provided for reference only |
MasterHRRCross.do |
Script formats and copies the Dartmouth Atlas crosswalk and converts them into a Stata and SAS data sets. Program should be run on a server running both sas and Stata since it call a sas script to import the data set to sas. Provided for reference only |
importPOS.sas |
Script imports raw POS files into SAS. Provided for reference only |
FixYearDifferencesBetweenMedpar.sas |
Take the imported SAS scripts and apply a series of edits based on the MedPAR file to ensure that years found in the MedPAR file are also found in the POS file. Also attaches the HRR to the POS info. Provided for reference only. |
Utility Macros (directory: SASmacros
)
|
|
UtilityMacros.sas |
Script containing various small macros used by the Core SAS scripts |
DetermineMax.sas |
Macro which counts the number of files in a given directory, for use to loop through the different file parts |
archiveoldLogfiles.sas |
Macro which generate folder with same name of program found within and copies lst and log files to folder and tags with date and time |
Other macros which 1B_impose_restrictions.sas Calls(directory: SASmacros
)
|
|
Labels.sas |
Script which holds the variable label names |
FlagTransfers.sas |
Macro used to flag different transfer scenarios which are discussed in Section 2 2.7↑ [REMOVED FROM LONG EXTRACT] |
generateEnrollRest.sas |
Used to create flags corresponding to the enrollment decision. |
Decompress Macros (directory: SASmacros
)
Cross-year Conversion Macros (directory: SASmacros
)
Data dictionary files (directory: claim_xw
)
|
|
opxw.txt |
Crosswalk files with variable name changes called by sas programs to create new variables. |
medparxw.txt |
Crosswalk files with variable name changes called by sas programs to create new variables. |
carrierxw.txt |
Crosswalk files with variable name changes called by sas programs to create new variables. |
Create Procedure measures (directory: 2create_index_level_measures/xday_flag_procedures
)
Create comorbidity measure (directory: 2create_index_level_measures /Comorbidity
)
Create cost measure (directory: 2create_index_level_measures/xday_costs_raw
)
Create cost utilization measure (directory: 2create_index_level_measures/costutilization
)
Programs no longer used or upkept (maybe useful to someone)
Basic Tabulations (directory: Auxiliary/StataAnalysis
)
|
|
SumStatXML.do |
Generates a whole host of summary measures, exports to excel (XML) |
CostCarrier_XML.do |
Generates costs by day and exports to excel (XML) file-carrier |
CostInSNF_XML.do |
Generates costs by day and exports to excel(XML) file-MedPAR |
CostOp_XML.do |
Generates costs by day and exports to excel(XML) file-OP |
CostOp_XML.do |
Generates simple tabulations of inpatient/SNF costs and survival rates |
MedicareStateCrosswalk.(dta |
csv) |
SAS-to-Stata Conversion Scripts- XPORT file only (directory: Auxiliary/SAS_XPORT
)
(For use only if Stat/Transfer is not available, not recommended)
Using Stat-transfer
There are two possible ways to transfer the data out of SAS. One possibility is
to use a SAS XPORT file. These files are reliable and work as long as you have
access to SAS and Stata, although they require several steps. First each SAS
script writes the extract it generates to a SAS XPT file, which Stata can read
using the fdause command. However this approach can only handle field names of
eight characters or less. To address this problem, the SAS code shortens field
names before writing them to XPT, and the Stata code returns them to their
original form after reading the XPT file. The Stata scripts MedParXptToDta.do
,
CarXptToDta.do
, and OpXptToDta.do
handle the needed renaming for the MedPAR,
Carrier, and outpatient extracts, respectively. The XPT files are not used as a
default because they require extra step and create redundant files.
The other option is to use Stat-Transfer, which of course requires access to
Stat-Transfer but means that the redundant files and extra steps can be avoided.
However, due to the versions of Stat Transfer available on different servers,
when working with files larger then 3G Stat Transfer only works on the AGE1 and
AGE3 machines. In some cases the code in the SAS files which does this have been
commented out, however it is straightforward to implement from the Unix command
prompt. The Stat/Transfer documentation can be found here.
Stat transfer is currently used as the default, however you should think
about how and where you will be implementing the program before making
your final decision.