예제 #1
0
 public void AddMinAmbCaseWithTrueKey()
 {
     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();
         caseAmb.MedRecords = new List <MedRecord>
         {
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.TrueMedRecordDataWithKey
         };
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #2
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 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);
 }
예제 #3
0
 public void UpdateDispCaseWithOutMinDispanseryOne()
 {
     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()).MinClinicMainDiagnosis()
         };
         client.AddCase(Global.GUID, caseDisp);
         caseDisp.MedRecords = new List <MedRecord>
         {
             (new SetData()).MinDispensaryOne(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.UpdateCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #4
0
파일: mqProxyTest.cs 프로젝트: nbIxMaN/EMKT
 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);
 }
예제 #5
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);
        }
예제 #6
0
파일: mqProxyTest.cs 프로젝트: nbIxMaN/EMKT
 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);
 }
예제 #7
0
        public void AddMedRecord_ToCase_StatCaseWithTfomsInfoMin()
        {
            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);

                MedRecord medRecord = (new SetData()).MinTfomsInfo();

                client.AddMedRecord(Global.GUID, Data.idlpu, caseStat.IdPatientMis, medRecord, caseStat.IdCaseMis);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #8
0
        public void UpdateStatCaseWithAppointedMedicationMin()
        {
            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);
                StepStat stepStat = (new SetData()).MinStepStatSet();
                stepStat.MedRecords = new List <MedRecord>
                {
                    (new SetData()).MinAppointedMedication()
                };

                caseStat.Steps = new List <StepStat>
                {
                    stepStat
                };
                client.UpdateCase(Global.GUID, caseStat);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #9
0
        public void AddMedRecord_ToCase_AmbCaseWithLaboratoryReportMin()
        {
            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 = (new SetData()).MinLaboratoryReport();

                client.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, medRecord, caseAmb.IdCaseMis);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #10
0
 public void AddStatCaseWithMinDiagnosis()
 {
     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()).MinDiagnosis(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.AddCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #11
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 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);
     }
 }
예제 #12
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);
            }
        }
예제 #13
0
        public void AddMinStatCase()
        {
            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.PrehospitalDefects = new List <byte>()
                {
                    1, 2
                };

                EmkClient.AddCase(Global.GUID, caseStat);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #14
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void _AddAmbCase()
 {
     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);
         p.MedRecords = new List <MedRecord>
         {
             MedRecordData.clinicMainDiagnosis,
             //GetEpic(),
             GetConsult()
         };
         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()
         };
         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);
     }
 }
예제 #15
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);
            }
        }
예제 #16
0
 public void AddMinAmbCaseWithWrongKey()
 {
     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();
         caseAmb.MedRecords = new List <MedRecord>
         {
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.WrongMedRecordDataWithKey
         };
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors.Contains("Data - Поле заполнено некорректно"))
     {
         Assert.Pass(Global.errors);
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #17
0
        public void AddMedRecord_ToPatient_StatCaseWithLaboratoryReportFull()
        {
            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);

                MedRecord medRecord = MedRecordData.LaboratoryReport;

                client.AddMedRecord(Global.GUID, Data.idlpu, caseStat.IdPatientMis, medRecord);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #18
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);
     }
 }
예제 #19
0
 public void UpdateAmbCaseWithMaxDiagnosis()
 {
     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>
         {
             MedRecordData.diagnosis,
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.UpdateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #20
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void TestDoc()
 {
     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()).FullCaseDispSetWithDoctorWithoutSNILS();
         caseDisp.Guardian   = null;
         caseDisp.OpenDate   = new DateTime(2014, 06, 01);
         caseDisp.CloseDate  = new DateTime(2014, 06, 10);
         caseDisp.MedRecords = new List <MedRecord>
         {
             MedRecordData.dispensaryOneWithoutSnils,
             MedRecordData.clinicMainDiagnosisWithOutSnils
         };
         client.AddCase(Global.GUID, caseDisp);
         caseDisp            = (new SetData()).FullCaseDispSetWithDoctorWithSNILS();
         caseDisp.Guardian   = null;
         caseDisp.OpenDate   = new DateTime(2014, 06, 01);
         caseDisp.CloseDate  = new DateTime(2014, 06, 10);
         caseDisp.MedRecords = new List <MedRecord>
         {
             MedRecordData.dispensaryOneWithSnils,
             MedRecordData.clinicMainDiagnosisWithSnils
         };
         caseDisp.IdCaseMis = System.DateTime.Now.ToString();
         client.AddCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #21
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);
            }
        }
예제 #22
0
 public void UpdateFullStatCase_AfterAdd()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStatAdd = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase(Global.GUID, caseStatAdd);
         CaseStat caseStat = (new SetData()).FullCaseStatSet();
         SetData  set      = new SetData();
         caseStat.MedRecords = new List <MedRecord>
         {
             set.MinService(),
                 set.MinTfomsInfo(),
                 MedRecordData.deathInfo,
                 set.MinDiagnosis(),
                 MedRecordData.clinicMainDiagnosis,
                 MedRecordData.referral,
                 MedRecordData.sickList,
                 set.MinDischargeSummary(),
                 set.MinLaboratoryReport(),
                 set.MinConsultNote(),
                 MedRecordData.form027U
         };
         StepStat stepStat = (new SetData()).MinStepStatSet();
         stepStat.MedRecords = new List <MedRecord>
         {
             set.MinService(),
                 set.MinAppointedMedication(),
                 set.MinDiagnosis(),
                 MedRecordData.clinicMainDiagnosis,
                 MedRecordData.referral,
                 set.MinLaboratoryReport(),
         };
         caseStat.Steps = new List <StepStat>
         {
             stepStat
         };
         EmkClient.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #23
0
        public void UpdateFullAmbCase_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 caseAmbAdd = (new SetData()).MinCaseAmbSet();
                EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmbAdd);
                CaseAmb caseAmb = (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", caseAmb);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #24
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);
     }
 }
예제 #25
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void TTT()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto p = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.3.64", p);
     }
     using (TestEmkServiceClient c = new TestEmkServiceClient())
     {
         CaseAmb Case = (new SetData()).MinCaseAmbSet();
         Case.IdLpu = "1.2.643.5.1.13.3.25.3.64";
         c.AddCase(Global.GUID, Case);
     }
 }
예제 #26
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);
        }
예제 #27
0
        public void UpdateFullAmbCase_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 caseAmbAdd = (new SetData()).MinCaseAmbSet();
                EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmbAdd);
                CaseAmb caseAmb = (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", caseAmb);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
예제 #28
0
 public void UpdateMinStatCase_AfterAdd()
 {
     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);
         caseStat = (new SetData()).MinCaseStatSet();
         caseStat.DoctorInCharge = new MedicalStaff
         {
             IdLpu        = Data.idlpu,
             IdSpeciality = 31,
             IdPosition   = 76,
             Person       = new PersonWithIdentity
             {
                 IdPersonMis = "unknown1",
                 Sex         = 2,
                 Birthdate   = new DateTime(1976, 03, 09),
                 Documents   = new List <IdentityDocument>
                 {
                     DocumentData.SNILS,
                 },
                 HumanName = new HumanName
                 {
                     FamilyName = "unknown1",
                     GivenName  = "unknown1",
                     MiddleName = "unknown1",
                 },
             }
         };
         caseStat.DoctorInCharge.Person.Documents[0].DocN = "11111111549";
         EmkClient.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #29
0
        public void AddFullDispCase()
        {
            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()).FullCaseDispSet();
                SetData set     = new SetData();
                caseAmb.MedRecords = new List <MedRecord>
                {
                    set.MinService(),
                        set.MinTfomsInfo(),
                        set.MinDiagnosis(),
                        MedRecordData.clinicMainDiagnosis,
                        set.MinDispensaryOne(),
                        set.MinLaboratoryReport(),
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List <MedRecord>
                {
                    set.MinService(),
                        set.MinAppointedMedication(),
                        set.MinDiagnosis(),
                        MedRecordData.clinicMainDiagnosis,
                        set.MinRefferal(),
                        set.MinLaboratoryReport(),
                };
                caseAmb.Steps = new List <StepAmb> {
                    stepAmb
                };
                EmkClient.AddCase(Global.GUID, caseAmb);
            }

            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
예제 #30
0
        public void AddAmbStep_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);

                StepAmb stepAmb = (new SetData()).MinStepAmbSet();

                EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            Assert.IsTrue(Global.errors1.Contains(" - Случай обслуживания закрыт"), "Случай обслуживания был добавлен");
        }
예제 #31
0
 public void AddAmbMedRecClinicDiagnosis_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.clinicMainDiagnosis, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #32
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);
 }
예제 #33
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);
 }
예제 #34
0
 public void AddMinDispCase()
 {
     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()).MinCaseDispSet();
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #35
0
        public void AddMedRecord_ToCase_AmbCaseWithTfomsInfoFull()
        {
            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.tfomsInfo;

                client.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, medRecord, caseAmb.IdCaseMis);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
예제 #36
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);
 }
예제 #37
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);
     }
 }
예제 #38
0
 public void AddAmbMedRecReferral_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.referral, caseAmb.IdCaseMis);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #39
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);
 }
예제 #40
0
 public void UpdateMinStatCase_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())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
         EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #41
0
 public void AddStatMedAppointedMedication_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.appointedMedication, caseStat.IdCaseMis);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
예제 #42
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);
     }
 }
예제 #43
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void TTT()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto p = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.3.64", p);
     }
     using (TestEmkServiceClient c = new TestEmkServiceClient())
     {
         CaseAmb Case = (new SetData()).MinCaseAmbSet();
         Case.IdLpu = "1.2.643.5.1.13.3.25.3.64";
         c.AddCase(Global.GUID, Case);
     }
 }
예제 #44
0
파일: AddCaseTest.cs 프로젝트: nbIxMaN/EMKT
 public void _HashTest()
 {
     using (TestPixServiceClient c = new TestPixServiceClient())
     {
         PatientDto p = (new SetData()).PatientSet();
         c.AddPatient(Global.GUID, Data.idlpu, 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.Fail("Кейс с левым хешом был добавлен");
     else
         Assert.Pass();
 }
예제 #45
0
파일: AddCaseTest.cs 프로젝트: nbIxMaN/EMKT
        public void AddFullDispCase()
        {
            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()).FullCaseDispSet();
                SetData set = new SetData();
                caseAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinTfomsInfo(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    set.MinDispensaryOne(),
                    set.MinLaboratoryReport(),
                };
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List<MedRecord>
                {
                    set.MinService(),
                    set.MinAppointedMedication(),
                    set.MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    set.MinRefferal(),
                    set.MinLaboratoryReport(),
                };
                caseAmb.Steps = new List<StepAmb> { stepAmb };
                EmkClient.AddCase(Global.GUID, caseAmb);
            }

            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
예제 #46
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void _UpdateAmbCase()
 {
     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.MedRecords = new List<MedRecord>
         {
             MedRecordData.clinicMainDiagnosis
         };
         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()
         };
         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);
 }
예제 #47
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);
 }
예제 #48
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);
        }
예제 #49
0
        public void AddMedRecord_ToPatient_StatCaseWithLaboratoryReportMin()
        {
            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);

                MedRecord medRecord = (new SetData()).MinLaboratoryReport();

                client.AddMedRecord(Global.GUID, Data.idlpu, caseStat.IdPatientMis, medRecord);
            }
            if (Global.errors == "")
                Assert.Pass();
            else
                Assert.Fail(Global.errors);
        }
예제 #50
0
 public void UpdateMinStatCase_AfterAdd()
 {
     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);
         caseStat = (new SetData()).MinCaseStatSet();
         caseStat.DoctorInCharge = new MedicalStaff
         {
             IdLpu = Data.idlpu,
             IdSpeciality = 31,
             IdPosition = 76,
             Person = new PersonWithIdentity
             {
                 IdPersonMis = "unknown1",
                 Sex = 2,
                 Birthdate = new DateTime(1976, 03, 09),
                 Documents = new List<IdentityDocument>
             {
                 DocumentData.SNILS,
             },
                 HumanName = new HumanName
                 {
                     FamilyName = "unknown1",
                     GivenName = "unknown1",
                     MiddleName = "unknown1",
                 },
             }
         };
         caseStat.DoctorInCharge.Person.Documents[0].DocN = "11111111549";
         EmkClient.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #51
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);
        }
예제 #52
0
 public void UpdateFullStatCase_AfterAdd()
 {
     using (TestPixServiceClient PixClient = new TestPixServiceClient())
     {
         PatientDto patient = (new SetData()).PatientSet();
         PixClient.AddPatient(Global.GUID, Data.idlpu, patient);
     }
     using (TestEmkServiceClient EmkClient = new TestEmkServiceClient())
     {
         CaseStat caseStatAdd = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase(Global.GUID, caseStatAdd);
         CaseStat caseStat = (new SetData()).FullCaseStatSet();
         SetData set = new SetData();
         caseStat.MedRecords = new List<MedRecord>
         {
             set.MinService(),
             set.MinTfomsInfo(),
             MedRecordData.deathInfo,
             set.MinDiagnosis(),
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.referral,
             MedRecordData.sickList,
             set.MinDischargeSummary(),
             set.MinLaboratoryReport(),
             set.MinConsultNote(),
             MedRecordData.form027U
         };
         StepStat stepStat = (new SetData()).MinStepStatSet();
         stepStat.MedRecords = new List<MedRecord>
         {
             set.MinService(),
             set.MinAppointedMedication(),
             set.MinDiagnosis(),
             MedRecordData.clinicMainDiagnosis,
             MedRecordData.referral,
             set.MinLaboratoryReport(),
         };
         caseStat.Steps = new List<StepStat>
         {
             stepStat
         };
         EmkClient.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #53
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);
 }
예제 #54
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 public void TestDoc()
 {
     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()).FullCaseDispSetWithDoctorWithoutSNILS();
         caseDisp.Guardian = null;
         caseDisp.OpenDate = new DateTime(2014, 06, 01);
         caseDisp.CloseDate = new DateTime(2014, 06, 10);
         caseDisp.MedRecords = new List<MedRecord>
         {
             MedRecordData.dispensaryOneWithoutSnils,
             MedRecordData.clinicMainDiagnosisWithOutSnils
         };
         client.AddCase(Global.GUID, caseDisp);
         caseDisp = (new SetData()).FullCaseDispSetWithDoctorWithSNILS();
         caseDisp.Guardian = null;
         caseDisp.OpenDate = new DateTime(2014, 06, 01);
         caseDisp.CloseDate = new DateTime(2014, 06, 10);
         caseDisp.MedRecords = new List<MedRecord>
         {
             MedRecordData.dispensaryOneWithSnils,
             MedRecordData.clinicMainDiagnosisWithSnils
         };
         caseDisp.IdCaseMis = System.DateTime.Now.ToString();
         client.AddCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #55
0
 public void UpdateMinStatCase_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())
     {
         CaseStat caseStat = (new SetData()).MinCaseStatSet();
         EmkClient.AddCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
         EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #56
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);
        }
예제 #57
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);
 }
예제 #58
0
파일: UnitTest1.cs 프로젝트: nbIxMaN/EMKT
 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);
 }
예제 #59
0
 public void UpdateStatCaseWithTfomsInfoMin()
 {
     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>
         {
             (new SetData()).MinTfomsInfo(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.UpdateCase(Global.GUID, caseStat);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }
예제 #60
0
 public void UpdateAmbCaseWithMaxConsultNote()
 {
     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>
         {
             MedRecordData.consultNote,
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.UpdateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
         Assert.Pass();
     else
         Assert.Fail(Global.errors);
 }