@@ -15,6 +15,7 @@ const Exam = sequelize.define('exams', {
institution_id: { type: Sequelize.STRING, allowNull: true },
study_id: { type: Sequelize.STRING, allowNull: true },
exam_status: { type: Sequelize.INTEGER, allowNull: true },
+ status: { type: Sequelize.STRING, allowNull: true },
}, {
charset: 'utf8',
indexes: [
@@ -201,6 +201,9 @@ const _saveExam = async(hospitalId, patient_key, study_key, temp_patient_id, acc
if (old.exam_class != exam.exam_class) {
old.exam_class = temp.exam_class
}
+ if (old.status === '0') {
+ old.status = 1;
+ }
// old.patient_id = temp.patient_id
// old.study_id = temp.study_id
// old.exam_status = exam.exam_status