visit.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <style>
  2. table {margin-bottom:20px;table-layout:fixed; border-collapse:collapse; border-spacing:10px}
  3. table.t1 {width:400px; border:1px solid black}
  4. table.t1 th {border:1px solid black;padding:4px;background-color:#e0e0e0}
  5. table.t1 td {text-align:center}
  6. table.t2 {width:800px; border:1px solid black;}
  7. table.t2 th {border:1px solid black;padding:4px;background-color:#e0e0e0}
  8. table.t2 td {border:1px solid black; text-align:center}
  9. div.d1 {text-align:center; width=400px; background-color:#e0e0e0;
  10. font-size: 20px; margin-bottom:20px}
  11. </style>
  12. <div id="staticDataDiv"/>
  13. <!--set static values -->
  14. <table cellspacing="2" cellpadding="5" border="0" id="staticTable">
  15. <tr><td width="200">CRF ID: </td><td><strong id="crfRefId">1583163135258</strong></td></tr>
  16. </table>
  17. <form name="visitForm" id="visitForm">
  18. </form>
  19. <div id="submitDiv"/>
  20. <div id="errorDiv" style="display:none">
  21. <textarea id="errorTxt" cols="95" rows="10"></textarea>
  22. </div>
  23. <div id="debugDiv"/>
  24. <!--<div id="debug" style="display:block">
  25. <textarea cols="95" rows="10" name="formStatus" id="formStatus">
  26. Loading
  27. </textarea>
  28. </div>
  29. -->
  30. <script type="text/javascript">
  31. window.onload = init();
  32. function init(){
  33. let searchParams = new URLSearchParams(window.location.search);
  34. //update this to pick crfRef from url
  35. let crfRef=searchParams.get('entryId');
  36. //let formSetupQuery=searchParams.get('formSetupQuery');
  37. document.getElementById("crfRefId").innerHTML=crfRef;
  38. //let config=new Object();
  39. //config is part of crfVisit.js
  40. //will this change if we are in views?
  41. //config.review=true;
  42. //where to get ParticipantId
  43. //pick this from study properties
  44. config.masterForm="visitForm";
  45. config.document=document;
  46. config.window=window;
  47. config.debugDiv="debugDiv";
  48. config.debugId="formStatus";
  49. config.crfRefId="crfRefId";
  50. config.registrationParticipantIdField="participantCode";
  51. config.containerPath= LABKEY.ActionURL.getContainer();
  52. //config.setupQueryName=formSetupQuery;
  53. config.formId=searchParams.get("formId");
  54. config.role=searchParams.get('role');
  55. clear();
  56. generateMasterForm();
  57. }
  58. </script>