Opened 11 years ago

Closed 11 years ago

#491 closed defect (fixed)

Laterality is not stored for NoSpecimen items in some cases

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: Reggie v2.12
Component: net.sf.basedb.reggie Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

The scenario we have found so far is:

  1. A SpecimenCoreBiopsy is registered with a given laterality
  2. A Patient and Case is registered with the same laterality
  3. Some time later referral form is received but no speciemen
  4. The registration wizard allow the user to select laterality, and pre-selects the laterality of the existing SpecimenCoreBiopsy item. If the user changes the laterality everything is created as expected and the existing items are updated.
  5. If the user leaves the laterality unchanged (most common case) the NoSpecimen item is created but no laterality is set.

Workaround is to manually set the laterality on the NoSpecimen item.

Regarding step 4 in the procedure above: The wizard gives no indication that an existing specimen has been registered already and no warning if the laterality is modified. This could be improved.

Change History (3)

comment:1 by Nicklas Nordborg, 11 years ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 11 years ago

We need to manually fix items that already has been registered with different laterality. To find those items, use the following SQL:

select cse.id as CaseId, cse.name as CaseName, cseLat.value as CaseLaterality, 
spec.name as SpecName, specLat.value as SpecLaterality

from `BioMaterials` cse
inner join `BioMaterials` spec on spec.parent_id=cse.id

left join `Annotations` cseA 
  on cseA.annotationset_id=cse.annotationset_id and cseA.annotationtype_id=12
left join `StringValues` cseLat 
  on cseLat.id=cseA.value_id

left join `Annotations` specA 
  on specA.annotationset_id=spec.annotationset_id and specA.annotationtype_id=12
left join `StringValues` specLat 
  on specLat.id=specA.value_id


where 
  cse.subtype_id=47 and (spec.subtype_id=48 or spec.subtype_id=60) 
and 
  ifnull(cseLat.value, 'unknown') <> ifnull(specLat.value, 'unknown')

comment:3 by Nicklas Nordborg, 11 years ago

Resolution: fixed
Status: newclosed

(In [1981]) Fixes #491: Laterality is not stored for NoSpecimen items in some cases

Laterality should now be set on all new NoSpecimen items. Also updated the registration wizard to display some information about existing core biopsies when updating a case.

Note: See TracTickets for help on using tickets.