示例#1
0
        private SqlParameter[] Getyydjparas(SendAppBillResult data, string patid)
        {
            var agestr = data.Age?.Split("岁".ToCharArray());
            var age    = agestr == null ? 0 : int.Parse(agestr[0]);

            return(new SqlParameter[] {
                new SqlParameter("@Bzyno", data.DocumentID),
                new SqlParameter("@yzh", data.OrdRowID),
                new SqlParameter("@patientid", data.CredentialNo),
                new SqlParameter("@jzh", data.AdmNo),
                new SqlParameter("@bpatage", age),
                new SqlParameter("@pattel", data.Telephone),
                new SqlParameter("@patsex", data.Sex),
                new SqlParameter("@patname", data.Name),
                new SqlParameter("@bcwno", data.BedNo),
                new SqlParameter("@sendunit", data.OrdLoc),
                new SqlParameter("@patid", patid),
                new SqlParameter("@Bdate", data.BookDate),
                new SqlParameter("@Booktime", data.BookTime),
                new SqlParameter("@Pataddr", data.Address),
                new SqlParameter("@Pnative", data.Nation),
                new SqlParameter("@Bfeature", data.ClinicDiagnose),
                new SqlParameter("@Senddr", data.OrdDoctor),
                new SqlParameter("@DJZT", 0),
                new SqlParameter("@yc", data.RegNo)
            });
        }
示例#2
0
        private SqlParameter[] Getcommonparas(SendAppBillResult data, string patid, int cid)
        {
            var chztypecode = 9;
            var chztype     = "其它";

            switch (data.AdmType?.ToUpper())
            {
            case "O":
            {
                chztypecode = 1;
                chztype     = "门诊";
                break;
            }

            case "E":
            {
                chztypecode = 2;
                chztype     = "急诊";
                break;
            }

            case "I":
            {
                chztypecode = 3;
                chztype     = "住院";
                break;
            }
            }
            var sqlparams1 = new SqlParameter[] {
                new SqlParameter("@Cid", cid),
                new SqlParameter("@Cpatid", patid),
                // new SqlParameter("@Cblid", 0),
                new SqlParameter("@Chztype", chztype),
                new SqlParameter("@Cpatname", data.Name),
                new SqlParameter("@Croom", data.Room),
                new SqlParameter("@Croomcode", data.RoomCode),
                new SqlParameter("@Cward", data.Ward),
                new SqlParameter("@Cwardcode", data.WardCode),
                new SqlParameter("@Csendcode", data.OrdLocCode),
                new SqlParameter("@Cjccode", data.ArcimCode),
                new SqlParameter("@Cjcxm", data.OrdName),
                new SqlParameter("@Csexcode", data.SexCode),
                new SqlParameter("@Chztypecode", chztypecode),
                new SqlParameter("@cyzh", data.OrdRowID),
                new SqlParameter("@cjzh", data.AdmNo),
                new SqlParameter("@cdjh", data.RegNo)
            };

            return(sqlparams1);
        }
示例#3
0
 public void SaveSendAppBillResult(SendAppBillResult data)
 {
     using (var con = new SqlConnection(this.GetDbConByOrdName(data.OrdName)))
     {
         var sqlps = new SqlParameter[] { new SqlParameter("@strlen", "000"),
                                          new SqlParameter("@Save", 0) };
         var            patid     = SqlHelper.ExecuteScalar(con, CommandType.StoredProcedure, "patinfo.dba.GetPatID", sqlps).ToString();
         SqlParameter[] sqlparams = Getyydjparas(data, patid);
         var            fieldstr  = string.Join(",", sqlparams.Select(x => x.ParameterName.Replace("@", "")));
         var            valuestr  = string.Join(",", sqlparams.Select(x => x.ParameterName));
         SqlHelper.ExecuteNonQuery(con, CommandType.Text,
                                   $"Insert into yydj ({fieldstr}) VALUES ({valuestr});", sqlparams);
         var            maxcid     = SqlHelper.ExecuteScalar(con, CommandType.Text, "select isnull(max(cid),0) maxcid from communion").ToString();
         var            cid        = int.Parse(maxcid) + 1;
         SqlParameter[] sqlparams1 = Getcommonparas(data, patid, cid);
         var            fieldstr1  = string.Join(",", sqlparams1.Select(x => x.ParameterName.Replace("@", "")));
         var            valuestr1  = string.Join(",", sqlparams1.Select(x => x.ParameterName));
         SqlHelper.ExecuteNonQuery(con, CommandType.Text,
                                   $"Insert into communion ({fieldstr1}) VALUES ({valuestr1});", sqlparams1);
         con.Close();
     }
 }
示例#4
0
        public SendAppBillResult LoadSendAppBillResult(string xml)
        {
            var data = new SendAppBillResult();
            var doc  = new XmlDocument();

            doc.LoadXml(xml);
            var root = doc.SelectSingleNode("//SendAppBill");

            if (root != null)
            {
                data.RegNo                = (root.SelectSingleNode("RegNo")).InnerText;
                data.CardNo               = (root.SelectSingleNode("CardNo")).InnerText;
                data.Name                 = (root.SelectSingleNode("Name")).InnerText;
                data.SexCode              = (root.SelectSingleNode("SexCode")).InnerText;
                data.Sex                  = (root.SelectSingleNode("Sex")).InnerText;
                data.Age                  = (root.SelectSingleNode("Age")).InnerText;
                data.BirthDay             = (root.SelectSingleNode("BirthDay")).InnerText;
                data.Marry                = (root.SelectSingleNode("Marry")).InnerText;
                data.Address              = (root.SelectSingleNode("Address")).InnerText;
                data.Telephone            = (root.SelectSingleNode("Telephone")).InnerText;
                data.CredentialNo         = (root.SelectSingleNode("CredentialNo")).InnerText;
                data.CredentialType       = (root.SelectSingleNode("CredentialType")).InnerText;
                data.NationCode           = (root.SelectSingleNode("NationCode")).InnerText;
                data.Nation               = (root.SelectSingleNode("Nation")).InnerText;
                data.OccupationCode       = (root.SelectSingleNode("OccupationCode")).InnerText;
                data.Occupation           = (root.SelectSingleNode("Occupation")).InnerText;
                data.DocumentID           = (root.SelectSingleNode("DocumentID")).InnerText;
                data.InsuranceNo          = (root.SelectSingleNode("InsuranceNo")).InnerText;
                data.AdmType              = (root.SelectSingleNode("AdmType")).InnerText;
                data.AdmNo                = (root.SelectSingleNode("AdmNo")).InnerText;
                data.AdmSerialNum         = (root.SelectSingleNode("AdmSerialNum")).InnerText;
                data.FeeType              = (root.SelectSingleNode("FeeType")).InnerText;
                data.WardCode             = (root.SelectSingleNode("WardCode")).InnerText;
                data.Ward                 = (root.SelectSingleNode("Ward")).InnerText;
                data.RoomCode             = (root.SelectSingleNode("RoomCode")).InnerText;
                data.Room                 = (root.SelectSingleNode("Room")).InnerText;
                data.BedNo                = (root.SelectSingleNode("BedNo")).InnerText;
                data.ClinicDiagnose       = (root.SelectSingleNode("ClinicDiagnose")).InnerText;
                data.ClinicDisease        = (root.SelectSingleNode("ClinicDisease")).InnerText;
                data.OperationInfo        = (root.SelectSingleNode("OperationInfo")).InnerText;
                data.OtherInfo            = (root.SelectSingleNode("OtherInfo")).InnerText;
                data.AdmDocRowID          = (root.SelectSingleNode("AdmDocRowID")).InnerText;
                data.AdmDocCode           = (root.SelectSingleNode("AdmDocCode")).InnerText;
                data.AdmDoc               = (root.SelectSingleNode("AdmDoc")).InnerText;
                data.OrdRowID             = (root.SelectSingleNode("OrdRowID")).InnerText;
                data.ArcimCode            = (root.SelectSingleNode("ArcimCode")).InnerText;
                data.OrdName              = (root.SelectSingleNode("OrdName")).InnerText;
                data.OrdPrice             = (root.SelectSingleNode("OrdPrice")).InnerText;
                data.OrdBillStatus        = (root.SelectSingleNode("OrdBillStatus")).InnerText;
                data.OrdPriorityCode      = (root.SelectSingleNode("OrdPriorityCode")).InnerText;
                data.OrdPriority          = (root.SelectSingleNode("OrdPriority")).InnerText;
                data.OrdHospital          = (root.SelectSingleNode("OrdHospital")).InnerText;
                data.OrdHospitalCode      = (root.SelectSingleNode("OrdHospitalCode")).InnerText;
                data.OrdExeHospital       = (root.SelectSingleNode("OrdExeHospital ")).InnerText;
                data.OrdExeHospitalCode   = (root.SelectSingleNode("OrdExeHospitalCode")).InnerText;
                data.ARCItemCat           = (root.SelectSingleNode("ARCItemCat")).InnerText;
                data.ARCItemCatCode       = (root.SelectSingleNode("ARCItemCatCode")).InnerText;
                data.OECOrderCategory     = (root.SelectSingleNode("OECOrderCategory")).InnerText;
                data.OECOrderCategoryCode = (root.SelectSingleNode("OECOrderCategoryCode")).InnerText;
                data.OrdLocCode           = (root.SelectSingleNode("OrdLocCode")).InnerText;
                data.OrdLoc               = (root.SelectSingleNode("OrdLoc")).InnerText;
                data.OrdDoctorCode        = (root.SelectSingleNode("OrdDoctorCode")).InnerText;
                data.OrdDoctor            = (root.SelectSingleNode("OrdDoctor")).InnerText;
                data.OrdDate              = (root.SelectSingleNode("OrdDate")).InnerText;
                data.OrdTime              = (root.SelectSingleNode("OrdTime")).InnerText;
                data.OrdExeLocCode        = (root.SelectSingleNode("OrdExeLocCode")).InnerText;
                data.OrdExeLoc            = (root.SelectSingleNode("OrdExeLoc")).InnerText;
                data.SampleCode           = (root.SelectSingleNode("SampleCode")).InnerText;
                data.SampleName           = (root.SelectSingleNode("SampleName")).InnerText;
                data.SendFlag             = (root.SelectSingleNode("SendFlag")).InnerText;
                data.NoteInfo             = (root.SelectSingleNode("NoteInfo")).InnerText;
                data.Position             = (root.SelectSingleNode("Position")).InnerText;
                data.Purpose              = (root.SelectSingleNode("Purpose")).InnerText;
                data.CurCase              = (root.SelectSingleNode("CurCase")).InnerText;
                data.Destination          = (root.SelectSingleNode("Destination")).InnerText;
                data.AutoFlag             = (root.SelectSingleNode("AutoFlag")).InnerText;
                data.BookDate             = (root.SelectSingleNode("BookDate")).InnerText;
                data.BookTime             = (root.SelectSingleNode("BookTime")).InnerText;
                data.PhyAddress           = (root.SelectSingleNode("PhyAddress")).InnerText;
                data.SpecialMarket        = (root.SelectSingleNode("SpecialMarket")).InnerText;
                data.SpecialPerson        = (root.SelectSingleNode("SpecialPerson")).InnerText;
                data.SpecialDate          = (root.SelectSingleNode("SpecialDate")).InnerText;
                data.StopDocCode          = (root.SelectSingleNode("StopDocCode")).InnerText;
                data.StopDocDesc          = (root.SelectSingleNode("StopDocDesc")).InnerText;
                data.Modality             = (root.SelectSingleNode("Modality")).InnerText;
            }
            return(data);
        }