test_user 1 year ago
parent
commit
ae45556a84
1 changed files with 18 additions and 5 deletions
  1. 18 5
      controllers/sg/his_api_controller.go

+ 18 - 5
controllers/sg/his_api_controller.go View File

@@ -6445,9 +6445,9 @@ type ResultMemo struct {
6445 6445
 
6446 6446
 //[{"begntime":"2022-01-01 00:00:00","endtime":"2022-12-31 00:00:00","memo":"{\"matIdetCode\":\"20\",\"insuAdmdvs\":\"350481\"}","psn_idet_type":"23","psn_type_lv":null}]
6447 6447
 type ResultIDInfo struct {
6448
-	Begntime string     `json:"begntime"`
6449
-	Endtime  string     `json:"endtime"`
6450
-	Memo     ResultMemo `json:"memo"`
6448
+	Begntime string `json:"begntime"`
6449
+	Endtime  string `json:"endtime"`
6450
+	Memo     string `json:"memo"`
6451 6451
 }
6452 6452
 
6453 6453
 type ResultFive struct {
@@ -7669,9 +7669,22 @@ func (c *HisApiController) GetRegisterInfo() {
7669 7669
 
7670 7670
 			}
7671 7671
 			if miConfig.MdtrtareaAdmvs == "350500" {
7672
-				var rf []*ResultIDInfo
7673
-				json.Unmarshal([]byte(idetinfoStr), &rf)
7672
+				var rf []ResultIDInfo
7673
+				psn_info, _ := service.GetPsnByPatientId(id)
7674
+				fmt.Println(psn_info.Idetinfo)
7675
+				fmt.Println("11111111111111112222222")
7676
+
7677
+				json.Unmarshal([]byte(psn_info.Idetinfo), &rf)
7678
+				fmt.Println("11111111111111112222222")
7679
+				fmt.Println(rf)
7680
+				fmt.Println("11111111111111112222222")
7681
+
7674 7682
 				if len(rf) > 0 {
7683
+					fmt.Println("222222222222222222222222c22222222222222222")
7684
+					fmt.Println(rf[0].Memo)
7685
+
7686
+					fmt.Println(rf[0].Memo.InsuAdmdvs)
7687
+
7675 7688
 					if len(rf[0].Memo.InsuAdmdvs) > 0 {
7676 7689
 						insuplc_admdvs_temp = rf[0].Memo.InsuAdmdvs
7677 7690
 					}