|
@@ -684,6 +684,10 @@ func (c *HisApiController) GetRegisterInfo() {
|
684
|
684
|
social_type, _ := c.GetInt64("social_type")
|
685
|
685
|
admin_user_id, _ := c.GetInt64("admin_user_id")
|
686
|
686
|
|
|
687
|
+ diagnosis_id, _ := c.GetInt64("diagnosis")
|
|
688
|
+ sick_type, _ := c.GetInt64("sick_type")
|
|
689
|
+ reg_type := c.GetString("p_type")
|
|
690
|
+
|
687
|
691
|
timeLayout := "2006-01-02"
|
688
|
692
|
loc, _ := time.LoadLocation("Local")
|
689
|
693
|
birthdays, _ := time.ParseInLocation(timeLayout+" 15:04:05", birthday+" 00:00:00", loc)
|
|
@@ -703,7 +707,14 @@ func (c *HisApiController) GetRegisterInfo() {
|
703
|
707
|
} else {
|
704
|
708
|
patient, _ = service.GetPatientByIDTwo(adminInfo.CurrentOrgId, id)
|
705
|
709
|
}
|
|
710
|
+
|
706
|
711
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
|
|
712
|
+ if patientPrescription.ID == 0 {
|
|
713
|
+ patientPrescription, _ = service.FindLastPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
|
|
714
|
+ }
|
|
715
|
+ diagnosisConfig, _ := service.FindDiagnoseById(diagnosis_id)
|
|
716
|
+ sickConfig, _ := service.FindSickById(sick_type)
|
|
717
|
+
|
707
|
718
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminInfo.CurrentOrgId)
|
708
|
719
|
if patient.ID == 0 {
|
709
|
720
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
|
|
@@ -795,8 +806,6 @@ func (c *HisApiController) GetRegisterInfo() {
|
795
|
806
|
count, _ := service.FindHisRegisterRecord(theTime.Unix(), patient.ID, adminInfo.CurrentOrgId)
|
796
|
807
|
department, _ := service.GetDepartMentDetail(patientPrescription.Departments)
|
797
|
808
|
doctor_id := strconv.FormatInt(patientPrescription.DoctorId, 10)
|
798
|
|
- diagnosisConfig, _ := service.FindDiagnoseById(patientPrescription.Diagnosis)
|
799
|
|
- sickConfig, _ := service.FindSickById(patientPrescription.SickType)
|
800
|
809
|
|
801
|
810
|
IdCardNo := ""
|
802
|
811
|
if id_card_type == 1 {
|
|
@@ -867,7 +876,7 @@ func (c *HisApiController) GetRegisterInfo() {
|
867
|
876
|
if err == nil {
|
868
|
877
|
api2 := "http://127.0.0.1:9532/" + "gdyb/four?psn_no=" + his.PsnNo +
|
869
|
878
|
"&mdtrt_id=" + his.Number + "&doctor=" + patientPrescription.Doctor + "&department=" + department.Name +
|
870
|
|
- "&diag=" + diagnosisConfig.ClassName + "&org_name=" + miConfig.OrgName + "&med_type=" + strconv.FormatInt(patientPrescription.RegisterType, 10) + "&doctor_id=" + strconv.FormatInt(patientPrescription.DoctorId, 10) + "&fixmedins_code=" + miConfig.Code + "&diag_code=" + diagnosisConfig.CountryCode +
|
|
879
|
+ "&diag=" + diagnosisConfig.ClassName + "&org_name=" + miConfig.OrgName + "&med_type=" + reg_type + "&doctor_id=" + strconv.FormatInt(patientPrescription.DoctorId, 10) + "&fixmedins_code=" + miConfig.Code + "&diag_code=" + diagnosisConfig.CountryCode +
|
871
|
880
|
"&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&sick_code=" + sickConfig.CountryCode + "&sick_name=" + sickConfig.ClassName
|
872
|
881
|
resp2, requestErr2 := http.Get(api2)
|
873
|
882
|
if requestErr2 != nil {
|