Fix auto delete patient list bug.
This commit is contained in:
@@ -26,12 +26,16 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
|||||||
, mBtnAccount(new QToolButton(this))
|
, mBtnAccount(new QToolButton(this))
|
||||||
, mBtnWorklist(new QToolButton(this))
|
, mBtnWorklist(new QToolButton(this))
|
||||||
, mBtnAdd(new QToolButton(this))
|
, mBtnAdd(new QToolButton(this))
|
||||||
, mBtnTurnOff(new QToolButton(this))
|
|
||||||
, mBtnSelect(new QToolButton(this))
|
, mBtnSelect(new QToolButton(this))
|
||||||
|
, mBtnTurnOff(new QToolButton(this))
|
||||||
, mPatTable(new SlideTableView(this))
|
, mPatTable(new SlideTableView(this))
|
||||||
, mModel(nullptr)
|
, mModel(nullptr)
|
||||||
, patientDetailForm(new PatientDetailForm(this))
|
, patientDetailForm(new PatientDetailForm(this))
|
||||||
{
|
{
|
||||||
|
//process expired patient list
|
||||||
|
QDate date = QDate::currentDate().addDays(-JsonObject::Instance()->getPatientListExpireDays());
|
||||||
|
SQLHelper::exec(QString("DELETE FROM Patient WHERE AddDate <= '%1'").arg(date.toString("yyyy-MM-dd")));
|
||||||
|
|
||||||
//init command bar
|
//init command bar
|
||||||
auto layout = new QHBoxLayout();
|
auto layout = new QHBoxLayout();
|
||||||
ui->commandWidget->setLayout(layout);
|
ui->commandWidget->setLayout(layout);
|
||||||
|
|||||||
Reference in New Issue
Block a user