|
@@ -697,14 +697,15 @@ func (c *HisApiController) GetRegisterInfo() {
|
697
|
697
|
recordDateTime := theTime.Unix()
|
698
|
698
|
|
699
|
699
|
adminInfo := c.GetAdminUserInfo()
|
700
|
|
- patient, _ := service.GetPatientByID(adminInfo.CurrentOrgId, id)
|
|
700
|
+ var patient service.Patients
|
|
701
|
+ if id == 0 {
|
|
702
|
+ patient, _ = service.GetPatientByIDCard(id_card, adminInfo.CurrentOrgId)
|
|
703
|
+ } else {
|
|
704
|
+ patient, _ = service.GetPatientByIDTwo(adminInfo.CurrentOrgId, id)
|
|
705
|
+ }
|
701
|
706
|
patientPrescription, _ := service.FindPatientPrescriptionInfo(adminInfo.CurrentOrgId, id, recordDateTime)
|
702
|
|
-
|
703
|
707
|
miConfig, _ := service.FindMedicalInsuranceInfo(adminInfo.CurrentOrgId)
|
704
|
|
-
|
705
|
|
- fmt.Println(miConfig.SecretKey)
|
706
|
|
-
|
707
|
|
- if patient == nil {
|
|
708
|
+ if patient.ID == 0 {
|
708
|
709
|
c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodePatientNoExist)
|
709
|
710
|
return
|
710
|
711
|
}
|