|
|
@@ -15,6 +15,8 @@ using System.Reflection;
|
|
|
using System.Data;
|
|
|
using System.Threading;
|
|
|
using HaErBinMIMI.Forms;
|
|
|
+using PTMedicalInsurance.Business.Core.SelfServiceMachine.ProcessScheduler;
|
|
|
+using PTMedicalInsurance.Business.Core.Forms.DischargeAudit;
|
|
|
|
|
|
namespace PTMedicalInsurance
|
|
|
{
|
|
|
@@ -35,8 +37,9 @@ namespace PTMedicalInsurance
|
|
|
HisIrisServices hIS = new HisIrisServices();
|
|
|
MIIrisServices mIS= new MIIrisServices();
|
|
|
InvokeHelper invoker = new InvokeHelper();
|
|
|
- //
|
|
|
+
|
|
|
private string businessType;
|
|
|
+ private string operationType;
|
|
|
|
|
|
public InsuBusiness()
|
|
|
{
|
|
|
@@ -688,11 +691,7 @@ namespace PTMedicalInsurance
|
|
|
//插入患者本次就诊用的参保信息
|
|
|
if (hBus.insertPatCurInsuInfo(patInfo, out outParam) != 0)
|
|
|
{
|
|
|
- if (DialogResult.Yes == MessageBox.Show(outParam, " 是否继续? ", MessageBoxButtons.YesNo))
|
|
|
- {
|
|
|
-
|
|
|
- }
|
|
|
- else
|
|
|
+ if (DialogResult.Yes != MessageBox.Show(outParam, " 是否继续? ", MessageBoxButtons.YesNo))
|
|
|
{
|
|
|
rtnResult = JsonHelper.setExceptionJson(-1, "插入患者本次就诊用的参保信息,请联系管理员!是否继续?", outParam).ToString();
|
|
|
return rtnResult;
|
|
|
@@ -723,7 +722,6 @@ namespace PTMedicalInsurance
|
|
|
//事前分析
|
|
|
if ((Global.curEvt.ext.isOpenAnalysis))
|
|
|
{
|
|
|
-
|
|
|
if (hBus.PreAnalysis("2", "", out errMsg) != 0)
|
|
|
{
|
|
|
MessageBox.Show(errMsg);
|
|
|
@@ -739,10 +737,7 @@ namespace PTMedicalInsurance
|
|
|
}
|
|
|
|
|
|
#region【门诊预结算2206前调用3102医保明细审核事中服务】
|
|
|
- //1.获取3102入参报文
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ //1.获取3102入参报文
|
|
|
//事中分析
|
|
|
if ((Global.curEvt.ext.isOpenAnalysis))
|
|
|
{
|
|
|
@@ -785,9 +780,7 @@ namespace PTMedicalInsurance
|
|
|
{
|
|
|
rtnResult = JsonHelper.setExceptionJson(-1, "结算信息展示", outParam).ToString();
|
|
|
return rtnResult;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
//结算
|
|
|
JObject joData = new JObject();
|
|
|
@@ -1409,5 +1402,118 @@ namespace PTMedicalInsurance
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 自助机
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="InParam"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string SelfServiceMachine(string InParam)
|
|
|
+ {
|
|
|
+ Global.writeLog("SelfServiceMachine 入参:" + JsonHelper.Compress(InParam));
|
|
|
+ //设置返回值,错误信息
|
|
|
+ string errMsg, rtnResult = "", outParam;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ //解析入参
|
|
|
+ if (parseInparam(InParam, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ rtnResult = JsonHelper.setExceptionJson(-1, "parseInparam", errMsg).ToString();
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ //获取pat
|
|
|
+ hBus.GetSelfServiceMachineInfo(businessType, joInParam, out Global.pat);
|
|
|
+ //BS架构调用方式问题,每次调用都需要重新初始化
|
|
|
+ if (init(InParam, out errMsg) != 0)
|
|
|
+ //if (hBus.InitA(InParam, out errMsg) != 0)
|
|
|
+ {
|
|
|
+ rtnResult = JsonHelper.setExceptionJson(-1, "InitA", errMsg).ToString(); ;
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //joInParam.Add("patInfo", errMsg);
|
|
|
+ Global.writeLog($"InitA初始化成功!");
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (businessType)
|
|
|
+ {
|
|
|
+ case "GetPatientInfo"://读取患者信息,该节点无需重定向
|
|
|
+ {
|
|
|
+ //重定向
|
|
|
+ Business.Core.SelfServiceMachine.PatientService patientService = new Business.Core.SelfServiceMachine.PatientService();
|
|
|
+ rtnResult = patientService.GetPatientInfo();
|
|
|
+ Global.writeLog($"rtnResult:{rtnResult}");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "OPReg"://门诊挂号
|
|
|
+ {
|
|
|
+ #region 链条式任务调度者
|
|
|
+ OPRegService service = new OPRegService();
|
|
|
+ rtnResult = service.Charge(operationType, joInParam);
|
|
|
+ break;
|
|
|
+ #endregion
|
|
|
+ }
|
|
|
+ case "OPSettl"://门诊结算
|
|
|
+ {
|
|
|
+ OPSettlementService service = new OPSettlementService();
|
|
|
+ rtnResult = service.Charge(operationType, joInParam);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPInReg"://入院登记
|
|
|
+ {
|
|
|
+ IPAdmRegService service = new IPAdmRegService();
|
|
|
+ rtnResult = service.Register(operationType, joInParam);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPInRegCancel"://取消入院登记
|
|
|
+ {
|
|
|
+ IPAdmRegService service = new IPAdmRegService();
|
|
|
+ rtnResult = service.CancelRegister(operationType, joInParam);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPOutReg"://出院登记
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPUpoload"://住院费用上传
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPPreSettl"://住院预计结算
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case "IPSettl"://住院结算
|
|
|
+ {
|
|
|
+ IPSettlementService service = new IPSettlementService();
|
|
|
+ rtnResult = service.Charge(joInParam);
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ case "DischargeAudit"://费用核查
|
|
|
+ {
|
|
|
+ DischargeAuditService service = new DischargeAuditService();
|
|
|
+ rtnResult = service.Audit(joInParam);
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ {
|
|
|
+ rtnResult = JsonHelper.setExceptionJson(-1, "SelfServiceMachine 交易", "传入的业务编码不对!").ToString();
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ rtnResult = JsonHelper.setExceptionJson(-1, "SelfServiceMachine 交易", ex.Message).ToString();
|
|
|
+ return rtnResult;
|
|
|
+ }
|
|
|
+ finally
|
|
|
+ {
|
|
|
+ Global.writeLog("SelfServiceMachine 出参:" + JsonHelper.Compress(rtnResult));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|