**************************************************************************************************** * PROGRAM OVERVIEW **************************************************************************************************** * * PROGRAM: createlookupfiles.sas * * Created (mm/dd/yyyy): 02/11/2019 * Last modified: 07/23/2019 * Version: 1.2 * *-------------------------------------------------------------------------------------------------- * PURPOSE: Call macros to compute drugclass * Include type 5 levelIDs file generating code * Copy other files from inputfiles to msoc * * Program inputs: * - * * Program outputs: * - drugclass.sas7bdat * - labscodesmap.sas7bdat * - zipfile.sas7bdat * - modpregdur.sas7bdat * - comorbcodes.sas7bdat * - icd10icd9map.sas7bdat * - icd10_child_parent_Date.sas7bdat * - icd9_child_parent_Date.sas7bdat * - mlccs_child_parent.sas7bdat * * PARAMETERS: * Programming Notes: * * *-------------------------------------------------------------------------------------------------- * CONTACT INFO: * Sentinel Coordinating Center * info@sentinelsystem.org * *-------------------------------------------------------------------------------------------------- * CHANGE LOG: * * Version Date Initials Comment (reference external documentation when available) * ------- -------- -------- --------------------------------------------------------------- * 1.1 06/30/19 AP - Added tree extraction lookup tables (icd10icd9map, mlccs_child_parent) * - Added code to move sentinel_logo.jpg from inputfiles to msoc * 1.2 07/23/19 LM - Added capability to make drugclass file creation optional * ***************************************************************************************************; %macro createlookupfiles(); %put =====> MACRO CALLED: createlookupfiles v1.2; /*Today's date*/ %put &sysdate.; /*Print log to MSOC folder*/ proc printto log="&msoc.\qrp_lookupfiles_&sysdate..log" new; run; /*Clean work*/ proc datasets lib=work kill memtype=DATA nolist nowarn; quit; /*** Drug Class File ***/ %if %upcase(&CREATEDRUGFILE) eq Y %then %do; %drugclass_lookup(); %end; /*** Labs Codes Mapping File ***/ data msoc.labscodesmap_&sysdate.; set infolder.labscodesmap; run; /*** Zip code lookup file ***/ data msoc.zipfile_&sysdate.; set infolder.zipfile; run; /*** Pregnancy duration file***/ data msoc.modpregdur_&sysdate.; set infolder.modpregdur; run; /*** Comorbidity score codes ***/ data msoc.comorbcodes_&sysdate.; set infolder.comorbcodes; run; /*** Sentinel Logo ***/ /*** Already saved to MSOC ***/ /*** ICD10-09 Mapping file ***/ data msoc.icd10icd9map_&sysdate.; set infolder.icd10icd9map; run; /*** ICD10Tree file ***/ %if %upcase(&CreateICD10TreeFile) eq Y %then %do; libname ICD10 "&ICD10Path" access=readonly; %icd10tree_lookup(); %end; /*** MLCCS child-parent map ***/ data msoc.icd9_child_parent_&sysdate.; set infolder.mlccs_child_parent; run; /*Clean work*/ proc datasets lib=work kill memtype=DATA nolist nowarn; quit; /*Print Log*/ proc printto; run; %put =====> END MACRO: createlookupfiles v1.2; %mend createlookupfiles;