Skip to content

Commit 4d6c512

Browse files
Merge pull request #454 from jvsoest/include_all_locations
Including all participating locations in ClinicalTrials.gov parser
2 parents 2871972 + ce09d83 commit 4d6c512

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

clinicaltrials/clinicaltrials.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,12 @@ function process_file($entry) {
718718
# location of facility doing the testing
719719
##############################################################
720720
try {
721-
$location = @array_shift($root->xpath('//location'));
722-
if($location){
721+
$locations = $root->xpath('//location');
722+
foreach($locations AS $location) {
723723
$location_uri = parent::getRes().md5($location->asXML());
724-
$name = $this->getString('//facility/name',$location);
725-
$address = @array_shift($location->xpath('//facility/address'));
724+
$facility = $location->facility;
725+
$name = $facility->name[0];
726+
$address = $facility->address;//@array_shift($location->xpath('//facility/address'));
726727
$contact = @array_shift($location->xpath('//contact'));
727728
$backups = @array_shift($location->xpath('//contact_backup'));
728729
$investigators = @array_shift($location->xpath('//investigator'));

0 commit comments

Comments
 (0)