Opened 8 years ago

Closed 8 years ago

#962 closed task (fixed)

Add ReferenceDate annotation to Case

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: Reggie v4.10
Component: net.sf.basedb.reggie Keywords:
Cc:

Description

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.

Change History (8)

comment:1 by Nicklas Nordborg, 8 years ago

(In [4458]) References #962: Add ReferenceDate annotation to Case

Added ReferenceDate and ReferenceDateSource annotations to installation wizard.

comment:2 by Nicklas Nordborg, 8 years ago

(In [4459]) References #962: Add ReferenceDate annotation to Case

Updated the INCA importer to update the ReferenceDate annotation to the same value as A030DiaDat.

comment:3 by Nicklas Nordborg, 8 years ago

(In [4460]) References #962: Add ReferenceDate annotation to Case

Updated the consent form registration and referral form registration to handle the reference date. A helper class ReferenceDateWithSource was implemented to help with deciding between two different reference dates.

comment:4 by Nicklas Nordborg, 8 years ago

Component: not classifiednet.sf.basedb.reggie
Milestone: Reggie v4.10
Owner: changed from Jari Häkkinen to Nicklas Nordborg
Priority: majorcritical
Status: newassigned
Type: Requesttask

comment:5 by Nicklas Nordborg, 8 years ago

(In [4461]) References #962 and #938. The release exporter is now exporting the reference date and source. The date is converted to a year-only value (integer).

comment:6 by Nicklas Nordborg, 8 years ago

(In [4477]) References #962: Add ReferenceDate annotation to Case

Added a batch update wizard for setting the reference date on case items. This makes the initial installation much easier and can also be used to fix future issues that may arise due to other wizards not updating the reference date or due to manual changes.

comment:7 by Nicklas Nordborg, 8 years ago

(In [4478]) References #962: Add ReferenceDate? annotation to Case

Missing files that should have been part of [4477].

comment:8 by Nicklas Nordborg, 8 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.