3 | | Updating to Reggie 2.5 require some manual changes to the items that already exists. This is due to the decision to register no-specimen-received events as individual `NoSpecimen` sample items instead of putting that information on the parent `Case` item. The procedure is outlined in the description and comments of ticket:379. |
| 3 | Updating to Reggie 2.5 require some manual changes to the items that already exists. This is due to the decision to register no-specimen-received events as individual `NoSpecimen` sample items instead of putting that information on the parent `Case` item. See ticket:379 for more information. Follow this procedure: |
| 4 | |
| 5 | == 1. Update to Reggie 2.5 == |
| 6 | |
| 7 | == 2. Create `NoSpecimen` items for all relevant cases == |
| 8 | |
| 9 | Find all `Case` items that have a value for the `ReasonIfNoSpecimen` annotation. For each value of the `ReasonIfNoSpecimen` annotation a new item with `NoSpecimen` subtype should be created, with the following properties: |
| 10 | |
| 11 | * Name: The name of the new item should be the case number taken from the `ReasonIfNoSpecimen` value + '.1' as suffix (this can be different from the name of the `Case` item). |
| 12 | * Parent: The parent item of the `NoSpecimen` item should be the `Case` item that holds the original `ReasonIfNoSpecimen` item. |
| 13 | |
| 14 | The following annotations should be copied from the parent `Case` to the `NoSpecimen` items: |
| 15 | * `ReasonIfNoSpecimen` (without the [nnnnn] prefix) |
| 16 | * `PAD` (copied from `PADCase`) |
| 17 | * `SamplingDateTime` (copied from `SamplingDate`) |
| 18 | |
| 19 | This should not be too difficult to fix by first exporting a text file with the name and annotation values for the items that must be fixed. A macro or search-and-replace operation in a spreadsheet program can then probably be used to create a file that can be used by the sample and annotation batch importers. |
| 20 | |
| 21 | Note that some `Case` items may have multiple `ReasonIfNoSpecimen` annotation values. Each annotation value should result in one new `NoSpecimen` item. The export will only create a single row which must be manually duplicated so that each row only contain a single set of values. In this case it may be impossible to know which `PAD` and `SamplingDate` that belong to a given `ReasonIfNoSpecimen`. If unsure, the original referral form should be consulted. |
| 22 | |
| 23 | == 3. Remove the unused annotations from the 'Case' items == |
| 24 | |
| 25 | After the update no `Case` item should have values for the following annotation types: |
| 26 | |
| 27 | * `ReasonIfNoSpecimen` |
| 28 | * `PADCase` |
| 29 | * `SamplingDate` |
| 30 | |
| 31 | Use the annotation importer to remove those annotations. After this there should be no items that use the `PADCase` or `SamplingDate` annotations so they can be deleted from the system. The `ReasonIfNoSpecimen` annotation type should have the multiplicity setting changed to 1. |
| 32 | |
| 33 | |
| 34 | |
| 35 | It should now be possible to register new cases and specimen tubes again. |