示例#1
0
 /**
  * @param $aPatient
  * @param $bPatient
  * @param $pid
  * @param $mrg
  */
 protected function MergeHandler($aPatient, $bPatient, $pid, $mrg)
 {
     if ($aPatient === false) {
         $this->ackStatus = 'AR';
         $this->ackMessage = 'Unable to find primary patient - ' . $pid;
         return;
     } elseif ($bPatient === false) {
         $this->ackStatus = 'AR';
         $this->ackMessage = 'Unable to find merge patient - ' . $mrg;
         return;
     }
     $merge = new Merge();
     $success = $merge->merge($aPatient['pid'], $bPatient['pid']);
     unset($merge);
     if ($success === false) {
         $this->ackStatus = 'AR';
         $this->ackMessage = 'Unable to merge patient ' . $aPatient['pid'] . ' <= ' . $bPatient['pid'];
         unset($aPatient, $bPatient);
         return;
     }
     unset($aPatient, $bPatient);
 }