コード例 #1
0
 function populate()
 {
     parent::populate();
     $ic = new InsuranceCompany($this->insurance_company_id);
     $this->insurance_company_name = $ic->get_name();
     $ic = null;
 }
コード例 #2
0
 function persist()
 {
     parent::persist();
     if (is_numeric($this->id) and !empty($this->checks)) {
         $sql = "delete FROM form_review_of_systems_checks where foreign_id = '" . $this->id . "'";
         sqlQuery($sql);
         foreach ($this->checks as $check) {
             if (!empty($check)) {
                 $sql = "INSERT INTO form_review_of_systems_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
                 sqlQuery($sql);
                 //echo "$sql<br>";
             }
         }
     }
 }
コード例 #3
0
 /**
  * Constructor sets all Insurance attributes to their default value
  */
 function X12Partner($id = "", $prefix = "")
 {
     parent::ORDataObject();
     $this->id = $id;
     $this->_table = "x12_partners";
     $this->processing_format_array = $this->_load_enum("processing_format", false);
     $this->processing_format = $this->processing_format_array[0];
     //most recent x12 version mandated by HIPAA and CMS
     $this->x12_version = "004010X098A1";
     $this->x12_isa05 = "ZZ";
     $this->x12_isa07 = "ZZ";
     $this->x12_isa14 = "0";
     if ($id != "") {
         $this->populate();
     }
 }
コード例 #4
0
 function persist()
 {
     parent::persist();
 }
コード例 #5
0
 function persist()
 {
     parent::persist();
     $this->address->persist($this->id);
     foreach ($this->phone_numbers as $phone) {
         $phone->persist($this->id);
     }
 }
コード例 #6
0
 function persist($fid = "")
 {
     if (!empty($fid)) {
         $this->foreign_id = $fid;
     }
     parent::persist();
 }
コード例 #7
0
 /**
  * @brief Store the current structure members representing the form into the database.
  */
 function persist()
 {
     /* Run our parent's implementation. */
     parent::persist();
 }
コード例 #8
0
 function persist()
 {
     parent::persist();
     if (is_numeric($this->id) and !empty($this->checks)) {
         $sql = "delete FROM form_hp_tje_checks where foreign_id = '" . $this->id . "'";
         sqlQuery($sql);
         foreach ($this->checks as $check) {
             if (!empty($check)) {
                 $sql = "INSERT INTO form_hp_tje_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
                 sqlQuery($sql);
                 //echo "$sql<br>";
             }
         }
     }
     if (is_numeric($this->id) and !empty($this->history)) {
         $sql = "delete FROM form_hp_tje_history where foreign_id = '" . $this->id . "'";
         sqlQuery($sql);
         foreach ($this->history as $history) {
             if (!empty($history)) {
                 $sql = "INSERT INTO form_hp_tje_history set foreign_id='" . add_escape_custom($this->id) . "'" . ", doctor = '" . add_escape_custom($history['doctor']) . "'" . ", specialty = '" . add_escape_custom($history['specialty']) . "'" . ", tx_rendered = '" . add_escape_custom($history['tx_rendered']) . "'" . ", effectiveness = '" . add_escape_custom($history['effectiveness']) . "'" . ", date = '" . add_escape_custom($history['date']) . "'";
                 sqlQuery($sql);
                 //echo "$sql<br>";
             }
         }
     }
     if (is_numeric($this->id) and !empty($this->previous_accidents)) {
         $sql = "delete FROM form_hp_tje_previous_accidents where foreign_id = '" . $this->id . "'";
         sqlQuery($sql);
         foreach ($this->previous_accidents as $pa) {
             if (!empty($pa)) {
                 $sql = "INSERT INTO form_hp_tje_previous_accidents set foreign_id='" . add_escape_custom($this->id) . "', nature_of_accident = '" . add_escape_custom($pa['nature_of_accident']) . "'" . ", injuries = '" . add_escape_custom($pa['injuries']) . "'" . ", date = '" . add_escape_custom($pa['date']) . "'";
                 sqlQuery($sql);
                 //echo "$sql<br>";
             }
         }
     }
 }
コード例 #9
0
 function ajaxComplete($appointmentId, $nextStationId, $fromStationId)
 {
     $app = ORDataObject::factory('Appointment', (int) $appointmentId);
     if ($app->get('patient_id') > 0) {
         $this->ajaxNextStation((int) $appointmentId, (int) $nextStationId, (int) $fromStationId);
         $personId = $app->get('patient_id');
         $db = Celini::dbInstance();
         $sql = "INSERT into routing_archive select * from routing where person_id = " . (int) $personId;
         $db->execute($sql);
         $sql = "DELETE from routing where person_id = " . (int) $personId;
         $db->execute($sql);
     }
 }
コード例 #10
0
 function populate()
 {
     parent::populate();
 }
コード例 #11
0
 function persist()
 {
     parent::persist();
     if (is_numeric($this->id) and !empty($this->checks)) {
         $sql = "delete FROM form_evaluation_checks where foreign_id = '" . $this->id . "'";
         sqlQuery($sql);
         foreach ($this->checks as $check) {
             if (!empty($check)) {
                 $sql = "INSERT INTO form_evaluation_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
                 sqlQuery($sql);
                 //echo "$sql<br>";
             }
         }
     }
 }