Wiki

Clone wiki

qatrackplus / v / 0.2.8 / admin / tutorials / step_by_step_test_list / test_list_start_to_finish_4

A step-by-step introduction to QATrack+ administration (continued)

(Previous Page)

In this part of the tutorial we will create the tests required to calculate a dose. This will demonstrate a number of different test types including composite calculations.

Creating the required tests

In order to calculate dose we need to create 6 tests (k_Q and Other corrections such as P_pol, P_ion etc are ignored for simplicity):

  • Temperature (numerical test)
  • Pressure (numerical test)
  • Temperature-pressure correction (Ftp - a composite calculation)
  • Ion chamber reading (numerical test)
  • Ndw for converting our ion chamber reading to dose (constant value)
  • Dose (the final result we are interested in - a composite calculation)

To create the tests, visit the Tests link under the QA section from the main admin page and then click on Add test in the top right hand corner.

Give our first test the name Temperature °C and the macro name of temperature. We will leave the description blank for now.

Since we haven't created any categories yet we will do so now. Click the green cross next to the Category: drop down and create a Dosimetry category.

creating a dosimetry category

For the Type field choose Simple Numerical, indicating that this test will require the user to enter a number.

Full temperature test

Click Save and add another when you are done.

Follow the same procedure define 1) a Pressure (mmHg) test ensuring that you use the macro name pressure (You can use the Dosimetry category we created earlier for the pressure and all of the remaining tests), and 2) an Ion Chamber Reading (nC) test using the macro name reading.

Next we will create our first composite test for our temperature pressure correction. Give this test a name of Temperature-Pressure Correction and a macro name of p_tp. From the Type: dropdown select Composite and you will notice that a new Calculation Procedure text box will appear below. In that text box enter the following Python snippet:

result = (temperature + 273.15)/295.15*760/pressure

Note here that we used the macro names temperature and pressure from our previously defined tests to define how our Temperature Pressure Correction test result will be calculated.

P_TP calculation

When you are finished, click Save and add another. Define a test called N_DW with the macro name n_dw. This time choose a Type of Constant and enter a value of 0.05 in the Constant value field that appears.

N_DW

Once that is finished we will add our final test for calculating dose. Create a composite test with the name Dose, the macro name dose and a calculation procedure defined as:

corrected_reading = reading*p_tp
result = n_dw*corrected_reading

dose test

Note that the dose calculation is a composite test based on a previous composite result (p_tp). QATrack+ has a dependency resolution system to allow this sort of composite-of-composite type calculations.

Once that is complete click on Save which will take you back to the test listings. If all the steps have been completed correctly you should see 6 tests listed:

test listings for dose calculations

In the next step of the tutorial we will group these tests into a test list.

Updated