コード例 #1
0
ファイル: Cancellation.cs プロジェクト: nbIxMaN/MQTESTS
        public void MinCancellation_AfterAgreedSourced()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                referral = (new SetData()).MinAgreedFromSourcedMo(result.IdMq);
                var res2 = mq.AgreedFromSourcedMo(cr, referral);

                referral = (new SetData()).MinCancellation(result.IdMq);
                var resultCancel = mq.Cancellation(cr, referral);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #2
0
ファイル: Cancellation.cs プロジェクト: nbIxMaN/MQTESTS
        public void MinCancellation_AfterChangeRes()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                referral = (new SetData()).MinPatientDocumentIssue(result.IdMq);
                var res2 = mq.PatientDocumentIssue(cr, referral);

                referral = (new SetData()).MinChangePlannedResource(result.IdMq);
                var res3 = mq.ChangePlannedResource(cr, referral);

                referral = (new SetData()).MinCancellation(result.IdMq);
                var resultCancel = mq.Cancellation(cr, referral);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #3
0
        public void UpdateFromSourcedMo_Agreed()
        {
            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()).MinUpdateFromSourcedMo(result.IdMq);
                referral.EventsInfo = new EventsInfo
                {
                    Source = new EventSource
                    {
                        IsReferralReviewed = true,
                        ReferralCreateDate = ReferralData.eventsInfo.Source.ReferralCreateDate,
                        ReferralReviewDate = ReferralData.eventsInfo.Source.ReferralReviewDate
                    }
                };
                var updateResult = mq.UpdateFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #4
0
        public void FullChangeTargetMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Referral referral = (new SetData()).MinRegister();
                referral.ReferralSurvey = new Survey
                {
                    SurveyOrgan = ReferralData.survey.SurveyOrgan,
                    SurveyType = ReferralData.survey.SurveyType
                };
                referral.Target = new ReferralTarget
                {
                    Lpu = ReferralData.referralTarget.Lpu
                };
                var result = mq.Register(cr, referral);

                //Изменяем целевую МО
                referral = (new SetData()).FullSetOrChangeTargetMO(result.IdMq);
                var res2 = mq.SetOrChangeTargetMo(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #5
0
        public void SearchOne_IdMq()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                //Задаём IdMq, находим его
                Options opt = new Options();
                //"78154000000261"
                opt.IdMq = result.IdMq;
                var res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #6
0
        public void FullAgreedFromTargetMo()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                //"Выдано пациенту"
                referral = (new SetData()).MinPatientDocumentIssue(result.IdMq);
                var res2 = mq.PatientDocumentIssue(cr, referral);

                referral = (new SetData()).FullAgreedFromTargetMo(result.IdMq);
                var resultAgreed = mq.AgreedFromTargetMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #7
0
        public void FullChangeTargetMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                referral.ReferralSurvey = new Survey
                {
                    SurveyOrgan = ReferralData.survey.SurveyOrgan,
                    SurveyType  = ReferralData.survey.SurveyType
                };
                referral.Target = new ReferralTarget
                {
                    Lpu = ReferralData.referralTarget.Lpu
                };
                var result = mq.Register(cr, referral);

                //Изменяем целевую МО
                referral = (new SetData()).FullSetOrChangeTargetMO(result.IdMq);
                var res2 = mq.SetOrChangeTargetMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #8
0
        public void UpdateFromSourcedMo_Agreed()
        {
            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()).MinUpdateFromSourcedMo(result.IdMq);
                referral.EventsInfo = new EventsInfo
                {
                    Source = new EventSource
                    {
                        IsReferralReviewed = true,
                        ReferralCreateDate = ReferralData.eventsInfo.Source.ReferralCreateDate,
                        ReferralReviewDate = ReferralData.eventsInfo.Source.ReferralReviewDate
                    }
                };
                var updateResult = mq.UpdateFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #9
0
        public void SearchOne_Full()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).FullRegister();
                var      result   = mq.Register(cr, referral);

                //Задаём Options по зарегистрированному направлению и ищем его
                Coding cod = new Coding {
                    Code = "1", System = Dictionary.REFERRAL_STATUS, Version = "1"
                };
                Options opt  = (new SetData()).GetRefferalReturnOptions_SearchOne(referral, referral.Patient.Privileges, result.IdMq, result.MqReferralStatus);
                var     res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #10
0
        public void SearchOne_Test()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                //Задаём Options по зарегистрированному направлению и ищем его
                Options opt  = (new SetData()).GetRefferalReturnOptions_SearchOne(referral, null, result.IdMq, result.MqReferralStatus);
                var     res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #11
0
        public void MinAgreedFromSourcedMo_Agreed()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                referral = (new SetData()).MinAgreedFromSourcedMo(result.IdMq);
                var resultAgreed = mq.AgreedFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #12
0
        public void MinPatientDocumentIssue()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                referral = (new SetData()).MinPatientDocumentIssue(result.IdMq);
                var result2 = mq.PatientDocumentIssue(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #13
0
        public void MinUpdateFromSourcedMo()
        {
            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()).MinUpdateFromSourcedMo(result.IdMq);
                var updateResult = mq.UpdateFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #14
0
        public void FullSetTargetMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                //Задаём целевую МО
                referral = (new SetData()).FullSetOrChangeTargetMO(result.IdMq);
                var res2 = mq.SetOrChangeTargetMo(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #15
0
        public void FullChangePlannedResource()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                //"Выдано пациенту"
                referral = (new SetData()).MinPatientDocumentIssue(result.IdMq);
                var res2 = mq.PatientDocumentIssue(cr, referral);

                referral = (new SetData()).FullChangePlannedResource(result.IdMq);
                var res3 = mq.ChangePlannedResource(cr, referral);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #16
0
ファイル: SearchOne.cs プロジェクト: nbIxMaN/MQTESTS
        public void SearchOne_Full()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).FullRegister();
                var result = mq.Register(cr, referral);

                //Задаём Options по зарегистрированному направлению и ищем его
                Coding cod = new Coding { Code = "1", System = Dictionary.REFERRAL_STATUS, Version = "1" };
                Options opt = (new SetData()).GetRefferalReturnOptions_SearchOne(referral, referral.Patient.Privileges, result.IdMq, result.MqReferralStatus);
                var res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #17
0
ファイル: Register.cs プロジェクト: nbIxMaN/MQTESTS
 public void Min()
 {
     using (TestMqServiceClient mq = new TestMqServiceClient())
     {
         Referral    referral = (new SetData()).MinRegister();
         Credentials cr       = new Credentials
         {
             Organization = idLpu,
             Token        = guid
         };
         var x = mq.Register(cr, referral);
         if (Global.errors != "")
         {
             NUnit.Framework.Assert.Fail(Global.errors);
         }
         else
         {
             NUnit.Framework.Assert.Pass();
         }
     }
 }
コード例 #18
0
ファイル: SearchOne.cs プロジェクト: nbIxMaN/MQTESTS
        public void SearchOne_CheckRelevance()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).FullRegister();
                var result = mq.Register(cr, referral);

                referral = (new SetData()).FullUpdateFromSourcedMo(result.IdMq);
                var res2 = mq.UpdateFromSourcedMo(cr, referral);

                //Задаём Options по зарегистрированному направлению и ищем его
                Options opt = (new SetData()).GetRefferalReturnOptions_SearchOne(referral, referral.Patient.Privileges, result.IdMq, res2.MqReferralStatus);
                var res3 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #19
0
        public void MinUpdateFromSourcedMo()
        {
            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()).MinUpdateFromSourcedMo(result.IdMq);
                var updateResult = mq.UpdateFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #20
0
        public void FullSetTargetMO()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                //Задаём целевую МО
                referral = (new SetData()).FullSetOrChangeTargetMO(result.IdMq);
                var res2 = mq.SetOrChangeTargetMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #21
0
        public void FullAgreedFromSourcedMo_NotAgreed()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Referral referral = (new SetData()).MinRegister();
                var      result   = mq.Register(cr, referral);

                referral = (new SetData()).FullAgreedFromSourcedMo(result.IdMq);
                referral.EventsInfo.Source.IsReferralReviewed = false;
                var resultAgreed = mq.AgreedFromSourcedMo(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #22
0
        public void SearchOne_Person()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                referral.Patient.Person.IdPatientMis = PersonData.patient.Person.IdPatientMis;
                var result = mq.Register(cr, referral);

                //Задаём Patinet/Person
                Options opt = new Options
                {
                    Patient = new Patient
                    {
                        Person = new Person
                        {
                            BirthDate    = referral.Patient.Person.BirthDate,
                            IdPatientMis = referral.Patient.Person.IdPatientMis
                        }
                    }
                };
                var res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
コード例 #23
0
ファイル: SearchMany.cs プロジェクト: nbIxMaN/MQTESTS
        public void SearchMany_Test()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                //Задаём Options по зарегистрированному направлению и ищем его
                Options opt = (new SetData()).GetRefferalReturnOptions_SearchMany(referral, null, result.MqReferralStatus);
                var res2 = mq.SearchMany(cr, opt);
            }
        }
コード例 #24
0
ファイル: SearchOne.cs プロジェクト: nbIxMaN/MQTESTS
        public void SearchOne_IdMq()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                var result = mq.Register(cr, referral);

                //Задаём IdMq, находим его
                Options opt = new Options();
                //"78154000000261"
                opt.IdMq = result.IdMq;
                var res2 = mq.SearchOne(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
コード例 #25
0
ファイル: SearchOne.cs プロジェクト: nbIxMaN/MQTESTS
        public void SearchOne_Person()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                //Регистрируем один случай. Статус направления "Зарегистрировано в РЕГИЗ.УО"
                Referral referral = (new SetData()).MinRegister();
                referral.Patient.Person.IdPatientMis = PersonData.patient.Person.IdPatientMis;
                var result = mq.Register(cr, referral);

                //Задаём Patinet/Person
                Options opt = new Options
                {
                    Patient = new Patient
                    {
                        Person = new Person
                        {
                            BirthDate = referral.Patient.Person.BirthDate,
                            IdPatientMis = referral.Patient.Person.IdPatientMis
                        }
                    }
                };
                var res2 = mq.SearchOne(cr, opt);
            }

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