病历建表和建表初始化
This commit is contained in:
parent
5d1c1b6c98
commit
ab2982a00b
Binary file not shown.
@ -1,7 +1,8 @@
|
||||
#include "datamanager.h"
|
||||
#include <QDebug>
|
||||
DataManager::DataManager(QObject * parent )
|
||||
{
|
||||
|
||||
init();
|
||||
};
|
||||
DataManager::~DataManager()
|
||||
{
|
||||
@ -16,9 +17,36 @@ DataManager::~DataManager()
|
||||
|
||||
void DataManager::init()
|
||||
{
|
||||
|
||||
initTable();
|
||||
}
|
||||
void DataManager::initTable()
|
||||
{
|
||||
|
||||
/*
|
||||
病历管理
|
||||
检查号
|
||||
类型: 住院或门诊
|
||||
姓名
|
||||
性别 男女
|
||||
出生日期
|
||||
年龄
|
||||
左右利Laterality 左右
|
||||
检查日期 inspection
|
||||
其他信息
|
||||
*/
|
||||
|
||||
QMap<QString, QString> map;
|
||||
map.insert("f_CheckNum", "TEXT");
|
||||
map.insert("f_Type", "TEXT");
|
||||
map.insert("f_Name", "TEXT");
|
||||
map.insert("f_Sex", "TEXT");
|
||||
map.insert("f_Birthday", "TEXT");
|
||||
map.insert("f_Year", "TEXT");
|
||||
map.insert("f_Laterality", "TEXT");
|
||||
|
||||
SqlGenerate sqlGener;
|
||||
QString sql = sqlGener.createTable("t_RecodManage",map);
|
||||
qDebug()<<sql<<endl;
|
||||
m_sqlcore.execute(sql);
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ class DataManager:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
DataManager(QObject * parent =NULL);
|
||||
DataManager(QObject * parent = NULL);
|
||||
~DataManager();
|
||||
public:
|
||||
static DataManager& instance();
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "medicalrecordmanager.h"
|
||||
#include "parametersettingswidget.h"
|
||||
#include <QCalendarWidget>
|
||||
#include "datamanager.h"
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
@ -51,6 +52,9 @@ int main(int argc, char *argv[])
|
||||
QFont globalFont;
|
||||
globalFont.setFamily("黑体");
|
||||
QApplication::setFont(globalFont);
|
||||
|
||||
DataManager::instance();
|
||||
|
||||
#if 0
|
||||
MedicalRecordManager me;
|
||||
me.show();
|
||||
|
Loading…
x
Reference in New Issue
Block a user