Changeset 1457


Ignore:
Timestamp:
Nov 10, 2011, 9:57:40 AM (10 years ago)
Author:
Martin Svensson
Message:

References #317, #330
Creation date is no longer set for lys-extracts
Sample date is now used to define Creation date-property for tubes

Location:
extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/PartitionRegistrationServlet.java

    r1456 r1457  
    200200                dc.saveItem(lysExtract);
    201201               
    202                 Reggie.setAnnotationValue(lysExtract, partitionDateType, partitionDate);               
     202                lysExtract.getCreationEvent().setEventDate(null);
     203                Reggie.setAnnotationValue(lysExtract, partitionDateType, partitionDate);
    203204               
    204205                // Set box position
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SpecimenTubeServlet.java

    r1413 r1457  
    241241        StringToDateConverter dateTimeConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd HHmm"));
    242242        StringToDateConverter dateConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd"));       
    243         Date samplingDate = dateTimeConverter.convert((String)jsonCase.get("samplingDate"));
     243        Date samplingDateTime = dateTimeConverter.convert((String)jsonCase.get("samplingDate"));
     244        Date createDate = dateConverter.convert((String)jsonCase.get("samplingDate"));
    244245        Date rnaLaterDate = dateTimeConverter.convert((String)jsonCase.get("rnaLaterDate"));
    245246        Date arrivalDate = dateConverter.convert((String)jsonCase.get("arrivalDate"));       
     
    268269            dc.saveItem(specimen);
    269270           
     271            specimen.getCreationEvent().setEventDate(createDate);
    270272            String operatorComment = Values.getStringOrNull((String)jsonSpec.get("operatorComment"));
    271273            String specimenTypeString = Values.getStringOrNull((String)jsonSpec.get("specimenType"));
     
    275277            if (arrivalDate != null) Reggie.setAnnotationValue(specimen, arrivalDateType, arrivalDate);           
    276278            if (laterality != null) Reggie.setAnnotationValue(specimen, lateralityType, laterality);
    277             if (samplingDate != null) Reggie.setAnnotationValue(specimen, samplingDateType, samplingDate);
     279            if (samplingDateTime != null) Reggie.setAnnotationValue(specimen, samplingDateType, samplingDateTime);
    278280            if (rnaLaterDate != null) Reggie.setAnnotationValue(specimen, rnaLaterDateType, rnaLaterDate);
    279281            if (padCase != null) Reggie.setAnnotationValue(specimen, padType, padCase);
Note: See TracChangeset for help on using the changeset viewer.