visit.html 2.8 KB

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