Exemple #1
0
        public IActionResult GetDoctorInfo(int doctorId)
        {
            try
            {
                var mdd = _docrSvr.Find(doctorId).ahDtUtil().NewModel <Models.vwCHIS_Code_Doctor>(m => new
                {
                    m.DoctorId,
                    m.DoctorName,
                    m.Gender,
                    m.Birthday,
                    m.EmployeeCode,
                    Mobile       = m.CustomerMobile,
                    EduLevelName = _dicSvr.FindName(m.EduLevel),
                    m.IsDoctorOfPerson,
                    DoctorPicUrl = m.PhotoUrlDef.ahDtUtil().GetDoctorImg(m.Gender),
                    m.PostTitleName,
                    m.DoctorSkillRmk,
                    m.DoctorIsAuthenticated,
                    m.DoctorAuthenticatedTime,
                    m.DoctorCreateTime,
                    m.TreatFee,
                    OtherInfo = new
                    {
                        m.IsForTest,
                        m.IsDoctor,
                        PrincipalShip = _dicSvr.FindName(m.Principalship),
                        m.FileType,
                        m.IsEnable,
                        m.StopDate,
                        m.DutyState,
                        PostTitleId = m.PostTitle,
                        m.OnDutyDate,
                        m.ApprovalDate,
                        m.OutDutyDate,
                        m.MasterTech,
                        ClassGroupId = m.ClassGroupID,
                        m.IsShiftClass,
                        m.Explain,
                        m.Remark,
                        m.sysAppId,

                        m.CustomerNo,
                        m.IDcard,
                        m.InsuranceNo,
                        m.CertificateTypeId,
                        m.CertificateNo,
                        m.CustomerId,
                        m.Email,
                        m.Presfession,
                        MarriageStatus = _dicSvr.FindName(m.Marriage),
                        m.CustomerIsAuthenticated,
                        m.CustomerAuthenticatedTime,
                        m.IsChecking,
                        m.UCusId,
                        m.LoginName,
                        m.DoctorAppId,
                    }
                });
                var rlt = MyDynamicResult(mdd);
                return(Ok(rlt));
            }
            catch (Exception ex) { return(Ok(MyDynamicResult(ex))); }
        }
 public IActionResult GetDispenseDetail(int treatId)
 {
     try
     {
         var mdd = _dispSvr.DispensingDetail(treatId).ahDtUtil().NewModel <DispensingDetailViewModel>(m => new
         {
             m.Treat.DoctorName,
             m.Treat.Diagnosis1,
             m.Customer.CustomerName,
             MailInfo = new
             {
                 m.SelectedAddress.FullAddress,
                 m.SelectedAddress.ContactName,
                 m.SelectedAddress.Mobile,
                 m.SelectedAddress.Remark,
                 m.SelectedAddress.ZipCode
             },
             FormedPrescriptions = m.DispensingDetailSumary.FormedPrescription.Select(a => new
             {
                 Main = new
                 {
                     a.PrescriptionNo,
                     a.Amount,
                     a.ChargeStatus,
                     IsNeedDispense = m.DispensingDetailSumary.IsNeedFormedDispense(a.PrescriptionNo)
                 },
                 Items = m.DispensingDetailSumary.GetFormedDetailByPreNo(a.PrescriptionNo).Select(b => new
                 {
                     b.DrugId,
                     b.DispensingStatus,
                     b.DispensingRmk,
                     b.DrugName,
                     b.DrugModel,
                     b.ManufacturerOrigin,
                     b.OriginPlace,
                     b.Qty,
                     b.UnitName,
                     b.UnitId,
                 })
             }),
             HerbPrescriptions = m.DispensingDetailSumary.HerbPrescription.Select(a => new
             {
                 Main = new
                 {
                     a.HerbTitle,
                     a.Qty,
                     a.DoctorAdvice,
                     a.GivenRemark,
                     GivenTakeTypeName = _dicSvr.FindName(a.GivenTakeTypeId),
                     a.Amount,
                     a.ChargeStatus,
                     IsNeedDispense = m.DispensingDetailSumary.IsNeedHerbDispense(a.PrescriptionNo)
                 },
                 Items = m.DispensingDetailSumary.GetHerbDetailByPreNo(a.PrescriptionNo).Select(b => new
                 {
                     DrugId = b.CnHerbId,
                     b.DispensingStatus,
                     b.DispensingRmk,
                     b.DrugName,
                     b.Qty,
                     b.UnitName,
                     b.ManufacturerOrigin,
                     b.HerbUseTypeName
                 })
             }),
             IdInfos = new
             {
                 m.Customer.CustomerID,
                 m.SelectedAddress.AddressId,
                 m.Treat.TreatId
             }
         });
         var rlt = MyDynamicResult(mdd);
         return(Ok(rlt));
     }
     catch (Exception ex) { return(Ok(MyDynamicResult(ex))); }
 }
Exemple #3
0
        public IActionResult GetTreatDetail(long treatId, bool?fullVer = false)
        {
            try
            {
                var mdd = _treatSvr.GetTreatDetail(treatId).ahDtUtil()
                          .NewModel <PatientDetailViewModel>(m => new
                {
                    m.DoctorTreat.TreatId,
                    m.DoctorTreat.DoctorName,
                    m.DoctorTreat.StationName,
                    m.DoctorTreat.DepartmentName,
                    FeeSumary = new
                    {
                        m.FeeSumary.NeedPayAmount,
                        m.FeeSumary.TreatAmount,
                        m.FeeSumary.TreatFee,
                        m.FeeSumary.TransFee,
                    },
                    Customer = new
                    {
                        m.DoctorTreat.CustomerName,
                        m.DoctorTreat.TreatCustomerAge,
                        CustomerGender = m.DoctorTreat.Gender,
                        CustomerPicUrl = m.CHIS_Code_Customer.PhotoUrlDef.ahDtUtil().GetCustomerImg(m.CHIS_Code_Customer.Gender)
                    },
                    #region Treat
                    Treat = new
                    {
                        m.DoctorTreat.Height,
                        m.DoctorTreat.Weight,
                        m.DoctorTreat.Temperature,
                        m.DoctorTreat.TempSource,
                        m.DoctorTreat.BloodPress_H,
                        m.DoctorTreat.BloodPress_L,
                        m.DoctorTreat.AliveChildrenNum,
                        m.DoctorTreat.BirthChildrenNum,
                        m.DoctorTreat.Complain,
                        m.DoctorTreat.Examination,
                        m.DoctorTreat.Gestation,
                        m.DoctorTreat.IsMenstruation,
                        m.DoctorTreat.MenstruationCircleDay,
                        m.DoctorTreat.MenstruationDay,
                        m.DoctorTreat.MenstruationDays,
                        m.DoctorTreat.MenstruationEndOldYear,
                        m.DoctorTreat.MenstruationStartOldYear,
                        m.DoctorTreat.PresentIllness,
                        m.DoctorTreat.PregnancyNum,
                        m.DoctorTreat.Pulse,
                        m.DoctorTreat.RespiratoryPerMinute,

                        m.DoctorTreat.TreatAdvice,
                        m.DoctorTreat.Diagnosis1,
                        IsDiagnosis1Unsure = m.DoctorTreat.FstIsDiag,
                        m.DoctorTreat.FirstTreatTime,
                        LastTreatTime = m.DoctorTreat.TreatTime,

                        m.DoctorTreat.Diagnosis2,
                        m.DoctorTreat.Diagnosis3,
                        IsDiagnosis2Unsure = m.DoctorTreat.SecIsDiag,
                        IsDiagnosis3Unsure = m.DoctorTreat.ThrIsDiag,
                    },
                    #endregion
                    FormedPrescriptionNos = m.FormedList.Select(a => new { a.Main.PrescriptionNo, a.Main.ChargeStatus }),
                    HerbPrescriptionNos   = m.HerbList.Select(a => new { a.Main.PrescriptionNo, a.Main.ChargeStatus }),
                    Prescriptions         = fullVer == false ? null : new
                    {
                        #region 成药
                        Formeds = m.FormedList.Select(a => new
                        {
                            Main = new
                            {
                                a.Main.PrescriptionNo,
                                a.Main.Amount,
                                a.Main.ChargeStatus,
                                a.Main.CreateTime,
                                a.Main.DoctorSignUrl,
                                a.Main.RxDoctorSignUrl
                            },
                            Items = a.Details.Select(b => new
                            {
                                b.DrugName,
                                b.DrugModel,
                                b.ManufacturerOrigin,
                                b.Qty,
                                b.UnitName,
                                b.Price,
                                b.Amount,
                                b.OriginPlace,
                                b.UnitId,
                                b.DispensingStatus,
                                b.DispensingRmk,
                                b.DrugId,
                                AdviceItemId = b.AdviceFormedId,
                            }),
                            a.IsNeedRxSign,
                            a.IsRxSigned
                        }),
                        #endregion
                        #region 中药
                        Herbs = m.HerbList.Select(a => new
                        {
                            Main = new
                            {
                                a.Main.PrescriptionNo,
                                a.Main.Amount,
                                a.Main.ChargeStatus,
                                a.Main.HerbTitle,
                                a.Main.Qty,
                                GivenTakeTypeName = _dicSvr.FindName(a.Main.GivenTakeTypeId),
                                a.Main.GivenRemark,
                                a.Main.GivenTakeTypeId,
                                a.Main.DoctorSignUrl,
                                a.Main.RxDoctorSignUrl
                            },
                            Items = a.Details.Select(b => new
                            {
                                b.DrugName,
                                b.HerbUseTypeName,
                                b.OriginPlace,
                                b.Qty,
                                b.UnitName,
                                b.Price,
                                b.Amount,
                                b.DispensingStatus,
                                b.DispensingRmk,
                                AdviceItemId = b.Id,
                                DrugId       = b.CnHerbId,
                                b.ManufacturerOrigin,
                                b.UnitId,
                            }),
                            a.IsNeedRxSign,
                            a.IsRxSigned
                        }),
                        #endregion
                    },
                    #region 附加费
                    ExtraFees = m.TreatExtraFees.Select(a => new
                    {
                        a.FeeName,
                        a.TreatFeePrice,
                        a.TreatFeeOriginalPrice,
                        a.Qty,
                        a.Amount,
                        a.ChargeStatus,
                        a.FeeRemark,
                    }),
                    #endregion

                    #region IdInfos and Additions
                    IdInfos = new
                    {
                        m.DoctorTreat.CustomerId,
                        TreatDoctorId = m.DoctorTreat.DoctorId,
                        m.CHIS_Register.RxDoctorId,
                        m.DoctorTreat.StationId,
                    },
                    Additions = new
                    {
                        RegisterId = m.CHIS_Register.RegisterID,
                        m.CHIS_Register.RegisterDate,
                        m.RegistDepartment,
                    }
                    #endregion
                });
                var rlt = MyDynamicResult(mdd);
                return(Ok(rlt));
            }
            catch (Exception ex) { return(Ok(MyDynamicResult(ex))); }
        }