2022-04-01 15:32:23 +08:00
|
|
|
#ifndef GUI_EDITPATIENTDIALOG_H
|
|
|
|
|
#define GUI_EDITPATIENTDIALOG_H
|
|
|
|
|
|
2022-04-06 09:29:17 +08:00
|
|
|
#include "dialogs/GUIFormBaseDialog.h"
|
2022-06-14 14:43:41 +08:00
|
|
|
#include "forms/select/PatientDetailForm.h"
|
2022-04-01 15:32:23 +08:00
|
|
|
|
2022-06-14 14:03:19 +08:00
|
|
|
class ULineEdit;
|
|
|
|
|
class UTextEdit;
|
2022-04-01 15:32:23 +08:00
|
|
|
class QLabel;
|
|
|
|
|
class QToolButton;
|
|
|
|
|
class QSqlTableModel;
|
2022-06-14 14:03:19 +08:00
|
|
|
class EditPatientDialog :public GUIFormBaseDialog {
|
2022-04-01 15:32:23 +08:00
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2025-05-30 14:22:46 +08:00
|
|
|
explicit EditPatientDialog(const QString& aTitle, QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
2022-04-01 15:32:23 +08:00
|
|
|
~EditPatientDialog();
|
|
|
|
|
|
2022-06-14 14:03:19 +08:00
|
|
|
void setModel(QSqlTableModel* m)
|
|
|
|
|
{
|
|
|
|
|
model = m;
|
2022-04-01 15:32:23 +08:00
|
|
|
}
|
|
|
|
|
|
2022-06-14 14:03:19 +08:00
|
|
|
PatientInformation* getPatientInformation()
|
|
|
|
|
{
|
2022-04-01 15:32:23 +08:00
|
|
|
return &store;
|
|
|
|
|
}
|
2022-06-14 14:03:19 +08:00
|
|
|
void setPatientInformation(PatientInformation* information);
|
2022-04-01 15:32:23 +08:00
|
|
|
void clearPatientInformation();
|
2024-04-24 11:11:23 +08:00
|
|
|
void showErrorMessage(const QString& aMessage);
|
2022-04-01 15:32:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool updateReferenceData() override;
|
|
|
|
|
|
|
|
|
|
private:
|
2022-06-14 14:03:19 +08:00
|
|
|
ULineEdit* le_id = nullptr;
|
|
|
|
|
ULineEdit* le_name = nullptr;
|
|
|
|
|
ULineEdit* le_sex = nullptr;
|
|
|
|
|
ULineEdit* le_date = nullptr;
|
2022-04-01 15:32:23 +08:00
|
|
|
QLabel* lbl_error = nullptr;
|
|
|
|
|
PatientInformation store;
|
|
|
|
|
QString currentPatientUID;
|
|
|
|
|
QString AddDate;
|
|
|
|
|
QToolButton* btnSex = nullptr;
|
|
|
|
|
QToolButton* btnDate = nullptr;
|
|
|
|
|
QSqlTableModel* model = nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //GUI_EDITPATIENTDIALOG_H
|