Ejemplo n.º 1
0
        public void StatusPatientDocumentIssue_curStat1()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral    referral = (new SetData()).MinRegister();
                Credentials cr       = new Credentials {
                    Organization = idLpu, Token = guid
                };
                var result = mq.Register(cr, referral);

                //Задаём статус "Выдано пациенту"
                referral = (new SetData()).SetStatus_PatientDocumentIssue(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                if (res2.MqReferralStatus.Code != "3")
                {
                    Global.errors1.Add("Неверный статус:" + res2.MqReferralStatus.Code + "");
                }
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Ejemplo n.º 2
0
        public void StatusAgreedInTargedMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                var result = mq.Register(cr, referral);

                //Задаём статус "Выдано пациенту"
                referral = (new SetData()).SetStatus_PatientDocumentIssue(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                //Задаём статус "Признано обоснованным в целевой МО"
                referral = (new SetData()).SetStatus_AgreedInTargedMO(result.IdMq);
                var res3 = mq.UpdateFromTargetMo(cr, referral);

                if (res3.MqReferralStatus.Code != "4")
                    Global.errors1.Add("Неверный статус:" + res3.MqReferralStatus.Code + "");
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Ejemplo n.º 3
0
        public void StatusCancellation_CurStat2()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral    referral = (new SetData()).MinRegister();
                Credentials cr       = new Credentials {
                    Organization = idLpu, Token = guid
                };
                var result = mq.Register(cr, referral);

                //Задаём статус "Согласовано в направляющей МО"
                referral = (new SetData()).SetStatus_AgreedInSourcedMO(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                //Задаём статус "Аннулировано"
                referral = (new SetData()).MinCancellation(result.IdMq);
                var res3 = mq.Cancellation(cr, referral);

                if (res3.MqReferralStatus.Code != "0")
                {
                    Global.errors1.Add("Неверный статус:" + res3.MqReferralStatus.Code + "");
                }
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Ejemplo n.º 4
0
        public void StatusRegister()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Referral    referral = (new SetData()).MinRegister();
                Credentials cr       = new Credentials {
                    Organization = idLpu, Token = guid
                };
                var result = mq.Register(cr, referral);

                if (result.MqReferralStatus.Code != "1")
                {
                    Global.errors1.Add("Неверный статус:" + result.MqReferralStatus.Code + "");
                }
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Ejemplo n.º 5
0
        //Задаём статус "Согласовано в направляющей МО"
        public void StatusAgreedInSourcedMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус "Зарегистрировано в РЕГИЗ.УО"
                Referral    referral = (new SetData()).SetStatusRegisterMin();
                Credentials cr       = new Credentials {
                    Organization = idLpu, Token = guid
                };
                var result = mq.Register(cr, referral);

                //Задаём статус "Согласовано в направляющей МО"
                // с помощью метода UpdateFromSourcedMo()
                referral = (new SetData()).SetStatusAgreedInSourcedMO_UpdateFromSourcedMo(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                if (res2.MqReferralStatus.Code != "Согласовано в направляющей МО")
                {
                    Global.errors1.Add("Неверный статус:" + result.MqReferralStatus.Code + "");
                }
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Ejemplo n.º 6
0
 public void MinRegister()
 {
     using (TestMqServiceClient mq = new TestMqServiceClient())
     {
         Referral referral = (new SetData()).MinRegister();
         Credentials cr = new Credentials { Organization = idLpu, Token = guid };
         var result = mq.Register(cr, referral);
         if (Global.errors == "")
             Assert.Pass();
         else
             Assert.Fail(Global.errors);
     }
 }
Ejemplo n.º 7
0
        public void StatusRegister()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Referral referral = (new SetData()).SetStatusRegisterMin();
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                var result = mq.Register(cr, referral);

                if (result.MqReferralStatus.Code != "Зарегистрировано в РЕГИЗ.УО")
                    Global.errors1.Add("Неверный статус:" + result.MqReferralStatus.Code + "");
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Ejemplo n.º 8
0
 public void MinRegister()
 {
     using (TestMqServiceClient mq = new TestMqServiceClient())
     {
         Referral    referral = (new SetData()).MinRegister();
         Credentials cr       = new Credentials {
             Organization = idLpu, Token = guid
         };
         var result = mq.Register(cr, referral);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Ejemplo n.º 9
0
        public void StatusAgreedInSourcedMO_CurStat1()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                var result = mq.Register(cr, referral);

                //Задаём статус "Согласовано в направляющей МО"
                referral = (new SetData()).SetStatus_AgreedInSourcedMO(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                if (res2.MqReferralStatus.Code != "2")
                    Global.errors1.Add("Неверный статус:" + res2.MqReferralStatus.Code + "");
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Ejemplo n.º 10
0
        public void FullRegister()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Referral referral = (new SetData()).FullRegister();
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                try
                {
                    var result = mq.Register(cr, referral);
                }
                catch (FaultException<MqTests.WebReference.MqFault> e)
                {
                    string s = e.Detail.MqFaults[0].Message;
                }

                //if (Global.errors == "")
                //    Assert.Pass();
                //else
                //    Assert.Fail(Global.errors);
            }
        }
Ejemplo n.º 11
0
        public void StatusCancellation_CurStat1()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                //Задаём статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                var result = mq.Register(cr, referral);

                //Задаём статус "Аннулировано"
                referral = (new SetData()).MinCancellation(result.IdMq);
                var res2 = mq.Cancellation(cr, referral);

                if (res2.MqReferralStatus.Code != "0")
                    Global.errors1.Add("Неверный статус:" + res2.MqReferralStatus.Code + "");
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Ejemplo n.º 12
0
        public void FullRegister()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Referral    referral = (new SetData()).FullRegister();
                Credentials cr       = new Credentials {
                    Organization = idLpu, Token = guid
                };
                try
                {
                    var result = mq.Register(cr, referral);
                }
                catch (FaultException <MqTests.WebReference.MqFault> e)
                {
                    string s = e.Detail.MqFaults[0].Message;
                }

                //if (Global.errors == "")
                //    Assert.Pass();
                //else
                //    Assert.Fail(Global.errors);
            }
        }