NAME
ws-getShortestPath
SYNOPSIS
Basic Usuage
perl ws-getShortestPath.pl -verbose -sources SNOMEDCT,MSH --rels PAR,CHD --config configfilename
--verbose: Sets verbose flag to true and thus displays all the authentication information for the user.
-sources : UMLS sources can be specified by providing list of sources seperated by comma. These sources will be used to query and retrieve the information.
-rels : UMLS relations can be specified by providing list of relations seperated by comma. These relations will be used to query and retrieve the information.
-config : Instead of providing sources and relations on command line, they can be specified using a configuration file, which can be provided with this option. It takes complete path and name of the file Follwing is a sample output
- Enter username to connect to UMLSKS:mchoudhari
- Enter password:
- Enter first query CUI:C0229962
- Enter second query CUI:C1623497
- UMLS Source(s) used: SNOMED-CT
- UMLS Relation(s) used: PAR/CHD
- Source is : C0229962, Destination is: C1623497
- path is->Body part (C0229962)->Body Regions (C0005898)->Anatomic structures (C0700276)->Physical anatomical entity (C0506706)->Body structure (C1268086)->SNOMED CT (C1623497) C1879289 C1616556
-
C0015392 C0015392 =item Enter first query CUI:stop
DESCRIPTION
This program authenticates user by asking for valid username and password to connect to UMLSKS. Once the user is authenticated program takes two terms from the user and finds the shortest path (semantic distance) between those two concepts using the heirarchical structure of the UMLSKS Metathesaurus database. The program queries SNOMED-CT database with the CUIs user enters and displays the shortest path along with the concepts through which the two inputs are connected. It also displays the UMLS relations and sources used to find the path.
Modules/Packages
This program uses following packages:
- package GetParents
-
sub GetParents::read_object which reads hash reference object passed to this sub and fetches the required parents' information.
sub GetParents::format_object calls appropriate functions like format_homogenous_hash, format_scalar, format_homogenous_array depending on the object reference it is called with. format_homogenous_hash,format_scalar and format_homogenous_array are subroutines which read the objects they are called with and fetch the desired information.
- package ConnectUMLS
-
sub ConnectUMLS::get_pt to get the proxy ticket using a web service.
sub ConnectUMLS::connect_umls to connect to UMLS by sending username and password and getting back a proxy ticket.
- package ValidateCUI
-
sub ValidateCUI::validateCUI to accepts an input and validates it for as valid or invalid CUI.
- package GetUserData
-
sub GetUserData::getUserDetails to get username and password from the user.
- package Query
-
sub Query::runQuery which takes method name, service and other parameters as argument and calls the web service. It also displays the information received from the web service and other error messages.
- package FindPaths
-
sub FindPaths::find_paths which uses a Graph module from CPAN and creates a graph using the concepts and their parent concepts. It finds shortest path between two input concepts and displays the path.
SEE ALSO
ValidateCUI.pm GetUserData.pm Query.pm ConnectUMLS.pm GetParents.pm FindPaths.pm
AUTHORS
Mugdha Choudhari University of Minnesota Duluth <chou0130 at d.umn.edu>
Ted Pedersen, University of Minnesota Duluth <tpederse at d.umn.edu>
COPYRIGHT
Copyright (C) 2010, Mugdha Choudhari, Ted Pedersen
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.