Add support to create investigations from multiple tests and different products

Description

The Laboratory API supports a single product -> single investigation model, where the investigation can have multiple tests.
This is good from a charging perspective as compared to 2.1 and earlier, it is no longer possible to undercharge/overcharge tests.
However it also means that multiple investigations may need to be created, which may not be desirable when packaging samples for external laboratories.

To support both accurate charging, and limiting the number of investigations:

  • defer investigation creation until the user is ready to submit an order

  • create investigations based on the Investigation Type of all the tests being ordered

This requires a change to the Laboratory API to:

  • Replace Investigation Types on Products with Tests

  • Link Tests to Investigation Types

  • Support multiple invoice items generating a single investigation

  • Require lab providers to create Investigation Types and link them to imported Tests

E.g, given a :

  • Product A, with Test 'Bile Acids Panel'

  • Product B, with Test 'ALP Panel'

  • both Tests have Investigation Type 'IDEXX Reference Labs'

Sample use:
1. charge Product A
The UI displays a message 'Bile Acids Panel' needs to be ordered by IDEXX Reference Labs.
Click Order to order, click Skip to add more tests

2. Click Skip

3. charge Product B

The UI displays a message 'ALP Panel' needs to be ordered by IDEXX Reference Labs.
Click Order to order, click Skip to add more tests

4. Click Order
Because both Bile Acids Panel and ALP Panel have the same Investigation Type, a single Investigation is created with Investigation Type set to IDEXX Reference Laboratory

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure