Ejemplo n.º 1
0
        public void AddPatient_Do_Not_Add_The_Same_Patient()
        {
            testPatient.FamilyName   = "Иванов";
            testPatient.GivenName    = "Петр";
            testPatient.MiddleName   = "Федорович";
            testPatient.BirthDate    = new DateTime(1992, 05, 05);
            testPatient.IdPatientMIS = "1234567";
            testPatient.Sex          = 1;

            client.AddPatient(guid, idLPU, testPatient);
            PixService.PatientDto testPatient2 = new PixService.PatientDto();

            testPatient2.FamilyName   = "Иванов";
            testPatient2.GivenName    = "Петр";
            testPatient2.MiddleName   = "Федорович";
            testPatient2.BirthDate    = new DateTime(1992, 05, 05);
            testPatient2.IdPatientMIS = "1234567";
            testPatient2.Sex          = 1;

            Assert.That(() => client.AddPatient(guid, idLPU, testPatient2), Throws.Exception);
        }
Ejemplo n.º 2
0
        public void AddPatient_Update_All_Data()
        {
            testPatient.FamilyName   = "Иванов";
            testPatient.GivenName    = "Петр";
            testPatient.MiddleName   = "Федорович";
            testPatient.BirthDate    = new DateTime(1992, 05, 05);
            testPatient.IdPatientMIS = "1234567";
            testPatient.Sex          = 1;
            client.AddPatient(guid, idLPU, testPatient);

            PixService.PatientDto testPatient2 = new PixService.PatientDto();
            testPatient2.FamilyName   = "Петров";
            testPatient2.GivenName    = "Иван";
            testPatient2.MiddleName   = "Данилович";
            testPatient2.BirthDate    = new DateTime(1987, 05, 05);
            testPatient2.IdPatientMIS = "1234567";
            testPatient2.Sex          = 1;

            client.AddPatient(guid, idLPU, testPatient2);
            PixService.PatientDto[] testPatients = client.GetPatient(guid, idLPU, testPatient2, PixService.SourceType.Reg);
            Assert.AreEqual(testPatient2.GetHashCode(), testPatients[0].GetHashCode());
            //Equals ?
        }
Ejemplo n.º 3
0
 public void Init()
 {
     client      = new PixService.PixServiceClient("BasicHttpBinding_IPixService");
     testPatient = new PixService.PatientDto();
 }