This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| App::uses('AppModel', 'Model'); | |
| /** | |
| * Billing Model | |
| * | |
| * @property BillingsItem $BillingsItem | |
| */ | |
| class Billing extends AppModel { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo $this->Form->create('Billing'); | |
| echo $this->Form->input('Billing.0.healthcare_provider'); | |
| echo $this->Form->input('Billing.0.patient_birthdate'); | |
| echo $this->Form->input('Billing.0.payment_program'); | |
| echo $this->Form->input('Billing.0.payee'); | |
| echo $this->Form->input('Billing.0.BillingsItem.0.service_date'); | |
| echo $this->Form->input('Billing.0.BillingsItem.0.service_code'); | |
| echo $this->Form->input('Billing.0.BillingsItem.1.service_date'); | |
| echo $this->Form->input('Billing.0.BillingsItem.1.service_code'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array( | |
| (int) 1 => array( | |
| 'healthcare_provider' => '010800', | |
| (int) 1 => array( | |
| 'patient_birthdate' => '19550807', | |
| 'payment_program' => 'HCP', | |
| 'payee' => 'P', | |
| 'referring' => '', | |
| 'BillingsItems' => array( | |
| (int) 0 => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function import ($filename) { | |
| // Set the filename to read from | |
| $filename = $filename; | |
| // Open the file | |
| if (!$file = fopen($filename, 'r')) { | |
| return false; | |
| } | |
| // Start parsing for health encounters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function import ($filename) { | |
| App::uses('File', 'Utility'); | |
| // Set the filename to read from | |
| $filename = TMP . 'uploads' . DS . 'Billing' . DS . $filename; | |
| echo $filename; | |
| // Open the file | |
| $file = new File($filename, FALSE); | |
| $file->open(); | |
| // Grab the contents |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function pdfUpdate() { | |
| $this->loadModel('Calendar'); | |
| $calendars = $this->Calendar->find('list',array( | |
| 'id', | |
| 'start_date')); | |
| foreach ($calendars as $id => $start_date) { | |
| if (!$this->Calendar->needsUpdate($id)) { | |
| $notUpdated[] = $id; | |
| } | |
| else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function lastUpdated($id, Shift $shift) { | |
| App::uses('Shift', 'Model'); | |
| $this->Shift = $shift; | |
| $calendar = $this->findById($id, array( | |
| 'start_date', 'end_date')); | |
| return $this->Shift->find('first', array( | |
| 'fields' => array('Shift.updated'), | |
| 'conditions' => array( | |
| 'Shift.date >=' => $calendar['Calendar']['start_date'], | |
| 'Shift.date <=' => $calendar['Calendar']['end_date'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> | |
| Kitab Al-Shifa: Trades </title> | |
| <link rel="stylesheet" type="text/css" href="/kitab/css/cake.generic.css" /></head> | |
| <body> | |
| <div id="container"> | |
| <div id="content"> | |
| <form action="/kitab/trades/add" id="TradeAddForm" method="post" accept-charset="utf-8"><div style="display:none;"><input type="hidden" name="_method" value="POST"/></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $post = $this->Post->find('first', array('conditions'=> array('Post.id'=>$id))); | |
| $this->set('page_title', 'BLOG :: ' .$post['Post']['title']); | |
| $this->set('post', $post); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function add() { | |
| debug($this->request->data); | |
| if ($this->Trade->save($this->request->data)) { | |
| echo "VALID LOGIC"; | |
| debug($this->Trade->validates()); | |
| debug($this->request->data); | |
| } else { | |
| // didn't validate logic | |
| debug($this->Trade->validationErrors); | |
| } |