Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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

No Format

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>
&lt;a<a class="vivoEmail" href="mailto:mconlon@ufl.edu"&gt;mconlon@ufl>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.

...