Add WorkList Module.
This commit is contained in:
@@ -23,6 +23,9 @@ enum PatientInformationEnum{
|
||||
#undef ADD_PATIENT_PROPERTY
|
||||
};
|
||||
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
/**
|
||||
* @brief this class was designed to be a edit form,
|
||||
* but now has been change to a detail display class.
|
||||
@@ -33,7 +36,9 @@ public:
|
||||
#define ADD_PATIENT_PROPERTY(val) QString val;
|
||||
EDIT_PATIENT();
|
||||
#undef ADD_PATIENT_PROPERTY
|
||||
PatientInformation(){
|
||||
PatientInformation()
|
||||
: QObject()
|
||||
{
|
||||
this->Flag = QString("0");
|
||||
}
|
||||
PatientInformation* Copy()
|
||||
@@ -48,4 +53,5 @@ public:
|
||||
return n;
|
||||
}
|
||||
};
|
||||
typedef QSharedPointer<PatientInformation> PatientInformationPointer;
|
||||
#endif //GUI_PATIENTINFORMATION_H
|
||||
|
||||
@@ -83,6 +83,13 @@ void SelectFormWidget::initGeneralButtons(QHBoxLayout *layout) {
|
||||
layout->addWidget(mBtnWorklist);
|
||||
// mBtn account slot
|
||||
connect(mBtnAccount, &QToolButton::clicked, DialogManager::Default(),&DialogManager::requestEditSelfAccount);
|
||||
connect(mBtnWorklist, &QToolButton::clicked, [&]()
|
||||
{
|
||||
if (DialogManager::Default()->requestGetWorkList(mModel) == QDialog::Accepted)
|
||||
{
|
||||
mPatTable->selectRow(0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void SelectFormWidget::initPatEditButtons(QHBoxLayout *layout) {
|
||||
@@ -140,7 +147,8 @@ void SelectFormWidget::delPatient() {
|
||||
if (DialogManager::Default()->requestAlertMessage(QString(tr("Delete Patient \"%1\" ?")).arg(pat_name),DialogButtonMode::OkAndCancel,tr("Confirm")) != QDialog::Accepted) return;
|
||||
// need delete clear edit panel detail
|
||||
patientDetailForm->clearPatientInformation();
|
||||
mModel->setData(mModel->index(mPatTable->currentIndex().row(), Flag), 9);
|
||||
//mModel->setData(mModel->index(mPatTable->currentIndex().row(), Flag), 9);
|
||||
mModel->removeRow(mPatTable->currentIndex().row());
|
||||
|
||||
if (mModel->submitAll()) {
|
||||
mModel->select();
|
||||
@@ -229,7 +237,6 @@ void SelectFormWidget::initTableView(QHBoxLayout *contentLayout) {// TableView f
|
||||
|
||||
void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误
|
||||
mModel = SQLHelper::getTable("Patient");
|
||||
mModel->setFilter("Flag=0");
|
||||
mModel->sort(5, Qt::DescendingOrder);
|
||||
mModel->select();
|
||||
mModel->setHeaderData(1, Qt::Horizontal, "ID");
|
||||
|
||||
Reference in New Issue
Block a user