<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<span>Dear LORIS-dev team,<br>
</span>
<div><br>
</div>
<div>In the IPMSA project we are batch inserting the clinical data. I am following the steps suggested by Rida, that I successfully used for a first study but now I am stuck in one of the steps. In that step I call the script "assign_missing_instruments.php"
 to assign missing instruments in the system. Using the script without the option "confirm", the output is telling me that only 1053 out of the expected 32338 visits are going to be created. Could you help understanding where is the problem or if the script
 I am missing something? What I can see is that script is only generating the changes for 2 out the new 83 visit labels.<br>
</div>
<div><br>
</div>
<div> Here is the steps I have for the uploading process of clinical data, I am stuck in step number 8:<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>1. Generate the labels of the visits in the system (successfully done  - 83 new visit labels)<br>
</div>
<div>  a. Modify the file config.xml<br>
</div>
<div>  b. Run the script "php populate_visit_windows.php"<br>
</div>
<div><br>
</div>
<div>2. Populate the table "test_battery" (successfully done: 678 new entries were added.)<br>
</div>
<div>  a. For each visit a set of instruments is assigned.<br>
</div>
<div><br>
</div>
<div>3. Check the state of tables<br>
</div>
<div>  - session: 31027 rows<br>
</div>
<div>  - flad: 275176 rows<br>
</div>
<div><br>
</div>
<div>4. Create the visits using the LORIS-API <span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">(successfully
 done: <span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">
32345 visits were created</span>.)</span></div>
<div>  - table "session" has now "63372" rows (32345 = 31027 previous rows + 32345 new rows)<br>
</div>
<div><br>
</div>
<div>5. Check state of "session" table (17246 entries are "In progress")<br>
</div>
<div>  - select count(*) from session where Visit='In Progress'; <br>
</div>
<div><br>
</div>
<div>6. Hack the session table (<span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">successfully
 done:<span> 3</span></span>2345 rows were updated )<br>
</div>
<div>  a. Update each new row in the session table (32345 new rows) like this:<br>
</div>
<div>  UPDATE session SET Visit='In Progress',Scan_done='N',Current_stage='Visit',Date_stage_change='2010-12-24',Date_visit='2010-12-24' WHERE Visit_label='VISIT_LABEL' AND CandID=123456;<br>
</div>
<div><br>
</div>
<div>7. Check state of "session" table (49584 entries are "In progress", 49584 = 17246 old entries + 32338 new entries) [7 entries were not updated for missing date]<br>
</div>
<div>  - select count(*) from session where Visit='In Progress'; <br>
</div>
<div><br>
</div>
<div><b>8. Run php assign missing instruments</b><br>
</div>
<div>  - <span style="color: rgb(200, 38, 19);">When running <span style="color: rgb(200, 38, 19); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important;">assign_missing_instruments.php
 with no arguments I get </span></span><span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important"><span style="font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important; color: rgb(200, 38, 19);">1053
 changes but I should get<span style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255)"> </span><span style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">32338
 changes. The changes are pointing to only 2 out of the new 83 visit labels.</span></span></span></div>
<div><br>
</div>
<div>9. Insert instrument-visit information<br>
</div>
<div><br>
</div>
<div>10. Add "Candidate" information<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Thank you very much for help. Let me know if you need more details from my side.<br>
</div>
<div><br>
</div>
<div>Best regards,<br>
</div>
<span>Alfredo.</span>
<div id="signature">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText"></div>
</span></font></div>
</div>
<p></p>

<p>The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
http://www.partners.org/complianceline . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</p></body>
</html>