SQL INSERT error out of the blue

Situation

Query Error

ERROR: insert failed: INSERT INTO form_encounter SET date = ?, onset_date = ?, reason = ?, facility = ?, pc_catid = ?, facility_id = ?, billing_facility = ?, sensitivity = ?, referral_source = ?, pid = ?, encounter = ?, pos_code = ?, class_code = ?, external_id = ?, parent_encounter_id = ?, provider_id = ?, discharge_disposition = ?, referring_provider_id = ?, encounter_type_code = ?, encounter_type_description = ?

Error: Column ‘pc_catid’ cannot be null

/var/www/html/openemr/interface/forms/newpatient/save.php at 127:sqlInsert

OpenEMR Version
I’m using OpenEMR version 7.0

Browser:
edge BROWSER

Operating System
I’m using: WINDOWS 10

Logs
Did you check the logs?
Was there anything pertinent in them?
Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

Hi Mr.Smith
Did you solve the problem? Can you help me because I have the same problem

Hi Roger Smith,
pc_catid post value is null .update form_encounter pc_catid column is NULL

ALTER TABLE form_encounter CHANGE pc_catid pc_catid INT(11) NULL DEFAULT ‘5’ COMMENT ‘event category from openemr_postcalendar_categories’;

Thanks,
Param,
help@capminds.com

1 Like