Error when adding new patient

qlcorp wrote on Wednesday, November 11, 2015:

I’m running v4.2.1-dev and I’m getting the follow error when trying to add a new patient:

ERROR: insert failed: INSERT INTO patient_data SET pid = '1', date = NOW(), `title` = '', `fname` = 'Jane', `mname` = '', `lname` = 'Doe', `pubpid` = '1', `DOB` = '1976-12-31', `sex` = 'Female', `ss` = '', `drivers_license` = '', `status` = '', `genericname1` = '', `genericval1` = '', `genericname2` = '', `genericval2` = '', `street` = '', `city` = '', `state` = '', `postal_code` = '', `country_code` = '', `county` = '', `mothersname` = '', `guardiansname` = '', `contact_relationship` = '', `phone_contact` = '', `phone_home` = '', `phone_biz` = '', `phone_cell` = '', `email` = '', `email_direct` = '', `providerID` = '', `ref_providerID` = '', `pharmacy_id` = '0', `hipaa_notice` = '', `hipaa_voice` = '', `hipaa_message` = '', `hipaa_mail` = '', `hipaa_allowsms` = '', `hipaa_allowemail` = '', `allow_imm_reg_use` = '', `allow_imm_info_share` = '', `allow_health_info_ex` = '', `allow_patient_portal` = '', `care_team` = '', `cmsportal_login` = '', `occupation` = '', `industry` = '', `language` = '', `ethnicity` = '', `race` = '', `financial_review` = '', `family_size` = '', `monthly_income` = '', `homeless` = '', `interpretter` = '', `migrantseasonal` = '', `referral_source` = '', `vfc` = '', `religion` = '', `deceased_date` = '', `deceased_reason` = ''

Error: Incorrect integer value: '' for column 'providerID' at row 1

What am I doing wrong?

fsgl wrote on Wednesday, November 11, 2015:

Try changing column to 0 (zero).

If provider has not been designated in Choices, the default value in providerID would be zero, not blank.

qlcorp wrote on Wednesday, November 11, 2015:

Thank you.

fsgl wrote on Wednesday, November 11, 2015:

Prego (it was my pleasure).

bradymiller wrote on Thursday, November 12, 2015:

Odd to get an error when adding a new patient like that (I am assuming you are adding the new patient via the standard mechanism in OpenEMR). Any customizations? And ensure your mysql is not in strict mode:
http://www.open-emr.org/wiki/index.php/OpenEMR_4.2.0_Windows_Installation#Required_Software_Installation

ensure when configuring MySQL for OpenEMR, STRICT_MODE must be disabled. This can be done using the MySQL Server Instance Configuration wizard or in the my.cnf file. You can check the setting in an existing MySQL instance by executing SHOW VARIABLES; in the MySQL Command Line Client and checking the value of SQL_MODE. For more details see: http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html)

-brady