mdsol / rwslib

Provide a (programmer) friendly client library to Rave Web Services (RWS).
MIT License
31 stars 13 forks source link

rave form validation report post PostDataRequest #131

Closed vagarwal77 closed 2 years ago

vagarwal77 commented 2 years ago

I have a use case to push clinical data to EDC and then freeze the form. What i have observed with Rave is -

  1. You can push "non-validated" data to EDC with 200 success response code. From non-validated data, i mean that form field interdependencies are not getting validated. e.g. if answer for "What is the status of the subject's use of Alcohol substance?" was "NEVER" but had provided details of alcohol consumption.

  2. Now, when you freeze the form post submission, you will see the error as below as it is the time validation logic had been triggered- RWSException error e.rws_error.error_client_response_message - Freeze not authorized e.rws_error.error_origin_location - /ODM/ClinicalData[1]/SubjectData[1]/StudyEventData[1]/FormData[1]/ItemGroupData[1]/ItemData[4] e.rws_error.reason_code - RWS00059

What i am exploring is - Is there any rwslib or rave API which can perform validation logic before we push the data to EDC or if PostDataRequest can return all the invalidated scenarios with details?

Any pointer would be of great help.

Thanks Vivek

isparks commented 2 years ago

When you make an ODM post, if you supply data that has associated edit checks then those edit checks should run. Best way to test this is to enter exactly the same data into Rave via the web UI to see if the checks run. Of course if you push some data that doesn't cause edit check to run, then some data is added that causes them to run then you try to freeze you will end up with a problem. Maybe you can look at the Form or Subject ODM to determine if a record has open queries?

vagarwal77 commented 2 years ago

Thanks Ian. Exactly, my question is – Can I get “open queries” on a filled eCRF via API call post submission? I can see them on Rave Web UI but also want to get the same via API call.

I am pretty sure there must be some API as Medidata has this information. Please suggest.

Thanks -Vivek

From: Ian Sparks @.> Date: Monday, March 14, 2022 at 3:26 PM To: mdsol/rwslib @.> Cc: Vivek Agarwal @.>, Author @.> Subject: Re: [mdsol/rwslib] rave form validation report post PostDataRequest (Issue #131) When you make an ODM post, if you supply data that has associated edit checks then those edit checks should run. Best way to test this is to enter exactly the same data into Rave via the web UI to see if the checks run. Of course if you push some data that doesn't cause edit chec ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

[https://alert-dg01.redatatech.com/onprem_security_warning_fetch?r=1&dep=B%2BYPGuwk4dDMqEQ0dg4DAQ%3D%3DhzBOWvT1UBKpfm2nA5SHxcV8mRbrdjlWQDOZV%2F%2B2087vm2MH0uIexRPPWJBLmu64PNBumsON0PtoCD2i0oMQ1k2n86E5Pz%2Bd0nrPYG2ImMKloB0Md1r%2BgKeReRkUbpSGNkHbXwnmoGruofr4hzN%2B2TbFUt0vSUougxCd3nvXdIku6T%2B8y8B7cEM43H5XGSV1MZZup8AbgTqVanHbkE%2FL2kLDCUkV7k6xzcOusR3I%2BcZbBJAYswdTLv846D0QNDpSWO%2B0j7at1B4T%2BbOK6mqDHUX43DWRh5bbzWVSnKjM5epoql%2FQk8oA16qz%2FnIosCPIkbXt0kTQRI8PCkdp%2FRkdVJSijULlpr6kSnaZTPFRhCVAyaTCktxH4kd5zbsqHtz7JOhq0KxYFj9MZfCXo57QqLi%2FqECoX4OTw3DSAleuj8wX37p9Qb1GjYK4MIFVBQx2n2vVSlnELX55wzant1y28bqN%2FK2yHM%2FZ0elMNR2P1o643GQJ%2B5APDwtsEWwHOdR%2Bn0SpMVei6CMSjDNQjEbvTdvHjErCOFaWem4owyWk%2BnR81oL%2BK%2B13T8LJ6t6lZfzZiNpoJd6%2Fpe4B7Pv1sIquwnK3qnS9h%2FbZXeuPrToelBgFZx3Nwlz5YR6WXakMBRbp4P4XF%2Fa4kbHcfVx4mPcmJE7JDKsnWr4nTm%2FE4YPxjsbas2Mvsdal8epCmYBcM2M42TAjzlmT6B8ub83aWNDEcodgOOBzq0JDbqK5%2FgyNoKg%3D]https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprotect-us.mimecast.com%2Fs%2FOqrdCBBj0ZI7V0BxS63xsj%3Fdomain%3Dus.report.cybergraph.mimecast.com&data=04%7C01%7Cvagarwal%40concertai.com%7C8bf04005e3fe4f2399ba08da05f083a7%7C61a32d1a5fde47799b503fc4a615ddc4%7C1%7C0%7C637828827816607637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=emwCZf221lHhZ4BOa%2FqT8T34WP%2F2glvLFRizjx6%2FWwk%3D&reserved=0

When you make an ODM post, if you supply data that has associated edit checks then those edit checks should run. Best way to test this is to enter exactly the same data into Rave via the web UI to see if the checks run. Of course if you push some data that doesn't cause edit check to run, then some data is added that causes them to run then you try to freeze you will end up with a problem. Maybe you can look at the Form or Subject ODM to determine if a record has open queries?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprotect-us.mimecast.com%2Fs%2FRJ3PCADgkZsN9B2xfG4_2c%3Fdomain%3Dgithub.com&data=04%7C01%7Cvagarwal%40concertai.com%7C8bf04005e3fe4f2399ba08da05f083a7%7C61a32d1a5fde47799b503fc4a615ddc4%7C1%7C0%7C637828827816607637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=pP9m5cu7Wu1PEObfZH%2B9OeIi7bMQfwPP99XfZmGfg00%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprotect-us.mimecast.com%2Fs%2FQG_4CDklnjT5Bw07tAbhfW%3Fdomain%3Dgithub.com&data=04%7C01%7Cvagarwal%40concertai.com%7C8bf04005e3fe4f2399ba08da05f083a7%7C61a32d1a5fde47799b503fc4a615ddc4%7C1%7C0%7C637828827816607637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=p1TGjivM7HW1rGv%2BW%2BedrfE4pGSSPNn5TxuSH7ErX%2Bg%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprotect-us.mimecast.com%2Fs%2FR-sQCERmokc3WOMwUPGN3j%3Fdomain%3Dapps.apple.com&data=04%7C01%7Cvagarwal%40concertai.com%7C8bf04005e3fe4f2399ba08da05f083a7%7C61a32d1a5fde47799b503fc4a615ddc4%7C1%7C0%7C637828827816607637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WtWhfoxSuPvs5I053z7Mo63jj%2FfsCFzfEs%2BEnR%2BBwFk%3D&reserved=0 or Androidhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fprotect-us.mimecast.com%2Fs%2FSKctCG6oqmF1JEGrCk_Hfv%3Fdomain%3Dplay.google.com&data=04%7C01%7Cvagarwal%40concertai.com%7C8bf04005e3fe4f2399ba08da05f083a7%7C61a32d1a5fde47799b503fc4a615ddc4%7C1%7C0%7C637828827816607637%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=XqUew55LRQe0Jz4LbLjINCbm9%2BXcklhTxjMe%2Bpsl3bU%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

isparks commented 2 years ago

Not via an ODM Post, no. A Post returns a small snippet of information:

        <Response ReferenceNumber="82e942b0-48e8-4cf4-b299-51e2b6a89a1b"
                  InboundODMFileOID=""
                  IsTransactionSuccessful="1"
                  SuccessStatistics="Rave objects touched: Subjects=0; Folders=0; Forms=0; Fields=0; LogLines=0" NewRecords=""
                  SubjectNumberInStudy="1103" SubjectNumberInStudySite="55">
        </Response>

You see it does not tell you how many queries were opened etc. If you want to know if there are queries on a particular subject/form I suggest one of the ODM-style datasets. I have not used these datasets much for the last 5 years so my memory may be wrong but I believe they contain queries?

vagarwal77 commented 2 years ago

As per support, ClinicalAuditRecords can be used to get the list of open queries on a CRF.

isparks commented 2 years ago

Glad you got an answer!