The VIVO PHP Person Data Library, also known as getVIVOPersonData.php, is a PHP library for pulling in VIVO person data and outputting it in a format that can be formatted using CSS.

Purpose

The purpose of this library is to allow for VIVO data to be used in other web-based applications.

Current Status

Current version is 2.03, and the code is available in the SVN. and from the Sourceforge download

Example Site

Dr. Conlon's VIVO profile, pulled using the library.

Another Example

The UF Clinical and Translational Science Institute web site uses the VIVO PHP Person Data Library to create rosters for various groups. See [and http://www.ctsi.ufl.edu/people/ctsi-home UF CTSI Home] for an example of a page generated almost using the person data library.

Readme File

Filename: getVIVOPersonData.php
Purpose: Returns data from a person entity in VIVO that can then be formatted to fit a page style.
Version: 2.0

Usage:

This one is pretty straightforward. Include the file and pass it a string however you want. The string should be the link to a VIVO person entity.
For example, if the URI you wish to grab is "https://vivo.ufl.edu/display/n25562", then you would pass a string of "https://vivo.ufl.edu/display/n25562".

Example code follows:


<?php 
include 'getVIVOPersonData.php';
//Example of getting the data from the URL, such as http://www.yoursite.com/foo.php?search=n25562
getVIVOPersonData($search = $_GET["search"]);
//Example of getting the data from another page, say from a text field.
getVIVOPersonData($search = $_POST["searchValue"]);
//And you can just pass it a string of the URI.
getVIVOPersonData("https://vivo.ufl.edu/display/n25562");
?>

Example Output:

<div id="vivoPerson">
<img class="vivoImage" src="http://vivo.ufl.edu/file/n34850/_main_image_491-NUCATS-STS-042310.jpg" alt="Conlon, Mike">
<p class="vivoName">Conlon, Mike</p>
<p class="vivoTitle">Associate Director and Chief Operating Officer</p>
<p class="vivoDepartment">Health Outcomes and Policy</p>
<p class="vivoPhone">3522738872</p>
<p class="vivoFax">3522147882</p>
<a class="vivoEmail" href="mailto:mconlon@ufl.edu">mconlon@ufl.edu</a>
<a class="vivoLink" href="https://vivo.ufl.edu/display/n25562">https://vivo.ufl.edu/display/n25562</a>
</div>

Known Issues:

If the VIVO implementation is lagging, this can take a few seconds to complete.
Differences in ontology can cause results to vary.

Changelog

"1.0"

Initial Release

"1.1"

  • Fixed bug where library would crash if the site didn't have an image
  • Changed to fail silently.
  • Now works on all VIVO installations. Call library with getVIVOPersonData("FULL VIVO ADDRESS");, example: getVIVOPersonData("http://vivo.cornell.edu/individual/vivo/individual22972");
  • Now checks for HR Job Titles in position entries and uses that before the rdfs:label for the position.
  • Several bits of handling to allow checking other sites.
  • Added changelog.txt

    "1.2"

  • Changed ordering of echoed elements
  • Changed formatting of output

    "1.3"

    Added Department Name to output.

    "1.4"

  • Fixed bugs where some sites weren't returning images
  • Fixed bug where some sites weren't returning names
  • Fixed bug where empty div tags were being returned.

    "2.0"

  • Rewrote entire library to use ARC2 instead of SimpleXML
  • This fixed several bugs related to data ambiguity
  • Functionality essentially unchanged