package main

//初始化mgo
func initMgo() {
	if isLocal {
		save_mgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "zhengkun",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		save_mgo.InitPool()

		//save_mgo = &MongodbSim{
		//	MongodbAddr: "192.168.3.207:27092",
		//	DbName:      "zhengkun",
		//	Size:        10,
		//	UserName:    "",
		//	Password:    "",
		//}
		//save_mgo.InitPool()

		qy_mgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "mixdata",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		qy_mgo.InitPool()

		spi_mgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "zhengkun",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		spi_mgo.InitPool()
	} else {
		save_mgo = &MongodbSim{
			MongodbAddr: "172.17.4.87:27080",
			DbName:      "hospital",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		save_mgo.InitPool()

		qy_mgo = &MongodbSim{
			MongodbAddr: "172.17.145.163:27083,172.17.4.187:27082",
			DbName:      "mixdata",
			Size:        10,
			UserName:    "zhengkun",
			Password:    "zk@123123",
		}
		qy_mgo.InitPool()

		spi_mgo = &MongodbSim{
			MongodbAddr: "172.17.4.181:27001",
			DbName:      "mixdata",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		spi_mgo.InitPool()
	}
}

func initMysql() {
	MysqlTool = &Mysql{
		Address:  "192.168.3.217:4000",
		UserName: "root",
		PassWord: "=PDT49#80Z!RVv52_z",
		DBName:   "jy_lycp",
	}
	MysqlTool.Init()

}

func initClassCode() {
	medical_level = map[string]string{
		"一级甲等": "01",
		"一级乙等": "02",
		"一级丙等": "03",
		"一级其它": "04",
		"二级甲等": "05",
		"二级乙等": "06",
		"二级丙等": "07",
		"二级其它": "08",
		"三级甲等": "09",
		"三级乙等": "10",
		"三级丙等": "11",
		"三级特等": "12",
		"三级其它": "13",
		"其它":   "14",
	}

	medical_type = map[string]string{
		"综合医院":     "01",
		"专科医院":     "02",
		"中医医院":     "03",
		"民族医院":     "04",
		"康复医院":     "05",
		"妇幼保健院":    "06",
		"社区卫生服务中心": "07",
		"乡镇卫生院":    "08",
		"疗养院":      "09",
		"门诊部":      "10",
		"诊所及卫生所":   "11",
		"村卫生室":     "12",
		"急救中心":     "13",
		"防治院":      "14",
		"护理中心":     "15",
		"检验诊断中心":   "16",
		"美容整形":     "17",
		"公司医院":     "18",
		"校医院":      "19",
		"其它":       "20",
	}
}
