OEModule\PASAPI\resources\PatientId::getModel PHP Method

getModel() public method

Function to resolve the referenced Patient model for this id resource.
public getModel ( ) : Patient
return Patient
    public function getModel()
    {
        foreach ($this->id_tags as $attr) {
            if (property_exists($this, $attr)) {
                return $this->{'resolveModel' . $attr}();
            }
        }
        // should never reach here assuming the resource has been validated
        throw new \Exception('No appropriate id tag provided.');
    }