Beispiel #1
0
 public void SendResultTest()
 {
     //住院:201608928,bz,湖南省妇幼医院_广州邦弘
     //门诊:10152376,bz,湖南省妇幼医院_广州邦弘
     var                args                = "172280,bz,广州中山附一_上海岱嘉";
     var                argsAdv             = "172280^cg^1^old^save";
     var                values              = args.Split(',');
     var                hospName            = values[2]; //医院名称
     var                pathoNo             = values[0]; //病理号
     ISendPisResult     sender              = PisResultSenderFactory.GerResultSender(hospName);
     ISendPisResultPlus senderPisResultPlus = PisResultSenderFactory.GerResultSenderPlus(hospName);
     //sender.SendResult(pathoNo);
     //senderPisResultPlus.SendResult(argsAdv);
 }
Beispiel #2
0
        public void  CallSendResultPlus()
        {
            var args = "201700005^cg^1^old^save";

            if (args.IndexOf("^") > -1)
            {
                try
                {
                    string[] aa  = args.Split('^');
                    var      blh = aa[0].ToString();
                    blh = aa[0].ToString();
                    var bglx         = aa[1].ToString().ToLower(); //cg/bd/bc
                    var reportNumber = aa[2].ToString();
                    var czlb         = aa[3].ToString().ToLower(); //new/old
                    var dz           = aa[4].ToString().ToLower(); //save/qxsh/dy/qxdy

                    var reportType = ReportType.常规报告;
                    switch (bglx)
                    {
                    case "cg":
                    default:
                        reportType = ReportType.常规报告;
                        break;

                    case "bd":
                        reportType = ReportType.冰冻报告;
                        break;

                    case "bc":
                        reportType = ReportType.补充报告;
                        break;
                    }
                    EditType  editType = czlb == "new" ? EditType.新建 : EditType.修改;
                    PisAction pisAction;
                    switch (dz)
                    {
                    case "save":
                        pisAction = PisAction.新登记;
                        break;

                    case "qxsh":
                        pisAction = PisAction.取消审核;
                        break;

                    case "dy":
                        pisAction = PisAction.打印;
                        break;

                    case "qxdy":
                        pisAction = PisAction.取消打印;
                        break;

                    default:
                        pisAction = PisAction.未知;
                        break;
                    }

                    var hospName = "广州中山附一_上海岱嘉";

                    ISendPisResultPlus sender = PisResultSenderFactory.GerResultSenderPlus(hospName);
                    sender.SendResult(blh, reportType, reportNumber, editType, pisAction, hospName);
                }
                catch
                {
                    throw;
                }
            }
        }
Beispiel #3
0
        public static bool CallSendResultPlus(string args)
        {
            log.WriteMyLog("EXE被调用,入参:" + args);

            if (args.IndexOf("^") > -1)
            {
                log.WriteMyLog("开始复杂接口处理,入参:" + args);

                var        blh  = "";
                var        bglx = ""; //cg/bd/bc
                var        bgxh = "";
                var        czlb = ""; //new/old
                var        dz   = ""; //save/qxsh/dy/qxdy
                EditType   editType;
                PisAction  pisAction;
                string     hospName;
                ReportType reportType;

                try
                {
                    string[] aa = args.Split('^');
                    blh  = aa[0].ToString();
                    bglx = aa[1].ToString().ToLower(); //cg/bd/bc
                    bgxh = aa[2].ToString();           //bgxh
                    czlb = aa[3].ToString().ToLower(); //new/old
                    dz   = aa[4].ToString().ToLower(); //save/qxsh/dy/qxdy

                    reportType = ReportType.常规报告;
                    switch (bglx)
                    {
                    case "cg":
                    default:
                        reportType = ReportType.常规报告;
                        break;

                    case "bd":
                        reportType = ReportType.冰冻报告;
                        break;

                    case "bc":
                        reportType = ReportType.补充报告;
                        break;
                    }
                    editType = czlb == "new" ? EditType.新建 : EditType.修改;
                    switch (dz)
                    {
                    case "save":
                        pisAction = PisAction.新登记;
                        break;

                    case "qxsh":
                        pisAction = PisAction.取消审核;
                        break;

                    case "dy":
                        pisAction = PisAction.打印;
                        break;

                    case "qxdy":
                        pisAction = PisAction.取消打印;
                        break;

                    default:
                        pisAction = PisAction.未知;
                        break;
                    }

                    hospName = IniFiles.GetInstant("sz.ini").ReadString("savetohis", "yymc", "123").Replace("\0", "");
                }
                catch
                {
                    log.WriteMyLog("传入参数解析出错");
                    return(true);
                }

                try
                {
                    ISendPisResultPlus sender = PisResultSenderFactory.GerResultSenderPlus();
                    sender.SendResult(blh, reportType, bgxh, editType, pisAction, hospName);
                }
                catch (Exception e)
                {
                    log.WriteMyLog("接口调用时出错,入参=:" + args + "\r\n" +
                                   "异常信息:+\r\n" + e);
                    return(true);
                }
            }
            return(false);
        }