|
|
|
|
1623
|
for _, idStr := range idArray {
|
1623
|
for _, idStr := range idArray {
|
1624
|
//temp_id := strings.Split(idStr, "-")
|
1624
|
//temp_id := strings.Split(idStr, "-")
|
1625
|
id := idStr
|
1625
|
id := idStr
|
1626
|
- printInfo, _ := GetPatientsInfoByIDCardNo(id, 10330)
|
|
|
|
|
1626
|
+ printInfo, _ := GetPatientsInfoByIDCardNo(id, org_id)
|
1627
|
timeNow := time.Unix(sync_time, 0) //2017-08-30 16:19:19 +0800 CST
|
1627
|
timeNow := time.Unix(sync_time, 0) //2017-08-30 16:19:19 +0800 CST
|
1628
|
|
1628
|
|
1629
|
timeString := timeNow.Format("2006-01-02 15:04:05") //2015-06-15 08:52:32
|
1629
|
timeString := timeNow.Format("2006-01-02 15:04:05") //2015-06-15 08:52:32
|
|
|
|
|
1673
|
SingleDose := yz.DanLiang
|
1673
|
SingleDose := yz.DanLiang
|
1674
|
PrescribingNumber := yz.Shuliang
|
1674
|
PrescribingNumber := yz.Shuliang
|
1675
|
advice := models.XtDoctorAdvice{
|
1675
|
advice := models.XtDoctorAdvice{
|
1676
|
- UserOrgId: 3877,
|
|
|
|
|
1676
|
+ UserOrgId: org_id,
|
1677
|
PatientId: temp_patient_id,
|
1677
|
PatientId: temp_patient_id,
|
1678
|
AdviceType: 2,
|
1678
|
AdviceType: 2,
|
1679
|
AdviceDate: schedulesTime,
|
1679
|
AdviceDate: schedulesTime,
|
|
|
|
|
1696
|
}
|
1696
|
}
|
1697
|
utils.InfoLog("advice:%v", advice)
|
1697
|
utils.InfoLog("advice:%v", advice)
|
1698
|
// 根据同步来的 advice_id 来查询库里是否已经存在
|
1698
|
// 根据同步来的 advice_id 来查询库里是否已经存在
|
1699
|
- advice_info, _ := GetAdviceBySyncAdviceIdTwo(3877, yz.AdviceId)
|
|
|
|
|
1699
|
+ advice_info, _ := GetAdviceBySyncAdviceIdTwo(org_id, yz.AdviceId)
|
1700
|
utils.InfoLog("advice_info:%v", advice_info)
|
1700
|
utils.InfoLog("advice_info:%v", advice_info)
|
1701
|
if advice_info.ID > 0 {
|
1701
|
if advice_info.ID > 0 {
|
1702
|
key := strconv.FormatInt(org_id, 10) + ":" + strconv.FormatInt(temp_patient_id, 10) + ":" + strconv.FormatInt(schedulesTime, 10) + ":doctor_advices"
|
1702
|
key := strconv.FormatInt(org_id, 10) + ":" + strconv.FormatInt(temp_patient_id, 10) + ":" + strconv.FormatInt(schedulesTime, 10) + ":doctor_advices"
|