We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Retreive event form link

giladhosgiladhos Posts: 11
edited September 2017 in Web Services & Integration
Hi all
I'm looking to retrieve a url to a specific users' event form, where I can follow the url and get to the edit/data-input screen on OC.

I am using the REST API for other functions, can anyone tell me how to do this?
Using OC Version: 3.5 - Changeset: 76b33d904238 2015-04-23 17:55 +0000
Thank you!


  • giladhosgiladhos Posts: 11
    Can't edit so I'm adding this here:

    I'm trying to figure if this is what I need to use(from API doc)-

    Form - Get Form Edit URL

    I can't figure out where to get this:

    ecid String Key that will be used by enketo to cache form information.
  • toskriptoskrip Posts: 271 ✭✭✭

    I don't think that what you are trying to do is possible with OC 3.5. 3.x REST API does not provide a possibility to directly navigate the OC data entry eCRF. The editform resource that you are mentioning above was originally introduced for participate use case and is relying on different form rendering engine (enketo) which is an extra component that is not embedded in OC installation (it need to be installed and configured extra). If I remember correctly 3.5 does not fully support enketo and if than in only very limited way. From OC version 4.x, enketo should be the only rendering engine for eCRFs however this version is still in development.

    hope it helps


  • giladhosgiladhos Posts: 11
    So there is no way to get the url of the event? I did not expect that..
  • toskriptoskrip Posts: 271 ✭✭✭
    It depends on what you want to do exactly (and why do you need it). In 3.x the data entry should be done via OC user interface so there is no need for such functionality. What you can do is get Subject casebook via REST and according to study data and metadata create your own rendering of eCRF and save the changes via SOAP import web service. But all of this is a lot of hassle without any added value....

    The other possibility is to go low level and query the database directly to get IDs of entities in order to construct the URL that will lead you to OC eCRF.

  • giladhosgiladhos Posts: 11
    edited September 2017
    Thank you for that.

    Basically all I'm looking to do is search the DB (completed this part)
    and then offer the user a direct link to where the search term was found (the event form in which it was found).

    I do want the data entry done via OC but, I want to be able to direct a user to the exact form in order to make data entry/editing easier, otherwise they might not use the system at all.
  • toskriptoskrip Posts: 271 ✭✭✭
    If you are already searching DB directly then it should be relatively straightforward to find the IDs necessary for data entry servlet URL. E.g. if we talk about edit eCRF:


    You need to query the primary key from event_crf table that correspond to the event form that you have found and want to open. Once you have this ID, you can construct proper OC URL and redirect user. The user will still need to authenticate, but if you want you can also automatically authenticate user by creating POST request to OC login and redirecting to URL in the same session.

  • giladhosgiladhos Posts: 11
    This is an excellent idea/'hack'!
    thank you toskrip I'll get it done this way!
Sign In or Register to comment.