/******************************************************************************
 * 文件名称: Structs.cs
 * 文件说明: 结构体的封装
 * 当前版本: V1.0
 * 创建日期: 2022-04-12
 *
 * 2020-04-12: 增加 businessDLLInvoke 方法




******************************************************************************/
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PTMedicalInsurance.Variables
{
    //配置信息
    public struct IrisConfigue{
        public string ip;
        public string url;
        public string authorization;
    }

    //接口固定信息
    public struct InterfaceInfo
    {
        public int interfaceDr;
        public int interfaceDr_TY;
        public string interfaceID;
        public string interfaceName;
        public int hisHospitalDr;
        public int hospitalDr;
        public string hospitalName;
        public string hospitalNO;
        public string centerURL;
        public string presCenterURL;
        public string cardURL;
        public string ecURL;
        public string areaCode;
        public string dllName;
        public string version;
        public string signatureType;
        public string recivedSystem;
        public string appId;
        public string privateKey;
        public string publicKey;
        public string Secret;

        public string AK;
        public string SK;

        public string dev_no;
        public string dev_safe_info;
        public string cainfo;
        public string BusinessID;
        public string CreditID;
        public string operatoType;
        public string fileName;
        public string EcCertDecodeTradeNO;

        public string mobilePayURL;

    }

    public struct SelfServiceMachineParam
    {
        public bool isNeedRedirect; //是否需要重定向
        public string cardType;
    }

    //用户信息
    public struct User
    {
        public string ID;
        public string name;
        public string type;
        public string officeID;
        public string officeName;
        public string deptID;
        public string deptName;
    }

    //患者信息
    public struct Patients
    {
        public int adm_Dr;
        public string mdtrtID;
        public string mdtrtIDNew;
        public string name;
        public string gend;
        public string naty;
        public string age;
        public string brdy;
        public string psn_no;
        public string insuType;
        public string medType;
        public string IDNO;//身份证号码
        public string certNO;
        public string certType;
        public string mdtrtcertNO;
        public string mdtrtcertType;
        public string admDiagCode; //Admission Diagnosis
        public string admDiagName;
        public string discDiagCode; //Discharge Diagnosis
        public string discDiagName;
        public string insuplc_admdvs;
        public string mdtrtarea_admvs;   //就医地行政区划
        public string ecToken; //电子凭证令牌
        public Card card;
        public string settlID;
        public string billID;
        public string recordID;
        public string psn_insu_date;
        public string cvlserv_flag;
        public string balc;
        public string emp_name;
        public string psn_type;
        public string psn_insu_stas;
        public string paus_insu_date;
        public string IDType;

        public string disCode;
        public string disName;
        public string disType;

        public string DiseasecCode;  //病种编码
        public string DiseasecName;  //病种名称
        public string DiseasecType;

        public string operCode; //手术编码
        public string operName; //手术名称

        public string SettID_HISJSB;
        public string SettID_YBJSB;

        public string RYorCY;   //1入院 2出院
        public int admType;
        public Boolean bOtherProvLocal;  //是否异地
        public Boolean bChangePIN; //更改社保卡密码
        public Boolean bPresCirul;

        public string token;
        public string payAuthNo;
        public string uldLatlnt;
        public string payOrdId;
        public string payToken;
        public string AdmInDepCode;
        public string admAttendDoctorNO;
        public string ecBusinessType;//电子凭证业务类型

        public bool isWorkInjury;//是否工伤患者
        public string injurySite;//伤害部位

        public string ExpContent; //扩展字段
        public object ExpContentObj;
        public int unifPayStdType; //包干类型
    }

    public struct Card
    {
        public string type;
        public string SN;
        public string password;
        public string level;
        public string NO;
        public string Cardtoken;
        public string SearchAdmKey;
        public string SearchAdmCode;
        public string SearchAdmName;
        public string pKey;
        public string ecBizType;
    }

    //费用信息
    public struct Fees
    {
        public int adm_Dr;
        public string mdtrtID;
        public string feeDetlSn;
        public string orderNO;
        public string hisCode;
        public string hisName;
        public string insuCode;
        public string insuName;
        public string sumamt;
        public string count;
        public string price;
        public string billDeptCode;
        public string billDeptName;
        public string billDrCode;
        public string billDrName;
        public string acceptDeptCode;
        public string acceptDeptName;
        public string orderDrCode;
        public string orderDrName;
        public string limitUseFlag;
        DateTime occurTime;
        public string insuplc_admdvs;
        
    }

    //结算信息
    public struct Settlements
    {
        
        public int adm_Dr;
        public string mdtrtID;
        public string settlID;
        public string billID;
        public string recordID;
        public string clearingType;
        public string clearingWay;
        public string clearingOrgan;
        public string acctPay;
        DateTime occurTime;
        public int hospitalizationsTimes;
        public int hospitalizationsDays;
        public string hisAdmTime;
        public string hisDischargeTime;

        public DateTime settlTime;//结算时间
        public string ordStas;
        public decimal sumamt;
        public decimal ownPayAmount; //超限价自费费用
        public decimal overLimitAmountmt; //超限价自费费用
        public decimal preSelfPayAmount;//先行自付金额
        public decimal inPolicyRangeAmount;//符合政策范围金额
        public decimal actualPayDeductible;//实际支付起付线
        public decimal healthInsurancePay;//基本医疗保险统筹基金支出
        public decimal healthInsuranceRatio;//基本医疗保险统筹基金支付比例
        public decimal civilserviceAllowancePay;//公务员医疗补助资金支出
        public decimal enterpriseSupplementPay;//企业补充医疗保险基金支出
        public decimal seriousIllnessPay;//居民大病保险资金支出
        public decimal largeExpensesSupplementPay;//职工大额医疗费用补助基金支出
        public decimal medicalAssistPay;//医疗救助基金支出
        public decimal hospitalPartAmount;//医院负担金额
        public decimal otherPay;//其他支出
        public decimal fundPaySumamt;//基金支付总额
        public decimal personPaySumamt;//个人负担总金额
        public decimal accountPaySumamt;//个人账户支出

        public decimal personCashPay;//个人现金支出
        public decimal balance; //余额
        public decimal accountMutualAidAmount;//个人账户共济支付金额
        public decimal deposit;//住院押金
        public int confirmFlag; //确认标志
        public string onlineYBFalg; //线上线下标志  Y  N
        public string payOrdId; //订单编号
        public int halfwaySettlementFlag;//中途结算标志
        public int personAccountUsedFlag;//账户支付标志
        public int personSettlementWay;//结算方式

        public string minpacunt_drug_trac_cnt; //本次结算应上传最小包装追溯码数量
        public string mcs_trac_cnt; //本次结算应上传耗材追溯码数量
    }

    //当前环境实时信息
    public struct currentEnvironment
    {
        public  string path;
        public string mac;
        public string ip;

        public string signno;
        public string msgid;
        public string URL;
        public JArray jaSession;

        /// <summary>
        /// 调试模式
        /// </summary>
        public bool enabledDebug;
        public CurEvtExtend ext;
        public bool testMode;



    }
}
