|
@@ -26,6 +26,7 @@ type HisApiController struct {
|
26
|
26
|
}
|
27
|
27
|
|
28
|
28
|
func HisManagerApiRegistRouters() {
|
|
29
|
+ beego.Router("/test/net", &HisApiController{}, "get:TestNet")
|
29
|
30
|
|
30
|
31
|
beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
|
31
|
32
|
beego.Router("/api/hispatient/get", &HisApiController{}, "get:GetHisPatientInfo")
|
|
@@ -122,6 +123,12 @@ func HisManagerApiRegistRouters() {
|
122
|
123
|
|
123
|
124
|
}
|
124
|
125
|
|
|
126
|
+func (c *HisApiController) TestNet() {
|
|
127
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
128
|
+ "msg": "成功",
|
|
129
|
+ })
|
|
130
|
+}
|
|
131
|
+
|
125
|
132
|
func (c *HisApiController) CheckHisPatient() {
|
126
|
133
|
record_date := c.GetString("record_date")
|
127
|
134
|
patient_id, _ := c.GetInt64("patient_id")
|
|
@@ -4264,11 +4271,11 @@ func (c *HisApiController) CreateHisPrescription() {
|
4264
|
4271
|
keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
|
4265
|
4272
|
redis.Set(keySeven, "", time.Second)
|
4266
|
4273
|
var randNum int
|
4267
|
|
- randNum = rand.Intn(10000) + 1000
|
4268
|
|
- timestamp := time.Now().Unix()
|
4269
|
|
- tempTime := time.Unix(timestamp, 0)
|
4270
|
|
- timeFormat := tempTime.Format("20060102150405")
|
4271
|
|
- s.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
|
|
4274
|
+ randNum = rand.Intn(1000) + 1000
|
|
4275
|
+ //timestamp := time.Now().Unix()
|
|
4276
|
+ //tempTime := time.Unix(timestamp, 0)
|
|
4277
|
+ //timeFormat := tempTime.Format("20060102150405")
|
|
4278
|
+ s.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
|
4272
|
4279
|
|
4273
|
4280
|
//赤峰
|
4274
|
4281
|
if adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10489 {
|
|
@@ -5432,11 +5439,8 @@ func (c *HisApiController) CreateHisPrescription() {
|
5432
|
5439
|
|
5433
|
5440
|
service.CreateNewHisProjectTwo(&p, tx)
|
5434
|
5441
|
var randNum int
|
5435
|
|
- randNum = rand.Intn(10000) + 1000
|
5436
|
|
- timestamp := time.Now().Unix()
|
5437
|
|
- tempTime := time.Unix(timestamp, 0)
|
5438
|
|
- timeFormat := tempTime.Format("20060102150405")
|
5439
|
|
- p.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
|
|
5442
|
+ randNum = rand.Intn(1000) + 1000
|
|
5443
|
+ p.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
|
5440
|
5444
|
|
5441
|
5445
|
goodBase, _ := service.GetBaseGoodById(p.ProjectId, p.UserOrgId)
|
5442
|
5446
|
|
|
@@ -5789,11 +5793,11 @@ func (c *HisApiController) CreateHisPrescription() {
|
5789
|
5793
|
keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
|
5790
|
5794
|
redis.Set(keySeven, "", time.Second)
|
5791
|
5795
|
var randNum int
|
5792
|
|
- randNum = rand.Intn(10000) + 1000
|
5793
|
|
- timestamp := time.Now().Unix()
|
5794
|
|
- tempTime := time.Unix(timestamp, 0)
|
5795
|
|
- timeFormat := tempTime.Format("20060102150405")
|
5796
|
|
- s.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
|
|
5796
|
+ randNum = rand.Intn(1000) + 1000
|
|
5797
|
+ //timestamp := time.Now().Unix()
|
|
5798
|
+ //tempTime := time.Unix(timestamp, 0)
|
|
5799
|
+ //timeFormat := tempTime.Format("20060102150405")
|
|
5800
|
+ s.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
|
5797
|
5801
|
service.CreateHisDoctorAdvice(&s)
|
5798
|
5802
|
keySix := strconv.FormatInt(adminInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(theTime.Unix(), 10) + ":his_advices_list_all"
|
5799
|
5803
|
redis.Set(keySix, "", time.Second)
|
|
@@ -5897,11 +5901,9 @@ func (c *HisApiController) CreateHisPrescription() {
|
5897
|
5901
|
|
5898
|
5902
|
projectList = append(projectList, p)
|
5899
|
5903
|
var randNum int
|
5900
|
|
- randNum = rand.Intn(10000) + 1000
|
5901
|
|
- timestamp := time.Now().Unix()
|
5902
|
|
- tempTime := time.Unix(timestamp, 0)
|
5903
|
|
- timeFormat := tempTime.Format("20060102150405")
|
5904
|
|
- p.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
|
|
5904
|
+ randNum = rand.Intn(1000) + 1000
|
|
5905
|
+
|
|
5906
|
+ p.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
|
5905
|
5907
|
|
5906
|
5908
|
if p.Type == 2 { //因为项目和耗材的基础库存在id相同的情况,所以需要根据该字段来判断,type为2的话为从项目开出来的
|
5907
|
5909
|
//新增或者编辑项目,修改对应的标签数据
|