id summary reporter owner description type status priority milestone component resolution keywords cc 962 Add ReferenceDate annotation to Case Nicklas Nordborg Nicklas Nordborg "We need a reference date that can be used as the baseline for creating relative date intervals. The aim is to have a diagnosis date for all cases, but since we need to import that information from external sources we need to (temporarily) use other dates. A separate annotation (enum) is needed to keep track of the source of current reference. When deciding which date to use a priority order is used. A date with a higher (1=highest, 4=lowest) priority is always selected before a date with lower priority. For dates with equal priority, the earliest date wins, except for the !IncaDiagnosisDate that is always updated with the most current information. || '''Priority''' || '''Source''' || '''Comment''' || || 1 || !IncaDiagnosisDate || Should be set from the `A030DiaDat` INCA variable by the INCA importer. It should always be updated if available. || || 2 || !SamplingDate || Should be set by the Pathology referral form registration wizard if there this information is available. || || 3 || !ConsentDate || Should be set by the consent registration wizard || || 4 || !RegistrationDate || Should be set by various registration wizards that create Case items || Existing items need to be updated manually by batch importers. 1. All cases that has an `A030DiaDat` value should use this. 2. All other items that has at least one Specimen or !NoSpecimen item with a !SamplingDateTime annotation should use the earliest date. 3. All other cases that has a !ConsentDate should use this. 4. All other cases should use the registration date of the case. 1, 3 and 4 are relatively easy to fix with a simple batch export/import. Number 2 may require some more work but should be doable with clever use of item lists and/or spreadsheet functionality. " task closed critical Reggie v4.10 net.sf.basedb.reggie fixed