SurveyGizmo to OpenClinica integration

richard.brookesrichard.brookes Posts: 54
Hi,

We recently had the need to push data collected using SurveyGizmo (http://surveygizmo.com) into OC.

I am happy to share the code we wrote (and thanks to Lindsay as we adapted some of his Web Service code) for the purpose.

btw...SurveyGizmo has some very nice scripting capabilities and advanced survey UI.

You can find it on github;
https://github.com/MobiusMedical/sg-oc

Let me know if you have any questions. Feedback encouraged.

Thanks,

Richard

Comments

  • lindsay.stevenslindsay.stevens Posts: 400 ✭✭✭
    via Email
    Looks great, thanks for sharing this. There's some guys at my work that use
    OC and SG so they'll be pretty happy about this I think.

    I haven't used SG myself, so maybe this is a dumb question. Is the link
    with the SID and event params required to initialise a survey for a
    participant? What's the overall user workflow that you've got going?

    Do you mind if I submit a PR to change your pg_query to pg_query_params?
    The current query by concatenation is a SQL injection waiting to happen.

    I need to write connectors for Limesurvey and ODK XML soon too if anyone
    has one of those lying around or is interested.
  • The parameters in the link is how subject and event details are passed into each survey. This is then used when the data is pushed into OC.

    The workflow is;

    This is being done at a clinic with coordinator supervision...
    1. Coordinator opens a CRF that collects some visit details using a tablet pc.
    2. This CRF has a link to the first survey in an item header.
    3. Coordinator clicks link to open the survey on the tablet. Javascript is used to also close the OC tab at this time.
    4. Coordinator passes the tablet to the subject and they complete the survey. There are actually 5-6 surveys to be completed at each visit. URL redirects are used at the end of one survey to start the next. Custom scripting can be used to change the workflow for different event types.
    5. When the subject reaches the end, they give the tablet back to the coordinator.
    6. Coordinator can then log into OC to verify that all surveys/CRFs are completed and finish with any other visit tasks they have.

    This link approach wouldn't be any good if you wanted to have subjects complete the survey remotely. i.e. just emailing the link would be not be secure, it would be possible to have someone enter their own link parameters...

    SG does have email campaign features, you could access this via the SG api or just upload a list of subjects to SG and have SG send each subject an individual link.
    A "participate" like portal could be created to manage this....


    Yes happy to accept PRs.

    Let me know if your colleagues need any help.

    Cheers

    Richard
  • ShridharShridhar Posts: 1
    Thanks Richard for open sourcing this connector. And to Lindsay for making the web services available.

    It was great working with you Richard.
  • lindsay.stevenslindsay.stevens Posts: 400 ✭✭✭
    via Email
    I've moved the PHP webservice code into its own repo [1] and given in a
    little polish. Csaba Halmagyi had some contributions to add a form status
    setting (OC 3.6+), and a very neat upsert shortcut method in the helper
    classes for creating the import ODM XML.

    [1] https://github.com/lindsay-stevens-kirby/openclinica_webservices_php
Sign In or Register to comment.