public function attachExperience($request, $response) {/*{{{*/ $this->initialize($request, $response); $patient = AskSessionInfo::getBindPatient(); if($patient->isNull()) { $response->setRedirect($response->touchUrl); return parent::DIRECT_OUTPUT; } $paIds = explode(',', $request->getRequest('attachIds', '')); $oldPaIds = AskSessionInfo::getBindAttachmentIds(); $paIds = array_unique(array_filter(array_merge($paIds, $oldPaIds))); if(count($oldPaIds) != count($paIds)) { AskSessionInfo::bindPatientInfos(NodeObj::NODE_DEFINE_ATTACHMENT, $paIds); } $response->attachments = DAL::get()->find('PatientAttachment', $paIds); $response->patient = $patient; }/*}}}*/