Esempio n. 1
0
        public void FullAgreedFromTargetMo()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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);
            }
        }
Esempio n. 2
0
        public void MinHealthCareEnd()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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()).MinHealthCareStart(result.IdMq);
                var res4 = mq.HealthCareStart(cr, referral);

                referral = (new SetData()).MinHealthCareEnd(result.IdMq);
                var res5 = mq.HealthCareEnd(cr, referral);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Esempio n. 3
0
        public void FullHealthCareEnd()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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()).MinHealthCareStart(result.IdMq);
                var res4 = mq.HealthCareStart(cr, referral);

                referral = (new SetData()).FullHealthCareEnd(result.IdMq);
                var res5 = mq.HealthCareEnd(cr, referral);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Esempio n. 4
0
        public void MinChangePlannedResource()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Esempio n. 5
0
        public void MinPatientDocumentIssue()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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);
        }
Esempio n. 6
0
        public void FullAgreedFromTargetMo()
        {
            using (MqServiceClient mq = new MqServiceClient())
            {
                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);
        }
Esempio n. 7
0
 public MqResult PatientDocumentIssue(Credentials cr, Referral r)
 {
     try
     {
         TestReferral br = TestReferral.BuildReferralFromDataBaseData(r.ReferralInfo.IdMq);
         MqResult     x  = client.PatientDocumentIssue(cr, r);
         br.UpdateTestReferral(r, cr.Organization);
         if (br != TestReferral.BuildReferralFromDataBaseData(x.IdMq))
         {
             Global.errors1.Add("Несовпадение");
             Global.errors1.AddRange(Global.errors2);
         }
         return(x);
     }
     catch (System.ServiceModel.FaultException <MqTests.WebReference.MqFault> e)
     {
         getErrors(e.Detail);
         Global.errors1.Add("ЭКСЕПШН");
         return(null);
     }
 }