smallAreaHealthStatisticsUnit / rapidInquiryFacility

The Rapid Inquiry Facility (RIF) helps epidemiologists and public health researchers in environmental health activities.
GNU Lesser General Public License v3.0
14 stars 5 forks source link

Error handling some ICD10 chapters and ranges as investigation conditions #119

Closed bparkes closed 5 years ago

bparkes commented 5 years ago

Term name : C50-C50 gives a db error and the study won't start. The error is caused by the trigger max_conditions_ck on the t_trif40_inv_conditions table. The clause causing the trigger to fail is " max_condition:: text <> min_condition::text". In this example both min and max are the same.

peterhambly commented 5 years ago

Please attach a) logs from middleware b) front end study status pane trace popup and c) saved study JSON so I can replicate the fault on Thursday. Peter.

On Tue, Dec 11, 2018, at 5:14 PM, bparkes wrote:

Term name : C50-C50 gives a db error and the study won't start. The error is caused by the trigger max_conditions_ck on the t_trif40_inv_conditions table. The clause causing the trigger to fail is " max_condition:: text <> min_condition::text". In this example both min and max are the same.> — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].

Peter.


Email: phambly@fastmail.co.uk

Links:

  1. https://github.com/smallAreaHealthStatisticsUnit/rapidInquiryFacility/issues/119
  2. https://github.com/notifications/unsubscribe-auth/AGnHJZt5--uzR1M816sNlwAW_camOboaks5u3-fvgaJpZM4ZN243
peterhambly commented 5 years ago

As an additional test can you try c50 As discrete terms c501 c502 etc.

Peter

On Tue, Dec 11, 2018, at 5:14 PM, bparkes wrote:

Term name : C50-C50 gives a db error and the study won't start. The error is caused by the trigger max_conditions_ck on the t_trif40_inv_conditions table. The clause causing the trigger to fail is " max_condition:: text <> min_condition::text". In this example both min and max are the same.> — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].

Peter.


Email: phambly@fastmail.co.uk

Links:

  1. https://github.com/smallAreaHealthStatisticsUnit/rapidInquiryFacility/issues/119
  2. https://github.com/notifications/unsubscribe-auth/AGnHJZt5--uzR1M816sNlwAW_camOboaks5u3-fvgaJpZM4ZN243
peterhambly commented 5 years ago

This is caused by spurious ranges that break the t_rif40_inv_conditions check CONSTRAINT max_condition_ck: 'CHECK (predefined_group_name IS NULL AND max_condition IS NOT NULL AND min_condition IS NOT NULL AND max_condition::text <> min_condition::text OR predefined_group_name IS NULL AND max_condition IS NULL OR predefined_group_name IS NOT NULL)

Values suppressed from display by branch issue_119_fix

 +124.2: [DEBUG] [rifc-dsub-params.js] handleTextSearch res: {
 "description": "\n\t\t\tMalignant neoplasm of breast\n\t\t",
 "identifier": "C50-C50-icd10",
 "label": "C50-C50",
 "nameSpace": "icd10",
 "parentTerm": {
  "description": "\n\t\t\tMalignant neoplasms, stated or presumed to be primary, of specified sites, except of lymphoid, haematopoietic and related tissue\n\t\t",
  "identifier": "C00-C75-icd10",
  "label": "C00-C75",
  "nameSpace": "icd10",
  "parentTerm": {
   "description": "\n\t\t\tMalignant neoplasms\n\t\t",
   "identifier": "C00-C97-icd10",
   "label": "C00-C97",
   "nameSpace": "icd10",
   "parentTerm": {
    "description": "\n\t\t\tNeoplasms\n\t\t",
    "identifier": "II-null",
    "label": "II"
   }
  }
 },
 "taxonomy": "icd10"
}
bparkes commented 5 years ago

As requested, log, json and screenshot files attached stupypopupc50-c50 RIF_middleware.2018-12-13-1.log

devilgate commented 5 years ago

I guess this is fixed by the merge above. @bparkes Brandon, can you please check and close this if it's OK?

bparkes commented 5 years ago

Seems fixed now.