예제 #1
0
        /// <summary>
        /// 本院医保数据,(未上传医保中心的数据)
        /// </summary>
        /// <param name="ent4BannerDTO"></param>
        public void getMedicalSharingDTO(Ent4BannerDTO ent4BannerDTO)
        {
            Dictionary <string, MedicalSharingDTO[]> dict = null;

            MedicalSharingDTO[] medicalSharingDto = ciOrderQryService.getMedicalSharing(ent4BannerDTO.Id_pat, ent4BannerDTO.Id_hp);
            if (medicalSharingDto != null)
            {
                dict = new Dictionary <string, MedicalSharingDTO[]>();
                dict.Add(ent4BannerDTO.No_hp, medicalSharingDto);
                MedicalSharingCache.setDicMedicalSharing(dict);
            }
        }
예제 #2
0
        /// <summary>
        /// 本院数据验证
        /// </summary>
        /// <param name="context"></param>
        /// <param name="medicalSharingDto"></param>
        /// <param name="ent4BannerDto"></param>
        /// <param name="systemDateTime"></param>
        private static void LocalValiDate(BaseContext context, MedicalSharingDTO[] medicalSharingDto, Ent4BannerDTO ent4BannerDto, DateTime systemDateTime)
        {
            //本院数据 (签署 未交费的)
            MedicalSharingDTO[] LocalmedicalSharingDTO = ciOrderQryService.getMedicalSharing(ent4BannerDto.Id_pat, ent4BannerDto.Id_hp);

            if (medicalSharingDto != null && LocalmedicalSharingDTO != null)
            {
                MedicalSharingDTO infoDto = new MedicalSharingDTO();
                foreach (MedicalSharingDTO medical in medicalSharingDto)
                {
                    if (NoLimitDrug(null, medical))
                    {
                        continue;
                    }

                    foreach (MedicalSharingDTO localmedical in LocalmedicalSharingDTO)
                    {
                        //1同日开药
                        if (medical.Code == localmedical.Code && !localmedical.Sd_srvtp.StartsWith("0103") &&
                            medical.Sd_srvtp != BdSrvDictCodeConst.SD_SRVTP_DRUG_WESTDRUG_DSY)
                        {
                            string[] times = systemDateTime.GetDateTimeFormats('D');
                            if (localmedical.Dt_effe != null &&
                                systemDateTime.GetDateTimeFormats('D')[0].ToString() ==
                                ((DateTime)localmedical.Dt_effe).GetDateTimeFormats('D')[0].ToString())
                            {
                                infoDto.Id_orsrv = medical.Id_orsrv;
                                infoDto.Code_or  = medical.Code_or;
                                if (!localmedical.Sd_srvtp.StartsWith("0103"))
                                {
                                    infoDto.Name_srv = medical.Name_srv + "(" + localmedical.Mm_name + ")";
                                }
                                else
                                {
                                    infoDto.Name_srv = medical.Name_srv;
                                }

                                infoDto.Code_or = localmedical.Code_or;
                                infoDto.Reason  = "该病人" + localmedical.Dt_effe + "在" + localmedical.Dept_name + "本院医生" + localmedical.Doctor_name + "已经开过" +
                                                  medical.Name_srv + "按领量未服用完,按医保要求,今天不能再开";
                            }


                            // 2
                            if (sumDys(localmedical.Dt_entry, (short)localmedical.Days_or, systemDateTime) > 5 &&
                                localmedical.Sd_srvtp != BdSrvDictCodeConst.SD_SRVTP_DRUG_WESTDRUG_DSY)
                            {
                                infoDto.Id_orsrv = medical.Id_orsrv;
                                infoDto.Code_or  = localmedical.Code_or;
                                if (!localmedical.Sd_srvtp.StartsWith("0103"))
                                {
                                    infoDto.Name_srv = medical.Name_srv + "(" + localmedical.Mm_name + ")";
                                }
                                else
                                {
                                    infoDto.Name_srv = medical.Name_srv;
                                }
                                infoDto.Code_or = localmedical.Code_or;
                                if (infoDto.Reason != null)
                                {
                                    infoDto.Reason = "\n 该病人" + localmedical.Dt_effe + "在" + localmedical.Dept_name +
                                                     "本院医生" + localmedical.Doctor_name + "已经开过" + localmedical.Name_srv + "药,\n 用药天数" + localmedical.Days_or +
                                                     "天,按领量未用完,按医保要求,今天不能再开";
                                }
                                else
                                {
                                    infoDto.Reason = "该病人" + localmedical.Dt_effe + "在" + localmedical.Dept_name + "本院医生" + localmedical.Doctor_name + "已经开过" +
                                                     localmedical.Name_srv + "药,\n 用药天数" + localmedical.Days_or +
                                                     "天,按领量未用完,按医保要求,今天不能再开";
                                }
                            }
                        }
                    }
                }
                if (infoDto.Reason != null)
                {
                    infoMedicalSharingDto.Add(infoDto);
                }
            }
        }