Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
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);
            }
        }
Exemplo n.º 8
0
        public void SearchMany_SourceLpu()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options
                {
                    Source = new ReferralSource {
                        Lpu = new Coding {
                            Code = "1.2.643.5.1.13.3.25.78.125", System = Dictionary.MO, Version = "1"
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 9
0
        public void SearchMany_PlannedDate()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options
                {
                    EventsInfo = new EventsInfo
                    {
                        Source = new EventSource {
                            PlannedDate = Convert.ToDateTime("03.01.2012")
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 10
0
        public void SearchMany_Survey()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options
                {
                    Survey = new Survey
                    {
                        SurveyOrgan = new Coding {
                            Code = "1", System = Dictionary.SURVEY_TYPE, Version = "1"
                        },
                        SurveyType = new Coding {
                            Code = "1", System = Dictionary.SURVEY_ORGAN, Version = "1"
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 11
0
        public void SearchMany_IsReferralReviwed()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options
                {
                    EventsInfo = new EventsInfo
                    {
                        Target = new EventTarget {
                            IsReferralReviwed = true
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 12
0
        public void SearchMany_Privilege()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                SetUp();
                Options opt = new Options
                {
                    Patient = new Patient
                    {
                        Privileges = new Privilege[]
                        {
                            new Privilege {
                                PrivilegeType = PersonData.patient.Privileges[0].PrivilegeType
                            }
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 13
0
        public void SearchMany_ReferralType()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options
                {
                    ReferralInfo = new ReferralInfo
                    {
                        ReferralType = new Coding {
                            Code = "2", System = Dictionary.REFERRAL_TYPE, Version = "1"
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 14
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);
            }
        }
Exemplo n.º 15
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);
            }
        }
Exemplo n.º 16
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);
            }
        }
Exemplo n.º 17
0
        public void SearchMany_Empty()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options();
                var res = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
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);
        }
Exemplo n.º 20
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);
        }
Exemplo n.º 21
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);
        }
Exemplo n.º 22
0
        public void SearchMany_IsReferralReviwed()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    EventsInfo = new EventsInfo
                    {
                        Target = new EventTarget { IsReferralReviwed = true }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 23
0
        public void SearchMany_PlannedDate()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    EventsInfo = new EventsInfo
                    {
                        Source = new EventSource { PlannedDate = Convert.ToDateTime("03.01.2012") }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 24
0
        public void SearchMany_MqReferralStatus()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    ReferralInfo = new ReferralInfo
                    {
                        MqReferralStatus = new Coding { Code = "1", System = Dictionary.REFERRAL_STATUS, Version = "1" }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 25
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);
        }
Exemplo n.º 26
0
        public void SearchMany_Empty()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials {
                    Organization = idLpu, Token = guid
                };
                Options opt = new Options();
                var     res = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Exemplo n.º 27
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);
        }
Exemplo n.º 28
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);
        }
Exemplo n.º 29
0
 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();
         }
     }
 }
Exemplo n.º 30
0
        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);
        }
Exemplo n.º 31
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);
            }
        }
Exemplo n.º 32
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);
            }
        }
Exemplo n.º 33
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);
            }
        }
Exemplo n.º 34
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);
            }
        }
Exemplo n.º 35
0
        public void SearchMany_ProfileMedService()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    ReferralInfo = new ReferralInfo
                    {
                        ProfileMedService = new Coding { Code = "1", System = Dictionary.PROFILE_MED_SERVICE, Version = "1" }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 36
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);
        }
Exemplo n.º 37
0
        public void SearchMany_Privilege()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                SetUp();
                Options opt = new Options
                {
                    Patient = new Patient
                    {
                        Privileges = new Privilege[]
                        {
                            new Privilege { PrivilegeType = PersonData.patient.Privileges[0].PrivilegeType }
                        }
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 38
0
        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);
            }
        }
Exemplo n.º 39
0
        public void SearchMany_Survey()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    Survey = new Survey
                    {
                        SurveyOrgan = new Coding {Code = "1",System =  Dictionary.SURVEY_TYPE,Version =  "1"},
                        SurveyType = new Coding {Code = "1",System =  Dictionary.SURVEY_ORGAN,Version =  "1"}
                    }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Exemplo n.º 40
0
        public void SearchMany_TargetLpu()
        {
            using (TestMqServiceClient mq = new TestMqServiceClient())
            {
                Credentials cr = new Credentials { Organization = idLpu, Token = guid };
                Options opt = new Options
                {
                    Target = new ReferralTarget { Lpu = new Coding { Code = "1.2.643.5.1.13.3.25.78.125", System = Dictionary.MO, Version = "1" } }
                };
                var res2 = mq.SearchMany(cr, opt);
            }

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