|
@@ -1644,6 +1644,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
1644
|
1644
|
return
|
1645
|
1645
|
}
|
1646
|
1646
|
config, _ := service.GetMedicalInsuranceConfig(adminInfo.CurrentOrgId)
|
|
1647
|
+ roles, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, admin_user_id)
|
1647
|
1648
|
|
1648
|
1649
|
if config.IsOpen == 1 {
|
1649
|
1650
|
api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + patient.IdCardNo + "&org_name=" + miConfig.OrgName + "&doctor=" + patientPrescription.Doctor + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&certificates=" + strconv.FormatInt(certificates, 10)
|
|
@@ -1777,7 +1778,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
1777
|
1778
|
api := "http://127.0.0.1:9532/" + "gdyb/two?cert_no=" + IdCardNo + "&insutype=" +
|
1778
|
1779
|
insutype + "&psn_no=" + res.Output.Baseinfo.PsnNo +
|
1779
|
1780
|
"&org_name=" + miConfig.OrgName + "&doctor=" + patientPrescription.Doctor + "&ipt_otp_no=" + ipt_otp_no +
|
1780
|
|
- "&dept=" + department.Name + "&fixmedins_code=" + miConfig.Code + "&dept_code=" + department.Number + "&doctor_id=" + doctor_id + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
|
1781
|
+ "&dept=" + roles.UserName + "&fixmedins_code=" + miConfig.Code + "&dept_code=" + department.Number + "&doctor_id=" + doctor_id + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
1781
|
1782
|
resp, requestErr := http.Get(api)
|
1782
|
1783
|
if requestErr != nil {
|
1783
|
1784
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
@@ -1835,7 +1836,8 @@ func (c *HisApiController) GetRegisterInfo() {
|
1835
|
1836
|
his.UserOrgId = adminInfo.CurrentOrgId
|
1836
|
1837
|
his.Ctime = time.Now().Unix()
|
1837
|
1838
|
his.Mtime = time.Now().Unix()
|
1838
|
|
- his.Status = 1
|
|
1839
|
+ his.Status = 0
|
|
1840
|
+ service.CreateHisPatientTwo(&his)
|
1839
|
1841
|
|
1840
|
1842
|
lists, _ := service.GetHisPatientInfoList(adminInfo.CurrentOrgId, patient.ID, recordDateTime)
|
1841
|
1843
|
if len(lists) == 1 {
|
|
@@ -1893,7 +1895,9 @@ func (c *HisApiController) GetRegisterInfo() {
|
1893
|
1895
|
return
|
1894
|
1896
|
|
1895
|
1897
|
} else {
|
1896
|
|
- service.CreateHisPatientTwo(&his)
|
|
1898
|
+ his.Status = 1
|
|
1899
|
+ service.UpdateHisPatientStatus(&his)
|
|
1900
|
+
|
1897
|
1901
|
c.ServeSuccessJSON(map[string]interface{}{
|
1898
|
1902
|
"his_info": his,
|
1899
|
1903
|
})
|