Welcome, Guest! Log In | Create Account

Ticket #5 (closed defect: fixed)

Opened 8 months ago

Last modified 3 weeks ago

To correct the admission view to show just submited info.

Reported by: lin_xd Owned by:
Priority: major Milestone: 2.6
Component: Department Administration Version: 2.6
Keywords: Cc: coolmanlg

Description

After admit as a patient ,the page can't display the inputed info.
as the att.

Attachments

Admission (43.4 KB) - added by lin_xd 8 months ago.
Admission.png (43.4 KB) - added by lin_xd 8 months ago.

Change History

Changed 8 months ago by lin_xd

Changed 8 months ago by lin_xd

Changed 6 months ago by coolmanlg

  • cc coolmanlg added
  • status changed from new to closed
  • resolution set to fixed

For some reasons, the $encounter_nr is sent to header("Location: aufnahme_daten_zeigen.php".URL_REDIRECT_APPEND."&encounter_nr=$encounter_nr&origin=admit&target=entry&newdata=$newdata"); as zero (0). This prevents the admitted patient to be shown.

We found out that $encounter_nr=$db->Insert_ID();returns 0! We still don't know why but we found a work around using the following code

$encounter_nr=$encounter_obj->buffer_arrayencounter_nr?; this will fix the problem.

Changed 6 months ago by coolmanlg

the page to make the changes is aufnahme.php around line 266.

  comment out $encounter_nr=$db->Insert_ID(); and replace with
  $encounter_nr=$encounter_obj->buffer_array['encounter_nr'];

Changed 5 months ago by mizuko

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 5 months ago by mizuko

file aufnahme.php does not exist.
which is the file you are submitting the patch for ?

Changed 3 weeks ago by mizuko

copy pasting from mysql's manual...

mysql> INSERT INTO t VALUES
    -> (NULL, 'Mary'), (NULL, 'Jane'), (NULL, 'Lisa');
Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM t;
+----+------+
| id | name |
+----+------+
|  1 | Bob  |
|  2 | Mary |
|  3 | Jane |
|  4 | Lisa |
+----+------+
4 rows in set (0.01 sec)

mysql> SELECT LAST_INSERT_ID();
+------------------+
| LAST_INSERT_ID() |
+------------------+
|               ''' 2''' |
+------------------+
1 row in set (0.00 sec)

as in : http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id last_inser_id()
so it seems a mysql error..

Changed 3 weeks ago by mizuko

  • status changed from reopened to closed
  • resolution set to fixed

see [6274] - thanks to lin_xd

Note: See TracTickets for help on using tickets.