bugGNU Health - Bugs: bug #37474, Demo database: ERROR Wrong SQL:...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #37474: Demo database: ERROR Wrong SQL: INSERT INTO "gnuhealth_patient"

Submitter:  Ronald Munjoma <munro>
Submitted:  Sun 30 Sep 2012 10:41:55 PM UTC
   
 
Category:  Demo environment Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  smarro
Open/Closed:  Closed Release:  None
Module:  demo Component:  None

Mon 01 Oct 2012 10:39:31 PM UTC, comment #1: 

Fixed in changeset 363:23bef382a8aa

Sebastián Marró <smarro>
Sun 30 Sep 2012 10:41:55 PM UTC, original submission:  

Hi Sebastián,

Running the demo script on a Debian 6.0.3 (64 bit), Python 2.6 and Postgresql 8.4 throws the below error.

We will be very grateful if you may look into it?

Note: Family and Family Members information is added to the database, its only the patients records that are missing.

2012-09-29 20:32:03,902 ERROR Wrong SQL: INSERT INTO "gnuhealth_patient" ("second_hand_smoker","fertile","prison_current","domestic_violence","hostile_area","currently_pregnant","sexual_abuse","sewers","sexual_partners","occupation","eats_alone","electricity","housing","gpa","colposcopy","menopausal","soft_drinks","single_parent","home_safety","coffee","gas","sexual_practices","smoking","television","trash","name","marital_status","relative_in_prison","breast_self_examination","deceased","works_at_home","ex_drug_addict","ses","sexual_preferences","telephone","sex","car_revision","education","car_child_safety","primary_care_doctor","helmet","drug_addiction","alcohol","ex_alcoholic","traffic_laws","pap_test","drug_iv","motorcycle_rider","internet","critical_info","mammography","exercise","sex_with_prostitutes","ex_smoker","diet","water","prison_past","car_seat_belt","prostitute","working_children","dob","drug_usage","sleep_during_daytime","teenage_pregnancy","school_withdrawal","salt","identification_code", create_uid, create_date) VALUES ( false, false, false, false, false, false, false, 1, E'm', 584, false, 1, E'2', E'G1P1A0', false, false, false, false, false, false, 1, E's', false, 1, false, 5, E'm', false, false, false, false, false, E'2', E'h', 1, E'f', false, E'5', false, 1, false, false, false, false, false, false, false, false, false, E'β-lactam hypersensitivity', false, false, false, true, false, 1, false, false, false, false, '1985-10-04'::date, false, false, false, false, false, E'PAC001', 1, '2012-09-29T20:32:03.899768'::timestamp) RETURNING id
Traceback (most recent call last):
  File "health_demo_server.py", line 276, in <module>
    LoadBetzFamilyInfo()
  File "health_demo_server.py", line 131, in LoadBetzFamilyInfo
    patient.save()
  File "/home/medicare/.local/lib/python2.6/site-packages/proteus/__init__.py", line 604, in save
    self.__id = self._proxy.create(values, context)
  File "/home/medicare/.local/lib/python2.6/site-packages/proteus/config.py", line 121, in _call_
    res = getattr(self._object, self._name)(*args)
  File "/home/medicare/.local/lib/python2.6/site-packages/trytond/modules/health/health.py", line 927, in create
    return super(PatientData, self).create(values)
  File "/home/medicare/.local/lib/python2.6/site-packages/trytond/model/modelsql.py", line 345, in create
    tuple(upd2))
  File "/home/medicare/.local/lib/python2.6/site-packages/trytond/backend/postgresql/database.py", line 316, in execute
    res = self.cursor.execute(sql, params)
psycopg2.ProgrammingError: column "sewers" is of type boolean but expression is of type integer
LINE 1: ... false, false, false, false, false, false, false, 1, E'm', 5...
                                                             ^
HINT:  You will need to rewrite or cast the expression.


Ronald Munjoma <munro>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by smarro (Updated the item)
  • -email is unavailable- added by munro (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-01 smarro StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2012-10-01 smarro StatusNone Confirmed
        Assigned toNone smarro

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code