|
@@ -84,6 +84,54 @@ func PatientApiRegistRouters() {
|
84
|
84
|
|
85
|
85
|
beego.Router("/api/patient/getexportlist", &PatientApiController{}, "Get:GetExportList")
|
86
|
86
|
|
|
87
|
+ beego.Router("/api/patient/savefalloutbedprint", &PatientApiController{}, "Post:SaveFallOutBedPrint")
|
|
88
|
+
|
|
89
|
+ beego.Router("/api/patient/getfalloutbedprintlist", &PatientApiController{}, "Get:GetFallOutBedPrintList")
|
|
90
|
+
|
|
91
|
+ beego.Router("/api/patient/savefilterinformed", &PatientApiController{}, "Post:SaveFilterInformed")
|
|
92
|
+
|
|
93
|
+ beego.Router("/api/patient/getfilterinformed", &PatientApiController{}, "Get:GetFilterInformed")
|
|
94
|
+
|
|
95
|
+ beego.Router("/api/patient/saveprofundainformed", &PatientApiController{}, "Post:SaveProfundaInformed")
|
|
96
|
+
|
|
97
|
+ beego.Router("/api/patient/getprofundainformed", &PatientApiController{}, "Get:GetProfundaInformed")
|
|
98
|
+
|
|
99
|
+ beego.Router("/api/patient/arterovenous", &PatientApiController{}, "Post:SaveArterOvenous")
|
|
100
|
+
|
|
101
|
+ beego.Router("/api/patient/getarterovernous", &PatientApiController{}, "Get:GetArterOverNous")
|
|
102
|
+
|
|
103
|
+ beego.Router("/api/patient/savehighrikinformed", &PatientApiController{}, "Post:SaveHighRikInformed")
|
|
104
|
+
|
|
105
|
+ beego.Router("/api/patient/gethighriskinformed", &PatientApiController{}, "Get:GetHighRiskInformed")
|
|
106
|
+
|
|
107
|
+ beego.Router("/api/patient/saveanticoagulation", &PatientApiController{}, "Post:SaveAnticoagulation")
|
|
108
|
+
|
|
109
|
+ beego.Router("/api/patient/getanticoagulationInformed", &PatientApiController{}, "Get:GetAnticoagulationInformed")
|
|
110
|
+
|
|
111
|
+ beego.Router("/api/patient/savecriticalinfomed", &PatientApiController{}, "Post:SaveCriticalInfomed")
|
|
112
|
+
|
|
113
|
+ beego.Router("/api/patient/getcriticalinformed", &PatientApiController{}, "Get:GetCriticalInformed")
|
|
114
|
+
|
|
115
|
+ beego.Router("/api/patient/savehemoperfusioninformed", &PatientApiController{}, "Post:SaveHemoperfusionInformed")
|
|
116
|
+
|
|
117
|
+ beego.Router("/api/patient/gethemoperfusioninformed", &PatientApiController{}, "Get:GetHemoperfusionInformed")
|
|
118
|
+
|
|
119
|
+ beego.Router("/api/patient/savebringinformed", &PatientApiController{}, "Post:SaveBringInformed")
|
|
120
|
+
|
|
121
|
+ beego.Router("/api/patient/getinformedcontsent", &PatientApiController{}, "Get:GetInformedContsent")
|
|
122
|
+
|
|
123
|
+ beego.Router("/api/patient/savecatheterization", &PatientApiController{}, "Post:SaveCatheterization")
|
|
124
|
+
|
|
125
|
+ beego.Router("/api/patient/getcatheterization", &PatientApiController{}, "Get:GetCatheterization")
|
|
126
|
+
|
|
127
|
+ beego.Router("/api/patient/savedialyzerInformed", &PatientApiController{}, "Post:SaveDialyzerInformed")
|
|
128
|
+
|
|
129
|
+ beego.Router("/api/patient/getdialyzerinformed", &PatientApiController{}, "Get:GetDialyzerInformed")
|
|
130
|
+
|
|
131
|
+ beego.Router("/api/patient/savetheapyinformed", &PatientApiController{}, "Post:SaveTheapyInformed")
|
|
132
|
+
|
|
133
|
+ beego.Router("api/patient/gettherapyinformed", &PatientApiController{}, "Get:GetTherapyInformed")
|
|
134
|
+
|
87
|
135
|
}
|
88
|
136
|
func (c *PatientApiController) GetExportList() {
|
89
|
137
|
startTime := c.GetString("start_time")
|
|
@@ -6060,3 +6108,526 @@ func (c *PatientApiController) GetDialysisSolutionDetailList() {
|
6060
|
6108
|
"total": total,
|
6061
|
6109
|
})
|
6062
|
6110
|
}
|
|
6111
|
+
|
|
6112
|
+func (c *PatientApiController) SaveFallOutBedPrint() {
|
|
6113
|
+
|
|
6114
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6115
|
+ orgid := adminInfo.CurrentOrgId
|
|
6116
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6117
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6118
|
+ fmt.Println("err", err)
|
|
6119
|
+ content := dataBody["content"].(string)
|
|
6120
|
+
|
|
6121
|
+ outPrint := models.XtFallOutPrint{
|
|
6122
|
+ UserOrgId: orgid,
|
|
6123
|
+ Content: content,
|
|
6124
|
+ Status: 1,
|
|
6125
|
+ Ctime: time.Now().Unix(),
|
|
6126
|
+ Mtime: time.Now().Unix(),
|
|
6127
|
+ }
|
|
6128
|
+
|
|
6129
|
+ //查询该机构是否存在
|
|
6130
|
+ list, err := service.GetOutPrintList(orgid)
|
|
6131
|
+
|
|
6132
|
+ if list.ID == 0 {
|
|
6133
|
+ service.CreateFallOutBedPrint(outPrint)
|
|
6134
|
+ }
|
|
6135
|
+
|
|
6136
|
+ if list.ID > 0 {
|
|
6137
|
+ service.UpdateFallOutBedPrint(list.ID, content)
|
|
6138
|
+ }
|
|
6139
|
+
|
|
6140
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6141
|
+ "list": list,
|
|
6142
|
+ })
|
|
6143
|
+}
|
|
6144
|
+
|
|
6145
|
+func (c *PatientApiController) GetFallOutBedPrintList() {
|
|
6146
|
+
|
|
6147
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6148
|
+ orgid := adminInfo.CurrentOrgId
|
|
6149
|
+
|
|
6150
|
+ list, _ := service.GetFallOutBedPrintList(orgid)
|
|
6151
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6152
|
+ "list": list,
|
|
6153
|
+ })
|
|
6154
|
+}
|
|
6155
|
+
|
|
6156
|
+func (c *PatientApiController) SaveFilterInformed() {
|
|
6157
|
+
|
|
6158
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6159
|
+ orgid := adminInfo.CurrentOrgId
|
|
6160
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6161
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6162
|
+ fmt.Println("err", err)
|
|
6163
|
+ content := dataBody["content"].(string)
|
|
6164
|
+ informed := models.XtFilterInformed{
|
|
6165
|
+ UserOrgId: orgid,
|
|
6166
|
+ Content: content,
|
|
6167
|
+ Status: 1,
|
|
6168
|
+ Ctime: time.Now().Unix(),
|
|
6169
|
+ Mtime: time.Now().Unix(),
|
|
6170
|
+ }
|
|
6171
|
+
|
|
6172
|
+ filterInformed, _ := service.GetFilterInformed(orgid)
|
|
6173
|
+
|
|
6174
|
+ if filterInformed.ID == 0 {
|
|
6175
|
+
|
|
6176
|
+ service.CreateFilterInformed(informed)
|
|
6177
|
+ }
|
|
6178
|
+
|
|
6179
|
+ if filterInformed.ID > 0 {
|
|
6180
|
+
|
|
6181
|
+ service.UpdateFilterInformed(filterInformed.ID, content)
|
|
6182
|
+ }
|
|
6183
|
+
|
|
6184
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6185
|
+ "informed": informed,
|
|
6186
|
+ })
|
|
6187
|
+
|
|
6188
|
+}
|
|
6189
|
+
|
|
6190
|
+func (c *PatientApiController) GetFilterInformed() {
|
|
6191
|
+
|
|
6192
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6193
|
+ orgid := adminInfo.CurrentOrgId
|
|
6194
|
+ filterInformed, _ := service.GetFilterInformed(orgid)
|
|
6195
|
+
|
|
6196
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6197
|
+ "list": filterInformed,
|
|
6198
|
+ })
|
|
6199
|
+}
|
|
6200
|
+
|
|
6201
|
+func (c *PatientApiController) SaveProfundaInformed() {
|
|
6202
|
+
|
|
6203
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6204
|
+ orgid := adminInfo.CurrentOrgId
|
|
6205
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6206
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6207
|
+ fmt.Println("err", err)
|
|
6208
|
+ content := dataBody["content"].(string)
|
|
6209
|
+
|
|
6210
|
+ informed := models.XtProfundaInformed{
|
|
6211
|
+ UserOrgId: orgid,
|
|
6212
|
+ Content: content,
|
|
6213
|
+ Status: 1,
|
|
6214
|
+ Ctime: time.Now().Unix(),
|
|
6215
|
+ Mtime: time.Now().Unix(),
|
|
6216
|
+ }
|
|
6217
|
+
|
|
6218
|
+ profundaInformed, _ := service.GetProfundaInformed(orgid)
|
|
6219
|
+
|
|
6220
|
+ if profundaInformed.ID == 0 {
|
|
6221
|
+ service.CreateProfundaInformed(informed)
|
|
6222
|
+ }
|
|
6223
|
+
|
|
6224
|
+ if profundaInformed.ID > 0 {
|
|
6225
|
+
|
|
6226
|
+ service.UpdateProfundaInformed(profundaInformed.ID, content)
|
|
6227
|
+ }
|
|
6228
|
+
|
|
6229
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6230
|
+ "list": profundaInformed,
|
|
6231
|
+ })
|
|
6232
|
+}
|
|
6233
|
+
|
|
6234
|
+func (c *PatientApiController) GetProfundaInformed() {
|
|
6235
|
+
|
|
6236
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6237
|
+ orgid := adminInfo.CurrentOrgId
|
|
6238
|
+
|
|
6239
|
+ profundaInformed, _ := service.GetProfundaInformed(orgid)
|
|
6240
|
+
|
|
6241
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6242
|
+ "list": profundaInformed,
|
|
6243
|
+ })
|
|
6244
|
+}
|
|
6245
|
+
|
|
6246
|
+func (c *PatientApiController) SaveArterOvenous() {
|
|
6247
|
+
|
|
6248
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6249
|
+ orgid := adminInfo.CurrentOrgId
|
|
6250
|
+
|
|
6251
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6252
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6253
|
+ fmt.Println("err", err)
|
|
6254
|
+ content := dataBody["content"].(string)
|
|
6255
|
+
|
|
6256
|
+ arterOvenous := models.XtArterOvenous{
|
|
6257
|
+ UserOrgId: orgid,
|
|
6258
|
+ Content: content,
|
|
6259
|
+ Status: 1,
|
|
6260
|
+ Ctime: time.Now().Unix(),
|
|
6261
|
+ Mtime: time.Now().Unix(),
|
|
6262
|
+ }
|
|
6263
|
+
|
|
6264
|
+ list, _ := service.GetArterOvenousList(orgid)
|
|
6265
|
+
|
|
6266
|
+ if list.ID == 0 {
|
|
6267
|
+
|
|
6268
|
+ service.CreateArterOvernous(arterOvenous)
|
|
6269
|
+ }
|
|
6270
|
+
|
|
6271
|
+ if list.ID > 0 {
|
|
6272
|
+ service.UpdateArterOvernous(list.ID, content)
|
|
6273
|
+ }
|
|
6274
|
+
|
|
6275
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6276
|
+ "list": list,
|
|
6277
|
+ })
|
|
6278
|
+}
|
|
6279
|
+
|
|
6280
|
+func (c *PatientApiController) GetArterOverNous() {
|
|
6281
|
+
|
|
6282
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6283
|
+ orgid := adminInfo.CurrentOrgId
|
|
6284
|
+
|
|
6285
|
+ list, _ := service.GetArterOvenousList(orgid)
|
|
6286
|
+
|
|
6287
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6288
|
+ "list": list,
|
|
6289
|
+ })
|
|
6290
|
+
|
|
6291
|
+}
|
|
6292
|
+
|
|
6293
|
+func (c *PatientApiController) SaveHighRikInformed() {
|
|
6294
|
+
|
|
6295
|
+ adminInfo := c.GetAdminUserInfo()
|
|
6296
|
+ orgid := adminInfo.CurrentOrgId
|
|
6297
|
+
|
|
6298
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6299
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6300
|
+ fmt.Println("err", err)
|
|
6301
|
+ content := dataBody["content"].(string)
|
|
6302
|
+
|
|
6303
|
+ risk := models.XtHightRisk{
|
|
6304
|
+ UserOrgId: orgid,
|
|
6305
|
+ Content: content,
|
|
6306
|
+ Status: 1,
|
|
6307
|
+ Ctime: time.Now().Unix(),
|
|
6308
|
+ Mtime: time.Now().Unix(),
|
|
6309
|
+ }
|
|
6310
|
+
|
|
6311
|
+ highRik, _ := service.GetHightRikInformed(orgid)
|
|
6312
|
+
|
|
6313
|
+ if highRik.ID == 0 {
|
|
6314
|
+
|
|
6315
|
+ service.CreateHighRik(risk)
|
|
6316
|
+ }
|
|
6317
|
+
|
|
6318
|
+ if highRik.ID > 0 {
|
|
6319
|
+
|
|
6320
|
+ service.UpdateHighRik(highRik.ID, content)
|
|
6321
|
+ }
|
|
6322
|
+
|
|
6323
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6324
|
+ "list": risk,
|
|
6325
|
+ })
|
|
6326
|
+}
|
|
6327
|
+
|
|
6328
|
+func (c *PatientApiController) GetHighRiskInformed() {
|
|
6329
|
+
|
|
6330
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6331
|
+
|
|
6332
|
+ rikInformed, _ := service.GetHightRikInformed(orgId)
|
|
6333
|
+
|
|
6334
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6335
|
+ "list": rikInformed,
|
|
6336
|
+ })
|
|
6337
|
+}
|
|
6338
|
+
|
|
6339
|
+func (c *PatientApiController) SaveAnticoagulation() {
|
|
6340
|
+
|
|
6341
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6342
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6343
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6344
|
+ fmt.Println("err", err)
|
|
6345
|
+ content := dataBody["content"].(string)
|
|
6346
|
+
|
|
6347
|
+ auticoagutionPrint := models.XtAuticoagutionPrint{
|
|
6348
|
+ Content: content,
|
|
6349
|
+ UserOrgId: orgId,
|
|
6350
|
+ Status: 1,
|
|
6351
|
+ Ctime: time.Now().Unix(),
|
|
6352
|
+ Mtime: time.Now().Unix(),
|
|
6353
|
+ }
|
|
6354
|
+
|
|
6355
|
+ anticoagulation, _ := service.GetAnticoagulation(orgId)
|
|
6356
|
+
|
|
6357
|
+ if anticoagulation.ID == 0 {
|
|
6358
|
+
|
|
6359
|
+ service.CreateAnticoagulation(auticoagutionPrint)
|
|
6360
|
+ }
|
|
6361
|
+
|
|
6362
|
+ if anticoagulation.ID > 0 {
|
|
6363
|
+
|
|
6364
|
+ service.UpdateAnticoagulation(anticoagulation.ID, content)
|
|
6365
|
+ }
|
|
6366
|
+
|
|
6367
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6368
|
+ "list": auticoagutionPrint,
|
|
6369
|
+ })
|
|
6370
|
+
|
|
6371
|
+}
|
|
6372
|
+
|
|
6373
|
+func (c *PatientApiController) GetAnticoagulationInformed() {
|
|
6374
|
+
|
|
6375
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6376
|
+
|
|
6377
|
+ anticoagulation, _ := service.GetAnticoagulation(orgId)
|
|
6378
|
+
|
|
6379
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6380
|
+ "list": anticoagulation,
|
|
6381
|
+ })
|
|
6382
|
+}
|
|
6383
|
+
|
|
6384
|
+func (c *PatientApiController) SaveCriticalInfomed() {
|
|
6385
|
+
|
|
6386
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6387
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6388
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6389
|
+ fmt.Println("err", err)
|
|
6390
|
+ content := dataBody["content"].(string)
|
|
6391
|
+
|
|
6392
|
+ criticalinfomedPrint := models.XtCriticalinfomedPrint{
|
|
6393
|
+ UserOrgId: orgId,
|
|
6394
|
+ Content: content,
|
|
6395
|
+ Status: 1,
|
|
6396
|
+ Ctime: time.Now().Unix(),
|
|
6397
|
+ Mtime: time.Now().Unix(),
|
|
6398
|
+ }
|
|
6399
|
+
|
|
6400
|
+ infomed, _ := service.GetCriticalInfomed(orgId)
|
|
6401
|
+
|
|
6402
|
+ if infomed.ID == 0 {
|
|
6403
|
+ service.CreatedCriticalInfomed(criticalinfomedPrint)
|
|
6404
|
+ }
|
|
6405
|
+
|
|
6406
|
+ if infomed.ID > 0 {
|
|
6407
|
+ service.UpdateCriticalInfomed(infomed.ID, content)
|
|
6408
|
+ }
|
|
6409
|
+
|
|
6410
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6411
|
+ "list": criticalinfomedPrint,
|
|
6412
|
+ })
|
|
6413
|
+}
|
|
6414
|
+
|
|
6415
|
+func (c *PatientApiController) GetCriticalInformed() {
|
|
6416
|
+
|
|
6417
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6418
|
+
|
|
6419
|
+ infomed, _ := service.GetCriticalInfomed(orgId)
|
|
6420
|
+
|
|
6421
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6422
|
+ "list": infomed,
|
|
6423
|
+ })
|
|
6424
|
+}
|
|
6425
|
+
|
|
6426
|
+func (c *PatientApiController) SaveHemoperfusionInformed() {
|
|
6427
|
+
|
|
6428
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6429
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6430
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6431
|
+ fmt.Println("err", err)
|
|
6432
|
+ content := dataBody["content"].(string)
|
|
6433
|
+
|
|
6434
|
+ hemoperfusionmedPrint := models.XtHemoperfusionmedPrint{
|
|
6435
|
+ UserOrgId: orgId,
|
|
6436
|
+ Content: content,
|
|
6437
|
+ Status: 1,
|
|
6438
|
+ Ctime: time.Now().Unix(),
|
|
6439
|
+ Mtime: time.Now().Unix(),
|
|
6440
|
+ }
|
|
6441
|
+
|
|
6442
|
+ informed, _ := service.GetHemoperfusionInformed(orgId)
|
|
6443
|
+
|
|
6444
|
+ if informed.ID == 0 {
|
|
6445
|
+
|
|
6446
|
+ service.CreateHemoperfusionInformed(hemoperfusionmedPrint)
|
|
6447
|
+ }
|
|
6448
|
+
|
|
6449
|
+ if informed.ID > 0 {
|
|
6450
|
+
|
|
6451
|
+ service.UpdateHemoperfusionInformed(informed.ID, content)
|
|
6452
|
+ }
|
|
6453
|
+
|
|
6454
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6455
|
+ "list": hemoperfusionmedPrint,
|
|
6456
|
+ })
|
|
6457
|
+}
|
|
6458
|
+
|
|
6459
|
+func (c *PatientApiController) GetHemoperfusionInformed() {
|
|
6460
|
+
|
|
6461
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6462
|
+
|
|
6463
|
+ informed, _ := service.GetHemoperfusionInformed(orgId)
|
|
6464
|
+
|
|
6465
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6466
|
+ "list": informed,
|
|
6467
|
+ })
|
|
6468
|
+}
|
|
6469
|
+
|
|
6470
|
+func (c *PatientApiController) SaveBringInformed() {
|
|
6471
|
+
|
|
6472
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6473
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6474
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6475
|
+ fmt.Println("err", err)
|
|
6476
|
+ content := dataBody["content"].(string)
|
|
6477
|
+
|
|
6478
|
+ bringinformedPrint := models.XtBringinformedPrint{
|
|
6479
|
+ Content: content,
|
|
6480
|
+ UserOrgId: orgId,
|
|
6481
|
+ Ctime: time.Now().Unix(),
|
|
6482
|
+ Mtime: time.Now().Unix(),
|
|
6483
|
+ Status: 1,
|
|
6484
|
+ }
|
|
6485
|
+
|
|
6486
|
+ informed, _ := service.GetBringInformed(orgId)
|
|
6487
|
+
|
|
6488
|
+ if informed.ID == 0 {
|
|
6489
|
+ service.CreateBringInformed(bringinformedPrint)
|
|
6490
|
+ }
|
|
6491
|
+ if informed.ID > 0 {
|
|
6492
|
+ service.UpdateBringInformed(informed.ID, content)
|
|
6493
|
+ }
|
|
6494
|
+
|
|
6495
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6496
|
+ "list": bringinformedPrint,
|
|
6497
|
+ })
|
|
6498
|
+}
|
|
6499
|
+
|
|
6500
|
+func (c *PatientApiController) GetInformedContsent() {
|
|
6501
|
+
|
|
6502
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6503
|
+ informed, _ := service.GetBringInformed(orgId)
|
|
6504
|
+
|
|
6505
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6506
|
+ "list": informed,
|
|
6507
|
+ })
|
|
6508
|
+}
|
|
6509
|
+
|
|
6510
|
+func (c *PatientApiController) SaveCatheterization() {
|
|
6511
|
+
|
|
6512
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6513
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6514
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6515
|
+ fmt.Println("err", err)
|
|
6516
|
+ content := dataBody["content"].(string)
|
|
6517
|
+
|
|
6518
|
+ cathetercationPrint := models.XtCathetercationPrint{
|
|
6519
|
+ UserOrgId: orgId,
|
|
6520
|
+ Content: content,
|
|
6521
|
+ Status: 1,
|
|
6522
|
+ Ctime: time.Now().Unix(),
|
|
6523
|
+ Mtime: time.Now().Unix(),
|
|
6524
|
+ }
|
|
6525
|
+
|
|
6526
|
+ catheterization, _ := service.GetCatheterization(orgId)
|
|
6527
|
+
|
|
6528
|
+ if cathetercationPrint.ID == 0 {
|
|
6529
|
+
|
|
6530
|
+ service.CreateCatheteriztion(cathetercationPrint)
|
|
6531
|
+ }
|
|
6532
|
+
|
|
6533
|
+ if cathetercationPrint.ID > 0 {
|
|
6534
|
+
|
|
6535
|
+ service.UpdateCatheterization(catheterization.ID, content)
|
|
6536
|
+ }
|
|
6537
|
+
|
|
6538
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6539
|
+ "list": catheterization,
|
|
6540
|
+ })
|
|
6541
|
+}
|
|
6542
|
+
|
|
6543
|
+func (c *PatientApiController) GetCatheterization() {
|
|
6544
|
+
|
|
6545
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6546
|
+ catheterization, _ := service.GetCatheterization(orgId)
|
|
6547
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6548
|
+ "list": catheterization,
|
|
6549
|
+ })
|
|
6550
|
+}
|
|
6551
|
+
|
|
6552
|
+func (c *PatientApiController) SaveDialyzerInformed() {
|
|
6553
|
+
|
|
6554
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6555
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6556
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6557
|
+ fmt.Println("err", err)
|
|
6558
|
+ content := dataBody["content"].(string)
|
|
6559
|
+
|
|
6560
|
+ dialyszerinformedPrint := models.XtDialyszerinformedPrint{
|
|
6561
|
+ UserOrgId: orgId,
|
|
6562
|
+ Content: content,
|
|
6563
|
+ Status: 1,
|
|
6564
|
+ Ctime: time.Now().Unix(),
|
|
6565
|
+ Mtime: time.Now().Unix(),
|
|
6566
|
+ }
|
|
6567
|
+
|
|
6568
|
+ informed, _ := service.GetDialyzerInformed(orgId)
|
|
6569
|
+
|
|
6570
|
+ if informed.ID == 0 {
|
|
6571
|
+
|
|
6572
|
+ service.CreateDialyzerInformed(dialyszerinformedPrint)
|
|
6573
|
+ }
|
|
6574
|
+
|
|
6575
|
+ if informed.ID > 0 {
|
|
6576
|
+ service.UpdateDialyszerInformed(informed.ID, content)
|
|
6577
|
+ }
|
|
6578
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6579
|
+ "list": dialyszerinformedPrint,
|
|
6580
|
+ })
|
|
6581
|
+}
|
|
6582
|
+
|
|
6583
|
+func (c *PatientApiController) GetDialyzerInformed() {
|
|
6584
|
+
|
|
6585
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6586
|
+ informed, _ := service.GetDialyzerInformed(orgId)
|
|
6587
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6588
|
+ "list": informed,
|
|
6589
|
+ })
|
|
6590
|
+}
|
|
6591
|
+
|
|
6592
|
+func (c *PatientApiController) SaveTheapyInformed() {
|
|
6593
|
+
|
|
6594
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6595
|
+ dataBody := make(map[string]interface{}, 0)
|
|
6596
|
+ err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
|
|
6597
|
+ fmt.Println("err", err)
|
|
6598
|
+ content := dataBody["content"].(string)
|
|
6599
|
+
|
|
6600
|
+ theapyinformedPrint := models.XtTheapyinformedPrint{
|
|
6601
|
+ Content: content,
|
|
6602
|
+ UserOrgId: orgId,
|
|
6603
|
+ Status: 1,
|
|
6604
|
+ Ctime: time.Now().Unix(),
|
|
6605
|
+ Mtime: time.Now().Unix(),
|
|
6606
|
+ }
|
|
6607
|
+
|
|
6608
|
+ theapyInformed, _ := service.GetTheapyInformed(orgId)
|
|
6609
|
+
|
|
6610
|
+ if theapyInformed.ID == 0 {
|
|
6611
|
+
|
|
6612
|
+ service.CreateTheapyInformed(theapyinformedPrint)
|
|
6613
|
+ }
|
|
6614
|
+
|
|
6615
|
+ if theapyInformed.ID > 0 {
|
|
6616
|
+
|
|
6617
|
+ service.UpdateTheaphInformed(theapyInformed.ID, content)
|
|
6618
|
+ }
|
|
6619
|
+
|
|
6620
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6621
|
+ "list": theapyinformedPrint,
|
|
6622
|
+ })
|
|
6623
|
+
|
|
6624
|
+}
|
|
6625
|
+
|
|
6626
|
+func (c *PatientApiController) GetTherapyInformed() {
|
|
6627
|
+
|
|
6628
|
+ orgId := c.GetAdminUserInfo().CurrentOrgId
|
|
6629
|
+ theapyInformed, _ := service.GetTheapyInformed(orgId)
|
|
6630
|
+ c.ServeSuccessJSON(map[string]interface{}{
|
|
6631
|
+ "list": theapyInformed,
|
|
6632
|
+ })
|
|
6633
|
+}
|