Skip to content

Reflex tests

Paul Schwartz edited this page Aug 17, 2017 · 1 revision

Reflex's are actions that are added to an order depending on the outcome of one or more other tests.

##How do reflex tests work in the database?

Analyte Table: To define a test reflex, an analyte needs to be defined. This is because some tests are run more than once and defining analytes to represent each run allows us to distinguish between them. Usually, however, there is just one analyte defined for a test so you can just name it after the test, for example "Murex Test Result".

Test_Analyte Table: This table ties the above mentioned analyte to a test. The sort_order is only important if the test is re-run. In that case, you need to create more than one test_analyte entry for the test and use the sort_order to distinguish between them by numbering them sequentially.

Test_Reflex: This table defines the conditions that will trigger a reflex test. The above mentioned test_analyte entry will be used. If more than one test needs to be considered to determine whether a reflex test is added, then the sibling_reflex field needs to be used. This references another test_reflex id which will also be checked. Note: a better solution would have been to use grouping numbers. If you feel like taking on the conversion task please offer to do so.

##Reflex Rules

  • Single new test from an existing test This is the easiest one, one test, one testreflex and one added test

  • Single new test from two or more existing tests This case would be used if a reflex depends on the outcome of two or more existing tests. For each parent test add a testreflex and the testreflex's should be be made siblings. If there are only two test reflex's then they are mutual siblings. If there are more then two then the siblings should form a chain with the end of the chain pointing back to the first testreflex. Each testreflex should have the same added_test id

  • Two new tests from two or more existing tests This is similar to the above case with the difference that the testreflex's would have added_test_id's which differer

  • Two new tests from a single existing test This case is where the result of single test should create more than one child test. For each child test create a test reflex with the same conditions to trigger it but the add_test_id differ for each testreflex. Theses testreflex's should not be siblings

Clone this wiki locally