Giter Site home page Giter Site logo

Comments (6)

kuoyuchi avatar kuoyuchi commented on August 31, 2024

To elaborate more, I'm less concern about adding the API implementation on backend. Either overloading the existing /resources call with additional optional params or implementing a new /getUserResources sounds fine to me. What we do need is the app to pass either userId or participantId to backend on the call (along with the proper tokens).

from fda-mystudies.

SR-btc avatar SR-btc commented on August 31, 2024

@kuoyuchi

  1. Do these resources need to be fetched from the resources set that is configured on the WCP ? If so, that would not be possible because no Participant/User Info is or should be stored on the WCP. Also WCP APIs do not validate mobile app participants/users in any way.
  2. We dont think we can overload the existing /resources call with optional params for the same reason
  3. If these resources are elsewhere, would they be mapped to Participant IDs or User IDs already?
  4. As of today, User ID calls go to Participant Datastore only and Participant ID calls go to either Participant Datastore, Cloud Storage or Response Datastore. So we would recommend that we use one of these to store the resources - and you'd probably want to map them to Participant ID only and not the User ID because you are probably doing the mapping based on some response or other data-point related to the Participant.
  5. if we could get Resource response data to this new call in the same format that we do today, we can conjoin that list of resources with the WCP list, and display it in the app. Assuming we agree on an order (e.g. all non WCP resources followed by all WCP ones)
  6. Limitations with such non -WCP resources: We cant have New Resource Push Notification that typically come from the WCP for these kind of resources. And also, any data validations we do in the WCP will not be covered.

Please let us know your thoughts on the above points so we can confirm a timeframe to make this change.

from fda-mystudies.

SR-btc avatar SR-btc commented on August 31, 2024

I also meant to mention, if we need to do more than a short-term workaround and support this as a platform feature, we'd need to know the use-cases for which types of participant data points are likely to be used as a basis to map resources to participants. Example: if it is a response to text choice type of questions.

We would accordingly then add functionality to the WCP to be able to mark questions whose responses must be used for tailored resource delivery to participants. And in the Resources section of the WCP, we would provide the ability to map resources to responses of such questions. That way a participant who answers X to a certain text choice question, for example, would be delivered a certain resource meant to go with X. So we would be able to achieve tailored participant-specific resource delivery in that way without using Participant ID for WCP APIs.

This kind of functionality is of course a full-fledged feature by itself, requiring concerted effort and time of its own for design, development and testing, and so not an ideal target for a short-term
solution.

from fda-mystudies.

kuoyuchi avatar kuoyuchi commented on August 31, 2024

Thanks for the info, @SR-btc . To clarify on some points:

  • We don't need those resources to be configurable on WCP. We are thinking of storing something like <StudyId>-<InstitutionId>.pdf in a Cloud Storage bucket and implement a standalone service to access that.
  • These data doesn't need to be stored on WCP and we can take care of the backend implementation for this.

We are thinking of this design:

  • FE changes /StudyMetaData/resources to /StudyMetaData/getUserResources and add (userId,accessToken,clientToken) to header for this call.
  • BE ingress controller routes /StudyMetaData/getUserResources to a new InstitutionInfo server. Other /StudyMetaData/* calls remain unchanged.
  • The new InstitutionInfo server serves /StudyMetaData/getUserResources by:
    *** Validate (userId,accessToken,clientToken) by calling /AuthServer/tokenAuthentication.
    *** If validation succeeds, lookup institutionId for this user (from a separate database that we introduce).
    *** If institutionId is found, try to serve <StudyId>-<InstitutionId>.pdf from Cloud Storage.
    *** Otherwise, fallback to calling /StudyMetaData/resources from InstitutionInfo server and return the result to app.

Mainly want to see if this makes sense on a high level. Thanks!

from fda-mystudies.

SR-btc avatar SR-btc commented on August 31, 2024

Just posting as FYI -we have a mail thread running on this.

from fda-mystudies.

zohrehj avatar zohrehj commented on August 31, 2024

closing this as we are not currently planning to implement this in study builder

from fda-mystudies.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.