visit.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. <table cellspacing="2" cellpadding="5" border="0">
  13. <tr><td>Version: </td><td><strong id="version">0.0</strong></td></tr>
  14. <tr><td>CRF ID: </td><td><strong id="crfRefId">1583163135258</strong></td></tr>
  15. <tr><td>Eudra CT Number: </td><td><strong id="eudraCTNumber">Loading</strong></td></tr>
  16. <tr><td>Study Sponsor: </td><td><strong id="studySponsor">Loading</strong></td></tr>
  17. <tr><td>Study Coordinator: </td><td><strong id="studyCoordinator">Loading</strong></td></tr>
  18. <tr><td>Site: </td><td><strong id="siteName">Loading</strong></td></tr>
  19. <tr><td>Telephone(site): </td><td><strong id="sitePhone">Loading</strong></td></tr>
  20. <tr><td>Investigator: </td><td><strong id="investigatorName">Loading</strong></td></tr>
  21. </table>
  22. <form name="visitForm" id="visitForm">
  23. </form>
  24. <div id="submitDiv"/>
  25. <div id="errorDiv" style="display:none">
  26. <textarea id="errorTxt" cols="95" rows="10"></textarea>
  27. </div>
  28. <div id="debugDiv"/>
  29. <!--<div id="debug" style="display:block">
  30. <textarea cols="95" rows="10" name="formStatus" id="formStatus">
  31. Loading
  32. </textarea>
  33. </div>
  34. -->
  35. <script type="text/javascript">
  36. window.onload = init();
  37. function init(){
  38. let searchParams = new URLSearchParams(window.location.search);
  39. //update this to pick crfRef from url
  40. let crfRef=searchParams.get('entryId');
  41. //let formSetupQuery=searchParams.get('formSetupQuery');
  42. let registrationQueryId=searchParams.get('registrationQueryId');
  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. config.reviewMode=searchParams.get("reviewMode");
  49. if (config.reviewMode=="EDIT") delete config.reviewMode;
  50. //where to get ParticipantId
  51. config.registrationQueryId=registrationQueryId;
  52. config.registrationParticipantIdField="participantCode";
  53. //pick this from study properties
  54. config.participantField="PatientId";
  55. config.masterForm="visitForm";
  56. config.document=document;
  57. config.window=window;
  58. config.debugDiv="debugDiv";
  59. config.debugId="formStatus";
  60. config.crfRefId="crfRefId";
  61. config.containerPath= LABKEY.ActionURL.getContainer();
  62. //config.setupQueryName=formSetupQuery;
  63. config.formName=searchParams.get("formName");
  64. config.formId=searchParams.get("formId");
  65. config.submitReportId="submitReport";
  66. clear();
  67. generateMasterForm();
  68. }
  69. </script>