1

Topic: Recorder Names

Hi

This isn't so much a technical question, more a recording question, but as it does relate directly to fields in Indicia thought I'd ask here.

There are 3 (or 4) fields in occurrences and samples which I'm unclear about
determiner_id (occurrence)
recorder_names (sample)
verified_by (occurrence)

I've checked the description in pgAdmin so I have a rough idea what these fields are for but just to be sure the correct info is being fired off to the correct place, bear with me. Is it a case of the recorder name (as in the person who saw the thing and scribbled it down) is always entered into the determiner_id even if they can only determine that it's a butterfly and the verified_by is the expert name who pins (no pin pun intended) this down to species. And the recorder_names are just a bunch of hangers on who happened to be around at the time?

created_by_id - this is almost a separate question, but is the correct way to populate this simply by doing a call to authenticate_user and setting this to the result? (and presumably this goes for updated_by_id as well)?

Ta

Iain

2

Re: Recorder Names

Hi Iain,

I will begin with a little clarification and then I will kick up some mud.

To answer your questions
- the determiner is not always the recorder (although that is often the case).
- the verifier is rarely the person who does the species identification.
- the recorder_names could all be active contributors of occurrence records.
- the created_by_id (or the updated_by_id) is the warehouse user id of the user entering the data.

Eg. Janet and John go out to do a butterfly survey. Janet and John both contribute to the list of species they see. Janet is the more knowledgeable and identifies most of the species except for one she does not know. They take a photo and ask their friend Tom what it is. Tom is able to identify it for them as a Clouded Yellow. Since Janet and John don't have a computer, another friend, Dick, enters the data online for them. Janet and John were recording for a survey by Butterfly Conservation and their record is now reviewed by Harry, the county recorder. Automated checks done by the warehouse confirm all the records are within know flight period and distribution and are of easily identified species except for the Clouded Yellow. Harry is happy to accept all of these common species and add them to the verified dataset that will go to the NBN Gateway. The Clouded Yellow is unusual so Harry talks to Tom about it and is satisfied that this is indeed correct so accepts that too.

Janet and John are both recorders.
Janet is the determiner for all the occurrences except the Clouded Yellow.
Tom is the determiner of the Clouded Yellow.
Dick is marked as having been the creator of the record in the database.
Harry is the verifier.

authenticate_user does return the warehouse user id in the circumstance where the warehouse is being used to authenticate login of users to a client website. Most Indicia users have Drupal as the framework for their client websites and in their case, Drupal manages user authentication and the EasyLogin module, using the user_identifier web service, obtains the user id.

Now to muddy the water.

Indicia does, optionally, support the possibility of a forum of people arriving at a determination, like iSpot does. There is a determinations table which can record the opinions of any number of people about the identification of a particular occurrence.

The comment on the recorder_names field says " Used when the recorders are not listed in the people table." but I do not understand what we are expected to do if the recorders are listed in the people table.

Often the recorder_names field seems too unstructured and sample_attributes are created for first name and last name. When using sample attributes like this, there is a "system function" property that can be set to indiciate the purpose of these fields. That is something I don't have much understanding of.

Often form builders assume that there is only one recorder and that they are doing their own data entry. In this case, rather than storing a recorder name in the sample, the created_by_id may be considered sufficient.

Jim Bacon.

3

Re: Recorder Names

Many thanks Jim

It was the bit about " Used when the recorders are not listed in the people table."  which threw me, as I then assumed the solution was to shoehorn the recorder into the determiner_id which left me with the problem of what happens if the thing isn't determined by the recorder. I'm now a good bit clearer about how the roles fit into the fields and I suspect I might think about this recorder_names thing at some point, but not tonight...

Excellent example, by the way

Many thanks

Iain

4 (edited by Jim Bacon 05-03-2013 11:37:07)

Re: Recorder Names

Another bit of muddiness I remembered.

Since neither Tom nor Janet have ever done anything that has added their details to the warehouse tables they have no id which could go in the determiner_id field. The obvious workaround is to create a text occurrence attribute in which to write the determiner name.

Since Dick sometimes write Thomas rather than Tom, this field is not very useful as a filter in database queries but it provides some help to Harry when he is verifying.

Jim Bacon.

5

Re: Recorder Names

Jim Bacon wrote:

authenticate_user does return the warehouse user id in the circumstance where the warehouse is being used to authenticate login of users to a client website. Most Indicia users have Drupal as the framework for their client websites and in their case, Drupal manages user authentication and the EasyLogin module, using the user_identifier web service, obtains the user id.

Am I correct in thinking that the user_identifier web service identifies users through certain fields (email for example). If so, then how do the users actually register on the warehouse in the first place - how is a new user setup on the warehouse so that there is a user to identify, if you see what I mean...

Ta

Iain

6

Re: Recorder Names

Hi Iain

Have you found the  User Identifiers Web Service documentation? Does it answer your question?

Jim.

7

Re: Recorder Names

Hi Jim

That sort of answers it a wee bit, but I was wondering how the users are actually created on the warehouse. I suspect it's a call to the save service using the people table (don't have the exact details to hand at the minute so that's a bit of a guess) or is there a "register_user" type method floating about somewhere that I just haven't found?

Ta

Iain

8

Re: Recorder Names

Hi Iain,

Haven't a clue!
However I might know where to take a look.
Try the warehouse in modules/indicia_svc_security/controllers/services/user_identifier.php.
Lo and behold we find the private createUser function.
The one public function that is exposed is get_user_id and use of this is documented under Security Services API although an additional, shares_to_prevent, parameter is described in the code.


Jim.

9 (edited by iain 08-03-2013 23:12:35)

Re: Recorder Names

Hi Jim

Well, I discovered a Person_Model which basically exposes the people table through ORM as far as I understand it (never tackled PHP before) and this allows me to save using the info entered through a registration form. I'm getting there (wherever that is...)

Ta

Iain

EDIT Actually, a call to get_user_id does the trick

10

Re: Recorder Names

Hi Iain,

If you are developing code for the warehouse itself, rather than just calling the exisiting web services from a client site, then I should make sure you have been pointed at the documentation for Kohana 2. This is the PHP framework about which the warehouse has been built. PHP is just another language which does all the same things as any other language but Kohana structures the code in an MVC manner and a read of the docs greatly assists comprehension of how it works. Object Relational Mapping (ORM) is all about Kohana and nothing about PHP.

Glad you're getting wherever.

Jim Bacon