Hi Muthu, care_test_param contains a nested loop. Here a quick query to show:
select category.name as CategoryName , elements.name from care_test_param category INNER JOIN care_test_param elements ON category.id=elements.group_id ORDER BY category.sort_nr returns: CategoryName name Priority Quick Priority PTT Priority Hb Priority Hk Priority Platelets Priority RBC Priority WBC Priority Calcium Priority Sodium Priority Potassium Priority Blood sugar etc... Robert Am Montag, den 20.09.2010, 15:28 +0530 schrieb Ap.Muthu: > Hi GJ, > > On a fresh install, the following SQL: > > SELECT group_id, COUNT(*) AS records FROM care_test_param GROUP BY > group_id > > yields the summary of 335 records as: > > group_id records > -1 23 > biopsy 9 > blood_sugar 10 > clinical_chem 39 > coagulation 14 > hematology 6 > hepatitis 10 > hormones 22 > infection_serology 47 > liquor 5 > medicines 25 > neonate 7 > prenatal 7 > priority 11 > proteins 15 > rare 7 > rheuma_factor 4 > special_params 18 > stool 4 > thyroid 11 > tissue_antibody 6 > total_urine 13 > tumor_marker 11 > urine 11 > > DB Table: care_test_param > All records having "-1" as the "group_id" have a non-zero "sort_nr". > All other records have "sort_nr" as zero. > Is this some kind of hierarchial (one level) group_id listing where > spaces in the "name" fields (of the group_id = -1 records) are > replaced with "-" and the string made lowercase for filling in as the > group_id for the child entries (having sort_nr = 0) ? > > The said table is referenced in > > modules/nursing/nursing-station-patientdaten-doconsil-chemlabor.php > in a javascript function - selectAllParams(group_id). > Must we drop the group_id field from the primary key for the table > care_test_param now ? > > Must we create a separate care_param_test_group table to contain the > list of top level test params groups (possibly in a later version) ? > > Regards, > Ap.Muthu > > > >> SVN 6764: > >> ======== > > >> The field "group_id" is neither any type of key nor unique (it > should not be > >> as well) in the table "care_test_findings_chemlab". > >> > >> The field "group_id" along with the field "nr" (unsigned > auto_increment) in > >> the table "care_test_param" is the primary key. > > > i think just nr is ok for the pk, it's never null, it's unique and > > specifies a row > > >> None of the tables of name like "care_test_*" have any data other > than the > >> table "care_test_param" which has 335 records on install. > > > care_test_param is filled with some most common chem lab test for > ease > > of use > > >> In SVN 6764, why were all "id" entries in the table > "care_test_param" > >> changed to be prefixed with "_" ? > >> What table's field does this field "id" reference? > > > the underscore servers as a token to determine test fields in the > > request form for the > > chem lab > > >> What will the following (in order to sync with the SVN 6764 change) > SQL > >> achieve in Care2x usage: > >> UPDATE care_test_param SET id = CONCAT('_', id) WHERE 1; > > > see above > > >> Moving records 149 and 295 to the succeeding INSERT statements > (table > >> "care_test_param") can be construed to stay within php upload size > >> restrictions or phpmyadmin textarea size restrictions. > > > i didn't have any problem uploading it in my phpmyadmin install, > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ Care2002-developers mailing > list Care2002-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/care2002-developers -- -------------------------------------------- MEROTECH IT Engineering Robert Meggle St.-Mang-Str. 8 87616 Marktoberdorf Germany Tel: +49(0)8342 - 8956729 Fax: +49(0)8342 - 8956730 mailto:meg...@merotech.de ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Care2002-developers mailing list Care2002-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/care2002-developers