Cannot update patient history


(Mfonobong Etim) #1

i am not able to edit patient history.
i added some custom fields, and when i add data to edit and click save, i get the following error:

Query Error

ERROR: insert failed: insert into history_data set date = NOW(), id = ?, coffee = ?, tobacco = ?, alcohol = ?, sleep_patterns = ?, exercise_patterns = ?, seatbelt_use = ?, counseling = ?, hazardous_activities = ?, recreational_drugs = ?, last_breast_exam = ?, last_mammogram = ?, last_gynocological_exam = ?, last_rectal_exam = ?, last_prostate_exam = ?, last_physical_exam = ?, last_sigmoidoscopy_colonoscopy = ?, last_ecg = ?, last_cardiac_echo = ?, last_retinal = ?, last_fluvax = ?, last_pneuvax = ?, last_ldl = ?, last_hemoglobin = ?, last_psa = ?, last_exam_results = ?, history_mother = ?, dc_mother = ?, history_father = ?, dc_father = ?, history_siblings = ?, dc_siblings = ?, history_offspring = ?, dc_offspring = ?, history_spouse = ?, dc_spouse = ?, relatives_cancer = ?, relatives_tuberculosis = ?, relatives_diabetes = ?, relatives_high_blood_pressure = ?, relatives_heart_problems = ?, relatives_stroke = ?, relatives_epilepsy = ?, relatives_mental_illness = ?, relatives_suicide = ?, cataract_surgery = ?, tonsillectomy = ?, cholecystestomy = ?, heart_surgery = ?, hysterectomy = ?, hernia_repair = ?, hip_replacement = ?, knee_replacement = ?, appendectomy = ?, pid = ?, right_breast_skin = ?, palpation_right_breast = ?, palpation_left_breast = ?, Clinical_breast_exam_result = ?, additional_history = ?, exams = ?, usertext11 = ?, usertext12 = ?, usertext13 = ?, usertext14 = ?, usertext15 = ?, usertext16 = ?, usertext17 = ?, usertext18 = ?, usertext19 = ?, usertext20 = ?, usertext21 = ?, usertext22 = ?, usertext23 = ?, usertext24 = ?, usertext25 = ?, usertext26 = ?, usertext27 = ?, usertext28 = ?, usertext29 = ?, usertext30 = ?, userdate11 = ?, userdate12 = ?, userdate13 = ?, userdate14 = ?, userdate15 = ?, userarea11 = ?, userarea12 = ?, Date_of_last_menses = ?, vaginal_bleeding = ?, last_child_birth = ?, pregnancies = ?, Age_at_first_sexual_contact = ?, previous_breast_exam = ?, Date_of_Breast_E = ?, Any_previous_CLINICAL_breast_exam = ?, Date_of_Clinical_Breast_E = ?, previous_VIA_exam = ?, Date_of_last_VIA_Exam = ?, Any_previous_Pap_smear = ?, Date_of_Last_PAP_Exam = ?, History_of_HIV_Infection = ?, Date_of_HIV_Diagnosis = ?, history_of_cervical_cancer = ?, positive_family_cervical_cancer = ?, family_history_of_breast_cancer = ?, history_of_breast_cancer = ?, history_of_bloody_breast_discharge = ?, testttt = ?, right_breast_finding = ?, history_of_bloody_breast_discha = ?, Any_previous_CLINICAL_breast_ex = ?

Error: Unknown column ‘history_of_bloody_breast_discha’ in ‘field list’

/library/patient.inc at 1470:sqlInsert
/interface/patient_file/history/history_save.php at 60:updateHistoryData(4,Array)

OpenEMR Version
I’m using OpenEMR version 5.0.2(1)

Browser:
I’m using: google chrome

Operating System
I’m using: windows 10

please i need help
Thank you


(ViSolve) #2

@mfonnix,

This is a mysql exception.
Could you please check whether the column history_of_bloody_breast_discha is present in the table ‘history_data’ .

Thanks,
ViSolve-119


(Mfonobong Etim) #3

Thank you @visolveemr, your response led me to the solution. What happened is that the column name in the database did not correspond with the ID in layout editor. I dont know how that happened, I had to edit the column name on the database to match the ID in layout.
What I’m noticing now is that when I edit anything (like UOR, datatype, size, etc.) on the layout, it will not change when i save. the value and the layout will still remain the same. please can you kindly assist with this.
Thank you


(ViSolve) #4

@mfonnix ,

We tried to create a new custom field in Administration->Layout->History and also made some changes to field values.It works fine.

We would like to know your input values for layout to find the cause. Could you please share your screenshot for our reference.

Thanks,
ViSolve-119