Changeset 20860 in main


Ignore:
Timestamp:
06/21/20 19:22:39 (2 weeks ago)
Author:
LoisHaggard_NM
Message:

nm backend qModules 3.0 idepi covid

Location:
adopters/nm/trunk/src/main/backend_qModules/3.0/idepi
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/NM_CountCOVID_ZIP.def

    r20855 r20860  
    2626                ?cross2? %cross2%
    2727                ;
    28                 output out=tmp sum=count;
    29         proc sort data=tmp; by %cross1%
     28                output out=tmp (drop= _TYPE_ _FREQ_) sum=count;
     29        proc sort data=tmp out=sorted; by %cross1%
    3030                ?cross2? %cross2%
    3131                ; run;
     
    3636       
    3737 *********************** 2. data_frame **************************;
    38  * df_%cross1%%cross2% is a dataset created by IBIS-Q.   ;
     38 * df_%cross1%%cross2% is a dataset created by IBIS-Q.           ;
    3939 * It consists of %cross1% and %cross2% (if the user specified   ;
    4040 * %cross2%) and a variable named "count" that is set to "0".    ;
    4141 * The results of the proc summary must be merged with the       ;
    42  * df_%cross1%%cross2% dataset.                          ;
     42 * df_%cross1%%cross2% dataset.                                  ;
    4343 ****************************************************************;
    4444
    4545        data frame;
    46                 set data.ziptozcta;
     46                set data.zctapop20185yr;
    4747                count=0;
    48                 drop zipcode PO_NAME STATE ZIP_TYPE ;
     48                rename zipcode=ZIP_CODE_OF_POLY ;
     49                drop popcount ;
    4950                run;
    5051        proc sort data=frame; by %cross1%
     
    5556                run;
    5657               
    57         data new;
     58        data tmp;
    5859                *length count 8; *ZW put this in his ibisq code, so we don't need it here anymore.;
    59                 merge frame tmp;
     60                update frame sorted;
    6061                by %cross1%
    6162                   ?cross2? %cross2%
    6263                ;
    63                 run;
    64         proc print data=new noobs;
    65                 title2 '2. NEW, after frame merged with tmp';
    66                 run;
    67         data tmp;
    68                 set new;
    69                 drop _TYPE_ _FREQ_;
    7064                run;
    7165
     
    169163                if count>0 then do;
    170164                        rse=(stderr/rateper);
    171                         redflag=put('', $15.);
    172                         if rse>.3 then redflag=put('Unstable', $15.);
    173                         if rse>.5 then redflag=put('VeryUnstable', $15.);
    174                         if stderr=. then redflag=put('Unstable', $15.);
     165                        redflag=put('', $12.);
     166                        if rse>.3 then redflag=put('Unstable', $12.);
     167                        if rse>.5 then redflag=put('VeryUnstable', $12.);
     168                        if stderr=. then redflag=put('Unstable', $12.);
    175169                end;
    176                 if count<=0 then redflag=put('Unstable', $14.);  *no variance, n=0, rse=div by zero;
    177         proc print data=rate noobs;  title2 '5. RATE with Red Flag';
     170                *no variance, n=0, rse=div by zero;
     171                if count<=0 then redflag=put('Unstable', $12.);
     172                if popcount=. then redflag=put('', $12.); *no value attribute for missing crossby values;
     173
    178174        run;
    179175
     
    192188        data tmp;
    193189                set rate;
    194                 if ((0<n<4) and (popcount<20)) then do;
     190/*              if ((0<n<4) and (.<popcount<5000)) then do;
    195191                        n = .A;
    196                         rateper = .A;
    197                         LL = put('**', 8.0);
    198                         UL = put('**', 8.0);
    199                         redflag = put('Suppressed', $15.);
    200                         redflag=compress(redflag);
     192
     193                        *Only one value attribute is allowed - so if suppressed, overwrite unstable;
     194                        *This also puts ** in record code column for suppressed rows, and adds footnote;
     195                        redflag = put('Suppressed', $12.);
    201196                end;
     197*/
    202198        proc print data=tmp noobs;  title2 '6. TMP - final dataset to pass to IBIS View app';
    203199        run;
     
    208204# definition for output file
    209205f out_variable count
    210 f xml_out_map_file XMLNumCases.map
     206f xml_out_map_file XMLCount.map
    211207--------BoNdArY--------
    212208f out_detail lbl_not_used__see_xml_out_map_file
    213209  n 15.0
    214   redflag 15.0
    215210--------BoNdArY--------
    216211 
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/NM_RateCrudeCOVID.def

    r20850 r20860  
    2626                ?cross2? %cross2%
    2727                ;
     28                format count 15.0 ;
    2829                output out=tmp (drop=_TYPE_ _FREQ_) sum=count;
    29         proc sort data=tmp; by %cross1%
     30        proc sort data=tmp out=sorted; by %cross1%
    3031                ?cross2? %cross2%
    3132                ; run;
     
    4344 ****************************************************************;
    4445        data frame;
     46                format count 15.0 ;
    4547                set df_%cross1%%cross2%;
    4648                DATE=TODAY();
     
    5860                run;
    5961               
    60         data new;
    61                 *length count 8; *ZW put this in his ibisq code, so we don't need it here anymore.;
    62                 merge frame tmp;
     62        data tmp;
     63                merge frame sorted;
    6364                by %cross1%
    6465                   ?cross2? %cross2%
    6566                ;
    66                 run;
    67         proc print data=new noobs;
    68                 title2 '2. NEW, after frame merged with tmp';
    69                 run;
    70         data tmp;
    71                 set new;
    72                 drop _TYPE_ _FREQ_;
    7367                run;
    7468
     
    112106                        create table numbers as
    113107                        select tmp.*, pop.*
    114                         from tmp, pop
    115                         where
    116                         ?popcross1? tmp.%cross1%=pop.%popcross1%; 
    117                         ?popcross2? tmp.%cross2%=pop.%popcross2%; 
     108                        from tmp left join pop
     109                        on
     110                        ?popcross1? tmp.%cross1%=pop.%popcross1%;
     111                        ?popcross2? tmp.%cross2%=pop.%popcross2%;
    118112                quit;
     113
    119114        %end;
    120115
     
    128123                        create table numbers as
    129124                        select tmp.*, pop.*
    130                         from tmp, pop
    131                         where tmp.%cross1%=pop.%popcross1% and
     125                        from tmp left join pop
     126                        on
     127                        tmp.%cross1%=pop.%popcross1% and
    132128                        tmp.%cross2%=pop.%popcross2%;
    133129                quit;
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/XMLNumCases.map

    r20252 r20860  
    111 MEASURE NumCases
    2 2 VALUE_ATTRIBUTE Code
     22 VALUE_ATTRIBUTE_NAME
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19.cfg

    r20633 r20860  
    1717d saspopdata popibiscnty90_18_28jun2019
    1818d sas_bin "C:\Program&Files\SASHome\SASFoundation\9.4\sas.exe"
    19 #r data_where mmwr_week^=0
     19#r data_where 1<=fipscnty=97
    2020r pop_where year=2020
    2121r sasstdpop morstd
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19CntyTests.cfg

    r20850 r20860  
    1919#r data_where mmwr_week^=0
    2020#r pop_where year=2020
    21 r sasstdpop morstd
    2221####################################################################
    2322d response_head_content XMLResponse.head
     
    6261#value name_sas name_html name_pop prompt type1 type2 length
    6362
    64 30 mmwr_week WeekMMWR null MMWRWeek num 0 8
    65 30 onsetdate OnsetDate null IllnessOnset char 0 9
    66 10 status CaseStatus null CaseStatus num 0 8
    67 10 dieind DthIndicator null DiedIndicator num 0 8
    68 10 disp3cat CaseDisp3 null CurrentDisposition num 0 8
    69 10 disp4cat CaseDisp4 null CurrentDisposition num 0 8
    70 
    71 40 null AgeGrpProxy null AgeGroupProxy num 10 8
    72 40 agegrp4 AgeGrp4 agegrp4 Age num 0 8
    73 40 agegrp7 AgeGrp7 agegrp7 Age num 0 8
    74 40 agegrp8 AgeGrp8 agegrp8 Age num 0 8
    75 40 agegrp9 AgeGrp9 agegrp9 Age num 0 8
    76 40 agepop AgeGrp11 agepop Age num 0 8
    77 40 agegrp18 AgeGrp18 agegrp18 Age num 0 8
    78 40 agegrp35 AgeGrp35 agegrp35 Age num 0 8
    79 
    80 50 sex Sex sex Sex num 0 8
    81 50 RacEthSmallest RacEthDOH DOHRaceth DOHRacEthAlmost num 0 8
     6310 _SPECIMEN_COLL_DT SpecimenDate null SpecimenCollectionDate char 0 9
     6410 _Result TestResult null TestResult num 0 8
     6510 detention Detention null CurrentDisposition num 0 8
     6610 last7 Last7Days null CaseStatus num 0 8
    8267
    836820 null GeoProxy fipscode Geography num 10 8
     
    857020 region GeoRegion region HealthRegion num 0 8
    867120 urbanrur GeoUrbanRur urbanrur UrbanRuralCounties num 0 8
    87 20 zcta GeoZIPCode2019 null ZCTAPolygons num 0 8
    88 20 state State null NMOverall char 0 3
     7220 ZIP_CODE_OF_POLY GeoZIPCode2019 zipcode ZCTAPolygons num 0 8
    8973
  • adopters/nm/trunk/src/main/backend_qModules/3.0/idepi/_COVID19ZIPTests.cfg

    r20855 r20860  
    3939#############################################################################
    4040#value =any value, place holder only
    41 # name_sas  = SAS variable name in the numerator data set (birth data set)
    42 # name_html = html name that specified under <DIMENSION> <NAME> in Module XML file
     41# name_sas  = SAS variable name in the numerator data set
     42# name_html = html specified under <DIMENSION> <NAME> in Module XML file
    4343# name_pop  = SAS variable name in denominator data set (population data set)
    4444# prompt    = Place holder only, could by any character string.
    4545# type1     = CGI data type for SAS variable type (see comment lines 48 & 49)
    46 # type2     = CGI data type for CGI regrouping purpose (see comment lines 51-59)
     46# type2     = CGI data type for CGI regrouping (see comment lines 51-59)
    4747# length    = used to indicate the variable length in SAS dataset
    4848#
     
    6262#value name_sas name_html name_pop prompt type1 type2 length
    6363
    64 30 mmwr_week WeekMMWR null MMWRWeek num 0 8
    65 30 onsetdate OnsetDate null IllnessOnset char 0 9
    66 10 status CaseStatus null CaseStatus num 0 8
    67 10 dieind DthIndicator null DiedIndicator num 0 8
    68 10 disp3cat CaseDisp3 null CurrentDisposition num 0 8
    69 10 disp4cat CaseDisp4 null CurrentDisposition num 0 8
    70 
    71 40 null AgeGrpProxy null AgeGroupProxy num 10 8
    72 40 agegrp4 AgeGrp4 agegrp4 Age num 0 8
    73 40 agegrp7 AgeGrp7 agegrp7 Age num 0 8
    74 40 agegrp8 AgeGrp8 agegrp8 Age num 0 8
    75 40 agegrp9 AgeGrp9 agegrp9 Age num 0 8
    76 40 agepop AgeGrp11 agepop Age num 0 8
    77 40 agegrp18 AgeGrp18 agegrp18 Age num 0 8
    78 40 agegrp35 AgeGrp35 agegrp35 Age num 0 8
    79 
    80 50 sex Sex sex Sex num 0 8
    81 50 RacEthSmallest RacEthDOH DOHRaceth DOHRacEthAlmost num 0 8
     6410 _SPECIMEN_COLL_DT SpecimenDate null SpecimenCollectionDate char 0 9
     6510 _Result TestResult null TestResult num 0 8
     6610 detention Detention null CurrentDisposition num 0 8
     6710 last7 Last7Days null CaseStatus num 0 8
    8268
    836920 null GeoProxy fipscode Geography num 10 8
Note: See TracChangeset for help on using the changeset viewer.