Re: [Care2002-developers] $key issue

2010-09-20 Thread Robert Meggle
Hi Muthu,

Great! 

Robert


Am Sonntag, den 19.09.2010, 15:24 +0530 schrieb Ap.Muthu:
 Hi GJ,
 
 File: installer/versions.php :
 Line 10: $rmax=getrandmax();
 Gives $rand a random number between 0 and 2147483647 on 32 bit installs -
 that is 10 digits max.
 Lines 32 to 34 place a computed default value using:
 ( rand(1,$rmax) . rand(1,$rmax) ) * rand(1,$rmax)
 
 At a maximum, a 10 digit number cocatenated with another 10 digit number and
 then the resulting max 19 digit number (since the max number begins with 2)
 is multiplied with another max of 10 digit number resulting in a 27-29 digit
 number and hence the Scientific notation to fit within the 30 chars of the
 input field as the PHP variable is defaulting to a 4 byte precision integer.
 
 Replacing the last expression with:
 substr((rand(1,$rmax).rand(1,$rmax).rand(1,$rmax).rand(1,$rmax)), 0, 32)
 will ensure a high probability of getting a 32 digit number without
 Scientific Truncation.
 
 This has been committed in SVN 6761.
 
 Regards,
 Ap.Muthu
 
  Hi GJ,
 
  Can the $key* variables be hexadecimal numbers?
 
  Regards,
  Ap.Muthu
 
   Hi Muthu,
 
  it should be 32 bits, but for php it depends heavily on the platform,
  you should chekc *PHP_INT_SIZE* for that.
 
  can you please contact robert to set up the demo ?
  he is currently maintaining the care2x.org server
 
  gj.
 
  On 2010-09-18 7:14.MD, Ap.Muthu wrote:
  Hi GJ,
 
  Thanks for the info.
  What is the size /length restriction of the $key* variables?
  Each install can have random values.
  I am trying to make a single click install of care2x (OpenVZ) to
  demonstrate
  it's usability and help getting feedback from the community.
 
  Regards,
  Ap.Muthu
 
Hi Muthu,
 
 
  On 2010-09-18 6:18.MD, Ap.Muthu wrote:
  Hi Robert,
 
  What is the allowed charset for $key, $key_2level and $key_login in
  /include/core/inc_init_main.php ?
 
  the allowed charset is only numeric, but strangely on trunk i see
  scientific numbering there
 
  The SVN 6753 seemed to change the default Time Zone from
  Africa/Abidjan
  to
  to Europe/Rome and the keys from Scientific numbering to long
  integers.
 
  it depends on the value given during the setup
  check out file inc_init_main.php.dist in the installer dir, the last
  line should be
  $timezone = 'TIMEZONE';
 
  gj.
  There is an acive Care2x clone in Venezuela and their release is
  Synapsis
  v2.3 available at:
  http://forja.softwarelibre.gob.ve/frs/?group_id=31
  Download:
  http://forja.softwarelibre.gob.ve/frs/download.php/143/Sinapsis.tar.gz
  32 MB
 
  Browse their SVN at:
  http://forja.softwarelibre.gob.ve/scm/browser.php?group_id=31
 
  I got the blue_aqua icons/buttons from there.
 
  Thanks for the nursing fix
 
  Regards,
  Ap.Muthu
 
 
 
 --
 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

-- 
--

CARE2X - free Integ Hospital Info System
https://sourceforge.net/projects/care2002/
http://www.care2x.org


--
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


Re: [Care2002-developers] Phantm, SN 6764

2010-09-20 Thread Gjergj Sheldija - AcmeTECH


On 2010-09-20 6:19.PD, Ap.Muthu wrote:
 Hi GJ,

 Phantm - couldn't get it to work on Windows as yet. looks like a pure php
 version with no jar file would be more acceptable. There are quite a few
 code analysers for free in WIndows as well. Software Assurance Metrics And
 Tool Evaluation : http://samate.nist.gov/Main_Page.html
 RATS: https://www.fortify.com/ssa-elements/threat-intelligence/rats.html
i'll take a look at them
 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,


regards
gj
 Regards,
 Ap.Muthu




   i think that this might come useful to us :
 http://lara.epfl.ch/dokuwiki/phantm
 a static analyzer for php..

 gj.


 --
 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

--
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


[Care2002-developers] utf8_unicode_ci?

2010-09-20 Thread Robert Meggle
Hi Muthu,

I just saw that you have switched the encoding from utf8_general_ci to
utf8_unicode_ci. 

I am not sure if that is what we would like to have. Yes.. we might have
e.g. for German language some sorting issues, but more aspects in
Chinese and Japanese (etc) according:
http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html

What do you think?
 Robert

-- 
--

CARE2X - free Integ Hospital Info System
https://sourceforge.net/projects/care2002/
http://www.care2x.org


--
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


[Care2002-developers] care_test_param group_id table

2010-09-20 Thread 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


[Care2002-developers] lang_en_konsil_chemlabor.php - 0 day value

2010-09-20 Thread Ap.Muthu
SVN 6765
===
In the file:
/language/en/lang_en_konsil_chemlabor.php

Line 45:
Should the line:
$LDShortDay[0]='Su';
be an empty string just like it's month counterpart is?

Note: There are many empty strings in the file:
/language/en/lang_en_konsil_baclabor.php
variable: $labTestResukltId[xx]

Regards,
Ap.Muthu



--
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


[Care2002-developers] SVN 6767 DB Changes

2010-09-20 Thread Ap.Muthu
SVN 6767 has brought some changes to the MySQL db structure. The default 
collation is now utf8_general_ci.
For those coming in from prior to SVN 6765, the following SQL statements need 
to be executed:

ALTER TABLE `care_test_param` DROP PRIMARY KEY, ADD PRIMARY KEY (`nr`);
ALTER TABLE `care_test_param` ADD UNIQUE `id` (`id`);
ALTER TABLE `care_test_param` ADD KEY `group_id` (`group_id`);

ALTER DATABASE `care2x` CHARACTER SET utf8 COLLATE utf8_general_ci;

All fields that have collation set for character fields need to be changed. 
This requires a one query for each field in each table to be changed.
These queries can be generated by an SQL statement like:-

SELECT CONCAT('ALTER TABLE `',TABLE_SCHEMA,'`.`',TABLE_NAME,'` CONVERT TO 
CHARACTER SET utf8 COLLATE utf8_general_ci;') FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'care2x' AND ENGINE='INNODB'; 

Please note that the above SQL statement will only generate the queries. We 
then need to execute them individually or thru an SQL file. Alter DBNAME care2x 
in the statements above to suit your installation.

Let us make this a regular feature: When anyone commits to the SQL file, make 
the SQL statements on this list that will bring other installs upto date.

The table care_test_param has the nr=313 and nr = 314 missing. This is for info 
only - the total number of rows in the default install will be 335 but the last 
nr will be 337. This kept me bufuddled for a moment.

Regards,
Ap.Muthu
--
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


Re: [Care2002-developers] SVN 6767 DB Changes

2010-09-20 Thread Robert Meggle
Hi Muthu,

  
 Let us make this a regular feature: When anyone commits to the SQL
 file, make the SQL statements on this list that will bring other
 installs upto date.
  

I agree on it. It makes it more easy.

Thanks
 Robert


-- 
--

CARE2X - free Integ Hospital Info System
https://sourceforge.net/projects/care2002/
http://www.care2x.org


--
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


Re: [Care2002-developers] SVN 6767 DB Changes

2010-09-20 Thread Ap.Muthu
Correction:


This requires a one query for each field in each table to be changed.
This requires one query for each table to be changed - all fields in the table 
that need the collation will be changed.
  SVN 6767 has brought some changes to the MySQL db structure. The default 
collation is now utf8_general_ci.
  For those coming in from prior to SVN 6765, the following SQL statements need 
to be executed:

  ALTER TABLE `care_test_param` DROP PRIMARY KEY, ADD PRIMARY KEY (`nr`);
  ALTER TABLE `care_test_param` ADD UNIQUE `id` (`id`);
  ALTER TABLE `care_test_param` ADD KEY `group_id` (`group_id`);

  ALTER DATABASE `care2x` CHARACTER SET utf8 COLLATE utf8_general_ci;

  All fields that have collation set for character fields need to be changed. 
  This requires a one query for each field in each table to be changed.
  These queries can be generated by an SQL statement like:-

  SELECT CONCAT('ALTER TABLE `',TABLE_SCHEMA,'`.`',TABLE_NAME,'` CONVERT TO 
CHARACTER SET utf8 COLLATE utf8_general_ci;') FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'care2x' AND ENGINE='INNODB'; 

  Please note that the above SQL statement will only generate the queries. We 
then need to execute them individually or thru an SQL file. Alter DBNAME care2x 
in the statements above to suit your installation.

  Let us make this a regular feature: When anyone commits to the SQL file, make 
the SQL statements on this list that will bring other installs upto date.

  The table care_test_param has the nr=313 and nr = 314 missing. This is for 
info only - the total number of rows in the default install will be 335 but the 
last nr will be 337. This kept me bufuddled for a moment.

  Regards,
  Ap.Muthu
--
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


[Care2002-developers] SVN 6770 Notes

2010-09-20 Thread Ap.Muthu
SVN 6770:

1. Please check Line 74 and Lines 80-82 in the file:  
global_conf/inc_remoteservers_conf.php
Where are the imed and iMed folders?

2. Please check the lines 591-592 in the file: modules/hxp/server.php

Lines 589-592:
 # Delete the table record
 $img-Transact(DELETE FROM care_encounter_image WHERE nr=$picnr);
 return $d; // ??
 return new IXR_Error(1100,'_ERROR_FILE_NOCREATE');

should it be:

 # Delete the table record
if ( $img-Transact(DELETE FROM care_encounter_image WHERE nr=$picnr) ) 
return $d; 
else  
return new IXR_Error(1100,'_ERROR_FILE_NOCREATE');


Regards,
Ap.Muthu
--
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


Re: [Care2002-developers] SVN 6770 Notes

2010-09-20 Thread Gjergj Sheldija


On 2010-09-20 4:58.MD, Ap.Muthu wrote:
 SVN 6770:

 1. Please check Line 74 and Lines 80-82 in the file:  
 global_conf/inc_remoteservers_conf.php
 Where are the imed and iMed folders?

fixed in rev 6771, old setting..

gj.
 2. Please check the lines 591-592 in the file: modules/hxp/server.php

 Lines 589-592:
   # Delete the table record
   $img-Transact(DELETE FROM care_encounter_image WHERE nr=$picnr);
   return $d; // ??
   return new IXR_Error(1100,'_ERROR_FILE_NOCREATE');

 should it be:

   # Delete the table record
  if ( $img-Transact(DELETE FROM care_encounter_image WHERE nr=$picnr) 
 ) return $d;
  else
  return new IXR_Error(1100,'_ERROR_FILE_NOCREATE');


 Regards,
 Ap.Muthu



 --
 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

--
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


Re: [Care2002-developers] SVN 6770 Notes

2010-09-20 Thread Gjergj Sheldija - AcmeTECH
  hi Muthu,

those folder are to be set up manually in case the hospital
has set up web cams.
usually the majority of web cams can be setup to upload
images in a remote folder.

gj.

On 2010-09-20 5:30.MD, Ap.Muthu wrote:
 Hi GJ,

 Are you sure the subfolder is care2x ?
 There is no folder care2x in the care2x/trunk branch.
 It should be uploads folder for line 74 and the care2x folder should be
 ommitted for lines 80-82 - isn't it?

 Just committed it so - SVN 6772.

 Regards,
 Ap.Muthu

 1. Please check Line 74 and Lines 80-82 in the file:
 global_conf/inc_remoteservers_conf.php
 Where are the imed and iMed folders?

 fixed in rev 6771, old setting..

 gj.


 --
 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

--
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


Re: [Care2002-developers] SVN 6770 Notes

2010-09-20 Thread Ap.Muthu
Thanks GJ,

Put in a comment so in SVN 6773..
Also commented out debug code Line 591in the file: modules/hxp/server.php

Regards,
Ap.Muthu



  hi Muthu,

 those folder are to be set up manually in case the hospital
 has set up web cams.
 usually the majority of web cams can be setup to upload
 images in a remote folder.

 gj.

 On 2010-09-20 5:30.MD, Ap.Muthu wrote:
 Hi GJ,

 Are you sure the subfolder is care2x ?
 There is no folder care2x in the care2x/trunk branch.
 It should be uploads folder for line 74 and the care2x folder should 
 be
 ommitted for lines 80-82 - isn't it?

 Just committed it so - SVN 6772.

 Regards,
 Ap.Muthu

 1. Please check Line 74 and Lines 80-82 in the file:
 global_conf/inc_remoteservers_conf.php
 Where are the imed and iMed folders?

 fixed in rev 6771, old setting..

 gj.



--
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