6.2 Levelid_Check File Output

The levelid_check file is output when there is a discrepancy between the stratifications that have been requested in the qrp.USERSTRATA file and the stratifications requested in the Table File. The user can review the levelid_check file to determine which stratifications need to be requested in the qrp.USERSTRATA file in order to generate the desired output using the Table File in the QRP Reporting Tool.

The example levelid_check file below (Figure 6.1) was produced from running the QRP Reporting Tool on a Type 5 query that requested stratifications for 1) the t5disp table, 2) the t5episdur table, and 3) the t5gaps table. These three tables are requested in the TABLEID parameter of the qrp.USERSTRATA file. Each stratification variable is described by the LEVELVARS parameter of the qrp.USERSTRATA file. Distinct stratification variables or combinations of stratification variables require a unique three-digit level identifier, which is defined by the LEVELID parameter of the qrp.USERSTRATA file. As seen in figure 6.1, the TABLEID values are listed in the “dataset” column, the LEVELVARS are listed in the “strat1” and “strat2” columns, and the LEVELID values are listed in the “levelid1” and “levelid2” columns. The “levelnum” column specifies the number of level ID variables required in order to produce the table. In this example levelid_check file in figure 6.1, all rows have a levelnum equal to 2 and therefore all rows should have two level ID variables listed.

Example levelid_check output file produced for a Type 5 report

Figure 6.1: Example levelid_check output file produced for a Type 5 report

There are several LEVELVARS that are missing from the example levelid_check file in figure 6.1 as strat1 and strat2 values. The red outlined values in figure 6.1 indicate the stratification variables that are specified in the Table File, and should also be requested as LEVELVARS in the qrp.USERSTRATA file. The black outlined values in figure 6.1 indicate the levelid1 and levelid2 values that are associated with these stratification variables. Each strat1 and strat2 value in figure 6.1 should have an associated levelid1 and levelid2 value. The missing levelid1 and levelid2 values from figure 6.1 in the black box can be matched with the corresponding strat1 and strat2 variables in the red box, to show which strat1 and strat2 stratification variables are missing an associated LEVELID value in the qrp.USERSTRATA file.

For the requested stratifications in the example in figure 6.1, the following rows in figure 6.3 need to be added to qrp.USERSTRATA file to ensure all necessary information is computed in QRP.

Table 6.3: Levelvars values that need to be added to the qrp.USERSTRATA file based on the output in the example levelid_check file in Figure 1
tableid levelvars
t5disp daysupp
agegroup daysupp
t5episdur episodelength
agegroup
agegroup episodelength
t5gaps gapnum
agegroup gapnum
gaplength gapnum
agegroup gaplength gapnum

Each of these rows in table 6.3 would also be assigned their own LEVELID value in the qrp.USERSTRATA file, which can be any unique combination of three digits. LEVELID values can be repeated for the rows that are referencing the same stratification variables. For example, in figure 6.1, the agestrat1 values that have an associated levelid1 value are using the same levelID values for repeated stratifications values. The levelid values listed below in table 6.4 can continue to be used for those associated strat1 values as they were used in the example levelid_check file in figure 6.1. The rest of the strat1 and strat2 values outlined in red in figure 6.1 will need to be assigned new levelid1 or levelid2 values.

Table 6.4: Levelid1 values that can be re-used for their associated strat1 values from the example in Figure 1
strat1 levelid1
000
agegroup 003