Example #1
0
        public void UpdateMinAmbCase_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 = (new SetData()).MinCaseAmbSet();
                EmkClient.UpdateCase(Global.GUID, caseAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #2
0
 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);
     }
 }
Example #3
0
 public void AddAmbForm027U()
 {
     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.form027U
         };
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #4
0
        public CaseAmb MinCaseAmbSetForClose()
        {
            CaseAmb caseAmb = new CaseAmb();

            caseAmb.CloseDate              = CaseAmbData.caseAmb.CloseDate;
            caseAmb.IdCaseMis              = CaseAmbData.caseAmb.IdCaseMis;
            caseAmb.Confidentiality        = CaseAmbData.caseAmb.Confidentiality;
            caseAmb.DoctorConfidentiality  = CaseAmbData.caseAmb.DoctorConfidentiality;
            caseAmb.CuratorConfidentiality = CaseAmbData.caseAmb.CuratorConfidentiality;
            caseAmb.IdLpu        = CaseAmbData.caseAmb.IdLpu;
            caseAmb.IdCaseResult = CaseAmbData.caseAmb.IdCaseResult;
            caseAmb.Comment      = CaseAmbData.caseAmb.Comment;
            caseAmb.IdPatientMis = CaseAmbData.caseAmb.IdPatientMis;

            caseAmb.DoctorInCharge = MinDoctorSet();

            caseAmb.Author = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.MedRecords = new List <MedRecord>
            {
                MinClinicMainDiagnosis()
            };

            return(caseAmb);
        }
Example #5
0
        public CaseAmb MinCaseAmbSetForCreate()
        {
            CaseAmb caseAmb = new CaseAmb();

            caseAmb.OpenDate               = CaseAmbData.caseAmb.OpenDate;
            caseAmb.HistoryNumber          = CaseAmbData.caseAmb.HistoryNumber;
            caseAmb.IdCaseMis              = CaseAmbData.caseAmb.IdCaseMis;
            caseAmb.IdPaymentType          = CaseAmbData.caseAmb.IdPaymentType;
            caseAmb.Confidentiality        = CaseAmbData.caseAmb.Confidentiality;
            caseAmb.DoctorConfidentiality  = CaseAmbData.caseAmb.DoctorConfidentiality;
            caseAmb.CuratorConfidentiality = CaseAmbData.caseAmb.CuratorConfidentiality;
            caseAmb.IdLpu        = CaseAmbData.caseAmb.IdLpu;
            caseAmb.IdPatientMis = CaseAmbData.caseAmb.IdPatientMis;
            caseAmb.IdCaseType   = CaseAmbData.caseAmb.IdCaseType;
            caseAmb.Author       = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Steps = new List <StepAmb>
            {
                MinStepAmbSet()
            };

            return(caseAmb);
        }
Example #6
0
        public void CreateAmbCaseWithTfomsInfoFull()
        {
            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()).MinCaseAmbSetForCreate();
                caseAmb.MedRecords = new List <MedRecord>
                {
                    MedRecordData.tfomsInfo
                };

                client.CreateCase(Global.GUID, caseAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #7
0
        public void AddMedRecord_ToCase_AmbCaseWithTfomsInfoMin()
        {
            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()).MinTfomsInfo();

                client.AddMedRecord(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, medRecord, caseAmb.IdCaseMis);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #8
0
 public void CloseAmbCaseWithMinDiagnosis()
 {
     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()).MinCaseAmbSetForCreate();
         client.CreateCase(Global.GUID, caseAmb);
         caseAmb            = (new SetData()).MinCaseAmbSetForClose();
         caseAmb.MedRecords = new List <MedRecord>
         {
             (new SetData()).MinDiagnosis(),
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.CloseCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #9
0
 public void CreateAmbCaseWithLaboratoryReportFull()
 {
     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()).MinCaseAmbSetForCreate();
         caseAmb.MedRecords = new List <MedRecord>
         {
             MedRecordData.LaboratoryReport
         };
         StepAmb stepAmb = (new SetData()).MinStepAmbSet();
         stepAmb.MedRecords = new List <MedRecord>
         {
             MedRecordData.LaboratoryReport,
             (new SetData()).MinLaboratoryReport()
         };
         caseAmb.Steps = new List <StepAmb>
         {
             stepAmb
         };
         client.CreateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
        public void UpdateMinAmbCase_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);

                EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #11
0
        public void AddAmbStep_OtherIdFull()
        {
            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 = CaseAmbData.otherStep;
                stepAmb.MedRecords = new List <MedRecord>
                {
                    (new SetData()).MinService(),
                    (new SetData()).MinAppointedMedication(),
                    (new SetData()).MinDiagnosis(),
                    MedRecordData.clinicMainDiagnosis,
                    MedRecordData.referral,
                    (new SetData()).MinLaboratoryReport()
                };
                EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #12
0
        public void AddAmbStep_SameIdMin()
        {
            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();
                stepAmb.IdStepMis = CaseAmbData.step.IdStepMis;
                EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #13
0
 public void AddAmbCaseRef_ToStep()
 {
     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();
         StepAmb stepAmb = (new SetData()).MinStepAmbSet();
         stepAmb.MedRecords = new List <MedRecord>
         {
             MedRecordData.referral
         };
         caseAmb.Steps = new List <StepAmb>
         {
             stepAmb
         };
         EmkClient.AddCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #14
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 #15
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 #16
0
 public void UpdateAmbCaseFullSick()
 {
     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.MedRecords = new List <MedRecord>
         {
             MedRecordData.sickList,
             (new SetData()).MinClinicMainDiagnosis()
         };
         EmkClient.UpdateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #17
0
 public void CreateAmbCaseMinSick()
 {
     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();
         caseAmb.MedRecords = new List <MedRecord>
         {
             (new SetData()).MinSickList()
         };
         EmkClient.CreateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #18
0
 public void UpdateAmbCaseWithMaxDishargeSummary()
 {
     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.dischargeSummary,
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.UpdateCase(Global.GUID, caseAmb);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #19
0
        public void AddStepToCaseAmbCaseWithAppointedMedicationMin()
        {
            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()).MinCaseAmbSetForCreate();
                client.CreateCase(Global.GUID, caseAmb);
                StepAmb stepAmb = (new SetData()).MinStepAmbSet();
                stepAmb.MedRecords = new List <MedRecord>
                {
                    (new  SetData()).MinAppointedMedication()
                };

                client.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #20
0
        public void AddMedRecord_ToPatient_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);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #21
0
 public void AddDispCaseWithMaxDispanseryOne()
 {
     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>
         {
             MedRecordData.dispensaryOne,
             (new SetData()).MinClinicMainDiagnosis()
         };
         client.AddCase(Global.GUID, caseDisp);
     }
     if (Global.errors == "")
     {
         Assert.Pass();
     }
     else
     {
         Assert.Fail(Global.errors);
     }
 }
Example #22
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 #23
0
        public void AddAmbStep_Ref()
        {
            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();
                stepAmb.MedRecords = new List <MedRecord>
                {
                    MedRecordData.referral
                };
                EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseAmb.IdPatientMis, caseAmb.IdCaseMis, stepAmb);
            }
            if (Global.errors == "")
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail(Global.errors);
            }
        }
Example #24
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);
     }
 }
Example #25
0
        public CaseAmb MinCaseAmbSetForClose()
        {
            CaseAmb caseAmb = new CaseAmb();
            caseAmb.CloseDate = CaseAmbData.caseAmb.CloseDate;
            caseAmb.IdCaseMis = CaseAmbData.caseAmb.IdCaseMis;
            caseAmb.Confidentiality = CaseAmbData.caseAmb.Confidentiality;
            caseAmb.DoctorConfidentiality = CaseAmbData.caseAmb.DoctorConfidentiality;
            caseAmb.CuratorConfidentiality = CaseAmbData.caseAmb.CuratorConfidentiality;
            caseAmb.IdLpu = CaseAmbData.caseAmb.IdLpu;
            caseAmb.IdCaseResult = CaseAmbData.caseAmb.IdCaseResult;
            caseAmb.Comment = CaseAmbData.caseAmb.Comment;
            caseAmb.IdPatientMis = CaseAmbData.caseAmb.IdPatientMis;

            caseAmb.DoctorInCharge = MinDoctorSet();

            caseAmb.Author = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.MedRecords = new MedRecord[]
            {
                MinClinicMainDiagnosis()
            };

            return caseAmb;
        }
Example #26
0
        public CaseAmb FullCaseDispSetForClose()
        {
            CaseAmb caseAmb = CaseDispData.caseDisp;

            caseAmb.IdCaseType = new byte();
            caseAmb.Steps      = null;
            return(caseAmb);
        }
        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 #28
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);
            }
        }
Example #29
0
        public CaseAmb FullCaseDispSetForCreate()
        {
            CaseAmb caseAmb = CaseDispData.caseDisp;

            caseAmb.CloseDate    = new DateTime();
            caseAmb.IdCaseResult = new byte();
            caseAmb.Comment      = null;
            caseAmb.IdAmbResult  = new byte();

            return(caseAmb);
        }
Example #30
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 #31
0
 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);
     }
 }
Example #32
0
        public CaseAmb MinCaseAmbSetForCreate()
        {
            CaseAmb caseAmb = new CaseAmb();
            caseAmb.OpenDate = CaseAmbData.caseAmb.OpenDate;
            caseAmb.HistoryNumber = CaseAmbData.caseAmb.HistoryNumber;
            caseAmb.IdCaseMis = CaseAmbData.caseAmb.IdCaseMis;
            caseAmb.IdPaymentType = CaseAmbData.caseAmb.IdPaymentType;
            caseAmb.Confidentiality = CaseAmbData.caseAmb.Confidentiality;
            caseAmb.DoctorConfidentiality = CaseAmbData.caseAmb.DoctorConfidentiality;
            caseAmb.CuratorConfidentiality = CaseAmbData.caseAmb.CuratorConfidentiality;
            caseAmb.IdLpu = CaseAmbData.caseAmb.IdLpu;
            caseAmb.IdPatientMis = CaseAmbData.caseAmb.IdPatientMis;
            caseAmb.IdCaseType = CaseAmbData.caseAmb.IdCaseType;

            caseAmb.Author = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseAmb.Steps = new StepAmb[]
            {
               MinStepAmbSet()
            };

            return caseAmb;
        }
Example #33
0
        public CaseAmb MinCaseDispSetForCreate()
        {
            CaseAmb caseDisp = new CaseAmb();
            caseDisp.OpenDate = CaseDispData.caseDisp.OpenDate;
            caseDisp.IdCaseMis = CaseDispData.caseDisp.IdCaseMis;
            caseDisp.IdPaymentType = CaseDispData.caseDisp.IdPaymentType;
            caseDisp.Confidentiality = CaseDispData.caseDisp.Confidentiality;
            caseDisp.DoctorConfidentiality = CaseDispData.caseDisp.DoctorConfidentiality;
            caseDisp.CuratorConfidentiality = CaseDispData.caseDisp.CuratorConfidentiality;
            caseDisp.IdLpu = CaseDispData.caseDisp.IdLpu;
            caseDisp.IdPatientMis = CaseDispData.caseDisp.IdPatientMis;
            caseDisp.IdCaseType = CaseDispData.caseDisp.IdCaseType;

            caseDisp.Author = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseDisp.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseDisp.Steps = new List<StepAmb>
            {
               MinStepAmbSet()
            };

            return caseDisp;
        }
Example #34
0
        //диспансеризация
        public CaseAmb MinCaseDispSet()
        {
            CaseAmb caseDisp = new CaseAmb();
            caseDisp.OpenDate = CaseDispData.caseDisp.OpenDate;
            caseDisp.CloseDate = CaseDispData.caseDisp.CloseDate;
            caseDisp.HistoryNumber = CaseDispData.caseDisp.HistoryNumber;
            caseDisp.IdCaseMis = CaseDispData.caseDisp.IdCaseMis;
            caseDisp.IdPaymentType = CaseDispData.caseDisp.IdPaymentType;
            caseDisp.Confidentiality = CaseDispData.caseDisp.Confidentiality;
            caseDisp.DoctorConfidentiality = CaseDispData.caseDisp.DoctorConfidentiality;
            caseDisp.CuratorConfidentiality = CaseDispData.caseDisp.CuratorConfidentiality;
            caseDisp.IdLpu = CaseDispData.caseDisp.IdLpu;
            caseDisp.IdCaseResult = CaseDispData.caseDisp.IdCaseResult;
            caseDisp.Comment = CaseDispData.caseDisp.Comment;
            caseDisp.IdPatientMis = CaseDispData.caseDisp.IdPatientMis;
            caseDisp.IdCaseType = CaseDispData.caseDisp.IdCaseType;

            caseDisp.DoctorInCharge = MinDoctorSet();

            caseDisp.Author = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseDisp.Authenticator = new Participant
            {
                Doctor = MinDoctorSet()
            };

            caseDisp.Steps = new List<StepAmb>
            {
               MinStepAmbSet()
            };

            caseDisp.MedRecords = new List<MedRecord>
            {
                MinClinicMainDiagnosis()
            };

            return caseDisp;
        }
Example #35
0
 public static TestAmbCase BuildAmbCaseFromDataBaseData(string guid, string idlpu, string mis, string patientId)
 {
     if ((guid != string.Empty) && (idlpu != string.Empty) && (mis != string.Empty) && (patientId != string.Empty))
     {
         string caseId = TestCaseBase.GetCaseId(guid, idlpu, mis, patientId);
         if (caseId != null)
         {
             CaseAmb ca = new CaseAmb();
             using (SqlConnection connection = Global.GetSqlConnection())
             {
                 string findCase = "SELECT TOP(1) * FROM AmbCase WHERE IdCase = '" + caseId + "'";
                 SqlCommand caseCommand = new SqlCommand(findCase, connection);
                 using (SqlDataReader caseReader = caseCommand.ExecuteReader())
                 {
                     while (caseReader.Read())
                     {
                         if (caseReader["IdCasePurpose"].ToString() != "")
                             ca.IdCasePurpose = Convert.ToByte(caseReader["IdCasePurpose"]);
                         if (caseReader["IdAmbResult"].ToString() != "")
                             ca.IdAmbResult = Convert.ToByte(caseReader["IdAmbResult"]);
                         if (caseReader["IsActive"].ToString() != "")
                             ca.IsActive = Convert.ToBoolean(caseReader["IsActive"]);
                         TestAmbCase ambcase = new TestAmbCase(guid, ca);
                         ambcase.caseBase = TestCaseBase.BuildBaseCaseFromDataBaseData(guid, idlpu, mis, patientId);
                         ambcase.ambSteps = TestAmbStep.BuildAmbTestStepsFromDataBase(caseId, ca.IdLpu);
                         List<TestStepBase> st = TestStepBase.BuildTestStepsFromDataBase(caseId, ca.IdLpu);
                         if (st != null)
                         {
                             foreach (TestStepBase i in st)
                             {
                                 if (Global.IsEqual(i.step.IdStepMis, null))
                                     ambcase.defaultStep = i;
                             }
                             if (!Global.IsEqual(ambcase.defaultStep, null))
                             {
                                 ambcase.records = new List<TestMedRecord>();
                                 List<TestService> ser = TestService.BuildServiseFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(ser, null))
                                     ambcase.records.AddRange(ser);
                                 TestTfomsInfo forms = TestTfomsInfo.BuildTfomsInfoFromDataBaseDate(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(forms, null))
                                     ambcase.records.Add(forms);
                                 TestDeathInfo tdi = TestDeathInfo.BuildDeathInfoFromDataBaseDate(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(tdi, null))
                                     ambcase.records.Add(tdi);
                                 List<TestDiagnosis> td = TestDiagnosis.BuildDiagnosisFromDataBaseDate(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(td, null))
                                     ambcase.records.AddRange(td);
                                 TestClinicMainDiagnosis acdm = TestClinicMainDiagnosis.BuildTestClinicMainDiagnosisFromDataBaseDate(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(acdm, null))
                                     ambcase.records.Add(acdm);
                                 List<TestReferral> trl = TestReferral.BuildReferralFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(trl, null))
                                     ambcase.records.AddRange(trl);
                                 List<TestSickList> tsl = TestSickList.BuildSickListFromDataBaseData(ambcase.defaultStep.idStep, patientId);
                                 if (!Global.IsEqual(tsl, null))
                                     ambcase.records.AddRange(tsl);
                                 TestDischargeSummary tds = TestDischargeSummary.BuildSickListFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(tds, null))
                                     ambcase.records.Add(tds);
                                 List<TestLaboratoryReport> tlr = TestLaboratoryReport.BuildLaboratoryReportFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(tlr, null))
                                     ambcase.records.AddRange(tlr);
                                 TestConsultNote tcn = TestConsultNote.BuildSickListFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(tcn, null))
                                     ambcase.records.Add(tcn);
                                 TestDispensaryOne d1 = TestDispensaryOne.BuildSickListFromDataBaseData(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(d1, null))
                                     ambcase.records.Add(d1);
                                 List<TestAppointedMedication> ap = TestAppointedMedication.BuildAppointedMedicationFromDataBaseDate(ambcase.defaultStep.idStep);
                                 if (!Global.IsEqual(ap, null))
                                     ambcase.records.AddRange(ap);
                                 if (ambcase.records.Count == 0)
                                     ambcase.records = null;
                             }
                         }
                         return ambcase;
                     }
                 }
             }
         }
     }
     return null;
 }
Example #36
0
 public void ChangeUpdateAmbCase(string guid, CaseAmb ca)
 {
     GUID = guid.ToLower();
     if (ca != null)
     {
         this.caseAmb.IsActive = ca.IsActive;
         if (ca.IdAmbResult != 0)
             this.caseAmb.IdAmbResult = ca.IdAmbResult;
         if (ca.IdCasePurpose != 0)
             this.caseAmb.IdCasePurpose = ca.IdCasePurpose;
         caseBase.UpdateCaseBase(guid, ca);
         if (ca.MedRecords != null)
         {
             List<TestMedRecord> newMedRecords = new List<TestMedRecord>();
             TestTfomsInfo tfi = null;
             TestClinicMainDiagnosis cmd = null;
             TestDischargeSummary ds = null;
             TestConsultNote cn = null;
             TestDispensaryOne d1 = null;
             foreach (object i in ca.MedRecords)
             {
                 Service ser = i as Service;
                 if (ser != null)
                     newMedRecords.Add(new TestService(ser, ca.IdLpu));
                 TfomsInfo tf = i as TfomsInfo;
                 if (tf != null)
                     tfi = new TestTfomsInfo(tf);
                 Diagnosis diag = i as Diagnosis;
                 if ((diag != null) && (diag.DiagnosisInfo.IdDiagnosisType != TestDiagnosis.IdClinicMainDiagnosis))
                     newMedRecords.Add(new TestDiagnosis(diag, ca.IdLpu));
                 ClinicMainDiagnosis cm = i as ClinicMainDiagnosis;
                 if ((cm != null) && (cm.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis))
                     cmd = new TestClinicMainDiagnosis(cm, ca.IdLpu);
                 Referral r = i as Referral;
                 if (r != null)
                     newMedRecords.Add(new TestReferral(r, ca.IdLpu));
                 SickList sl = i as SickList;
                 if (sl != null)
                     newMedRecords.Add(new TestSickList(sl, ca.IdLpu));
                 DischargeSummary pds = i as DischargeSummary;
                 if (pds != null)
                     ds = new TestDischargeSummary(pds, ca.IdLpu);
                 LaboratoryReport lr = i as LaboratoryReport;
                 if (lr != null)
                     newMedRecords.Add(new TestLaboratoryReport(lr, ca.IdLpu));
                 ConsultNote pcn = i as ConsultNote;
                 if (pcn != null)
                     cn = new TestConsultNote(pcn, ca.IdLpu);
                 DispensaryOne d = i as DispensaryOne;
                 if (d != null)
                     d1 = new TestDispensaryOne(d, ca.IdLpu);
                 AppointedMedication ap = i as AppointedMedication;
                 if (ap != null)
                     newMedRecords.Add(new TestAppointedMedication(ap, ca.IdLpu));
             }
             if (Global.GetLength(this.medRecords) != 0)
             {
                 foreach (object i in this.medRecords)
                 {
                     TestService ser = i as TestService;
                     if (!Global.IsEqual(ser, null))
                         newMedRecords.Add(ser);
                     TestTfomsInfo tf = i as TestTfomsInfo;
                     if (!Global.IsEqual(tfi, null) && !Global.IsEqual(tf, null))
                         newMedRecords.Add(tf);
                     else
                         if (!Global.IsEqual(tfi, null))
                             newMedRecords.Add(tfi);
                     TestDiagnosis diag = i as TestDiagnosis;
                     if (!Global.IsEqual(diag, null))
                         newMedRecords.Add(diag);
                     TestClinicMainDiagnosis cm = i as TestClinicMainDiagnosis;
                     if (!Global.IsEqual(cmd, null))
                         newMedRecords.Add(cmd);
                     else
                         if (!Global.IsEqual(cm, null))
                             newMedRecords.Add(cm);
                     TestReferral r = i as TestReferral;
                     if (!Global.IsEqual(r, null))
                         newMedRecords.Add(r);
                     TestSickList sl = i as TestSickList;
                     if (!Global.IsEqual(sl, null))
                         newMedRecords.Add(sl);
                     TestDischargeSummary pds = i as TestDischargeSummary;
                     if (!Global.IsEqual(ds, null))
                         newMedRecords.Add(ds);
                     else
                         if (!Global.IsEqual(pds, null))
                             newMedRecords.Add(pds);
                     TestLaboratoryReport lr = i as TestLaboratoryReport;
                     if (!Global.IsEqual(lr, null))
                         newMedRecords.Add(lr);
                     TestConsultNote pcn = i as TestConsultNote;
                     if (!Global.IsEqual(cn, null))
                         newMedRecords.Add(cn);
                     else
                         if (!Global.IsEqual(pcn, null))
                             newMedRecords.Add(pcn);
                     TestDispensaryOne d = i as TestDispensaryOne;
                     if (!Global.IsEqual(d1, null))
                         newMedRecords.Add(d1);
                     else
                         if (!Global.IsEqual(d, null))
                             newMedRecords.Add(d);
                     TestAppointedMedication ap = i as TestAppointedMedication;
                     if (!Global.IsEqual(ap, null))
                         newMedRecords.Add(ap);
                 }
             }
             else
             {
                 if (!Global.IsEqual(tfi, null))
                     newMedRecords.Add(tfi);
                 if (!Global.IsEqual(cmd, null))
                     newMedRecords.Add(cmd);
                 if (!Global.IsEqual(ds, null))
                     newMedRecords.Add(ds);
                 if (!Global.IsEqual(cn, null))
                     newMedRecords.Add(cn);
             }
             this.records = newMedRecords;
         }
     }
 }
Example #37
0
 public TestAmbCase(string guid, CaseAmb ca)
 {
     GUID = guid.ToLower();
     if (ca != null)
     {
         caseAmb = ca;
         caseBase = new TestCaseBase(guid, ca);
         if (ca.Steps != null)
         {
             ambSteps = new List<TestAmbStep>();
             foreach (StepAmb i in ca.Steps)
             {
                 ambSteps.Add(new TestAmbStep(i, ca.IdLpu));
             }
         }
         if (ca.MedRecords != null)
         {
             records = new List<TestMedRecord>();
             foreach (object i in ca.MedRecords)
             {
                 Service ser = i as Service;
                 if (ser != null)
                     records.Add(new TestService(ser, ca.IdLpu));
                 TfomsInfo tfi = i as TfomsInfo;
                 if (tfi != null)
                     records.Add(new TestTfomsInfo(tfi));
                 ClinicMainDiagnosis cmd = i as ClinicMainDiagnosis;
                 if ((cmd != null) && (cmd.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis))
                     records.Add(new TestClinicMainDiagnosis(cmd, ca.IdLpu));
                 if (cmd == null)
                 {
                     Diagnosis diag = i as Diagnosis;
                     if ((diag != null) && (diag.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis))
                         records.Add(new TestClinicMainDiagnosis(diag, ca.IdLpu));
                     if ((diag != null) && (diag.DiagnosisInfo.IdDiagnosisType != TestDiagnosis.IdClinicMainDiagnosis))
                         records.Add(new TestDiagnosis(diag, ca.IdLpu));
                 }
                 Referral r = i as Referral;
                 if (r != null)
                     records.Add(new TestReferral(r, ca.IdLpu));
                 SickList sl = i as SickList;
                 if (sl != null)
                     records.Add(new TestSickList(sl, ca.IdLpu));
                 DischargeSummary ds = i as DischargeSummary;
                 if (ds != null)
                     records.Add(new TestDischargeSummary(ds, ca.IdLpu));
                 LaboratoryReport lr = i as LaboratoryReport;
                 if (lr != null)
                     records.Add(new TestLaboratoryReport(lr, ca.IdLpu));
                 ConsultNote cn = i as ConsultNote;
                 if (cn != null)
                     records.Add(new TestConsultNote(cn, ca.IdLpu));
                 DispensaryOne d1 = i as DispensaryOne;
                 if ((d1 != null) && (ca.IdCaseType == TestAmbCase.dispanseryId))
                     records.Add(new TestDispensaryOne(d1, ca.IdLpu));
                 AppointedMedication ap = i as AppointedMedication;
                 if (ap != null)
                     records.Add(new TestAppointedMedication(ap, ca.IdLpu));
             }
         }
         if ((ca.IdLpu != null) && (ca.IdPatientMis != null))
         {
             List<TestStepBase> st = TestStepBase.BuildTestStepsFromDataBase(TestCaseBase.GetCaseId(guid, ca.IdLpu, ca.IdCaseMis, TestPerson.GetPersonId(guid, ca.IdLpu, ca.IdPatientMis)), ca.IdLpu);
             if (st != null)
             {
                 foreach (TestStepBase i in st)
                 {
                     if (Global.IsEqual(i.doctor, null))
                         defaultStep = i;
                 }
             }
         }
     }
 }