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.Local
{
    public class TestProcess
    {

        public void test(JObject joInput)
        {
            //OPSettlementProcess process = new OPSettlementProcess();
            //process.Process(joInput);

            JObject joSetlinfo = JObject.Parse(JsonHelper.getDestValue(joInput, "output.setlinfo"));

            //济南未返回基金分项，手工拆分
            //JArray fundArray = new LocalPayFundSplitService().Split(joSetlinfo);
            //if (fundArray?.Count > 0)
            //{
            //    joInput["output"]["setldetail"] = fundArray;
            //}

            JObject joParam = new JObject();
            joParam.Add("admID", Global.pat.adm_Dr);
            joParam.Add("recordID", Global.pat.recordID);
            joParam.Add("billID", Global.pat.billID);
            string outParam = "";

            HisIrisServices hIS = new HisIrisServices();

            if (hIS.preSettlementInfo(joParam, joSetlinfo, out outParam) != 0)
            {
                Console.WriteLine(outParam);
            }

            Global.writeLog(joInput.ToString());

        }
    }
}
