The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
API to find group submissions ? - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: API to find group submissions ? (/showthread.php?tid=122) |
API to find group submissions ? - Alexis - Apr 21st, 2009 Hello i'll try to make sense with my poor english writing, i have been using FT1 to make electronic booklets to gather data for a medical study. each ward had a username, was entering its patients, and could find them with a mysql query that looked for that username. they had a list of 10 submissions and could return to the forms for each patient at anytime and either complete it or modify some data. the data was injected in the same table FT used for that particular form. FT was very useful to centralise the data and make queries. as i'm preparing a new study, i wonder if there is a way to use the api to refill forms better than using a mysql query thanks alex RE: API to find group submissions ? - Ben - Apr 22nd, 2009 Hi Alex, Thanks for the post! The API actually doesn't have functions for retrieving the raw submission data yet (but it will!), but you can always require() the /global/library.php file and use the core's ft_get_submission_info function - that does what you need. You can find it in /global/code/submissions.php. But instead, couldn't you do this? (I'm not 100% sure if it fits your needs): 1. create client accounts for each of the wards. 2. create a separate View for each ward. Each View would limit the results to only show submissions within that particular ward. (As such, you will need a "ward" field to be added to your forms in case they don't already have it). 3. Assign each ward to a particular View. With this in place, they can then log in and update their patient information without seeing any other patients in any other ward. Would that work, do you think? - Ben RE: API to find group submissions ? - Alexis - Apr 23rd, 2009 thanks for your reply this wouldn't fit my needs as doctors are very tech unwise and need a very explicit interface to see their data i will look into the libraries, but the main part of my question was : is there a way to select some submissions according to different criterion, sort them and then access to the data. maybe it is easier to do it as i used to by using a mysql query RE: API to find group submissions ? - Ben - Apr 23rd, 2009 Heya, Yeah, it sounds like perhaps a custom query might be the best thing for now... Sorry I couldn't be more help. - Ben RE: API to find group submissions ? - Alexis - Apr 23rd, 2009 having formtools developed and released to us seems like more than enough help to me. it's a great tool thank you! (Apr 23rd, 2009, 9:57 PM)Ben Wrote: Sorry I couldn't be more help. |