Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.60 KB | None | 0 0
  1. <p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
  2.  
  3. <table align="right" style="width:200px">
  4. <tbody>
  5. <tr>
  6. <td>&nbsp;Dr M Takla</td>
  7. </tr>
  8. <tr>
  9. <td>&nbsp;621 Boronia Rd Wantirna South</td>
  10. </tr>
  11. <tr>
  12. <td>&nbsp;VIC 3152</td>
  13. </tr>
  14. <tr>
  15. <td>&nbsp;Ph 97380009 Fax</td>
  16. </tr>
  17. </tbody>
  18. </table>
  19. <p>&nbsp;</p>
  20. <p>&nbsp;</p>
  21. <p>&nbsp;</p>
  22. <p>&nbsp;</p>
  23. <p>&nbsp;</p>
  24. <p>Dear Dr M Takla,,</p>
  25. <p><strong>Re: Aryan Karat (DOB : 9/12/2008)</strong></p>
  26. <p>Thank you for referring Aryan Karat, for assistance with &ldquo;behaviour problems, hyperactivity and phobias&rdquo;.</p>
  27.  
  28. <p>The therapeutic process with Aryan has focussed on reducing anxiety and improving self confidence and self esteem. I have worked on a number of cognitive and behavioural strategies to assist Aryan in managing his worry. His teacher and parents have reported some positive changes, however they continue to be concerned about his constant need for reassurance by adults and anxiety in some situations.</p>
  29.  
  30. <p>Further sessions with Aryan are recommended in order to ensure that the skills and strategies imparted can be reinforced and fully assimilated.</p>
  31. <p>If you wish to discuss this matter further, I may be contacted at 0419 489 333.</p>
  32. <p>Thank you again for your referral, and I look forward to your reply.</p>
  33. <p>Yours Sincerely</p>
  34. <p>&nbsp;</p>
  35. <p>Ms Angela Delle-Vergini,<br />
  36. Psychologist<br />
  37. M.A.P.S (B.A, Grad Dip Psych, M.Psych (Counselling).</p>
  38. <p>&nbsp;</p>
  39. </textarea>
  40. <script>
  41. CKEDITOR.replace( 'editor2' );
  42. CKEDITOR.add
  43. </script>
  44. </center>
  45. <input type="hidden" name="patient_id" value='<?php echo $patient->id; ?>'>
  46. <input type="hidden" name="date" value='<?php echo date('m-d-Y') ?>'>
  47. <div style="margin-bottom: 30px;">
  48. <button class="btn btn-blue">Save & Finalise</button>
  49. </div>
  50. </form>
  51. </div>
  52.  
  53. function addcaseHistory() {
  54. $id = $this->input->post('id');
  55. $patient_id = $this->input->post('patient_id');
  56.  
  57. $date = $this->input->post('date');
  58. $description = $this->input->post('editor1');
  59.  
  60. $this->load->library('form_validation');
  61. $this->form_validation->set_error_delimiters('<div class="error">', '</div>');
  62. $redirect = $this->input->post('redirect');
  63. if (empty($redirect)) {
  64. $redirect = 'patient/medicalHistory?id=' . $patient_id;
  65. }
  66.  
  67. // Validating Name Field
  68. $this->form_validation->set_rules('date', 'Date', 'trim|required|min_length[5]|max_length[100]|xss_clean');
  69. // Validating Password Field
  70.  
  71. $this->form_validation->set_rules('editor1', 'Description', 'trim|required|min_length[5]|max_length[10000]|xss_clean');
  72. if ($this->form_validation->run() == FALSE) {
  73. if (!empty($id)) {
  74. redirect("patient/editMedicalHistory?id=$id");
  75. } else {
  76. $this->load->view('home/dashboard'); // just the header file
  77. $this->load->view('add_new');
  78. $this->load->view('home/footer'); // just the header file
  79. }
  80. } else {
  81.  
  82. if (!empty($patient_id)) {
  83. $patient_details = $this->patient_model->getPatientById($patient_id);
  84. $patient_name = $patient_details->name;
  85. $patient_phone = $patient_details->phone;
  86. $patient_address = $patient_details->address;
  87. } else {
  88. $patient_name = 0;
  89. $patient_phone = 0;
  90. $patient_address = 0;
  91. }
  92. //$error = array('error' => $this->upload->display_errors());
  93. $data = array();
  94. $data = array(
  95. 'patient_id' => $patient_id,
  96. 'date' => $date,
  97. 'description' => $description,
  98. 'patient_name' => $patient_name,
  99. 'patient_phone' => $patient_phone,
  100. 'patient_address' => $patient_address,
  101. );
  102.  
  103. if (empty($id)) { // Adding New department
  104. $this->patient_model->insertMedicalHistory($data);
  105. $this->session->set_flashdata('feedback', 'Added');
  106. } else { // Updating department
  107. $this->patient_model->updateMedicalHistory($id, $data);
  108. $this->session->set_flashdata('feedback', 'Updated');
  109. }
  110. // Loading View
  111. $data['settings'] = $this->settings_model->getSettings();
  112. $this->load->view('home/dashboard2',$data); // just the header file
  113. $this->load->view('medical_history', $data);
  114. $this->load->view('home/footer'); // just the footer file
  115. }
  116. }
  117.  
  118. public function pdfdetails()
  119. {
  120. $id = $this->input->get('id');
  121.  
  122.  
  123. $html_content .= $this->patient_model->getMedicalHistoryByPatientId2($id);
  124.  
  125.  
  126. $this->pdf->loadHtml($html_content);
  127. $this->pdf->render();
  128. $this->pdf->stream("".$id.".pdf", array("Attachment"=>0));
  129. }
  130.  
  131. function getMedicalHistoryByPatientId2($id)
  132. {
  133. $this->db->where('id', $id);
  134. $data = $this->db->get('medical_history');
  135.  
  136. foreach($data->result() as $row)
  137. {
  138. $output .= '<p>'."<img src='../uploads/'".$row->img_url."/>".$row->description.'</p>';
  139. }
  140.  
  141. return $output;
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement