Opened 4 days ago

Last modified 3 days ago

#962 assigned task

Add ReferenceDate annotation to Case

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


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 (5)

comment:1 Changed 3 days ago by nicklas

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

Added ReferenceDate and ReferenceDateSource annotations to installation wizard.

comment:2 Changed 3 days ago by nicklas

(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 Changed 3 days ago by nicklas

(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 Changed 3 days ago by nicklas

  • Component changed from not classified to net.sf.basedb.reggie
  • Milestone set to Reggie v4.10
  • Owner changed from jari to nicklas
  • Priority changed from major to critical
  • Status changed from new to assigned
  • Type changed from Request to task

comment:5 Changed 3 days ago by nicklas

(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).

Note: See TracTickets for help on using tickets.