using Newtonsoft.Json.Linq;
using PTMedicalInsurance.Helper;
using PTMedicalInsurance.Variables;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PTMedicalInsurance.Business.Core.SelfServiceMachine.Process.InPat
{
    class VerifyNameConsistency : AbstractProcess
    {
        public override CallResult Process(JObject input)
        {
            //校验HIS姓名与医保姓名是否一致
            if (hBus.checkName(Global.pat.name, out errMsg) != 0)
            {
                outParam = JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString();
                return Exception(outParam);
            }
            else
            {
                outParam = input.ToString();
                return Success();
            }
        }
    }
}
