Ejemplo n.º 1
0
 public function testSearchByGnc()
 {
     $this->get('Practitioner?identifier=QRST&_profile=' . urlencode(services\Gp::getOeFhirProfile()));
     $this->assertXPathEquals('feed', 'local-name()');
     $this->assertXPathEquals($this->client->getBaseUrl(), 'string(./atom:link[@rel="base"]/@href)');
     $this->assertUrlEquals($this->client->getBaseUrl() . '/Practitioner?identifier=QRST&_profile=' . urlencode(services\Gp::getOeFhirProfile()), $this->xPathEval('string(./atom:link[@rel="self"]/@href)'));
     $this->assertXPathCount(1, './atom:entry');
     $this->assertXPathEquals($this->client->getBaseUrl() . '/Practitioner/gp-2', 'string(./atom:entry/atom:id/text())');
     $this->assertXPathEquals('Practitioner', 'local-name(./atom:entry/atom:content/*)');
 }
Ejemplo n.º 2
0
 public function testSearchCategories()
 {
     $url = 'Practitioner?_profile=' . urlencode(services\Gp::getOeFhirProfile());
     $this->get($url);
     $this->assertXPathEquals('http://openeyes.org.uk/fhir/' . Yii::app()->version->coreVersion . '/profile/Practitioner/Gp', 'string(./atom:entry[1]/atom:category[@scheme="http://hl7.org/fhir/tag/profile"]/@term)');
 }