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); }
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); } }
public MqResult HealthCareEnd(Credentials cr, Referral r) { try { TestReferral br = TestReferral.BuildReferralFromDataBaseData(r.ReferralInfo.IdMq); MqResult x = client.HealthCareEnd(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); } }
public MqResult HealthCareEnd(Credentials cr, Referral r) { try { MqResult x = client.HealthCareEnd(cr, r); if (new TestReferral(r, cr.Organization) != 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); return(null); } catch (System.ServiceModel.FaultException <MqTests.WebReference.MqFault> e) { Global.errors1.Add(e.Detail.PropertyName + " - " + e.Detail.Message); return(null); } }