3176 |
06 Mar 15 |
olle |
var ExtractionPrep = function() |
3176 |
06 Mar 15 |
olle |
2 |
{ |
3176 |
06 Mar 15 |
olle |
var exprep = {}; |
3176 |
06 Mar 15 |
olle |
var debug = 0; |
3176 |
06 Mar 15 |
olle |
5 |
|
3176 |
06 Mar 15 |
olle |
exprep.REAGENTS = [ |
3176 |
06 Mar 15 |
olle |
'xyleneSpecimen', 'etoh995Specimen', 'bufferPkdSpecimen', 'bufferAtlSpecimen', |
3176 |
06 Mar 15 |
olle |
'proteinaseKSpecimen', 'rnaseASpecimen', 'allPrepFfpeKit', 'etoh995', |
3176 |
06 Mar 15 |
olle |
'bufferRlt', 'bufferFrn', 'bufferRpe', 'bufferAl', |
3176 |
06 Mar 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' |
3176 |
06 Mar 15 |
olle |
13 |
]; |
3176 |
06 Mar 15 |
olle |
14 |
|
3176 |
06 Mar 15 |
olle |
var DEFAULT_RNA_VOLUME = 25; |
3234 |
09 Apr 15 |
olle |
var DEFAULT_DNA_VOLUME = 25; |
3176 |
06 Mar 15 |
olle |
var MINIMAL_PRE_NORMALIZE_QUANTITY = 1.1; // µg |
3180 |
17 Mar 15 |
olle |
var EXTRA_QIACUBE_SAMPLE_NAME_START = 'E'; |
3176 |
06 Mar 15 |
olle |
var protocolMap = {}; |
3176 |
06 Mar 15 |
olle |
20 |
|
3180 |
17 Mar 15 |
olle |
var sourceItemListIsValid = false; |
3354 |
27 May 15 |
olle |
var qiacubeSortedPrefixes = 'BCADEFGHIJKLMNOPQRSTUVWXYZ'; |
3180 |
17 Mar 15 |
olle |
var qiacubeDateIsAfterIsolationDate = true; |
3176 |
06 Mar 15 |
olle |
var qiacubeRunNoIsValid = false; |
3176 |
06 Mar 15 |
olle |
var qiacubePositionsAreValid = false; |
3176 |
06 Mar 15 |
olle |
var counterBalanceInfoRow = false; |
3432 |
29 Jun 15 |
olle |
var nextStartListName = ''; |
3336 |
13 May 15 |
olle |
var trackingProtocolPreview = true; |
3432 |
29 Jun 15 |
olle |
var createdStartList = []; |
3176 |
06 Mar 15 |
olle |
30 |
|
3176 |
06 Mar 15 |
olle |
// Page initialization |
3176 |
06 Mar 15 |
olle |
exprep.initPage = function() |
3176 |
06 Mar 15 |
olle |
33 |
{ |
3176 |
06 Mar 15 |
olle |
// Step 1 |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('step-1', 'wizard-validate', exprep.validateStep1); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('extractSourceItems', 'change', exprep.sourceItemsOnChange); |
3176 |
06 Mar 15 |
olle |
37 |
|
3176 |
06 Mar 15 |
olle |
// Step 2 |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('step-2', 'wizard-initialize', exprep.initializeStep2); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('step-2', 'wizard-validate', exprep.validateStep2); |
3176 |
06 Mar 15 |
olle |
41 |
|
3180 |
17 Mar 15 |
olle |
Events.addEventHandler('isolationDate', 'change', Wizard.validateDate); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('qiacubeDate', 'change', Wizard.validateDate); |
3180 |
17 Mar 15 |
olle |
Events.addEventHandler('isolationDate', 'change', exprep.qiacubeDateOnChange); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('qiacubeDate', 'change', exprep.qiacubeDateOnChange); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('qiacubeRunNo', 'change', exprep.qiacubeRunNoOnChange); |
3501 |
21 Sep 15 |
olle |
Events.addEventHandler('reagentFile', 'change', exprep.reagentFileOnChange); |
3480 |
04 Sep 15 |
olle |
48 |
|
3501 |
21 Sep 15 |
olle |
Buttons.addClickHandler('downloadReagentLotNoFile', exprep.downloadReagentLotNoFile); |
3176 |
06 Mar 15 |
olle |
50 |
|
3176 |
06 Mar 15 |
olle |
// Step 3 |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('step-3', 'wizard-initialize', exprep.initializeStep3); |
3176 |
06 Mar 15 |
olle |
Events.addEventHandler('step-3', 'wizard-validate', exprep.validateStep3); |
3176 |
06 Mar 15 |
olle |
54 |
|
3176 |
06 Mar 15 |
olle |
Buttons.addClickHandler('downloadSampleIdFile', exprep.downloadSampleIdFile); |
3176 |
06 Mar 15 |
olle |
Buttons.addClickHandler('downloadQPcrSampleIdFile', exprep.downloadQPcrSampleIdFile); |
3176 |
06 Mar 15 |
olle |
57 |
|
3176 |
06 Mar 15 |
olle |
// Navigation |
3176 |
06 Mar 15 |
olle |
Buttons.addClickHandler('gocancel', Wizard.cancelWizard); |
3180 |
17 Mar 15 |
olle |
Buttons.addClickHandler('gorestart', Wizard.restartWizard); |
3176 |
06 Mar 15 |
olle |
Buttons.addClickHandler('gonext', Wizard.goNextOnClick); |
3180 |
17 Mar 15 |
olle |
Buttons.addClickHandler('goregister', Wizard.goRegister); |
3176 |
06 Mar 15 |
olle |
Buttons.addClickHandler('gocreate', exprep.createProtocol); |
5858 |
10 Mar 20 |
olle |
Buttons.addClickHandler('downloaddnarnalabelfile', exprep.downloadDnaRnaLabelFile); |
3176 |
06 Mar 15 |
olle |
65 |
|
3180 |
17 Mar 15 |
olle |
// Final registration |
3180 |
17 Mar 15 |
olle |
Events.addEventHandler('wizard', 'wizard-submit', exprep.submit); |
3180 |
17 Mar 15 |
olle |
68 |
|
3501 |
21 Sep 15 |
olle |
// Get unprocessed items |
3176 |
06 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3176 |
06 Mar 15 |
olle |
url += '&cmd=GetUnprocessedItems'; |
3176 |
06 Mar 15 |
olle |
Wizard.showLoadingAnimation('Loading unprocessed items...'); |
3176 |
06 Mar 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.initializeStep1); |
3176 |
06 Mar 15 |
olle |
74 |
} |
3176 |
06 Mar 15 |
olle |
75 |
|
3176 |
06 Mar 15 |
olle |
exprep.initializeStep1 = function(response) |
3176 |
06 Mar 15 |
olle |
77 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var specimens = response.specimens; |
3176 |
06 Mar 15 |
olle |
var rnas = response.rnas; |
3176 |
06 Mar 15 |
olle |
var dnas = response.dnas; |
3212 |
27 Mar 15 |
olle |
var items = response.items; |
3176 |
06 Mar 15 |
olle |
83 |
|
3176 |
06 Mar 15 |
olle |
var sourceItemList = frm.extractSourceItems; |
3212 |
27 Mar 15 |
olle |
if (items.length) |
3176 |
06 Mar 15 |
olle |
86 |
{ |
3212 |
27 Mar 15 |
olle |
var numItems = items.length; |
3212 |
27 Mar 15 |
olle |
for (var i=0; i < items.length; i++) |
3176 |
06 Mar 15 |
olle |
89 |
{ |
3212 |
27 Mar 15 |
olle |
var item = items[i]; |
3212 |
27 Mar 15 |
olle |
var name = (i+1) + ': ' + Strings.encodeTags(item.name); |
3212 |
27 Mar 15 |
olle |
if (item.bioWell) |
3176 |
06 Mar 15 |
olle |
93 |
{ |
3212 |
27 Mar 15 |
olle |
name += ' -- ' + Strings.encodeTags(item.bioWell.bioPlate.name + ' (' + item.bioWell.location + ')'); |
3176 |
06 Mar 15 |
olle |
95 |
} |
3212 |
27 Mar 15 |
olle |
var selected = i < 24; |
3212 |
27 Mar 15 |
olle |
// Identification of item via id works here as specimens and extracts |
3212 |
27 Mar 15 |
olle |
// are stored in the same database table using discriminators, and are |
3212 |
27 Mar 15 |
olle |
// therefore guaranteed to not have the same id value as another item in the table. |
3212 |
27 Mar 15 |
olle |
var option = new Option(name, item.id, selected, selected); |
3212 |
27 Mar 15 |
olle |
option.item = item; |
3212 |
27 Mar 15 |
olle |
sourceItemList.options[sourceItemList.length] = option; |
3176 |
06 Mar 15 |
olle |
103 |
} |
3176 |
06 Mar 15 |
olle |
exprep.sourceItemsOnChange(); |
3176 |
06 Mar 15 |
olle |
105 |
} |
3176 |
06 Mar 15 |
olle |
else |
3176 |
06 Mar 15 |
olle |
107 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.setFatalError('No items available for processing.'); |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
110 |
} |
3176 |
06 Mar 15 |
olle |
111 |
|
3176 |
06 Mar 15 |
olle |
Doc.show('step-1'); |
3176 |
06 Mar 15 |
olle |
Doc.show('gonext'); |
3176 |
06 Mar 15 |
olle |
114 |
} |
3176 |
06 Mar 15 |
olle |
115 |
|
3176 |
06 Mar 15 |
olle |
exprep.sourceItemsOnChange = function() |
3176 |
06 Mar 15 |
olle |
117 |
{ |
3176 |
06 Mar 15 |
olle |
sourceItemListIsValid = false; |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('extractSourceItems'); |
3176 |
06 Mar 15 |
olle |
120 |
|
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var sourceItemList = frm.extractSourceItems; |
3176 |
06 Mar 15 |
olle |
123 |
|
3176 |
06 Mar 15 |
olle |
var numSelected = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < sourceItemList.length; i++) |
3176 |
06 Mar 15 |
olle |
126 |
{ |
3176 |
06 Mar 15 |
olle |
if (sourceItemList[i].selected) numSelected++; |
3176 |
06 Mar 15 |
olle |
128 |
} |
3176 |
06 Mar 15 |
olle |
129 |
|
3176 |
06 Mar 15 |
olle |
if (numSelected < 1 || numSelected > 24) |
3176 |
06 Mar 15 |
olle |
131 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('extractSourceItems', 'invalid', 'Must select 1-24 items.'); |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
134 |
} |
3176 |
06 Mar 15 |
olle |
135 |
|
3176 |
06 Mar 15 |
olle |
sourceItemListIsValid = true; |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('extractSourceItems', 'valid'); |
3176 |
06 Mar 15 |
olle |
138 |
} |
3176 |
06 Mar 15 |
olle |
139 |
|
3176 |
06 Mar 15 |
olle |
140 |
|
3245 |
14 Apr 15 |
olle |
exprep.itemNameOnChange = function(event) |
3245 |
14 Apr 15 |
olle |
142 |
{ |
3245 |
14 Apr 15 |
olle |
var frm = document.forms['meludi']; |
3245 |
14 Apr 15 |
olle |
// Get list of selected extract source items |
3245 |
14 Apr 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3245 |
14 Apr 15 |
olle |
var numItems = selItemsList.length; |
3245 |
14 Apr 15 |
olle |
var numSpecimenItems = exprep.getNumberOfSpecimenItems(); |
3413 |
23 Jun 15 |
olle |
var numQiacubeItems = numSpecimenItems; |
3413 |
23 Jun 15 |
olle |
var totNumItems = numItems; |
3245 |
14 Apr 15 |
olle |
exprep.updateDetailsTable(); |
3245 |
14 Apr 15 |
olle |
151 |
} |
3245 |
14 Apr 15 |
olle |
152 |
|
3176 |
06 Mar 15 |
olle |
exprep.validateStep1 = function(event) |
3176 |
06 Mar 15 |
olle |
154 |
{ |
3413 |
23 Jun 15 |
olle |
if (!sourceItemListIsValid) |
3176 |
06 Mar 15 |
olle |
156 |
{ |
3176 |
06 Mar 15 |
olle |
event.preventDefault(); |
3176 |
06 Mar 15 |
olle |
158 |
} |
3176 |
06 Mar 15 |
olle |
159 |
} |
3176 |
06 Mar 15 |
olle |
160 |
|
3176 |
06 Mar 15 |
olle |
exprep.initializeStep2 = function() |
3176 |
06 Mar 15 |
olle |
162 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
frm.extractSourceItems.disabled = true; |
3180 |
17 Mar 15 |
olle |
165 |
/* |
3176 |
06 Mar 15 |
olle |
frm.rnaDefaultVolume.value = DEFAULT_RNA_VOLUME; |
3176 |
06 Mar 15 |
olle |
frm.dnaDefaultVolume.value = DEFAULT_DNA_VOLUME; |
3180 |
17 Mar 15 |
olle |
168 |
*/ |
3501 |
21 Sep 15 |
olle |
var clearButtons = Doc.element('commonInfoSection').getElementsByClassName('clear-reagents'); |
3501 |
21 Sep 15 |
olle |
if (clearButtons.length > 0) |
3501 |
21 Sep 15 |
olle |
171 |
{ |
3501 |
21 Sep 15 |
olle |
Buttons.addClickHandler(clearButtons[0], exprep.clearReagents); |
3501 |
21 Sep 15 |
olle |
173 |
} |
3501 |
21 Sep 15 |
olle |
var copyButtons = Doc.element('commonInfoSection').getElementsByClassName('copy-reagents-from-latest-extract'); |
3501 |
21 Sep 15 |
olle |
if (copyButtons.length > 0) |
3501 |
21 Sep 15 |
olle |
176 |
{ |
3501 |
21 Sep 15 |
olle |
Buttons.addClickHandler(copyButtons[0], exprep.copyReagentsFromLatestExtract); |
3501 |
21 Sep 15 |
olle |
178 |
} |
3176 |
06 Mar 15 |
olle |
179 |
|
3176 |
06 Mar 15 |
olle |
Wizard.setCurrentStep(2); |
3176 |
06 Mar 15 |
olle |
Doc.show('gocancel'); |
3176 |
06 Mar 15 |
olle |
Doc.show('gonext'); |
3176 |
06 Mar 15 |
olle |
183 |
|
3176 |
06 Mar 15 |
olle |
Meludi.loadProtocols('SAMPLE_HANDLING_PROTOCOL', 'extractionProtocol'); |
3176 |
06 Mar 15 |
olle |
Doc.addClass('extractionProtocol', 'list-loading'); |
3176 |
06 Mar 15 |
olle |
frm.extractionProtocol[0] = new Option('loading...', ''); |
3501 |
21 Sep 15 |
olle |
187 |
|
3501 |
21 Sep 15 |
olle |
// Get extraction protocol |
3176 |
06 Mar 15 |
olle |
var url = '../Protocol.servlet?ID='+App.getSessionId(); |
3176 |
06 Mar 15 |
olle |
url += '&cmd=GetProtocols&subtype=EXTRACTION_PROTOCOL'; |
3176 |
06 Mar 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.protocolsLoaded); |
3176 |
06 Mar 15 |
olle |
192 |
|
3180 |
17 Mar 15 |
olle |
frm.isolationDate.focus(); |
3180 |
17 Mar 15 |
olle |
Events.sendChangeEvent('isolationDate'); |
3176 |
06 Mar 15 |
olle |
Events.sendChangeEvent('qiacubeDate'); |
3176 |
06 Mar 15 |
olle |
196 |
} |
3176 |
06 Mar 15 |
olle |
197 |
|
3176 |
06 Mar 15 |
olle |
exprep.protocolsLoaded = function(response) |
3176 |
06 Mar 15 |
olle |
199 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var protocols = response.protocols; |
3176 |
06 Mar 15 |
olle |
202 |
|
3176 |
06 Mar 15 |
olle |
Doc.removeClass('extractionProtocol', 'list-loading'); |
3176 |
06 Mar 15 |
olle |
frm.extractionProtocol.length = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < protocols.length; i++) |
3176 |
06 Mar 15 |
olle |
206 |
{ |
3176 |
06 Mar 15 |
olle |
var name = protocols[i].name; |
3176 |
06 Mar 15 |
olle |
var id = protocols[i].id; |
3176 |
06 Mar 15 |
olle |
protocolMap[id] = name; |
3202 |
19 Mar 15 |
olle |
frm.extractionProtocol[frm.extractionProtocol.length] = new Option(name, id, false, true); |
3202 |
19 Mar 15 |
olle |
211 |
} |
3176 |
06 Mar 15 |
olle |
frm.extractionProtocol[frm.extractionProtocol.length] = new Option('- none -', ''); |
3176 |
06 Mar 15 |
olle |
213 |
|
3501 |
21 Sep 15 |
olle |
// Get reagent lot numbers from last processed DNA |
3176 |
06 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3180 |
17 Mar 15 |
olle |
url += '&cmd=GetLastProcessedDna'; |
3501 |
21 Sep 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.lastProcessedDnaLoadedInit); |
3176 |
06 Mar 15 |
olle |
218 |
} |
3176 |
06 Mar 15 |
olle |
219 |
|
3501 |
21 Sep 15 |
olle |
exprep.lastProcessedDnaLoadedInit = function(response) |
3176 |
06 Mar 15 |
olle |
221 |
{ |
3501 |
21 Sep 15 |
olle |
// Update reagent lot number fields with values from last processed DNA |
3501 |
21 Sep 15 |
olle |
exprep.lastProcessedDnaLoaded(response); |
3180 |
17 Mar 15 |
olle |
224 |
|
3501 |
21 Sep 15 |
olle |
// Get next start list name |
3180 |
17 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3432 |
29 Jun 15 |
olle |
url += '&cmd=GetNextStartListName'; |
3432 |
29 Jun 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.startListNameLoaded); |
3176 |
06 Mar 15 |
olle |
229 |
} |
3176 |
06 Mar 15 |
olle |
230 |
|
3432 |
29 Jun 15 |
olle |
exprep.startListNameLoaded = function(response) |
3180 |
17 Mar 15 |
olle |
232 |
{ |
3180 |
17 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var nextStartListName = response.nextStartListName; |
3432 |
29 Jun 15 |
olle |
frm.startListName.value = nextStartListName; |
3180 |
17 Mar 15 |
olle |
236 |
} |
3180 |
17 Mar 15 |
olle |
237 |
|
3501 |
21 Sep 15 |
olle |
exprep.clearReagents = function() |
3480 |
04 Sep 15 |
olle |
239 |
{ |
3480 |
04 Sep 15 |
olle |
var frm = document.forms['meludi']; |
3501 |
21 Sep 15 |
olle |
241 |
|
3501 |
21 Sep 15 |
olle |
// Clear reagent values |
3501 |
21 Sep 15 |
olle |
243 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
frm.allPrepFfpeKit.value = null; |
3501 |
21 Sep 15 |
olle |
246 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
frm.xyleneSpecimen.value = null; |
3501 |
21 Sep 15 |
olle |
frm.etoh995Specimen.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferPkdSpecimen.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferAtlSpecimen.value = null; |
3501 |
21 Sep 15 |
olle |
frm.proteinaseKSpecimen.value = null; |
3501 |
21 Sep 15 |
olle |
frm.rnaseASpecimen.value = null; |
3501 |
21 Sep 15 |
olle |
254 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
frm.etoh995.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferRlt.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferFrn.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferRpe.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferAl.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw1.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw2.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferAte.value = null; |
3501 |
21 Sep 15 |
olle |
frm.bufferRdd.value = null; |
3501 |
21 Sep 15 |
olle |
frm.rnaseFreeWater.value = null; |
3501 |
21 Sep 15 |
olle |
frm.dnaseMix.value = null; |
3501 |
21 Sep 15 |
olle |
frm.rneasyMinEluteSpinColumn.value = null; |
3501 |
21 Sep 15 |
olle |
frm.qiaampMinEluteSpinColumn.value = null; |
3501 |
21 Sep 15 |
olle |
269 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
frm.kapaSybrFast.value = null; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlPrimersQcpRgt.value = null; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlTemplateQct.value = null; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaHighSens.value = null; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaBroadRange.value = null; |
3501 |
21 Sep 15 |
olle |
276 |
} |
3501 |
21 Sep 15 |
olle |
277 |
|
3501 |
21 Sep 15 |
olle |
exprep.copyReagentsFromLatestExtract = function() |
3501 |
21 Sep 15 |
olle |
279 |
{ |
3480 |
04 Sep 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3480 |
04 Sep 15 |
olle |
url += '&cmd=GetLastProcessedDna'; |
3501 |
21 Sep 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.lastProcessedDnaLoaded); |
3480 |
04 Sep 15 |
olle |
283 |
} |
3501 |
21 Sep 15 |
olle |
284 |
|
3501 |
21 Sep 15 |
olle |
exprep.lastProcessedDnaLoaded = function(response) |
3480 |
04 Sep 15 |
olle |
286 |
{ |
3480 |
04 Sep 15 |
olle |
var frm = document.forms['meludi']; |
3480 |
04 Sep 15 |
olle |
var dnas = response.dnas; |
3480 |
04 Sep 15 |
olle |
289 |
|
3480 |
04 Sep 15 |
olle |
if (dnas.length > 0) |
3480 |
04 Sep 15 |
olle |
291 |
{ |
3501 |
21 Sep 15 |
olle |
var dna = dnas[0]; |
3480 |
04 Sep 15 |
olle |
293 |
|
3501 |
21 Sep 15 |
olle |
// Reset the existing values |
3480 |
04 Sep 15 |
olle |
295 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
var allPrepFfpeKit = ''; |
3480 |
04 Sep 15 |
olle |
298 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
var specXylene = ''; |
3501 |
21 Sep 15 |
olle |
var specEtoh995 = ''; |
3501 |
21 Sep 15 |
olle |
var specBufferPkd = ''; |
3501 |
21 Sep 15 |
olle |
var specBufferAtl = ''; |
3501 |
21 Sep 15 |
olle |
var specProteinaseK = ''; |
3501 |
21 Sep 15 |
olle |
var specRNAseA = ''; |
3501 |
21 Sep 15 |
olle |
306 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
var bufferRlt = ''; |
3501 |
21 Sep 15 |
olle |
var etoh995 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferFrn = ''; |
3501 |
21 Sep 15 |
olle |
var bufferRpe = ''; |
3501 |
21 Sep 15 |
olle |
var rnaseFreeWater = ''; |
3501 |
21 Sep 15 |
olle |
var dnaseMix = ''; |
3501 |
21 Sep 15 |
olle |
var bufferRdd = ''; |
3501 |
21 Sep 15 |
olle |
var rneasyMinEluteSpinColumn = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAl = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAW1 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAW2 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAte = ''; |
3501 |
21 Sep 15 |
olle |
var qiaampMinEluteSpinColumn = ''; |
3501 |
21 Sep 15 |
olle |
321 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
var kapaSybrFast = ''; |
3501 |
21 Sep 15 |
olle |
var qualityControlPrimersQcpRgt = ''; |
3501 |
21 Sep 15 |
olle |
var qualityControlTemplateQct = ''; |
3501 |
21 Sep 15 |
olle |
var qubitDnaHighSens = ''; |
3501 |
21 Sep 15 |
olle |
var qubitDnaBroadRange = ''; |
3501 |
21 Sep 15 |
olle |
328 |
|
3501 |
21 Sep 15 |
olle |
if (dna) |
3501 |
21 Sep 15 |
olle |
330 |
{ |
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
allPrepFfpeKit = dna.allPrepFfpeKit; |
3501 |
21 Sep 15 |
olle |
333 |
|
3480 |
04 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
specXylene = dna.xyleneSpecimen; |
3501 |
21 Sep 15 |
olle |
specEtoh995 = dna.etoh995Specimen; |
3501 |
21 Sep 15 |
olle |
specBufferPkd = dna.bufferPkdSpecimen; |
3501 |
21 Sep 15 |
olle |
specBufferAtl = dna.bufferAtlSpecimen; |
3501 |
21 Sep 15 |
olle |
specProteinaseK = dna.proteinaseKSpecimen; |
3501 |
21 Sep 15 |
olle |
specRNAseA = dna.rnaseASpecimen; |
3480 |
04 Sep 15 |
olle |
341 |
|
3480 |
04 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
bufferRlt = dna.bufferRlt; |
3501 |
21 Sep 15 |
olle |
etoh995 = dna.etoh995; |
3501 |
21 Sep 15 |
olle |
bufferFrn = dna.bufferFrn; |
3501 |
21 Sep 15 |
olle |
bufferRpe = dna.bufferRpe; |
3501 |
21 Sep 15 |
olle |
rnaseFreeWater = dna.rnaseFreeWater; |
3501 |
21 Sep 15 |
olle |
dnaseMix = dna.dnaseMix; |
3501 |
21 Sep 15 |
olle |
bufferRdd = dna.bufferRdd; |
3501 |
21 Sep 15 |
olle |
rneasyMinEluteSpinColumn = dna.rneasyMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
bufferAl = dna.bufferAl; |
3501 |
21 Sep 15 |
olle |
bufferAW1 = dna.bufferAw1; |
3501 |
21 Sep 15 |
olle |
bufferAW2 = dna.bufferAw2; |
3501 |
21 Sep 15 |
olle |
bufferAte = dna.bufferAte; |
3501 |
21 Sep 15 |
olle |
qiaampMinEluteSpinColumn = dna.qiaampMinEluteSpinColumn; |
3480 |
04 Sep 15 |
olle |
356 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
kapaSybrFast = dna.kapaSybrFast; |
3501 |
21 Sep 15 |
olle |
qualityControlPrimersQcpRgt = dna.qualityControlPrimersQcpRgt; |
3501 |
21 Sep 15 |
olle |
qualityControlTemplateQct = dna.qualityControlTemplateQct; |
3501 |
21 Sep 15 |
olle |
qubitDnaHighSens = dna.qubitDnaHighSens; |
3501 |
21 Sep 15 |
olle |
qubitDnaBroadRange = dna.qubitDnaBroadRange; |
3501 |
21 Sep 15 |
olle |
363 |
} |
3480 |
04 Sep 15 |
olle |
364 |
|
3501 |
21 Sep 15 |
olle |
// Update reagent values |
3480 |
04 Sep 15 |
olle |
366 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
if (frm.allPrepFfpeKit.value == null || frm.allPrepFfpeKit.value == '') |
3501 |
21 Sep 15 |
olle |
369 |
{ |
3501 |
21 Sep 15 |
olle |
frm.allPrepFfpeKit.value = allPrepFfpeKit; |
3501 |
21 Sep 15 |
olle |
371 |
} |
3480 |
04 Sep 15 |
olle |
372 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
frm.xyleneSpecimen.value = specXylene; |
3501 |
21 Sep 15 |
olle |
frm.etoh995Specimen.value = specEtoh995; |
3501 |
21 Sep 15 |
olle |
frm.bufferPkdSpecimen.value = specBufferPkd; |
3501 |
21 Sep 15 |
olle |
frm.bufferAtlSpecimen.value = specBufferAtl; |
3501 |
21 Sep 15 |
olle |
frm.proteinaseKSpecimen.value = specProteinaseK; |
3501 |
21 Sep 15 |
olle |
frm.rnaseASpecimen.value = specRNAseA; |
3480 |
04 Sep 15 |
olle |
380 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
frm.etoh995.value = etoh995; |
3501 |
21 Sep 15 |
olle |
frm.bufferRlt.value = bufferRlt; |
3501 |
21 Sep 15 |
olle |
frm.bufferFrn.value = bufferFrn; |
3501 |
21 Sep 15 |
olle |
frm.bufferRpe.value = bufferRpe; |
3501 |
21 Sep 15 |
olle |
frm.bufferAl.value = bufferAl; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw1.value = bufferAW1; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw2.value = bufferAW2; |
3501 |
21 Sep 15 |
olle |
frm.bufferAte.value = bufferAte; |
3501 |
21 Sep 15 |
olle |
frm.bufferRdd.value = bufferRdd; |
3501 |
21 Sep 15 |
olle |
frm.rnaseFreeWater.value = rnaseFreeWater; |
3501 |
21 Sep 15 |
olle |
frm.dnaseMix.value = dnaseMix; |
3501 |
21 Sep 15 |
olle |
frm.rneasyMinEluteSpinColumn.value = rneasyMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
frm.qiaampMinEluteSpinColumn.value = qiaampMinEluteSpinColumn; |
3480 |
04 Sep 15 |
olle |
395 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
frm.kapaSybrFast.value = kapaSybrFast; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlPrimersQcpRgt.value = qualityControlPrimersQcpRgt; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlTemplateQct.value = qualityControlTemplateQct; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaHighSens.value = qubitDnaHighSens; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaBroadRange.value = qubitDnaBroadRange; |
3480 |
04 Sep 15 |
olle |
402 |
} |
3501 |
21 Sep 15 |
olle |
403 |
} |
3480 |
04 Sep 15 |
olle |
404 |
|
3176 |
06 Mar 15 |
olle |
exprep.qiacubeDateOnChange = function() |
3176 |
06 Mar 15 |
olle |
406 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
408 |
|
3180 |
17 Mar 15 |
olle |
var isolationDateIsValid = Wizard.isValid('isolationDate'); |
3176 |
06 Mar 15 |
olle |
var qiacubeDateIsValid = Wizard.isValid('qiacubeDate'); |
3176 |
06 Mar 15 |
olle |
411 |
|
3180 |
17 Mar 15 |
olle |
if (!isolationDateIsValid || !qiacubeDateIsValid) return; |
3176 |
06 Mar 15 |
olle |
413 |
|
3180 |
17 Mar 15 |
olle |
var isolationDate = Dates.parseString(frm.isolationDate.value, 'yyyyMMdd'); |
3176 |
06 Mar 15 |
olle |
var qiacubeDate = Dates.parseString(frm.qiacubeDate.value, 'yyyyMMdd'); |
3180 |
17 Mar 15 |
olle |
if (isolationDate > qiacubeDate) |
3176 |
06 Mar 15 |
olle |
417 |
{ |
3180 |
17 Mar 15 |
olle |
Wizard.setInputStatus('qiacubeDate', 'invalid', 'QIAcube date is before isolation date'); |
3180 |
17 Mar 15 |
olle |
qiacubeDateIsAfterIsolationDate = false; |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
421 |
} |
3176 |
06 Mar 15 |
olle |
422 |
|
3180 |
17 Mar 15 |
olle |
qiacubeDateIsAfterIsolationDate = true; |
3176 |
06 Mar 15 |
olle |
424 |
|
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('qiacubeDate', 'valid'); |
3176 |
06 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3176 |
06 Mar 15 |
olle |
url += '&cmd=GetNextQiacubeRunNo&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3176 |
06 Mar 15 |
olle |
Wizard.showLoadingAnimation('Loading Qiacube run number...'); |
3176 |
06 Mar 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.gotNextRunNumber); |
3176 |
06 Mar 15 |
olle |
430 |
} |
3176 |
06 Mar 15 |
olle |
431 |
|
3176 |
06 Mar 15 |
olle |
exprep.gotNextRunNumber = function(response) |
3176 |
06 Mar 15 |
olle |
433 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
frm.qiacubeRunNo.value = response.nextQiacubeRunNo; |
3176 |
06 Mar 15 |
olle |
Events.sendChangeEvent('qiacubeRunNo'); |
3176 |
06 Mar 15 |
olle |
437 |
} |
3176 |
06 Mar 15 |
olle |
438 |
|
3176 |
06 Mar 15 |
olle |
exprep.qiacubeRunNoOnChange = function() |
3176 |
06 Mar 15 |
olle |
440 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var runNumber = frm.qiacubeRunNo.value; |
3176 |
06 Mar 15 |
olle |
qiacubeRunNoIsValid = false; |
3176 |
06 Mar 15 |
olle |
444 |
|
3176 |
06 Mar 15 |
olle |
if (runNumber == '') |
3176 |
06 Mar 15 |
olle |
446 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'invalid', 'Missing'); |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
449 |
} |
3176 |
06 Mar 15 |
olle |
if (!(parseInt(runNumber, 10) >= 1)) |
3176 |
06 Mar 15 |
olle |
451 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'invalid', 'Must be at least 1'); |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
454 |
} |
3176 |
06 Mar 15 |
olle |
455 |
|
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('qiacubeRunNo', 'valid'); |
3176 |
06 Mar 15 |
olle |
qiacubeRunNoIsValid = true; |
3176 |
06 Mar 15 |
olle |
458 |
} |
3176 |
06 Mar 15 |
olle |
459 |
|
3501 |
21 Sep 15 |
olle |
exprep.reagentFileOnChange = function() |
3501 |
21 Sep 15 |
olle |
461 |
{ |
3501 |
21 Sep 15 |
olle |
var frm = document.forms['meludi']; |
3501 |
21 Sep 15 |
olle |
var file = frm.reagentFile.files[0]; |
3501 |
21 Sep 15 |
olle |
464 |
|
3501 |
21 Sep 15 |
olle |
var reader = new FileReader(); |
3501 |
21 Sep 15 |
olle |
reader.onload = exprep.reagentFileLoaded; |
3501 |
21 Sep 15 |
olle |
reader.readAsText(file); |
3501 |
21 Sep 15 |
olle |
468 |
} |
3501 |
21 Sep 15 |
olle |
469 |
|
3501 |
21 Sep 15 |
olle |
exprep.reagentFileLoaded = function(event) |
3501 |
21 Sep 15 |
olle |
471 |
{ |
3501 |
21 Sep 15 |
olle |
exprep.parseReagentFile(event.target.result); |
3501 |
21 Sep 15 |
olle |
473 |
} |
3501 |
21 Sep 15 |
olle |
474 |
|
3501 |
21 Sep 15 |
olle |
exprep.parseReagentFile = function(data) |
3501 |
21 Sep 15 |
olle |
476 |
{ |
3501 |
21 Sep 15 |
olle |
var frm = document.forms['meludi']; |
3501 |
21 Sep 15 |
olle |
reagentFileIsValid = false; |
3501 |
21 Sep 15 |
olle |
479 |
|
3501 |
21 Sep 15 |
olle |
var numReagentItems = 0; |
3501 |
21 Sep 15 |
olle |
// Reset the existing values |
3501 |
21 Sep 15 |
olle |
482 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
var allPrepFfpeKit = ''; |
3501 |
21 Sep 15 |
olle |
485 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
var specXylene = ''; |
3501 |
21 Sep 15 |
olle |
var specEtoh995 = ''; |
3501 |
21 Sep 15 |
olle |
var specBufferPkd = ''; |
3501 |
21 Sep 15 |
olle |
var specBufferAtl = ''; |
3501 |
21 Sep 15 |
olle |
var specProteinaseK = ''; |
3501 |
21 Sep 15 |
olle |
var specRNAseA = ''; |
3501 |
21 Sep 15 |
olle |
493 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
var bufferRlt = ''; |
3501 |
21 Sep 15 |
olle |
var etoh995 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferFrn = ''; |
3501 |
21 Sep 15 |
olle |
var bufferRpe = ''; |
3501 |
21 Sep 15 |
olle |
var rnaseFreeWater = ''; |
3501 |
21 Sep 15 |
olle |
var dnaseMix = ''; |
3501 |
21 Sep 15 |
olle |
var bufferRdd = ''; |
3501 |
21 Sep 15 |
olle |
var rneasyMinEluteSpinColumn = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAl = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAW1 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAW2 = ''; |
3501 |
21 Sep 15 |
olle |
var bufferAte = ''; |
3501 |
21 Sep 15 |
olle |
var qiaampMinEluteSpinColumn = ''; |
3501 |
21 Sep 15 |
olle |
508 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
var kapaSybrFast = ''; |
3501 |
21 Sep 15 |
olle |
var qualityControlPrimersQcpRgt = ''; |
3501 |
21 Sep 15 |
olle |
var qualityControlTemplateQct = ''; |
3501 |
21 Sep 15 |
olle |
var qubitDnaHighSens = ''; |
3501 |
21 Sep 15 |
olle |
var qubitDnaBroadRange = ''; |
3501 |
21 Sep 15 |
olle |
515 |
|
3501 |
21 Sep 15 |
olle |
// Find column separator as first character after first occurrence of search string |
3501 |
21 Sep 15 |
olle |
var separator = ExtractUtils.findSeparator(data, "Specimen Reagents"); |
3501 |
21 Sep 15 |
olle |
if (separator == null) |
3501 |
21 Sep 15 |
olle |
519 |
{ |
3501 |
21 Sep 15 |
olle |
// Comma is default separator |
3501 |
21 Sep 15 |
olle |
separator = ','; |
3501 |
21 Sep 15 |
olle |
522 |
} |
3501 |
21 Sep 15 |
olle |
var columnSplitRegexp = new RegExp(" *" + separator + " *",''); |
3501 |
21 Sep 15 |
olle |
var lines = data.split(/[\n\r]+/); |
3501 |
21 Sep 15 |
olle |
var columns = lines[0].split(columnSplitRegexp); |
3501 |
21 Sep 15 |
olle |
526 |
|
3501 |
21 Sep 15 |
olle |
var numImported = 0; |
3501 |
21 Sep 15 |
olle |
var inQiaCubeSection = false; |
3501 |
21 Sep 15 |
olle |
for (var i = 1; i < lines.length; i++) |
3501 |
21 Sep 15 |
olle |
530 |
{ |
3501 |
21 Sep 15 |
olle |
if (lines[i].match(/^\s*$/)) continue; // Ignore empty lines |
3501 |
21 Sep 15 |
olle |
var row = lines[i].split(columnSplitRegexp); |
3501 |
21 Sep 15 |
olle |
if (row[0] == 'Qiacube Reagents') |
3501 |
21 Sep 15 |
olle |
534 |
{ |
3501 |
21 Sep 15 |
olle |
inQiaCubeSection = true; |
3501 |
21 Sep 15 |
olle |
536 |
} |
3501 |
21 Sep 15 |
olle |
if (row.length > 1) |
3501 |
21 Sep 15 |
olle |
538 |
{ |
3501 |
21 Sep 15 |
olle |
var key = row[0]; |
3501 |
21 Sep 15 |
olle |
if (!key || key == '') continue; // with the next line |
3501 |
21 Sep 15 |
olle |
541 |
|
3501 |
21 Sep 15 |
olle |
// FFPE DNA/RNA Kit |
3501 |
21 Sep 15 |
olle |
if (key == 'AllPrep DNA/RNA FFPE kit') |
3501 |
21 Sep 15 |
olle |
544 |
{ |
3501 |
21 Sep 15 |
olle |
allPrepFfpeKit = row[1]; |
3501 |
21 Sep 15 |
olle |
546 |
} |
3501 |
21 Sep 15 |
olle |
547 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
if (key == 'Xylen') |
3501 |
21 Sep 15 |
olle |
550 |
{ |
3501 |
21 Sep 15 |
olle |
specXylene = row[1]; |
3501 |
21 Sep 15 |
olle |
552 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'ETOH 99,5%') |
3501 |
21 Sep 15 |
olle |
554 |
{ |
3501 |
21 Sep 15 |
olle |
if (!inQiaCubeSection) |
3501 |
21 Sep 15 |
olle |
556 |
{ |
3501 |
21 Sep 15 |
olle |
specEtoh995 = row[1]; |
3501 |
21 Sep 15 |
olle |
558 |
} |
3501 |
21 Sep 15 |
olle |
559 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer PKD') |
3501 |
21 Sep 15 |
olle |
561 |
{ |
3501 |
21 Sep 15 |
olle |
specBufferPkd = row[1]; |
3501 |
21 Sep 15 |
olle |
563 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer ATL') |
3501 |
21 Sep 15 |
olle |
565 |
{ |
3501 |
21 Sep 15 |
olle |
specBufferAtl = row[1]; |
3501 |
21 Sep 15 |
olle |
567 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Proteinase K') |
3501 |
21 Sep 15 |
olle |
569 |
{ |
3501 |
21 Sep 15 |
olle |
specProteinaseK = row[1]; |
3501 |
21 Sep 15 |
olle |
571 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Rnase A') |
3501 |
21 Sep 15 |
olle |
573 |
{ |
3501 |
21 Sep 15 |
olle |
specRNAseA = row[1]; |
3501 |
21 Sep 15 |
olle |
575 |
} |
3501 |
21 Sep 15 |
olle |
576 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer RLT') |
3501 |
21 Sep 15 |
olle |
579 |
{ |
3501 |
21 Sep 15 |
olle |
bufferRlt = row[1]; |
3501 |
21 Sep 15 |
olle |
581 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'ETOH 99,5%') |
3501 |
21 Sep 15 |
olle |
583 |
{ |
3501 |
21 Sep 15 |
olle |
if (inQiaCubeSection) |
3501 |
21 Sep 15 |
olle |
585 |
{ |
3501 |
21 Sep 15 |
olle |
etoh995 = row[1]; |
3501 |
21 Sep 15 |
olle |
587 |
} |
3501 |
21 Sep 15 |
olle |
588 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer FRN') |
3501 |
21 Sep 15 |
olle |
590 |
{ |
3501 |
21 Sep 15 |
olle |
bufferFrn = row[1]; |
3501 |
21 Sep 15 |
olle |
592 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer RPE') |
3501 |
21 Sep 15 |
olle |
594 |
{ |
3501 |
21 Sep 15 |
olle |
bufferRpe = row[1]; |
3501 |
21 Sep 15 |
olle |
596 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Rnase-free Water') |
3501 |
21 Sep 15 |
olle |
598 |
{ |
3501 |
21 Sep 15 |
olle |
rnaseFreeWater = row[1]; |
3501 |
21 Sep 15 |
olle |
600 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'DNAse mix') |
3501 |
21 Sep 15 |
olle |
602 |
{ |
3501 |
21 Sep 15 |
olle |
dnaseMix = row[1]; |
3501 |
21 Sep 15 |
olle |
604 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'RDD') |
3501 |
21 Sep 15 |
olle |
606 |
{ |
3501 |
21 Sep 15 |
olle |
bufferRdd = row[1]; |
3501 |
21 Sep 15 |
olle |
608 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Rneasy MinElute Spin Column') |
3501 |
21 Sep 15 |
olle |
610 |
{ |
3501 |
21 Sep 15 |
olle |
rneasyMinEluteSpinColumn = row[1]; |
3501 |
21 Sep 15 |
olle |
612 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer AL') |
3501 |
21 Sep 15 |
olle |
614 |
{ |
3501 |
21 Sep 15 |
olle |
bufferAl = row[1]; |
3501 |
21 Sep 15 |
olle |
616 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer AW1') |
3501 |
21 Sep 15 |
olle |
618 |
{ |
3501 |
21 Sep 15 |
olle |
bufferAW1 = row[1]; |
3501 |
21 Sep 15 |
olle |
620 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer AW2') |
3501 |
21 Sep 15 |
olle |
622 |
{ |
3501 |
21 Sep 15 |
olle |
bufferAW2 = row[1]; |
3501 |
21 Sep 15 |
olle |
624 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Buffer ATE') |
3501 |
21 Sep 15 |
olle |
626 |
{ |
3501 |
21 Sep 15 |
olle |
bufferAte = row[1]; |
3501 |
21 Sep 15 |
olle |
628 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'QIAamp MinElute Spin Column') |
3501 |
21 Sep 15 |
olle |
630 |
{ |
3501 |
21 Sep 15 |
olle |
qiaampMinEluteSpinColumn = row[1]; |
3501 |
21 Sep 15 |
olle |
632 |
} |
3501 |
21 Sep 15 |
olle |
633 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
if (key == 'Kapa SYBR Fast') |
3501 |
21 Sep 15 |
olle |
636 |
{ |
3501 |
21 Sep 15 |
olle |
kapaSybrFast = row[1]; |
3501 |
21 Sep 15 |
olle |
638 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Quality Control Primers (QCP) RGT') |
3501 |
21 Sep 15 |
olle |
640 |
{ |
3501 |
21 Sep 15 |
olle |
qualityControlPrimersQcpRgt = row[1]; |
3501 |
21 Sep 15 |
olle |
642 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'Quality Control Template (QCT)') |
3501 |
21 Sep 15 |
olle |
644 |
{ |
3501 |
21 Sep 15 |
olle |
qualityControlTemplateQct = row[1]; |
3501 |
21 Sep 15 |
olle |
646 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'QUBIT DNA High Sens') |
3501 |
21 Sep 15 |
olle |
648 |
{ |
3501 |
21 Sep 15 |
olle |
qubitDnaHighSens = row[1]; |
3501 |
21 Sep 15 |
olle |
650 |
} |
3501 |
21 Sep 15 |
olle |
if (key == 'QUBIT DNA Broad Range') |
3501 |
21 Sep 15 |
olle |
652 |
{ |
3501 |
21 Sep 15 |
olle |
qubitDnaBroadRange = row[1]; |
3501 |
21 Sep 15 |
olle |
654 |
} |
3501 |
21 Sep 15 |
olle |
655 |
} |
3501 |
21 Sep 15 |
olle |
656 |
} |
3501 |
21 Sep 15 |
olle |
657 |
|
3501 |
21 Sep 15 |
olle |
// Update reagent values |
3501 |
21 Sep 15 |
olle |
659 |
|
3501 |
21 Sep 15 |
olle |
// Specimen reagents |
3501 |
21 Sep 15 |
olle |
frm.xyleneSpecimen.value = specXylene; |
3501 |
21 Sep 15 |
olle |
frm.etoh995Specimen.value = specEtoh995; |
3501 |
21 Sep 15 |
olle |
frm.bufferPkdSpecimen.value = specBufferPkd; |
3501 |
21 Sep 15 |
olle |
frm.bufferAtlSpecimen.value = specBufferAtl; |
3501 |
21 Sep 15 |
olle |
frm.proteinaseKSpecimen.value = specProteinaseK; |
3501 |
21 Sep 15 |
olle |
frm.rnaseASpecimen.value = specRNAseA; |
3501 |
21 Sep 15 |
olle |
667 |
|
3501 |
21 Sep 15 |
olle |
// QIAcube reagents |
3501 |
21 Sep 15 |
olle |
if (frm.allPrepFfpeKit.value == null || frm.allPrepFfpeKit.value == '') |
3501 |
21 Sep 15 |
olle |
670 |
{ |
3501 |
21 Sep 15 |
olle |
frm.allPrepFfpeKit.value = allPrepFfpeKit; |
3501 |
21 Sep 15 |
olle |
672 |
} |
3501 |
21 Sep 15 |
olle |
frm.etoh995.value = etoh995; |
3501 |
21 Sep 15 |
olle |
frm.bufferRlt.value = bufferRlt; |
3501 |
21 Sep 15 |
olle |
frm.bufferFrn.value = bufferFrn; |
3501 |
21 Sep 15 |
olle |
frm.bufferRpe.value = bufferRpe; |
3501 |
21 Sep 15 |
olle |
frm.bufferAl.value = bufferAl; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw1.value = bufferAW1; |
3501 |
21 Sep 15 |
olle |
frm.bufferAw2.value = bufferAW2; |
3501 |
21 Sep 15 |
olle |
frm.bufferAte.value = bufferAte; |
3501 |
21 Sep 15 |
olle |
frm.bufferRdd.value = bufferRdd; |
3501 |
21 Sep 15 |
olle |
frm.rnaseFreeWater.value = rnaseFreeWater; |
3501 |
21 Sep 15 |
olle |
frm.dnaseMix.value = dnaseMix; |
3501 |
21 Sep 15 |
olle |
frm.rneasyMinEluteSpinColumn.value = rneasyMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
frm.qiaampMinEluteSpinColumn.value = qiaampMinEluteSpinColumn; |
3501 |
21 Sep 15 |
olle |
686 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
frm.kapaSybrFast.value = kapaSybrFast; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlPrimersQcpRgt.value = qualityControlPrimersQcpRgt; |
3501 |
21 Sep 15 |
olle |
frm.qualityControlTemplateQct.value = qualityControlTemplateQct; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaHighSens.value = qubitDnaHighSens; |
3501 |
21 Sep 15 |
olle |
frm.qubitDnaBroadRange.value = qubitDnaBroadRange; |
3501 |
21 Sep 15 |
olle |
693 |
|
3501 |
21 Sep 15 |
olle |
if (numImported != numReagentItems) |
3501 |
21 Sep 15 |
olle |
695 |
{ |
3501 |
21 Sep 15 |
olle |
Wizard.setInputStatus('reagentFile', 'invalid', 'Could not find values for all ' + numReagentItems + ' samples: ' + numImported); |
3501 |
21 Sep 15 |
olle |
return; |
3501 |
21 Sep 15 |
olle |
698 |
} |
3501 |
21 Sep 15 |
olle |
699 |
|
3501 |
21 Sep 15 |
olle |
Wizard.setInputStatus('reagentFile', 'valid'); |
3501 |
21 Sep 15 |
olle |
reagentFileIsValid = true; |
3501 |
21 Sep 15 |
olle |
702 |
} |
3501 |
21 Sep 15 |
olle |
703 |
|
3501 |
21 Sep 15 |
olle |
exprep.findReagentColumn = function(columns, col) |
3501 |
21 Sep 15 |
olle |
705 |
{ |
3501 |
21 Sep 15 |
olle |
var colIndex = columns.indexOf(col); |
3501 |
21 Sep 15 |
olle |
if (colIndex == -1) |
3501 |
21 Sep 15 |
olle |
708 |
{ |
3501 |
21 Sep 15 |
olle |
Wizard.setInputStatus('reagentFile', 'invalid', 'On line 1; Can\'t find "' + col + '" column'); |
3501 |
21 Sep 15 |
olle |
710 |
} |
3501 |
21 Sep 15 |
olle |
return colIndex; |
3501 |
21 Sep 15 |
olle |
712 |
} |
3176 |
06 Mar 15 |
olle |
713 |
|
3501 |
21 Sep 15 |
olle |
exprep.downloadReagentLotNoFile = function() |
3501 |
21 Sep 15 |
olle |
715 |
{ |
3501 |
21 Sep 15 |
olle |
var frm = document.forms['meludi']; |
3501 |
21 Sep 15 |
olle |
717 |
|
3501 |
21 Sep 15 |
olle |
var reagentInfo = {}; |
3501 |
21 Sep 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3501 |
21 Sep 15 |
olle |
url += '&cmd=DownloadReagentLotNoFile'; |
3501 |
21 Sep 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3501 |
21 Sep 15 |
olle |
url += '&isolationDate='+encodeURIComponent(frm.isolationDate.value); |
3501 |
21 Sep 15 |
olle |
723 |
|
3501 |
21 Sep 15 |
olle |
// Reagents |
3501 |
21 Sep 15 |
olle |
for (var i = 0; i < exprep.REAGENTS.length; i++) |
3501 |
21 Sep 15 |
olle |
726 |
{ |
3501 |
21 Sep 15 |
olle |
var rg = exprep.REAGENTS[i]; |
3501 |
21 Sep 15 |
olle |
reagentInfo[rg] = frm[rg].value; |
3501 |
21 Sep 15 |
olle |
729 |
} |
3501 |
21 Sep 15 |
olle |
730 |
|
3501 |
21 Sep 15 |
olle |
url += '&reagentInfo=' + encodeURIComponent(JSON.stringify(reagentInfo)); |
3501 |
21 Sep 15 |
olle |
window.open(url); |
3501 |
21 Sep 15 |
olle |
733 |
} |
3501 |
21 Sep 15 |
olle |
734 |
|
3176 |
06 Mar 15 |
olle |
exprep.validateStep2 = function(event) |
3176 |
06 Mar 15 |
olle |
736 |
{ |
3176 |
06 Mar 15 |
olle |
var valid = true; |
3180 |
17 Mar 15 |
olle |
valid &= Wizard.isValid('isolationDate'); |
3176 |
06 Mar 15 |
olle |
valid &= Wizard.isValid('qiacubeDate'); |
3176 |
06 Mar 15 |
olle |
valid &= qiacubeRunNoIsValid; |
3176 |
06 Mar 15 |
olle |
741 |
|
3176 |
06 Mar 15 |
olle |
if (!valid) event.preventDefault(); |
3176 |
06 Mar 15 |
olle |
743 |
} |
3176 |
06 Mar 15 |
olle |
744 |
|
3176 |
06 Mar 15 |
olle |
745 |
|
3176 |
06 Mar 15 |
olle |
exprep.initializeStep3 = function() |
3176 |
06 Mar 15 |
olle |
747 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3432 |
29 Jun 15 |
olle |
var startListName = frm.startListName.value; |
3432 |
29 Jun 15 |
olle |
Doc.element('detailsStartListName').innerHTML = '<b>Start list: ' + startListName + '</b>'; |
3180 |
17 Mar 15 |
olle |
751 |
/* |
3352 |
26 May 15 |
olle |
var rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
var dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3180 |
17 Mar 15 |
olle |
754 |
*/ |
3176 |
06 Mar 15 |
olle |
qiacubeSortedPrefixes = exprep.getQiacubeSortedPrefixes(); |
3176 |
06 Mar 15 |
olle |
756 |
|
3176 |
06 Mar 15 |
olle |
var html = '<table id="detailsTable" class="step-form">'; |
3176 |
06 Mar 15 |
olle |
// First header row |
3176 |
06 Mar 15 |
olle |
html += '<thead>'; |
3176 |
06 Mar 15 |
olle |
html += '<tr>'; |
3220 |
01 Apr 15 |
olle |
html += '<th>Extract</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<th class="dottedleft">QIAcube</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<th colspan="1" class="dottedleft"></th>'; |
3238 |
10 Apr 15 |
olle |
html += '<th colspan="1" class="dottedleft">NanoDrop</th>'; |
3177 |
09 Mar 15 |
olle |
765 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<th colspan="5" class="dottedleft">RNA</th>'; |
3177 |
09 Mar 15 |
olle |
767 |
*/ |
3180 |
17 Mar 15 |
olle |
768 |
/* |
3177 |
09 Mar 15 |
olle |
html += '<th colspan="3" class="dottedleft">RNA</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<th colspan="4" class="dottedleft">DNA</th>'; |
3180 |
17 Mar 15 |
olle |
771 |
*/ |
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>'; |
3176 |
06 Mar 15 |
olle |
html += '<th class="dottedleft comment">Comment</th>'; |
3176 |
06 Mar 15 |
olle |
html += '</tr>'; |
3176 |
06 Mar 15 |
olle |
// Second header row |
3176 |
06 Mar 15 |
olle |
html += '<tr>'; |
3220 |
01 Apr 15 |
olle |
html += '<th>source item</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<th class="dottedleft">position</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">Storage</td>'; |
3176 |
06 Mar 15 |
olle |
781 |
/* |
3176 |
06 Mar 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>'; |
3176 |
06 Mar 15 |
olle |
783 |
*/ |
3177 |
09 Mar 15 |
olle |
784 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">Pos</td><td>Vol.</td><td>Conc.</td><td>Quantity</td><td>Pre-</td>'; |
3177 |
09 Mar 15 |
olle |
786 |
*/ |
3180 |
17 Mar 15 |
olle |
787 |
/* |
3177 |
09 Mar 15 |
olle |
html += '<td class="dottedleft">Pos</td><td>Vol.</td><td>Conc.</td><td>Quantity</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">Vol.</td><td>Conc.</td><td>Quantity</td><td>ΔCt</td>'; |
3180 |
17 Mar 15 |
olle |
790 |
*/ |
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>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft comment"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '</tr>'; |
3176 |
06 Mar 15 |
olle |
// Third header row |
3176 |
06 Mar 15 |
olle |
html += '<tr>'; |
3176 |
06 Mar 15 |
olle |
html += '<th></th>'; |
3176 |
06 Mar 15 |
olle |
html += '<th class="dottedleft"></th>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">box</td>'; |
3176 |
06 Mar 15 |
olle |
801 |
/* |
3176 |
06 Mar 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>'; |
3176 |
06 Mar 15 |
olle |
803 |
*/ |
3177 |
09 Mar 15 |
olle |
804 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft"></td><td>(µl)</td><td>(ng/µl)</td><td>(µg)</td><td>normalize</td>'; |
3177 |
09 Mar 15 |
olle |
806 |
*/ |
3180 |
17 Mar 15 |
olle |
807 |
/* |
3177 |
09 Mar 15 |
olle |
html += '<td class="dottedleft"></td><td>(µl)</td><td>(ng/µl)</td><td>(µg)</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">(µl)</td><td>(ng/µl)</td><td>(µg)</td><td></td>'; |
3180 |
17 Mar 15 |
olle |
810 |
*/ |
3180 |
17 Mar 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>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft comment"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '</tr>'; |
3176 |
06 Mar 15 |
olle |
html += '</thead>'; |
3176 |
06 Mar 15 |
olle |
html += '<tbody>'; |
3176 |
06 Mar 15 |
olle |
818 |
|
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var numSpecimenItems = exprep.getNumberOfSpecimenItems(); |
3176 |
06 Mar 15 |
olle |
var numRnaItems = exprep.getNumberOfRnaItems(); |
3176 |
06 Mar 15 |
olle |
var numDnaItems = exprep.getNumberOfDnaItems(); |
3176 |
06 Mar 15 |
olle |
var numNanoDropItems = numSpecimenItems + numRnaItems; |
3413 |
23 Jun 15 |
olle |
var numQiacubeItems = numSpecimenItems; |
3413 |
23 Jun 15 |
olle |
var totNumItems = numItems; |
3176 |
06 Mar 15 |
olle |
var itemNo = 0; |
3180 |
17 Mar 15 |
olle |
var qiacubeItemNo = 0; |
3176 |
06 Mar 15 |
olle |
// Set default values for DNA/RNA extraction |
3180 |
17 Mar 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3176 |
06 Mar 15 |
olle |
832 |
{ |
3176 |
06 Mar 15 |
olle |
itemNo++; |
3180 |
17 Mar 15 |
olle |
var item = null; |
3180 |
17 Mar 15 |
olle |
var storageBox = '-'; |
3276 |
29 Apr 15 |
olle |
var rnaStorageBox = '-'; |
3276 |
29 Apr 15 |
olle |
var dnaStorageBox = '-'; |
3180 |
17 Mar 15 |
olle |
if (i < numItems) |
3176 |
06 Mar 15 |
olle |
839 |
{ |
3180 |
17 Mar 15 |
olle |
item = selItemsList[i]; |
3180 |
17 Mar 15 |
olle |
var qiacubePos = null; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3180 |
17 Mar 15 |
olle |
843 |
{ |
3180 |
17 Mar 15 |
olle |
qiacubeItemNo++; |
3354 |
27 May 15 |
olle |
qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems, qiacubeItemNo, qiacubeSortedPrefixes); |
3180 |
17 Mar 15 |
olle |
846 |
} |
3180 |
17 Mar 15 |
olle |
item.qiacubePosition = qiacubePos; |
3180 |
17 Mar 15 |
olle |
item.originalQiacubePosition = qiacubePos; |
3176 |
06 Mar 15 |
olle |
849 |
|
3180 |
17 Mar 15 |
olle |
var rna = {}; |
3180 |
17 Mar 15 |
olle |
var dna = {}; |
3180 |
17 Mar 15 |
olle |
// RNA |
3180 |
17 Mar 15 |
olle |
rna.name = item.name + '.r'; |
3180 |
17 Mar 15 |
olle |
854 |
/* |
3180 |
17 Mar 15 |
olle |
rna.volume = rnaDefaultVolume; |
3180 |
17 Mar 15 |
olle |
856 |
*/ |
3180 |
17 Mar 15 |
olle |
// DNA |
3180 |
17 Mar 15 |
olle |
dna.name = item.name + '.d'; |
3180 |
17 Mar 15 |
olle |
859 |
/* |
3180 |
17 Mar 15 |
olle |
dna.volume = dnaDefaultVolume; |
3180 |
17 Mar 15 |
olle |
861 |
*/ |
3276 |
29 Apr 15 |
olle |
862 |
/* |
3180 |
17 Mar 15 |
olle |
item.rna = rna; |
3180 |
17 Mar 15 |
olle |
item.dna = dna; |
3276 |
29 Apr 15 |
olle |
865 |
*/ |
3276 |
29 Apr 15 |
olle |
if (!item.rna) |
3276 |
29 Apr 15 |
olle |
867 |
{ |
3276 |
29 Apr 15 |
olle |
item.rna = rna; |
3276 |
29 Apr 15 |
olle |
869 |
} |
3276 |
29 Apr 15 |
olle |
if (!item.dna) |
3276 |
29 Apr 15 |
olle |
871 |
{ |
3276 |
29 Apr 15 |
olle |
item.dna = dna; |
3276 |
29 Apr 15 |
olle |
873 |
} |
3180 |
17 Mar 15 |
olle |
874 |
/* |
3180 |
17 Mar 15 |
olle |
var storageBox = '-'; |
3180 |
17 Mar 15 |
olle |
876 |
*/ |
3293 |
30 Apr 15 |
olle |
// Input extract source item specimen/RNA/DNA |
3180 |
17 Mar 15 |
olle |
if (item.bioWell != null) |
3180 |
17 Mar 15 |
olle |
879 |
{ |
3180 |
17 Mar 15 |
olle |
storageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3180 |
17 Mar 15 |
olle |
881 |
} |
3293 |
30 Apr 15 |
olle |
// RNA extract from specimen |
3276 |
29 Apr 15 |
olle |
if (item.rna && item.rna.bioWell) |
3276 |
29 Apr 15 |
olle |
884 |
{ |
3276 |
29 Apr 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.rna.bioWell.bioPlate.name + '[' + item.rna.bioWell.location + ']'); |
3276 |
29 Apr 15 |
olle |
886 |
} |
3293 |
30 Apr 15 |
olle |
// DNA extract from specimen |
3276 |
29 Apr 15 |
olle |
if (item.dna && item.dna.bioWell) |
3276 |
29 Apr 15 |
olle |
889 |
{ |
3276 |
29 Apr 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.dna.bioWell.bioPlate.name + '[' + item.dna.bioWell.location + ']'); |
3276 |
29 Apr 15 |
olle |
891 |
} |
3293 |
30 Apr 15 |
olle |
// Input RNA item storage location should be displayed in the RNA extract storage location column |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item) && item.bioWell != null) |
3293 |
30 Apr 15 |
olle |
894 |
{ |
3293 |
30 Apr 15 |
olle |
rnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3293 |
30 Apr 15 |
olle |
896 |
} |
3293 |
30 Apr 15 |
olle |
// Input DNA item storage location should be displayed in the DNA extract storage location column |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isDna(item) && item.bioWell != null) |
3293 |
30 Apr 15 |
olle |
899 |
{ |
3293 |
30 Apr 15 |
olle |
dnaStorageBox = Strings.encodeTags(item.bioWell.bioPlate.name + '[' + item.bioWell.location + ']'); |
3293 |
30 Apr 15 |
olle |
901 |
} |
3180 |
17 Mar 15 |
olle |
902 |
} |
3176 |
06 Mar 15 |
olle |
903 |
|
3176 |
06 Mar 15 |
olle |
html += '<tr class="highlight">'; |
3245 |
14 Apr 15 |
olle |
if (i < numItems) |
3245 |
14 Apr 15 |
olle |
906 |
{ |
3245 |
14 Apr 15 |
olle |
html += '<th>' + Strings.encodeTags(item.name) + '</th>'; |
3245 |
14 Apr 15 |
olle |
908 |
} |
3245 |
14 Apr 15 |
olle |
else |
3245 |
14 Apr 15 |
olle |
910 |
{ |
3245 |
14 Apr 15 |
olle |
// Extra QIAcube item |
3245 |
14 Apr 15 |
olle |
html += '<th><input type="text" id="itemName'+i+'" style="font-weight:bold;" value="' + Strings.encodeTags(item.name) + '"></intput></th>'; |
3245 |
14 Apr 15 |
olle |
913 |
} |
3176 |
06 Mar 15 |
olle |
html += '<td id="qiacubePosition'+i+'" class="dottedleft"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">'+storageBox+'</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaPos'+i+'" class="dottedleft"></td>'; |
3180 |
17 Mar 15 |
olle |
917 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaVol'+i+'"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaConc'+i+'" class="bg-filled-50 italic"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaQuantity'+i+'" class="bg-filled-50 italic"></td>'; |
3180 |
17 Mar 15 |
olle |
921 |
*/ |
3177 |
09 Mar 15 |
olle |
922 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaPreNormalize'+i+'"name="rnaPreNormalize'+i+'"></td>'; |
3177 |
09 Mar 15 |
olle |
924 |
*/ |
3180 |
17 Mar 15 |
olle |
925 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaVol'+i+'"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaConc'+i+'">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaQuantity'+i+'" class="bg-filled-50 italic"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="deltaCt'+i+'" class="bg-filled-50 italic">-</td>'; |
3180 |
17 Mar 15 |
olle |
930 |
*/ |
3276 |
29 Apr 15 |
olle |
html += '<td id="rnaPlatePos'+i+'" class="dottedleft">'+rnaStorageBox+'</td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td id="dnaPlatePos'+i+'" class="dottedleft">'+dnaStorageBox+'</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="comments'+i+'" class="dottedleft comment"></td>'; |
3176 |
06 Mar 15 |
olle |
html += '</tr>'; |
3176 |
06 Mar 15 |
olle |
935 |
} |
3180 |
17 Mar 15 |
olle |
if (numQiacubeItems == 1 || numQiacubeItems == 11 || numQiacubeItems == 23) |
3176 |
06 Mar 15 |
olle |
937 |
{ |
3176 |
06 Mar 15 |
olle |
// Add extra row for counterbalance in QIAcube |
3176 |
06 Mar 15 |
olle |
counterBalanceInfoRow = true; |
3176 |
06 Mar 15 |
olle |
var i = numItems; |
3354 |
27 May 15 |
olle |
var qiacubePos = ExtractUtils.getDetailedQiaCubePosition(numQiacubeItems + 1, numQiacubeItems + 1, qiacubeSortedPrefixes); |
3176 |
06 Mar 15 |
olle |
942 |
|
3176 |
06 Mar 15 |
olle |
html += '<tr class="highlight">'; |
3276 |
29 Apr 15 |
olle |
html += '<th>' + Strings.encodeTags('COUNTER-BALANCE') + '</th>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="qiacubePosition'+i+'" class="dottedleft">'+qiacubePos+'</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td class="dottedleft">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaPos'+i+'" class="dottedleft">-</td>'; |
3180 |
17 Mar 15 |
olle |
948 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaVol'+i+'">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaConc'+i+'" class="bg-filled-50 italic">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="rnaQuantity'+i+'" class="bg-filled-50 italic">-</td>'; |
3180 |
17 Mar 15 |
olle |
952 |
*/ |
3177 |
09 Mar 15 |
olle |
953 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td>-</td>'; |
3177 |
09 Mar 15 |
olle |
955 |
*/ |
3180 |
17 Mar 15 |
olle |
956 |
/* |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaVol'+i+'">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaConc'+i+'">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="dnaQuantity'+i+'" class="bg-filled-50 italic">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="deltaCt'+i+'" class="bg-filled-50 italic">-</td>'; |
3180 |
17 Mar 15 |
olle |
961 |
*/ |
3276 |
29 Apr 15 |
olle |
html += '<td id="rnaPlatePos'+i+'" class="dottedleft">-</td>'; |
3276 |
29 Apr 15 |
olle |
html += '<td id="dnaPlatePos'+i+'" class="dottedleft">-</td>'; |
3176 |
06 Mar 15 |
olle |
html += '<td id="comments'+i+'" class="dottedleft comment">Reminder to use counterbalance</td>'; |
3176 |
06 Mar 15 |
olle |
html += '</tr>'; |
3176 |
06 Mar 15 |
olle |
966 |
} |
3176 |
06 Mar 15 |
olle |
html += '</tbody>'; |
3176 |
06 Mar 15 |
olle |
html += '</table>'; |
3176 |
06 Mar 15 |
olle |
Doc.element('detailsSection').innerHTML = html; |
3245 |
14 Apr 15 |
olle |
970 |
|
3245 |
14 Apr 15 |
olle |
for (var i = numItems; i < totNumItems; i++) |
3245 |
14 Apr 15 |
olle |
972 |
{ |
3245 |
14 Apr 15 |
olle |
Events.addEventHandler('itemName'+i, 'change', exprep.itemNameOnChange); |
3245 |
14 Apr 15 |
olle |
974 |
} |
3176 |
06 Mar 15 |
olle |
975 |
|
3176 |
06 Mar 15 |
olle |
exprep.updateDetailsTable(); |
3176 |
06 Mar 15 |
olle |
977 |
|
3176 |
06 Mar 15 |
olle |
Wizard.setCurrentStep(3); |
3176 |
06 Mar 15 |
olle |
Doc.show('gocancel'); |
3180 |
17 Mar 15 |
olle |
Doc.show('goregister'); |
3176 |
06 Mar 15 |
olle |
Doc.show('gocreate'); |
3180 |
17 Mar 15 |
olle |
//Doc.hide('gocreate'); |
5858 |
10 Mar 20 |
olle |
Doc.show('downloaddnarnalabelfile'); |
3176 |
06 Mar 15 |
olle |
984 |
|
3176 |
06 Mar 15 |
olle |
Wizard.keepSessionAlive(); |
3176 |
06 Mar 15 |
olle |
986 |
|
3176 |
06 Mar 15 |
olle |
if (debug && location.protocol != 'https:') |
3176 |
06 Mar 15 |
olle |
988 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.showDebugTools(); |
3176 |
06 Mar 15 |
olle |
990 |
} |
3176 |
06 Mar 15 |
olle |
991 |
} |
3176 |
06 Mar 15 |
olle |
992 |
|
3176 |
06 Mar 15 |
olle |
exprep.getQiacubeSortedPrefixes = function() |
3176 |
06 Mar 15 |
olle |
994 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var primaryQiacubePrefix = frm.qiacubePrimaryPrefix.value; |
3176 |
06 Mar 15 |
olle |
var secondaryQiacubePrefix = frm.qiacubeSecondaryPrefix.value; |
3176 |
06 Mar 15 |
olle |
998 |
|
3176 |
06 Mar 15 |
olle |
// Get string of current QIAcube prefixes in order |
3354 |
27 May 15 |
olle |
var sortedPrefixes = ExtractUtils.getQiacubeSortedPrefixes(primaryQiacubePrefix, secondaryQiacubePrefix); |
3176 |
06 Mar 15 |
olle |
return sortedPrefixes; |
3176 |
06 Mar 15 |
olle |
1002 |
} |
3176 |
06 Mar 15 |
olle |
1003 |
|
3176 |
06 Mar 15 |
olle |
exprep.getSelectedItemsList = function() |
3176 |
06 Mar 15 |
olle |
1005 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
1007 |
|
3176 |
06 Mar 15 |
olle |
// Get number of selected extract source items |
3176 |
06 Mar 15 |
olle |
var numItems = 0; |
3176 |
06 Mar 15 |
olle |
var selItemsList = []; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < frm.extractSourceItems.length; i++) |
3176 |
06 Mar 15 |
olle |
1012 |
{ |
3176 |
06 Mar 15 |
olle |
if (frm.extractSourceItems[i].selected) |
3176 |
06 Mar 15 |
olle |
1014 |
{ |
3212 |
27 Mar 15 |
olle |
if (frm.extractSourceItems[i].item != null) |
3176 |
06 Mar 15 |
olle |
1016 |
{ |
3212 |
27 Mar 15 |
olle |
selItemsList[numItems] = frm.extractSourceItems[i].item; |
3176 |
06 Mar 15 |
olle |
numItems++; |
3176 |
06 Mar 15 |
olle |
1019 |
} |
3176 |
06 Mar 15 |
olle |
1020 |
} |
3176 |
06 Mar 15 |
olle |
1021 |
} |
3176 |
06 Mar 15 |
olle |
return selItemsList; |
3176 |
06 Mar 15 |
olle |
1023 |
} |
3176 |
06 Mar 15 |
olle |
1024 |
|
3176 |
06 Mar 15 |
olle |
exprep.getNumberOfSpecimenItems = function() |
3176 |
06 Mar 15 |
olle |
1026 |
{ |
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var numSpecimen = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < numItems; i++) |
3176 |
06 Mar 15 |
olle |
1032 |
{ |
3176 |
06 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3176 |
06 Mar 15 |
olle |
1035 |
{ |
3176 |
06 Mar 15 |
olle |
numSpecimen++; |
3176 |
06 Mar 15 |
olle |
1037 |
} |
3176 |
06 Mar 15 |
olle |
1038 |
} |
3176 |
06 Mar 15 |
olle |
return numSpecimen; |
3176 |
06 Mar 15 |
olle |
1040 |
} |
3176 |
06 Mar 15 |
olle |
1041 |
|
3176 |
06 Mar 15 |
olle |
exprep.getNumberOfRnaItems = function() |
3176 |
06 Mar 15 |
olle |
1043 |
{ |
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var numRna = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < numItems; i++) |
3176 |
06 Mar 15 |
olle |
1049 |
{ |
3176 |
06 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3176 |
06 Mar 15 |
olle |
1052 |
{ |
3176 |
06 Mar 15 |
olle |
numRna++; |
3176 |
06 Mar 15 |
olle |
1054 |
} |
3176 |
06 Mar 15 |
olle |
1055 |
} |
3176 |
06 Mar 15 |
olle |
return numRna; |
3176 |
06 Mar 15 |
olle |
1057 |
} |
3176 |
06 Mar 15 |
olle |
1058 |
|
3176 |
06 Mar 15 |
olle |
exprep.getNumberOfDnaItems = function() |
3176 |
06 Mar 15 |
olle |
1060 |
{ |
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var numDna = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < numItems; i++) |
3176 |
06 Mar 15 |
olle |
1066 |
{ |
3176 |
06 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isDna(item)) |
3176 |
06 Mar 15 |
olle |
1069 |
{ |
3176 |
06 Mar 15 |
olle |
numDna++; |
3176 |
06 Mar 15 |
olle |
1071 |
} |
3176 |
06 Mar 15 |
olle |
1072 |
} |
3176 |
06 Mar 15 |
olle |
return numDna; |
3176 |
06 Mar 15 |
olle |
1074 |
} |
3176 |
06 Mar 15 |
olle |
1075 |
|
3176 |
06 Mar 15 |
olle |
exprep.updateDetailsTable = function() |
3176 |
06 Mar 15 |
olle |
1077 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3180 |
17 Mar 15 |
olle |
1079 |
/* |
3352 |
26 May 15 |
olle |
var rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
var dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3180 |
17 Mar 15 |
olle |
1082 |
*/ |
3176 |
06 Mar 15 |
olle |
var hasQiacubePosition = []; |
3176 |
06 Mar 15 |
olle |
var duplicatePosition = 0; |
3176 |
06 Mar 15 |
olle |
1085 |
|
3354 |
27 May 15 |
olle |
qiacubeSortedPrefixes = exprep.getQiacubeSortedPrefixes(); |
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3413 |
23 Jun 15 |
olle |
var totNumItems = numItems; |
3176 |
06 Mar 15 |
olle |
// Get sorted list of used integer QIAcube positions for specimens, generalized for more than one QIAcube |
3176 |
06 Mar 15 |
olle |
var specSortedIntQiacubePosition = []; |
3180 |
17 Mar 15 |
olle |
var qiacubeItemNo = 0; |
3180 |
17 Mar 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3176 |
06 Mar 15 |
olle |
1095 |
{ |
3180 |
17 Mar 15 |
olle |
if (i < numItems) |
3176 |
06 Mar 15 |
olle |
1097 |
{ |
3180 |
17 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item)) |
3180 |
17 Mar 15 |
olle |
1100 |
{ |
3354 |
27 May 15 |
olle |
var intQiacubePosition = ExtractUtils.getIntQiacubePosition(item.qiacubePosition, qiacubeSortedPrefixes); |
3180 |
17 Mar 15 |
olle |
specSortedIntQiacubePosition[qiacubeItemNo] = intQiacubePosition; |
3180 |
17 Mar 15 |
olle |
qiacubeItemNo++; |
3180 |
17 Mar 15 |
olle |
1104 |
} |
3180 |
17 Mar 15 |
olle |
1105 |
} |
3176 |
06 Mar 15 |
olle |
1106 |
} |
3176 |
06 Mar 15 |
olle |
// Sort for ascending integer values |
3176 |
06 Mar 15 |
olle |
specSortedIntQiacubePosition.sort(function(a,b){return a-b}); |
3176 |
06 Mar 15 |
olle |
var numSpecimenItems = exprep.getNumberOfSpecimenItems(); |
3176 |
06 Mar 15 |
olle |
var numRnaItems = exprep.getNumberOfRnaItems(); |
3176 |
06 Mar 15 |
olle |
var numDnaItems = exprep.getNumberOfDnaItems(); |
3176 |
06 Mar 15 |
olle |
var numNanoDropItems = numSpecimenItems + numRnaItems; |
3176 |
06 Mar 15 |
olle |
var rnaItemNo = 0; |
3176 |
06 Mar 15 |
olle |
// Set default values for DNA/RNA extraction |
3180 |
17 Mar 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3176 |
06 Mar 15 |
olle |
1116 |
{ |
3180 |
17 Mar 15 |
olle |
var item = null; |
3180 |
17 Mar 15 |
olle |
if (i < numItems) |
3180 |
17 Mar 15 |
olle |
1119 |
{ |
3180 |
17 Mar 15 |
olle |
item = selItemsList[i]; |
3180 |
17 Mar 15 |
olle |
1121 |
} |
3176 |
06 Mar 15 |
olle |
Doc.element('qiacubePosition'+i).innerHTML = item.qiacubePosition; |
3176 |
06 Mar 15 |
olle |
Doc.addOrRemoveClass('qiacubePosition'+i, 'nondefault', item.qiacubePosition != item.originalQiacubePosition); |
3176 |
06 Mar 15 |
olle |
1124 |
|
3354 |
27 May 15 |
olle |
var intQiacubePosition = ExtractUtils.getIntQiacubePosition(item.qiacubePosition, qiacubeSortedPrefixes); |
3176 |
06 Mar 15 |
olle |
if (intQiacubePosition != null) |
3176 |
06 Mar 15 |
olle |
1127 |
{ |
3176 |
06 Mar 15 |
olle |
if (hasQiacubePosition[intQiacubePosition]) |
3176 |
06 Mar 15 |
olle |
1129 |
{ |
3176 |
06 Mar 15 |
olle |
duplicatePosition = intQiacubePosition; |
3176 |
06 Mar 15 |
olle |
1131 |
} |
3176 |
06 Mar 15 |
olle |
else |
3176 |
06 Mar 15 |
olle |
1133 |
{ |
3176 |
06 Mar 15 |
olle |
hasQiacubePosition[intQiacubePosition] = true; |
3176 |
06 Mar 15 |
olle |
1135 |
} |
3176 |
06 Mar 15 |
olle |
1136 |
} |
3176 |
06 Mar 15 |
olle |
var intNanoDropPlatePosition = intQiacubePosition; |
3176 |
06 Mar 15 |
olle |
// Get integer NanoDrop position for specimens from index in sorted list of used integer QIAcube positions |
3176 |
06 Mar 15 |
olle |
if (intQiacubePosition) |
3176 |
06 Mar 15 |
olle |
1140 |
{ |
3176 |
06 Mar 15 |
olle |
var sortIndex = -1; |
3176 |
06 Mar 15 |
olle |
for (var j = 0; j < specSortedIntQiacubePosition.length; j++) |
3176 |
06 Mar 15 |
olle |
1143 |
{ |
3176 |
06 Mar 15 |
olle |
if (intQiacubePosition == specSortedIntQiacubePosition[j]) |
3176 |
06 Mar 15 |
olle |
1145 |
{ |
3176 |
06 Mar 15 |
olle |
sortIndex = j; |
3176 |
06 Mar 15 |
olle |
1147 |
} |
3176 |
06 Mar 15 |
olle |
1148 |
} |
3176 |
06 Mar 15 |
olle |
if (sortIndex > -1) |
3176 |
06 Mar 15 |
olle |
1150 |
{ |
3176 |
06 Mar 15 |
olle |
intNanoDropPlatePosition = sortIndex + 1; |
3176 |
06 Mar 15 |
olle |
1152 |
} |
3176 |
06 Mar 15 |
olle |
1153 |
} |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isRna(item)) |
3176 |
06 Mar 15 |
olle |
1155 |
{ |
3176 |
06 Mar 15 |
olle |
rnaItemNo++; |
3176 |
06 Mar 15 |
olle |
intNanoDropPlatePosition = numSpecimenItems + rnaItemNo; |
3176 |
06 Mar 15 |
olle |
1158 |
} |
3176 |
06 Mar 15 |
olle |
1159 |
|
3176 |
06 Mar 15 |
olle |
// Calculate NanoDrop well from Qiacube position |
3176 |
06 Mar 15 |
olle |
var row; |
3176 |
06 Mar 15 |
olle |
var col; |
3176 |
06 Mar 15 |
olle |
// Specimens from up to two QIAcube instruments and input RNA items placed on one NanoDrop plate |
3176 |
06 Mar 15 |
olle |
if (intNanoDropPlatePosition > 16) |
3176 |
06 Mar 15 |
olle |
1165 |
{ |
3176 |
06 Mar 15 |
olle |
// (17 - 24) NanoDrop plate for QIAcube 'A', positions A3 - H3 |
3176 |
06 Mar 15 |
olle |
row = intNanoDropPlatePosition - 17; |
3176 |
06 Mar 15 |
olle |
col = 3; |
3176 |
06 Mar 15 |
olle |
1169 |
} |
3176 |
06 Mar 15 |
olle |
else if (intNanoDropPlatePosition > 8) |
3176 |
06 Mar 15 |
olle |
1171 |
{ |
3176 |
06 Mar 15 |
olle |
// ( 9 - 12) NanoDrop plate for QIAcube 'C', positions A2 - D2 |
3176 |
06 Mar 15 |
olle |
// (13 - 16) NanoDrop plate for QIAcube 'A', positions E2 - H2 |
3176 |
06 Mar 15 |
olle |
row = intNanoDropPlatePosition - 9; |
3176 |
06 Mar 15 |
olle |
col = 2; |
3176 |
06 Mar 15 |
olle |
1176 |
} |
3176 |
06 Mar 15 |
olle |
else if (intNanoDropPlatePosition > 0) |
3176 |
06 Mar 15 |
olle |
1178 |
{ |
3176 |
06 Mar 15 |
olle |
// ( 1 - 8) NanoDrop plate for QIAcube 'C', positions A1 - H1 |
3176 |
06 Mar 15 |
olle |
row = intNanoDropPlatePosition - 1; |
3176 |
06 Mar 15 |
olle |
col = 1; |
3176 |
06 Mar 15 |
olle |
1182 |
} |
3180 |
17 Mar 15 |
olle |
if (i < numItems) |
3176 |
06 Mar 15 |
olle |
1184 |
{ |
3352 |
26 May 15 |
olle |
if (!ExtractUtils.isDna(item)) |
3180 |
17 Mar 15 |
olle |
1186 |
{ |
3276 |
29 Apr 15 |
olle |
//item.rna.well = Meludi.wellToAlpha(row) + col; |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = Meludi.wellToAlpha(row) + col; |
3180 |
17 Mar 15 |
olle |
1189 |
} |
3180 |
17 Mar 15 |
olle |
else |
3180 |
17 Mar 15 |
olle |
1191 |
{ |
3276 |
29 Apr 15 |
olle |
//item.dna.well = null; |
3276 |
29 Apr 15 |
olle |
item.rna.nanoDropWell = null; |
3180 |
17 Mar 15 |
olle |
1194 |
} |
3176 |
06 Mar 15 |
olle |
1195 |
|
3176 |
06 Mar 15 |
olle |
1196 |
/* |
3180 |
17 Mar 15 |
olle |
Doc.element('dnaVol'+i).innerHTML = item.dna.volume; |
3180 |
17 Mar 15 |
olle |
Doc.addOrRemoveClass('dnaVol'+i, 'nondefault', item.dna.volume != dnaDefaultVolume); |
3180 |
17 Mar 15 |
olle |
1199 |
*/ |
3180 |
17 Mar 15 |
olle |
1200 |
/* |
3180 |
17 Mar 15 |
olle |
var dnaConc = Doc.element('dnaConc'+i); |
3180 |
17 Mar 15 |
olle |
dnaConc.value = Meludi.formatNumber(item.dna.ndConc) || ''; |
3180 |
17 Mar 15 |
olle |
dnaConc.title = '260/280=' + item.dna.nd260by280 + '\n260/230=' + item.dna.nd260by230; |
3180 |
17 Mar 15 |
olle |
if (dnaConc != null) |
3176 |
06 Mar 15 |
olle |
1205 |
{ |
3180 |
17 Mar 15 |
olle |
var dnaConcValue = dnaConc.value; |
3180 |
17 Mar 15 |
olle |
if (dnaConcValue != null && dnaConcValue != '-' && dnaConcValue != '') |
3180 |
17 Mar 15 |
olle |
1208 |
{ |
3352 |
26 May 15 |
olle |
item.dna.ndConc = ExtractUtils.getNumber(dnaConcValue); |
3180 |
17 Mar 15 |
olle |
1210 |
} |
3176 |
06 Mar 15 |
olle |
1211 |
} |
3180 |
17 Mar 15 |
olle |
item.dna.quantity = item.dna.qubitConc * item.dna.volume / 1000; |
3180 |
17 Mar 15 |
olle |
Doc.element('dnaQuantity'+i).innerHTML = Meludi.formatNumber(item.dna.quantity || null, null, 2) || '-'; |
3176 |
06 Mar 15 |
olle |
1214 |
|
3180 |
17 Mar 15 |
olle |
var deltaCt = Doc.element('deltaCt'+i); |
3180 |
17 Mar 15 |
olle |
if (deltaCt != null) |
3180 |
17 Mar 15 |
olle |
1217 |
{ |
3180 |
17 Mar 15 |
olle |
deltaCt.innerHTML = Meludi.formatNumber(item.dna.deltaCt) || '-'; |
3180 |
17 Mar 15 |
olle |
1219 |
} |
3180 |
17 Mar 15 |
olle |
1220 |
*/ |
3276 |
29 Apr 15 |
olle |
//Doc.element('rnaPos'+i).innerHTML = item.rna.well; |
3276 |
29 Apr 15 |
olle |
Doc.element('rnaPos'+i).innerHTML = item.rna.nanoDropWell; |
3180 |
17 Mar 15 |
olle |
Doc.addOrRemoveClass('rnaPos'+i, 'nondefault', item.qiacubePosition != item.originalQiacubePosition); |
3176 |
06 Mar 15 |
olle |
1224 |
/* |
3180 |
17 Mar 15 |
olle |
Doc.element('rnaVol'+i).innerHTML = item.rna.volume; |
3180 |
17 Mar 15 |
olle |
Doc.addOrRemoveClass('rnaVol'+i, 'nondefault', item.rna.volume != rnaDefaultVolume); |
3180 |
17 Mar 15 |
olle |
var rnaConc = Doc.element('rnaConc'+i); |
3180 |
17 Mar 15 |
olle |
rnaConc.innerHTML = Meludi.formatNumber(item.rna.ndConc) || '-'; |
3180 |
17 Mar 15 |
olle |
rnaConc.title = '260/280=' + item.rna.nd260by280 + '\n260/230=' + item.rna.nd260by230; |
3176 |
06 Mar 15 |
olle |
1230 |
|
3180 |
17 Mar 15 |
olle |
item.rna.quantity = item.rna.ndConc * item.rna.volume / 1000; |
3180 |
17 Mar 15 |
olle |
var enoughQuantity = item.rna.quantity >= MINIMAL_PRE_NORMALIZE_QUANTITY; |
3180 |
17 Mar 15 |
olle |
item.rna.flag = enoughQuantity ? null : 'NotEnoughRemainingQuantity'; |
3176 |
06 Mar 15 |
olle |
1234 |
|
3180 |
17 Mar 15 |
olle |
Doc.element('rnaQuantity'+i).innerHTML = Meludi.formatNumber(item.rna.quantity || null, null, 2) || '-'; |
3180 |
17 Mar 15 |
olle |
1236 |
*/ |
3180 |
17 Mar 15 |
olle |
var cmnt = Doc.element('comments'+i); |
3180 |
17 Mar 15 |
olle |
var tooltip = []; |
3180 |
17 Mar 15 |
olle |
var comment = []; |
3246 |
14 Apr 15 |
olle |
if (item.operatorDeliveryComment || item.comment || item.dna.comment || item.rna.comment) |
3180 |
17 Mar 15 |
olle |
1241 |
{ |
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 |
1244 |
{ |
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 |
1247 |
} |
3246 |
14 Apr 15 |
olle |
else |
3246 |
14 Apr 15 |
olle |
1249 |
{ |
3246 |
14 Apr 15 |
olle |
comment[0] = 'Yes'; |
3246 |
14 Apr 15 |
olle |
1251 |
} |
3180 |
17 Mar 15 |
olle |
if (item.comment) tooltip[tooltip.length] = 'Specimen: ' + item.comment; |
3180 |
17 Mar 15 |
olle |
if (item.rna.comment) tooltip[tooltip.length] = 'RNA: ' + item.rna.comment; |
3180 |
17 Mar 15 |
olle |
if (item.dna.comment) tooltip[tooltip.length] = 'DNA: ' + item.dna.comment; |
3180 |
17 Mar 15 |
olle |
1255 |
} |
3176 |
06 Mar 15 |
olle |
1256 |
|
3180 |
17 Mar 15 |
olle |
var modifiedReagents = false; |
3180 |
17 Mar 15 |
olle |
for (var rgNo = 0; rgNo < exprep.REAGENTS.length; rgNo++) |
3176 |
06 Mar 15 |
olle |
1259 |
{ |
3180 |
17 Mar 15 |
olle |
var rg = exprep.REAGENTS[rgNo]; |
3180 |
17 Mar 15 |
olle |
if (item[rg]) |
3180 |
17 Mar 15 |
olle |
1262 |
{ |
3180 |
17 Mar 15 |
olle |
tooltip[tooltip.length] = Doc.element(rg+'.title').innerHTML + ': ' + Strings.encodeTags(item[rg]); |
3180 |
17 Mar 15 |
olle |
modifiedReagents = true; |
3180 |
17 Mar 15 |
olle |
1265 |
} |
3176 |
06 Mar 15 |
olle |
1266 |
} |
3180 |
17 Mar 15 |
olle |
if (modifiedReagents) |
3180 |
17 Mar 15 |
olle |
1268 |
{ |
3180 |
17 Mar 15 |
olle |
comment[comment.length] = 'Reagents'; |
3180 |
17 Mar 15 |
olle |
1270 |
} |
3176 |
06 Mar 15 |
olle |
1271 |
|
3180 |
17 Mar 15 |
olle |
if (tooltip.length > 0) |
3180 |
17 Mar 15 |
olle |
1273 |
{ |
3180 |
17 Mar 15 |
olle |
cmnt.innerHTML = comment.join(', '); |
3180 |
17 Mar 15 |
olle |
Doc.addClass(cmnt, 'nondefault'); |
3180 |
17 Mar 15 |
olle |
cmnt.title = tooltip.join('\n'); |
3180 |
17 Mar 15 |
olle |
1277 |
} |
3180 |
17 Mar 15 |
olle |
else |
3180 |
17 Mar 15 |
olle |
1279 |
{ |
3180 |
17 Mar 15 |
olle |
cmnt.innerHTML = ''; |
3180 |
17 Mar 15 |
olle |
Doc.removeClass(cmnt, 'nondefault'); |
3180 |
17 Mar 15 |
olle |
cmnt.title = null; |
3180 |
17 Mar 15 |
olle |
1283 |
} |
3176 |
06 Mar 15 |
olle |
1284 |
} |
3245 |
14 Apr 15 |
olle |
else |
3245 |
14 Apr 15 |
olle |
1286 |
{ |
3245 |
14 Apr 15 |
olle |
// Extra QIAcube item |
3245 |
14 Apr 15 |
olle |
var itemNameEl = Doc.element('itemName'+i); |
3245 |
14 Apr 15 |
olle |
if (itemNameEl != null) |
3245 |
14 Apr 15 |
olle |
1290 |
{ |
3245 |
14 Apr 15 |
olle |
itemNameEl.value = Strings.encodeTags(item.name); |
3245 |
14 Apr 15 |
olle |
1292 |
} |
3245 |
14 Apr 15 |
olle |
1293 |
} |
3176 |
06 Mar 15 |
olle |
1294 |
} |
3176 |
06 Mar 15 |
olle |
1295 |
|
3176 |
06 Mar 15 |
olle |
if (duplicatePosition) |
3176 |
06 Mar 15 |
olle |
1297 |
{ |
3354 |
27 May 15 |
olle |
var duplicatePositionStr = ExtractUtils.getDetailedQiacubePosition(duplicatePosition, qiacubeSortedPrefixes); |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('downloadSampleIdFile', 'invalid', 'Duplicate QIAcube position: ' + duplicatePositionStr); |
3176 |
06 Mar 15 |
olle |
qiacubePositionsAreValid = false; |
3176 |
06 Mar 15 |
olle |
1301 |
} |
3176 |
06 Mar 15 |
olle |
else |
3176 |
06 Mar 15 |
olle |
1303 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.setInputStatus('downloadSampleIdFile'); |
3176 |
06 Mar 15 |
olle |
qiacubePositionsAreValid = true; |
3176 |
06 Mar 15 |
olle |
1306 |
} |
3176 |
06 Mar 15 |
olle |
1307 |
} |
3176 |
06 Mar 15 |
olle |
1308 |
|
3176 |
06 Mar 15 |
olle |
exprep.downloadSampleIdFile = function() |
3176 |
06 Mar 15 |
olle |
1310 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
1312 |
|
3176 |
06 Mar 15 |
olle |
if (!qiacubePositionsAreValid) |
3176 |
06 Mar 15 |
olle |
1314 |
{ |
3176 |
06 Mar 15 |
olle |
Forms.showNotification('downloadSampleIdFile', 'QIAcube positions are not valid. Please fix before downloading the file.'); |
3176 |
06 Mar 15 |
olle |
return; |
3176 |
06 Mar 15 |
olle |
1317 |
} |
3176 |
06 Mar 15 |
olle |
1318 |
|
3176 |
06 Mar 15 |
olle |
var itemNames = []; |
3176 |
06 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3176 |
06 Mar 15 |
olle |
url += '&cmd=DownloadNanoDropSampleIdFile'; |
3432 |
29 Jun 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3176 |
06 Mar 15 |
olle |
url += '&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3176 |
06 Mar 15 |
olle |
url += '&qiacubeRunNo='+encodeURIComponent(frm.qiacubeRunNo.value); |
3255 |
17 Apr 15 |
olle |
url += '&blankControlColumn='+encodeURIComponent(frm.blankControlColumn.checked); |
3176 |
06 Mar 15 |
olle |
1326 |
|
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var itemNo = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < numItems; i++) |
3176 |
06 Mar 15 |
olle |
1332 |
{ |
3176 |
06 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isRna(item)) |
3176 |
06 Mar 15 |
olle |
1335 |
{ |
3176 |
06 Mar 15 |
olle |
itemNames[itemNo] = item.name; |
3176 |
06 Mar 15 |
olle |
itemNo++; |
3176 |
06 Mar 15 |
olle |
1338 |
} |
3176 |
06 Mar 15 |
olle |
1339 |
} |
3176 |
06 Mar 15 |
olle |
url += '&itemNames=' + encodeURIComponent(itemNames.join(',')); |
3176 |
06 Mar 15 |
olle |
window.open(url); |
3176 |
06 Mar 15 |
olle |
1342 |
} |
3176 |
06 Mar 15 |
olle |
1343 |
|
3176 |
06 Mar 15 |
olle |
exprep.downloadQPcrSampleIdFile = function() |
3176 |
06 Mar 15 |
olle |
1345 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var itemNames = []; |
3176 |
06 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3176 |
06 Mar 15 |
olle |
url += '&cmd=DownloadQPcrSampleIdFile'; |
3432 |
29 Jun 15 |
olle |
url += '&startListName='+encodeURIComponent(frm.startListName.value); |
3176 |
06 Mar 15 |
olle |
url += '&qiacubeDate='+encodeURIComponent(frm.qiacubeDate.value); |
3176 |
06 Mar 15 |
olle |
url += '&qiacubeRunNo='+encodeURIComponent(frm.qiacubeRunNo.value); |
3176 |
06 Mar 15 |
olle |
1353 |
|
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3176 |
06 Mar 15 |
olle |
var itemNo = 0; |
3176 |
06 Mar 15 |
olle |
for (var i = 0; i < numItems; i++) |
3176 |
06 Mar 15 |
olle |
1359 |
{ |
3176 |
06 Mar 15 |
olle |
var item = selItemsList[i]; |
3352 |
26 May 15 |
olle |
if (ExtractUtils.isSpecimen(item) || ExtractUtils.isDna(item)) |
3176 |
06 Mar 15 |
olle |
1362 |
{ |
3176 |
06 Mar 15 |
olle |
itemNames[itemNo] = item.name; |
3176 |
06 Mar 15 |
olle |
itemNo++; |
3176 |
06 Mar 15 |
olle |
1365 |
} |
3176 |
06 Mar 15 |
olle |
1366 |
} |
3176 |
06 Mar 15 |
olle |
url += '&itemNames=' + encodeURIComponent(itemNames.join(',')); |
3176 |
06 Mar 15 |
olle |
window.open(url); |
3176 |
06 Mar 15 |
olle |
1369 |
} |
3176 |
06 Mar 15 |
olle |
1370 |
|
3176 |
06 Mar 15 |
olle |
exprep.validateStep3 = function(event) |
3176 |
06 Mar 15 |
olle |
1372 |
{ |
3176 |
06 Mar 15 |
olle |
var valid = true; |
3176 |
06 Mar 15 |
olle |
valid &= qiacubePositionsAreValid; |
3176 |
06 Mar 15 |
olle |
1375 |
|
3176 |
06 Mar 15 |
olle |
if (!valid) event.preventDefault(); |
3176 |
06 Mar 15 |
olle |
1377 |
} |
3176 |
06 Mar 15 |
olle |
1378 |
|
3180 |
17 Mar 15 |
olle |
exprep.submit = function() |
3180 |
17 Mar 15 |
olle |
1380 |
{ |
3180 |
17 Mar 15 |
olle |
//alert("exprep.submit(): Start"); |
3180 |
17 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3180 |
17 Mar 15 |
olle |
1383 |
|
3180 |
17 Mar 15 |
olle |
var submitInfo = {}; |
3180 |
17 Mar 15 |
olle |
submitInfo.items = []; |
3245 |
14 Apr 15 |
olle |
submitInfo.extraItems = []; |
3180 |
17 Mar 15 |
olle |
1387 |
|
3180 |
17 Mar 15 |
olle |
// Get list of selected extract source items |
3180 |
17 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3180 |
17 Mar 15 |
olle |
var numItems = selItemsList.length; |
3413 |
23 Jun 15 |
olle |
var totNumItems = numItems; |
3245 |
14 Apr 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3180 |
17 Mar 15 |
olle |
1393 |
{ |
3245 |
14 Apr 15 |
olle |
var item = null; |
3245 |
14 Apr 15 |
olle |
if (i < numItems) |
3245 |
14 Apr 15 |
olle |
1396 |
{ |
3245 |
14 Apr 15 |
olle |
item = selItemsList[i]; |
3245 |
14 Apr 15 |
olle |
submitInfo.items[submitInfo.items.length] = item; |
3245 |
14 Apr 15 |
olle |
1399 |
} |
3180 |
17 Mar 15 |
olle |
1400 |
} |
3180 |
17 Mar 15 |
olle |
1401 |
|
3180 |
17 Mar 15 |
olle |
// Extraction |
3432 |
29 Jun 15 |
olle |
submitInfo.startListName = frm.startListName.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.isolationDate = frm.isolationDate.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.extractionOperator = frm.extractionOperator.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.extractionProtocol = parseInt(frm.extractionProtocol.value, 10); |
3180 |
17 Mar 15 |
olle |
var extractionProtocolName = ''; |
3180 |
17 Mar 15 |
olle |
var extractionProtocol = frm.extractionProtocol.value; |
3180 |
17 Mar 15 |
olle |
if (extractionProtocol) |
3180 |
17 Mar 15 |
olle |
1410 |
{ |
3180 |
17 Mar 15 |
olle |
extractionProtocolName = protocolMap[extractionProtocol]; |
3180 |
17 Mar 15 |
olle |
1412 |
} |
3180 |
17 Mar 15 |
olle |
submitInfo.extractionProtocolName = extractionProtocolName; |
3176 |
06 Mar 15 |
olle |
1414 |
/* |
3352 |
26 May 15 |
olle |
submitInfo.rnaDefaultVolume = ExtractUtils.getNumber(frm.rnaDefaultVolume.value); |
3352 |
26 May 15 |
olle |
submitInfo.dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3180 |
17 Mar 15 |
olle |
1417 |
*/ |
3180 |
17 Mar 15 |
olle |
1418 |
|
3180 |
17 Mar 15 |
olle |
// QIAcube |
3180 |
17 Mar 15 |
olle |
submitInfo.qiacubeDate = frm.qiacubeDate.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.qiacubePrimaryPrefix = frm.qiacubePrimaryPrefix.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.qiacubeSecondaryPrefix = frm.qiacubeSecondaryPrefix.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.qiacubeRunNo = parseInt(frm.qiacubeRunNo.value, 10); |
3180 |
17 Mar 15 |
olle |
submitInfo.qiacubeOperator = frm.qiacubeOperator.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.allPrepFfpeKit = frm.allPrepFfpeKit.value; |
3180 |
17 Mar 15 |
olle |
1426 |
|
3180 |
17 Mar 15 |
olle |
// Reagents |
3180 |
17 Mar 15 |
olle |
for (var i = 0; i < exprep.REAGENTS.length; i++) |
3180 |
17 Mar 15 |
olle |
1429 |
{ |
3180 |
17 Mar 15 |
olle |
var rg = exprep.REAGENTS[i]; |
3180 |
17 Mar 15 |
olle |
submitInfo[rg] = frm[rg].value; |
3180 |
17 Mar 15 |
olle |
1432 |
} |
3180 |
17 Mar 15 |
olle |
var url = '../Extraction.servlet?ID='+App.getSessionId(); |
3432 |
29 Jun 15 |
olle |
url += '&cmd=RegisterStartItemList'; |
3180 |
17 Mar 15 |
olle |
//alert("exprep.submit(): url = " + url); |
3180 |
17 Mar 15 |
olle |
Wizard.showLoadingAnimation('Performing registration...'); |
3180 |
17 Mar 15 |
olle |
Wizard.asyncJsonRequest(url, exprep.submissionResults, 'POST', JSON.stringify(submitInfo)); |
3180 |
17 Mar 15 |
olle |
1438 |
} |
3180 |
17 Mar 15 |
olle |
1439 |
|
3176 |
06 Mar 15 |
olle |
exprep.submissionResults = function(response) |
3176 |
06 Mar 15 |
olle |
1441 |
{ |
3176 |
06 Mar 15 |
olle |
Wizard.showFinalMessage(response.messages); |
3176 |
06 Mar 15 |
olle |
Doc.show('gorestart'); |
3199 |
19 Mar 15 |
olle |
Doc.show('gocreate'); |
3336 |
13 May 15 |
olle |
trackingProtocolPreview = false; |
3432 |
29 Jun 15 |
olle |
if (response.createdStartList && response.createdStartList.length > 0) |
3176 |
06 Mar 15 |
olle |
1447 |
{ |
3432 |
29 Jun 15 |
olle |
createdStartList = response.createdStartList; |
3176 |
06 Mar 15 |
olle |
1449 |
} |
5858 |
10 Mar 20 |
olle |
Doc.show('downloaddnarnalabelfile'); |
3176 |
06 Mar 15 |
olle |
1451 |
} |
3176 |
06 Mar 15 |
olle |
1452 |
|
3176 |
06 Mar 15 |
olle |
exprep.createProtocol = function() |
3176 |
06 Mar 15 |
olle |
1454 |
{ |
3176 |
06 Mar 15 |
olle |
var frm = document.forms['meludi']; |
3176 |
06 Mar 15 |
olle |
var submitInfo = {}; |
3176 |
06 Mar 15 |
olle |
submitInfo.items = []; |
3176 |
06 Mar 15 |
olle |
1458 |
|
3336 |
13 May 15 |
olle |
submitInfo.docMode = 'protocol'; |
3176 |
06 Mar 15 |
olle |
// Get list of selected extract source items |
3176 |
06 Mar 15 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
3176 |
06 Mar 15 |
olle |
var numItems = selItemsList.length; |
3413 |
23 Jun 15 |
olle |
var totNumItems = numItems; |
3180 |
17 Mar 15 |
olle |
for (var i = 0; i < totNumItems; i++) |
3176 |
06 Mar 15 |
olle |
1465 |
{ |
3180 |
17 Mar 15 |
olle |
var item = null; |
3180 |
17 Mar 15 |
olle |
if (i < numItems) |
3180 |
17 Mar 15 |
olle |
1468 |
{ |
3180 |
17 Mar 15 |
olle |
item = selItemsList[i]; |
3180 |
17 Mar 15 |
olle |
1470 |
} |
3176 |
06 Mar 15 |
olle |
submitInfo.items[submitInfo.items.length] = item; |
3176 |
06 Mar 15 |
olle |
1472 |
} |
3176 |
06 Mar 15 |
olle |
1473 |
|
3176 |
06 Mar 15 |
olle |
// Extraction |
3432 |
29 Jun 15 |
olle |
submitInfo.startListName = frm.startListName.value; |
3180 |
17 Mar 15 |
olle |
submitInfo.isolationDate = frm.isolationDate.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.extractionOperator = frm.extractionOperator.value; |
3176 |
06 Mar 15 |
olle |
1478 |
/* |
3176 |
06 Mar 15 |
olle |
submitInfo.extractionProtocol = parseInt(frm.extractionProtocol.value, 10); |
3176 |
06 Mar 15 |
olle |
1480 |
*/ |
3176 |
06 Mar 15 |
olle |
var extractionProtocolName = ''; |
3176 |
06 Mar 15 |
olle |
var extractionProtocol = frm.extractionProtocol.value; |
3176 |
06 Mar 15 |
olle |
if (extractionProtocol) |
3176 |
06 Mar 15 |
olle |
1484 |
{ |
3176 |
06 Mar 15 |
olle |
extractionProtocolName = protocolMap[extractionProtocol]; |
3176 |
06 Mar 15 |
olle |
1486 |
} |
3176 |
06 Mar 15 |
olle |
var protocolVersionNo = ''; |
3176 |
06 Mar 15 |
olle |
if (extractionProtocolName) |
3176 |
06 Mar 15 |
olle |
1489 |
{ |
3202 |
19 Mar 15 |
olle |
protocolVersionNo = extractionProtocolName; |
3202 |
19 Mar 15 |
olle |
// Remove part of string up to and including last "v" |
3202 |
19 Mar 15 |
olle |
var vIndex = protocolVersionNo.indexOf('v'); |
3202 |
19 Mar 15 |
olle |
while (vIndex >= 0) |
3176 |
06 Mar 15 |
olle |
1494 |
{ |
3202 |
19 Mar 15 |
olle |
// Remove part of string up to and including first "v" |
3202 |
19 Mar 15 |
olle |
protocolVersionNo = protocolVersionNo.substring(vIndex + 1); |
3202 |
19 Mar 15 |
olle |
vIndex = protocolVersionNo.indexOf('v'); |
3176 |
06 Mar 15 |
olle |
1498 |
} |
3176 |
06 Mar 15 |
olle |
1499 |
} |
3199 |
19 Mar 15 |
olle |
var protocolPreviewFlag = null; |
3336 |
13 May 15 |
olle |
if (trackingProtocolPreview) |
3199 |
19 Mar 15 |
olle |
1502 |
{ |
3199 |
19 Mar 15 |
olle |
protocolPreviewFlag = 'true'; |
3199 |
19 Mar 15 |
olle |
1504 |
} |
3176 |
06 Mar 15 |
olle |
submitInfo.extractionProtocolName = extractionProtocolName; |
3176 |
06 Mar 15 |
olle |
submitInfo.protocolVersionNo = protocolVersionNo; |
3199 |
19 Mar 15 |
olle |
submitInfo.protocolPreviewFlag = protocolPreviewFlag; |
3180 |
17 Mar 15 |
olle |
1508 |
/* |
3352 |
26 May 15 |
olle |
submitInfo.dnaDefaultVolume = ExtractUtils.getNumber(frm.dnaDefaultVolume.value); |
3180 |
17 Mar 15 |
olle |
1510 |
*/ |
3180 |
17 Mar 15 |
olle |
submitInfo.dnaDefaultVolume = null; |
3176 |
06 Mar 15 |
olle |
1512 |
|
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; |
3501 |
21 Sep 15 |
olle |
submitInfo.proteinaseKSpecimen = frm.proteinaseKSpecimen.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.rnaseASpecimen = frm.rnaseASpecimen.value; |
3501 |
21 Sep 15 |
olle |
1521 |
|
3176 |
06 Mar 15 |
olle |
// QIAcube |
3176 |
06 Mar 15 |
olle |
submitInfo.qiacubeDate = frm.qiacubeDate.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qiacubeOperator = frm.qiacubeOperator.value; |
3176 |
06 Mar 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; |
3176 |
06 Mar 15 |
olle |
1539 |
|
3501 |
21 Sep 15 |
olle |
// Quality control reagents |
3501 |
21 Sep 15 |
olle |
submitInfo.kapaSybrFast = frm.kapaSybrFast.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qualityControlPrimersQcpRgt = frm.qualityControlPrimersQcpRgt.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qualityControlTemplateQct = frm.qualityControlTemplateQct.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qubitDnaHighSens = frm.qubitDnaHighSens.value; |
3501 |
21 Sep 15 |
olle |
submitInfo.qubitDnaBroadRange = frm.qubitDnaBroadRange.value; |
3501 |
21 Sep 15 |
olle |
1546 |
|
3176 |
06 Mar 15 |
olle |
// Save values in hidden input fields for retrieval after HTML request |
3176 |
06 Mar 15 |
olle |
var submitInfoJsonStr = JSON.stringify(submitInfo); |
3176 |
06 Mar 15 |
olle |
frm.hiddenSubmitInfo.value = submitInfoJsonStr; |
3176 |
06 Mar 15 |
olle |
frm.hiddenNumItems.value = submitInfo.items.length; |
3176 |
06 Mar 15 |
olle |
frm.hiddenCounterBalanceInfoRow.value = counterBalanceInfoRow; |
3176 |
06 Mar 15 |
olle |
1552 |
|
3176 |
06 Mar 15 |
olle |
// Calling frm.submit() will change jsp file to extraction_protocol2.jsp |
3176 |
06 Mar 15 |
olle |
frm.submit(); |
3176 |
06 Mar 15 |
olle |
1555 |
} |
3176 |
06 Mar 15 |
olle |
1556 |
|
5858 |
10 Mar 20 |
olle |
exprep.downloadDnaRnaLabelFile = function() |
5858 |
10 Mar 20 |
olle |
1558 |
{ |
5858 |
10 Mar 20 |
olle |
var frm = document.forms['meludi']; |
5858 |
10 Mar 20 |
olle |
// Get list of selected extract source items |
5858 |
10 Mar 20 |
olle |
var selItemsList = exprep.getSelectedItemsList(); |
5858 |
10 Mar 20 |
olle |
//alert("extraction_preparation.js::downloadDnaRnaLabelFile: selItemsList = " + JSON.stringify(selItemsList)); |
5858 |
10 Mar 20 |
olle |
var numItems = selItemsList.length; |
5858 |
10 Mar 20 |
olle |
//alert("extraction_preparation.js::downloadDnaRnaLabelFile: numItems = " + numItems); |
5858 |
10 Mar 20 |
olle |
1565 |
/* |
5858 |
10 Mar 20 |
olle |
var totNumItems = numItems; |
5858 |
10 Mar 20 |
olle |
for (var i = 0; i < totNumItems; i++) |
5858 |
10 Mar 20 |
olle |
1568 |
{ |
5858 |
10 Mar 20 |
olle |
var item = null; |
5858 |
10 Mar 20 |
olle |
if (i < numItems) |
5858 |
10 Mar 20 |
olle |
1571 |
{ |
5858 |
10 Mar 20 |
olle |
item = selItemsList[i]; |
5858 |
10 Mar 20 |
olle |
1573 |
} |
5858 |
10 Mar 20 |
olle |
submitInfo.items[submitInfo.items.length] = item; |
5858 |
10 Mar 20 |
olle |
1575 |
} |
5858 |
10 Mar 20 |
olle |
1576 |
*/ |
5858 |
10 Mar 20 |
olle |
var preview = false; |
5858 |
10 Mar 20 |
olle |
1578 |
|
5858 |
10 Mar 20 |
olle |
var url = '../LabelGeneration.servlet?ID=' + App.getSessionId(); |
5858 |
10 Mar 20 |
olle |
url += '&cmd=GetDnaRnaLabelFile'; |
5858 |
10 Mar 20 |
olle |
url += '&selitemslist='+encodeURIComponent(JSON.stringify(selItemsList)); |
5858 |
10 Mar 20 |
olle |
url += '&preview=' + preview; |
5858 |
10 Mar 20 |
olle |
//alert("extraction_preparation.js::downloadDnaRnaLabelFile: (0) url = " + url); |
5858 |
10 Mar 20 |
olle |
1584 |
|
5858 |
10 Mar 20 |
olle |
1585 |
/* |
5858 |
10 Mar 20 |
olle |
if (preview) |
5858 |
10 Mar 20 |
olle |
1587 |
{ |
5858 |
10 Mar 20 |
olle |
Doc.hide('previewWrapper'); |
5858 |
10 Mar 20 |
olle |
url += '&preview=1'; |
5858 |
10 Mar 20 |
olle |
1590 |
|
5858 |
10 Mar 20 |
olle |
Wizard.showLoadingAnimation('Working...'); |
5858 |
10 Mar 20 |
olle |
Doc.hide('navigation'); |
5858 |
10 Mar 20 |
olle |
Wizard.asyncJsonRequest(url, istat.onPreviewLoaded); |
5858 |
10 Mar 20 |
olle |
1594 |
} |
5858 |
10 Mar 20 |
olle |
else |
5858 |
10 Mar 20 |
olle |
1596 |
{ |
5858 |
10 Mar 20 |
olle |
//window.location = url; |
5858 |
10 Mar 20 |
olle |
window.open(url); |
5858 |
10 Mar 20 |
olle |
1599 |
} |
5858 |
10 Mar 20 |
olle |
1600 |
*/ |
5858 |
10 Mar 20 |
olle |
window.open(url); |
5858 |
10 Mar 20 |
olle |
1602 |
} |
5858 |
10 Mar 20 |
olle |
1603 |
|
3176 |
06 Mar 15 |
olle |
return exprep; |
3176 |
06 Mar 15 |
olle |
1605 |
}(); |
3176 |
06 Mar 15 |
olle |
1606 |
|
3176 |
06 Mar 15 |
olle |
Doc.onLoad(ExtractionPrep.initPage); |
3176 |
06 Mar 15 |
olle |
1608 |
|