source: extensions/net.sf.basedb.reggie/trunk/resources/persinfo.jsp @ 1317

Last change on this file since 1317 was 1317, checked in by Nicklas Nordborg, 12 years ago

Fixes #299: Add field for PAD when no specimen tubes exists for a case

File size: 21.8 KB
Line 
1<%@ page
2  pageEncoding="UTF-8"
3  session="false"
4  import="net.sf.basedb.core.Application"
5  import="net.sf.basedb.core.User"
6  import="net.sf.basedb.core.DbControl"
7  import="net.sf.basedb.core.SessionControl"
8  import="net.sf.basedb.clients.web.Base"
9  import="net.sf.basedb.clients.web.util.HTML"
10  import="net.sf.basedb.util.Values"
11%>
12<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
13<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %>
14<%
15final SessionControl sc = Base.getExistingSessionControl(request, true);
16final String ID = sc.getId();
17final float scale = Base.getScale(sc);
18DbControl dc = null;
19try
20{
21  dc = sc.newDbControl();
22  final User user = User.getById(dc, sc.getLoggedInUserId());
23%>
24<base:page type="default" >
25<base:head scripts="ajax.js" styles="path.css">
26<script language="JavaScript">
27
28var currentStep = 1;
29var pnrIsValid = false;
30var caseIsValid = false;
31var lateralityIsValid = false;
32
33var patientInfo = null;
34var caseInfo = null;
35
36function init()
37{
38  var frm = document.forms['reggie'];
39  frm.caseName.focus();
40}
41
42function step1IsValid()
43{
44  return pnrIsValid && caseIsValid;
45}
46
47function step2IsValid()
48{
49  var formOk = true;
50  var frm = document.forms['reggie'];
51
52  // New patient only
53  if (!patientInfo.id)
54  {
55    // Validate 'New patient' form
56    if (frm.allFirstNames.value == '')
57    {
58      setInputStatus('allFirstNames', 'Missing', 'invalid');
59      frm.allFirstNames.focus();
60      formOk = false;
61    }
62    else
63    {
64      setInputStatus('allFirstNames', '', 'valid');
65    }
66   
67    if (frm.familyName.value == '')
68    {
69      setInputStatus('familyName', 'Missing', 'invalid');
70      frm.familyName.focus();
71      formOk = false;
72    }
73    else
74    {
75      setInputStatus('familyName', '', 'valid');
76    }
77
78    if (frm.patientCode.value == '')
79    {
80      setInputStatus('patientCode', 'Missing', 'invalid');
81      frm.patientCode.focus();
82      formOk = false;
83    }
84    else
85    {
86      setInputStatus('patientCode', '', 'valid');
87    }
88  }
89  return formOk;
90}
91
92function step3IsValid()
93{
94  return lateralityIsValid;
95}
96
97function goNext()
98{
99  if (currentStep == 1)
100  {
101    if (step1IsValid()) gotoStep2();
102  }
103  else if (currentStep == 2)
104  {
105    if (step2IsValid()) gotoStep3();
106  }
107}
108
109function caseNameOnChange()
110{
111  var frm = document.forms['reggie'];
112  var caseName = frm.caseName.value;
113  if (caseName == '')
114  {
115    setInputStatus('case', 'Missing', 'invalid');
116    return;
117  }
118  setInputStatus('case', '', 'valid');
119  caseIsValid = true;
120}
121
122function personalNumberOnChange()
123{
124  var frm = document.forms['reggie'];
125  var pnr = frm.personalNumber.value;
126  pnrIsValid = false;
127 
128  if (pnr.length < 12)
129  {
130    setInputStatus('pnr', 'Too short', 'invalid');
131    return;
132  }
133 
134  if (!Dates.isDate(pnr.substring(0, 8), 'yyyyMMdd'))
135  {
136    setInputStatus('pnr', 'Not a valid date', 'invalid');
137    return;
138  }
139 
140  var sum = 0;
141  var factor = 2;
142  var x = '';
143  for (var i = 2; i < 11; i++)
144  {
145    var digit = parseInt(pnr.substr(i, 1));
146    var tmp = factor * digit;
147    x += '(' + factor + '*' + digit+')';
148    sum += tmp >= 10 ? tmp - 9: tmp;
149    factor = factor == 2 ? 1 : 2;
150  }
151 
152  var control = 10 - (sum % 10);
153  if (control == 10) control = 0;
154  if (control != parseInt(pnr.substr(11, 1)))
155  {
156    setInputStatus('pnr', 'Invalid control digit', 'invalid');
157    return;
158  }
159 
160  setInputStatus('pnr', '', 'valid');
161  pnrIsValid = true;
162}
163
164function lateralityOnChange()
165{
166  lateralityIsValid = false;
167 
168  // Check selected laterality against specimen tubes
169  var frm = document.forms['reggie'];
170  var selectedLaterality = Forms.getCheckedRadio(frm.laterality);
171 
172  // No laterality/case selected
173  if (selectedLaterality == null)
174  {
175    setInputStatus('laterality', 'Not selected', 'invalid');
176    return;
177  }
178  setInputStatus('laterality', '', 'valid');
179  lateralityIsValid = true;
180 
181  var laterality = selectedLaterality.value;
182  if (laterality.match(/\d+/))
183  {
184    // It is the ID of an existing case
185    for (var i = 0; i < patientInfo.cases.length; i++)
186    {
187      var cse = patientInfo.cases[i];
188      if (cse.id == laterality)
189      {
190        laterality = cse.laterality;
191        break;
192      }
193    }
194  }
195  else  if (laterality == '') 
196  {
197    laterality = null;
198  }
199   
200  // No specimen tubes?
201  if (!caseInfo.specimen || caseInfo.specimen.length == 0) return;
202 
203  for (var i = 0; i < caseInfo.specimen.length; i++)
204  {
205    var specimen = caseInfo.specimen[i];
206    if (specimen.laterality != laterality)
207    {
208      if (specimen.laterality == null)
209      {
210        setInputStatus('laterality', 'Specimen tubes are updated to: ' + laterality, 'valid')
211      }
212      else
213      {
214        setInputStatus('laterality', 'Not same laterality as specimen tubes', 'warning');
215      }
216      return;
217    }
218  }
219}
220
221function goNextOnTab(event)
222{
223  if (event.keyCode == 9) setTimeout('goNext()', 200);
224  return true;
225}
226
227function goNextOnTabOrEnter(event)
228{
229  if (event.keyCode == 9 || event.keyCode == 13) setTimeout('goNext()', 200);
230  return true;
231}
232
233function focusOnEnter(event, inputField)
234{
235  if (event.keyCode == 13) setTimeout("document.forms['reggie']."+inputField+".focus()", 200);
236  return true;
237}
238
239function gotoStep2()
240{
241  // Check entered case and pnr with AJAX
242  var frm = document.forms['reggie'];
243  frm.caseName.disabled = true;
244  frm.personalNumber.disabled = true;
245  currentStep = 2;
246 
247  var pnr = frm.personalNumber.value;
248  var caseName = frm.caseName.value;
249  var request = Ajax.getXmlHttpRequest();
250  var url = 'PersonalRegistration.servlet?ID=<%=ID%>&cmd=CheckPersonalNumberAndCaseName';
251  url += '&personalNumber=' + pnr;
252  url += '&caseName=' + caseName;
253  request.open("GET", url, false);
254  request.send(null);
255 
256  //setInnerHTML('debug', request.responseText);
257 
258  var response = JSON.parse(request.responseText);
259  if (response.status != 'ok')
260  {
261    setFatalError(response.message);
262    return false;
263  }
264 
265  Main.show('gocancel');
266 
267  // Get biosource information from the AJAX response
268  patientInfo = response.patientInfo;
269  caseInfo = response.caseInfo;
270 
271  if (!patientInfo.id)
272  {
273    Main.show('newPatientSection');
274    frm.patientCode.value=patientInfo.name;
275    setInnerHTML('new.dateOfBirth', patientInfo.dateOfBirth);
276    setInnerHTML('new.gender', patientInfo.gender);
277    frm.familyName.focus();
278  }
279  else
280  {
281    Main.show('existingPatientSection');
282    setInnerHTML('existing.patientCode', patientInfo.name);
283    setInnerHTML('existing.familyName', patientInfo.familyName);
284    setInnerHTML('existing.allFirstNames', patientInfo.allFirstNames);
285    setInnerHTML('existing.dateOfBirth', patientInfo.dateOfBirth);
286    setInnerHTML('existing.gender', patientInfo.gender);
287    gotoStep3();
288  }
289}
290
291function gotoStep3()
292{
293  // Check entered case and pnr with AJAX
294  var frm = document.forms['reggie'];
295 
296  if (!patientInfo.id)
297  {
298    frm.patientCode.disabled = true;
299    frm.familyName.disabled = true;
300    frm.allFirstNames.disabled = true;
301    patientInfo.familyName = frm.familyName.value;
302    patientInfo.allFirstNames = frm.allFirstNames.value;
303  }
304  currentStep = 3;
305 
306  // Generate list of specimen tubes
307  var hasLeftSpecimen = false;
308  var hasRightSpecimen = false;
309  var hasUnknownSpecimen = false;
310  var thisCaseLaterality = null;
311  var hasPAD = false;
312  if (caseInfo.specimen && caseInfo.specimen.length > 0)
313  {
314    var specimenTubes = '';
315    Main.hide('reasonIfNoSpecimenSection');
316    for (var i = 0; i < caseInfo.specimen.length; i++)
317    {
318      var specimen = caseInfo.specimen[i];
319      specimenTubes += specimen.name;
320      if (specimen.pad) hasPAD = true;
321      if (specimen.laterality) 
322      {
323        specimenTubes += ' ('+specimen.laterality + ')';
324        Forms.checkRadio(frm.laterality, specimen.laterality);
325        if (specimen.laterality == 'LEFT') hasLeftSpecimen = true;
326        if (specimen.laterality == 'RIGHT') hasRightSpecimen = true;
327        thisCaseLaterality = specimen.laterality;
328      }
329      else
330      {
331        hasUnknownSpecimen = true;
332        specimenTubes += ' (<i>unknown laterality</i>)';
333      }
334      specimenTubes += '<br>';
335    }
336    setInnerHTML('specimenTubes', specimenTubes);
337   
338    // Check that all specimen tubes have the same laterality
339    var numLateralities = 0;
340    if (hasLeftSpecimen) numLateralities++;
341    if (hasRightSpecimen) numLateralities++;
342    if (hasUnknownSpecimen) numLateralities++;
343    if (numLateralities > 1)
344    {
345      setInputStatus('specimenTubes', 'Specimen tubes with different laterality', 'warning');
346      thisCaseLaterality = null;
347    }
348  }
349
350  Main.showHide('padSection', !hasPAD);
351 
352  Main.show('caseSection');
353 
354  // Existing cases for this patient
355  var hasLeftCase = false;
356  var hasRightCase = false;
357  var hasUnknownCase = false;
358  if (patientInfo.cases && patientInfo.cases.length > 0)
359  {
360    var cases = '';
361    for (var i = 0; i < patientInfo.cases.length; i++)
362    {
363      var cc = patientInfo.cases[i];
364      cases += '<input type="radio" name="laterality" value="' + cc.id + '"';
365      if (cc.laterality == 'LEFT') 
366      {
367        if (hasLeftCase) setInputStatus('laterality', 'Two cases with laterality=LEFT', 'warning');
368        hasLeftCase = true;
369      }
370      else if (cc.laterality == 'RIGHT') 
371      {
372        if (hasRightCase) setInputStatus('laterality', 'Two cases with laterality=RIGHT', 'warning');
373        hasRightCase = true;
374      }
375      else
376      {
377        hasUnknownCase = true; 
378      }
379      if (cc.laterality == thisCaseLaterality) cases += ' checked';
380      cases += ' onclick="lateralityOnChange()">' + cc.name;
381      if (cc.laterality)
382      {
383        cases += ' (' + cc.laterality + ')<br>';
384      }
385      else
386      {
387        cases += ' (<i>unknown laterality</i>)<br>';
388      }
389    }
390   
391    if (patientInfo.cases.length == 1)
392    {
393      if (!hasLeftCase)
394      {
395        cases += '<input type="radio" name="laterality" value="LEFT" ';
396        if (thisCaseLaterality == 'LEFT') cases += ' checked';
397        cases += ' onclick="lateralityOnChange()"><i>new case</i> (LEFT)<br>';
398      }
399      if (!hasRightCase)
400      {
401        cases += '<input type="radio" name="laterality" value="RIGHT"';
402        if (thisCaseLaterality == 'RIGHT') cases += ' checked';
403        cases += ' onclick="lateralityOnChange()"><i>new case</i> (RIGHT)<br>';
404      }
405      cases += '<input type="radio" name="laterality" value=""';
406      if (thisCaseLaterality == null) cases += ' checked';
407      cases += ' onclick="lateralityOnChange()"><i>new case</i> (<i>unknown laterality</i>)<br>';
408    }
409   
410    if (patientInfo.cases.length == 2)
411    {
412      setInnerHTML('laterality.prompt', 'Merge with case');
413    }
414    else
415    {
416      setInnerHTML('laterality.prompt', 'Merge/create new case');
417    }
418   
419    setInnerHTML('laterality.input', cases);
420  }
421  lateralityOnChange();
422
423  Main.hide('gonext');
424  Main.show('gocreate');
425}
426
427function goCreate()
428{
429  if (!step3IsValid()) return;
430 
431  Main.hide('gocreate');
432  Main.hide('gocancel');
433  var frm = document.forms['reggie'];
434
435  caseInfo.laterality = Forms.getCheckedRadio(frm.laterality).value;
436  caseInfo.reasonIfNoSpecimen = frm.reasonIfNoSpecimen.value;
437  caseInfo.pad = frm.pad.value;
438
439  for (var i = 0; i < frm.laterality.length; i++)
440  {
441    frm.laterality[i].disabled = true;
442  }
443  frm.reasonIfNoSpecimen.disabled = true;
444  frm.pad.disabled = true;
445
446  var submitInfo = new Object();
447  submitInfo.patientInfo = patientInfo;
448  submitInfo.caseInfo = caseInfo;
449
450  //setInnerHTML('debug', JSON.stringify(submitInfo));
451 
452  var request = Ajax.getXmlHttpRequest();
453  var url = 'PersonalRegistration.servlet?ID=<%=ID%>&cmd=Create';
454  request.open("POST", url, false);
455  request.setRequestHeader("Content-Type", "application/json");
456  request.send(JSON.stringify(submitInfo));
457
458  //setInnerHTML('debug', request.responseText);
459 
460  var response = JSON.parse(request.responseText);
461  if (response.status != 'ok')
462  {
463    setFatalError(response.message);
464    return false;
465  }
466 
467  var msg = '<ul>';
468  for (var i = 0; i < response.messages.length; i++)
469  {
470    msg += '<li>' + response.messages[i];
471  }
472  msg += '</ul>';
473  setInnerHTML('done', msg);
474  Main.show('done');
475  Main.show('gorestart');
476
477}
478
479
480function setInnerHTML(id, html)
481{
482  var tag = document.getElementById(id);
483  if (!tag) alert('No tag with id='+id);
484  tag.innerHTML = html;
485}
486
487function setInputStatus(prefix, message, clazz)
488{
489  var tag = document.getElementById(prefix + '.status');
490  tag.className = 'status ' + clazz;
491 
492  setInnerHTML(prefix + '.message', message);
493  if (message)
494  {
495    Main.showInline(prefix + '.message');
496  }
497  else
498  {
499    Main.hide(prefix + '.message');
500  }
501}
502
503function setFatalError(message)
504{
505  setInnerHTML('errorMessage', message);
506  Main.show('errorMessage');
507  Main.hide('gonext');
508  Main.hide('gocancel');
509  Main.show('gorestart');
510}
511
512function goRestart(force)
513{
514  if (!force && !confirm('Cancel this registration?')) return;
515  location.href = location.href;
516}
517</script>
518<style>
519
520.stepform
521{
522  margin-left: 20px;
523  border: 1px solid #999999;
524  width: 800px;
525  table-layout: fixed;
526}
527
528.stepno
529{
530  width: 20px;
531  font-size: 20px;
532  font-weight: bold;
533  color: #E0E0E0;
534  background: #555577;
535  vertical-align: top;
536  text-align: center;
537}
538
539.steptitle
540{
541  width: 780px;
542  color: #333377;
543  background: #E0E0E0;
544  font-weight: bold;
545  padding: 1px 4px 1px 4px;
546  border-bottom: 1px solid #999999;
547}
548
549.nextstep
550{
551  width: 780px;
552  color: #333377;
553  background: #E0E0E0;
554  font-weight: bold;
555  padding: 1px 4px 1px 4px;
556  border-top: 1px solid #999999;
557}
558
559.stepfields
560{
561  width: 780px;
562}
563
564.stepfields .prompt
565{
566  width: 150px;
567  font-weight: bold;
568  padding: 1px 2px 1px 2px;
569}
570
571.stepfields .input
572{
573  width: 250px;
574  padding: 1px 2px 1px 2px;
575}
576
577.stepfields .status
578{
579  width: 30px;
580  padding: 1px 2px 1px 2px;
581}
582
583.stepfields .help
584{
585  background: #e0e0e0;
586  width: 350px;
587  font-style: italic;
588  padding: 1px 2px 1px 2px;
589}
590
591.stepfields .message
592{
593  color: #cc0000;
594  font-weight: bold;
595  padding-right: 6px;
596}
597
598.status.invalid:before
599{
600  content: url('../../images/error.gif');
601}
602.status.warning:before
603{
604  content: url('../../images/warning.gif');
605}
606.status.valid:before
607{
608  content: url('../../images/ok.gif');
609}
610.success ul
611{
612  list-style-image: url('../../images/ok.gif');
613}
614</style>
615</base:head>
616<base:body onload="init()">
617
618  <p:path style="margin-top: 20px; margin-bottom: 10px;">
619    <p:pathelement title="Reggie" href="<%="index.jsp?ID="+ID%>" />
620    <p:pathelement title="Personal information registration" />
621  </p:path>
622
623  <%
624  if (sc.getActiveProjectId() == 0)
625  {
626    %>
627    <base:note type="warning" style="width: 800px; margin-left: 20px; margin-bottom: 20px; margin-right: 0px; font-weight: bold; color: #cc0000;">
628      No project has been selected. You may proceed with the registration but
629      created items will not be shared.
630    </base:note>
631    <%
632  }
633  %>
634
635  <form name="reggie" onsubmit="return false;">
636 
637  <!-- 1. Case + Personal number -->
638  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
639  <tr>
640    <td rowspan="3" class="stepno">1</td>
641    <td class="steptitle">Enter Case Name and Personal Number</td>
642  </tr>
643  <tr>
644    <td class="stepfields">
645      <table border="0" cellspacing="0" cellpadding="0" width="100%">
646      <tr valign="top">
647        <td class="prompt">Case name</td>
648        <td class="input"><input type="text" name="caseName" 
649          size="18" maxlength="12" onblur="caseNameOnChange()" onkeypress="focusOnEnter(event, 'personalNumber')"></td>
650        <td class="status" id="case.status"></td>
651        <td class="help"><span id="case.message" class="message" style="display: none;"></span>The case (barcode) associated with this patient.</td>
652      </tr>
653      <tr>
654        <td class="prompt">Personal number</td>
655        <td class="input"><input type="text" name="personalNumber" 
656          size="18" maxlength="12" onkeyup="personalNumberOnChange()" onkeypress="goNextOnTabOrEnter(event)"></td>
657        <td class="status" id="pnr.status"></td>
658        <td class="help"><span id="pnr.message" class="message" style="display: none;"></span>(YYYYMMDDZZZZ)</td>
659      </tr>
660      </table>
661    </td>
662  </tr>
663  </table>
664
665  <!-- 2. New patient registration -->
666  <div id="newPatientSection" style="display: none;">
667  <p>
668  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
669  <tr>
670    <td rowspan="2" class="stepno">2</td>
671    <td class="steptitle">New patient: Enter all names</td>
672  </tr>
673  <tr>
674    <td class="stepfields">
675      <table border="0" cellspacing="0" cellpadding="0" width="100%">
676      <tr>
677        <td class="prompt">Patient code</td>
678        <td class="input"><input type="text" name="patientCode" 
679          value="" size="18" maxlength="12" 
680          onkeypress="focusOnEnter(event, 'familyName')"></td>
681        <td class="status" id="patientCode.status"></td>
682        <td class="help"><span id="patientCode.message" class="message" style="display: none;"></span></td>
683      </tr>
684      <tr valign="top">
685        <td class="prompt">Family name</td>
686        <td class="input"><input type="text" name="familyName" 
687          value="" size="35" maxlength="255"
688          onkeypress="focusOnEnter(event, 'allFirstNames')"></td>
689        <td class="status" id="familyName.status"></td>
690        <td class="help"><span id="familyName.message" class="message" style="display: none;"></span>Keep hyphens, keep åäö, replace all special accented letters [e.g. éèü etc] with standard alphabet character.</td>
691      </tr>
692      <tr valign="top">
693        <td class="prompt">All first names</td>
694        <td class="input"><input type="text" name="allFirstNames" 
695          size="35" maxlength="255" onkeypress="goNextOnTabOrEnter(event)"></td>
696        <td class="status" id="allFirstNames.status"></td>
697        <td class="help"><span id="allFirstNames.message" class="message" style="display: none;"></span>Type all names, see FamilyName comment on valid characters.</td>
698      </tr>
699      <tr>
700        <td class="prompt">Gender</td>
701        <td class="input" id="new.gender"></td>
702        <td class="status"></td>
703        <td class="help"></td>
704      </tr>
705      <tr>
706        <td class="prompt">Date of birth</td>
707        <td class="input" id="new.dateOfBirth"></td>
708        <td class="status"></td>
709        <td class="help"></td>
710      </tr>
711      </table>
712    </td>
713  </tr>
714  </table>
715  </div>
716 
717  <!-- 2b. Existing patient -->
718  <div id="existingPatientSection" style="display: none;">
719  <p>
720  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
721  <tr>
722    <td rowspan="2" class="stepno">2</td>
723    <td class="steptitle">Existing patient: Verify names</td>
724  </tr>
725  <tr>
726    <td class="stepfields">
727      <table border="0" cellspacing="0" cellpadding="0" width="100%">
728      <tr>
729        <td class="prompt">Patient code</td>
730        <td class="input" id="existing.patientCode"></td>
731        <td class="status"></td>
732        <td class="help"></td>
733      </tr>
734      <tr>
735        <td class="prompt">Family name</td>
736        <td class="input" id="existing.familyName"></td>
737        <td class="status"></td>
738        <td class="help"></td>
739      </tr>
740      <tr>
741        <td class="prompt">All first names</td>
742        <td class="input" id="existing.allFirstNames"></td>
743        <td class="status"></td>
744        <td class="help"></td>
745      </tr>
746      <tr>
747        <td class="prompt">Gender</td>
748        <td class="input" id="existing.gender"></td>
749        <td class="status"></td>
750        <td class="help"></td>
751      </tr>
752      <tr>
753        <td class="prompt">Date of birth</td>
754        <td class="input" id="existing.dateOfBirth"></td>
755        <td class="status"></td>
756        <td class="help"></td>
757      </tr>
758      </table>
759    </td>
760  </tr>
761  </table>
762  </div>
763
764
765  <!-- 3. Case registration -->
766  <div id="caseSection" style="display: none;">
767  <p>
768  <table border="0" cellspacing="0" cellpadding="0" class="stepform">
769  <tr>
770    <td rowspan="2" class="stepno">3</td>
771    <td class="steptitle">About this case</td>
772  </tr>
773  <tr>
774    <td class="stepfields">
775      <table border="0" cellspacing="0" cellpadding="0" width="100%">
776      <tr valign="top">
777        <td class="prompt" id="laterality.prompt">Laterality</td>
778        <td class="input" id="laterality.input">
779          <input type="radio" name="laterality" value="LEFT" onclick="lateralityOnChange()">LEFT<br>
780          <input type="radio" name="laterality" value="RIGHT" onclick="lateralityOnChange()">RIGHT<br>
781          <input type="radio" name="laterality" value="" checked onclick="lateralityOnChange()"><i>unknown</i>
782        </td>
783        <td class="status" id="laterality.status"></td>
784        <td class="help"><span id="laterality.message" class="message" style="display: none;"></span></td>
785      </tr>
786      <tr valign="top">
787        <td class="prompt">Specimen tubes</td>
788        <td class="input" id="specimenTubes"><i>not found</i></td>
789        <td class="status" id="specimenTubes.status"></td>
790        <td class="help"><span id="specimenTubes.message" class="message" style="display: none;"></span>The specimen tube(s) associated with this case.</td>
791      </tr>
792      <tr id="padSection" valign="top">
793        <td class="prompt">PAD</td>
794        <td class="input"><input type="text" name="pad" 
795          value="" size="35" maxlength="255"
796          onkeypress="focusOnEnter(event, 'reasonIfNoSpecimen')"></td>
797        <td class="status"></td>
798        <td class="help"></td>
799      </tr>
800      <tr id="reasonIfNoSpecimenSection" valign="top">
801        <td class="prompt">Reason if no specimen</td>
802        <td class="input"><textarea rows="3" cols="30" name="reasonIfNoSpecimen" value=""></textarea></td>
803        <td class="status"></td>
804        <td class="help">Comment why there was no specimen tubes in the delivery.</td>
805      </tr>
806      </table>
807    </td>
808  </tr>
809  </table>
810  </div>
811
812  <div class="error" id="errorMessage" style="display: none; width: 800px; margin-left: 20px; margin-bottom: 0px;"></div>
813
814  <div id="done" class="success" style="display: none; width: 800px; margin-left: 20px; margin-top: 20px;"></div>
815
816  <table style="margin-left: 20px; margin-top: 10px;">
817  <tr>
818    <td><base:button id="gocancel" title="Cancel" onclick="goRestart(false)" style="display: none;"/></td>
819    <td><base:button id="gonext" title="Next" image="gonext.gif" onclick="goNext()"/></td>
820    <td><base:button id="gocreate" title="Create" image="gonext.gif" onclick="goCreate()" style="display: none;"/></td>
821    <td><base:button id="gorestart" title="Restart" image="goback.gif" onclick="goRestart(true)" style="display: none;"/></td>
822  </tr>
823  </table>
824  </form>
825
826  <pre>
827  <div id="debug"></div>
828  </pre>
829 
830</base:body>
831</base:page>
832<%
833}
834finally
835{
836  if (dc != null) dc.close();
837}
838%>
Note: See TracBrowser for help on using the repository browser.