Changeset 21766 in main


Ignore:
Timestamp:
10/11/20 15:06:00 (3 weeks ago)
Author:
LoisHaggard_NM
Message:

backend qModules files - misc

Location:
adopters/nm/trunk/src/main/backend_qModules/3.0
Files:
11 added
10 deleted
7 edited
3 moved

Legend:

Unmodified
Added
Removed
  • adopters/nm/trunk/src/main/backend_qModules/3.0/_EPHT/climate/Precip_count_day.def

    r21455 r21766  
    551 script
    66
    7 /*
    87proc print data=tmp;
    98         title "First Precip Summary";
    109 run;
     10/*
    1111*/
    1212
     
    1919run;
    2020
    21 /*
    2221proc print data=tmp;
    2322         title "Precip Summary";
     
    2928proc print data=tmp;
    3029         title "Precip Summary";
    31          
     30       
     31/*
    3232*/
    3333
  • adopters/nm/trunk/src/main/backend_qModules/3.0/_EPHT/wateranalytes/_WaterAnalytes.cfg

    r20965 r21766  
    5454
    55551 year_s Year null Year num 0 4
    56 2 PWSID PWSInventory null Community&Water&System num 0 8
     562 PWSID CWSInventory null Community&Water&System num 0 8
    57573 AnalyteCode AnalyteType Null Water&Contaminant char 0 4
    58583 ConcentrationUnits UnitsType null Concentration&Units char 0 4
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19Cnty.cfg

    r21458 r21766  
    1919
    2020d sas_bin "C:\Program&Files\SASHome\SASFoundation\9.4\sas.exe"
    21 r data_where 1<=fipscnty<=97
     21r data_where JURISDICTION_NM^="OutOfState"
    2222r pop_where year=2020
    2323####################################################################
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19CntyTests.cfg

    r21458 r21766  
    6565
    666610 _SPECIMEN_COLL_DT SpecimenDate null SpecimenCollectionDate char 0 9
    67 10 _Result TestResult null TestResult num 0 8
     6710 Result TestResult null TestResult num 0 8
    686810 detention Detention null CurrentDisposition num 0 8
    6969
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19TestPositivity.cfg

    r21458 r21766  
    6565
    666610 _SPECIMEN_COLL_DT SpecimenDate null SpecimenCollectionDate char 0 9
    67 10 _Result TestResult null TestResult num 0 8
     6710 result TestResult null TestResult num 0 8
    686810 detention Detention detention CurrentDisposition num 0 8
    6969
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19ZIPTests.cfg

    r21458 r21766  
    6565
    666610 _SPECIMEN_COLL_DT SpecimenDate null SpecimenCollectionDate char 0 9
    67 10 _Result TestResult null TestResult num 0 8
     6710 Result TestResult null TestResult num 0 8
    686810 detention Detention null CurrentDisposition num 0 8
    6969
  • adopters/nm/trunk/src/main/backend_qModules/3.0/infmort/NM_RateDth1KBrth_3YrAvg.def

    r21765 r21766  
    1 #NM_RateCrudeBirthPop1K_3YrMov_df.def
     1#NM_RateCrudeBirthPop1K_3YrMov.def
    22#Calculates crude rates for 3-year moving averages for
    33#  records that have been filtered by IBIS-Q (data=tmp)
     
    77#Outputs redflag var based on RSE
    88#
    9 #last update: 7/12/2016, file created without cross1
    109
    1110f type special
     
    2423 * dataset. The spvar1 value is set in the Module.xml file.      ;
    2524 ****************************************************************;
    26         %let begyear=%spvar1%;
     25        %let begyear=%spvar1%; *set beg year for year groups;
     26       
     27        *this is to get the value of the last year for the YearGrp3Yrs dimension value.;
     28        proc summary data=tmp nway ; class year; var x; output out=years n(x)=number; run;
     29        data lastyear; set years; if year=last.year; run;
     30        proc print years; run;
    2731
    2832        proc summary data=tmp;
     
    3135                ?cross2? %cross2%
    3236                ;
    33                 output out=tmp sum=count;
    34         proc sort data=tmp; by %cross1%
     37                output out=tmp (drop=_TYPE_ _FREQ_) sum=count;
     38                run;
     39        proc sort data=tmp out=sorted; by %cross1%
    3540                ?cross2? %cross2%
    3641                ; run;
    37         proc print data=tmp noobs;
     42        proc print data=sorted noobs;
    3843                title1 '---------------------------------';
    3944                title2 '1. TMP - numerator dataset';
     
    4146 
    4247 *********************** 2. data_frame **************************;
    43  * df_%cross1%%cross2% is a dataset created by IBIS-Q.   ;
     48 * df_%cross1%%cross2% is a dataset created by IBIS-Q.           ;
    4449 * It consists of %cross1% and %cross2% (if the user specified   ;
    4550 * %cross2%) and a variable named "count" that is set to "0".    ;
    4651 * The results of the proc summary must be merged with the       ;
    47  * df_%cross1%%cross2% dataset.                          ;
     52 * df_%cross1%%cross2% dataset.                                  ;
    4853 ****************************************************************;
    4954        data frame;
     
    5661        proc contents data=frame; run;
    5762        proc print data=frame noobs; run;
    58                
    59         data new;
    60                 merge frame tmp;   *must list frame dataset first, then tmp;
     63
     64        data tmp;
     65                merge frame sorted;   *must list frame dataset first, then tmp;
    6166                by %cross1%
    6267                   ?cross2? %cross2%
    6368                ;
    6469                run;
    65         proc print data=new noobs;
    66                 title2 '2. NEW, after frame merged with tmp';
    67                 run;
    68         data tmp;
    69                 set new;
    70                 drop _TYPE_ _FREQ_;
    7170        proc print data=tmp noobs;
    7271                title2 '2. TMP';
     
    9089                proc summary data=poptmp ;
    9190                        var x;
    92                         output out=pop sum=x;
     91                        output out=pop (drop=_TYPE_ _FREQ_) sum(x)=popcount;
    9392                run;
    9493                proc sql;
     
    103102                        var x;
    104103                        class %popcross1% %popcross2%;
    105                         output out=pop sum=popcount;
     104                        output out=pop (drop=_TYPE_ _FREQ_) sum=popcount;
    106105                run;
    107106                proc sql;
     
    119118                        var x;
    120119                        class %popcross1% %popcross2%  ;
    121                         output out=pop sum=popcount;
     120                        output out=pop (drop=_TYPE_ _FREQ_) sum=popcount;
    122121                run;
    123122                proc sql;
     
    138137                title2 '3. NUMBERS dataset';
    139138                run;
    140        
     139
    141140 ******** 4. Use lag function to sum across multiple rows ********;
    142141 * Read the numbers dataset by the cross2 variable and then use   ;
     
    159158        data tmp;
    160159                set numbers;
    161                 if year>=&begyear+2;
     160                if year>=&begyear.+2;
    162161                rate=count3/popcount3;
    163162                if count3>0 then do;
     
    177176                if count3>0 then do;
    178177                        rse=(stderr/rateper);
    179                         redflag=put('-', $14.);
    180                         if rse>.3 then redflag=put('Unstable', $14.);
    181                         if rse>.5 then redflag=put('Very Unstable', $14.);
    182                         if stderr=. then redflag=put('Unstable', $14.);
     178                        redflag=put('', $12.);
     179                        if rse>.3 then redflag=put('Unstable', $12.);
     180                        if rse>.5 then redflag=put('VeryUnstable', $12.);
     181                        if stderr=. then redflag=put('Unstable', $12.);
    183182                end;
    184                 if count3<=0 then redflag=put('Unstable', $14.);  *no variance, n=0, rse=div by zero;
     183                if count3<=0 then redflag=put('Unstable', $12.);  *no variance, n=0, rse=div by zero;
    185184
    186185        run;
     
    188187        proc print data=tmp noobs;  title2 '5.  TMP dataset for 3-year rates';
    189188        run;
    190                
     189
    191190 ************* 12. New Mexico Small Numbers Rule *******************;
    192191 * Suppress cells if the numerator in (1 2 3) AND the denominator   ;
    193  * is less than 20. For Counts, must run the crude rate code to     ;
     192 * is less than 5000. For Counts, must run the crude rate code to   ;
    194193 * capture the denominator, but only output the N. ZW's program     ;
    195194 * uses ".A" to identify cells for suppression. I have co-opted     ;
     
    203202        data tmp;
    204203                set tmp;
    205                 if ((0<n<4) and (popcount3<5000)) then do;
     204                if ((0<n<4) and (.<popcount3<5000)) then do;
    206205                        n = .A;
    207206                        rateper = .A;
    208207                        LL = put('**', 8.0);
    209208                        UL = put('**', 8.0);
     209
     210                *Only one value attribute is allowed - so if suppressed, overwrite unstable;
     211                *This also puts ** in record code column for suppressed rows, and adds footnote;
     212                        redflag = put('Suppressed', $12.);
    210213                end;
     214                if popcount=. then redflag=put('', $12.); *no value attribute for missing crossby values;
    211215        proc print data=tmp noobs;  title2 '12. TMP - final dataset to pass to IBIS View app';
    212216        run;
     
    215219# definition for output file
    216220f out_variable rateper
    217 f xml_out_map_file XMLRateNumerDenomLCLUCL.map
     221f xml_out_map_file XMLRateDth1KBrth.map
    218222--------BoNdArY--------
    219223f out_detail lbl_not_used__see_xml_out_map_file
     
    225229  redflag 15.0
    226230--------BoNdArY--------
    227  
     231
  • adopters/nm/trunk/src/main/backend_qModules/3.0/infmort/NM_RateDth1KBrth_5YrAvg.def

    r21765 r21766  
    77#Outputs redflag var based on RSE
    88#
    9 #last update: 7/12/2016, file created without cross1
    109
    1110f type special
     
    2423 * dataset. The spvar1 value is set in the Module.xml file.      ;
    2524 ****************************************************************;
    26         %let begyear=%spvar1%;
    27 
    28         proc summary data=tmp ;
     25        %let begyear=%spvar1%; *set beg year for year groups;
     26       
     27        *this is to get the value of the last year for the YearGrp3Yrs dimension value.;
     28        proc summary data=tmp nway ; class year; var x; output out=years n(x)=number; run;
     29        data lastyear; set years; if year=last.year; run;
     30        proc print years; run;
     31
     32        proc summary data=tmp;
    2933                var x;
    3034                class %cross1%
    3135                ?cross2? %cross2%
    3236                ;
    33                 output out=tmp sum=count;
    34         proc sort data=tmp; by %cross1%
     37                output out=tmp (drop=_TYPE_ _FREQ_) sum=count;
     38                run;
     39        proc sort data=tmp out=sorted; by %cross1%
    3540                ?cross2? %cross2%
    3641                ; run;
    37         proc print data=tmp noobs;
     42        proc print data=sorted noobs;
    3843                title1 '---------------------------------';
    3944                title2 '1. TMP - numerator dataset';
     
    4146 
    4247 *********************** 2. data_frame **************************;
    43  * df_%cross1%%cross2% is a dataset created by IBIS-Q.   ;
     48 * df_%cross1%%cross2% is a dataset created by IBIS-Q.           ;
    4449 * It consists of %cross1% and %cross2% (if the user specified   ;
    4550 * %cross2%) and a variable named "count" that is set to "0".    ;
    4651 * The results of the proc summary must be merged with the       ;
    47  * df_%cross1%%cross2% dataset.                          ;
     52 * df_%cross1%%cross2% dataset.                                  ;
    4853 ****************************************************************;
    4954        data frame;
     
    5661        proc contents data=frame; run;
    5762        proc print data=frame noobs; run;
    58                
    59         data new;
    60                 merge frame tmp;   *must list frame dataset first, then tmp;
     63
     64        data tmp;
     65                merge frame sorted;   *must list frame dataset first, then tmp;
    6166                by %cross1%
    6267                   ?cross2? %cross2%
    6368                ;
    6469                run;
    65         proc print data=new noobs;
    66                 title2 '2. NEW, after frame merged with tmp';
    67                 run;
    68         data tmp;
    69                 set new;
    70                 drop _TYPE_ _FREQ_;
    7170        proc print data=tmp noobs;
    7271                title2 '2. TMP';
     
    9089                proc summary data=poptmp ;
    9190                        var x;
    92                         output out=pop sum=popcount;
     91                        output out=pop (drop=_TYPE_ _FREQ_) sum(x)=popcount;
    9392                run;
    9493                proc sql;
     
    103102                        var x;
    104103                        class %popcross1% %popcross2%;
    105                         output out=pop sum=popcount;
     104                        output out=pop (drop=_TYPE_ _FREQ_) sum=popcount;
    106105                run;
    107106                proc sql;
     
    119118                        var x;
    120119                        class %popcross1% %popcross2%  ;
    121                         output out=pop sum=popcount;
     120                        output out=pop (drop=_TYPE_ _FREQ_) sum=popcount;
    122121                run;
    123122                proc sql;
     
    159158        data tmp;
    160159                set numbers;
    161                 if year>=&begyear+4;
     160                if year>=&begyear.+4;
    162161                rate=count5/popcount5;
    163162                if count5>0 then do;
     
    177176                if count5>0 then do;
    178177                        rse=(stderr/rateper);
    179                         redflag=put('-', $14.);
    180                         if rse>.3 then redflag=put('Unstable', $14.);
    181                         if rse>.5 then redflag=put('Very Unstable', $14.);
    182                         if stderr=. then redflag=put('Unstable', $14.);
     178                        redflag=put('', $12.);
     179                        if rse>.3 then redflag=put('Unstable', $12.);
     180                        if rse>.5 then redflag=put('VeryUnstable', $12.);
     181                        if stderr=. then redflag=put('Unstable', $12.);
    183182                end;
    184                 if count5<=0 then redflag=put('Unstable', $14.);  *no variance, n=0, rse=div by zero;
     183                if count3<=0 then redflag=put('Unstable', $12.);  *no variance, n=0, rse=div by zero;
    185184
    186185        run;
     
    203202        data tmp;
    204203                set tmp;
    205                 if ((0<n<4) and (popcount5<5000)) then do;
     204                if ((0<n<4) and (.<popcount5<5000)) then do;
    206205                        n = .A;
    207206                        rateper = .A;
    208207                        LL = put('**', 8.0);
    209208                        UL = put('**', 8.0);
     209
     210                *Only one value attribute is allowed - so if suppressed, overwrite unstable;
     211                *This also puts ** in record code column for suppressed rows, and adds footnote;
     212                        redflag = put('Suppressed', $12.);
    210213                end;
     214                if popcount=. then redflag=put('', $12.); *no value attribute for missing crossby values;
    211215        proc print data=tmp noobs;  title2 '12. TMP - final dataset to pass to IBIS View app';
    212216        run;
     
    215219# definition for output file
    216220f out_variable rateper
    217 f xml_out_map_file XMLRateNumerDenomLCLUCL.map
     221f xml_out_map_file XMLRateDth1KBrth.map
    218222--------BoNdArY--------
    219223f out_detail lbl_not_used__see_xml_out_map_file
     
    225229  redflag 15.0
    226230--------BoNdArY--------
    227  
     231
  • adopters/nm/trunk/src/main/backend_qModules/3.0/infmort/_InfMort18.cfg

    r20049 r21766  
    1313#value name_path value_path   
    1414
    15 d homepath E:\ibisq\qModules30\infmort23\
     15d homepath E:\ibisq\qModules30\infmort\
    1616d workpath E:\ibisq\workpath
    1717
     
    2222d sasdata death99_17geo_18ngeo_ibis
    2323d saspopdata birth90_17geo_18ungeo
    24 #remember, use birth data for pop data!!
    2524
    2625d sas_bin "C:\Program&Files\SASHome\SASFoundation\9.4\sas.exe"
    2726
    2827r data_where (1999<=year<=2018&and&nmres=1&and&agepop=1)
    29 r pop_where (1999<=year<=2018&and&nmres=1)
     28#remember, use birth data for pop data!!
     29r pop_where (1999<=year<=2018and&nmres=1)
    3030
    3131####################################################################
     
    4949#value =any value, place holder only
    5050# name_sas  = SAS variable name in the numerator data set (birth data set)
    51 # name_html = html name that specified under <DIMENSION> <NAME> in Module XML file
     51# name_html = html name <DIMENSION><NAME> value in Module XML file
    5252# name_pop  = SAS variable name in denominator data set (population data set)
    5353# prompt    = Place holder only, could by any character string.
     
    7070#############################################################################
    7171#Value SAS_Numerator_Var Dimension SAS_Denominator_Var Label type1 type2 length
    72        
     72
    73731 null YearProxy null DeathYear num 10 8
    74741 year Year9 year DeathYear num 3 8
    75751 year Year year DeathYear num 0 8
    76 1 year Year3YrGrp year YearofDeath num 0 8
    77 1 year Year5YrGrp year YearofDeath num 0 8
     761 year YearGrp3Yrs year YearofDeath num 0 8
     771 year YearGrp5Yrs year YearofDeath num 0 8
    7878
    79792 null CauseDeathProxy null CausesofInfantDeath char 10 8
    80802 UCOD CauseDeath9 null DiagICD-9Codes char 3 8
    81812 NCHS130inf ICDNCHS130 null CausesofInfantDeath num 0 8
    82 2 GenCausInf ICDGenInfDeath null UTCausesofInfantDeath num 0 8
     822 GenCausInf LgdCauseDeathInfant null UTCausesofInfantDeath num 0 8
    8383
    84843 infage InfAge null InfantAgeGroups num 0 8
Note: See TracChangeset for help on using the changeset viewer.