Example #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);
            }
        }
Example #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);
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
     }
 }
Example #7
0
 public void TestMethod1()
 {
     using (TestMqServiceClient client = new TestMqServiceClient())
     {
         Credentials cr = new Credentials
         {
             Organization = "1.2.643.5.1.13.3.25.78.6",
             Token        = "dda0e909-93cd-4549-b7ff-d1caaa1f0bc2"
         };
         Referral[] r = client.SearchMany(cr, new WebReference.Options
         {
             IdMq   = "78154000000101",
             Source = new WebReference.ReferralSource
             {
                 Lpu = new WebReference.Coding
                 {
                     Code   = "1.2.643.5.1.13.3.25.78.125",
                     System = "urn:oid:1.2.643.2.69.1.1.1.64"
                 }
             },
             ReferralInfo = new ReferralInfo
             {
                 MqReferralStatus = new Coding
                 {
                     Code   = "1",
                     System = "urn:oid:1.2.643.2.69.1.1.1.50"
                 }
             }
         }).Referrals;
         //List<string> a = TestOptions.GetReferralId(new WebReference.Options
         //{
         //    IdMq = "78154000000101",
         //    Source = new WebReference.ReferralSource
         //    {
         //        Lpu = new WebReference.Coding
         //        {
         //            Code = "1.2.643.5.1.13.3.25.78.125",
         //            System = "urn:oid:1.2.643.2.69.1.1.1.64"
         //        }
         //    }
         //});
     }
     if (Global.errors != "")
     {
         Assert.Fail(Global.errors);
     }
 }
Example #8
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);
        }
Example #9
0
 public void TestMethod1()
 {
     using (TestMqServiceClient client = new TestMqServiceClient())
     {
         Credentials cr = new Credentials
         {
             Organization = "1.2.643.5.1.13.3.25.78.6",
             Token = "dda0e909-93cd-4549-b7ff-d1caaa1f0bc2"
         };
         Referral[] r = client.SearchMany(cr, new WebReference.Options
         {
             IdMq = "78154000000101",
             Source = new WebReference.ReferralSource
             {
                 Lpu = new WebReference.Coding
                 {
                     Code = "1.2.643.5.1.13.3.25.78.125",
                     System = "urn:oid:1.2.643.2.69.1.1.1.64"
                 }
             },
             ReferralInfo = new ReferralInfo
             {
                 MqReferralStatus = new Coding
                 {
                     Code = "1",
                     System = "urn:oid:1.2.643.2.69.1.1.1.50"
                 }
             }
         }).Referrals;
         //List<string> a = TestOptions.GetReferralId(new WebReference.Options
         //{
         //    IdMq = "78154000000101",
         //    Source = new WebReference.ReferralSource
         //    {
         //        Lpu = new WebReference.Coding
         //        {
         //            Code = "1.2.643.5.1.13.3.25.78.125",
         //            System = "urn:oid:1.2.643.2.69.1.1.1.64"
         //        }
         //    }
         //});
     }
     if (Global.errors != "")
         Assert.Fail(Global.errors);
 }
Example #10
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);
     }
 }
Example #11
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);
        }
Example #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);
            }
        }
Example #13
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);
        }
Example #14
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);
            }
        }