Changeset 1389


Ignore:
Timestamp:
Sep 9, 2011, 3:37:01 PM (10 years ago)
Author:
Martin Svensson
Message:

References #317. Added two more annotations to specimen tubes and also some helpful features when selecting row/column in a box. Annotation:partition date was removed, cause it should be in the partition wizard instead.

Location:
extensions/net.sf.basedb.reggie/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/reggie.js

    r1359 r1389  
    143143function autoFillDate(shortDate)
    144144{
     145  shortDate = shortDate.replace("-","")
    145146  var fullDateString = shortDate;
    146147 
  • extensions/net.sf.basedb.reggie/trunk/resources/specimentube.jsp

    r1380 r1389  
    2828var caseIsValid = false;
    2929var arrivalDateIsValid = false;
    30 var partitionDateIsValid = false;
    3130var nofDeliveredTubesIsValid = true;
    3231var nofTubesIsValid = false;
     
    3433var boxesAreValid = null;
    3534var wellsAreValidValid = null;
     35var specimenTypeIsValid = false;
    3636var debug = false;
    3737var currentStep = 1;
     
    8585  var hasUnknownSpecimen = false;
    8686  var thisArrivalDate = null;
    87   var thisPartitionDate = null;
    8887  var thisNumberOfTubes = null;
    8988  var thisCaseSamplingDate = null;
     
    9190  var thisCaseLaterality = null;
    9291  var thisCasePad = null;
    93   var thisCasePathNote = null;
     92  var thisOtherPathNote = null;
     93  var thisSpecimenType = null;
     94  var thisBiopsyType = null;
    9495
    9596  frm.caseName.disabled = true;
     
    104105  // Load annotations from the actual case
    105106  thisCaseLaterality = caseInfo.laterality;
    106   thisCasePathNote = caseInfo.pathNote;
     107  thisOtherPathNote = caseInfo.otherPathNote;
    107108  thisCasePad = caseInfo.pad;
    108109  if (caseInfo.reasonIfNoSpecimen && caseInfo.reasonIfNoSpecimen.length>0)
     
    138139      {         
    139140        thisArrivalDate = specimen.arrivalDate;
    140       }
    141       if(specimen.partitionDate && !thisPartitionDate)
    142       {         
    143         thisPartitionDate = specimen.partitionDate;
    144141      }
    145142      if (specimen.nofTubes && !thisNumberOfTubes)
     
    155152        thisCaseRNALaterDate = specimen.rnaLaterDate;
    156153      }
    157       if (specimen.pathNote && !thisCasePathNote)
     154      if (specimen.otherPathNote && !thisOtherPathNote)
    158155      {
    159         thisCasePathNote = specimen.pathNote;
     156        thisOtherPathNote = specimen.otherPathNote;
    160157      }
    161158      if (specimen.laterality && !thisCaseLaterality)
     
    164161        if (specimen.laterality == 'RIGHT') hasRightSpecimen = true;
    165162        thisCaseLaterality = specimen.laterality;
    166       }
     163      }     
    167164      else if(!thisCaseLaterality)
    168165      {
    169166        hasUnknownSpecimen = true;
    170167      }
     168      if (specimen.specimenType && !thisSpecimenType)
     169      {
     170        thisSpecimenType = specimen.specimenType;
     171      }
     172      if (specimen.biopsyType && !thisBiopsyType)
     173      {
     174        thisBiopsyType = specimen.biopsyType;
     175      }     
    171176    }
    172177             
     
    205210    frm.arrivalDate.value = thisArrivalDate;
    206211  }
    207   if (thisPartitionDate != null)
    208   {
    209     frm.partitionDate.value = thisPartitionDate;
    210   }
    211212  if (thisNumberOfTubes != null)
    212213  {
     
    226227    rnaLaterDateTimeOnChange();
    227228  }
    228   if (thisCasePathNote != null)
    229   {
    230     frm.pathNote.value = thisCasePathNote;
    231   }
     229  if (thisOtherPathNote != null)
     230  {
     231    frm.otherPathNote.value = thisOtherPathNote;
     232  }
     233  if (thisSpecimenType != null)
     234  {
     235    Forms.selectListOption(frm.specimenType, thisSpecimenType);
     236    specimenTypeOnClick();
     237  }
     238  if (thisBiopsyType != null)
     239  {
     240    Forms.selectListOption(frm.biopsyType, thisBiopsyType);
     241    biopsyTypeOnClick();
     242  }
    232243  frm.nofTubes.focus();
    233244  currentStep = 2;   
     
    242253 
    243254  frm.arrivalDate.disabled = true;
    244   frm.partitionDate.disabled = true;
    245255  frm.nofTubes.disabled = true;
    246256  frm.pad.disabled = true;
     
    253263  frm.rnaLaterTime.disabled = true;
    254264  frm.samplingTime.disabled = true;
    255   frm.pathNote.disabled = true;
     265  frm.otherPathNote.disabled = true;
    256266 
    257267  if (updateMode)
     
    276286      boxValue = specimen.box == null ? '' : specimen.box;
    277287      rowValue = specimen.row == null ? '' : specimen.row;
    278       columnValue = specimen.column == null ? '' : specimen.column;
    279       spWeightValue = specimen.spWeight == null ? '' : specimen.spWeight;
    280       hisWeightValue = specimen.hisWeight == null ? '' : specimen.hisWeight;
    281       allPrepWeightValue = specimen.allPrepWeight == null ? '' : specimen.allPrepWeight;
     288      columnValue = specimen.column == null ? '' : specimen.column;     
    282289    }
    283290    inputTubeHtml += '<tr>';
     
    289296    inputTubeHtml += '<tr>';
    290297    inputTubeHtml += '<td class="subprompt">Box</td>';
    291     inputTubeHtml += '<td class="input"><input type="text" name='+box+' value="' + boxValue + '" '+ boxDisabled +' size="12" maxlength="12" onChange="boxOnChange('+i+')"></td>';
     298    inputTubeHtml += '<td class="input">';
     299    inputTubeHtml += '<input type="text" name='+box+' value="Sp' + boxValue + '" '+ boxDisabled +' size="12" maxlength="12" onKeyUp="boxOnKeyUp('+i+')" onChange="boxOnChange('+i+')"></td>';
    292300    inputTubeHtml += '<td class="status" id="'+box+'.status"></td>';
    293     inputTubeHtml += '<td class="help"><span id="'+box+'.message" class="message" style="display: none;"></span>Box the specimen tube is located in.</td>';   
     301    inputTubeHtml += '<td class="help"><span id="'+box+'.message" class="message" style="display: none;"></span>Box-number where the specimen tube is located in.</td>';   
    294302    inputTubeHtml += '</tr>';       
    295303
     
    308316    inputTubeHtml += '</tr>';
    309317
    310     var spWeight = 'spWeight'+i;
    311     inputTubeHtml += '<tr>';
    312     inputTubeHtml += '<td class="subprompt">Sp weight</td>';
    313     inputTubeHtml += '<td class="input"><input type="text" name='+spWeight+' value="' + spWeightValue + '" size="12" maxlength="10"></td>';
    314     inputTubeHtml += '<td class="status" id="'+spWeight+'.status"></td>';
    315     inputTubeHtml += '<td class="help"><span id="'+spWeight+'.message" class="message" style="display: none;"></span>[mg]</td>';   
    316     inputTubeHtml += '</tr>';
    317 
    318     var allPrep = 'allPrepWeight' + i;
    319     inputTubeHtml += '<tr>';
    320     inputTubeHtml += '<td class="subprompt">Allprep weight</td>';
    321     inputTubeHtml += '<td class="input"><input type="text" name='+allPrep+' value="'+allPrepWeightValue+'" size="12" maxlength="10"></td>';
    322     inputTubeHtml += '<td class="status" id="'+allPrep+'.status"></td>';
    323     inputTubeHtml += '<td class="help"><span id="'+allPrep+'.message" class="message" style="display: none;"></span>[mg]</td>';   
    324     inputTubeHtml += '</tr>';
    325    
    326     var his = 'hisWeight'+i;   
    327     inputTubeHtml += '<tr>';
    328     inputTubeHtml += '<td class="subprompt">His weight</td>';
    329     inputTubeHtml += '<td class="input"><input type="text" name='+his+' value="'+hisWeightValue+'" size="12" maxlength="10"></td>';
    330     inputTubeHtml += '<td class="status" id="his.status"></td>';
    331     inputTubeHtml += '<td class="help"><span id="'+his+'.message" class="message" style="display: none;"></span>[mg]</td>';   
    332     inputTubeHtml += '</tr>';   
    333 
    334318    var operatorComment = 'operatorComment'+i;
    335319    var doOnTab = i==(nofTubes-1) ? 'doOnTab(event, goCreate)' : '';
     
    346330  currentStep = 3;
    347331  Main.show('tubeSection');
    348   Main.hide('gonext');
     332  Main.hide('gonext'); 
    349333
    350334  if (updateMode) Main.show('goupdate');
    351335  else Main.show('gocreate');
    352336
    353   if (frm.box0.value == '') frm.box0.focus();
    354   else frm.his0.focus();
     337  if (frm.box0.value == 'Sp') frm.box0.focus();
     338  else frm.operatorComment0.focus();
    355339}
    356340
     
    358342{
    359343  var frm = document.forms['reggie'];
     344  var todaysDate = new Date();
    360345  samplingDateIsValid = false;
    361346  setInputStatus('samplingDate', '', '');
     
    377362      setInputStatus('samplingDate', 'Not a valid date', 'invalid');
    378363      return;
     364    }   
     365    if (todaysDate < new Date(samplingDate.substring(0,4),(samplingDate.substring(4,6)-1), samplingDate.substring(6)) )
     366    {
     367      setInputStatus('samplingDate', 'Future date is not valid', 'invalid');
     368      return;
    379369    }
    380370    if (frm.rnaLaterDate.value == '') frm.rnaLaterDate.value = samplingDate;
     
    388378  }
    389379  samplingDateIsValid = true;
     380}
     381
     382function boxOnKeyUp(tubeIndex)
     383{
     384  var frm = document.forms['reggie'];
     385  var boxName = 'box'+tubeIndex;
     386  var boxValue = frm.elements[boxName].value;
     387  if (boxValue.substring(0,2) != 'Sp')
     388  {
     389    boxValue = 'Sp'+boxValue;
     390  }
     391  frm.elements[boxName].value = boxValue;
    390392}
    391393
     
    397399  var columnName = 'column'+tubeIndex; 
    398400  var boxValue = frm.elements[boxName].value;
    399 
     401  var nofTubes = frm.nofTubes.value;
     402 
     403  boxValue = boxValue.substring(2);
     404  while (boxValue.length < 3)
     405  {   
     406    boxValue = '0'+boxValue;
     407  }
     408  boxValue = 'Sp'+boxValue;
     409  frm.elements[boxName].value = boxValue;
     410 
    400411  wellsAreValid[tubeIndex] = false;
    401412 
     
    407418    frm.elements[rowName].value = '';
    408419    frm.elements[columnName].disabled = true;
    409     frm.elements[columnName].value = '';
    410     frm.elements['his'+tubeIndex].focus();
     420    frm.elements[columnName].value = '';   
    411421    setInputStatus(boxName, '', ''); 
    412422    setInputStatus('rowColumn'+tubeIndex, '', '');       
     
    445455    frm.elements[rowName].disabled = false;
    446456    frm.elements[columnName].disabled = false;
    447     frm.elements[rowName].value = '';
    448     frm.elements[columnName].value = '';
     457   
     458    var nextWellRow = response.freeRow;
     459    var nextWellColumn = parseInt(response.freeColumn)+1;
     460   
     461    if( (nextWellColumn + tubeIndex) > response.columns)
     462    {
     463     
     464    }
     465    else
     466    {
     467      nextWellColumn + tubeIndex;
     468    }
     469   
     470    frm.elements[rowName].value = nextWellRow
     471    frm.elements[columnName].value = nextWellColumn;
    449472    setInputStatus('rowColumn'+tubeIndex,'Row[A-'+response.rows+'], Columns[1-'+response.columns+']','');
    450473    setInputStatus(boxName, '', 'valid');   
     
    515538{
    516539  var frm = document.forms['reggie'];
     540  var todaysDate = new Date();
    517541  rnaLaterDateIsValid = false;
    518542  setInputStatus('rnaLaterDate', '', '');
     
    524548  if (rnaLaterDate != '' || rnaLaterTime != '')
    525549  {
    526     // Auto-fill the date if it's only given with 4(MMdd) or 6(yyMMdd) digits.
     550    // Auto-fill the date if it's not given in yyyyMMdd
    527551    rnaLaterDate = autoFillDate(rnaLaterDate);
    528552    frm.rnaLaterDate.value = rnaLaterDate;
     
    536560      return;
    537561    }
     562    if (todaysDate < new Date(rnaLaterDate.substring(0,4),(rnaLaterDate.substring(4,6)-1), rnaLaterDate.substring(6)) )
     563    {
     564      setInputStatus('rnaLaterDate', 'Future date is not valid', 'invalid');
     565      return;
     566    }
    538567    rnaLaterTimestamp = Dates.parseString(rnaLaterDate + ' ' + rnaLaterTime, 'yyyyMMdd HHmm');
    539568    if (rnaLaterTimestamp == null)
     
    542571      return;
    543572    }
     573    if (samplingDateIsValid && rnaLaterTimestamp)
     574    {
     575      var samplingTimestamp = Dates.parseString(frm.samplingDate.value + ' ' + frm.samplingTime.value, 'yyyyMMdd Hmm');
     576      if (samplingTimestamp && rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
     577      {
     578        setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
     579        return;
     580      }
     581    }
    544582    setInputStatus('rnaLaterDate', '', 'valid');
    545583  }
    546584   
    547585  rnaLaterDateIsValid = true;
    548 
    549   if (samplingDateIsValid && rnaLaterTimestamp)
    550   {
    551     var samplingTimestamp = Dates.parseString(frm.samplingDate.value + ' ' + frm.samplingTime.value, 'yyyyMMdd Hmm');
    552     if (samplingTimestamp && rnaLaterTimestamp.getDate() != samplingTimestamp.getDate())
    553     {
    554       setInputStatus('rnaLaterDate', 'Sampling and RNA later dates are different', 'warning');
    555     }
    556   }
    557586}
    558587
     
    561590  var frm = document.forms['reggie'];
    562591  var arrivalDate = frm.arrivalDate.value;
     592  var todaysDate = new Date();
    563593  arrivalDateIsValid = false;
    564594
     
    575605      return;
    576606    }
     607    if (todaysDate < new Date(arrivalDate.substring(0,4), arrivalDate.substring(4,6), arrivalDate.substring(6)))
     608    {
     609      setInputStatus('arrivalDate', 'Future dates are not valid','invalid');
     610      return;
     611    }
    577612    setInputStatus('arrivalDate', '', 'valid');
    578613    arrivalDateIsValid = true;   
     
    584619}
    585620
    586 function partitionDateOnBlur()
    587 {
    588   var frm = document.forms['reggie'];
    589   var partitionDate = frm.partitionDate.value;
    590   partitionDateIsValid = false;
    591 
    592   setInputStatus('partitionDate', '', '');
    593 
    594   if (partitionDate != '')
    595   {
    596     partitionDate = autoFillDate(partitionDate);
    597     frm.partitionDate.value = partitionDate;
    598 
    599     if (!Dates.isDate(partitionDate, 'yyyyMMdd'))
    600     {
    601       setInputStatus('partitionDate', 'Not a valid date', 'invalid');
    602       return;
    603     }
    604     setInputStatus('partitionDate', '', 'valid');
    605     partitionDateIsValid = true;   
    606   }
    607   else
    608   {
    609     setInputStatus('partitionDate', 'Missing', 'warning');
    610   }
    611 }
    612 
    613621function nofTubesOnChange()
    614622{
     
    644652
    645653function lateralityOnChange()
    646 {
    647   // No specimen tubes?
    648   //if (!caseInfo.specimen || caseInfo.specimen.length == 0) return;
    649  
     654{
    650655  lateralityIsValid = false;
    651656 
     
    677682    }
    678683  }
     684}
     685
     686function specimenTypeOnClick()
     687{
     688  var frm = document.forms['reggie'];
     689  var selectedSpecimenType = frm.specimenType.value;
     690 
     691  specimenTypeIsValid = true;
     692  var specimenType = null;
     693  if (selectedSpecimenType != "")
     694  {
     695    specimenType = selectedSpecimenType;
     696  }
     697 
     698  for (var i=0; i<caseInfo.specimen.length; i++)
     699  {
     700    var specimen = caseInfo.specimen[i];
     701    if (specimen.specimenType != specimenType)
     702    {
     703      setInputStatus('specimenType', 'Specimen tubes are updated to: ' + specimenType, 'valid')         
     704      return;
     705    }
     706  }
     707  setInputStatus('specimenType', '', 'valid');
     708}
     709
     710function biopsyTypeOnClick()
     711{
     712  var frm = document.forms['reggie'];
     713  var selectedBiopsyType = frm.biopsyType.value;
     714  biopsyTypeIsValid = true;
     715  var biopsyType = null;
     716  if (selectedBiopsyType != "")
     717  {
     718    biopsyType = selectedBiopsyType;
     719  }
     720 
     721  for (var i=0; i<caseInfo.specimen.length; i++)
     722  {
     723    var specimen = caseInfo.specimen[i];
     724    if (specimen.biopsyType != biopsyType)
     725    {
     726      setInputStatus('biopsyType', 'Specimen tubes are updated to: ' + biopsyType, 'valid')         
     727      return;
     728    }
     729  }
     730  setInputStatus('biopsyType', '', 'valid');
    679731}
    680732
     
    711763  caseInfo.samplingDate = Main.trimString(frm.samplingDate.value + ' ' + frm.samplingTime.value);
    712764  caseInfo.rnaLaterDate = Main.trimString(frm.rnaLaterDate.value + ' ' + frm.rnaLaterTime.value);
    713   caseInfo.pathNote = frm.pathNote.value;
    714   caseInfo.arrivalDate = Main.trimString(frm.arrivalDate.value); 
    715   caseInfo.partitionDate = Main.trimString(frm.partitionDate.value);
     765  caseInfo.otherPathNote = frm.otherPathNote.value;
     766  caseInfo.arrivalDate = Main.trimString(frm.arrivalDate.value);
    716767 
    717768  var nofTubes = frm.nofTubes.value;
     
    725776    frm.elements['row'+i].disabled = true;
    726777    frm.elements['column'+i].disabled = true;
    727     frm.elements['spWeight'+i].disabled = true;
    728     frm.elements['allPrepWeight'+i].disabled = true;
    729     frm.elements['hisWeight'+i].disabled = true;
    730778    frm.elements['operatorComment'+i].disabled = true;
    731779   
     
    733781    if (frm.elements['row'+i].value != '') specimenTube.row = frm.elements['row'+i].value;
    734782    if (frm.elements['column'+i].value != '') specimenTube.column = frm.elements['column'+i].value;
    735     if (frm.elements['operatorComment'+i].value != '') specimenTube.operatorComment = frm.elements['operatorComment'+i].value; 
    736 
    737     if (frm.elements['spWeight'+i].value != '') specimenTube.spWeight = frm.elements['spWeight'+i].value;
    738     if (frm.elements['allPrepWeight'+i].value != '') specimenTube.allPrepWeight = frm.elements['allPrepWeight'+i].value;
    739     if (frm.elements['hisWeight'+i].value != '') specimenTube.hisWeight = frm.elements['hisWeight'+i].value;
     783    if (frm.elements['operatorComment'+i].value != '') specimenTube.operatorComment = frm.elements['operatorComment'+i].value;
     784    if (frm.specimenType.value != '') specimenTube.specimenType = frm.specimenType.value;
     785    if (frm.biopsyType.value != '') specimenTube.biopsyType = frm.biopsyType.value;
    740786   
    741787    caseInfo.specimen[i] = specimenTube;
     
    862908      <td class="help"><span id="arrivalDate.message" class="message" style="display:none"></span>Date when the specimen tubes arrived(YYYYMMDD or MMDD).</td>
    863909    </tr>
    864     <tr valign="top">
    865       <td class="prompt">Partition date</td>
    866       <td class="input"><input type="text" name="partitionDate"
    867         value="" size="12" maxlength="10" onblur="partitionDateOnBlur()"></td>
    868       <td class="status" id="partitionDate.status"></td>
    869       <td class="help"><span id="partitionDate.message" class="message" style="display:none"></span>Date when the specimen tubes were partitioned(YYYYMMDD or MMDD).</td>
    870     </tr>
    871910    <tr>
    872911      <td class="prompt">PAD</td>
     
    884923          onkeypress="focusOnEnter(event, 'rnaLaterDate')" onblur="samplingDateTimeOnChange()"></td>
    885924      <td class="status" id="samplingDate.status"></td>
    886       <td class="help"><span id="samplingDate.message" class="message" style="display: none;"></span>Date+time of surgical removal (YYYYMMDD, HHMM)</td>
     925      <td class="help"><span id="samplingDate.message" class="message" style="display: none;"></span>Date+time of surgical removal (YYYYMMDD, HHMM or MMDD, HMM)</td>
    887926    </tr>
    888927    <tr id="rnaLaterDateSection" valign="top">
     
    893932          onblur="rnaLaterDateTimeOnChange()"></td>
    894933      <td class="status" id="rnaLaterDate.status"></td>
    895       <td class="help"><span id="rnaLaterDate.message" class="message" style="display: none;"></span>Date+time of pathology handling (YYYYMMDD, HHMM)</td>
     934      <td class="help"><span id="rnaLaterDate.message" class="message" style="display: none;"></span>Date+time of pathology handling (YYYYMMDD, HHMM or MMDD, HMM)</td>
    896935    </tr>
    897936    <tr>
     
    906945    </tr>
    907946    <tr>
    908       <td class="prompt" id="pathNote.prompt">Path note</td>
    909       <td class="input" id="pathNote.input"><textarea rows="3" cols="30"
    910         name="pathNote" value="" onkeypress="doOnTab(event, goNext)"></textarea></td>
    911       <td class="status" id="pathNote.status"></td>
    912       <td class="help"><span id="pathNote.message" class="message" style="display: none;"></span></td>
     947      <td class="prompt" id="specimenType.prompt">Speciment type</td>
     948      <td class="input" id="specimenType.input">
     949        <select name="specimenType" onChange="specimenTypeOnClick()">
     950          <option selected value="Primary">Primary
     951          <option value="LymfnodeRegional">LymfnodeRegional         
     952          <option value="MetastasisDistant">MetastasisDistant
     953          <option value="RecurrenceLocal">RecurrenceLocal
     954          <option value="RecurrenceRegional">RecurrenceRegional
     955          <option value="" >unknown
     956        </select>
     957      </td>
     958      <td class="status" id="specimenType.status"></td>
     959      <td class="help"><span id="specimenType.message" class="message" style="display: none;"></span></td>
     960    </tr>
     961    <tr>
     962      <td class="prompt" id="biopsyType.prompt">Biopsy type</td>
     963      <td class="input" id="biopsyType.input">
     964        <select name="biopsyType" onChange="biopsyTypeOnClick()">
     965          <option value="SpecimenSurgery">SpecimenSurgery
     966          <option value="SpecimenCoreBiopsy">SpecimenCoreBiopsy
     967          <option value="SpecimenFineNeedleAspiration" >SpecimenFineNeedleAspiration       
     968          <option value="" >unknown
     969        </select>
     970      </td>
     971      <td class="status" id="biopsyType.status"></td>
     972      <td class="help"><span id="biopsyType.message" class="message" style="display: none;"></span></td>
     973    </tr>
     974   
     975    <tr>
     976      <td class="prompt" id="otherPathNote.prompt">Other path note</td>
     977      <td class="input" id="otherPathNote.input"><textarea rows="3" cols="30"
     978        name="otherPathNote" value="" onkeypress="doOnTab(event, goNext)"></textarea></td>
     979      <td class="status" id="otherPathNote.status"></td>
     980      <td class="help"><span id="otherPathNote.message" class="message" style="display: none;"></span></td>
    913981    </tr>
    914982    </table>
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/Reggie.java

    r1380 r1389  
    9696    used for samples (Case). It is a string annotation type.
    9797  */
    98   public static final String ANNOTATION_PATH_NOTE = "PathNote";
     98  public static final String ANNOTATION_OTHER_PATH_NOTE = "OtherPathNote";
    9999
    100100  /**
     
    129129  */
    130130  public static final String ANNOTATION_ARRIVAL_DATE = "ArrivalDate";
    131  
    132   /**
    133     The name of the "PartitionDate" annotation type, used
    134     for samples (Specimen tube). It is a timestamp annotation.
    135   */
    136   public static final String ANNOTATION_PARTITION_DATE = "PartitionDate";
     131   
    137132  /**
    138133    The name of the "NofDeliveredTubes" annotation type, used
     
    154149 
    155150  /**
    156     The name of the Sp-weight annotation type, use
    157     for samples (Specimen tube). It is a Float annotation type.
    158    */
    159   public static final String ANNOTATION_SP_WEIGTH = "SpWeight";
    160  
    161   /**
    162     The name of the allPrep-weight annotation type, use
    163     for samples (Specimen tube). It is a Float annotation type.
    164    */
    165   public static final String ANNOTATION_ALLPREP_WEIGTH = "AllPrepWeight";
    166  
    167   /**
    168     The name of the his-weight annotation type, use
    169     for samples (Specimen tube). It is a Float annotation type.
    170    */
    171   public static final String ANNOTATION_HIS_WEIGTH = "HisWeight";
     151    The name of the "SpecimenType" annotation type, used for
     152    samples (Specimen tube). It is a String enumeration annotation.
     153  */
     154  public static final String ANNOTATION_SPECIMEN_TYPE = "SpecimenType";
     155 
     156  /**
     157    The name of the "BiopsyType" annotation type, used for
     158    samples (Specimen tube). It is a String enumeration annotation.
     159  */
     160  public static final String ANNOTATION_BIOPSY_TYPE = "BiopsyType";
    172161 
    173162  /**
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/InstallServlet.java

    r1380 r1389  
    127127        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_ARRIVAL_DATE, Item.SAMPLE, Type.DATE, 1,
    128128            null, effectiveOptions, createIfMissing));
    129         jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_PARTITION_DATE, Item.SAMPLE, Type.DATE, 1,
    130             null, effectiveOptions, createIfMissing));
    131129        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_NOF_DELIVERED_TUBES, Item.SAMPLE, Type.INT, 1,
    132130            null, effectiveOptions, createIfMissing));
    133131        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_OPERATOR_COMMENT, Item.SAMPLE, Type.STRING, 1,
    134132            null, effectiveOptions, createIfMissing));
    135         jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_PATH_NOTE, Item.SAMPLE, Type.STRING, 1,
    136             null, effectiveOptions, createIfMissing));
    137         jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_ALLPREP_WEIGTH, Item.SAMPLE, Type.FLOAT, 1,
    138             null,effectiveOptions, createIfMissing));
    139         jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_SP_WEIGTH, Item.SAMPLE, Type.FLOAT, 1,
    140             null,effectiveOptions, createIfMissing));
    141         jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_HIS_WEIGTH, Item.SAMPLE, Type.FLOAT, 1,
    142             null,effectiveOptions, createIfMissing));
    143        
     133        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_OTHER_PATH_NOTE, Item.SAMPLE, Type.STRING, 1,
     134            null, effectiveOptions, createIfMissing));
     135        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_SPECIMEN_TYPE, Item.SAMPLE, Type.STRING, 1,
     136            new EnumerationOptions("Primary", "LymfnodeRegional", "MetastasisDistant", "RecurrenceLocal", "RecurrenceRegional"),
     137            effectiveOptions, createIfMissing));
     138        jsonChecks.add(checkAnnotationType(dc, Reggie.ANNOTATION_BIOPSY_TYPE, Item.SAMPLE, Type.STRING, 1,
     139            new EnumerationOptions("SpecimenSurgery", "SpecimenCoreBiopsy", "SpecimenFineNeedleAspiration"),
     140            effectiveOptions, createIfMissing));
     141               
    144142        json.put("checks", jsonChecks);
    145143      }
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/SpecimenTubeServlet.java

    r1380 r1389  
    8686          theCase.loadAnnotations(dc, "pad", Reggie.ANNOTATION_PAD_CASE, null);         
    8787          theCase.loadAnnotations(dc, "reasonIfNoSpecimen", Reggie.ANNOTATION_REASON_IF_NO_SPECIMEN, null);
    88           theCase.loadAnnotations(dc, "pathNote", Reggie.ANNOTATION_PATH_NOTE, null);
     88          theCase.loadAnnotations(dc, "pathNote", Reggie.ANNOTATION_OTHER_PATH_NOTE, null);
    8989         
    9090          jsonCase = theCase.asJSONObject();
     
    103103        AnnotationType samplingDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SAMPLING_DATETIME, true);
    104104        AnnotationType rnaLaterDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_RNALATER_DATETIME, true);
    105         AnnotationType arrivalDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ARRIVAL_DATE, true);
    106         AnnotationType partitionDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PARTITION_DATE, true);
     105        AnnotationType arrivalDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ARRIVAL_DATE, true);       
    107106        AnnotationType nofDeliveredTubesType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_NOF_DELIVERED_TUBES, true);
    108107        AnnotationType operatorCommentType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OPERATOR_COMMENT, true);
    109         AnnotationType pathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PATH_NOTE, true);
    110         AnnotationType spWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SP_WEIGTH, true);
    111         AnnotationType allPrepWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ALLPREP_WEIGTH, true);
    112         AnnotationType hisWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_HIS_WEIGTH, true);
    113                  
     108        AnnotationType pathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OTHER_PATH_NOTE, true);
     109        AnnotationType specimenType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SPECIMEN_TYPE, true);
     110        AnnotationType biopsyType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_BIOPSY_TYPE, true);
     111         
    114112        DateToStringConverter dateTimeConverter = new DateToStringConverter(new SimpleDateFormat("yyyyMMdd HHmm"));
    115113        DateToStringConverter dateConverter = new DateToStringConverter(new SimpleDateFormat("yyyyMMdd"));
     
    121119          tube.loadAnnotations("rnaLaterDate", rnaLaterDateType, dateTimeConverter);
    122120          tube.loadAnnotations("arrivalDate", arrivalDateType, dateConverter);
    123           tube.loadAnnotations("partitionDate", partitionDateType, dateConverter);
    124121          tube.loadAnnotations("nofTubes", nofDeliveredTubesType, null);
    125122          tube.loadAnnotations("operatorComment", operatorCommentType, null);
    126           tube.loadAnnotations("pathNote", pathNoteType, null);
    127           tube.loadAnnotations("allPrepWeight", allPrepWeightType, null);
    128           tube.loadAnnotations("spWeight", spWeightType, null);
    129           tube.loadAnnotations("hisWeight", hisWeightType, null);
    130          
     123          tube.loadAnnotations("otherPathNote", pathNoteType, null);
     124          tube.loadAnnotations("specimenType", specimenType, null);
     125          tube.loadAnnotations("biopsyType", biopsyType, null);
     126       
    131127          jsonTubes.add(tube.asJSONObject());
    132128        }       
     
    153149        else
    154150        {         
     151          BioPlate box = boxes.get(0);
    155152          WellCoordinateFormatter wcfRow = new WellCoordinateFormatter(true);
     153         
     154          int rowIndex = box.getRows()-1;
     155          boolean isLastEmpty = false;
     156          BioWell emptyWell = null;
     157          while (rowIndex >= 0 && !isLastEmpty)
     158          {
     159            int columnIndex = box.getColumns()-1;
     160            while (columnIndex >= 0 && !isLastEmpty)
     161            {
     162              if (box.getBioWell(rowIndex, columnIndex).isEmpty())
     163              {               
     164                emptyWell = box.getBioWell(rowIndex, columnIndex);
     165              }
     166              else
     167              {
     168                isLastEmpty = true;
     169              }
     170              columnIndex--;
     171            }
     172            rowIndex--;
     173          }
    156174         
    157175          json.put("boxInfo", boxes.get(0).getId());
    158176          json.put("rows", wcfRow.format(boxes.get(0).getRows()-1));
    159177          json.put("columns", boxes.get(0).getColumns());
     178          json.put("freeColumn", emptyWell.getColumn());
     179          json.put("freeRow", wcfRow.format(emptyWell.getRow()));         
    160180        }
    161181       
     
    236256        String laterality = Values.getStringOrNull((String)jsonCase.get("laterality"));       
    237257        String padCase = Values.getStringOrNull((String)jsonCase.get("pad"));       
    238         String pathNote = Values.getStringOrNull((String)jsonCase.get("pathNote"));
     258        String otherPathNote = Values.getStringOrNull((String)jsonCase.get("otherPathNote"));
    239259        StringToDateConverter dateTimeConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd HHmm"));
    240260        StringToDateConverter dateConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd"));       
    241261        Date samplingDate = dateTimeConverter.convert((String)jsonCase.get("samplingDate"));
    242262        Date rnaLaterDate = dateTimeConverter.convert((String)jsonCase.get("rnaLaterDate"));
    243         Date arrivalDate = dateConverter.convert((String)jsonCase.get("arrivalDate")); 
    244         Date partitionDate = dateConverter.convert((String)jsonCase.get("partitionDate"));
     263        Date arrivalDate = dateConverter.convert((String)jsonCase.get("arrivalDate"));       
    245264       
    246265        AnnotationType nofDeliveredTubesType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_NOF_DELIVERED_TUBES, true);
     
    248267        AnnotationType padCaseType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PAD_CASE, true);
    249268        AnnotationType lateralityType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_LATERALITY, true);
    250         AnnotationType pathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PATH_NOTE, true);
     269        AnnotationType pathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OTHER_PATH_NOTE, true);
    251270        AnnotationType samplingDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SAMPLING_DATETIME, true);
    252271        AnnotationType rnaLaterDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_RNALATER_DATETIME, true);
    253         AnnotationType arrivalDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ARRIVAL_DATE, true);
    254         AnnotationType partitionDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PARTITION_DATE, true);
     272        AnnotationType arrivalDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ARRIVAL_DATE, true);       
    255273        AnnotationType operatorCommentType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OPERATOR_COMMENT, true);
    256         AnnotationType spWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SP_WEIGTH, true);
    257         AnnotationType allPrepWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ALLPREP_WEIGTH, true);
    258         AnnotationType hisWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_HIS_WEIGTH, true);
     274        AnnotationType specimenType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SPECIMEN_TYPE, true);
     275        AnnotationType biopsyType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_BIOPSY_TYPE, true);
    259276       
    260277        // Checking if it is an existing case or a new should be created.
     
    264281         
    265282          if (laterality != null) Reggie.setAnnotationValue(theCase, lateralityType, laterality);
    266           if (arrivalDate != null) Reggie.setAnnotationValue(theCase, arrivalDateType, arrivalDate);
    267           if (partitionDate != null) Reggie.setAnnotationValue(theCase, partitionDateType, partitionDate);
    268           if (pathNote != null) Reggie.setAnnotationValue(theCase, pathNoteType, pathNote);       
    269           if (padCase != null) Reggie.appendAnnotationValueIfUnique(theCase, padCaseType, padCase);
     283          if (arrivalDate != null) Reggie.setAnnotationValue(theCase, arrivalDateType, arrivalDate);         
     284          if (otherPathNote != null) Reggie.setAnnotationValue(theCase, pathNoteType, otherPathNote);       
     285          if (padCase != null) Reggie.appendAnnotationValueIfUnique(theCase, padCaseType, padCase);         
    270286        }       
    271287       
     
    279295            Number specimenId = (Number)jsonSpec.get("id");
    280296            Sample specimen = Sample.getById(dc, specimenId.intValue());
    281            
    282             float originalQuantity = 0;
    283             Float spWeight = null;
    284             Float allPrepWeight = null;
    285             Float hisWeight = null;
    286             if (jsonSpec.get("spWeight") != null && jsonSpec.get("spWeight") != "")
    287             {
    288               spWeight = Values.getFloat(((String)jsonSpec.get("spWeight")));
    289             }
    290             if (jsonSpec.get("hisWeight") != null && jsonSpec.get("hisWeight") != "")
    291             {
    292               hisWeight = Values.getFloat((String)jsonSpec.get("hisWeight"));
    293             }
    294             if (jsonSpec.get("allPrepWeight") != null && jsonSpec.get("allPrepWeight") != "")
    295             {
    296               allPrepWeight = Values.getFloat((String)jsonSpec.get("allPrepWeight"));
    297             }
     297                       
    298298            String operatorComment = Values.getStringOrNull((String)jsonSpec.get("operatorComment"));
     299            String specimenTypeString = Values.getStringOrNull((String)jsonCase.get("specimenType"));
     300            String biopsyTypeString = Values.getStringOrNull((String)jsonCase.get("biopsyType"));
    299301           
    300302            Reggie.setAnnotationValue(specimen, nofDeliveredTubesType, nofTubes);
    301303            if (arrivalDate != null) Reggie.setAnnotationValue(specimen, arrivalDateType, arrivalDate);           
    302             if (partitionDate != null) Reggie.setAnnotationValue(specimen, partitionDateType, partitionDate);
    303304            if (laterality != null) Reggie.setAnnotationValue(specimen, lateralityType, laterality);
    304305            if (samplingDate != null) Reggie.setAnnotationValue(specimen, samplingDateType, samplingDate);
    305306            if (rnaLaterDate != null) Reggie.setAnnotationValue(specimen, rnaLaterDateType, rnaLaterDate);
    306307            if (padCase != null) Reggie.setAnnotationValue(specimen, padType, padCase);
    307             if (pathNote != null) Reggie.setAnnotationValue(specimen, pathNoteType, pathNote);           
    308             if (spWeight != null)
    309             {
    310               Reggie.setAnnotationValue(specimen, spWeightType, spWeight.floatValue());
    311               originalQuantity = originalQuantity + spWeight * 1000;
    312             }
    313             if (allPrepWeight != null)
    314             {
    315               Reggie.setAnnotationValue(specimen, allPrepWeightType, allPrepWeight.floatValue());
    316               originalQuantity = originalQuantity + allPrepWeight.floatValue() * 1000;
    317             }
    318             if (hisWeight != null)
    319             {
    320               Reggie.setAnnotationValue(specimen, hisWeightType, hisWeight.floatValue());
    321               originalQuantity = originalQuantity + hisWeight.floatValue() * 1000;
    322             }
    323             if (operatorComment != null) Reggie.setAnnotationValue(specimen, operatorCommentType, operatorComment);           
    324             if (originalQuantity > 0) specimen.setOriginalQuantity(originalQuantity);
    325            
     308            if (otherPathNote != null) Reggie.setAnnotationValue(specimen, pathNoteType, otherPathNote);
     309            if (operatorComment != null) Reggie.setAnnotationValue(specimen, operatorCommentType, operatorComment);
     310            if (specimenTypeString != null) Reggie.setAnnotationValue(specimen, specimenType, specimenTypeString);
     311            if (biopsyTypeString != null) Reggie.setAnnotationValue(specimen, biopsyType, biopsyTypeString);
     312                       
    326313            jsonMessages.add("Specimen tube '" + specimen.getName() + "' updated successfully.");
    327314          }
     
    339326        String laterality = Values.getStringOrNull((String)jsonCase.get("laterality"));       
    340327        String padCase = Values.getStringOrNull((String)jsonCase.get("pad"));
    341         String pathNote = Values.getStringOrNull((String)jsonCase.get("pathNote"));
     328        String otherPathNote = Values.getStringOrNull((String)jsonCase.get("pathNote"));
    342329        StringToDateConverter dateTimeConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd HHmm"));
    343330        StringToDateConverter dateConverter = new StringToDateConverter(new SimpleDateFormat("yyyyMMdd"));       
     
    345332        Date rnaLaterDate = dateTimeConverter.convert((String)jsonCase.get("rnaLaterDate"));
    346333        Date arrivalDate = dateConverter.convert((String)jsonCase.get("arrivalDate"));       
    347         Date partitionDate = dateConverter.convert((String)jsonCase.get("partitionDate"));
    348334       
    349335        AnnotationType nofDeliveredTubesType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_NOF_DELIVERED_TUBES, true);
    350         AnnotationType padType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PAD, true);
    351         AnnotationType padCaseType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PAD_CASE, true);
     336        AnnotationType padType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PAD, true);       
    352337        AnnotationType lateralityType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_LATERALITY, true);
    353         AnnotationType pathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PATH_NOTE, true);
     338        AnnotationType otherPathNoteType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OTHER_PATH_NOTE, true);
    354339        AnnotationType samplingDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SAMPLING_DATETIME, true);
    355340        AnnotationType rnaLaterDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_RNALATER_DATETIME, true);
    356341        AnnotationType arrivalDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ARRIVAL_DATE, true);
    357         AnnotationType partitionDateType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_PARTITION_DATE, true);
    358342        AnnotationType operatorCommentType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_OPERATOR_COMMENT, true);
    359         AnnotationType spWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SP_WEIGTH, true);
    360         AnnotationType allPrepWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_ALLPREP_WEIGTH, true);
    361         AnnotationType hisWeightType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_HIS_WEIGTH, true);
     343        AnnotationType specimenType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_SPECIMEN_TYPE, true);
     344        AnnotationType biopsyType = Reggie.findAnnotationType(dc, Item.SAMPLE, Reggie.ANNOTATION_BIOPSY_TYPE, true);
    362345       
    363346        JSONArray jsonSpecimen = (JSONArray)jsonCase.get("specimen");
    364        
     347               
    365348        if (jsonSpecimen != null && jsonSpecimen.size() > 0)
    366349        {
     
    373356            dc.saveItem(specimen);
    374357           
    375             float originalQuantity = 0;
    376             Float spWeight = null;
    377             Float allPrepWeight = null;
    378             Float hisWeight = null;
    379             if (jsonSpec.get("spWeight") != null && jsonSpec.get("spWeight") != "")
    380             {
    381               spWeight = Values.getFloat(((String)jsonSpec.get("spWeight")));
    382             }
    383             if (jsonSpec.get("hisWeight") != null && jsonSpec.get("hisWeight") != "")
    384             {
    385               hisWeight = Values.getFloat((String)jsonSpec.get("hisWeight"));
    386             }
    387             if (jsonSpec.get("allPrepWeight") != null && jsonSpec.get("allPrepWeight") != "")
    388             {
    389               allPrepWeight = Values.getFloat((String)jsonSpec.get("allPrepWeight"));
    390             }
    391            
    392358            String operatorComment = Values.getStringOrNull((String)jsonSpec.get("operatorComment"));
     359            String specimenTypeString = Values.getStringOrNull((String)jsonSpec.get("specimenType"));
     360            String biopsyTypeString = Values.getStringOrNull((String)jsonSpec.get("biopsyType"));
    393361           
    394362            Reggie.setAnnotationValue(specimen, nofDeliveredTubesType, nofTubes);
    395             if (arrivalDate != null) Reggie.setAnnotationValue(specimen, arrivalDateType, arrivalDate);
    396             if (partitionDate != null) Reggie.setAnnotationValue(specimen, partitionDateType, partitionDate);
     363            if (arrivalDate != null) Reggie.setAnnotationValue(specimen, arrivalDateType, arrivalDate);           
    397364            if (laterality != null) Reggie.setAnnotationValue(specimen, lateralityType, laterality);
    398365            if (samplingDate != null) Reggie.setAnnotationValue(specimen, samplingDateType, samplingDate);
    399366            if (rnaLaterDate != null) Reggie.setAnnotationValue(specimen, rnaLaterDateType, rnaLaterDate);
    400367            if (padCase != null) Reggie.setAnnotationValue(specimen, padType, padCase);
    401             if (pathNote != null) Reggie.setAnnotationValue(specimen, pathNoteType, pathNote);
    402            
    403             if (spWeight != null)
    404             {             
    405               System.out.println("sp: " + spWeight);
    406               Reggie.setAnnotationValue(specimen, spWeightType, spWeight.floatValue());
    407               originalQuantity = originalQuantity + spWeight * 1000;
    408             }
    409             if (allPrepWeight != null)
    410             {
    411               Reggie.setAnnotationValue(specimen, allPrepWeightType, allPrepWeight.floatValue());
    412               originalQuantity = originalQuantity + allPrepWeight.floatValue() * 1000;
    413             }
    414             if (hisWeight != null)
    415             {
    416               Reggie.setAnnotationValue(specimen, hisWeightType, hisWeight.floatValue());
    417               originalQuantity = originalQuantity + hisWeight.floatValue() * 1000;
    418             }
    419             if (operatorComment != null) Reggie.setAnnotationValue(specimen, operatorCommentType, operatorComment);           
    420             if (originalQuantity > 0) specimen.setOriginalQuantity(originalQuantity);
     368            if (otherPathNote != null) Reggie.setAnnotationValue(specimen, otherPathNoteType, otherPathNote);
     369            if (specimenTypeString != null ) Reggie.setAnnotationValue(specimen, specimenType, specimenTypeString);
     370            if (biopsyTypeString != null) Reggie.setAnnotationValue(specimen, biopsyType,biopsyTypeString);
     371                       
     372            if (operatorComment != null) Reggie.setAnnotationValue(specimen, operatorCommentType, operatorComment);
    421373           
    422374            // Set biowell if it is specified for this tube
Note: See TracChangeset for help on using the changeset viewer.