Пример #1
0
        public void AddMinPatient()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PixServiceClient     c       = new PixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.FamilyName   = "Жукин";
            patient.GivenName    = "Дмитрий";
            patient.BirthDate    = new DateTime(1983, 01, 07);
            patient.Sex          = 1;
            patient.IdPatientMIS = "123456789010";
            patient.Documents    = new PixServise.DocumentDto[]
            {
                new PixServise.DocumentDto()
                {
                    DocN           = "123-123-123-12",
                    ProviderName   = "ПФР",
                    IdDocumentType = 223
                }
            };
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            client.UpdatePatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            const string idLpu = "1.2.643.5.1.13.3.25.78.118";
            const string guid  = "8CDE415D-FAB7-4809-AA37-8CDD70B1B46C";

            Console.WriteLine("Run program");
            PixServiceClient client = new PixServiceClient();

            client.InnerChannel.Faulted += InnerChannel_Faulted;
            PatientDto patient = new PatientDto();

            patient.GivenName    = "Андрей";
            patient.MiddleName   = "Викторович";
            patient.FamilyName   = "Лобов";
            patient.BirthDate    = new DateTime(1989, 11, 6);
            patient.IdPatientMIS = "1000000";
            patient.Sex          = 0;

            var testTaskGuid         = "8CDE415D­FAB74809­AA37­8CDD70B1B46C".ToCharArray();
            var developersLetterGuid = "8CDE415D-FAB7-4809-AA37-8CDD70B1B46C".ToCharArray();

            foreach (var item in testTaskGuid)
            {
                Console.Write(item);
            }
            Console.WriteLine();

            foreach (var item in developersLetterGuid)
            {
                Console.Write(item);
            }
            Console.WriteLine();
            ////var result = a + b;
            ////Assert.Equals(result, expected);
            ////client.Open();
            try
            {
                //client.InnerChannel.Faulted += InnerChannel_Faulted;
                client.AddPatient(guid, "", patient);
            }
            catch (FaultException e)
            {
                Console.WriteLine(e.Message);
            }


            Console.WriteLine(Guid.NewGuid().ToString());
            Console.WriteLine("End program");
            Console.ReadLine();
        }
Пример #3
0
        private string TryAddPatient(string guid, string idLpu, PixServiceClient clietn, PatientDto patient)
        {
            var errorMessage = string.Empty;

            try
            {
                client.AddPatient(guid, idLpu, patient);
            }
            catch (FaultException fe)
            {
                errorMessage = fe.Message;
            }

            return(errorMessage);
        }
Пример #4
0
 public void AddMinPatient()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PixServiceClient c = new PixServiceClient();
     PatientDto patient = new PatientDto();
     patient.FamilyName = "Жукин";
     patient.GivenName = "Дмитрий";
     patient.BirthDate = new DateTime(1983, 01, 07);
     patient.Sex = 1;
     patient.IdPatientMIS = "123456789010";
     patient.Documents = new PixServise.DocumentDto[]
     {
         new PixServise.DocumentDto()
         {
             DocN = "123-123-123-12",
             ProviderName = "ПФР",
             IdDocumentType = 223
         }
     };
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     client.UpdatePatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Пример #5
0
        public void Setup()
        {
            emkClient = new EmkServiceClient();
            pixClient = new PixServiceClient();

            PatientData.Patient = new PatientDto
            {
                FamilyName = "Андреев" + new Random().Next(100),
                GivenName = "Андрей",
                BirthDate = new DateTime(1983, 01, 07),
                Sex = 1,
                IdPatientMIS = "123456789012",
            };

            SetDocument();

            DoctorData.otherDoctor = SetOtherDoctor();

            SetMedRecord();

            SetAmbCase();

            SetStatCase();

            fhir = new FhirProxyServiceClient();

            Id.id1 = new Guid("2148f3be-7b25-4266-a947-20bf199cb739");
            Id.id2 = new Guid("43287875-33d7-4675-a50f-7f1dfa121572");
            Id.id3 = new Guid("1055760f-9ada-4ec3-8a04-d5af3d71de4b");
            Id.id4 = new Guid("7f4ca055-842a-4639-9562-a2b2304ff961");
            Id.id5 = new Guid("c61d0ce3-3029-4b3c-b7a0-e12ceff77b16");
        }
Пример #6
0
 public TestBase()
 {
     this.PixServiceClient = new PixServiceClient();
     this.Guid             = new Guid("8CDE415D-FAB7-4809-AA37-8CDD70B1B46C");
 }
Пример #7
0
        public void InSetup()
        {
            pixs = new PixServiceClient();

            /*      PatientData.ContactPerson = new ContactPersonDto
                  {
                      FamilyName = "Васильева",
                      GivenName = "Марина",
                      MiddleName = "Олеговна",
                      IdPersonMis = "IdentificatorContact",
                      IdRelationType = 1,
                      ContactList = new ContactDto[]
                      {
                          new ContactDto
                          {
                              IdContactType = 1,
                              ContactValue = "89102346789",
                          },
                      },

                  };*/

            PatientData.Address_1 = new AddressDto
            {
                IdAddressType = 1,
                StringAddress = "Ботаническая 88",
                City = "0100000000000",
                Street = "01000001000000100",
                Building = "88",
                Appartment = "21",
                PostalCode = 672157,
                GeoData = "78, 64",
            };

            PatientData.Address_2 = new AddressDto
             {
                 IdAddressType = 2,
                 StringAddress = "454100, город Челябинск, Самая первая улица в мире, дом 454, квартира 1000",
                 City = "0100000000000",
                 Street = "01000001000000100",
                 Building = "454",
                 Appartment = "1000",
                 PostalCode = 454100,
                 GeoData = "43.072812,-79.040128",
             };

            PatientData.BirthPlace = new BirthPlaceDto
            {
                Country = "Россия",
                Region = "Центральный",
                City = "Петергоф",
            };

            PatientData.Contact_1 = new ContactDto
            {
                IdContactType = 1,
                ContactValue = "89238364654",
            };
            PatientData.Contact_2 = new ContactDto
            {
                IdContactType = 2,
                ContactValue = "111-11-11",
            };

            PatientData.Contact_3 = new ContactDto
            {
                IdContactType = 3,
                ContactValue = "*****@*****.**",
            };

            PatientData.Contact_4 = new ContactDto
            {
                IdContactType = 3,
                ContactValue = "7-812-777-7777",
            };

            PatientData.Job = new JobDto
            {
                OgrnCode = "1234567890123",
                CompanyName = "ОАО “Звездочка”",
                Sphere = "Обслуживание",
                Position = "Старший токарь",
                DateStart = Convert.ToDateTime("18.02.1999"),
                DateEnd = Convert.ToDateTime("03.07.2015"),
            };

            PatientData.Privilege = new PrivilegeDto
            {
                DateStart = Convert.ToDateTime("19.02.2000"),
                DateEnd = Convert.ToDateTime("17.05.2048"),
                IdPrivilegeType = 10,
            };

            PatientData.Passport = new DocumentDto
            {
                IdDocumentType = 14,
                DocS = "2007",
                DocN = "395732",
                ProviderName = "УФМС",
                ExpiredDate = Convert.ToDateTime("19.02.2020"),
                IssuedDate = Convert.ToDateTime("03.09.2007"),
                RegionCode = "128",
            };

            PatientData.SNILS = new DocumentDto
            {
                IdDocumentType = 223,
                DocN = "59165576238",
                ProviderName = "ПФР",
                ExpiredDate = Convert.ToDateTime("01.12.2010"),
                IssuedDate = Convert.ToDateTime("03.09.2006"),
                RegionCode = "128",
            };

            PatientData.OldOMS = new DocumentDto
            {
                IdDocumentType = 226,
                DocS = "AA",
                DocN = "225916",
                ProviderName = "Старый полис",
                ExpiredDate = Convert.ToDateTime("31.01.2040"),
                IssuedDate = Convert.ToDateTime("11.11.2000"),
                RegionCode = "128",
                IdProvider = "22001",
            };

            PatientData.SingleOMS = new DocumentDto
            {
                IdDocumentType = 228,
                DocS = "ЕП",
                DocN = "1234567812345678",
                ProviderName = "Единый полис",
                ExpiredDate = Convert.ToDateTime("02.06.2000"),
                IssuedDate = Convert.ToDateTime("04.02.1994"),
                RegionCode = "128",
                IdProvider = "22001",
            };

            PatientData.OtherDoc = new DocumentDto
            {
                IdDocumentType = 18,
                DocN = "1234567",
                DocS = "1234",
                ProviderName = "Иной документ",
                ExpiredDate = Convert.ToDateTime("02.06.2000"),
                IssuedDate = Convert.ToDateTime("04.02.1994"),
                RegionCode = "128",
            };

            PatientData.Patient = new PatientDto
            {
                GivenName = "Андрей",
                MiddleName = "Иванович",
                FamilyName = "Сидоров",
                IdPatientMIS = "Identificator",
                Sex = 1,
                BirthDate = Convert.ToDateTime("07.01.1983"),

                IdBloodType = 8,
                IdLivingAreaType = 2,
                SocialStatus = "2",
                SocialGroup = 4,
                DeathTime = Convert.ToDateTime("07.01.2050"),

                Addresses = new AddressDto[] { PatientData.Address_1, PatientData.Address_2 },
                BirthPlace = PatientData.BirthPlace,
                Contacts = new ContactDto[] { PatientData.Contact_1, PatientData.Contact_2 },
                Documents = new DocumentDto[] { PatientData.Passport },
                Job = PatientData.Job,
                Privilege = PatientData.Privilege,
            };
        }