EPSCoR / ERCore

ERcore content management system to assist with NSF EPSCoR reporting
4 stars 7 forks source link

Table C: collaborator department & institution #66

Closed khuffman closed 7 years ago

khuffman commented 7 years ago

@aturling , @iserna I'm working on Table C (again). I agree with the rules listed here: https://github.com/EPSCoR/ERCore/issues/13#issuecomment-93076968 but I have question regarding how the number of institutions is counted in Table C xls:

If person A and B both collaborators(=not participants) from two different departments but within the same institution (non-participating institution) join a Collaboration, should the number of institutions in Table C xls get incremented by 1 or by incremented by 2?

ercore commented 7 years ago

@khuffman I am testing this out now on dev-ercore.nmepscor.net and will let you know what I find.

khuffman commented 7 years ago

@ercore thanks for looking into this! the code in GitHub, increments institution number for my example given above, by 2. So I want to know if this is correct or not. If you can ask your admin people that would be good just to verify.

ercore commented 7 years ago

@khuffman my finding shows that it will increase by 2. The Add Collaborator UI does not show the non-participating institutions that are already in the system, so you are forced to create a new one. And, you cannot tack on multiple collaborators to that one institution.

I will find our from our Admin what the requirement is and get back to you.

Thanks, Isis

khuffman commented 7 years ago

@ercore : Odd ..that on your dev-ercore.nmepscor site when one is adding a new person to a collaboration that you don't get the full list institutions (=both participating and non-participating). I just logged in and saw this for myself...strange. On our site we get the full list (=both participating and non-participating) but our code for that page /er/install/bundles/er_collaborators is not the same as the code in Github. Kevin has changed our code for that page. I will look and see what Kevin added that makes the full list to show up.

aturling commented 7 years ago

Our "add an external collaborator" page shows all institutions in the system, with the participating ones at the top in bold (with the house icon) and the rest that were user-entered below (with the globe icon). I don't remember changing this but it's possible I did at some point.

We also have it in our system that the institution number goes up by 2 for two different departments from the same institution. Looks like it comes from these two lines in pages/collaborations_inc:

$inst_expression = "(CASE WHEN dept.{$collab_dept}_value IS NOT NULL THEN CONCAT(dept.{$collab_dept}_value, ' @ ', inst.title) ELSE inst.title END)"; . . . if ($count){ $query->addExpression("COUNT(DISTINCT $inst_expression)", 'institutions'); }

aturling commented 7 years ago

Ok I see now that all of the institutions are shown because on this page:

/admin/structure/types/manage/er-collaborators/fields/field_er_collab_inst_ref

At the bottom it says

ENTITY SELECTION Mode: Views: Filter by an entity reference view View used to select the entities: er_participating_institutions - Entity Reference

And on our site it says for that view "Database overriding code" so I probably changed it at some point to show all institutions despite the view name.

I think this goes back to this issue: https://github.com/EPSCoR/ERCore/issues/43

khuffman commented 7 years ago

@ercore, @aturling is correct, we have also modified our er_participating_institutions.view file. On your dev-ercore.nmepscor site Edit that view, then in Display: "Entity Reference" under Filter criteria it shows: 3 filters, last one is: Content: Participating (= Participating Institution) But on our site we have only 2 filters: Content: Published (Yes) Content: Type (= Institution) so if you remove the filter Content: Participating (= Participating Institution) you should get the full list of institutions.

khuffman commented 7 years ago

I got answer from our PA wrote, she wrote: "One increment increase per institution for all institutions not considered the lead or partner institution on the award." so that means for my example given above https://github.com/EPSCoR/ERCore/issues/66#issue-190116393 it should add 1 to the institution number (not 2) so the code generating Table C xls is not counting the institutions as our PA expects to.

aturling commented 7 years ago

I talked to Emily about this and she agreed that it should be counting institutions and not departments separately. She still would like the department info to appear on the /reporting/collaborations page though if possible (like list all of the departments that appear for a particular institution but only count that institution once).

Also looking through our data I see not only do we have the situation where something like "Biology Department @ MyUniversity" and "Chemistry Department @ MyUniversity" are double-counted, but we also have things like "Biology Dept @ MyUniversity", "Biology @ MyUniversity", "Department of Biology @ MyUniversity" being considered distinct entries because the department field is a text field and people enter in the department names differently.

khuffman commented 7 years ago

Per @aturling 's comment above https://github.com/EPSCoR/ERCore/issues/66#issuecomment-261357782 I added the changes I have made to collaborations.inc file so far to this new branch: https://github.com/EPSCoR/ERCore/tree/TableC-Collaboration-fix This small fix generates the correct numbers in Table C's xls sheet, but in the html page of Table C, the "department" is no longer shown. For example, before applying this fix: Jane Doe from Dept. of Chemistry @ University of Rhode Island on Marine Expedition 2016 After applying this fix: Jane Doe from University of Rhode Island on Marine Expedition 2016

khuffman commented 7 years ago

Another question to ask your Admin folks: A collaboration got entered into the system, which has 2 collaborators, from two different institution, both "external to the jurisdiction". So this collaboration does not have a person/participant from your local jurisdiction associated with this collaboration. Does your Admin want these two people and two institutions included in Table C xls numbers? Currently the system adds 2 people and 2 institutions to Table C xls. But according to our admin: if a collaboration does not include at least one EPSCoR participant (=a person who has an account on ERCore and is defined as "Participant") it should not be counted in Table C at all. This situation should not happen very often, but we have had collaborations entered in our system that have no "Participants" included (only Collaborators are included), so I wanted to see how your Admin like to handle this situation.

aturling commented 7 years ago

I applied Kia's fix and it's now giving us the correct counts for Table C.

Our admin agrees that the collaboration should not be counted if there is not at least one EPSCoR participant attached to it. We have a few collaborations like this in the system, but it's almost always because the people adding them left themselves off as a collaborator - probably thinking it was implied from the fact that they created the collaboration node, and that they only needed to add the external names.

khuffman commented 7 years ago

@aturling Maybe one simple way to tackle this is to add a check for these types of incorrectly entered collaborations in your "Data Integrity" view? (so similar to the way you check for collaboration that have no collaborators) Then an admin staff can easily see what collaborations have no EPSCoR participants and either alert the person who entered it or delete that collaboration. Another option is to some how to not let the collaboration be saved in the first place if it doesn't have a EPSCoR Participant. I favor this solution.. Anyway, it seems that our admins agree that a collaboration without EPSCoR participant is not a valid collaboration and shouldn't be included in the reporting (Table C)

khuffman commented 7 years ago

@aturling our PA also considers any collaborations with only 1 person not-valid(=needs attention). So I made a little enhancement to your "Data Integrity Check" view, I added a new display that lists any collaboration that has 1 or less people associated with it ( then I made your zero participant display disabled). I uploaded my change to branch TableC-Collaboration-fix , here: https://github.com/EPSCoR/ERCore/blob/TableC-Collaboration-fix/views/data_integrity_check.view

Regarding listing collaborations with no EPSCoR participant, I still have no good solution, I think the best/easiest way is to again modify your "Data Integrity Check", I let you know if I find a good solution.

khuffman commented 7 years ago

@aturling I added a new display to "Data Integrity Check" that now shows a listing of all collaborations that have no "Participant" (only Collaborators). https://github.com/EPSCoR/ERCore/blob/TableC-Collaboration-fix/views/data_integrity_check.view

ercore commented 7 years ago

@khuffman I spoke with Anne J. and she agreed that the participant adding the collaboration is sufficient. As we discussed earlier, it depends on the jurisdiction and how data is entered. We will leave our system, NM, as is. Though, I will bring this up at the next Admin meeting and make everyone aware of the new view you created.

Thank you!