ctsit / save_survey_pdf_to_field

A REDCap external module to save a PDF of a survey to a file upload field
Other
0 stars 10 forks source link

Enhanced functionality to permit saving copies of survey PDFs to multiple destination fields #17

Closed remifrazierucsf closed 4 years ago

remifrazierucsf commented 4 years ago

This correction makes use of the array_keys array function (which returns multiple matches) to replace the array_search function (which returns only the first match). I added a loop around the main flow of the module using the results of the output, and corrected one overloaded variable ($index).

You'll note several sections for code debugging to log to the REDCap event log. A useful integration down the road will be with the emLogger EM, which would provide debug logging without interfering with the main REDCap event log. For now I've just commented out the logging steps.

Resolves #16 .

remifrazierucsf commented 4 years ago

@pbchase tagging you for review, but I'll email directly as well. This PR directly supports a 21CFR11 use case for handling multiple electronic signature events in a consent process, which is a highly sought-after use case right now due to COVID.

(Revised to remove developers no longer in our employment)

remifrazierucsf commented 4 years ago

@senrabc @KevinHanson ^^

remifrazierucsf commented 4 years ago

@jrpence @ChemiKyle @pbchase bumping this.

ChemiKyle commented 4 years ago

@remifrazierucsf This PR is next on the list provided nothing else comes up between my review of the other PR (which is admittedly likely) and being able to get to this one.


Note to self: git diff develop -w

remifrazierucsf commented 4 years ago

Thank you!!


From: Kyle Chesney notifications@github.com Sent: Friday, August 7, 2020 6:32 AM To: ctsit/save_survey_pdf_to_field save_survey_pdf_to_field@noreply.github.com Cc: Frazier, Remi Remi.Frazier@ucsf.edu; Mention mention@noreply.github.com Subject: Re: [ctsit/save_survey_pdf_to_field] Enhanced functionality to permit saving copies of survey PDFs to multiple destination fields (#17)

@remifrazierucsfhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_remifrazierucsf&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=iagHe3_c6uIRhWtKf_pRXvj2rsqG5SHt6Y-tqNV335Q&s=bDw4Ev1gWnUsuzvaQO9aVB_LYBXor-QpVvyQU67sqQU&e= This PR is next on the list provided nothing else comes up between my review of the other PR (which is admittedly likely) and being able to get to this one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ctsit_save-5Fsurvey-5Fpdf-5Fto-5Ffield_pull_17-23issuecomment-2D670518270&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=iagHe3_c6uIRhWtKf_pRXvj2rsqG5SHt6Y-tqNV335Q&s=l-W3TxNuvLUuKb8Uo2q6rncTMBQhrGXebSMRrmCuFak&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AG6JNHE6JCOD4KHJGF7ZLPDR7P653ANCNFSM4PHEAM6Q&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=iagHe3_c6uIRhWtKf_pRXvj2rsqG5SHt6Y-tqNV335Q&s=IOeppfjRbN5CR_zyMclK6xABdTusriB5-EPzBBEIBCs&e=.

ChemiKyle commented 4 years ago

Code appears to work with no unexpected effects other than the potential to step on the toes of the multi-revision feature. @remifrazierucsf I made some changes to make the merge conflict with another open PR more manageable. Could you please allow edits from maintainers so I can push.


Given the screenshot in your issue, I just want to clarify the PDF saved into both fields will be exactly the same.

remifrazierucsf commented 4 years ago

Thanks, Kyle!

I don't think I can make that change on the PR - is it possible you can force it? I don't get that checkbox on either my fork or your repo.


From: Kyle Chesney notifications@github.com Sent: Monday, August 10, 2020 10:32 AM To: ctsit/save_survey_pdf_to_field save_survey_pdf_to_field@noreply.github.com Cc: Frazier, Remi Remi.Frazier@ucsf.edu; Mention mention@noreply.github.com Subject: Re: [ctsit/save_survey_pdf_to_field] Enhanced functionality to permit saving copies of survey PDFs to multiple destination fields (#17)

Code appears to work with no unexpected effects other than the potential to step on the toes of the multi-revision featurehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ctsit_save-5Fsurvey-5Fpdf-5Fto-5Ffield-23project-2Dlevel-2Dinstallation&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=XbVW0LdhTHXhovSJUzPDOIheuMNYWHdXVbDsFNi_rLA&s=Tue1JMC7DL0DyH44j3cRy3tuq_PwHY4cxbr_CnXggfk&e=. I made some changes to make the merge conflict with another open PR more manageable. Could you please allow edits from maintainershttps://urldefense.proofpoint.com/v2/url?u=https-3A__docs.github.com_en_github_collaborating-2Dwith-2Dissues-2Dand-2Dpull-2Drequests_allowing-2Dchanges-2Dto-2Da-2Dpull-2Drequest-2Dbranch-2Dcreated-2Dfrom-2Da-2Dfork-23enabling-2Drepository-2Dmaintainer-2Dpermissions-2Don-2Dexisting-2Dpull-2Drequests&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=XbVW0LdhTHXhovSJUzPDOIheuMNYWHdXVbDsFNi_rLA&s=e1v7KzMN7Fw9gP4Koc4IU8XotH9oqtxHosNLBKi8Grk&e= so I can push.


Given the screenshot in your issue, I just want to clarify the PDF saved into both fields will be exactly the same.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ctsit_save-5Fsurvey-5Fpdf-5Fto-5Ffield_pull_17-23issuecomment-2D671488868&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=XbVW0LdhTHXhovSJUzPDOIheuMNYWHdXVbDsFNi_rLA&s=S6bsrfr3Uihbo8FoTsRSosOlwjbL9ZUbpejmedZPfn0&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AG6JNHDBXZ4EAKDHJZ7OHI3SAAVMRANCNFSM4PHEAM6Q&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=XbVW0LdhTHXhovSJUzPDOIheuMNYWHdXVbDsFNi_rLA&s=Qy09JCj9aUR5K72qRnKwlMZUsVv2wAKABCsf40vxtmo&e=.

remifrazierucsf commented 4 years ago

Thank you!


From: jrpence notifications@github.com Sent: Thursday, August 20, 2020 11:26 AM To: ctsit/save_survey_pdf_to_field save_survey_pdf_to_field@noreply.github.com Cc: Frazier, Remi Remi.Frazier@ucsf.edu; Mention mention@noreply.github.com Subject: Re: [ctsit/save_survey_pdf_to_field] Enhanced functionality to permit saving copies of survey PDFs to multiple destination fields (#17)

Merged #17https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ctsit_save-5Fsurvey-5Fpdf-5Fto-5Ffield_pull_17&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=4DV1GA_fpCShAbZrU5Wyr4T4Zs2kNn0NVZmReAg8YOw&s=Qm0as_HdO7yrZUo1J5f3i_0ylBJj88XSI5kk2CtVhYw&e= into develop.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ctsit_save-5Fsurvey-5Fpdf-5Fto-5Ffield_pull_17-23event-2D3676569590&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=4DV1GA_fpCShAbZrU5Wyr4T4Zs2kNn0NVZmReAg8YOw&s=YlXnWDpZ39MchqefTNgBku_xYk4uFb2lNehqBxCHcEc&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AG6JNHDQCGPHRXIGUM3BIDDSBVTDVANCNFSM4PHEAM6Q&d=DwMCaQ&c=iORugZls2LlYyCAZRB3XLg&r=nhhptS87aU7HW5b_42AOXPLxqQESGXQZVph4VAUDYas&m=4DV1GA_fpCShAbZrU5Wyr4T4Zs2kNn0NVZmReAg8YOw&s=JLWzCnBlmMTagCbY2QWMjxNqrsKdbM-hWYBX6mx0oqk&e=.