Changeset 5756


Ignore:
Timestamp:
Nov 26, 2019, 7:56:23 AM (3 years ago)
Author:
olle
Message:

Refs #1029. Registration of blood and FFPE blocks updated to set registered item as child item to the related case item, in an attempt to restore an item heritage structure, that will facilitate navigating the item tree in the BASE interface. The registered item will still have String annotation CASE_ID set to the case name, as currently much of the navigation functionality in MeLuDI for the new naming scheme is depending on this, but it might change in the future:

  1. Java servlet class/file BaseLineRegistrationServlet.java in src/net/sf/basedb/meludi/servlet/ updated:
    a. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "UpdateCase" to set a registered blood item as child item to the related case item.
    b. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterBloodSamples" to set a registered blood item as child item to the related case item.
    c. Protected method void doPost(HttpServletRequest req, HttpServletResponse resp) updated for command "RegisterFFPEBlocks" to set a registered FFPE block item as child item to the related case item.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.meludi/trunk/src/net/sf/basedb/meludi/servlet/BaseLineRegistrationServlet.java

    r5744 r5756  
    14691469            blood.setItemSubtype(Subtype.BLOOD.load(dc));
    14701470            blood.setName(itemName);
     1471            BioMaterialEvent creationEvent = blood.getCreationEvent();
     1472            if (theCase != null)
     1473            {
     1474              creationEvent.setSource(theCase);
     1475            }
     1476            // !IMPORTANT - The sampling date must be set here and as an 'SamplingDateTime' annotation
     1477            creationEvent.setEventDate(samplingDate);
    14711478            dc.saveItem(blood);
    1472             // !IMPORTANT - The sampling date must be set here and as an 'SamplingDateTime' annotation
    1473             BioMaterialEvent creationEvent = blood.getCreationEvent();
    1474             creationEvent.setEventDate(samplingDate);
    14751479
    14761480            // Update blood item with consent for case
     
    16631667            blood.setName(itemName);
    16641668            blood.setDescription(comment);
     1669            BioMaterialEvent creationEvent = blood.getCreationEvent();
     1670            if (theCase != null)
     1671            {
     1672              creationEvent.setSource(theCase.getSample());
     1673            }
    16651674            dc.saveItem(blood);
    16661675            // !IMPORTANT - The sampling date must be set here and as an 'SamplingDateTime' annotation
     
    18411850            ffpeBlock.setName(itemName);
    18421851            //ffpeBlock.setDescription(comment);
     1852            BioMaterialEvent creationEvent = ffpeBlock.getCreationEvent();
     1853            Case theCase = Case.findByName(dc, caseName);
     1854            if (theCase != null)
     1855            {
     1856              creationEvent.setSource(theCase.getSample());
     1857            }
    18431858            dc.saveItem(ffpeBlock);
    18441859
    18451860            // Update FFPE block item with consent for case
    1846             Case theCase = Case.findByName(dc, caseName);
    18471861            if (theCase != null)
    18481862            {
Note: See TracChangeset for help on using the changeset viewer.