3225 |
02 Apr 15 |
olle |
var ExtractionFormCopy = function() |
3225 |
02 Apr 15 |
olle |
2 |
{ |
3225 |
02 Apr 15 |
olle |
var exreg = {}; |
3225 |
02 Apr 15 |
olle |
var debug = 0; |
3225 |
02 Apr 15 |
olle |
5 |
|
3225 |
02 Apr 15 |
olle |
exreg.REAGENTS = [ |
3225 |
02 Apr 15 |
olle |
'xyleneSpecimen', 'etoh995Specimen', 'bufferPkdSpecimen', 'bufferAtlSpecimen', |
3225 |
02 Apr 15 |
olle |
'proteinaseKSpecimen', 'rnaseASpecimen', 'allPrepFfpeKit', 'etoh995', |
3225 |
02 Apr 15 |
olle |
'bufferRlt', 'bufferFrn', 'bufferRpe', 'bufferAl', |
3225 |
02 Apr 15 |
olle |
'bufferAw1', 'bufferAw2', 'bufferAte', 'bufferRdd', |
3324 |
11 May 15 |
olle |
'rnaseFreeWater', 'dnaseMix', 'rneasyMinEluteSpinColumn', 'qiaampMinEluteSpinColumn', |
3438 |
03 Jul 15 |
olle |
'kapaSybrFast', 'qualityControlPrimersQcpRgt', 'qualityControlTemplateQct', 'qubitDnaHighSens', 'qubitDnaBroadRange' |
3225 |
02 Apr 15 |
olle |
13 |
]; |
3225 |
02 Apr 15 |
olle |
14 |
|
3225 |
02 Apr 15 |
olle |
15 |
|
3225 |
02 Apr 15 |
olle |
var DEFAULT_EXTRACTION_PROTOCOL_NAME_START = 'Extraction_using_Allprep_DNA_RNA_FFPE_kit_with_overnight_proteinaseK_incubation.v'; |
3225 |
02 Apr 15 |
olle |
var DEFAULT_RNA_VOLUME = 25; |
3234 |
09 Apr 15 |
olle |
var DEFAULT_DNA_VOLUME = 25; |
3225 |
02 Apr 15 |
olle |
var MINIMAL_PRE_NORMALIZE_QUANTITY = 1.1; // µg |
3225 |
02 Apr 15 |
olle |
var protocolMap = {}; |
3225 |
02 Apr 15 |
olle |
21 |
|
3225 |
02 Apr 15 |
olle |
var extraItemsList = []; |
3354 |
27 May 15 |
olle |
var qiacubeSortedPrefixes = 'BCADEFGHIJKLMNOPQRSTUVWXYZ'; |
3225 |
02 Apr 15 |
olle |
var qiacubeDateIsAfterIsolationDate = true; |
3225 |
02 Apr 15 |
olle |
var qiacubeRunNoIsValid = false; |
3225 |
02 Apr 15 |
olle |
var qiacubePositionsAreValid = false; |
3225 |
02 Apr 15 |
olle |
var counterBalanceInfoRow = false; |
3225 |
02 Apr 15 |
olle |
var createdRna = []; |
3225 |
02 Apr 15 |
olle |
29 |
|
3225 |
02 Apr 15 |
olle |
// Page initialization |
3225 |
02 Apr 15 |
olle |
exreg.initPage = function() |
3225 |
02 Apr 15 |
olle |
32 |
{ |
3225 |
02 Apr 15 |
olle |
// Step 1 |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('step-1', 'wizard-validate', exreg.validateStep1); |
3225 |
02 Apr 15 |
olle |
35 |
|
3225 |
02 Apr 15 |
olle |
// Step 2 |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('step-2', 'wizard-initialize', exreg.initializeStep2); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('step-2', 'wizard-validate', exreg.validateStep2); |
3225 |
02 Apr 15 |
olle |
39 |
|
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('isolationDate', 'change', Wizard.validateDate); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('qiacubeDate', 'change', Wizard.validateDate); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('isolationDate', 'change', exreg.qiacubeDateOnChange); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('qiacubeDate', 'change', exreg.qiacubeDateOnChange); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('qiacubeRunNo', 'change', exreg.qiacubeRunNoOnChange); |
3225 |
02 Apr 15 |
olle |
45 |
|
3332 |
12 May 15 |
olle |
Buttons.addClickHandler('downloadReagentLotNoFile', exreg.downloadReagentLotNoFile); |
3332 |
12 May 15 |
olle |
47 |
|
3225 |
02 Apr 15 |
olle |
// Step 3 |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('step-3', 'wizard-initialize', exreg.initializeStep3); |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('step-3', 'wizard-validate', exreg.validateStep3); |
3225 |
02 Apr 15 |
olle |
51 |
|
3231 |
08 Apr 15 |
olle |
Buttons.addClickHandler('downloadSampleIdFile', exreg.downloadSampleIdFile); |
3231 |
08 Apr 15 |
olle |
Buttons.addClickHandler('downloadQPcrSampleIdFile', exreg.downloadQPcrSampleIdFile); |
3231 |
08 Apr 15 |
olle |
54 |
|
3225 |
02 Apr 15 |
olle |
// Navigation |
3225 |
02 Apr 15 |
olle |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
3225 |
02 Apr 15 |
olle |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
3225 |
02 Apr 15 |
olle |
Buttons.addClickHandler('gocreate', exreg.createProtocol); |
3225 |
02 Apr 15 |
olle |
59 |
|
3225 |
02 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3432 |
29 Jun 15 |
olle |
url += '&cmd=GetStartItemLists'; |
3254 |
17 Apr 15 |
olle |
url += '&orderDesc=true'; |
3225 |
02 Apr 15 |
olle |
Wizard.showLoadingAnimation('Loading unprocessed items...'); |
3225 |
02 Apr 15 |
olle |
Wizard.asyncJsonRequest(url, exreg.initializeStep1); |
3225 |
02 Apr 15 |
olle |
65 |
} |
3225 |
02 Apr 15 |
olle |
66 |
|
3225 |
02 Apr 15 |
olle |
exreg.initializeStep1 = function(response) |
3225 |
02 Apr 15 |
olle |
68 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var itemLists = response.itemLists; |
3225 |
02 Apr 15 |
olle |
71 |
|
3432 |
29 Jun 15 |
olle |
var startList = frm.startList; |
3432 |
29 Jun 15 |
olle |
if (itemLists.length > 0) |
3225 |
02 Apr 15 |
olle |
74 |
{ |
3432 |
29 Jun 15 |
olle |
for (var i=0; i < itemLists.length; i++) |
3225 |
02 Apr 15 |
olle |
76 |
{ |
3432 |
29 Jun 15 |
olle |
var itemList = itemLists[i]; |
3432 |
29 Jun 15 |
olle |
var name = (i+1) + ': ' + Strings.encodeTags(itemList.name); |
3432 |
29 Jun 15 |
olle |
if (itemList.sourceItemNames) |
3225 |
02 Apr 15 |
olle |
80 |
{ |
3225 |
02 Apr 15 |
olle |
name += ' -- ('; |
3432 |
29 Jun 15 |
olle |
name += itemList.numMeludiItems; |
3432 |
29 Jun 15 |
olle |
name += ' + ' + itemList.numExtraItems; |
3225 |
02 Apr 15 |
olle |
name += ')'; |
3225 |
02 Apr 15 |
olle |
85 |
} |
3432 |
29 Jun 15 |
olle |
if (itemList.extractionDate) |
3254 |
17 Apr 15 |
olle |
87 |
{ |
3432 |
29 Jun 15 |
olle |
name += ' -- [' + exreg.asDate(itemList.extractionDate) + ']'; |
3254 |
17 Apr 15 |
olle |
89 |
} |
3432 |
29 Jun 15 |
olle |
var selected = i == (itemLists.length - 1); |
3432 |
29 Jun 15 |
olle |
var option = new Option(name, itemList.id, selected, selected); |
3432 |
29 Jun 15 |
olle |
option.itemList = itemList; |
3432 |
29 Jun 15 |
olle |
startList.options[startList.length] = option; |
3225 |
02 Apr 15 |
olle |
94 |
} |
3432 |
29 Jun 15 |
olle |
startList.options[0].selected = true; |
3225 |
02 Apr 15 |
olle |
96 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
98 |
{ |
3432 |
29 Jun 15 |
olle |
Wizard.setFatalError('No start lists available.'); |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
101 |
} |
3225 |
02 Apr 15 |
olle |
Doc.show('step-1'); |
3225 |
02 Apr 15 |
olle |
Doc.show('gonext'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('extractSourceItems'); |
3225 |
02 Apr 15 |
olle |
105 |
} |
3225 |
02 Apr 15 |
olle |
106 |
|
3225 |
02 Apr 15 |
olle |
exreg.validateStep1 = function(event) |
3225 |
02 Apr 15 |
olle |
108 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var startList = null; |
3432 |
29 Jun 15 |
olle |
for (var i = 0; i < frm.startList.length; i++) |
3225 |
02 Apr 15 |
olle |
112 |
{ |
3432 |
29 Jun 15 |
olle |
if (frm.startList[i].selected) |
3225 |
02 Apr 15 |
olle |
114 |
{ |
3432 |
29 Jun 15 |
olle |
startList = frm.startList[i]; |
3225 |
02 Apr 15 |
olle |
116 |
} |
3225 |
02 Apr 15 |
olle |
117 |
} |
3432 |
29 Jun 15 |
olle |
if (startList == null) |
3225 |
02 Apr 15 |
olle |
119 |
{ |
3225 |
02 Apr 15 |
olle |
event.preventDefault(); |
3225 |
02 Apr 15 |
olle |
121 |
} |
3225 |
02 Apr 15 |
olle |
122 |
} |
3225 |
02 Apr 15 |
olle |
123 |
|
3225 |
02 Apr 15 |
olle |
exreg.initializeStep2 = function() |
3225 |
02 Apr 15 |
olle |
125 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var startItemList = null; |
3432 |
29 Jun 15 |
olle |
for (var i = 0; i < frm.startList.length; i++) |
3225 |
02 Apr 15 |
olle |
129 |
{ |
3432 |
29 Jun 15 |
olle |
if (frm.startList[i].selected) |
3225 |
02 Apr 15 |
olle |
131 |
{ |
3432 |
29 Jun 15 |
olle |
startItemList = frm.startList[i]; |
3225 |
02 Apr 15 |
olle |
133 |
} |
3225 |
02 Apr 15 |
olle |
134 |
} |
3432 |
29 Jun 15 |
olle |
if (startItemList == null) |
3225 |
02 Apr 15 |
olle |
136 |
{ |
3432 |
29 Jun 15 |
olle |
//alert("exreg.validateStep1(): startItemList == null"); |
3225 |
02 Apr 15 |
olle |
event.preventDefault(); |
3225 |
02 Apr 15 |
olle |
139 |
} |
3225 |
02 Apr 15 |
olle |
140 |
|
3432 |
29 Jun 15 |
olle |
frm.startList.disabled = true; |
3225 |
02 Apr 15 |
olle |
142 |
/* |
3225 |
02 Apr 15 |
olle |
frm.rnaDefaultVolume.value = DEFAULT_RNA_VOLUME; |
3225 |
02 Apr 15 |
olle |
frm.dnaDefaultVolume.value = DEFAULT_DNA_VOLUME; |
3225 |
02 Apr 15 |
olle |
145 |
*/ |
3225 |
02 Apr 15 |
olle |
146 |
|
3225 |
02 Apr 15 |
olle |
Wizard.setCurrentStep(2); |
3225 |
02 Apr 15 |
olle |
Doc.show('gocancel'); |
3225 |
02 Apr 15 |
olle |
Doc.show('gonext'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('extractionProtocolId'); |
3501 |
21 Sep 15 |
olle |
151 |
/* |
3225 |
02 Apr 15 |
olle |
Doc.hide('rnaDefaultVolumeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('dnaDefaultVolumeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('xyleneSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('etoh995SpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferPkdSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferAtlSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('proteinaseKSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('rnaseASpecimenSection'); |
3225 |
02 Apr 15 |
olle |
160 |
|
3225 |
02 Apr 15 |
olle |
Doc.hide('etoh995Section'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferRltSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferFrnSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferRpeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferAlSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferAw1Section'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferAw2Section'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferAteSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('bufferRddSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('rnaseFreeWaterSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('dnaseMixSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('rneasyMinEluteSpinColumnSection'); |
3225 |
02 Apr 15 |
olle |
Doc.hide('qiaampMinEluteSpinColumnSection'); |
3225 |
02 Apr 15 |
olle |
174 |
|
3324 |
11 May 15 |
olle |
Doc.hide('kapaSybrFastSection'); |
3324 |
11 May 15 |
olle |
Doc.hide('qualityControlPrimersQcpRgtSection'); |
3438 |
03 Jul 15 |
olle |
Doc.hide('qualityControlTemplateQctSection'); |
3324 |
11 May 15 |
olle |
Doc.hide('qubitDnaHighSensSection'); |
3324 |
11 May 15 |
olle |
Doc.hide('qubitDnaBroadRangeSection'); |
3501 |
21 Sep 15 |
olle |
180 |
*/ |
3324 |
11 May 15 |
olle |
181 |
|
3225 |
02 Apr 15 |
olle |
frm.isolationDate.focus(); |
3225 |
02 Apr 15 |
olle |
Events.sendChangeEvent('isolationDate'); |
3225 |
02 Apr 15 |
olle |
Events.sendChangeEvent('qiacubeDate'); |
3225 |
02 Apr 15 |
olle |
185 |
|
3225 |
02 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3432 |
29 Jun 15 |
olle |
url += '&cmd=GetSourceItemListFromStartItemList'; |
3432 |
29 Jun 15 |
olle |
url += '&startItemListId='+startItemList.value; |
3225 |
02 Apr 15 |
olle |
Wizard.asyncJsonRequest(url, exreg.sourceItemListLoaded); |
3225 |
02 Apr 15 |
olle |
190 |
} |
3225 |
02 Apr 15 |
olle |
191 |
|
3225 |
02 Apr 15 |
olle |
exreg.sourceItemListLoaded = function(response) |
3225 |
02 Apr 15 |
olle |
193 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
195 |
|
3432 |
29 Jun 15 |
olle |
var startItemList = response.startitemlist; |
3225 |
02 Apr 15 |
olle |
var specimens = response.specimens; |
3225 |
02 Apr 15 |
olle |
var rnas = response.rnas; |
3225 |
02 Apr 15 |
olle |
var dnas = response.dnas; |
3225 |
02 Apr 15 |
olle |
var items = response.items; |
3432 |
29 Jun 15 |
olle |
var startListIsProcessed = false; |
3245 |
14 Apr 15 |
olle |
extraItemsList = response.extraitems; |
3225 |
02 Apr 15 |
olle |
//alert("exreg.sourceItemListLoaded(): specimens.length = " + specimens.length + " rnas.length = " + rnas.length + " dnas.length = " + dnas.length); |
3225 |
02 Apr 15 |
olle |
204 |
|
3432 |
29 Jun 15 |
olle |
if (startItemList) |
3225 |
02 Apr 15 |
olle |
206 |
{ |
3225 |
02 Apr 15 |
olle |
// Extraction parameters |
3432 |
29 Jun 15 |
olle |
frm.startListName.value = startItemList.name; |
3501 |
21 Sep 15 |
olle |
209 |
|
3225 |
02 Apr 15 |
olle |
// Extraction parameters |
3432 |
29 Jun 15 |
olle |
frm.isolationDate.value = startItemList.isolationDate; |
3501 |
21 Sep 15 |
olle |
frm.extractionOperator.value = startItemList.extractionOperator; |
3432 |
29 Jun 15 |
olle |
frm.extractionProtocolId.value = startItemList.extractionProtocolId; |
3432 |
29 Jun 15 |
olle |
frm.extractionProtocolName.value = startItemList.extractionProtocolName; |
3432 |
29 Jun 15 |
olle |
if (startItemList.extractionDate) |
3225 |
02 Apr 15 |
olle |
216 |
{ |
3432 |
29 Jun 15 |
olle |
startListIsProcessed = true; |
3225 |
02 Apr 15 |
olle |
218 |
} |
3432 |
29 Jun 15 |
olle |
//alert("exreg.sourceItemListLoaded(): startItemList.name = " + startItemList.name + " startItemList.extractionDate = " + startItemList.extractionDate); |
3432 |
29 Jun 15 |
olle |
if (startListIsProcessed) |
3225 |
02 Apr 15 |
olle |
221 |
{ |
3432 |
29 Jun 15 |
olle |
frm.rnaDefaultVolume.value = startItemList.rnaDefaultVolume; |
3432 |
29 Jun 15 |
olle |
frm.dnaDefaultVolume.value = startItemList.dnaDefaultVolume; |
3225 |
02 Apr 15 |
olle |
224 |
} |
3225 |
02 Apr 15 |
olle |
// QIAcube parameters |
3432 |
29 Jun 15 |
olle |
frm.qiacubeDate.value = startItemList.qiacubeDate; |
3501 |
21 Sep 15 |
olle |
frm.qiacubeOperator.value = startItemList.qiacubeOperator; |
3432 |
29 Jun 15 |
olle |
frm.qiacubePrimaryPrefix.value = startItemList.qiacubePrimaryPrefix; |
3432 |
29 Jun 15 |
olle |
frm.qiacubeSecondaryPrefix.value = startItemList.qiacubeSecondaryPrefix; |
3432 |
29 Jun 15 |
olle |
frm.qiacubeRunNo.value = startItemList.qiacubeRunNo; |
3501 |
21 Sep 15 |
olle |
231 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
frm.xyleneSpecimen.value = startItemList.xyleneSpecimen; |
3501 |
21 Sep 15 |
olle |
frm.etoh995Specimen.value = startItemList.etoh995Specimen; |
3432 |
29 Jun 15 |
olle |
frm.allPrepFfpeKit.value = startItemList.allPrepFfpeKit; |
3501 |
21 Sep 15 |
olle |
frm.bufferPkdSpecimen.value = startItemList.bufferPkdSpecimen; |
3501 |
21 Sep 15 |
olle |
frm.bufferAtlSpecimen.value = startItemList.bufferAtlSpecimen; |
3501 |
21 Sep 15 |
olle |
frm.proteinaseKSpecimen.value = startItemList.proteinaseKSpecimen; |
3501 |
21 Sep 15 |
olle |
frm.rnaseASpecimen.value = startItemList.rnaseASpecimen; |
3225 |
02 Apr 15 |
olle |
240 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
frm.etoh995.value = startItemList.etoh995; |
3501 |
21 Sep 15 |
olle |
frm.bufferRlt.value = startItemList.bufferRlt; |
3501 |
21 Sep 15 |
olle |
frm.bufferFrn.value = startItemList.bufferFrn; |
3501 |
21 Sep 15 |
olle |
frm.bufferRpe.value = startItemList.bufferRpe; |
3501 |
21 Sep 15 |
olle |
frm.bufferAl.value = startItemList.bufferAl; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw1.value = startItemList.bufferAw1; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw2.value = startItemList.bufferAw2; |
3501 |
21 Sep 15 |
olle |
frm.bufferAte.value = startItemList.bufferAte; |
3501 |
21 Sep 15 |
olle |
frm.bufferRdd.value = startItemList.bufferRdd; |
3501 |
21 Sep 15 |
olle |
frm.rnaseFreeWater.value = startItemList.rnaseFreeWater; |
3501 |
21 Sep 15 |
olle |
frm.dnaseMix.value = startItemList.dnaseMix; |
3501 |
21 Sep 15 |
olle |
frm.rneasyMinEluteSpinColumn.value = startItemList.rneasyMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
frm.qiaampMinEluteSpinColumn.value = startItemList.qiaampMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
255 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
frm.kapaSybrFast.value = startItemList.kapaSybrFast; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlPrimersQcpRgt.value = startItemList.qualityControlPrimersQcpRgt; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlTemplateQct.value = startItemList.qualityControlTemplateQct; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaHighSens.value = startItemList.qubitDnaHighSens; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaBroadRange.value = startItemList.qubitDnaBroadRange; |
3501 |
21 Sep 15 |
olle |
262 |
|
3225 |
02 Apr 15 |
olle |
// Disable input fields |
3225 |
02 Apr 15 |
olle |
264 |
|
3225 |
02 Apr 15 |
olle |
// Extraction parameters |
3432 |
29 Jun 15 |
olle |
frm.startListName.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.isolationDate.disabled = true; |
3501 |
21 Sep 15 |
olle |
frm.extractionOperator.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.extractionProtocolName.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.rnaDefaultVolume.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.dnaDefaultVolume.disabled = true; |
3225 |
02 Apr 15 |
olle |
272 |
|
3225 |
02 Apr 15 |
olle |
// Specimen reagents |
3225 |
02 Apr 15 |
olle |
frm.xyleneSpecimen.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.etoh995Specimen.disabled = true; |
3501 |
21 Sep 15 |
olle |
frm.allPrepFfpeKit.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferPkdSpecimen.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferAtlSpecimen.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.proteinaseKSpecimen.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.rnaseASpecimen.disabled = true; |
3225 |
02 Apr 15 |
olle |
281 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube parameters |
3225 |
02 Apr 15 |
olle |
frm.qiacubeDate.disabled = true; |
3501 |
21 Sep 15 |
olle |
frm.qiacubeOperator.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.qiacubePrimaryPrefix.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.qiacubeSecondaryPrefix.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.qiacubeRunNo.disabled = true; |
3225 |
02 Apr 15 |
olle |
288 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube reagents |
3225 |
02 Apr 15 |
olle |
frm.etoh995.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferRlt.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferFrn.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferRpe.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferAl.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferAw1.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferAw2.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferAte.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.bufferRdd.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.rnaseFreeWater.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.dnaseMix.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.rneasyMinEluteSpinColumn.disabled = true; |
3225 |
02 Apr 15 |
olle |
frm.qiaampMinEluteSpinColumn.disabled = true; |
3324 |
11 May 15 |
olle |
303 |
|
3324 |
11 May 15 |
olle |
// Quality control reagents |
3324 |
11 May 15 |
olle |
frm.kapaSybrFast.disabled = true; |
3324 |
11 May 15 |
olle |
frm.qualityControlPrimersQcpRgt.disabled = true; |
3438 |
03 Jul 15 |
olle |
frm.qualityControlTemplateQct.disabled = true; |
3324 |
11 May 15 |
olle |
frm.qubitDnaHighSens.disabled = true; |
3324 |
11 May 15 |
olle |
frm.qubitDnaBroadRange.disabled = true; |
3225 |
02 Apr 15 |
olle |
310 |
} |
3225 |
02 Apr 15 |
olle |
311 |
|
3225 |
02 Apr 15 |
olle |
var sourceItemList = frm.extractSourceItems; |
3225 |
02 Apr 15 |
olle |
if (items.length > 0) |
3225 |
02 Apr 15 |
olle |
314 |
{ |
3225 |
02 Apr 15 |
olle |
var numItems = items.length; |
3225 |
02 Apr 15 |
olle |
for (var i=0; i < items.length; i++) |
3225 |
02 Apr 15 |
olle |
317 |
{ |
3225 |
02 Apr 15 |
olle |
var item = items[i]; |
3225 |
02 Apr 15 |
olle |
var name = (i+1) + ': ' + Strings.encodeTags(item.name); |
3225 |
02 Apr 15 |
olle |
if (item.bioWell) |
3225 |
02 Apr 15 |
olle |
321 |
{ |
3225 |
02 Apr 15 |
olle |
name += ' -- ' + Strings.encodeTags(item.bioWell.bioPlate.name + ' (' + item.bioWell.location+')'); |
3225 |
02 Apr 15 |
olle |
323 |
} |
3225 |
02 Apr 15 |
olle |
var selected = true; |
3225 |
02 Apr 15 |
olle |
// Identification of item via id works here as specimens and extracts |
3225 |
02 Apr 15 |
olle |
// are stored in the same database table using discriminators, and are |
3225 |
02 Apr 15 |
olle |
// therefore guaranteed to not have the same id value as another item in the table. |
3225 |
02 Apr 15 |
olle |
var option = new Option(name, item.id, selected, selected); |
3225 |
02 Apr 15 |
olle |
option.item = item; |
3225 |
02 Apr 15 |
olle |
sourceItemList.options[sourceItemList.length] = option; |
3225 |
02 Apr 15 |
olle |
331 |
} |
3225 |
02 Apr 15 |
olle |
332 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
334 |
{ |
3225 |
02 Apr 15 |
olle |
Wizard.setFatalError('No items available for processing.'); |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
337 |
} |
3225 |
02 Apr 15 |
olle |
338 |
|
3432 |
29 Jun 15 |
olle |
// Load reagents lot no.s from first created DNA for start list |
3432 |
29 Jun 15 |
olle |
if (startListIsProcessed) |
3225 |
02 Apr 15 |
olle |
341 |
{ |
3225 |
02 Apr 15 |
olle |
// Set form copy default to "report" |
3225 |
02 Apr 15 |
olle |
var formCopyTypeMenu = frm.formCopyType; |
3225 |
02 Apr 15 |
olle |
var selected = true; |
3336 |
13 May 15 |
olle |
var option = new Option('Tracking protocol', 'protocol', selected, selected); |
3225 |
02 Apr 15 |
olle |
formCopyTypeMenu.options[0] = option; |
3225 |
02 Apr 15 |
olle |
option = new Option('Tracking report', 'report', selected, selected); |
3225 |
02 Apr 15 |
olle |
option.disabled = false; |
3225 |
02 Apr 15 |
olle |
formCopyTypeMenu.options[1] = option; |
3225 |
02 Apr 15 |
olle |
frm.formCopyType.value = 'report'; |
3501 |
21 Sep 15 |
olle |
351 |
|
3501 |
21 Sep 15 |
olle |
352 |
/* |
3225 |
02 Apr 15 |
olle |
// Find first specimen |
3225 |
02 Apr 15 |
olle |
var specimen = null; |
3225 |
02 Apr 15 |
olle |
for (var i=0; i < items.length; i++) |
3225 |
02 Apr 15 |
olle |
356 |
{ |
3225 |
02 Apr 15 |
olle |
var item = items[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
359 |
{ |
3225 |
02 Apr 15 |
olle |
specimen = item; |
3225 |
02 Apr 15 |
olle |
break; |
3225 |
02 Apr 15 |
olle |
362 |
} |
3225 |
02 Apr 15 |
olle |
363 |
} |
3225 |
02 Apr 15 |
olle |
364 |
|
3432 |
29 Jun 15 |
olle |
//alert("exreg.sourceItemListLoaded(): startItemList.name = " + startItemList.name + " specimen.name = " + specimen.name); |
3225 |
02 Apr 15 |
olle |
if (specimen) |
3225 |
02 Apr 15 |
olle |
367 |
{ |
3225 |
02 Apr 15 |
olle |
var dnaName = specimen.name + '.d'; |
3225 |
02 Apr 15 |
olle |
369 |
|
3225 |
02 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3225 |
02 Apr 15 |
olle |
url += '&cmd=GetDna&name='+dnaName; |
3225 |
02 Apr 15 |
olle |
Wizard.asyncJsonRequest(url, exreg.reagentLotNosFromDna); |
3225 |
02 Apr 15 |
olle |
373 |
} |
3501 |
21 Sep 15 |
olle |
374 |
*/ |
3225 |
02 Apr 15 |
olle |
375 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
377 |
{ |
3336 |
13 May 15 |
olle |
// Set form copy default to "protocol" and disable option "report" |
3225 |
02 Apr 15 |
olle |
var formCopyTypeMenu = frm.formCopyType; |
3225 |
02 Apr 15 |
olle |
var selected = true; |
3336 |
13 May 15 |
olle |
var option = new Option('Tracking protocol', 'protocol', selected, selected); |
3225 |
02 Apr 15 |
olle |
formCopyTypeMenu.options[0] = option; |
3225 |
02 Apr 15 |
olle |
option = new Option('Tracking report (not available)', 'report', false, false); |
3225 |
02 Apr 15 |
olle |
option.disabled = true; |
3225 |
02 Apr 15 |
olle |
formCopyTypeMenu.options[1] = option; |
3225 |
02 Apr 15 |
olle |
386 |
} |
3225 |
02 Apr 15 |
olle |
387 |
} |
3225 |
02 Apr 15 |
olle |
388 |
|
3225 |
02 Apr 15 |
olle |
exreg.reagentLotNosFromDna = function(response) |
3225 |
02 Apr 15 |
olle |
390 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
var dna = response.dna; |
3225 |
02 Apr 15 |
olle |
393 |
|
3225 |
02 Apr 15 |
olle |
if (dna) |
3225 |
02 Apr 15 |
olle |
395 |
{ |
3225 |
02 Apr 15 |
olle |
// Reset the existing values |
3225 |
02 Apr 15 |
olle |
397 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3225 |
02 Apr 15 |
olle |
var allPrepFfpeKit = ''; |
3225 |
02 Apr 15 |
olle |
400 |
|
3225 |
02 Apr 15 |
olle |
// Specimen reagents |
3225 |
02 Apr 15 |
olle |
var specXylene = ''; |
3225 |
02 Apr 15 |
olle |
var specEtoh995 = ''; |
3225 |
02 Apr 15 |
olle |
var specBufferPkd = ''; |
3225 |
02 Apr 15 |
olle |
var specBufferAtl = ''; |
3225 |
02 Apr 15 |
olle |
var specProteinaseK = ''; |
3225 |
02 Apr 15 |
olle |
var specRNAseA = ''; |
3225 |
02 Apr 15 |
olle |
408 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube reagents |
3225 |
02 Apr 15 |
olle |
var bufferRlt = ''; |
3225 |
02 Apr 15 |
olle |
var etoh995 = ''; |
3225 |
02 Apr 15 |
olle |
var bufferFrn = ''; |
3225 |
02 Apr 15 |
olle |
var bufferRpe = ''; |
3225 |
02 Apr 15 |
olle |
var rnaseFreeWater = ''; |
3225 |
02 Apr 15 |
olle |
var dnaseMix = ''; |
3225 |
02 Apr 15 |
olle |
var bufferRdd = ''; |
3225 |
02 Apr 15 |
olle |
var rneasyMinEluteSpinColumn = ''; |
3225 |
02 Apr 15 |
olle |
var bufferAl = ''; |
3225 |
02 Apr 15 |
olle |
var bufferAW1 = ''; |
3225 |
02 Apr 15 |
olle |
var bufferAW2 = ''; |
3225 |
02 Apr 15 |
olle |
var bufferAte = ''; |
3225 |
02 Apr 15 |
olle |
var qiaampMinEluteSpinColumn = ''; |
3225 |
02 Apr 15 |
olle |
423 |
|
3324 |
11 May 15 |
olle |
// Quality control reagents |
3324 |
11 May 15 |
olle |
var kapaSybrFast = ''; |
3324 |
11 May 15 |
olle |
var qualityControlPrimersQcpRgt = ''; |
3438 |
03 Jul 15 |
olle |
var qualityControlTemplateQct = ''; |
3324 |
11 May 15 |
olle |
var qubitDnaHighSens = ''; |
3324 |
11 May 15 |
olle |
var qubitDnaBroadRange = ''; |
3324 |
11 May 15 |
olle |
430 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3225 |
02 Apr 15 |
olle |
allPrepFfpeKit = dna.allPrepFfpeKit; |
3225 |
02 Apr 15 |
olle |
433 |
|
3225 |
02 Apr 15 |
olle |
// Specimen reagents |
3225 |
02 Apr 15 |
olle |
specXylene = dna.xyleneSpecimen; |
3225 |
02 Apr 15 |
olle |
specEtoh995 = dna.etoh995Specimen; |
3225 |
02 Apr 15 |
olle |
specBufferPkd = dna.bufferPkdSpecimen; |
3225 |
02 Apr 15 |
olle |
specBufferAtl = dna.bufferAtlSpecimen; |
3225 |
02 Apr 15 |
olle |
specProteinaseK = dna.proteinaseKSpecimen; |
3225 |
02 Apr 15 |
olle |
specRNAseA = dna.rnaseASpecimen; |
3225 |
02 Apr 15 |
olle |
441 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube reagents |
3225 |
02 Apr 15 |
olle |
bufferRlt = dna.bufferRlt; |
3225 |
02 Apr 15 |
olle |
etoh995 = dna.etoh995; |
3225 |
02 Apr 15 |
olle |
bufferFrn = dna.bufferFrn; |
3225 |
02 Apr 15 |
olle |
bufferRpe = dna.bufferRpe; |
3225 |
02 Apr 15 |
olle |
rnaseFreeWater = dna.rnaseFreeWater; |
3225 |
02 Apr 15 |
olle |
dnaseMix = dna.dnaseMix; |
3225 |
02 Apr 15 |
olle |
bufferRdd = dna.bufferRdd; |
3225 |
02 Apr 15 |
olle |
rneasyMinEluteSpinColumn = dna.rneasyMinEluteSpinColumn; |
3225 |
02 Apr 15 |
olle |
bufferAl = dna.bufferAl; |
3225 |
02 Apr 15 |
olle |
bufferAW1 = dna.bufferAw1; |
3225 |
02 Apr 15 |
olle |
bufferAW2 = dna.bufferAw2; |
3225 |
02 Apr 15 |
olle |
bufferAte = dna.bufferAte; |
3331 |
12 May 15 |
olle |
qiaampMinEluteSpinColumn = dna.qiaampMinEluteSpinColumn; |
3225 |
02 Apr 15 |
olle |
456 |
|
3324 |
11 May 15 |
olle |
// Quality control reagents |
3324 |
11 May 15 |
olle |
kapaSybrFast = dna.kapaSybrFast; |
3324 |
11 May 15 |
olle |
qualityControlPrimersQcpRgt = dna.qualityControlPrimersQcpRgt; |
3438 |
03 Jul 15 |
olle |
qualityControlTemplateQct = dna.qualityControlTemplateQct; |
3324 |
11 May 15 |
olle |
qubitDnaHighSens = dna.qubitDnaHighSens; |
3324 |
11 May 15 |
olle |
qubitDnaBroadRange = dna.qubitDnaBroadRange; |
3324 |
11 May 15 |
olle |
463 |
|
3225 |
02 Apr 15 |
olle |
// Update reagent values |
3225 |
02 Apr 15 |
olle |
465 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3225 |
02 Apr 15 |
olle |
if (frm.allPrepFfpeKit.value == null || frm.allPrepFfpeKit.value == '') |
3225 |
02 Apr 15 |
olle |
468 |
{ |
3225 |
02 Apr 15 |
olle |
frm.allPrepFfpeKit.value = allPrepFfpeKit; |
3225 |
02 Apr 15 |
olle |
470 |
} |
3225 |
02 Apr 15 |
olle |
471 |
|
3225 |
02 Apr 15 |
olle |
// Specimen reagents |
3225 |
02 Apr 15 |
olle |
frm.xyleneSpecimen.value = specXylene; |
3225 |
02 Apr 15 |
olle |
frm.etoh995Specimen.value = specEtoh995; |
3225 |
02 Apr 15 |
olle |
frm.bufferPkdSpecimen.value = specBufferPkd; |
3225 |
02 Apr 15 |
olle |
frm.bufferAtlSpecimen.value = specBufferAtl; |
3225 |
02 Apr 15 |
olle |
frm.proteinaseKSpecimen.value = specProteinaseK; |
3225 |
02 Apr 15 |
olle |
frm.rnaseASpecimen.value = specRNAseA; |
3225 |
02 Apr 15 |
olle |
479 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube reagents |
3225 |
02 Apr 15 |
olle |
frm.etoh995.value = etoh995; |
3225 |
02 Apr 15 |
olle |
frm.bufferRlt.value = bufferRlt; |
3225 |
02 Apr 15 |
olle |
frm.bufferFrn.value = bufferFrn; |
3225 |
02 Apr 15 |
olle |
frm.bufferRpe.value = bufferRpe; |
3225 |
02 Apr 15 |
olle |
frm.bufferAl.value = bufferAl; |
3225 |
02 Apr 15 |
olle |
frm.bufferAw1.value = bufferAW1; |
3225 |
02 Apr 15 |
olle |
frm.bufferAw2.value = bufferAW2; |
3225 |
02 Apr 15 |
olle |
frm.bufferAte.value = bufferAte; |
3225 |
02 Apr 15 |
olle |
frm.bufferRdd.value = bufferRdd; |
3225 |
02 Apr 15 |
olle |
frm.rnaseFreeWater.value = rnaseFreeWater; |
3225 |
02 Apr 15 |
olle |
frm.dnaseMix.value = dnaseMix; |
3225 |
02 Apr 15 |
olle |
frm.rneasyMinEluteSpinColumn.value = rneasyMinEluteSpinColumn; |
3225 |
02 Apr 15 |
olle |
frm.qiaampMinEluteSpinColumn.value = qiaampMinEluteSpinColumn; |
3225 |
02 Apr 15 |
olle |
494 |
|
3324 |
11 May 15 |
olle |
// Quality control reagents |
3324 |
11 May 15 |
olle |
frm.kapaSybrFast.value = kapaSybrFast; |
3324 |
11 May 15 |
olle |
frm.qualityControlPrimersQcpRgt.value = qualityControlPrimersQcpRgt; |
3438 |
03 Jul 15 |
olle |
frm.qualityControlTemplateQct.value = qualityControlTemplateQct; |
3324 |
11 May 15 |
olle |
frm.qubitDnaHighSens.value = qubitDnaHighSens; |
3324 |
11 May 15 |
olle |
frm.qubitDnaBroadRange.value = qubitDnaBroadRange; |
3324 |
11 May 15 |
olle |
501 |
|
3225 |
02 Apr 15 |
olle |
Doc.show('rnaDefaultVolumeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('dnaDefaultVolumeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('xyleneSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('etoh995SpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferPkdSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferAtlSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('proteinaseKSpecimenSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('rnaseASpecimenSection'); |
3225 |
02 Apr 15 |
olle |
510 |
|
3225 |
02 Apr 15 |
olle |
Doc.show('etoh995Section'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferRltSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferFrnSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferRpeSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferAlSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferAw1Section'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferAw2Section'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferAteSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('bufferRddSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('rnaseFreeWaterSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('dnaseMixSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('rneasyMinEluteSpinColumnSection'); |
3225 |
02 Apr 15 |
olle |
Doc.show('qiaampMinEluteSpinColumnSection'); |
3324 |
11 May 15 |
olle |
524 |
|
3324 |
11 May 15 |
olle |
Doc.show('kapaSybrFastSection'); |
3324 |
11 May 15 |
olle |
Doc.show('qualityControlPrimersQcpRgtSection'); |
3438 |
03 Jul 15 |
olle |
Doc.show('qualityControlTemplateQctSection'); |
3324 |
11 May 15 |
olle |
Doc.show('qubitDnaHighSensSection'); |
3324 |
11 May 15 |
olle |
Doc.show('qubitDnaBroadRangeSection'); |
3225 |
02 Apr 15 |
olle |
530 |
} |
3225 |
02 Apr 15 |
olle |
531 |
} |
3225 |
02 Apr 15 |
olle |
532 |
|
3225 |
02 Apr 15 |
olle |
exreg.qiacubeDateOnChange = function() |
3225 |
02 Apr 15 |
olle |
534 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
536 |
|
3225 |
02 Apr 15 |
olle |
var isolationDateIsValid = Wizard.isValid('isolationDate'); |
3225 |
02 Apr 15 |
olle |
var qiacubeDateIsValid = Wizard.isValid('qiacubeDate'); |
3225 |
02 Apr 15 |
olle |
539 |
|
3225 |
02 Apr 15 |
olle |
if (!isolationDateIsValid || !qiacubeDateIsValid) return; |
3225 |
02 Apr 15 |
olle |
541 |
|
3225 |
02 Apr 15 |
olle |
var isolationDate = Dates.parseString(frm.isolationDate.value, 'yyyyMMdd'); |
3225 |
02 Apr 15 |
olle |
var qiacubeDate = Dates.parseString(frm.qiacubeDate.value, 'yyyyMMdd'); |
3225 |
02 Apr 15 |
olle |
if (isolationDate > qiacubeDate) |
3225 |
02 Apr 15 |
olle |
545 |
{ |
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus('qiacubeDate', 'invalid', 'QIAcube date is before isolation date'); |
3225 |
02 Apr 15 |
olle |
qiacubeDateIsAfterIsolationDate = false; |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
549 |
} |
3225 |
02 Apr 15 |
olle |
550 |
|
3225 |
02 Apr 15 |
olle |
qiacubeDateIsAfterIsolationDate = true; |
3225 |
02 Apr 15 |
olle |
552 |
|
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus('qiacubeDate', 'valid'); |
3225 |
02 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3225 |
02 Apr 15 |
olle |
url += '&cmd=GetNextQiacubeRunNo&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3225 |
02 Apr 15 |
olle |
Wizard.showLoadingAnimation('Loading Qiacube run number...'); |
3225 |
02 Apr 15 |
olle |
Wizard.asyncJsonRequest(url, exreg.gotNextRunNumber); |
3225 |
02 Apr 15 |
olle |
558 |
} |
3225 |
02 Apr 15 |
olle |
559 |
|
3225 |
02 Apr 15 |
olle |
exreg.gotNextRunNumber = function(response) |
3225 |
02 Apr 15 |
olle |
561 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
frm.qiacubeRunNo.value = response.nextQiacubeRunNo; |
3225 |
02 Apr 15 |
olle |
Events.sendChangeEvent('qiacubeRunNo'); |
3225 |
02 Apr 15 |
olle |
565 |
} |
3225 |
02 Apr 15 |
olle |
566 |
|
3225 |
02 Apr 15 |
olle |
exreg.qiacubeRunNoOnChange = function() |
3225 |
02 Apr 15 |
olle |
568 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
var runNumber = frm.qiacubeRunNo.value; |
3225 |
02 Apr 15 |
olle |
qiacubeRunNoIsValid = false; |
3225 |
02 Apr 15 |
olle |
572 |
|
3225 |
02 Apr 15 |
olle |
if (runNumber == '') |
3225 |
02 Apr 15 |
olle |
574 |
{ |
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'invalid', 'Missing'); |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
577 |
} |
3225 |
02 Apr 15 |
olle |
if (!(parseInt(runNumber, 10) >= 1)) |
3225 |
02 Apr 15 |
olle |
579 |
{ |
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'invalid', 'Must be at least 1'); |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
582 |
} |
3225 |
02 Apr 15 |
olle |
583 |
|
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'valid'); |
3225 |
02 Apr 15 |
olle |
qiacubeRunNoIsValid = true; |
3225 |
02 Apr 15 |
olle |
586 |
} |
3225 |
02 Apr 15 |
olle |
587 |
|
3225 |
02 Apr 15 |
olle |
exreg.validateStep2 = function(event) |
3225 |
02 Apr 15 |
olle |
589 |
{ |
3225 |
02 Apr 15 |
olle |
var valid = true; |
3225 |
02 Apr 15 |
olle |
valid &= Wizard.isValid('isolationDate'); |
3225 |
02 Apr 15 |
olle |
valid &= Wizard.isValid('qiacubeDate'); |
3225 |
02 Apr 15 |
olle |
valid &= qiacubeRunNoIsValid; |
3225 |
02 Apr 15 |
olle |
594 |
|
3225 |
02 Apr 15 |
olle |
if (!valid) event.preventDefault(); |
3225 |
02 Apr 15 |
olle |
596 |
} |
3225 |
02 Apr 15 |
olle |
597 |
|
3225 |
02 Apr 15 |
olle |
exreg.initializeStep3 = function() |
3225 |
02 Apr 15 |
olle |
599 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var startItemList = null; |
3432 |
29 Jun 15 |
olle |
for (var i = 0; i < frm.startList.length; i++) |
3432 |
29 Jun 15 |
olle |
603 |
{ |
3432 |
29 Jun 15 |
olle |
if (frm.startList[i].selected) |
3432 |
29 Jun 15 |
olle |
605 |
{ |
3432 |
29 Jun 15 |
olle |
startItemList = frm.startList[i]; |
3432 |
29 Jun 15 |
olle |
607 |
} |
3432 |
29 Jun 15 |
olle |
608 |
} |
3432 |
29 Jun 15 |
olle |
if (startItemList == null) |
3432 |
29 Jun 15 |
olle |
610 |
{ |
3432 |
29 Jun 15 |
olle |
//alert("exreg.initializeStep3(): startItemList == null"); |
3432 |
29 Jun 15 |
olle |
event.preventDefault(); |
3432 |
29 Jun 15 |
olle |
613 |
} |
3225 |
02 Apr 15 |
olle |
var docType = frm.formCopyType.value; |
3432 |
29 Jun 15 |
olle |
var startListName = frm.startListName.value; |
3432 |
29 Jun 15 |
olle |
Doc.element('detailsStartListName').innerHTML = '<b>Start list: ' + startListName + '</b>'; |
3352 |
26 May 15 |
olle |
var rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
var dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3225 |
02 Apr 15 |
olle |
qiacubeSortedPrefixes = exreg.getQiacubeSortedPrefixes(); |
3225 |
02 Apr 15 |
olle |
620 |
|
3225 |
02 Apr 15 |
olle |
var html = '<table id="detailsTable" class="step-form">'; |
3225 |
02 Apr 15 |
olle |
// First header row |
3225 |
02 Apr 15 |
olle |
html += '<thead>'; |
3225 |
02 Apr 15 |
olle |
html += '<tr>'; |
3225 |
02 Apr 15 |
olle |
html += '<th>Extract</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<th class="dottedleft">QIAcube</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft"></th>'; |
3225 |
02 Apr 15 |
olle |
628 |
/* |
3225 |
02 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft"></th>'; |
3225 |
02 Apr 15 |
olle |
630 |
*/ |
3225 |
02 Apr 15 |
olle |
631 |
/* |
3225 |
02 Apr 15 |
olle |
html += '<th colspan="5" class="dottedleft">RNA</th>'; |
3225 |
02 Apr 15 |
olle |
633 |
*/ |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
635 |
{ |
3276 |
29 Apr 15 |
olle |
html += '<th colspan="5" class="dottedleft">RNA</th>'; |
3276 |
29 Apr 15 |
olle |
html += '<th colspan="5" class="dottedleft">DNA</th>'; |
3225 |
02 Apr 15 |
olle |
638 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
640 |
{ |
3238 |
10 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft">NanoDrop</th>'; |
3276 |
29 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft">RNA</th>'; |
3276 |
29 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft">DNA</th>'; |
3225 |
02 Apr 15 |
olle |
644 |
} |
3225 |
02 Apr 15 |
olle |
html += '<th class="dottedleft comment">Comment</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<th></th>'; |
3225 |
02 Apr 15 |
olle |
html += '</tr>'; |
3225 |
02 Apr 15 |
olle |
// Second header row |
3225 |
02 Apr 15 |
olle |
html += '<tr>'; |
3225 |
02 Apr 15 |
olle |
html += '<th>source item</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<th class="dottedleft">position</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft">Storage</td>'; |
3225 |
02 Apr 15 |
olle |
653 |
/* |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft">Pos</td><td>Vol.</td><td>Conc.</td><td>Quantity</td><td><span id="toggle-normalize-1" class="link" title="Toggle all">Pre-</span></td>'; |
3225 |
02 Apr 15 |
olle |
655 |
*/ |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
657 |
{ |
3276 |
29 Apr 15 |
olle |
html += '<td class="dottedleft">NanoDrop</td><td>RNA</td><td>Vol.</td><td>Conc.</td><td>Quantity</td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td class="dottedleft">DNA</td><td>Vol.</td><td>Conc.</td><td>Quantity</td><td>ΔCt</td>'; |
3225 |
02 Apr 15 |
olle |
660 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
662 |
{ |
5852 |
06 Mar 20 |
olle |
html += '<th class="dottedleft">Box Pos.</th>'; |
5852 |
06 Mar 20 |
olle |
html += '<th class="dottedleft">Box Pos.</th>'; |
5852 |
06 Mar 20 |
olle |
html += '<th class="dottedleft">Box Pos.</th>'; |
3225 |
02 Apr 15 |
olle |
666 |
} |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft comment"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td></td>'; |
3225 |
02 Apr 15 |
olle |
html += '</tr>'; |
3225 |
02 Apr 15 |
olle |
// Third header row |
3225 |
02 Apr 15 |
olle |
html += '<tr>'; |
3225 |
02 Apr 15 |
olle |
html += '<th></th>'; |
3225 |
02 Apr 15 |
olle |
html += '<th class="dottedleft"></th>'; |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft">box</td>'; |
3225 |
02 Apr 15 |
olle |
675 |
/* |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft"></td><td>(µl)</td><td>(ng/µl)</td><td>(µg)</td><td><span id="toggle-normalize-2" class="link" title="Toggle all">normalize</span></td>'; |
3225 |
02 Apr 15 |
olle |
677 |
*/ |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
679 |
{ |
5852 |
06 Mar 20 |
olle |
html += '<td class="dottedleft">Pos</td><td>Box Pos.</td><td>(µl)</td><td>(ng/µl)</td><td>(µg)</td>'; |
5852 |
06 Mar 20 |
olle |
html += '<td class="dottedleft">Box Pos.</td><td>(µl)</td><td>(ng/µl)</td><td>(µg)</td><td></td>'; |
3225 |
02 Apr 15 |
olle |
682 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
684 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft"></td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td class="dottedleft"></td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td class="dottedleft"></td>'; |
3225 |
02 Apr 15 |
olle |
688 |
} |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft comment"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td></td>'; |
3225 |
02 Apr 15 |
olle |
html += '</tr>'; |
3225 |
02 Apr 15 |
olle |
html += '</thead>'; |
3225 |
02 Apr 15 |
olle |
html += '<tbody>'; |
3225 |
02 Apr 15 |
olle |
694 |
|
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numSpecimenItems = exreg.getNumberOfSpecimenItems(); |
3225 |
02 Apr 15 |
olle |
var numRnaItems = exreg.getNumberOfRnaItems(); |
3225 |
02 Apr 15 |
olle |
var numDnaItems = exreg.getNumberOfDnaItems(); |
3225 |
02 Apr 15 |
olle |
var numNanoDropItems = numSpecimenItems + numRnaItems; |
3432 |
29 Jun 15 |
olle |
var numQiacubeItems = numSpecimenItems; |
3432 |
29 Jun 15 |
olle |
var totNumItems = numItems; |
3225 |
02 Apr 15 |
olle |
var itemNo = 0; |
3225 |
02 Apr 15 |
olle |
var qiacubeItemNo = 0; |
3225 |
02 Apr 15 |
olle |
// Set default values for DNA/RNA extraction |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3225 |
02 Apr 15 |
olle |
708 |
{ |
3225 |
02 Apr 15 |
olle |
itemNo++; |
3225 |
02 Apr 15 |
olle |
var item = null; |
3225 |
02 Apr 15 |
olle |
var storageBox = '-'; |
3276 |
29 Apr 15 |
olle |
var rnaStorageBox = '-'; |
3276 |
29 Apr 15 |
olle |
var dnaStorageBox = '-'; |
3432 |
29 Jun 15 |
olle |
item = selItemsList[i]; |
3432 |
29 Jun 15 |
olle |
var qiacubePos = null; |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
717 |
{ |
3432 |
29 Jun 15 |
olle |
718 |
/* |
3432 |
29 Jun 15 |
olle |
alert("exreg.initializeStep3(): item.name = " + item.name + " JSON.stringify(item) = " + JSON.stringify(item)); |
3432 |
29 Jun 15 |
olle |
if (item.r) |
3225 |
02 Apr 15 |
olle |
721 |
{ |
3432 |
29 Jun 15 |
olle |
alert("exreg.initializeStep3(): item.name = " + item.name + " item.r.name = " + item.r.name + " item.r.ndConc = " + item.r.ndConc); |
3432 |
29 Jun 15 |
olle |
723 |
} |
3432 |
29 Jun 15 |
olle |
if (item.d) |
3432 |
29 Jun 15 |
olle |
725 |
{ |
3432 |
29 Jun 15 |
olle |
alert("exreg.initializeStep3(): item.name = " + item.name + " item.d.name = " + item.d.name + " item.d.qubitConc = " + item.d.qubitConc + " item.d.deltaCt = " + item.d.deltaCt); |
3432 |
29 Jun 15 |
olle |
727 |
} |
3225 |
02 Apr 15 |
olle |
728 |
*/ |
3432 |
29 Jun 15 |
olle |
qiacubeItemNo++; |
3432 |
29 Jun 15 |
olle |
qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo, qiacubeSortedPrefixes); |
3432 |
29 Jun 15 |
olle |
731 |
} |
3225 |
02 Apr 15 |
olle |
732 |
/* |
3432 |
29 Jun 15 |
olle |
item.originalQuantity = DEFAULT_SPECIMEN_VOLUME; |
3432 |
29 Jun 15 |
olle |
item.processedQuantity = DEFAULT_SPECIMEN_USED; |
3225 |
02 Apr 15 |
olle |
735 |
*/ |
3432 |
29 Jun 15 |
olle |
item.qiacubePosition = qiacubePos; |
3432 |
29 Jun 15 |
olle |
item.originalQiacubePosition = qiacubePos; |
3432 |
29 Jun 15 |
olle |
//alert("exreg.initializeStep3(): i = " + i + " item.name = " + item.name + " item.qiacubePosition = " + item.qiacubePosition); |
3225 |
02 Apr 15 |
olle |
739 |
|
3432 |
29 Jun 15 |
olle |
var rna = {}; |
3432 |
29 Jun 15 |
olle |
var dna = {}; |
3432 |
29 Jun 15 |
olle |
// RNA |
3432 |
29 Jun 15 |
olle |
rna.name = item.name + '.r'; |
3432 |
29 Jun 15 |
olle |
rna.volume = rnaDefaultVolume; |
3432 |
29 Jun 15 |
olle |
// DNA |
3432 |
29 Jun 15 |
olle |
dna.name = item.name + '.d'; |
3432 |
29 Jun 15 |
olle |
dna.volume = dnaDefaultVolume; |
3276 |
29 Apr 15 |
olle |
748 |
/* |
3432 |
29 Jun 15 |
olle |
item.rna = rna; |
3432 |
29 Jun 15 |
olle |
item.dna = dna; |
3432 |
29 Jun 15 |
olle |
751 |
*/ |
3432 |
29 Jun 15 |
olle |
if (!item.rna) |
3432 |
29 Jun 15 |
olle |
753 |
{ |
3225 |
02 Apr 15 |
olle |
item.rna = rna; |
3432 |
29 Jun 15 |
olle |
755 |
} |
3432 |
29 Jun 15 |
olle |
else if (!item.rna.volume) |
3432 |
29 Jun 15 |
olle |
757 |
{ |
3432 |
29 Jun 15 |
olle |
item.rna.volume = rnaDefaultVolume; |
3432 |
29 Jun 15 |
olle |
759 |
} |
3432 |
29 Jun 15 |
olle |
if (!item.dna) |
3432 |
29 Jun 15 |
olle |
761 |
{ |
3225 |
02 Apr 15 |
olle |
item.dna = dna; |
3432 |
29 Jun 15 |
olle |
763 |
} |
3432 |
29 Jun 15 |
olle |
else if (!item.dna.volume) |
3432 |
29 Jun 15 |
olle |
765 |
{ |
3432 |
29 Jun 15 |
olle |
item.dna.volume = dnaDefaultVolume; |
3432 |
29 Jun 15 |
olle |
767 |
} |
3276 |
29 Apr 15 |
olle |
768 |
|
3432 |
29 Jun 15 |
olle |
// Input extract source item specimen/RNA/DNA |
3432 |
29 Jun 15 |
olle |
if (item.bioWell != null) |
3432 |
29 Jun 15 |
olle |
771 |
{ |
3432 |
29 Jun 15 |
olle |
storageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3225 |
02 Apr 15 |
olle |
773 |
} |
3432 |
29 Jun 15 |
olle |
// RNA extract from specimen |
3432 |
29 Jun 15 |
olle |
if (item.rna && item.rna.bioWell) |
3225 |
02 Apr 15 |
olle |
776 |
{ |
3432 |
29 Jun 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.rna.bioWell.bioPlate.name + '[' + item.rna.bioWell.location + ']'); |
3225 |
02 Apr 15 |
olle |
778 |
} |
3432 |
29 Jun 15 |
olle |
// DNA extract from specimen |
3432 |
29 Jun 15 |
olle |
if (item.dna && item.dna.bioWell) |
3432 |
29 Jun 15 |
olle |
781 |
{ |
3432 |
29 Jun 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.dna.bioWell.bioPlate.name + '[' + item.dna.bioWell.location + ']'); |
3432 |
29 Jun 15 |
olle |
783 |
} |
3432 |
29 Jun 15 |
olle |
// Input RNA item storage location should be displayed in the RNA extract storage location column |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isRna(item) && item.bioWell != null) |
3432 |
29 Jun 15 |
olle |
786 |
{ |
3432 |
29 Jun 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3432 |
29 Jun 15 |
olle |
788 |
} |
3432 |
29 Jun 15 |
olle |
// Input DNA item storage location should be displayed in the DNA extract storage location column |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isDna(item) && item.bioWell != null) |
3432 |
29 Jun 15 |
olle |
791 |
{ |
3432 |
29 Jun 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3432 |
29 Jun 15 |
olle |
793 |
} |
3225 |
02 Apr 15 |
olle |
html += '<tr class="highlight">'; |
3225 |
02 Apr 15 |
olle |
html += '<th>' + Strings.encodeTags(item.name) + '</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="qiacubePosition'+i+'" class="dottedleft"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft">'+storageBox+'</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaPos'+i+'" class="dottedleft"></td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td id="rnaPlatePos'+i+'" class="dottedleft">'+rnaStorageBox+'</td>'; |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
801 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaVol'+i+'"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaConc'+i+'" class="bg-filled-50 italic"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaQuantity'+i+'" class="bg-filled-50 italic"></td>'; |
3276 |
29 Apr 15 |
olle |
805 |
} |
3276 |
29 Apr 15 |
olle |
html += '<td id="dnaPlatePos'+i+'" class="dottedleft">'+dnaStorageBox+'</td>'; |
3276 |
29 Apr 15 |
olle |
if (docType == 'report') |
3276 |
29 Apr 15 |
olle |
808 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaVol'+i+'"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaConc'+i+'" class="bg-filled-50 italic"></td>'; |
3225 |
02 Apr 15 |
olle |
811 |
/* |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isDna(item)) |
3225 |
02 Apr 15 |
olle |
813 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td><input type="text" id="dnaConc'+i+'" style="width: 5em;"></intput></td>'; |
3225 |
02 Apr 15 |
olle |
815 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
817 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaConc'+i+'">-</td>'; |
3225 |
02 Apr 15 |
olle |
819 |
} |
3225 |
02 Apr 15 |
olle |
820 |
*/ |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaQuantity'+i+'" class="bg-filled-50 italic"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="deltaCt'+i+'" class="bg-filled-50 italic"></td>'; |
3225 |
02 Apr 15 |
olle |
823 |
} |
3225 |
02 Apr 15 |
olle |
html += '<td id="comments'+i+'" class="dottedleft comment"></td>'; |
3225 |
02 Apr 15 |
olle |
html += '</tr>'; |
3225 |
02 Apr 15 |
olle |
826 |
} |
3225 |
02 Apr 15 |
olle |
if (numQiacubeItems == 1 || numQiacubeItems == 11 || numQiacubeItems == 23) |
3225 |
02 Apr 15 |
olle |
828 |
{ |
3225 |
02 Apr 15 |
olle |
// Add extra row for counterbalance in QIAcube |
3225 |
02 Apr 15 |
olle |
counterBalanceInfoRow = true; |
3225 |
02 Apr 15 |
olle |
var i = numItems; |
3354 |
27 May 15 |
olle |
var qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems + 1, numQiacubeItems + 1, qiacubeSortedPrefixes); |
3225 |
02 Apr 15 |
olle |
833 |
|
3225 |
02 Apr 15 |
olle |
html += '<tr class="highlight">'; |
3276 |
29 Apr 15 |
olle |
html += '<th>' + Strings.encodeTags('COUNTER-BALANCE') + '</th>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="qiacubePosition'+i+'" class="dottedleft">'+qiacubePos+'</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td class="dottedleft">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaPos'+i+'" class="dottedleft">-</td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td id="rnaPlatePos'+i+'" class="dottedleft">-</td>'; |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
841 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaVol'+i+'">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaConc'+i+'" class="bg-filled-50 italic">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="rnaQuantity'+i+'" class="bg-filled-50 italic">-</td>'; |
3276 |
29 Apr 15 |
olle |
845 |
} |
3276 |
29 Apr 15 |
olle |
html += '<td id="dnaPlatePos'+i+'" class="dottedleft">-</td>'; |
3276 |
29 Apr 15 |
olle |
if (docType == 'report') |
3276 |
29 Apr 15 |
olle |
848 |
{ |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaVol'+i+'">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaConc'+i+'" class="bg-filled-50 italic">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="dnaQuantity'+i+'" class="bg-filled-50 italic">-</td>'; |
3225 |
02 Apr 15 |
olle |
html += '<td id="deltaCt'+i+'" class="bg-filled-50 italic">-</td>'; |
3225 |
02 Apr 15 |
olle |
853 |
} |
3225 |
02 Apr 15 |
olle |
html += '<td id="comments'+i+'" class="dottedleft comment">Reminder to use counterbalance</td>'; |
3225 |
02 Apr 15 |
olle |
html += '</tr>'; |
3225 |
02 Apr 15 |
olle |
856 |
} |
3225 |
02 Apr 15 |
olle |
html += '</tbody>'; |
3225 |
02 Apr 15 |
olle |
html += '</table>'; |
3225 |
02 Apr 15 |
olle |
Doc.element('detailsSection').innerHTML = html; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
861 |
{ |
3225 |
02 Apr 15 |
olle |
Events.addEventHandler('dnaConc'+i, 'change', exreg.dnaConcOnChange); |
3225 |
02 Apr 15 |
olle |
863 |
} |
3225 |
02 Apr 15 |
olle |
864 |
|
3225 |
02 Apr 15 |
olle |
Wizard.setCurrentStep(3); |
3225 |
02 Apr 15 |
olle |
866 |
|
3432 |
29 Jun 15 |
olle |
867 |
/* |
3432 |
29 Jun 15 |
olle |
Doc.show('gocancel'); |
3225 |
02 Apr 15 |
olle |
Doc.show('gocreate'); |
3225 |
02 Apr 15 |
olle |
870 |
*/ |
3225 |
02 Apr 15 |
olle |
871 |
|
3231 |
08 Apr 15 |
olle |
Doc.show('sampleIdFilesSection'); |
3276 |
29 Apr 15 |
olle |
//var includeSpecExtr = true; |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
875 |
{ |
3231 |
08 Apr 15 |
olle |
Doc.hide('sampleIdFilesSection'); |
3276 |
29 Apr 15 |
olle |
//includeSpecExtr = true; |
3225 |
02 Apr 15 |
olle |
878 |
} |
3225 |
02 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3432 |
29 Jun 15 |
olle |
url += '&cmd=GetSourceItemListFromStartItemList'; |
3432 |
29 Jun 15 |
olle |
url += '&startItemListId='+startItemList.value; |
3276 |
29 Apr 15 |
olle |
//url += '&includeSpecimenExtracts='+includeSpecExtr; |
3276 |
29 Apr 15 |
olle |
url += '&includeSpecimenExtracts=true'; |
3225 |
02 Apr 15 |
olle |
Wizard.asyncJsonRequest(url, exreg.initializeStep3b); |
3225 |
02 Apr 15 |
olle |
885 |
} |
3225 |
02 Apr 15 |
olle |
886 |
|
3225 |
02 Apr 15 |
olle |
exreg.initializeStep3b = function(response) |
3225 |
02 Apr 15 |
olle |
888 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3352 |
26 May 15 |
olle |
var rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
var dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3442 |
21 Jul 15 |
olle |
var numQiacubeItems = exreg.getNumberOfSpecimenItems(); |
3442 |
21 Jul 15 |
olle |
qiacubeSortedPrefixes = exreg.getQiacubeSortedPrefixes(); |
3442 |
21 Jul 15 |
olle |
var qiacubeItemNo = 0; |
3225 |
02 Apr 15 |
olle |
895 |
|
3225 |
02 Apr 15 |
olle |
var docType = frm.formCopyType.value; |
3225 |
02 Apr 15 |
olle |
// Set name of form creation button according to document type |
3225 |
02 Apr 15 |
olle |
Doc.element('gocreate').innerHTML = '<img src="../images/import.png"></img>Create lab tracking ' + docType; |
3225 |
02 Apr 15 |
olle |
Doc.element('gocreate').title = 'Create lab tracking ' + docType; |
3225 |
02 Apr 15 |
olle |
900 |
|
3225 |
02 Apr 15 |
olle |
var itemNameNanoDropPosJson = exreg.createItemNameNanoDropPosJson(); |
3225 |
02 Apr 15 |
olle |
//alert("exreg.initializeStep3b(): itemNameNanoDropPosJson = " + JSON.stringify(itemNameNanoDropPosJson)); |
3225 |
02 Apr 15 |
olle |
903 |
|
3225 |
02 Apr 15 |
olle |
// Re-load source item list, as items now have more info attached |
3225 |
02 Apr 15 |
olle |
var items = response.items; |
3225 |
02 Apr 15 |
olle |
var sourceItemList = frm.extractSourceItems; |
3225 |
02 Apr 15 |
olle |
if (items.length > 0) |
3225 |
02 Apr 15 |
olle |
908 |
{ |
3225 |
02 Apr 15 |
olle |
var numItems = items.length; |
3225 |
02 Apr 15 |
olle |
for (var i=0; i < items.length; i++) |
3225 |
02 Apr 15 |
olle |
911 |
{ |
3225 |
02 Apr 15 |
olle |
var item = items[i]; |
3225 |
02 Apr 15 |
olle |
913 |
/* |
3225 |
02 Apr 15 |
olle |
var name = (i+1) + ': ' + Strings.encodeTags(item.name); |
3225 |
02 Apr 15 |
olle |
if (item.bioWell) |
3225 |
02 Apr 15 |
olle |
916 |
{ |
3225 |
02 Apr 15 |
olle |
name += ' -- ' + Strings.encodeTags(item.bioWell.bioPlate.name + ' (' + item.bioWell.location +')'); |
3225 |
02 Apr 15 |
olle |
918 |
} |
3225 |
02 Apr 15 |
olle |
919 |
*/ |
3225 |
02 Apr 15 |
olle |
if (!item.rna) |
3225 |
02 Apr 15 |
olle |
921 |
{ |
3225 |
02 Apr 15 |
olle |
var rna = {}; |
3225 |
02 Apr 15 |
olle |
// RNA |
3225 |
02 Apr 15 |
olle |
rna.name = item.name + '.r'; |
3225 |
02 Apr 15 |
olle |
rna.ndConc = item.ndConc; |
3225 |
02 Apr 15 |
olle |
rna.nd260By230 = item.nd260By230; |
3225 |
02 Apr 15 |
olle |
rna.nd260By280 = item.nd260By280; |
3225 |
02 Apr 15 |
olle |
rna.qubitConc = item.qubitConc; |
3225 |
02 Apr 15 |
olle |
rna.deltaCt = item.deltaCt; |
3225 |
02 Apr 15 |
olle |
rna.originalQuantity = item.originalQuantity; |
3225 |
02 Apr 15 |
olle |
rna.volume = rnaDefaultVolume; |
3225 |
02 Apr 15 |
olle |
rna.well = null; |
3225 |
02 Apr 15 |
olle |
item.rna = rna; |
3225 |
02 Apr 15 |
olle |
934 |
} |
3225 |
02 Apr 15 |
olle |
if (!item.dna) |
3225 |
02 Apr 15 |
olle |
936 |
{ |
3225 |
02 Apr 15 |
olle |
var dna = {}; |
3225 |
02 Apr 15 |
olle |
// DNA |
3225 |
02 Apr 15 |
olle |
dna.name = item.name + '.d'; |
3225 |
02 Apr 15 |
olle |
dna.ndConc = item.ndConc; |
3225 |
02 Apr 15 |
olle |
dna.nd260By230 = item.nd260By230; |
3225 |
02 Apr 15 |
olle |
dna.nd260By280 = item.nd260By280; |
3225 |
02 Apr 15 |
olle |
dna.qubitConc = item.qubitConc; |
3225 |
02 Apr 15 |
olle |
dna.deltaCt = item.deltaCt; |
3225 |
02 Apr 15 |
olle |
dna.originalQuantity = item.originalQuantity; |
3225 |
02 Apr 15 |
olle |
dna.volume = dnaDefaultVolume; |
3225 |
02 Apr 15 |
olle |
item.dna = dna; |
3225 |
02 Apr 15 |
olle |
948 |
} |
3225 |
02 Apr 15 |
olle |
// Set RNA well |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = null; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
952 |
{ |
3225 |
02 Apr 15 |
olle |
var nanoDropPos = itemNameNanoDropPosJson[item.name]; |
3225 |
02 Apr 15 |
olle |
if (nanoDropPos) |
3225 |
02 Apr 15 |
olle |
955 |
{ |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = nanoDropPos; |
3225 |
02 Apr 15 |
olle |
957 |
} |
3225 |
02 Apr 15 |
olle |
958 |
} |
3225 |
02 Apr 15 |
olle |
if (docType == 'report') |
3225 |
02 Apr 15 |
olle |
960 |
{ |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
962 |
{ |
3442 |
21 Jul 15 |
olle |
qiacubeItemNo++; |
3225 |
02 Apr 15 |
olle |
// Get item QIAcube position from RNA QIAcube instrument prefix and position |
3225 |
02 Apr 15 |
olle |
item.qiacubePosition = item.rna.qiacubeInstrumentPrefix + item.rna.qiacubePosition; |
3442 |
21 Jul 15 |
olle |
// Special case for extra items, where extract data has not been registered |
3442 |
21 Jul 15 |
olle |
if (!item.rna.qiacubePosition) |
3442 |
21 Jul 15 |
olle |
968 |
{ |
3442 |
21 Jul 15 |
olle |
item.qiacubePosition = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo, qiacubeSortedPrefixes); |
3442 |
21 Jul 15 |
olle |
970 |
} |
3225 |
02 Apr 15 |
olle |
971 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
973 |
{ |
3225 |
02 Apr 15 |
olle |
if (item.rna) |
3225 |
02 Apr 15 |
olle |
975 |
{ |
3225 |
02 Apr 15 |
olle |
// Get item RNA volume in µl from weight in ng and concentration in ng/µl |
3225 |
02 Apr 15 |
olle |
if (item.rna.ndConc && item.rna.ndConc > 0) |
3225 |
02 Apr 15 |
olle |
978 |
{ |
3225 |
02 Apr 15 |
olle |
item.rna.volume = (item.rna.originalQuantity * 1000.0)/item.rna.ndConc; |
3225 |
02 Apr 15 |
olle |
item.rna.volume = Math.round(item.rna.volume + 0.0001); |
3225 |
02 Apr 15 |
olle |
981 |
} |
3455 |
29 Jul 15 |
olle |
else |
3455 |
29 Jul 15 |
olle |
983 |
{ |
3455 |
29 Jul 15 |
olle |
item.rna.volume = frm.rnaDefaultVolume.value; |
3225 |
02 Apr 15 |
olle |
985 |
} |
3455 |
29 Jul 15 |
olle |
986 |
} |
3225 |
02 Apr 15 |
olle |
987 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isDna(item)) |
3225 |
02 Apr 15 |
olle |
989 |
{ |
3225 |
02 Apr 15 |
olle |
if (item.dna) |
3225 |
02 Apr 15 |
olle |
991 |
{ |
3225 |
02 Apr 15 |
olle |
// Get item DNA volume in µl from weight in ng and concentration in ng/µl |
3225 |
02 Apr 15 |
olle |
if (item.dna.qubitConc && item.dna.qubitConc > 0) |
3225 |
02 Apr 15 |
olle |
994 |
{ |
3225 |
02 Apr 15 |
olle |
item.dna.volume = (item.dna.originalQuantity * 1000.0)/item.dna.qubitConc; |
3225 |
02 Apr 15 |
olle |
item.dna.volume = Math.round(item.dna.volume + 0.0001); |
3225 |
02 Apr 15 |
olle |
997 |
} |
3455 |
29 Jul 15 |
olle |
else |
3455 |
29 Jul 15 |
olle |
999 |
{ |
3455 |
29 Jul 15 |
olle |
item.dna.volume = frm.dnaDefaultVolume.value; |
3225 |
02 Apr 15 |
olle |
1001 |
} |
3455 |
29 Jul 15 |
olle |
1002 |
} |
3225 |
02 Apr 15 |
olle |
1003 |
} |
3225 |
02 Apr 15 |
olle |
1004 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1006 |
{ |
3225 |
02 Apr 15 |
olle |
if (item.rna) |
3225 |
02 Apr 15 |
olle |
1008 |
{ |
3225 |
02 Apr 15 |
olle |
item.rna.volume = frm.rnaDefaultVolume.value; |
3225 |
02 Apr 15 |
olle |
item.rna.ndConc = null; |
3225 |
02 Apr 15 |
olle |
item.rna.originalQuantity = null; |
3225 |
02 Apr 15 |
olle |
1012 |
} |
3225 |
02 Apr 15 |
olle |
1013 |
|
3225 |
02 Apr 15 |
olle |
if (item.dna) |
3225 |
02 Apr 15 |
olle |
1015 |
{ |
3225 |
02 Apr 15 |
olle |
item.dna.volume = frm.dnaDefaultVolume.value; |
3225 |
02 Apr 15 |
olle |
item.dna.qubitConc = null; |
3225 |
02 Apr 15 |
olle |
item.dna.originalQuantity = null; |
3225 |
02 Apr 15 |
olle |
item.dna.deltaCt = null; |
3225 |
02 Apr 15 |
olle |
1020 |
} |
3225 |
02 Apr 15 |
olle |
1021 |
} |
3225 |
02 Apr 15 |
olle |
var selected = true; |
3225 |
02 Apr 15 |
olle |
// Identification of item via id works here as specimens and extracts |
3225 |
02 Apr 15 |
olle |
// are stored in the same database table using discriminators, and are |
3225 |
02 Apr 15 |
olle |
// therefore guaranteed to not have the same id value as another item in the table. |
3225 |
02 Apr 15 |
olle |
var option = new Option(name, item.id, selected, selected); |
3225 |
02 Apr 15 |
olle |
option.item = item; |
3225 |
02 Apr 15 |
olle |
//sourceItemList.options[sourceItemList.length] = option; |
3225 |
02 Apr 15 |
olle |
sourceItemList.options[i] = option; |
3225 |
02 Apr 15 |
olle |
1030 |
} |
3225 |
02 Apr 15 |
olle |
1031 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1033 |
{ |
3225 |
02 Apr 15 |
olle |
Wizard.setFatalError('No items available for processing.'); |
3225 |
02 Apr 15 |
olle |
return; |
3225 |
02 Apr 15 |
olle |
1036 |
} |
3225 |
02 Apr 15 |
olle |
1037 |
|
3225 |
02 Apr 15 |
olle |
exreg.updateDetailsTable(); |
3225 |
02 Apr 15 |
olle |
1039 |
|
3225 |
02 Apr 15 |
olle |
Wizard.setCurrentStep(3); |
3231 |
08 Apr 15 |
olle |
1041 |
|
3225 |
02 Apr 15 |
olle |
Doc.show('gocancel'); |
3225 |
02 Apr 15 |
olle |
Doc.show('gocreate'); |
3225 |
02 Apr 15 |
olle |
1044 |
|
3225 |
02 Apr 15 |
olle |
Wizard.keepSessionAlive(); |
3225 |
02 Apr 15 |
olle |
1046 |
} |
3225 |
02 Apr 15 |
olle |
1047 |
|
3225 |
02 Apr 15 |
olle |
exreg.createItemNameNanoDropPosJson = function() |
3225 |
02 Apr 15 |
olle |
1049 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
1051 |
|
3354 |
27 May 15 |
olle |
qiacubeSortedPrefixes = exreg.getQiacubeSortedPrefixes(); |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numSpecimenItems = exreg.getNumberOfSpecimenItems(); |
3432 |
29 Jun 15 |
olle |
var numQiacubeItems = numSpecimenItems; |
3432 |
29 Jun 15 |
olle |
var totNumItems = numItems; |
3225 |
02 Apr 15 |
olle |
var itemNo = 0; |
3225 |
02 Apr 15 |
olle |
qiacubeItemNo = 0; |
3225 |
02 Apr 15 |
olle |
var nanoDropItemNo = 0; |
3225 |
02 Apr 15 |
olle |
var rnaItemNo = 0; |
3225 |
02 Apr 15 |
olle |
var intNanoDropPlatePosition = 0; |
3225 |
02 Apr 15 |
olle |
// Store NanoDrop positions as JSON object with item names as keys |
3225 |
02 Apr 15 |
olle |
var nanoDropJsonStr = '{'; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3225 |
02 Apr 15 |
olle |
1067 |
{ |
3225 |
02 Apr 15 |
olle |
itemNo++; |
3225 |
02 Apr 15 |
olle |
var item = null; |
3225 |
02 Apr 15 |
olle |
var qiacubePos = null; |
3432 |
29 Jun 15 |
olle |
item = selItemsList[i]; |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
1073 |
{ |
3225 |
02 Apr 15 |
olle |
qiacubeItemNo++; |
3432 |
29 Jun 15 |
olle |
intNanoDropPlatePosition = qiacubeItemNo; |
3354 |
27 May 15 |
olle |
//qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo, qiacubeSortedPrefixes); |
3225 |
02 Apr 15 |
olle |
1077 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1079 |
{ |
3225 |
02 Apr 15 |
olle |
rnaItemNo++; |
3225 |
02 Apr 15 |
olle |
intNanoDropPlatePosition = numSpecimenItems + rnaItemNo; |
3225 |
02 Apr 15 |
olle |
1082 |
} |
3225 |
02 Apr 15 |
olle |
1083 |
|
3225 |
02 Apr 15 |
olle |
// Calculate NanoDrop well from Qiacube position |
3225 |
02 Apr 15 |
olle |
var row; |
3225 |
02 Apr 15 |
olle |
var col; |
3225 |
02 Apr 15 |
olle |
// Specimens from up to two QIAcube instruments and input RNA items placed on one NanoDrop plate |
3225 |
02 Apr 15 |
olle |
if (intNanoDropPlatePosition > 16) |
3225 |
02 Apr 15 |
olle |
1089 |
{ |
3225 |
02 Apr 15 |
olle |
// (17 - 24) NanoDrop plate for secondary QIAcube, positions A3 - H3 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 17; |
3225 |
02 Apr 15 |
olle |
col = 3; |
3225 |
02 Apr 15 |
olle |
1093 |
} |
3225 |
02 Apr 15 |
olle |
else if (intNanoDropPlatePosition > 8) |
3225 |
02 Apr 15 |
olle |
1095 |
{ |
3225 |
02 Apr 15 |
olle |
// ( 9 - 12) NanoDrop plate for primary QIAcube, positions A2 - D2 |
3225 |
02 Apr 15 |
olle |
// (13 - 16) NanoDrop plate for secondary QIAcube, positions E2 - H2 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 9; |
3225 |
02 Apr 15 |
olle |
col = 2; |
3225 |
02 Apr 15 |
olle |
1100 |
} |
3225 |
02 Apr 15 |
olle |
else if (intNanoDropPlatePosition > 0) |
3225 |
02 Apr 15 |
olle |
1102 |
{ |
3225 |
02 Apr 15 |
olle |
// ( 1 - 8) NanoDrop plate for primary QIAcube, positions A1 - H1 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 1; |
3225 |
02 Apr 15 |
olle |
col = 1; |
3225 |
02 Apr 15 |
olle |
1106 |
} |
3225 |
02 Apr 15 |
olle |
var nanoDropWell = Meludi.wellToAlpha(row) + col; |
3225 |
02 Apr 15 |
olle |
// Store NanoDrop position as JSON object with item name as key |
3225 |
02 Apr 15 |
olle |
if (nanoDropItemNo > 0) |
3225 |
02 Apr 15 |
olle |
1110 |
{ |
3225 |
02 Apr 15 |
olle |
nanoDropJsonStr += ','; |
3225 |
02 Apr 15 |
olle |
1112 |
} |
3225 |
02 Apr 15 |
olle |
nanoDropJsonStr += '"' + item.name + '":"' + nanoDropWell + '"'; |
3225 |
02 Apr 15 |
olle |
nanoDropItemNo++; |
3225 |
02 Apr 15 |
olle |
1115 |
} |
3225 |
02 Apr 15 |
olle |
nanoDropJsonStr += '}'; |
3225 |
02 Apr 15 |
olle |
return nanoDropJsonStr; |
3225 |
02 Apr 15 |
olle |
1118 |
} |
3225 |
02 Apr 15 |
olle |
1119 |
|
3225 |
02 Apr 15 |
olle |
exreg.getQiacubeSortedPrefixes = function() |
3225 |
02 Apr 15 |
olle |
1121 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
var primaryQiacubePrefix = frm.qiacubePrimaryPrefix.value; |
3225 |
02 Apr 15 |
olle |
var secondaryQiacubePrefix = frm.qiacubeSecondaryPrefix.value; |
3225 |
02 Apr 15 |
olle |
1125 |
|
3225 |
02 Apr 15 |
olle |
// Get string of current QIAcube prefixes in order |
3354 |
27 May 15 |
olle |
var sortedPrefixes = ExtractUtils.getQiacubeSortedPrefixes(primaryQiacubePrefix, secondaryQiacubePrefix); |
3225 |
02 Apr 15 |
olle |
return sortedPrefixes; |
3225 |
02 Apr 15 |
olle |
1129 |
} |
3225 |
02 Apr 15 |
olle |
1130 |
|
3225 |
02 Apr 15 |
olle |
exreg.toggleNormalize = function() |
3225 |
02 Apr 15 |
olle |
1132 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
// Toggle normalize check box status |
3225 |
02 Apr 15 |
olle |
var check = null; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1140 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1143 |
{ |
3225 |
02 Apr 15 |
olle |
if (!frm['rnaPreNormalize'+i].disabled) |
3225 |
02 Apr 15 |
olle |
1145 |
{ |
3225 |
02 Apr 15 |
olle |
if (check == null) check = !frm['rnaPreNormalize'+i].checked; |
3225 |
02 Apr 15 |
olle |
frm['rnaPreNormalize'+i].checked = check; |
3225 |
02 Apr 15 |
olle |
1148 |
} |
3225 |
02 Apr 15 |
olle |
1149 |
} |
3225 |
02 Apr 15 |
olle |
1150 |
} |
3225 |
02 Apr 15 |
olle |
1151 |
} |
3225 |
02 Apr 15 |
olle |
1152 |
|
3225 |
02 Apr 15 |
olle |
exreg.getSelectedItemsList = function() |
3225 |
02 Apr 15 |
olle |
1154 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
1156 |
|
3225 |
02 Apr 15 |
olle |
// Get number of selected extract source items |
3225 |
02 Apr 15 |
olle |
var numItems = 0; |
3225 |
02 Apr 15 |
olle |
var selItemsList = []; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < frm.extractSourceItems.length; i++) |
3225 |
02 Apr 15 |
olle |
1161 |
{ |
3225 |
02 Apr 15 |
olle |
if (frm.extractSourceItems[i].selected) |
3225 |
02 Apr 15 |
olle |
1163 |
{ |
3225 |
02 Apr 15 |
olle |
if (frm.extractSourceItems[i].item != null) |
3225 |
02 Apr 15 |
olle |
1165 |
{ |
3225 |
02 Apr 15 |
olle |
selItemsList[numItems] = frm.extractSourceItems[i].item; |
3225 |
02 Apr 15 |
olle |
numItems++; |
3225 |
02 Apr 15 |
olle |
1168 |
} |
3225 |
02 Apr 15 |
olle |
1169 |
} |
3225 |
02 Apr 15 |
olle |
1170 |
} |
3225 |
02 Apr 15 |
olle |
return selItemsList; |
3225 |
02 Apr 15 |
olle |
1172 |
} |
3225 |
02 Apr 15 |
olle |
1173 |
|
3225 |
02 Apr 15 |
olle |
exreg.getNumberOfSpecimenItems = function() |
3225 |
02 Apr 15 |
olle |
1175 |
{ |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numSpecimen = 0; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1181 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
1184 |
{ |
3225 |
02 Apr 15 |
olle |
numSpecimen++; |
3225 |
02 Apr 15 |
olle |
1186 |
} |
3225 |
02 Apr 15 |
olle |
1187 |
} |
3225 |
02 Apr 15 |
olle |
return numSpecimen; |
3225 |
02 Apr 15 |
olle |
1189 |
} |
3225 |
02 Apr 15 |
olle |
1190 |
|
3225 |
02 Apr 15 |
olle |
exreg.getNumberOfRnaItems = function() |
3225 |
02 Apr 15 |
olle |
1192 |
{ |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numRna = 0; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1198 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1201 |
{ |
3225 |
02 Apr 15 |
olle |
numRna++; |
3225 |
02 Apr 15 |
olle |
1203 |
} |
3225 |
02 Apr 15 |
olle |
1204 |
} |
3225 |
02 Apr 15 |
olle |
return numRna; |
3225 |
02 Apr 15 |
olle |
1206 |
} |
3225 |
02 Apr 15 |
olle |
1207 |
|
3225 |
02 Apr 15 |
olle |
exreg.getNumberOfDnaItems = function() |
3225 |
02 Apr 15 |
olle |
1209 |
{ |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numDna = 0; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1215 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isDna(item)) |
3225 |
02 Apr 15 |
olle |
1218 |
{ |
3225 |
02 Apr 15 |
olle |
numDna++; |
3225 |
02 Apr 15 |
olle |
1220 |
} |
3225 |
02 Apr 15 |
olle |
1221 |
} |
3225 |
02 Apr 15 |
olle |
return numDna; |
3225 |
02 Apr 15 |
olle |
1223 |
} |
3225 |
02 Apr 15 |
olle |
1224 |
|
3225 |
02 Apr 15 |
olle |
exreg.dnaConcOnChange = function(event) |
3225 |
02 Apr 15 |
olle |
1226 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
// Update DNA concentration values |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1233 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3225 |
02 Apr 15 |
olle |
var dnaConc = Doc.element('dnaConc'+i); |
3225 |
02 Apr 15 |
olle |
if (dnaConc != null) |
3225 |
02 Apr 15 |
olle |
1237 |
{ |
3225 |
02 Apr 15 |
olle |
if (dnaConc.value != null && dnaConc.value != '' && dnaConc.value != '-') |
3225 |
02 Apr 15 |
olle |
1239 |
{ |
3352 |
26 May 15 |
olle |
item.dna.qubitConc = ExtractUtils.getNumber(dnaConc.value); |
3225 |
02 Apr 15 |
olle |
1241 |
} |
3225 |
02 Apr 15 |
olle |
1242 |
/* |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1244 |
{ |
3225 |
02 Apr 15 |
olle |
item.dna.qubitConc = null; |
3225 |
02 Apr 15 |
olle |
1246 |
} |
3225 |
02 Apr 15 |
olle |
1247 |
*/ |
3225 |
02 Apr 15 |
olle |
1248 |
} |
3225 |
02 Apr 15 |
olle |
1249 |
} |
3225 |
02 Apr 15 |
olle |
exreg.updateDetailsTable(); |
3225 |
02 Apr 15 |
olle |
1251 |
} |
3225 |
02 Apr 15 |
olle |
1252 |
|
3225 |
02 Apr 15 |
olle |
exreg.updateDetailsTable = function() |
3225 |
02 Apr 15 |
olle |
1254 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
var docType = frm.formCopyType.value; |
3352 |
26 May 15 |
olle |
var rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
var dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3225 |
02 Apr 15 |
olle |
var hasQiacubePosition = []; |
3225 |
02 Apr 15 |
olle |
var duplicatePosition = 0; |
3225 |
02 Apr 15 |
olle |
1261 |
|
3354 |
27 May 15 |
olle |
qiacubeSortedPrefixes = exreg.getQiacubeSortedPrefixes(); |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
var numSpecimenItems = exreg.getNumberOfSpecimenItems(); |
3225 |
02 Apr 15 |
olle |
var numRnaItems = exreg.getNumberOfRnaItems(); |
3225 |
02 Apr 15 |
olle |
var numDnaItems = exreg.getNumberOfDnaItems(); |
3225 |
02 Apr 15 |
olle |
var numNanoDropItems = numSpecimenItems + numRnaItems; |
3432 |
29 Jun 15 |
olle |
var numQiacubeItems = numSpecimenItems; |
3432 |
29 Jun 15 |
olle |
var totNumItems = numItems; |
3225 |
02 Apr 15 |
olle |
// Get sorted list of used integer QIAcube positions for specimens, generalized for more than one QIAcube |
3225 |
02 Apr 15 |
olle |
var specSortedIntQiacubePosition = []; |
3225 |
02 Apr 15 |
olle |
var qiacubeItemNo = 0; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3225 |
02 Apr 15 |
olle |
1276 |
{ |
3432 |
29 Jun 15 |
olle |
var item = selItemsList[i]; |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
1279 |
{ |
3432 |
29 Jun 15 |
olle |
var qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo + 1, qiacubeSortedPrefixes); |
3432 |
29 Jun 15 |
olle |
if (docType == 'protocol') |
3225 |
02 Apr 15 |
olle |
1282 |
{ |
3432 |
29 Jun 15 |
olle |
item.qiacubePosition = qiacubePos; |
3225 |
02 Apr 15 |
olle |
1284 |
} |
3354 |
27 May 15 |
olle |
var intQiacubePosition = ExtractUtils.getIntQiacubePosition(item.qiacubePosition, qiacubeSortedPrefixes); |
3225 |
02 Apr 15 |
olle |
specSortedIntQiacubePosition[qiacubeItemNo] = intQiacubePosition; |
3225 |
02 Apr 15 |
olle |
qiacubeItemNo++; |
3225 |
02 Apr 15 |
olle |
1288 |
} |
3225 |
02 Apr 15 |
olle |
1289 |
} |
3225 |
02 Apr 15 |
olle |
// Sort for ascending integer values |
3225 |
02 Apr 15 |
olle |
specSortedIntQiacubePosition.sort(function(a,b){return a-b}); |
3225 |
02 Apr 15 |
olle |
var rnaItemNo = 0; |
3225 |
02 Apr 15 |
olle |
var qiacubeItemNo = 0; |
3225 |
02 Apr 15 |
olle |
// Set default values for DNA/RNA extraction |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3225 |
02 Apr 15 |
olle |
1296 |
{ |
3276 |
29 Apr 15 |
olle |
var rnaStorageBox = '-'; |
3276 |
29 Apr 15 |
olle |
var dnaStorageBox = '-'; |
3225 |
02 Apr 15 |
olle |
var item = null; |
3432 |
29 Jun 15 |
olle |
item = selItemsList[i]; |
3432 |
29 Jun 15 |
olle |
var qiacubePos = null; |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3225 |
02 Apr 15 |
olle |
1303 |
{ |
3432 |
29 Jun 15 |
olle |
qiacubeItemNo++; |
3432 |
29 Jun 15 |
olle |
qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo, qiacubeSortedPrefixes); |
3432 |
29 Jun 15 |
olle |
if (docType == 'protocol') |
3225 |
02 Apr 15 |
olle |
1307 |
{ |
3432 |
29 Jun 15 |
olle |
item.qiacubePosition = qiacubePos; |
3225 |
02 Apr 15 |
olle |
1309 |
} |
3432 |
29 Jun 15 |
olle |
1310 |
} |
3432 |
29 Jun 15 |
olle |
item.originalQiacubePosition = qiacubePos; |
3276 |
29 Apr 15 |
olle |
1312 |
|
3432 |
29 Jun 15 |
olle |
// RNA extract from specimen |
3432 |
29 Jun 15 |
olle |
if (item.rna && item.rna.bioWell) |
3432 |
29 Jun 15 |
olle |
1315 |
{ |
3432 |
29 Jun 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.rna.bioWell.bioPlate.name + '[' + item.rna.bioWell.location + ']'); |
3225 |
02 Apr 15 |
olle |
1317 |
} |
3432 |
29 Jun 15 |
olle |
// DNA extract from specimen |
3432 |
29 Jun 15 |
olle |
if (item.dna && item.dna.bioWell) |
3225 |
02 Apr 15 |
olle |
1320 |
{ |
3432 |
29 Jun 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.dna.bioWell.bioPlate.name + '[' + item.dna.bioWell.location + ']'); |
3225 |
02 Apr 15 |
olle |
1322 |
} |
3432 |
29 Jun 15 |
olle |
// Input RNA item storage location should be displayed in the RNA extract storage location column |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isRna(item) && item.bioWell != null) |
3432 |
29 Jun 15 |
olle |
1325 |
{ |
3432 |
29 Jun 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3432 |
29 Jun 15 |
olle |
1327 |
} |
3432 |
29 Jun 15 |
olle |
// Input DNA item storage location should be displayed in the DNA extract storage location column |
3432 |
29 Jun 15 |
olle |
if (ExtractUtils.isDna(item) && item.bioWell != null) |
3432 |
29 Jun 15 |
olle |
1330 |
{ |
3432 |
29 Jun 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3432 |
29 Jun 15 |
olle |
1332 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('qiacubePosition'+i)) |
3225 |
02 Apr 15 |
olle |
1334 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('qiacubePosition'+i).innerHTML = item.qiacubePosition; |
3225 |
02 Apr 15 |
olle |
Doc.addOrRemoveClass('qiacubePosition'+i, 'nondefault', item.qiacubePosition != item.originalQiacubePosition); |
3225 |
02 Apr 15 |
olle |
1337 |
} |
3225 |
02 Apr 15 |
olle |
1338 |
|
3354 |
27 May 15 |
olle |
var intQiacubePosition = ExtractUtils.getIntQiacubePosition(item.qiacubePosition, qiacubeSortedPrefixes); |
3225 |
02 Apr 15 |
olle |
if (intQiacubePosition != null) |
3225 |
02 Apr 15 |
olle |
1341 |
{ |
3225 |
02 Apr 15 |
olle |
if (hasQiacubePosition[intQiacubePosition]) |
3225 |
02 Apr 15 |
olle |
1343 |
{ |
3225 |
02 Apr 15 |
olle |
duplicatePosition = intQiacubePosition; |
3225 |
02 Apr 15 |
olle |
1345 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1347 |
{ |
3225 |
02 Apr 15 |
olle |
hasQiacubePosition[intQiacubePosition] = true; |
3225 |
02 Apr 15 |
olle |
1349 |
} |
3225 |
02 Apr 15 |
olle |
1350 |
} |
3225 |
02 Apr 15 |
olle |
var intNanoDropPlatePosition = intQiacubePosition; |
3225 |
02 Apr 15 |
olle |
// Get integer NanoDrop position for specimens from index in sorted list of used integer QIAcube positions |
3225 |
02 Apr 15 |
olle |
if (intQiacubePosition) |
3225 |
02 Apr 15 |
olle |
1354 |
{ |
3225 |
02 Apr 15 |
olle |
var sortIndex = -1; |
3225 |
02 Apr 15 |
olle |
for (var j = 0; j < specSortedIntQiacubePosition.length; j++) |
3225 |
02 Apr 15 |
olle |
1357 |
{ |
3225 |
02 Apr 15 |
olle |
if (intQiacubePosition == specSortedIntQiacubePosition[j]) |
3225 |
02 Apr 15 |
olle |
1359 |
{ |
3225 |
02 Apr 15 |
olle |
sortIndex = j; |
3225 |
02 Apr 15 |
olle |
1361 |
} |
3225 |
02 Apr 15 |
olle |
1362 |
} |
3225 |
02 Apr 15 |
olle |
if (sortIndex > -1) |
3225 |
02 Apr 15 |
olle |
1364 |
{ |
3225 |
02 Apr 15 |
olle |
intNanoDropPlatePosition = sortIndex + 1; |
3225 |
02 Apr 15 |
olle |
1366 |
} |
3225 |
02 Apr 15 |
olle |
1367 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1369 |
{ |
3225 |
02 Apr 15 |
olle |
rnaItemNo++; |
3225 |
02 Apr 15 |
olle |
intNanoDropPlatePosition = numSpecimenItems + rnaItemNo; |
3225 |
02 Apr 15 |
olle |
1372 |
} |
3225 |
02 Apr 15 |
olle |
1373 |
|
3225 |
02 Apr 15 |
olle |
// Calculate NanoDrop well from Qiacube position |
3225 |
02 Apr 15 |
olle |
var row; |
3225 |
02 Apr 15 |
olle |
var col; |
3225 |
02 Apr 15 |
olle |
// Specimens from up to two QIAcube instruments and input RNA items placed on one NanoDrop plate |
3225 |
02 Apr 15 |
olle |
if (intNanoDropPlatePosition > 16) |
3225 |
02 Apr 15 |
olle |
1379 |
{ |
3225 |
02 Apr 15 |
olle |
// (17 - 24) NanoDrop plate for secondary QIAcube, positions A3 - H3 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 17; |
3225 |
02 Apr 15 |
olle |
col = 3; |
3225 |
02 Apr 15 |
olle |
1383 |
} |
3225 |
02 Apr 15 |
olle |
else if (intNanoDropPlatePosition > 8) |
3225 |
02 Apr 15 |
olle |
1385 |
{ |
3225 |
02 Apr 15 |
olle |
// ( 9 - 12) NanoDrop plate for primary QIAcube, positions A2 - D2 |
3225 |
02 Apr 15 |
olle |
// (13 - 16) NanoDrop plate for secondary QIAcube, positions E2 - H2 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 9; |
3225 |
02 Apr 15 |
olle |
col = 2; |
3225 |
02 Apr 15 |
olle |
1390 |
} |
3225 |
02 Apr 15 |
olle |
else if (intNanoDropPlatePosition > 0) |
3225 |
02 Apr 15 |
olle |
1392 |
{ |
3225 |
02 Apr 15 |
olle |
// ( 1 - 8) NanoDrop plate for primary QIAcube, positions A1 - H1 |
3225 |
02 Apr 15 |
olle |
row = intNanoDropPlatePosition - 1; |
3225 |
02 Apr 15 |
olle |
col = 1; |
3225 |
02 Apr 15 |
olle |
1396 |
} |
3225 |
02 Apr 15 |
olle |
var nanoDropWell = Meludi.wellToAlpha(row) + col; |
3225 |
02 Apr 15 |
olle |
if (i < numItems) |
3225 |
02 Apr 15 |
olle |
1399 |
{ |
3225 |
02 Apr 15 |
olle |
1400 |
|
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1402 |
{ |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = nanoDropWell; |
3225 |
02 Apr 15 |
olle |
1404 |
/* |
3225 |
02 Apr 15 |
olle |
if (item.rna) |
3225 |
02 Apr 15 |
olle |
1406 |
{ |
3225 |
02 Apr 15 |
olle |
item.rna.well = nanoDropWell; |
3225 |
02 Apr 15 |
olle |
1408 |
} |
3225 |
02 Apr 15 |
olle |
1409 |
*/ |
3225 |
02 Apr 15 |
olle |
1410 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1412 |
{ |
3225 |
02 Apr 15 |
olle |
if (item.dna) |
3225 |
02 Apr 15 |
olle |
1414 |
{ |
3276 |
29 Apr 15 |
olle |
//item.dna.well = null; |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = null; |
3276 |
29 Apr 15 |
olle |
1417 |
} |
3225 |
02 Apr 15 |
olle |
1418 |
} |
3225 |
02 Apr 15 |
olle |
1419 |
|
3276 |
29 Apr 15 |
olle |
if (Doc.element('rnaPlatePos'+i)) |
3276 |
29 Apr 15 |
olle |
1421 |
{ |
3276 |
29 Apr 15 |
olle |
Doc.element('rnaPlatePos'+i).innerHTML = rnaStorageBox; |
3276 |
29 Apr 15 |
olle |
1423 |
} |
3276 |
29 Apr 15 |
olle |
if (Doc.element('dnaPlatePos'+i)) |
3276 |
29 Apr 15 |
olle |
1425 |
{ |
3276 |
29 Apr 15 |
olle |
Doc.element('dnaPlatePos'+i).innerHTML = dnaStorageBox; |
3276 |
29 Apr 15 |
olle |
1427 |
} |
3225 |
02 Apr 15 |
olle |
if (item.dna) |
3225 |
02 Apr 15 |
olle |
1429 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaVol'+i)) |
3225 |
02 Apr 15 |
olle |
1431 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('dnaVol'+i).innerHTML = item.dna.volume; |
3225 |
02 Apr 15 |
olle |
Doc.addOrRemoveClass('dnaVol'+i, 'nondefault', item.dna.volume != dnaDefaultVolume); |
3225 |
02 Apr 15 |
olle |
1434 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaConc'+i)) |
3225 |
02 Apr 15 |
olle |
1436 |
{ |
3225 |
02 Apr 15 |
olle |
var dnaConc = Doc.element('dnaConc'+i); |
3225 |
02 Apr 15 |
olle |
dnaConc.innerHTML = Meludi.formatNumber(item.dna.qubitConc) || '-'; |
3225 |
02 Apr 15 |
olle |
dnaConc.title = '260/280=' + item.dna.nd260by280 + '\n260/230=' + item.dna.nd260by230; |
3225 |
02 Apr 15 |
olle |
if (dnaConc != null) |
3225 |
02 Apr 15 |
olle |
1441 |
{ |
3225 |
02 Apr 15 |
olle |
var dnaConcValue = dnaConc.value; |
3225 |
02 Apr 15 |
olle |
if (dnaConcValue != null && dnaConcValue != '-' && dnaConcValue != '') |
3225 |
02 Apr 15 |
olle |
1444 |
{ |
3352 |
26 May 15 |
olle |
item.dna.qubitConc = ExtractUtils.getNumber(dnaConcValue); |
3225 |
02 Apr 15 |
olle |
1446 |
} |
3225 |
02 Apr 15 |
olle |
1447 |
} |
3225 |
02 Apr 15 |
olle |
1448 |
} |
3225 |
02 Apr 15 |
olle |
item.dna.quantity = item.dna.qubitConc * item.dna.volume / 1000; |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaQuantity'+i)) |
3225 |
02 Apr 15 |
olle |
1451 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('dnaQuantity'+i).innerHTML = Meludi.formatNumber(item.dna.quantity || null, null, 2) || '-'; |
3225 |
02 Apr 15 |
olle |
1453 |
} |
3225 |
02 Apr 15 |
olle |
1454 |
|
3225 |
02 Apr 15 |
olle |
var deltaCt = Doc.element('deltaCt'+i); |
3225 |
02 Apr 15 |
olle |
if (deltaCt) |
3225 |
02 Apr 15 |
olle |
1457 |
{ |
3225 |
02 Apr 15 |
olle |
var deltaCtValue = deltaCt.value; |
3225 |
02 Apr 15 |
olle |
if (deltaCtValue != null && deltaCtValue != '-' && deltaCtValue != '') |
3225 |
02 Apr 15 |
olle |
1460 |
{ |
3352 |
26 May 15 |
olle |
item.dna.deltaCt = ExtractUtils.getNumber(deltaCtValue); |
3225 |
02 Apr 15 |
olle |
1462 |
} |
3225 |
02 Apr 15 |
olle |
deltaCt.innerHTML = Meludi.formatNumber(item.dna.deltaCt) || '-'; |
3225 |
02 Apr 15 |
olle |
1464 |
} |
3225 |
02 Apr 15 |
olle |
1465 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1467 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaVol'+i)) |
3225 |
02 Apr 15 |
olle |
1469 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('dnaVol'+i).innerHTML = dnaDefaultVolume; |
3225 |
02 Apr 15 |
olle |
1471 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaConc'+i)) |
3225 |
02 Apr 15 |
olle |
1473 |
{ |
3225 |
02 Apr 15 |
olle |
var dnaConc = Doc.element('dnaConc'+i); |
3225 |
02 Apr 15 |
olle |
dnaConc.innerHTML = '-'; |
3225 |
02 Apr 15 |
olle |
dnaConc.title = '260/280=' + null + '\n260/230=' + null; |
3225 |
02 Apr 15 |
olle |
1477 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('dnaQuantity'+i)) |
3225 |
02 Apr 15 |
olle |
1479 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('dnaQuantity'+i).innerHTML = '-'; |
3225 |
02 Apr 15 |
olle |
1481 |
} |
3225 |
02 Apr 15 |
olle |
1482 |
|
3225 |
02 Apr 15 |
olle |
var deltaCt = Doc.element('deltaCt'+i); |
3225 |
02 Apr 15 |
olle |
if (deltaCt) |
3225 |
02 Apr 15 |
olle |
1485 |
{ |
3225 |
02 Apr 15 |
olle |
deltaCt.innerHTML = '-'; |
3225 |
02 Apr 15 |
olle |
1487 |
} |
3225 |
02 Apr 15 |
olle |
1488 |
} |
3225 |
02 Apr 15 |
olle |
1489 |
|
3225 |
02 Apr 15 |
olle |
if (item.rna) |
3225 |
02 Apr 15 |
olle |
1491 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaPos'+i)) |
3225 |
02 Apr 15 |
olle |
1493 |
{ |
3276 |
29 Apr 15 |
olle |
Doc.element('rnaPos'+i).innerHTML = item.rna.nanoDropWell; |
3225 |
02 Apr 15 |
olle |
Doc.addOrRemoveClass('rnaPos'+i, 'nondefault', item.qiacubePosition != item.originalQiacubePosition); |
3225 |
02 Apr 15 |
olle |
1496 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaVol'+i)) |
3225 |
02 Apr 15 |
olle |
1498 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaVol'+i).innerHTML = item.rna.volume; |
3225 |
02 Apr 15 |
olle |
Doc.addOrRemoveClass('rnaVol'+i, 'nondefault', item.rna.volume != rnaDefaultVolume); |
3225 |
02 Apr 15 |
olle |
1501 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaConc'+i)) |
3225 |
02 Apr 15 |
olle |
1503 |
{ |
3225 |
02 Apr 15 |
olle |
var rnaConc = Doc.element('rnaConc'+i); |
3225 |
02 Apr 15 |
olle |
rnaConc.innerHTML = Meludi.formatNumber(item.rna.ndConc) || '-'; |
3225 |
02 Apr 15 |
olle |
rnaConc.title = '260/280=' + item.rna.nd260by280 + '\n260/230=' + item.rna.nd260by230; |
3225 |
02 Apr 15 |
olle |
1507 |
} |
3225 |
02 Apr 15 |
olle |
1508 |
|
3225 |
02 Apr 15 |
olle |
item.rna.quantity = item.rna.ndConc * item.rna.volume / 1000; |
3225 |
02 Apr 15 |
olle |
var enoughQuantity = item.rna.quantity >= MINIMAL_PRE_NORMALIZE_QUANTITY; |
3225 |
02 Apr 15 |
olle |
item.rna.flag = enoughQuantity ? null : 'NotEnoughRemainingQuantity'; |
3225 |
02 Apr 15 |
olle |
1512 |
|
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1514 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaQuantity'+i)) |
3225 |
02 Apr 15 |
olle |
1516 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaQuantity'+i).innerHTML = Meludi.formatNumber(item.rna.quantity || null, null, 2) || '-'; |
3225 |
02 Apr 15 |
olle |
1518 |
} |
3225 |
02 Apr 15 |
olle |
1519 |
} |
3225 |
02 Apr 15 |
olle |
1520 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1522 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaPos'+i)) |
3225 |
02 Apr 15 |
olle |
1524 |
{ |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1526 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaPos'+i).innerHTML = nanoDropWell; |
3225 |
02 Apr 15 |
olle |
1528 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isDna(item)) |
3225 |
02 Apr 15 |
olle |
1530 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaPos'+i).innerHTML = null; |
3225 |
02 Apr 15 |
olle |
1532 |
} |
3225 |
02 Apr 15 |
olle |
1533 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaVol'+i)) |
3225 |
02 Apr 15 |
olle |
1535 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaVol'+i).innerHTML = rnaDefaultVolume; |
3225 |
02 Apr 15 |
olle |
1537 |
} |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaConc'+i)) |
3225 |
02 Apr 15 |
olle |
1539 |
{ |
3225 |
02 Apr 15 |
olle |
var rnaConc = Doc.element('rnaConc'+i); |
3225 |
02 Apr 15 |
olle |
rnaConc.innerHTML = '-'; |
3225 |
02 Apr 15 |
olle |
rnaConc.title = '260/280=' + null + '\n260/230=' + null; |
3225 |
02 Apr 15 |
olle |
1543 |
} |
3225 |
02 Apr 15 |
olle |
1544 |
|
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1546 |
{ |
3225 |
02 Apr 15 |
olle |
if (Doc.element('rnaQuantity'+i)) |
3225 |
02 Apr 15 |
olle |
1548 |
{ |
3225 |
02 Apr 15 |
olle |
Doc.element('rnaQuantity'+i).innerHTML = '-'; |
3225 |
02 Apr 15 |
olle |
1550 |
} |
3225 |
02 Apr 15 |
olle |
1551 |
} |
3225 |
02 Apr 15 |
olle |
1552 |
} |
3225 |
02 Apr 15 |
olle |
1553 |
|
3225 |
02 Apr 15 |
olle |
var cmnt = Doc.element('comments'+i); |
3225 |
02 Apr 15 |
olle |
var tooltip = []; |
3225 |
02 Apr 15 |
olle |
var comment = []; |
3311 |
07 May 15 |
olle |
// Update comment data with description data |
3311 |
07 May 15 |
olle |
if (item.description || item.dna.description || item.rna.description) |
3225 |
02 Apr 15 |
olle |
1559 |
{ |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3311 |
07 May 15 |
olle |
1561 |
{ |
3311 |
07 May 15 |
olle |
if (item.description) |
3311 |
07 May 15 |
olle |
1563 |
{ |
3311 |
07 May 15 |
olle |
if (!item.comment) |
3311 |
07 May 15 |
olle |
1565 |
{ |
3311 |
07 May 15 |
olle |
item.comment = item.description; |
3311 |
07 May 15 |
olle |
1567 |
} |
3311 |
07 May 15 |
olle |
1568 |
} |
3311 |
07 May 15 |
olle |
if (item.rna.description) |
3311 |
07 May 15 |
olle |
1570 |
{ |
3311 |
07 May 15 |
olle |
if (!item.rna.comment) |
3311 |
07 May 15 |
olle |
1572 |
{ |
3311 |
07 May 15 |
olle |
item.rna.comment = item.rna.description; |
3311 |
07 May 15 |
olle |
1574 |
} |
3311 |
07 May 15 |
olle |
1575 |
} |
3311 |
07 May 15 |
olle |
if (item.dna.description) |
3311 |
07 May 15 |
olle |
1577 |
{ |
3311 |
07 May 15 |
olle |
if (!item.dna.comment) |
3311 |
07 May 15 |
olle |
1579 |
{ |
3311 |
07 May 15 |
olle |
item.dna.comment = item.dna.description; |
3311 |
07 May 15 |
olle |
1581 |
} |
3311 |
07 May 15 |
olle |
1582 |
} |
3311 |
07 May 15 |
olle |
1583 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3311 |
07 May 15 |
olle |
1585 |
{ |
3311 |
07 May 15 |
olle |
if (item.description) |
3311 |
07 May 15 |
olle |
1587 |
{ |
3311 |
07 May 15 |
olle |
if (!item.rna.comment) |
3311 |
07 May 15 |
olle |
1589 |
{ |
3311 |
07 May 15 |
olle |
item.rna.comment = item.description; |
3311 |
07 May 15 |
olle |
1591 |
} |
3311 |
07 May 15 |
olle |
1592 |
} |
3311 |
07 May 15 |
olle |
if (item.rna.description) |
3311 |
07 May 15 |
olle |
1594 |
{ |
3311 |
07 May 15 |
olle |
if (!item.rna.comment) |
3311 |
07 May 15 |
olle |
1596 |
{ |
3311 |
07 May 15 |
olle |
item.rna.comment = item.rna.description; |
3311 |
07 May 15 |
olle |
1598 |
} |
3311 |
07 May 15 |
olle |
1599 |
} |
3311 |
07 May 15 |
olle |
1600 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isDna(item)) |
3311 |
07 May 15 |
olle |
1602 |
{ |
3311 |
07 May 15 |
olle |
if (item.description) |
3311 |
07 May 15 |
olle |
1604 |
{ |
3311 |
07 May 15 |
olle |
if (!item.dna.comment) |
3311 |
07 May 15 |
olle |
1606 |
{ |
3311 |
07 May 15 |
olle |
item.dna.comment = item.description; |
3311 |
07 May 15 |
olle |
1608 |
} |
3311 |
07 May 15 |
olle |
1609 |
} |
3311 |
07 May 15 |
olle |
if (item.dna.description) |
3311 |
07 May 15 |
olle |
1611 |
{ |
3311 |
07 May 15 |
olle |
if (!item.dna.comment) |
3311 |
07 May 15 |
olle |
1613 |
{ |
3311 |
07 May 15 |
olle |
item.dna.comment = item.dna.description; |
3311 |
07 May 15 |
olle |
1615 |
} |
3311 |
07 May 15 |
olle |
1616 |
} |
3311 |
07 May 15 |
olle |
1617 |
} |
3311 |
07 May 15 |
olle |
1618 |
} |
3311 |
07 May 15 |
olle |
if (item.operatorDeliveryComment || item.comment || item.dna.comment || item.rna.comment) |
3311 |
07 May 15 |
olle |
1620 |
{ |
3246 |
14 Apr 15 |
olle |
// Display operator delivery comments directly in the comment field |
3246 |
14 Apr 15 |
olle |
if (item.operatorDeliveryComment) |
3246 |
14 Apr 15 |
olle |
1623 |
{ |
3246 |
14 Apr 15 |
olle |
comment[0] = item.operatorDeliveryComment; |
3246 |
14 Apr 15 |
olle |
tooltip[tooltip.length] = 'Op.Del.Cmt: ' + item.operatorDeliveryComment; |
3246 |
14 Apr 15 |
olle |
1626 |
} |
3246 |
14 Apr 15 |
olle |
else |
3246 |
14 Apr 15 |
olle |
1628 |
{ |
3246 |
14 Apr 15 |
olle |
comment[0] = 'Yes'; |
3246 |
14 Apr 15 |
olle |
1630 |
} |
3225 |
02 Apr 15 |
olle |
if (item.comment) tooltip[tooltip.length] = 'Specimen: ' + item.comment; |
3311 |
07 May 15 |
olle |
if (item.rna.comment) tooltip[tooltip.length] = 'RNA: ' + item.rna.comment; |
3311 |
07 May 15 |
olle |
if (item.dna.comment) tooltip[tooltip.length] = 'DNA: ' + item.dna.comment; |
3225 |
02 Apr 15 |
olle |
1634 |
} |
3225 |
02 Apr 15 |
olle |
1635 |
|
3225 |
02 Apr 15 |
olle |
var modifiedReagents = false; |
3225 |
02 Apr 15 |
olle |
for (var rgNo = 0; rgNo < exreg.REAGENTS.length; rgNo++) |
3225 |
02 Apr 15 |
olle |
1638 |
{ |
3225 |
02 Apr 15 |
olle |
var rg = exreg.REAGENTS[rgNo]; |
3225 |
02 Apr 15 |
olle |
if (item[rg]) |
3225 |
02 Apr 15 |
olle |
1641 |
{ |
3225 |
02 Apr 15 |
olle |
tooltip[tooltip.length] = Doc.element(rg+'.title').innerHTML + ': ' + Strings.encodeTags(item[rg]); |
3225 |
02 Apr 15 |
olle |
modifiedReagents = true; |
3225 |
02 Apr 15 |
olle |
1644 |
} |
3225 |
02 Apr 15 |
olle |
1645 |
} |
3225 |
02 Apr 15 |
olle |
if (modifiedReagents) |
3225 |
02 Apr 15 |
olle |
1647 |
{ |
3225 |
02 Apr 15 |
olle |
comment[comment.length] = 'Reagents'; |
3225 |
02 Apr 15 |
olle |
1649 |
} |
3225 |
02 Apr 15 |
olle |
1650 |
|
3225 |
02 Apr 15 |
olle |
if (cmnt) |
3225 |
02 Apr 15 |
olle |
1652 |
{ |
3225 |
02 Apr 15 |
olle |
if (tooltip.length > 0) |
3225 |
02 Apr 15 |
olle |
1654 |
{ |
3225 |
02 Apr 15 |
olle |
cmnt.innerHTML = comment.join(', '); |
3225 |
02 Apr 15 |
olle |
Doc.addClass(cmnt, 'nondefault'); |
3225 |
02 Apr 15 |
olle |
cmnt.title = tooltip.join('\n'); |
3225 |
02 Apr 15 |
olle |
1658 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1660 |
{ |
3225 |
02 Apr 15 |
olle |
cmnt.innerHTML = ''; |
3225 |
02 Apr 15 |
olle |
Doc.removeClass(cmnt, 'nondefault'); |
3225 |
02 Apr 15 |
olle |
cmnt.title = null; |
3225 |
02 Apr 15 |
olle |
1664 |
} |
3225 |
02 Apr 15 |
olle |
1665 |
} |
3225 |
02 Apr 15 |
olle |
1666 |
} |
3225 |
02 Apr 15 |
olle |
1667 |
} |
3225 |
02 Apr 15 |
olle |
1668 |
|
3225 |
02 Apr 15 |
olle |
if (duplicatePosition) |
3225 |
02 Apr 15 |
olle |
1670 |
{ |
3354 |
27 May 15 |
olle |
var duplicatePositionStr = ExtractUtils.getDetailedQiacubePosition(duplicatePosition, qiacubeSortedPrefixes); |
3225 |
02 Apr 15 |
olle |
qiacubePositionsAreValid = false; |
3225 |
02 Apr 15 |
olle |
1673 |
} |
3225 |
02 Apr 15 |
olle |
else |
3225 |
02 Apr 15 |
olle |
1675 |
{ |
3225 |
02 Apr 15 |
olle |
qiacubePositionsAreValid = true; |
3225 |
02 Apr 15 |
olle |
1677 |
} |
3225 |
02 Apr 15 |
olle |
1678 |
} |
3225 |
02 Apr 15 |
olle |
1679 |
|
3225 |
02 Apr 15 |
olle |
exreg.findRnaOrDnaNanoDrop = function(sampleId, lineNo, messageId) |
3225 |
02 Apr 15 |
olle |
1681 |
{ |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1686 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3225 |
02 Apr 15 |
olle |
var test_rna_name = item.rna.name; |
3225 |
02 Apr 15 |
olle |
var test_dna_name = item.dna.name; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3225 |
02 Apr 15 |
olle |
1691 |
{ |
3225 |
02 Apr 15 |
olle |
test_rna_name = item.name; |
3225 |
02 Apr 15 |
olle |
test_dna_name = item.name; |
3225 |
02 Apr 15 |
olle |
1694 |
} |
3225 |
02 Apr 15 |
olle |
if (test_rna_name == sampleId) |
3225 |
02 Apr 15 |
olle |
1696 |
{ |
3225 |
02 Apr 15 |
olle |
return item.rna; |
3225 |
02 Apr 15 |
olle |
1698 |
} |
3225 |
02 Apr 15 |
olle |
else if (test_dna_name == sampleId) |
3225 |
02 Apr 15 |
olle |
1700 |
{ |
3225 |
02 Apr 15 |
olle |
return item.dna; |
3225 |
02 Apr 15 |
olle |
1702 |
} |
3225 |
02 Apr 15 |
olle |
1703 |
} |
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus(messageId, 'invalid', 'On line ' + lineNo + '; Can\'t find RNA/DNA with name "' + sampleId + '"'); |
3225 |
02 Apr 15 |
olle |
return null; |
3225 |
02 Apr 15 |
olle |
1706 |
} |
3225 |
02 Apr 15 |
olle |
1707 |
|
3225 |
02 Apr 15 |
olle |
exreg.findRnaOrDna = function(sampleId, lineNo, messageId) |
3225 |
02 Apr 15 |
olle |
1709 |
{ |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3225 |
02 Apr 15 |
olle |
1714 |
{ |
3225 |
02 Apr 15 |
olle |
var item = selItemsList[i]; |
3225 |
02 Apr 15 |
olle |
if (item.rna.name == sampleId) |
3225 |
02 Apr 15 |
olle |
1717 |
{ |
3225 |
02 Apr 15 |
olle |
return item.rna; |
3225 |
02 Apr 15 |
olle |
1719 |
} |
3225 |
02 Apr 15 |
olle |
else if (item.dna.name == sampleId) |
3225 |
02 Apr 15 |
olle |
1721 |
{ |
3225 |
02 Apr 15 |
olle |
return item.dna; |
3225 |
02 Apr 15 |
olle |
1723 |
} |
3225 |
02 Apr 15 |
olle |
1724 |
} |
3225 |
02 Apr 15 |
olle |
Wizard.setInputStatus(messageId, 'invalid', 'On line ' + lineNo + '; Can\'t find RNA/DNA with name "' + sampleId + '"'); |
3225 |
02 Apr 15 |
olle |
return null; |
3225 |
02 Apr 15 |
olle |
1727 |
} |
3225 |
02 Apr 15 |
olle |
1728 |
|
3332 |
12 May 15 |
olle |
exreg.downloadReagentLotNoFile = function() |
3332 |
12 May 15 |
olle |
1730 |
{ |
3332 |
12 May 15 |
olle |
var frm = document.forms['meludi']; |
3332 |
12 May 15 |
olle |
1732 |
|
3332 |
12 May 15 |
olle |
var reagentInfo = {}; |
3332 |
12 May 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3332 |
12 May 15 |
olle |
url += '&cmd=DownloadReagentLotNoFile'; |
3432 |
29 Jun 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3332 |
12 May 15 |
olle |
url += '&isolationDate='+encodeURIComponent(frm.isolationDate.value); |
3332 |
12 May 15 |
olle |
1738 |
|
3332 |
12 May 15 |
olle |
// Reagents |
3332 |
12 May 15 |
olle |
for (var i = 0; i < exreg.REAGENTS.length; i++) |
3332 |
12 May 15 |
olle |
1741 |
{ |
3332 |
12 May 15 |
olle |
var rg = exreg.REAGENTS[i]; |
3332 |
12 May 15 |
olle |
reagentInfo[rg] = frm[rg].value; |
3332 |
12 May 15 |
olle |
1744 |
} |
3332 |
12 May 15 |
olle |
1745 |
|
3332 |
12 May 15 |
olle |
url += '&reagentInfo=' + encodeURIComponent(JSON.stringify(reagentInfo)); |
3332 |
12 May 15 |
olle |
window.open(url); |
3332 |
12 May 15 |
olle |
1748 |
} |
3332 |
12 May 15 |
olle |
1749 |
|
3231 |
08 Apr 15 |
olle |
exreg.downloadSampleIdFile = function() |
3231 |
08 Apr 15 |
olle |
1751 |
{ |
3231 |
08 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3231 |
08 Apr 15 |
olle |
1753 |
|
3231 |
08 Apr 15 |
olle |
if (!qiacubePositionsAreValid) |
3231 |
08 Apr 15 |
olle |
1755 |
{ |
3231 |
08 Apr 15 |
olle |
Forms.showNotification('downloadSampleIdFile', 'QIAcube positions are not valid. Please fix before downloading the file.'); |
3231 |
08 Apr 15 |
olle |
return; |
3231 |
08 Apr 15 |
olle |
1758 |
} |
3231 |
08 Apr 15 |
olle |
1759 |
|
3231 |
08 Apr 15 |
olle |
var itemNames = []; |
3231 |
08 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3231 |
08 Apr 15 |
olle |
url += '&cmd=DownloadNanoDropSampleIdFile'; |
3432 |
29 Jun 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3231 |
08 Apr 15 |
olle |
url += '&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3231 |
08 Apr 15 |
olle |
url += '&qiacubeRunNo='+encodeURIComponent(frm.qiacubeRunNo.value); |
3255 |
17 Apr 15 |
olle |
url += '&blankControlColumn='+encodeURIComponent(frm.blankControlColumn.checked); |
3231 |
08 Apr 15 |
olle |
1767 |
|
3231 |
08 Apr 15 |
olle |
// Get list of selected extract source items |
3231 |
08 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3231 |
08 Apr 15 |
olle |
var numItems = selItemsList.length; |
3231 |
08 Apr 15 |
olle |
var itemNo = 0; |
3231 |
08 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3231 |
08 Apr 15 |
olle |
1773 |
{ |
3231 |
08 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3231 |
08 Apr 15 |
olle |
1776 |
{ |
3231 |
08 Apr 15 |
olle |
itemNames[itemNo] = item.name; |
3231 |
08 Apr 15 |
olle |
itemNo++; |
3231 |
08 Apr 15 |
olle |
1779 |
} |
3231 |
08 Apr 15 |
olle |
1780 |
} |
3231 |
08 Apr 15 |
olle |
url += '&itemNames=' + encodeURIComponent(itemNames.join(',')); |
3231 |
08 Apr 15 |
olle |
window.open(url); |
3231 |
08 Apr 15 |
olle |
1783 |
} |
3231 |
08 Apr 15 |
olle |
1784 |
|
3231 |
08 Apr 15 |
olle |
exreg.downloadQPcrSampleIdFile = function() |
3231 |
08 Apr 15 |
olle |
1786 |
{ |
3231 |
08 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3231 |
08 Apr 15 |
olle |
var itemNames = []; |
3231 |
08 Apr 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3231 |
08 Apr 15 |
olle |
url += '&cmd=DownloadQPcrSampleIdFile'; |
3432 |
29 Jun 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3231 |
08 Apr 15 |
olle |
url += '&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3231 |
08 Apr 15 |
olle |
url += '&qiacubeRunNo='+encodeURIComponent(frm.qiacubeRunNo.value); |
3231 |
08 Apr 15 |
olle |
1794 |
|
3231 |
08 Apr 15 |
olle |
// Get list of selected extract source items |
3231 |
08 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3231 |
08 Apr 15 |
olle |
var numItems = selItemsList.length; |
3231 |
08 Apr 15 |
olle |
var itemNo = 0; |
3231 |
08 Apr 15 |
olle |
for (var i = 0; i < numItems; i++) |
3231 |
08 Apr 15 |
olle |
1800 |
{ |
3231 |
08 Apr 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isDna(item)) |
3231 |
08 Apr 15 |
olle |
1803 |
{ |
3231 |
08 Apr 15 |
olle |
itemNames[itemNo] = item.name; |
3231 |
08 Apr 15 |
olle |
itemNo++; |
3231 |
08 Apr 15 |
olle |
1806 |
} |
3231 |
08 Apr 15 |
olle |
1807 |
} |
3231 |
08 Apr 15 |
olle |
url += '&itemNames=' + encodeURIComponent(itemNames.join(',')); |
3231 |
08 Apr 15 |
olle |
window.open(url); |
3231 |
08 Apr 15 |
olle |
1810 |
} |
3231 |
08 Apr 15 |
olle |
1811 |
|
3225 |
02 Apr 15 |
olle |
exreg.validateStep3 = function(event) |
3225 |
02 Apr 15 |
olle |
1813 |
{ |
3225 |
02 Apr 15 |
olle |
var valid = true; |
3225 |
02 Apr 15 |
olle |
valid &= nanoDropFileIsValid; |
3225 |
02 Apr 15 |
olle |
valid &= qiacubePositionsAreValid; |
3225 |
02 Apr 15 |
olle |
1817 |
|
3225 |
02 Apr 15 |
olle |
if (!valid) event.preventDefault(); |
3225 |
02 Apr 15 |
olle |
1819 |
} |
3225 |
02 Apr 15 |
olle |
1820 |
|
3225 |
02 Apr 15 |
olle |
exreg.createProtocol = function() |
3225 |
02 Apr 15 |
olle |
1822 |
{ |
3225 |
02 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3225 |
02 Apr 15 |
olle |
var submitInfo = {}; |
3225 |
02 Apr 15 |
olle |
submitInfo.items = []; |
3225 |
02 Apr 15 |
olle |
1826 |
|
3225 |
02 Apr 15 |
olle |
submitInfo.docMode = frm.formCopyType.value; |
3225 |
02 Apr 15 |
olle |
// Get list of selected extract source items |
3225 |
02 Apr 15 |
olle |
var selItemsList = exreg.getSelectedItemsList(); |
3225 |
02 Apr 15 |
olle |
var numItems = selItemsList.length; |
3432 |
29 Jun 15 |
olle |
var totNumItems = numItems; |
3225 |
02 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3225 |
02 Apr 15 |
olle |
1833 |
{ |
3225 |
02 Apr 15 |
olle |
var item = null; |
3432 |
29 Jun 15 |
olle |
item = selItemsList[i]; |
3225 |
02 Apr 15 |
olle |
submitInfo.items[submitInfo.items.length] = item; |
3225 |
02 Apr 15 |
olle |
1837 |
} |
3225 |
02 Apr 15 |
olle |
1838 |
|
3225 |
02 Apr 15 |
olle |
// Extraction |
3432 |
29 Jun 15 |
olle |
submitInfo.startListName = frm.startListName.value; |
3225 |
02 Apr 15 |
olle |
submitInfo.isolationDate = frm.isolationDate.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.extractionOperator = frm.extractionOperator.value; |
3225 |
02 Apr 15 |
olle |
submitInfo.extractionProtocol = parseInt(frm.extractionProtocolId.value, 10); |
3225 |
02 Apr 15 |
olle |
var extractionProtocolName = frm.extractionProtocolName.value; |
3225 |
02 Apr 15 |
olle |
var protocolVersionNo = ''; |
3225 |
02 Apr 15 |
olle |
if (extractionProtocolName) |
3225 |
02 Apr 15 |
olle |
1847 |
{ |
3225 |
02 Apr 15 |
olle |
protocolVersionNo = extractionProtocolName; |
3225 |
02 Apr 15 |
olle |
// Remove part of string up to and including last "v" |
3225 |
02 Apr 15 |
olle |
var vIndex = protocolVersionNo.indexOf('v'); |
3225 |
02 Apr 15 |
olle |
while (vIndex >= 0) |
3225 |
02 Apr 15 |
olle |
1852 |
{ |
3225 |
02 Apr 15 |
olle |
// Remove part of string up to and including first "v" |
3225 |
02 Apr 15 |
olle |
protocolVersionNo = protocolVersionNo.substring(vIndex + 1); |
3225 |
02 Apr 15 |
olle |
vIndex = protocolVersionNo.indexOf('v'); |
3225 |
02 Apr 15 |
olle |
1856 |
} |
3225 |
02 Apr 15 |
olle |
1857 |
} |
3225 |
02 Apr 15 |
olle |
var protocolPreviewFlag = null; |
3225 |
02 Apr 15 |
olle |
submitInfo.extractionProtocolName = extractionProtocolName; |
3225 |
02 Apr 15 |
olle |
submitInfo.protocolVersionNo = protocolVersionNo; |
3225 |
02 Apr 15 |
olle |
submitInfo.protocolPreviewFlag = protocolPreviewFlag; |
3352 |
26 May 15 |
olle |
submitInfo.dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3225 |
02 Apr 15 |
olle |
if (submitInfo.docMode != 'report') |
3225 |
02 Apr 15 |
olle |
1864 |
{ |
3225 |
02 Apr 15 |
olle |
submitInfo.dnaDefaultVolume = null; |
3225 |
02 Apr 15 |
olle |
1866 |
} |
3501 |
21 Sep 15 |
olle |
1867 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
submitInfo.xyleneSpecimen = frm.xyleneSpecimen.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.etoh995Specimen = frm.etoh995Specimen.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.allPrepFfpeKit = frm.allPrepFfpeKit.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferPkdSpecimen = frm.bufferPkdSpecimen.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferAtlSpecimen = frm.bufferAtlSpecimen.value; |
3436 |
02 Jul 15 |
olle |
submitInfo.proteinaseKSpecimen = frm.proteinaseKSpecimen.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.rnaseASpecimen = frm.rnaseASpecimen.value; |
3501 |
21 Sep 15 |
olle |
1876 |
|
3225 |
02 Apr 15 |
olle |
// QIAcube |
3225 |
02 Apr 15 |
olle |
submitInfo.qiacubeDate = frm.qiacubeDate.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qiacubeOperator = frm.qiacubeOperator.value; |
3225 |
02 Apr 15 |
olle |
submitInfo.qiacubeRunNo = parseInt(frm.qiacubeRunNo.value, 10); |
3501 |
21 Sep 15 |
olle |
submitInfo.etoh995 = frm.etoh995.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferRlt = frm.bufferRlt.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferFrn = frm.bufferFrn.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferRpe = frm.bufferRpe.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferAl = frm.bufferAl.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferAw1 = frm.bufferAw1.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferAw2 = frm.bufferAw2.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferAte = frm.bufferAte.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.bufferRdd = frm.bufferRdd.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.rnaseFreeWater = frm.rnaseFreeWater.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.dnaseMix = frm.dnaseMix.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.rneasyMinEluteSpinColumn = frm.rneasyMinEluteSpinColumn.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qiaampMinEluteSpinColumn = frm.qiaampMinEluteSpinColumn.value; |
3225 |
02 Apr 15 |
olle |
1894 |
|
3324 |
11 May 15 |
olle |
// Quality control reagents |
3324 |
11 May 15 |
olle |
submitInfo.kapaSybrFast = frm.kapaSybrFast.value; |
3324 |
11 May 15 |
olle |
submitInfo.qualityControlPrimersQcpRgt = frm.qualityControlPrimersQcpRgt.value; |
3438 |
03 Jul 15 |
olle |
submitInfo.qualityControlTemplateQct = frm.qualityControlTemplateQct.value; |
3324 |
11 May 15 |
olle |
submitInfo.qubitDnaHighSens = frm.qubitDnaHighSens.value; |
3324 |
11 May 15 |
olle |
submitInfo.qubitDnaBroadRange = frm.qubitDnaBroadRange.value; |
3324 |
11 May 15 |
olle |
1901 |
|
3225 |
02 Apr 15 |
olle |
// Save values in hidden input fields for retrieval after HTML request |
3225 |
02 Apr 15 |
olle |
var submitInfoJsonStr = JSON.stringify(submitInfo); |
3225 |
02 Apr 15 |
olle |
frm.hiddenSubmitInfo.value = submitInfoJsonStr; |
3225 |
02 Apr 15 |
olle |
frm.hiddenNumItems.value = submitInfo.items.length; |
3225 |
02 Apr 15 |
olle |
frm.hiddenCounterBalanceInfoRow.value = counterBalanceInfoRow; |
3225 |
02 Apr 15 |
olle |
1907 |
|
3225 |
02 Apr 15 |
olle |
// Calling frm.submit() will change jsp file to extraction_protocol2.jsp |
3225 |
02 Apr 15 |
olle |
frm.submit(); |
3225 |
02 Apr 15 |
olle |
1910 |
} |
3225 |
02 Apr 15 |
olle |
1911 |
|
3254 |
17 Apr 15 |
olle |
// Format value as a date in format yyyy-mm-dd |
3254 |
17 Apr 15 |
olle |
exreg.asDate = function(value) |
3254 |
17 Apr 15 |
olle |
1914 |
{ |
3254 |
17 Apr 15 |
olle |
if (!value) return ''; |
3254 |
17 Apr 15 |
olle |
if (value.length == 8) |
3254 |
17 Apr 15 |
olle |
1917 |
{ |
3254 |
17 Apr 15 |
olle |
value = value.substr(0, 4) + '-' + value.substr(4, 2) + '-' + value.substr(6, 2); |
3254 |
17 Apr 15 |
olle |
1919 |
} |
3254 |
17 Apr 15 |
olle |
return value; |
3254 |
17 Apr 15 |
olle |
1921 |
} |
3254 |
17 Apr 15 |
olle |
1922 |
|
3225 |
02 Apr 15 |
olle |
return exreg; |
3225 |
02 Apr 15 |
olle |
1924 |
}(); |
3225 |
02 Apr 15 |
olle |
1925 |
|
3225 |
02 Apr 15 |
olle |
Doc.onLoad(ExtractionFormCopy.initPage); |
3225 |
02 Apr 15 |
olle |
1927 |
|