<div dir="ltr">Hi Alfredo,<div><br></div><div>Could you point me to the version of the code you are using on GitHub so I can take a look at the correct MRI.pm file.</div><div><br></div><div>Thank you!</div><div><br></div><div>Cécile</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 25, 2021 at 8:09 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
Hi Cécile,
<div><br>
</div>
<div>I’m getting the following error when inserting a minc file using the <a href="http://minc_insertion.pl" target="_blank">minc_insertion.pl</a> script:</div>
<div><br>
</div>
<div>===</div>
<div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<div style="margin:0px;font-stretch:normal;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">$ perl <a href="http://minc_insertion.pl" target="_blank">minc_insertion.pl</a> -profile prod -force -mincPath /data/BGI102001_207019_screening.mnc -verbose -acquisition_protocol
t1c -create_minc_pics</span></div>
</div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures">DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`IPMSA_LORIS`.`candidate`, CONSTRAINT `FK_candidate_1` FOREIGN KEY (`RegistrationCenterID`) REFERENCES
`psc` (`CenterID`)) at /data_/ipmsa/loris_data/IPMSA/bin/mri/uploadNeuroDB/NeuroDB/MRI.pm line 1018.</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures">ERROR: Failed to insert record in table mri_scanner:</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures">The following database commands failed:</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><span style="white-space:pre-wrap"></span>PREPARE s FROM 'INSERT INTO mri_scanner (Serial_number,Software,Manufacturer,Model,CandID) VALUES (?,?,?,?,?)';</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><span style="white-space:pre-wrap"></span>SET @x1='syngo_MR_2004A_4VA25A',@x2='Siemens',@x3='Sonata',@x4='247660';</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><span style="white-space:pre-wrap"></span>EXECUTE s USING @x1,@x2,@x3,@x4,@x5;</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><br>
</span></div>
<div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures">Error obtained:Cannot add or update a child row: a foreign key constraint fails (`IPMSA_LORIS`.`mri_scanner`, CONSTRAINT `FK_mri_scanner_1` FOREIGN KEY (`CandID`) REFERENCES `candidate` (`CandID`))
(error code 1452)</span></div>
</div>
<div>===</div>
<div><br>
</div>
<div>Could you help me figuring out what is happening? Is there something I should add to the minc headers?</div>
<div><br>
</div>
<div>Best,</div>
<div>Alfredo.<br>
<div><br>
</div>
</div>
<div>The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at <a href="http://www.massgeneralbrigham.org/complianceline" target="_blank">http://www.massgeneralbrigham.org/complianceline</a> . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.</div><br>
<p class="MsoNormal">Please note that this e-mail is not secure
(encrypted). If you do not wish to continue communication over
unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you
understand and accept this risk and wish to continue to communicate over
unencrypted e-mail. </p></div>
</blockquote></div>