OEModule\PASAPI\resources\PatientAppointment::validate PHP 메소드

validate() 공개 메소드

As a primary resource (i.e. mapped to external resource) we need to ensure we have an id for tracking the resource in the system.
public validate ( ) : boolean
리턴 boolean
    public function validate()
    {
        if (!$this->id) {
            $this->addError('Resource ID required');
        }
        try {
            $this->resolvePatient();
        } catch (\Exception $e) {
            $this->addError($e->getMessage());
        }
        return parent::validate();
    }