Immunization records problem,

andres_paglayan wrote on Tuesday, December 06, 2005:

Is anyone else having the problem of the immunization records creating multiple entries?
if I load dt1, and then dt2 whith a past date, I get multiple dt1 added,
I am puzzling right now,

tekknogenius wrote on Wednesday, December 07, 2005:

I’ll take a look at it.

tekknogenius wrote on Wednesday, December 07, 2005:

I don’t see that happening. Perhaps you can give a little more detail about what is happening and how to duplicate the problem. I’m confused about your statement, what do you mean by “if I load dt1, and then dt2 whith a past date”?

Also, what version of OpenEMR are you using?

andres_paglayan wrote on Wednesday, December 07, 2005:

It’s the most weird thing I’ve seen happening.

It happens with the 2.7.3 and 2.8 (which are the same for the immunizations)

I don’t understand how the query can be run more than once.

i.e. I get an empty shot record.

I enter the DTaP 1 as of today, click save,
then I enter DTaP 2 and change the administered date as two or more months before. click save, and I get DTaP 2 in, plus two more instances of DTaP 1 identical to the DTaP 1 previously entered.

I tested it in two different OpenEMR installations and it does the same, it adds records with new ids.

I even echoed $sql and passed it straight to phpmyadmin, but that is not mimicking the bug, it only happens if called from the immunization script.

btw, I checked in a delete option, but I am still puzzled.

this is how the table looks afterwards,

patient_id administered_date immunization_id manufacturer lot_number administered_by_id education_date note create_date update_date created_by updated_by

7     1     2005-12-07     1                 1     2005-12-07           2005-12-07 10:05:41     2005-12-07 10:05:41     1     1
8     1     2005-12-07     1                 1     2005-12-07           2005-12-07 10:05:53     2005-12-07 10:05:53     1     1
4     1     2005-12-06     6                 1     2005-12-06           2005-12-06 15:53:17     2005-12-06 15:53:17     1     1
6     1     2005-10-11     7                 1     2005-12-06           2005-12-06 15:53:20     2005-12-06 15:53:20     1     1
9     1     2005-12-07     1                 1     2005-12-07           2005-12-07 10:05:55     2005-12-07 10:05:55     1     1
10     1     2005-12-07     1                 1     2005-12-07           2005-12-07 10:05:56     2005-12-07 10:05:56     1     1
11     1     2005-10-11     2                 1     2005-12-07           2005-12-07 10:05:59     2005-12-07 10:05:59     1     1

by the timestamp you can see that first, the two repetitions are added, and then the record from the form is entered.

weird.