{ "cells": [ { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/lib/python3/dist-packages/urllib3/connection.py:391: SubjectAltNameWarning: Certificate for merlin.fmf.uni-lj.si has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "User: andrej studen CSRF: fb406909912be2fb27ea93ca6a1733ea\n", "1\n", "User: andrej studen CSRF: a6d06cd3868e383a08cfaa60907e061e\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2018/08/17 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 1,\\n \"actionableMutation\" : 3,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:28\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A009.0.0000\",\\n \"itStartDate\" : \"2018/08/17 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A009\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2018/08/17 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1059,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"68\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: d02246fb3b44240b93499ba43961928b\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/03/17 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 6,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:19\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A000.0.0000\",\\n \"itStartDate\" : \"2017/03/17 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A000\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/03/17 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1060,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"59\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: aec00316770b6bae90f933bb1707fe5a\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/11/08 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:29\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A011.0.0000\",\\n \"itStartDate\" : \"2017/11/08 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A011\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/11/08 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1061,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"63\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "5\n", "User: andrej studen CSRF: cbf1bb9e2bea42fc0e07077002e3d33e\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2018/02/16 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 5,\\n \"actionableMutation\" : 6,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:42\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A023.0.0000\",\\n \"itStartDate\" : \"2018/02/16 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A023\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2018/02/16 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1062,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"2\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"80\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "1\n", "User: andrej studen CSRF: 4120fc01d22bfd4e095c952835d83cb4\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/06/05 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 1,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:22\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A003.0.0000\",\\n \"itStartDate\" : \"2017/06/05 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A003\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/06/05 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1063,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"34\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: d278696aa559df03c87d5c708806b5dd\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/10/24 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 2,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:46\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A027.0.0000\",\\n \"itStartDate\" : \"2017/10/24 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A027\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/10/24 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1064,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"1\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"68\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "4\n", "User: andrej studen CSRF: 217e8e1925e010c4688dd92c27499ab4\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2018/03/02 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 4,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:37\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A019.0.0000\",\\n \"itStartDate\" : \"2018/03/02 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A019\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2018/03/02 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1065,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"1\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"76\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "1\n", "User: andrej studen CSRF: 082cca6eee6143fbc318308468144d6b\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/10/18 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 1,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:24\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A006.0.0000\",\\n \"itStartDate\" : \"2017/10/18 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A006\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"pneumonitisGrade\" : 7,\\n \"firstITStartDate\" : \"2017/10/18 00:00:00\",\\n \"dsrowid\" : 1066,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"63\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "1\n", "User: andrej studen CSRF: acb1ea7fb9f2cb76f5c402cc07b8229d\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/06/05 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 1,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:28\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A010.0.0000\",\\n \"itStartDate\" : \"2017/06/05 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A010\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/06/05 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1067,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"2\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"78\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: ea3e618612b7cd360c34f4e280cddf9a\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/12/01 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:47\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A029.0.0000\",\\n \"itStartDate\" : \"2017/12/01 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A029\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/12/01 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1068,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"60\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: 184df137cc2ec3204fed70e5f06ea41b\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2016/08/26 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 6,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:30\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A012.0.0000\",\\n \"itStartDate\" : \"2016/08/26 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A012\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2016/08/26 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1069,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"1\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"59\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: 9d4e19d8b73da3e568907ab7a999671c\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2018/01/11 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:26\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A008.0.0000\",\\n \"itStartDate\" : \"2018/01/11 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A008\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2018/01/11 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1070,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"1\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"66\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: 84f4160c9ba44ab40e2b0691239d5df0\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/05/25 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:31\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A013.0.0000\",\\n \"itStartDate\" : \"2017/05/25 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A013\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/05/25 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1071,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"31\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "1\n", "User: andrej studen CSRF: 86952146a9d692690f688e66b5a194ed\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2016/04/06 00:00:00\",\\n \"gender\" : 1,\\n \"bestResponse\" : 1,\\n \"actionableMutation\" : 2,\\n \"itLine\" : 2,\\n \"Created\" : \"2021/04/13 11:07:33\",\\n \"SequenceNum\" : 0.0000,\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A015.0.0000\",\\n \"itStartDate\" : \"2016/04/06 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A015\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2016/04/06 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1072,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"70\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n", "2\n", "User: andrej studen CSRF: eea88833c27f8e5eab0869f8c9c81845\n", "b'{\\n \"rowsAffected\" : 1,\\n \"queryName\" : \"clinicalDataInternational\",\\n \"schemaName\" : \"study\",\\n \"containerPath\" : \"/iPNUMMretro/Study\",\\n \"rows\" : [ {\\n \"date\" : null,\\n \"firstITInfusionDate\" : \"2017/11/17 00:00:00\",\\n \"gender\" : 2,\\n \"bestResponse\" : 2,\\n \"actionableMutation\" : 1,\\n \"itLine\" : 2,\\n \"SequenceNum\" : 0.0000,\\n \"Created\" : \"2021/04/13 11:07:34\",\\n \"lsid\" : \"urn:lsid:ijs.si:Study.Data-129:5007.NIX-LJU-D2002-IRAE-A016.0.0000\",\\n \"itStartDate\" : \"2017/11/17 00:00:00\",\\n \"thyroiditisGrade\" : 7,\\n \"immunosupressionFlag\" : 2,\\n \"PatientId\" : \"NIX-LJU-D2002-IRAE-A016\",\\n \"colitisDate\" : null,\\n \"pneumonitisDate\" : null,\\n \"firstITStartDate\" : \"2017/11/17 00:00:00\",\\n \"pneumonitisGrade\" : 7,\\n \"dsrowid\" : 1073,\\n \"CreatedBy\" : 1003,\\n \"thyroiditisDate\" : null,\\n \"itTreatmentSetting\" : 2,\\n \"psECOGStartIT\" : \"0\",\\n \"QCState\" : null,\\n \"melanomaPrimaryAnatomicSite\" : null,\\n \"itStartAge\" : \"73\",\\n \"itType\" : null,\\n \"sourcelsid\" : null,\\n \"colitisGrade\" : 7,\\n \"durationOfCurrentIT\" : null\\n } ],\\n \"command\" : \"update\"\\n}'\n" ] } ], "source": [ "import csv\n", "import datetime\n", "import sys\n", "import os\n", "\n", "sys.path.append(os.path.join(os.path.expanduser('~'),'software','src','nixSuite','wrapper'))\n", "import nixWrapper\n", "nixWrapper.loadLibrary('labkeyInterface')\n", "import labkeyInterface\n", "net=labkeyInterface.labkeyInterface()\n", "fconfig=os.path.join(os.path.expanduser('~'),'.labkey','network.json')\n", "net.init(fconfig)\n", "net.getCSRF()\n", "import labkeyFileBrowser\n", "sys.path.append(os.getcwd())\n", "import downloadPatient\n", "fb=labkeyFileBrowser.labkeyFileBrowser(net)\n", "project='iPNUMMretro/Study'\n", "dataset='clinicalDataInternational'\n", "import labkeyDatabaseBrowser\n", "db=labkeyDatabaseBrowser.labkeyDB(net)\n", "\n", "cf='/home/studen/Downloads/iraeMMPilot.csv'\n", "rows=[]\n", "with open(cf,'r') as f:\n", " rd=csv.DictReader(f,delimiter='\\t')\n", " for r in rd:\n", " rows.append(r)\n", "#print(rows) \n", "def getDate(f):\n", " return datetime.datetime.strptime(f,'%m/%d/%Y')\n", "\n", "for r in rows:\n", " idFilter={'variable':'PatientId','value':r['ParticipantId'],'oper':'eq'}\n", " ds=db.selectRows(project,'study',dataset,[idFilter])\n", " if len(ds['rows'])==0:\n", " print('No match found for {}'.format(r['ParticipantId']))\n", " else:\n", " qrow=ds['rows'][0]\n", " \n", " startItDate=getDate(r['start IT date'])\n", " dob=getDate(r['date of birth'])\n", " qrow['itStartAge']='{:.0f}'.format((startItDate-dob).days/365.)\n", " qrow['gender']=1\n", " if r['sex']=='male':\n", " qrow['gender']=2\n", " qrow['psECOGStartIT']=r['PS WHO']\n", " qv=6\n", " v=r['BRAF mut']\n", " if v=='WT':\n", " qv=1\n", " if v.find('BRAF V600K')>-1:\n", " qv=3\n", " if v.find('BRAF V600E')>-1:\n", " qv=2\n", " qrow['actionableMutation']=qv\n", " v=r['origo ']\n", " qv=4\n", " if v=='cutaneous':\n", " qv=3\n", " if v=='ocular':\n", " qv=1\n", " \n", " \n", " qrow['melanomaPrimaryMutationSite']=qv\n", " qrow['itTreatmentSetting']=2 #metastaticDisease\n", " qrow['itStartDate']=getDate(r['start IT date']).isoformat()\n", " qrow['firstITStartDate']=getDate(r['start IT date']).isoformat()\n", " \n", " v=r['best response']\n", " qv=5\n", " if v=='CR':\n", " qv=4\n", " if v=='PD':\n", " qv=1\n", " if v=='radilogical response':\n", " qv=2\n", " if v=='Radiological response':\n", " qv=2\n", " qrow['bestResponse']=qv\n", " \n", " qrow['immunosupressionFlag']=2 #No\n", " qrow['firstITInfusionDate']=getDate(r['start IT date']).isoformat()\n", " qrow['itLine']=2 #First\n", " print(qrow['bestResponse'])\n", " qrow['pneumonitisGrade']=7 #G0\n", " qrow['colitisGrade']=7 #G0\n", " qrow['thyroditisGrade']=7 #G0\n", " \n", " print(db.modifyRows('update',project,'study',dataset,[qrow]))\n", " \n", " " ] }, { "cell_type": "raw", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }