コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function run(OptionsResolverInterface $resolver)
 {
     $records = array();
     $localRecords = $this->localSource->execute();
     $results = $this->ridicSource->execute();
     foreach ($results as $key => $result) {
         $result = array_change_key_case($result, CASE_LOWER);
         $mrn = $result['hup_mrn'];
         try {
             $result['previous_record'] = $this->provider->getPatientByMRN($mrn);
         } catch (PatientNotFoundException $e) {
             unset($result, $results[$key]);
             continue;
         }
         $result['identifier'] = $result['course_ser'];
         $result['patient'] = $result['hup_mrn'];
         $result['activity_date'] = $result['first_treatment_dt'];
         $result['import_description'] = sprintf('%s ridic dose on the %s.', $result['course_ser'], $result['hup_mrn']);
         $record = $resolver->resolve($result);
         if ($record['patient'] && !in_array($record['course_ser'], $localRecords)) {
             $records[] = $record;
         }
         unset($results[$key]);
     }
     return $records;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function run(OptionsResolverInterface $resolver)
 {
     $records = array();
     $results = $this->pdsSource->execute($this->getCriteria());
     foreach ($results as $key => $result) {
         $result = array_change_key_case($result, CASE_LOWER);
         try {
             if ($record = $this->provider->getPatientByMRN($result['mrn'])) {
                 $result['previous_record'] = $record;
             }
         } catch (PatientNotFoundException $e) {
         }
         $result['identifier'] = $result['mrn'];
         $result['import_description'] = sprintf('%s ordered on %s.', $result['medication'], $result['medication_date']);
         unset($result['medication'], $result['medication_date']);
         $records[] = $resolver->resolve($result);
         unset($results[$key]);
     }
     return $records;
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function run(OptionsResolverInterface $resolver)
 {
     $records = array();
     if (!$this->criteria->passes()) {
         return $records;
     }
     $results = $this->hmtbSource->execute($this->criteria->retrieve());
     $localRecords = $this->localSource->execute();
     foreach ($results as $key => $result) {
         $result = array_change_key_case($result, CASE_LOWER);
         try {
             $result['previous_record'] = $this->provider->getPatientByMRN($result['patient']);
         } catch (PatientNotFoundException $e) {
         }
         $record['identifier'] = $result['hmtb_id'];
         $result['import_description'] = sprintf('%s specimen on the %s.', $result['hmtb_id'], $result['patient']);
         $record = $resolver->resolve($result);
         if (!is_null($record['patient']) && $record['restricted'] == 'No' && !in_array($record['identifier'], $localRecords)) {
             $records[] = $record;
         }
         unset($results[$key]);
     }
     return $records;
 }