[Loris-dev] imaging_non_minc_insertion.pl issue with scanner_id

Olano.María molano at ext.cnio.es
Wed Nov 23 09:39:23 EST 2022


Hi Cecile,

Can’t thank you enough, that was exactly what we needed for it to work!

De: Cecile Madjar <cecile.madjar at mcin.ca>
Enviado el: miércoles, 23 de noviembre de 2022 15:11
Para: Olano.María <molano at ext.cnio.es>
CC: loris-dev <loris-dev at bic.mni.mcgill.ca>
Asunto: Re: imaging_non_minc_insertion.pl issue with scanner_id

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe

Hi Maria,

It looks like the following SQL patch has not been run to update the MRI tables. Try sourcing this upgrade patch<https://github.com/aces/Loris/blob/v24.1.1/SQL/Release_patches/24.0_To_24.1_upgrade.sql> and the script should work.

Let me know how it goes,

Cécile

On Wed, Nov 23, 2022 at 6:53 AM Olano.María <molano at ext.cnio.es<mailto:molano at ext.cnio.es>> wrote:
Hello Cecile!

Thank you for your kind response. You were completely correct, the problem was the visit label not being read correctly, but we managed to solve this by adding an optional parameter: patient_name as seen below

(loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl> -profile prod -upload_id 1 -file_path /home/lorisadmin/Downloads/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 1 -coordin_space native -reckless -verbose -patient_name DCC0000_359572_V3

However, this proved to come with its fair share of errors, it seems the file Is read well and moved to another location (/data/loris/data/assembly/359572/V3/mri/native/) but the console output reads as follows:

log dir is /data/loris/data/logs and log file is /data/loris/data/logs/FileLoad-12-20-gEsQPj.log.
PSCID is: DCC0000
CandID id: 359572
visit_label is: V3
PSCID is: DCC0000
CandID id: 359572
visit_label is: V3
    -> ScannerID was set to 1

    -> SessionID was set to 1

    -> Acquisition date was set to 2012-04-20

    -> Output type was set to native

Acquisition date: 2012-04-20
DBD::mysql::db do failed: Unknown column 'PhaseEncodingDirection' in 'field list' at /opt/loris/bin/mri/uploadNeuroDB/NeuroDB/MRI.pm line 793.
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`LORIS`.`parameter_file`, CONSTRAINT `FK_parameter_file_1` FOREIGN KEY (`FileID`) REFERENCES `files` (`FileID`)) at /opt/loris/bin/mri/uploadNeuroDB/NeuroDB/MRI.pm line 818.

We had the idea of adding another parameter indicating there was a json file with said Phase encoding direction inside ((loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl> -profile prod -upload_id 1 -file_path /home/lorisadmin/Downloads/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 1 -coordin_space native -reckless -verbose -patient_name DCC0000_359572_V3 -metadata_file /home/lorisadmin/Downloads/patient.json) , but it was of no use, the console sent us the same message.

Inside the log file FileLoad-12-20-gEsQPj.log here is what is written:

==> computing md5 hash for MINC body.

--> md5: aab815082fbf91e7e3e26b7f6b899e2d

File /home/lorisadmin/Downloads/DCC0000_359572_V3.zip
moved to:
/data/loris/data/assembly/359572/V3/mri/native/loris_359572_V3_t1_001.zip
ative

And the MRICandidateErrors has an empty set.

Any help would be much appreciated, best regards!

María

De: Cecile Madjar <cecile.madjar at mcin.ca<mailto:cecile.madjar at mcin.ca>>
Enviado el: martes, 22 de noviembre de 2022 17:35
Para: Olano.María <molano at ext.cnio.es<mailto:molano at ext.cnio.es>>; loris-dev <loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca>>
Asunto: imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl> issue with scanner_id

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe

Dear Maria,

Sorry for the late reply. For some reason I never received your email. Luckily, someone else from the LORIS team just flagged it and sent it to me.

It looks like the latest issue you are encountering is that the visit label is not properly parsed by the getSubjectIDs function in your prod file. Instead of returning V3, it returns V3.zip which is most likely not a valid visit label for your project.

The other possibility could be that DCC0000 and 359572 do not refer to the same candidate.

In any case, I think for both situations, an entry has been added to the MRICandidateErrors table and you could see the file in the MRI violations module where the file would be logged there.

Let me know if that helps. Best,

Cécile

---------- Forwarded message ---------
From: Olano.María <molano at ext.cnio.es<mailto:molano at ext.cnio.es>>
Date: Thu, Nov 17, 2022 at 10:24 AM
Subject: Re: [Loris-dev] imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> issue with scanner_id
To: loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca> <loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca>>

Good afternoon!

We managed to solve the issue with the scanner_id by linking the CandID to the scanner

mysql> SELECT * FROM `mri_scanner`;
+----+--------------+---------+---------------+----------+--------+
| ID | Manufacturer | Model   | Serial_number | Software | CandID |
+----+--------------+---------+---------------+----------+--------+
|  0 | NULL         | NULL    | NULL          | NULL     |   NULL |
|  1 | SIEMENS      | TrioTim | 35008         | Python   | 359572 |
| 10 | NULL         | NULL    | NULL          | NULL     |   NULL |
+----+--------------+---------+---------------+----------+--------+

And later got the upload_id error:

(loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> -profile prod -upload_id 1 -file_path /home/lorisadmin/Documents/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 1 -coordin_space native -reckless -verbose

log dir is /data/loris/data/logs and log file is /data/loris/data/logs/FileLoad-11-48-F5qW5R.log.

                ERROR: Invalid UploadID 1.

Managed to side step this error by using the front end Imaging Uploader which filled out the mri_upload table with the UploadID 1

mysql> SELECT * FROM `mri_upload`;
+----------+------------+---------------------+-------------------------------------------------+----------------------+-------------------+-----------+-------------------+------------------------+-----------------------+------------+-----------+--------------------------+---------------------+-----------+
| UploadID | UploadedBy | UploadDate          | UploadLocation                                  | DecompressedLocation | InsertionComplete | Inserting | PatientName       | number_of_mincInserted | number_of_mincCreated | TarchiveID | SessionID | IsCandidateInfoValidated | IsTarchiveValidated | IsPhantom |
+----------+------------+---------------------+-------------------------------------------------+----------------------+-------------------+-----------+-------------------+------------------------+-----------------------+------------+-----------+--------------------------+---------------------+-----------+
|        1 | lorisadmin | 2022-11-17 14:40:58 | /data/incoming/lorisadmin/DCC0000_359572_V3.zip |                      |                 0 |      NULL | DCC0000_359572_V3 |                   NULL |                  NULL |       NULL |         1 |                     NULL |                   0 | N         |
+----------+------------+---------------------+-------------------------------------------------+----------------------+-------------------+-----------+-------------------+------------------------+-----------------------+------------+-----------+--------------------------+---------------------+-----------+

However! It didn’t manage to upload correctly so we tried to use the back end again with imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> (as this isn’t a DICOM file) and we are presented with our last error:

(loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> -profile prod -upload_id 1 -file_path /data/incoming/lorisadmin/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 1 -coordin_space native -reckless -verbose

log dir is /data/loris/data/logs and log file is /data/loris/data/logs/FileLoad-16-0-_g35H2.log.
PSCID is: DCC0000
CandID id: 359572
visit_label is: V3.zip
PSCID is: DCC0000
CandID id: 359572
visit_label is: V3.zip

=> No Visit label

                ERROR: Candidate IDs mismatch for /data/incoming/lorisadmin/DCC0000_359572_V3.zip.

This Visit label has been populated in the MySQL visit table, so we don’t know what mismatch it is referring to.

Any help would be much appreciated.

María

De: Olano.María
Enviado el: miércoles, 16 de noviembre de 2022 14:11
Para: 'loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca>' <loris-dev at bic.mni.mcgill.ca<mailto:loris-dev at bic.mni.mcgill.ca>>
Asunto: imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> issue with scanner_id

Good afternoon,

Hope this email finds you well. We are having problems using the imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> as when we execute the command this what pops up in the terminal.

(loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> -profile prod -upload_id 1 -file_path /home/lorisadmin/Documents/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 0 -coordin_space native -reckless -verbose

This script inserts a file in the files and parameter_file tables.

Usage: perl imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> [options]

-help for options


                ERROR: missing -scanner_id argument

As you can see, scanner_id is included in the options accompanying the command, but when changing the ID from 0 to 10 it does recognize scanner_id, shown as followed:

(loris-mri-python) lorisadmin at maria-HP-ProBook-650-G2:/opt/loris/bin/mri$ uploadNeuroDB/imaging_non_minc_insertion.pl<http://imaging_non_minc_insertion.pl/> -profile prod -upload_id 1 -file_path /home/lorisadmin/Documents/DCC0000_359572_V3.zip -output_type native -scan_type t1 -date_acquired 2012-04-20 -scanner_id 10 -coordin_space native -reckless -verbose

log dir is /data/loris/data/logs and log file is /data/loris/data/logs/FileLoad-12-49-8uubDY.log.

                ERROR: Invalid ScannerID 10.

Both IDs are in the MYSQL table “mri_scanner” so we don’t know what the problem could be.

mysql> SELECT * FROM `mri_scanner`;
+----+--------------+-------+---------------+----------+--------+
| ID | Manufacturer | Model | Serial_number | Software | CandID |
+----+--------------+-------+---------------+----------+--------+
|  0 | NULL         | NULL  | NULL          | NULL     |   NULL |
| 10 | NULL         | NULL  | NULL          | NULL     |   NULL |
+----+--------------+-------+---------------+----------+--------+

Any help would be much appreciated.

Best regards,

María


**ADVERTENCIA LEGAL**: Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
De conformidad con lo dispuesto en el Reglamento (UE) 2016/679 relativo a la protección de los datos personales de las personas físicas, la información personal que nos pueda facilitar a través de este correo electrónico quedará registrada por la Fundación CNIO con la finalidad de tramitar el objeto del presente correo electrónico. El tratamiento de sus datos personales se encuentra legitimado por ser necesario para gestionar el objeto del presente mensaje. Estos datos personales no serán comunicados a ningún destinatario salvo a aquellos que usted nos autorice o así venga exigido por una ley. Ud. podrá ejercer los derechos de acceso, rectificación, supresión, limitación de tratamiento, portabilidad y oposición en la siguiente dirección: c/Melchor Fernandez Almagro 3, 28029 (Madrid). Podrá ponerse en contacto con el Delegado de Protección de Datos en: delegado_lopd at cnio.es<mailto:delegado_lopd at cnio.es>. Para el caso de que Ud. precise conocer información adicional sobre el tratamiento de sus datos personales, puede consultar dicha información adicional en el siguiente enlace dentro de nuestra página web: https://www.cnio.es/es/privacidad/index.asp

**LEGAL NOTICE**: This email and any attached files may contain protected information for the sole use of its intended recipient or addressee. Anyone other than the intended recipient or addressee is strictly prohibited from distributing, reproducing or transmitting the email and its contents in any way. If you receive this email in error, please notify the sender and delete the message.
Pursuant to the provisions of EU Regulation 2016/679 regarding the protection of personal data, any personal information you provide through this email will be registered by the CNIO Foundation in order to deal with content of this email. Your personal data must be processed in order to be able to deal with the content and purpose of this message. Your personal details will not be passed on to anyone else unless you authorise us to do so or we are required to do so by law. You may exercise your rights regarding access, rectification, suppression, limitation of processing, portability and opposition by writing to the following address: c/Melchor Fernandez Almagro 3, 28029 (Madrid). You may contact the Data Protection Delegate (Delegado de Protección de Datos) at: delegado_lopd at cnio.es<mailto:delegado_lopd at cnio.es>. If you require further information about the processing of your personal data, go to the following link on our webpage: https://www.cnio.es/es/privacidad/index.asp
_______________________________________________
Loris-dev mailing list
Loris-dev at bic.mni.mcgill.ca<mailto:Loris-dev at bic.mni.mcgill.ca>
https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev


**ADVERTENCIA LEGAL**: Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
De conformidad con lo dispuesto en el Reglamento (UE) 2016/679 relativo a la protección de los datos personales de las personas físicas, la información personal que nos pueda facilitar a través de este correo electrónico quedará registrada por la Fundación CNIO con la finalidad de tramitar el objeto del presente correo electrónico. El tratamiento de sus datos personales se encuentra legitimado por ser necesario para gestionar el objeto del presente mensaje. Estos datos personales no serán comunicados a ningún destinatario salvo a aquellos que usted nos autorice o así venga exigido por una ley. Ud. podrá ejercer los derechos de acceso, rectificación, supresión, limitación de tratamiento, portabilidad y oposición en la siguiente dirección: c/Melchor Fernandez Almagro 3, 28029 (Madrid). Podrá ponerse en contacto con el Delegado de Protección de Datos en: delegado_lopd at cnio.es<mailto:delegado_lopd at cnio.es>. Para el caso de que Ud. precise conocer información adicional sobre el tratamiento de sus datos personales, puede consultar dicha información adicional en el siguiente enlace dentro de nuestra página web: https://www.cnio.es/es/privacidad/index.asp

**LEGAL NOTICE**: This email and any attached files may contain protected information for the sole use of its intended recipient or addressee. Anyone other than the intended recipient or addressee is strictly prohibited from distributing, reproducing or transmitting the email and its contents in any way. If you receive this email in error, please notify the sender and delete the message.
Pursuant to the provisions of EU Regulation 2016/679 regarding the protection of personal data, any personal information you provide through this email will be registered by the CNIO Foundation in order to deal with content of this email. Your personal data must be processed in order to be able to deal with the content and purpose of this message. Your personal details will not be passed on to anyone else unless you authorise us to do so or we are required to do so by law. You may exercise your rights regarding access, rectification, suppression, limitation of processing, portability and opposition by writing to the following address: c/Melchor Fernandez Almagro 3, 28029 (Madrid). You may contact the Data Protection Delegate (Delegado de Protección de Datos) at: delegado_lopd at cnio.es<mailto:delegado_lopd at cnio.es>. If you require further information about the processing of your personal data, go to the following link on our webpage: https://www.cnio.es/es/privacidad/index.asp


**ADVERTENCIA LEGAL**: Este correo electrónico, y en su caso los ficheros adjuntos, pueden contener información protegida para el uso exclusivo de su destinatario. Se prohíbe la distribución, reproducción o cualquier otro tipo de transmisión por parte de otra persona que no sea el destinatario. Si usted recibe por error este correo, se ruega comunicarlo al remitente y borrar el mensaje recibido.
De conformidad con lo dispuesto en el Reglamento (UE) 2016/679 relativo a la protección de los datos personales de las personas físicas, la información personal que nos pueda facilitar a través de este correo electrónico quedará registrada por la Fundación CNIO con la finalidad de tramitar el objeto del presente correo electrónico. El tratamiento de sus datos personales se encuentra legitimado por ser necesario para gestionar el objeto del presente mensaje. Estos datos personales no serán comunicados a ningún destinatario salvo a aquellos que usted nos autorice o así venga exigido por una ley. Ud. podrá ejercer los derechos de acceso, rectificación, supresión, limitación de tratamiento, portabilidad y oposición en la siguiente dirección: c/Melchor Fernandez Almagro 3, 28029 (Madrid). Podrá ponerse en contacto con el Delegado de Protección de Datos en: delegado_lopd at cnio.es. Para el caso de que Ud. precise conocer información adicional sobre el tratamiento de sus datos personales, puede consultar dicha información adicional en el siguiente enlace dentro de nuestra página web: https://www.cnio.es/es/privacidad/index.asp

**LEGAL NOTICE**: This email and any attached files may contain protected information for the sole use of its intended recipient or addressee. Anyone other than the intended recipient or addressee is strictly prohibited from distributing, reproducing or transmitting the email and its contents in any way. If you receive this email in error, please notify the sender and delete the message.
Pursuant to the provisions of EU Regulation 2016/679 regarding the protection of personal data, any personal information you provide through this email will be registered by the CNIO Foundation in order to deal with content of this email. Your personal data must be processed in order to be able to deal with the content and purpose of this message. Your personal details will not be passed on to anyone else unless you authorise us to do so or we are required to do so by law. You may exercise your rights regarding access, rectification, suppression, limitation of processing, portability and opposition by writing to the following address: c/Melchor Fernandez Almagro 3, 28029 (Madrid). You may contact the Data Protection Delegate (Delegado de Protección de Datos) at: delegado_lopd at cnio.es. If you require further information about the processing of your personal data, go to the following link on our webpage: https://www.cnio.es/es/privacidad/index.asp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20221123/218323f6/attachment-0001.html>


More information about the Loris-dev mailing list