Fix EditPateintDialog crash without comment.

This commit is contained in:
sunwen
2023-11-16 16:40:29 +08:00
parent 64e1748030
commit 6611e33448
2 changed files with 0 additions and 14 deletions

View File

@@ -121,16 +121,6 @@ EditPatientDialog::EditPatientDialog(QWidget* parent, Qt::WindowFlags f) : GUIFo
lbl_endline5->setFixedHeight(ENDLINE_SPACE); lbl_endline5->setFixedHeight(ENDLINE_SPACE);
layout->addWidget(lbl_endline5); layout->addWidget(lbl_endline5);
// QLabel* lbl_comment = new QLabel(this);
// lbl_comment->setText(tr("Comment"));
// te_comment = new UTextEdit(this);
// layout->addWidget(lbl_comment);
// layout->addWidget(te_comment);
// QLabel* lbl_endline6 = new QLabel(this);
// lbl_endline6->setFixedHeight(ENDLINE_SPACE);
// lbl_endline6->setObjectName("endline");
// layout->addWidget(lbl_endline6);
lbl_error = new QLabel(this); lbl_error = new QLabel(this);
lbl_error->setObjectName("warn"); lbl_error->setObjectName("warn");
layout->addWidget(lbl_error); layout->addWidget(lbl_error);
@@ -148,7 +138,6 @@ void EditPatientDialog::setPatientInformation(PatientInformation* information)
le_id->setText(information->ID); le_id->setText(information->ID);
btnSex->setText(information->Sex == tr("F") ? tr("Female") : (information->Sex == tr("M") ? tr("Male") : tr("Other"))); btnSex->setText(information->Sex == tr("F") ? tr("Female") : (information->Sex == tr("M") ? tr("Male") : tr("Other")));
le_name->setText(information->Name); le_name->setText(information->Name);
te_comment->setText(information->Comment);
btnDate->setText(information->BirthDate); btnDate->setText(information->BirthDate);
currentPatientUID = information->PatientUID; currentPatientUID = information->PatientUID;
AddDate = information->AddDate; AddDate = information->AddDate;
@@ -163,7 +152,6 @@ void EditPatientDialog::clearPatientInformation()
le_id->setText(""); le_id->setText("");
// le_date->setText(""); // le_date->setText("");
le_name->setText(""); le_name->setText("");
te_comment->setText("");
mAccessionNumber->setText(""); mAccessionNumber->setText("");
} }
@@ -208,7 +196,6 @@ bool EditPatientDialog::updateReferenceData()
} }
inf->Sex = btnSex->text() == tr("Female") ? "F" : (tr("Male") == btnSex->text() ? "M" : "O"); inf->Sex = btnSex->text() == tr("Female") ? "F" : (tr("Male") == btnSex->text() ? "M" : "O");
inf->BirthDate = btnDate->text(); inf->BirthDate = btnDate->text();
//inf->Comment = te_comment->toPlainText();
#define ADD_PATIENT_PROPERTY(val)\ #define ADD_PATIENT_PROPERTY(val)\
model->setData(model->index(selectedRow,PatientInformationEnum:: val),inf-> val); model->setData(model->index(selectedRow,PatientInformationEnum:: val),inf-> val);

View File

@@ -41,7 +41,6 @@ private:
ULineEdit* le_name = nullptr; ULineEdit* le_name = nullptr;
ULineEdit* le_sex = nullptr; ULineEdit* le_sex = nullptr;
ULineEdit* le_date = nullptr; ULineEdit* le_date = nullptr;
UTextEdit* te_comment = nullptr;
QLabel* lbl_error = nullptr; QLabel* lbl_error = nullptr;
PatientInformation store; PatientInformation store;
QString currentPatientUID; QString currentPatientUID;