Example #1
0
 public function importReferrals($singleRow, $benefiter_id)
 {
     // referrals lookup ids
     $social_referrence_lookup_id = BenefiterReferrals_lookup::where('description', 'LIKE', '%οινων%')->first()->id;
     $medical_referrence_lookup_id = BenefiterReferrals_lookup::where('description', 'LIKE', '%ατρικ%')->first()->id;
     $legal_referrence_lookup_id = BenefiterReferrals_lookup::where('description', 'LIKE', '%ομικ%')->first()->id;
     $educational_referrence_lookup_id = BenefiterReferrals_lookup::where('description', 'LIKE', '%δευση%')->first()->id;
     // if social referral
     if ($this->greekStringConversion->grstrtoupper($singleRow->has_social_reference) == 'ΝΑΙ') {
         BenefiterReferrals::insert($this->selectOnlyReferrals($singleRow->social_reference_actions, $singleRow->social_reference_date, $benefiter_id, $social_referrence_lookup_id));
     }
     // if medical referral
     if ($this->greekStringConversion->grstrtoupper($singleRow->has_medical_reference) == 'ΝΑΙ') {
         BenefiterReferrals::insert($this->selectOnlyReferrals($singleRow->medical_reference_actions, $singleRow->medical_reference_date, $benefiter_id, $medical_referrence_lookup_id));
     }
     // if legal referral
     if ($this->greekStringConversion->grstrtoupper($singleRow->has_legal_reference) == 'ΝΑΙ') {
         BenefiterReferrals::insert($this->selectOnlyReferrals($singleRow->legal_reference_actions, $singleRow->legal_reference_date, $benefiter_id, $legal_referrence_lookup_id));
     }
     // if educational referral
     if ($this->greekStringConversion->grstrtoupper($singleRow->has_educational_reference) == 'ΝΑΙ') {
         BenefiterReferrals::insert($this->selectOnlyReferrals($singleRow->educational_reference_actions, $singleRow->educational_reference_date, $benefiter_id, $educational_referrence_lookup_id));
     }
 }
Example #2
0
 public function get_basic_info_referrals_from_lookup()
 {
     $basic_info_referral = BenefiterReferrals_lookup::get()->all();
     return $basic_info_referral;
 }