visit.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <h1 id="formTitle">Title</h1>
  13. <table cellspacing="2" cellpadding="5" border="0">
  14. <tr><td>Version: </td><td><strong id="version">0.0</strong></td></tr>
  15. <tr><td>CRF ID: </td><td><strong id="crfRefId">1583163135258</strong></td></tr>
  16. <tr><td>Eudra CT Number: </td><td><strong id="eudraCTNumber">Loading</strong></td></tr>
  17. <tr><td>Study Sponsor: </td><td><strong id="studySponsor">Loading</strong></td></tr>
  18. <tr><td>Study Coordinator: </td><td><strong id="studyCoordinator">Loading</strong></td></tr>
  19. <tr><td>Site: </td><td><strong id="siteName">Loading</strong></td></tr>
  20. <tr><td>Telephone(site): </td><td><strong id="sitePhone">Loading</strong></td></tr>
  21. <tr><td>Investigator: </td><td><strong id="investigatorName">Loading</strong></td></tr>
  22. </table>
  23. <form name="visitForm" id="visitForm">
  24. </form>
  25. <div id="submitDiv"/>
  26. <div id="errorDiv" style="display:none">
  27. <textarea id="errorTxt" cols="95" rows="10"></textarea>
  28. </div>
  29. <div id="debugDiv" style="display:block"/>
  30. <!--<div id="debug" style="display:block">
  31. <textarea cols="95" rows="10" name="formStatus" id="formStatus">
  32. Loading
  33. </textarea>
  34. </div>
  35. -->
  36. <script type="text/javascript">
  37. window.onload = init();
  38. function init(){
  39. let searchParams = new URLSearchParams(window.location.search);
  40. //update this to pick crfRef from url
  41. let crfRef=searchParams.get('entryId');
  42. //let formSetupQuery=searchParams.get('formSetupQuery');
  43. document.getElementById("crfRefId").innerHTML=crfRef;
  44. //let config=new Object();
  45. //config is part of crfVisit.js
  46. //will this change if we are in views?
  47. //config.review=true;
  48. //where to get ParticipantId
  49. //pick this from study properties
  50. config.masterForm="visitForm";
  51. config.document=document;
  52. config.window=window;
  53. config.debugDiv="debugDiv";
  54. config.debugId="formStatus";
  55. config.crfRefId="crfRefId";
  56. config.registrationParticipantIdField="participantCode";
  57. config.containerPath= LABKEY.ActionURL.getContainer();
  58. //config.setupQueryName=formSetupQuery;
  59. config.formId=searchParams.get("formId");
  60. config.role=searchParams.get('role');
  61. clear();
  62. generateMasterForm();
  63. }
  64. </script>