public override bool Register(ClinicRegisterEntity clinicRegisterEntity)
 {
     if (clinicRegisterEntity.IsHealthPlatform)
     {
         Console.WriteLine("处理健康平台事宜!");
     }
     return(_clinicRegister.Register(clinicRegisterEntity));
 }
 public override bool Register(ClinicRegisterEntity clinicRegisterEntity)
 {
     if (clinicRegisterEntity.IsMedical)
     {
         Console.WriteLine("处理医保挂号登记事宜!");
     }
     return(_clinicRegister.Register(clinicRegisterEntity));
 }
 public override bool Register(ClinicRegisterEntity clinicRegisterEntity)
 {
     if (clinicRegisterEntity.IsSimpleRegisterClinic)
     {
         return(SimpleRegister(clinicRegisterEntity));
     }
     else
     {
         return(CommonRegister(clinicRegisterEntity));
     }
 }
        static void Register(ClinicRegisterEntity clinicRegisterEntity)
        {
            //医保登记
            var clinicRegister = new MedicalRegister();
            //健康平台登记
            var healthPlatformRegister = new HealthPlatformRegister();
            //本地his挂号,要么简易挂号,要么普通挂号
            var simpleRegister = new SimpleClinicRegister();

            //设置顺序,1、医保,2、健康平台 3、(简易或普通)挂号
            clinicRegister.Next(healthPlatformRegister);
            healthPlatformRegister.Next(simpleRegister);

            clinicRegister.Register(clinicRegisterEntity);
        }
        static ClinicRegisterEntity GetClinicRegister()
        {
            var clinicRegisterEntity = new ClinicRegisterEntity()
            {
                IsMedical              = true,
                IsHealthPlatform       = true,
                IsSimpleRegisterClinic = true,
                Patient = new Patient()
                {
                    Name = "张三", Age = 20, Sex = Sex.女
                }
            };

            return(clinicRegisterEntity);
        }
 /// <summary>
 /// 登记
 /// </summary>
 /// <returns></returns>
 public abstract bool Register(ClinicRegisterEntity clinicRegisterEntity);
 /// <summary>
 /// 普通挂号
 /// </summary>
 /// <param name="clinicRegisterEntity">挂号实体类</param>
 /// <returns></returns>
 bool CommonRegister(ClinicRegisterEntity clinicRegisterEntity)
 {
     Console.WriteLine("普通挂号!");
     return(true);
 }
 /// <summary>
 /// 简易挂号
 /// </summary>
 /// <param name="clinicRegisterEntity">挂号实体类</param>
 /// <returns></returns>
 bool SimpleRegister(ClinicRegisterEntity clinicRegisterEntity)
 {
     Console.WriteLine("简易挂号!");
     return(true);
 }