Example #1
0
        public void AddAmbCaseWithAppointedMedicationMin()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
                caseAmb.MedRecords = new List<MedRecord>
                {
                    (new SetData()).MinClinicMainDiagnosis(),
                    (new SetData()).MinAppointedMedication()
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List<MedRecord>
                {
                    (new SetData()).MinAppointedMedication()
                };

                caseAmb.Steps = new List<StepAmb>
                {
                    stepAmb
                };
                client.AddCase(Global.GUID, caseAmb);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #2
0
 public void TestForConsultNote()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         patient.IdPatientMIS = "TestForMq";
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
     caseAmb.MedRecords = new List<MedRecord>
     {
             MedRecordData.consultNote,
             (new SetData()).MinClinicMainDiagnosis()
     };
     caseAmb.IdCaseMis = "TestForMq";
     caseAmb.IdPatientMis = "TestForMq";
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         client.AddCase(Global.GUID, caseAmb);
     }
     using (TestMqProxyClient client = new TestMqProxyClient())
     {
         client.GetResultDocument(Global.GUID, Data.idlpu, caseAmb.IdCaseMis, 3);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #3
0
 public void TestDishargeSummary()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
     caseAmb.MedRecords = new List<MedRecord>
     {
             MedRecordData.dischargeSummary,
             (new SetData()).MinClinicMainDiagnosis()
     };
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         client.AddCase(Global.GUID, caseAmb);
     }
     using (TestMqProxyClient client = new TestMqProxyClient())
     {
         client.GetResultDocument(Global.GUID, Data.idlpu, caseAmb.IdCaseMis, 1);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #4
0
 public void AddDicpCase()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb caseDisp = (new SetData()).FullCaseDispSet();
         caseDisp.Guardian = null;
         caseDisp.OpenDate = new DateTime(2014, 06, 01);
         caseDisp.CloseDate = new DateTime(2014, 06, 10);
         caseDisp.MedRecords = new List<MedRecord>
         {
             GetDispanseryOne(),
             MedRecordData.clinicMainDiagnosis
         };
         client.AddCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #5
0
 public void AddEmptyPatient()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = new PatientDto();
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #6
0
        public void UpdateFullAmbCase_AfterClose()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSetForCreate();
                EmkClient.CreateCase(Global.GUID, caseAmb);

                caseAmb = (new SetData()).MinCaseAmbSetForClose();
                EmkClient.CloseCase(Global.GUID, caseAmb);

                CaseAmb caseAmbUpdate = (new SetData()).FullCaseAmbSet();
                SetData set = new SetData();
                caseAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinTfomsInfo(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    set.MinRefferal(),
                    set.MinSickList(),
                    set.MinDischargeSummary(),
                    set.MinLaboratoryReport(),
                    set.MinConsultNote()
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinAppointedMedication(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    set.MinRefferal(),
                    set.MinLaboratoryReport(),
                };
                caseAmbUpdate.Steps = new List<StepAmb>
                {
                    stepAmb
                };

                EmkClient.UpdateCase(Global.GUID, caseAmbUpdate);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
        public void UpdateFullAmbCase_AfterClose()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSetForCreate();
                EmkClient.CreateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);

                caseAmb = (new SetData()).MinCaseAmbSetForClose();
                EmkClient.CloseCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);

                CaseAmb caseAmbUpdate = (new SetData()).FullCaseAmbSet();
                SetData set = new SetData();
                caseAmb.MedRecords = new MedRecord[]
                {
                    set.MinService(),
                    set.MinTfomsInfo(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    MedRecordData.sickList,
                    set.MinDischargeSummary(),
                    set.MinLaboratoryReport(),
                    set.MinConsultNote()
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new MedRecord[]
                {
                    set.MinService(),
                    set.MinAppointedMedication(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    set.MinLaboratoryReport(),
                };
                caseAmb.Steps = new StepAmb[]
                {
                    stepAmb
                };

                EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmbUpdate);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #8
0
        public void UpdateFullAmbCase_AfterAdd()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmbAdd = (new SetData()).MinCaseAmbSet();
                EmkClient.AddCase(Global.GUID, caseAmbAdd);
                CaseAmb caseAmb = (new SetData()).FullCaseAmbSet();
                SetData set = new SetData();
                caseAmb.MedRecords = new List<MedRecord>
                {
                    MedRecordData.service,
                    MedRecordData.tfomsInfo,
                    MedRecordData.diagnosis,
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    MedRecordData.sickList,
                    MedRecordData.dischargeSummary,
                    MedRecordData.LaboratoryReport,
                    MedRecordData.consultNote,
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinAppointedMedication(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    set.MinLaboratoryReport(),
                };
                caseAmb.Steps = new List<StepAmb>
                {
                    stepAmb
                };

                EmkClient.UpdateCase(Global.GUID, caseAmb);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #9
0
 public void AddFullStatCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).FullCaseStatSet();
         SetData set = new SetData();
         caseStat.MedRecords = new MedRecord[]
         {
             set.MinService(),
             set.MinTfomsInfo(),
             MedRecordData.deathInfo,
             set.MinDiagnosis(),
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.anatomopathologicalClinicMainDiagnosis,
             MedRecordData.referral,
             MedRecordData.sickList,
             set.MinDischargeSummary(),
             set.MinLaboratoryReportSet(),
             set.MinConsultNote()
         };
         StepStat stepStat = (new SetData()).MinStepStatSet();
         stepStat.MedRecords = new MedRecord[]
         {
             set.MinService(),
             set.MinAppointedMedication(),
             set.MinDiagnosis(),
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.referral,
             set.MinLaboratoryReportSet(),
         };
         caseStat.Steps = new StepStat[]
         {
             stepStat
         };
         EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #10
0
 public void AddAmbMedRecDiagnosis_OpenCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSetForCreate();
         EmkClient.CreateCase(Global.GUID, caseAmb);
         EmkClient.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, MedRecordData.diagnosis, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #11
0
 public void AddAmbMedAppointedMedication_CloseCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         EmkClient.AddCase(Global.GUID, caseAmb);
         EmkClient.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, MedRecordData.appointedMedication, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #12
0
        public void CreateFullAmbCase()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).FullCaseAmbSetForCreate();
                SetData set = new SetData();
                caseAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinTfomsInfo(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    MedRecordData.sickList,
                    set.MinLaboratoryReport(),
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinAppointedMedication(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    set.MinLaboratoryReport(),
                };
                caseAmb.Steps = new List<StepAmb>
                {
                    stepAmb
                };
                EmkClient.CreateCase(Global.GUID, caseAmb);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #13
0
 public void AddMaxConsultNote()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         MedRecord r = MedRecordData.consultNote;
         client.AddCase(Global.GUID, caseAmb);
         client.AddMedRecord(Global.GUID, caseAmb.IdLpu, caseAmb.IdPatientMis, r, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #14
0
 public void AddMaxDispanseryOne()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb caseDisp = (new SetData()).MinCaseDispSet();
         MedRecord r = MedRecordData.dispensaryOne;
         client.AddCase(Global.GUID, caseDisp);
         client.AddMedRecord(Global.GUID, caseDisp.IdLpu, caseDisp.IdPatientMis, r, caseDisp.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #15
0
        public void AddMedRecord_ToCase_AmbCaseWithLaboratoryReportFull()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
                client.AddCase(Global.GUID, caseAmb);

                MedRecord medRecord = MedRecordData.LaboratoryReport;

                client.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, medRecord, caseAmb.IdCaseMis);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #16
0
 public void AddDispCaseWithMinDispanseryOne()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb caseDisp = (new SetData()).MinCaseDispSet();
         caseDisp.MedRecords = new List<MedRecord>
         {
             (new SetData()).MinDispensaryOne(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.AddCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #17
0
 public void AddAmbCaseWithLaboratoryReportMin()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         caseAmb.MedRecords = new List<MedRecord>
         {
             (new SetData()).MinLaboratoryReport(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #18
0
        public void SearchPatientByMinParametrAndDocument()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.FamilyName   = "Жукин";
            patient.GivenName    = "Дмитрий";
            patient.BirthDate    = new DateTime(1983, 01, 07);
            patient.Sex          = 1;
            patient.IdPatientMIS = "123456789010";
            PixServise.DocumentDto document = new PixServise.DocumentDto();
            document.IdDocumentType = 14;
            document.DocS           = "1234";
            document.DocN           = "123456";
            document.ProviderName   = "УФМС";
            patient.Documents       = new PixServise.DocumentDto[] { document };
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            PatientDto forSearch = new PatientDto();

            forSearch.FamilyName = "Жукин";
            forSearch.GivenName  = "Дмитрий";
            forSearch.BirthDate  = new DateTime(1983, 01, 07);
            forSearch.Sex        = 1;
            PixServise.DocumentDto forSearchD = new PixServise.DocumentDto();
            forSearchD.IdDocumentType = 14;
            forSearchD.DocS           = "1234";
            forSearchD.DocN           = "123456";
            forSearch.Documents       = new PixServise.DocumentDto[] { document };
            client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", forSearch, SourceType.Reg);
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #19
0
        public void AddPatientWithJob()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.FamilyName   = "Жукин";
            patient.GivenName    = "Дмитрий";
            patient.BirthDate    = new DateTime(1983, 01, 07);
            patient.Sex          = 1;
            patient.IdPatientMIS = "123456789010";
            PixServise.JobDto job = new PixServise.JobDto();
            job.CompanyName = "OOO 'МИГ'";
            patient.Job     = job;
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
 public void UpdateMinAmbCase_AfterAdd()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);
         caseAmb.Comment = "23123123123123123123";
         EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #21
0
 public void AddMinDispanseryOne()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb   caseDisp = (new SetData()).MinCaseDispSet();
         MedRecord r        = (new SetData()).MinDispensaryOne();
         client.AddCase(Global.GUID, caseDisp);
         client.AddMedRecord(Global.GUID, caseDisp.IdLpu, caseDisp.IdPatientMis, r, caseDisp.IdCaseMis);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #22
0
        public void UpdateMinPatient()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.FamilyName   = "Жукин";
            patient.GivenName    = "Дмитрий";
            patient.BirthDate    = new DateTime(1983, 01, 07);
            patient.Sex          = 1;
            patient.IdPatientMIS = "123456789010";
            patient.Documents    = (new SetData()).PatientSet().Documents;
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            //patient.FamilyName = "Сидоров";
            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);
            }
        }
Example #23
0
 public void AddMaxDiagnosis()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseAmb   caseAmb = (new SetData()).MinCaseAmbSet();
         MedRecord r       = MedRecordData.diagnosis;
         client.AddCase(Global.GUID, caseAmb);
         client.AddMedRecord(Global.GUID, caseAmb.IdLpu, caseAmb.IdPatientMis, r, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #24
0
        public void UpdateAmbCaseWithAppointedMedicationMin()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
                client.AddCase(Global.GUID, caseAmb);
                caseAmb.MedRecords = new List <MedRecord>
                {
                    (new SetData()).MinClinicMainDiagnosis(),
                    (new SetData()).MinAppointedMedication()
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List <MedRecord>
                {
                    (new SetData()).MinAppointedMedication()
                };

                caseAmb.Steps = new List <StepAmb>
                {
                    stepAmb
                };
                client.UpdateCase(Global.GUID, caseAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #25
0
        public void PatientWithRealationship()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.FamilyName   = "Жукин";
            patient.GivenName    = "Дмитрий";
            patient.BirthDate    = new DateTime(1983, 01, 07);
            patient.Sex          = 1;
            patient.IdPatientMIS = "123456789010";
            PatientDto patient2 = new PatientDto();

            patient2.FamilyName   = "Петров";
            patient2.GivenName    = "Денис";
            patient2.BirthDate    = new DateTime(1999, 02, 03);
            patient2.Sex          = 1;
            patient2.IdPatientMIS = "098765432111";
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient2);
            ContactPersonDto pers = new ContactPersonDto();

            pers.ContactList      = patient2.Contacts;
            pers.FamilyName       = patient2.FamilyName;
            pers.GivenName        = patient2.GivenName;
            pers.IdPersonMis      = patient2.IdPatientMIS;
            pers.IdRelationType   = 2;
            pers.MiddleName       = patient2.MiddleName;
            patient.ContactPerson = pers;
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #26
0
 public void UpdateStatCaseWithLaboratoryReportFull()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient client = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         client.AddCase(Global.GUID, caseStat);
         caseStat.MedRecords = new List <MedRecord>
         {
             MedRecordData.LaboratoryReport,
             (new SetData()).MinClinicMainDiagnosis()
         };
         StepStat stepStat = (new SetData()).MinStepStatSet();
         stepStat.MedRecords = new List <MedRecord>
         {
             MedRecordData.LaboratoryReport,
             (new SetData()).MinLaboratoryReport()
         };
         caseStat.Steps = new List <StepStat>
         {
             stepStat
         };
         client.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #27
0
        public void AddAmbStep_OtherIdMin()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSetForCreate();
                EmkClient.CreateCase(Global.GUID, caseAmb);

                StepAmb stepAmb = (new SetData()).MinOtherStepAmbSet();
                EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #28
0
        public void UpdateMinAmbCase_AfterAdd()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
                EmkClient.AddCase(Global.GUID, caseAmb);

                caseAmb.Comment = "23123123123123123123";
                EmkClient.UpdateCase(Global.GUID, caseAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #29
0
        public void CreateStatCaseWithAppointedMedicationFull()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate();
                caseStat.MedRecords = new List <MedRecord>
                {
                    (new SetData()).MinClinicMainDiagnosis(),
                    MedRecordData.appointedMedication,
                };
                StepStat stepStat = (new SetData()).MinStepStatSet();
                stepStat.MedRecords = new List <MedRecord>
                {
                    MedRecordData.appointedMedication
                };

                caseStat.Steps = new List <StepStat>
                {
                    stepStat
                };
                client.CreateCase(Global.GUID, caseStat);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #30
0
 public void FindMultidocumentPatient()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = new PatientDto();
     patient.Addresses = new PixServise.AddressDto[]
      {
          new PixServise.AddressDto
          {
              IdAddressType = 1,
              StringAddress = "Россия, г.Санкт-Петербург, р-н.Центральный, пер.Дегтярный, д.1/8, кв.82"
          }
      };
     patient.BirthDate = new DateTime(1976, 07, 19);
     patient.BirthPlace = new BirthPlaceDto
     {
         City = "г. СПБ",
         Country = "г. СПБ",
         Region = "г. СПБ"
     };
     patient.Contacts = new ContactDto[]
      {
          new ContactDto
          {
              ContactValue = "274-26-75",
              IdContactType = 1
          }
      };
     patient.Documents = new PixServise.DocumentDto[]
      {
          new PixServise.DocumentDto
          {
              DocN = "993820",
              DocS = "40 02",
              IdDocumentType = 14,
              IssuedDate = new DateTime(2002, 09, 06),
              ProviderName = "76 о/м СПб"
          },
          new PixServise.DocumentDto
          {
              DocN = "7852320830001562",
              DocS = "ЕП",
              IdDocumentType = 228,
              IdProvider = "78008",
              IssuedDate = new DateTime(2014, 05, 03),
              ProviderName = "САНКТ-ПЕТЕРБУРГСКИЙ ФИЛИАЛ ОАО 'РОСНО-МС'"
          },
          new PixServise.DocumentDto
          {
              DocN = "148-841-391 96",
              IdDocumentType = 223,
              ProviderName = "ПФР"
          }
      };
     patient.FamilyName = "Трескунов";
     patient.GivenName = "Роман";
     patient.IdLivingAreaType = 1;
     patient.Job = new PixServise.JobDto
     {
         CompanyName = "Не работает",
     };
     patient.SocialStatus = "2.4";
     patient.IdPatientMIS = "2312312312399";
     patient.Sex = 1;
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient);
     client.UpdatePatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient);
     PatientDto patient2 = new PatientDto();
     patient2.Documents = new PixServise.DocumentDto[]
      {
          new PixServise.DocumentDto
          {
              DocN = "7852320830001562",
              DocS = "ЕП",
              IdDocumentType = 228
          }
      };
     patient2.FamilyName = "Трескунов";
     patient2.GivenName = "Роман";
     patient2.BirthDate = new DateTime(1976, 07, 19);
     client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient2, SourceType.Reg);
 }
Example #31
0
 public void FindByFamilyAndName()
 {
     //System.Collections.ArrayList exeptions;
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = (new SetData()).PatientSet();
     PatientDto forSearch = new PatientDto();
     forSearch.FamilyName = PatientData.Patient.GivenName;
     forSearch.GivenName = PatientData.Patient.FamilyName;
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     var patents = client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", forSearch, SourceType.Fed);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #32
0
 public void AddStatMedRecSickList_CloseCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase(Global.GUID, caseStat);
         EmkClient.AddMedRecord(Global.GUID, Data.idlpu, caseStat.IdPatientMis, MedRecordData.sickList, caseStat.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #33
0
 public void AddStatMedRecAnatomDiagnosis_CloseCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase(Global.GUID, caseStat);
         EmkClient.AddMedRecord(Global.GUID, Data.idlpu, caseStat.IdPatientMis, MedRecordData.anatomopathologicalClinicMainDiagnosis, caseStat.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #34
0
 public void _HashTest()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto p = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", p);
     }
     using (TestEmkServiceClient c = new TestEmkServiceClient())
     {
         CaseAmb p = (new SetData()).FullCaseAmbSet();
         p.Guardian  = null;
         p.OpenDate  = new DateTime(2014, 06, 01);
         p.CloseDate = new DateTime(2014, 06, 10);
         var x = GetConsult();
         x.Attachment.Hash = new byte[] { 1, 2, 3, 4, 5 };
         p.MedRecords      = new List <MedRecord>
         {
             MedRecordData.clinicMainDiagnosis,
             //GetEpic(),
             //GetConsult()
             x
         };
         p.Steps[0].DateStart  = new DateTime(2014, 06, 01);
         p.Steps[0].DateEnd    = new DateTime(2014, 06, 10);
         p.Steps[0].MedRecords = new List <MedRecord>
         {
             GetGemotology(),
             GetBlood(),
             GetOnkomarkers(),
             MedRecordData.appointedMedication,
             MedRecordData.service
         };
         c.AddCase(Global.GUID, p);
         string caseMis = p.IdCaseMis;
         p            = (new SetData()).FullCaseAmbSet();
         p.IdCaseMis  = caseMis;
         p.Guardian   = null;
         p.OpenDate   = new DateTime(2014, 06, 01);
         p.CloseDate  = new DateTime(2014, 06, 10);
         p.MedRecords = new List <MedRecord>
         {
             MedRecordData.clinicMainDiagnosis,
             //GetConsult()
             x
         };
         p.Steps[0].DateStart  = new DateTime(2014, 06, 01);
         p.Steps[0].DateEnd    = new DateTime(2014, 06, 10);
         p.Steps[0].MedRecords = new List <MedRecord>
         {
             GetGemotology(),
             GetBlood(),
             GetOnkomarkers()
         };
         c.UpdateCase(Global.GUID, p);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #35
0
 public void AddDeathInfo()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         caseStat.IdCaseResult = 6;
         caseStat.MedRecords = new List<MedRecord>
         {
             MedRecordData.anatomopathologicalClinicMainDiagnosis,
             MedRecordData.deathInfo
         };
         EmkClient.AddCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #36
0
        public void AddFullPatient()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.BirthDate        = new DateTime(1983, 01, 07);
            patient.DeathTime        = new DateTime(2020, 02, 15);
            patient.FamilyName       = "Жукин";
            patient.GivenName        = "Дмитрий";
            patient.IdBloodType      = 1;
            patient.IdLivingAreaType = 1;
            patient.IdPatientMIS     = "123456789010";
            patient.MiddleName       = "Артемович";
            patient.Sex          = 1;
            patient.SocialGroup  = 2;
            patient.SocialStatus = "2.11";
            PixServise.DocumentDto document = new PixServise.DocumentDto();
            document.IdDocumentType = 14;
            document.DocS           = "1311";
            document.DocN           = "113131";
            document.ExpiredDate    = new DateTime(1999, 11, 12);
            document.IssuedDate     = new DateTime(2012, 11, 12);
            document.ProviderName   = "УФМС";
            document.RegionCode     = "1221";
            patient.Documents       = new PixServise.DocumentDto[] { document };
            PixServise.AddressDto address = new PixServise.AddressDto();
            address.IdAddressType = 1;
            address.StringAddress = "Улица Ленина 47";
            address.Street        = "01000001000000100";
            address.Building      = "1";
            address.City          = "0100000000000";
            address.Appartment    = "1";
            address.PostalCode    = 1;
            address.GeoData       = "1";
            PixServise.AddressDto address2 = new PixServise.AddressDto();
            address2.IdAddressType = 2;
            address2.StringAddress = "Улица Партизанская 47";
            address2.Street        = "01000001000000100";
            address2.Building      = "1";
            address2.City          = "0100000000000";
            address2.Appartment    = "1";
            address2.PostalCode    = 1;
            address2.GeoData       = "1";
            patient.Addresses      = new PixServise.AddressDto[] { address, address2 };
            BirthPlaceDto birthplace = new BirthPlaceDto();

            birthplace.City    = "Тутинск";
            birthplace.Country = "маленькая";
            birthplace.Region  = "БОЛЬШОЙ";
            patient.BirthPlace = birthplace;
            ContactDto contact = new ContactDto();

            contact.IdContactType = 1;
            contact.ContactValue  = "89626959434";
            ContactDto contact2 = new ContactDto();

            contact2.IdContactType = 1;
            contact2.ContactValue  = "89525959544";
            patient.Contacts       = new ContactDto[] { contact, contact2 };
            PixServise.JobDto job = new PixServise.JobDto();
            job.OgrnCode    = "0100000000000"; // некорректный код
            job.CompanyName = "OOO 'МИГ'";
            job.Sphere      = "Я";
            job.Position    = "Я";
            job.DateStart   = new DateTime(2003, 1, 1);
            job.DateEnd     = new DateTime(2004, 1, 1);
            patient.Job     = job;
            PrivilegeDto privilege = new PrivilegeDto();

            privilege.DateStart       = new DateTime(1993, 01, 02);
            privilege.DateEnd         = new DateTime(2020, 01, 02);
            privilege.IdPrivilegeType = 10;
            patient.Privilege         = privilege;
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #37
0
 public void UpdatePatient()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = new PatientDto();
     patient.FamilyName = "Жукин";
     patient.GivenName = "АЛЕКСЕЙ";
     patient.BirthDate = new DateTime(1983, 01, 07);
     patient.Sex = 1;
     patient.IdPatientMIS = "12345678900029";
     PixServise.DocumentDto document = new PixServise.DocumentDto();
     document.IdDocumentType = 14;
     document.DocS = "1311";
     document.DocN = "113131";
     document.ProviderName = "УФМС";
     patient.Documents = new PixServise.DocumentDto[] { document };
     PixServise.AddressDto address = new PixServise.AddressDto();
     address.IdAddressType = 1;
     address.StringAddress = "ТУТ";
     patient.Addresses = new PixServise.AddressDto[] { address };
     ContactDto cont = new ContactDto();
     cont.IdContactType = 1;
     cont.ContactValue = "89519435454";
     ContactDto cont2 = new ContactDto();
     cont2.IdContactType = 1;
     cont2.ContactValue = "89519435455";
     patient.Contacts = new ContactDto[] { cont, cont2 };
     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);
     PatientDto patient2 = new PatientDto();
     PixServise.DocumentDto document2 = new PixServise.DocumentDto();
     document2.IdDocumentType = 14;
     document2.DocS = "1311";
     document2.DocN = "113131";
     document2.ProviderName = "УФМС";
     patient2.Documents = new PixServise.DocumentDto[] { document2 };
     PixServise.AddressDto address2 = new PixServise.AddressDto();
     address2.IdAddressType = 1;
     address2.StringAddress = "ТУТ";
     patient2.FamilyName = "Сидоров";
     patient2.Addresses = new PixServise.AddressDto[] { address2 };
     ContactDto cont3 = new ContactDto();
     cont3.IdContactType = 1;
     cont3.ContactValue = "89519435456";
     patient2.Contacts = new ContactDto[] { cont3 };
     patient2.IdPatientMIS = patient.IdPatientMIS;
     client.UpdatePatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient2);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #38
0
 public void FindPatientByIdMIS()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = (new SetData()).PatientSet();
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     PatientDto find = new PatientDto();
     find.IdPatientMIS = patient.IdPatientMIS;
     client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", find, SourceType.Reg);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
        public void UpdateMinStatCase_AfterClose()
        {
            using (TestPixServiceClient PixClient = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient);
            }
            using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
            {
                CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate();
                EmkClient.CreateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);

                caseStat = (new SetData()).MinCaseStatSetForClose();
                EmkClient.CloseCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
                caseStat = (new SetData()).MinCaseStatSet();
                EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
 public void UpdateMinAmbCase_AfterAdd()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);
         caseAmb.Comment = "23123123123123123123";
         EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #41
0
        public void AddStatCaseWithAppointedMedicationFull()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseStat caseStat = (new SetData()).MinCaseStatSet();
                caseStat.MedRecords = new List<MedRecord>
                {
                    (new SetData()).MinClinicMainDiagnosis(),
                    MedRecordData.appointedMedication,
                };
                StepStat stepStat = (new SetData()).MinStepStatSet();
                stepStat.MedRecords = new List<MedRecord>
                {
                    MedRecordData.appointedMedication,
                };

                caseStat.Steps = new List<StepStat>
                {
                    stepStat
                };
                client.AddCase(Global.GUID, caseStat);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
Example #42
0
 public void _AddCaseForFedUploader()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         patient.MiddleName   = "Викторович";
         patient.GivenName    = "Евгений";
         patient.FamilyName   = "Эторцев";
         patient.IdPatientMIS = "ForUploaderMIS4";
         PixClient.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.3.64", patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseAmb caseAmb = (new SetData()).MinCaseAmbSet();
         caseAmb.IdLpu                = "1.2.643.5.1.13.3.25.3.64";
         caseAmb.IdPatientMis         = "ForUploaderMIS4";
         caseAmb.Authenticator.Doctor = new MedicalStaff()
         {
             Person = new PersonWithIdentity()
             {
                 IdPersonMis = "DoctorForUpload2",
                 Birthdate   = new DateTime(1987, 06, 11),
                 HumanName   = new HumanName()
                 {
                     FamilyName = "Александров",
                     MiddleName = "Игнатьевич",
                     GivenName  = "Борис"
                 },
                 Sex = 1
             },
             IdPosition   = 74,
             IdSpeciality = 29
         };
         caseAmb.Author         = caseAmb.Authenticator;
         caseAmb.DoctorInCharge = caseAmb.Authenticator.Doctor;
         var x = MedRecordData.clinicMainDiagnosis;
         x.Doctor           = caseAmb.DoctorInCharge;
         caseAmb.MedRecords = new List <MedRecord>
         {
             //set.MinService(),
             //set.MinTfomsInfo(),
             //set.MinDiagnosis(),
             //set.MinClinicMainDiagnosis(),
             x,
             //MedRecordData.diagnosis
             //set.MinRefferal(),
             //set.MinSickList(),
             //set.MinDischargeSummary(),
             //set.MinLaboratoryReport(),
             //set.MinConsultNote()
         };
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #43
0
 public void SearchPatientByMinParametrAndDocument()
 {
     TestPixServiceClient client = new TestPixServiceClient();
     PatientDto patient = new PatientDto();
     patient.FamilyName = "Жукин";
     patient.GivenName = "Дмитрий";
     patient.BirthDate = new DateTime(1983, 01, 07);
     patient.Sex = 1;
     patient.IdPatientMIS = "123456789010";
     PixServise.DocumentDto document = new PixServise.DocumentDto();
     document.IdDocumentType = 14;
     document.DocS = "1234";
     document.DocN = "123456";
     document.ProviderName = "УФМС";
     patient.Documents = new PixServise.DocumentDto[] { document };
     client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient);
     PatientDto forSearch = new PatientDto();
     forSearch.FamilyName = "Жукин";
     forSearch.GivenName = "Дмитрий";
     forSearch.BirthDate = new DateTime(1983, 01, 07);
     forSearch.Sex = 1;
     PixServise.DocumentDto forSearchD = new PixServise.DocumentDto();
     forSearchD.IdDocumentType = 14;
     forSearchD.DocS = "1234";
     forSearchD.DocN = "123456";
     forSearch.Documents = new PixServise.DocumentDto[] { document };
     client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", forSearch, SourceType.Reg);
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #44
0
        public void FindMultidocumentPatient()
        {
            TestPixServiceClient client  = new TestPixServiceClient();
            PatientDto           patient = new PatientDto();

            patient.Addresses = new PixServise.AddressDto[]
            {
                new PixServise.AddressDto
                {
                    IdAddressType = 1,
                    StringAddress = "Россия, г.Санкт-Петербург, р-н.Центральный, пер.Дегтярный, д.1/8, кв.82"
                }
            };
            patient.BirthDate  = new DateTime(1976, 07, 19);
            patient.BirthPlace = new BirthPlaceDto
            {
                City    = "г. СПБ",
                Country = "г. СПБ",
                Region  = "г. СПБ"
            };
            patient.Contacts = new ContactDto[]
            {
                new ContactDto
                {
                    ContactValue  = "274-26-75",
                    IdContactType = 1
                }
            };
            patient.Documents = new PixServise.DocumentDto[]
            {
                new PixServise.DocumentDto
                {
                    DocN           = "993820",
                    DocS           = "40 02",
                    IdDocumentType = 14,
                    IssuedDate     = new DateTime(2002, 09, 06),
                    ProviderName   = "76 о/м СПб"
                },
                new PixServise.DocumentDto
                {
                    DocN           = "7852320830001562",
                    DocS           = "ЕП",
                    IdDocumentType = 228,
                    IdProvider     = "78008",
                    IssuedDate     = new DateTime(2014, 05, 03),
                    ProviderName   = "САНКТ-ПЕТЕРБУРГСКИЙ ФИЛИАЛ ОАО 'РОСНО-МС'"
                },
                new PixServise.DocumentDto
                {
                    DocN           = "148-841-391 96",
                    IdDocumentType = 223,
                    ProviderName   = "ПФР"
                }
            };
            patient.FamilyName       = "Трескунов";
            patient.GivenName        = "Роман";
            patient.IdLivingAreaType = 1;
            patient.Job = new PixServise.JobDto
            {
                CompanyName = "Не работает",
            };
            patient.SocialStatus = "2.4";
            patient.IdPatientMIS = "2312312312399";
            patient.Sex          = 1;
            client.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient);
            client.UpdatePatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient);
            PatientDto patient2 = new PatientDto();

            patient2.Documents = new PixServise.DocumentDto[]
            {
                new PixServise.DocumentDto
                {
                    DocN           = "7852320830001562",
                    DocS           = "ЕП",
                    IdDocumentType = 228
                }
            };
            patient2.FamilyName = "Трескунов";
            patient2.GivenName  = "Роман";
            patient2.BirthDate  = new DateTime(1976, 07, 19);
            client.GetPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.230", patient2, SourceType.Reg);
        }
Example #45
0
 public void CreateMinStatCase()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate();
         EmkClient.CreateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
Example #46
0
        public void AddStepToCaseStatCaseWithAppointedMedicationMin()
        {
            using (TestPixServiceClient c = new TestPixServiceClient())
            {
                PatientDto patient = (new SetData()).PatientSet();
                c.AddPatient(Global.GUID, Data.idlpu, patient);
            }
            using (TestEmkServiceClient client = new TestEmkServiceClient())
            {
                CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate();
                client.CreateCase(Global.GUID, caseStat);
                StepStat stepStat = (new SetData()).MinStepStatSet();
                stepStat.MedRecords = new List<MedRecord>
                {
                    (new  SetData()).MinAppointedMedication()
                };

                client.AddStepToCase(Global.GUID, Data.idlpu, caseStat.IdPatientMis, caseStat.IdCaseMis, stepStat);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }