protected function saveShare($fromOrgId, $fromRespId, $toOrgId, $toPatientId)
    {
        $model = $this->getModel();
        try {
            $result = $model->copyToOrg($fromOrgId, $fromRespId, $toOrgId, $toPatientId, $this->keepConsent);
        } catch (\Exception $exc) {
            // Maybe we could do something with the error...
            $this->addMessage($exc->getMessage());
            return 0;
        }

        return $model->getChanged();
    }
protected function saveShare($fromOrgId, $fromRespId, $toOrgId, $toPatientId)
    {
        $model = $this->getModel();
        try {
            $result = $model->copyToOrg($fromOrgId, $fromRespId, $toOrgId, $toPatientId, $this->keepConsent);
        } catch (\Exception $exc) {
            // Maybe we could do something with the error...
            $this->addMessage($exc->getMessage());
            return 0;
        }

        return $model->getChanged();
    }
protected function saveShare ( $ fromOrgId , $ fromRespId , $ toOrgId , $ toPatientId ) { $ model = $ this -> getModel ( ) ; try { $ result = $ model -> copyToOrg ( $ fromOrgId , $ fromRespId , $ toOrgId , $ toPatientId , $ this -> keepConsent ) ; } catch ( \ Exception $ exc ) { // Maybe we could do something with the error... $ this -> addMessage ( $ exc -> getMessage ( ) ) ; return 0 ; } return $ model -> getChanged ( ) ; }
Copy the respondent

@param int $fromOrgId
@param int $fromRespId
@param int $toOrgId
@param string $toPatientId
@return int 1 If saved
Copy the respondent