LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
238 stars 262 forks source link

Add new patient fails for master branch #254

Closed tmccormi closed 7 years ago

tmccormi commented 8 years ago

New install on demo site.. did I miss a fix that needs to be cherry-picked from Dev?

ERROR: insert failed: INSERT INTO patient_data SET pid = '1', date = NOW(), fname = 'Tony', mname = '', lname = 'McTest', sex = 'Male', DOB = '1957-01-15', status = '', street = '11725 SW Drive', city = 'Tigard', state = 'OR', postal_code = '97223', ss = '', drivers_license = '', phone_cell = '555-555-5555', email = 'tony@somewhere.com', billing_note = '', providerID = '', ref_providerID = '', pharmacy_id = '0', phone_home = '', phone_biz = '', contact_relationship = '', phone_contact = '', mothersname = '', guardiansname = '', county = '', country_code = 'USA', referral_source = '', allow_patient_portal = '', email_direct = '', hipaa_notice = '', hipaa_voice = '', hipaa_message = '', hipaa_mail = '', hipaa_allowsms = '', hipaa_allowemail = '', allow_imm_reg_use = '', allow_imm_info_share = '', allow_health_info_ex = '', vfc = '', deceased_date = '', deceased_reason = '', industry = '', occupation = '', language = '', interpretter = '', ethnicity = '', family_size = '', financial_review = '', monthly_income = '', homeless = '', migrantseasonal = '', religion = ''

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

/opt/ehr/library/patient.inc at 1039:sqlInsert /opt/ehr/interface/new/new_comprehensive_save.php at 70:updatePatientData(1,Array,1)

tmccormi commented 8 years ago

this is the ehr.librehealth.io demo site, which is 16.04 LTS as well as new mysql ...

aethelwulffe commented 8 years ago

Yep

On 11/1/2016 8:02 PM, Tony McCormick wrote:

New install on demo site.. did I miss a fix that needs to be cherry-picked from Dev?

ERROR: insert failed: INSERT INTO patient_data SET pid = '1', date = NOW(), |fname| = 'Tony', |mname| = '', |lname| = 'McTest', |sex| = 'Male', |DOB| = '1957-01-15', |status| = '', |street| = '11725 SW Drive', |city| = 'Tigard', |state| = 'OR', |postal_code| = '97223', |ss| = '', |drivers_license| = '', |phone_cell| = '555-555-5555', |email| = 'tony@somewhere.com mailto:tony@somewhere.com', |billing_note| = '', |providerID| = '', |ref_providerID| = '', |pharmacy_id| = '0', |phone_home| = '', |phone_biz| = '', |contact_relationship| = '', |phone_contact| = '', |mothersname| = '', |guardiansname| = '', |county| = '', |country_code| = 'USA', |referral_source| = '', |allow_patient_portal| = '', |email_direct| = '', |hipaa_notice| = '', |hipaa_voice| = '', |hipaa_message| = '', |hipaa_mail| = '', |hipaa_allowsms| = '', |hipaa_allowemail| = '', |allow_imm_reg_use| = '', |allow_imm_info_share| = '', |allow_health_info_ex| = '', |vfc| = '', |deceased_date| = '', |deceased_reason| = '', |industry| = '', |occupation| = '', |language| = '', |interpretter| = '', |ethnicity| = '', |family_size| = '', |financial_review| = '', |monthly_income| = '', |homeless| = '', |migrantseasonal| = '', |religion| = ''

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

/opt/ehr/library/patient.inc at 1039:sqlInsert /opt/ehr/interface/new/new_comprehensive_save.php at 70:updatePatientData(1,Array,1)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-AyYJZBo9bO9wfdmjjzVlURdrt6ks5q59L6gaJpZM4KmuQc.

tmccormi commented 8 years ago

Any idea what commit that might be in the 122 pull requests?

aethelwulffe commented 8 years ago

Not seeing a commit #122

On 11/1/2016 8:12 PM, Tony McCormick wrote:

Any idea what commit that might be in the 122 pull request?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257736958, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-Y4ul_Qgl7ZystTbduBTQdxQagEks5q59VtgaJpZM4KmuQc.

tmccormi commented 8 years ago

There are 122 pull requests, that was not the id number but a plea for help

Tony McCormick

On Nov 1, 2016 5:39 PM, "Art Eaton" notifications@github.com wrote:

Not seeing a commit #122

On 11/1/2016 8:12 PM, Tony McCormick wrote:

Any idea what commit that might be in the 122 pull request?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257736958,

or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-Y4ul_ Qgl7ZystTbduBTQdxQagEks5q59VtgaJpZM4KmuQc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257740873, or mute the thread https://github.com/notifications/unsubscribe-auth/AARci9jnONXYMicpncJZ0S7_gCwxiRCmks5q59ukgaJpZM4KmuQc .

Please be aware that e-mail communication can be intercepted in transmission or misdirected. Please consider communicating any sensitive information by telephone. The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to hipaa-security@mrsb-ltd.com and destroy this message.

aethelwulffe commented 8 years ago

Sorry. Hadn't given it enough time yet. We are wrapping it up here, so I can switch to Libre in a few minutes and hit it.

On 11/1/2016 8:45 PM, Tony McCormick wrote:

There are 122 pull requests, that was not the id number but a plea for help

Tony McCormick

On Nov 1, 2016 5:39 PM, "Art Eaton" notifications@github.com wrote:

Not seeing a commit #122

On 11/1/2016 8:12 PM, Tony McCormick wrote:

Any idea what commit that might be in the 122 pull request?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub

https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257736958,

or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-Y4ul_ Qgl7ZystTbduBTQdxQagEks5q59VtgaJpZM4KmuQc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub

https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257740873, or mute the thread

https://github.com/notifications/unsubscribe-auth/AARci9jnONXYMicpncJZ0S7_gCwxiRCmks5q59ukgaJpZM4KmuQc .

Please be aware that e-mail communication can be intercepted in transmission or misdirected. Please consider communicating any sensitive information by telephone. The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to hipaa-security@mrsb-ltd.com and destroy this message.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257741857, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF_tdkxGpvfar8PGfemDInihClMSeks5q5906gaJpZM4KmuQc.

aethelwulffe commented 8 years ago

No blame on file or sql, except for INNODB Autoincrement=1.

Try adding a value to the provider on creation, then create a second record without one. This may be similar to the other "can't increment from zero rows" issue we had elsewhere.

aethelwulffe commented 8 years ago

At this stage, there has been little added to 101 that wasn't actually a hard-stop bug for production.

aethelwulffe commented 8 years ago

OK. Added a provider. It crapped out on referring provider. This is set in the layout engine as "Provider NPI" type. Trying to switch those to "Provider" type in the layout engine resulted in this error:

ERROR: query failed: UPDATE layout_options SET source = 'F', title = 'NAME', group_name = '1Face Sheet', seq = '5', uor = '2', fld_length = '10', fld_rows = '', max_length = '63', titlecols = '1', datacols = '1', data_type= '2', list_id= '', list_backup_id= '', edit_options = 'CD', default_value = '', description = 'First Name', conditions = '' WHERE form_id = 'DEM' AND field_id = 'fname'

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

/opt/ehr/interface/super/edit_layout.php at 183:sqlStatement

Continued by adding a referring provider, it crapped out on deceased date. Entered deceased date. Reason "Ate too many bugs". Crapped out on:

Error: Incorrect datetime value: '' for column 'financial_review' at row 1
/opt/ehr/library/patient.inc at 1039:sqlInsert
/opt/ehr/interface/new/new_comprehensive_save.php at 70:updatePatientData(1,Array,1)

In closing: Looks like this is a strict issue.

aethelwulffe commented 8 years ago

Ain't got this problem on my machine with the xampp build.

aethelwulffe commented 8 years ago

Going on, I filled out every field I could, except that the Insurance pop-up would flash on, then immediately go away. Dead there. Tried to save anyway, and naturally got:

Error: Incorrect date value: '0000-00-00' for column 'subscriber_DOB' at row 1
/opt/ehr/library/patient.inc at 1258:sqlInsert
/opt/ehr/interface/new/new_comprehensive_save.php at 108:newInsuranceData(1,primary,,,,,,,,,,0000-00-00,,,,,,,,,,,,,,,0000-00-00,TRUE)
aethelwulffe commented 8 years ago

Without phpmyadmin there, I am basically toast with testing any direct uploads of patient data to see if the engine chokes in any other way.

On 11/1/2016 8:45 PM, Tony McCormick wrote:

There are 122 pull requests, that was not the id number but a plea for help

Tony McCormick

On Nov 1, 2016 5:39 PM, "Art Eaton" notifications@github.com wrote:

Not seeing a commit #122

On 11/1/2016 8:12 PM, Tony McCormick wrote:

Any idea what commit that might be in the 122 pull request?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub

https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257736958,

or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-Y4ul_ Qgl7ZystTbduBTQdxQagEks5q59VtgaJpZM4KmuQc.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub

https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257740873, or mute the thread

https://github.com/notifications/unsubscribe-auth/AARci9jnONXYMicpncJZ0S7_gCwxiRCmks5q59ukgaJpZM4KmuQc .

Please be aware that e-mail communication can be intercepted in transmission or misdirected. Please consider communicating any sensitive information by telephone. The information contained in this message may be privileged and confidential. If you are NOT the intended recipient, please notify the sender immediately with a copy to hipaa-security@mrsb-ltd.com and destroy this message.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257741857, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF_tdkxGpvfar8PGfemDInihClMSeks5q5906gaJpZM4KmuQc.

tmccormi commented 8 years ago

Robby is going to setup phpmyadmin for you :-) reluctantly...

tmccormi commented 8 years ago

I think we lost the code change I made to add set strict mode off to the top of the database.sql....

tmccormi commented 8 years ago

It's in the master branch (which is what we are using) now I am confused

--
-- Database: `libreehr`
-- 

set sql_mode='';
aethelwulffe commented 8 years ago

Never said I confirmed it was a strict mode innodb issue, just that I 'spect. What is it set to? (Art is going home for the night though.)

aethelwulffe commented 8 years ago

innodb_strict_mode=OFF

tmccormi commented 8 years ago

but .. I just logged into it and it was set to strict despite the fact that it's in the database.sql file

SELECT @@sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
tmccormi commented 8 years ago

setting the sql_mode="" did not fix it however...

tmccormi commented 8 years ago

innodb_strict_mode=OFF has no affect on the error msg with add new patient....

aethelwulffe commented 8 years ago

The Tinkle Fairie has been going wee on everything.
-My best rationalization based on the information I have. Is this just run-time, or is this in my.cnf with a restart?

aethelwulffe commented 8 years ago

Not sure that sql_mode="" is the best option in any case. Some restrictions are a good idea. Any way, until I hear that this was added to my.cnf and a restart was done, then the behavior is what I would expect. You can set the mode in database.sql as an exception to get past an issue with loading the DB, but after that, it goes back to whatever the server variables are.

tmccormi commented 8 years ago

since it's settable by database, no restart should be required. This was working before, I'm sure.

tmccormi commented 8 years ago

I'll get @robbyoconnor to set the my.cnf so it's not stepped on by his install tools

aethelwulffe commented 8 years ago

Sounds like a plan.

On 11/1/2016 11:33 PM, Tony McCormick wrote:

I'll get @robbyoconnor https://github.com/robbyoconnor to set the my.cnf so it's not stepped on by his install tools

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LibreEHR/LibreEHR/issues/254#issuecomment-257763199, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhzF-B5DHQPXSofSSPk_sIdLVlZWPpwks5q6ASBgaJpZM4KmuQc.

robbyoconnor commented 8 years ago

Done.

tmccormi commented 8 years ago

This specific issue is resolved. We still need to continue to address database issues that are affected by strict mode, but we know that.

aethelwulffe commented 8 years ago

Should we not use a "redress" bug tracking list or thingie somewhere, or start a new issue the very specifically addresses the whole situation (and possible solution)?

aethelwulffe commented 8 years ago

I think that a php variables check in the installer should be where this is resolved for the most part. Not sure if any application on earth could survive the full list of sql_mode restrictions.