コード例 #1
0
 private void FindMismatch(TestAmbCase ac)
 {
     if (this.caseAmb.IsActive != ac.caseAmb.IsActive)
     {
         Global.errors2.Add("несовпадение IsActive caseAmb");
     }
     if (this.caseAmb.IdAmbResult != ac.caseAmb.IdAmbResult)
     {
         Global.errors2.Add("несовпадение IdAmbResult caseAmb");
     }
     if (this.caseAmb.IdCasePurpose != ac.caseAmb.IdCasePurpose)
     {
         Global.errors2.Add("несовпадение IdCasePurpose caseAmb");
     }
     if (Global.GetLength(this.steps) != Global.GetLength(ac.steps))
     {
         Global.errors2.Add("несовпадение длины Steps caseAmb");
     }
     if (Global.GetLength(this.medRecords) != Global.GetLength(ac.medRecords))
     {
         Global.errors2.Add("Несовпадение длины MedRecords CaseAmb");
     }
     if (Global.GetLength(this.caseBase) != Global.GetLength(ac.caseBase))
     {
         Global.errors2.Add("Несовпадение длины caseBase CaseAmb");
     }
 }
コード例 #2
0
ファイル: TestStepBase.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestStepBase sb)
 {
     if (this.step.Comment != sb.step.Comment)
     {
         Global.errors3.Add("несовпадение Comment TestStepBase");
     }
     if (this.step.DateEnd != sb.step.DateEnd)
     {
         Global.errors3.Add("несовпадение DateEnd TestStepBase");
     }
     if (this.step.DateStart != sb.step.DateStart)
     {
         Global.errors3.Add("несовпадение DateStart TestStepBase");
     }
     if (this.step.IdPaymentType != sb.step.IdPaymentType)
     {
         Global.errors3.Add("несовпадение IdPaymentType TestStepBase");
     }
     if (this.step.IdStepMis != sb.step.IdStepMis)
     {
         Global.errors3.Add("несовпадение IdStepMis TestStepBase");
     }
     if (Global.GetLength(step) != Global.GetLength(sb.step))
     {
         Global.errors3.Add("несовпадение длины step TestStepBase");
     }
     if (Global.GetLength(doctor) != Global.GetLength(sb.doctor))
     {
         Global.errors3.Add("несовпадение длины doctor TestStepBase");
     }
 }
コード例 #3
0
 private void FindMismatch(TestReferral r)
 {
     if (this.referral.CreationDate != r.referral.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestReferral");
     }
     if (this.referral.Header != r.referral.Header)
     {
         Global.errors3.Add("Несовпадение Header TestReferral");
     }
     if (this.referral.IdSourceLpu != r.referral.IdSourceLpu)
     {
         Global.errors3.Add("Несовпадение IdSourceLpu TestReferral");
     }
     if (this.referral.IdTargetLpu != r.referral.IdTargetLpu)
     {
         Global.errors3.Add("Несовпадение IdTargetLpu TestReferral");
     }
     if (this.referral.ReferralID != r.referral.ReferralID)
     {
         Global.errors3.Add("Несовпадение ReferralID TestReferral");
     }
     if (this.referral.ReferralInfo.HospitalizationOrder != r.referral.ReferralInfo.HospitalizationOrder)
     {
         Global.errors3.Add("Несовпадение HospitalizationOrderTestReferral");
     }
     if (this.referral.ReferralInfo.IdReferralMis != r.referral.ReferralInfo.IdReferralMis)
     {
         Global.errors3.Add("Несовпадение IdReferralMis TestReferral");
     }
     if (this.referral.ReferralInfo.IdReferralType != r.referral.ReferralInfo.IdReferralType)
     {
         Global.errors3.Add("Несовпадение IdReferralType TestReferral");
     }
     if (this.referral.ReferralInfo.IssuedDateTime != r.referral.ReferralInfo.IssuedDateTime)
     {
         Global.errors3.Add("Несовпадение IssuedDateTime TestReferral");
     }
     if (this.referral.ReferralInfo.MkbCode != r.referral.ReferralInfo.MkbCode)
     {
         Global.errors3.Add("Несовпадение MkbCode TestReferral");
     }
     if (this.referral.ReferralInfo.Reason != r.referral.ReferralInfo.Reason)
     {
         Global.errors3.Add("Несовпадение Reason TestReferral");
     }
     if (Global.GetLength(this.departmentHead) != Global.GetLength(r.departmentHead))
     {
         Global.errors3.Add("Несовпадение длинны departmentHead TestReferral");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длинны doctor TestReferral");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длинны attachment TestReferral");
     }
 }
コード例 #4
0
 private void FindMismatch(TestAppointedMedication ta)
 {
     if (this.document.AnatomicTherapeuticChemicalClassification != ta.document.AnatomicTherapeuticChemicalClassification)
     {
         Global.errors3.Add("несовпадение AnatomicTherapeuticChemicalClassification TestAppointedMedication");
     }
     if (Global.GetLength(this.courseDose) != Global.GetLength(ta.courseDose))
     {
         Global.errors3.Add("несовпадение длины CourseDose TestAppointedMedication");
     }
     if (Global.GetLength(this.dayDose) != Global.GetLength(ta.dayDose))
     {
         Global.errors3.Add("несовпадение длины DayDose TestAppointedMedication");
     }
     if (this.document.DaysCount != ta.document.DaysCount)
     {
         Global.errors3.Add("несовпадение DaysCount TestAppointedMedication");
     }
     if (this.document.IssuedDate != ta.document.IssuedDate)
     {
         Global.errors3.Add("несовпадение IssuedDate TestAppointedMedication");
     }
     if (this.document.MedicineIssueType != ta.document.MedicineIssueType)
     {
         Global.errors3.Add("несовпадение MedicineIssueType TestAppointedMedication");
     }
     if (this.document.MedicineName != ta.document.MedicineName)
     {
         Global.errors3.Add("несовпадение MedicineName TestAppointedMedication");
     }
     if (this.document.MedicineType != ta.document.MedicineType)
     {
         Global.errors3.Add("несовпадение MedicineType TestAppointedMedication");
     }
     if (this.document.MedicineUseWay != ta.document.MedicineUseWay)
     {
         Global.errors3.Add("несовпадение MedicineUseWay TestAppointedMedication");
     }
     if (this.document.Number != ta.document.Number)
     {
         Global.errors3.Add("несовпадение Number TestAppointedMedication");
     }
     if (Global.GetLength(this.oneTimeDose) != Global.GetLength(ta.oneTimeDose))
     {
         Global.errors3.Add("несовпадение длины OneTimeDose TestAppointedMedication");
     }
     if (this.document.Seria != ta.document.Seria)
     {
         Global.errors3.Add("несовпадение Seria TestAppointedMedication");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(ta.doctor))
     {
         Global.errors3.Add("несовпадение длины doctor TestAppointedMedication");
     }
 }
コード例 #5
0
ファイル: TestDiagnosis.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestDiagnosis t)
 {
     if (Global.GetLength(this.doctor) != Global.GetLength(t.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestDiagnosis");
     }
     if (Global.GetLength(this.info) != Global.GetLength(t.info))
     {
         Global.errors3.Add("Несовпадение длины info TestDiagnosis");
     }
 }
コード例 #6
0
 private void FindMismatch(TestParticipant p)
 {
     if (p.participant != null)
     {
         if (this.participant.IdRole != p.participant.IdRole)
         {
             Global.errors3.Add("Несовпадение IdRole TestParticipant");
         }
         if (Global.GetLength(this.doctor) != Global.GetLength(p.doctor))
         {
             Global.errors3.Add("Несjвпадение длины doctor TestParticipant");
         }
     }
 }
コード例 #7
0
 private void FindMismatch(TestClinicMainDiagnosis tcmd)
 {
     if (Global.GetLength(this.diagnosis) != Global.GetLength(tcmd.diagnosis))
     {
         Global.errors3.Add("Несовпадение длины diagnosis TestClinicMainDiagnosis");
     }
     if (Global.GetLength(this.diagnosInfo) != Global.GetLength(tcmd.diagnosInfo))
     {
         Global.errors3.Add("Несовпадение длины diagnosInfo TestClinicMainDiagnosis");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(tcmd.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestClinicMainDiagnosis");
     }
 }
コード例 #8
0
ファイル: TestRecommendation.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestRecommendation r)
 {
     if (this.recommendation.Date != r.recommendation.Date)
     {
         Global.errors3.Add("Несовпадение Date TestRecommendation");
     }
     if (this.recommendation.Text != r.recommendation.Text)
     {
         Global.errors3.Add("Несовпадение Text TestRecommendation");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestRecommendation");
     }
 }
コード例 #9
0
ファイル: TestStatCase.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestStatCase cs)
 {
     if (this.caseStat.DeliveryCode != cs.caseStat.DeliveryCode)
     {
         Global.errors2.Add("несовпадение DeliveryCode caseStat");
     }
     if (this.caseStat.IdIntoxicationType != cs.caseStat.IdIntoxicationType)
     {
         Global.errors2.Add("несовпадение IdIntoxicationType caseStat");
     }
     if (this.caseStat.IdPatientConditionOnAdmission != cs.caseStat.IdPatientConditionOnAdmission)
     {
         Global.errors2.Add("несовпадение IdPatientConditionOnAdmission caseStat");
     }
     if (this.caseStat.IdTypeFromDiseaseStart != cs.caseStat.IdTypeFromDiseaseStart)
     {
         Global.errors2.Add("несовпадение IdTypeFromDiseaseStart caseStat");
     }
     if (this.caseStat.IdTransportIntern != cs.caseStat.IdTransportIntern)
     {
         Global.errors2.Add("несовпадение IdTransportIntern caseStat");
     }
     if (this.caseStat.IdHospChannel != cs.caseStat.IdHospChannel)
     {
         Global.errors2.Add("несовпадение IdHospChannel caseStat");
     }
     if (this.caseStat.RW1Mark != cs.caseStat.RW1Mark)
     {
         Global.errors2.Add("несовпадение RW1Mark caseStat");
     }
     if (this.caseStat.AIDSMark != cs.caseStat.AIDSMark)
     {
         Global.errors2.Add("несовпадение AIDSMark caseStat");
     }
     if (Global.GetLength(this.medRecords) != Global.GetLength(cs.medRecords))
     {
         Global.errors2.Add("несовпадение длины medRecords caseStat");
     }
     if (Global.GetLength(this.steps) != Global.GetLength(cs.steps))
     {
         Global.errors2.Add("несовпадение длины statSteps caseStat");
     }
     if (Global.GetLength(this.caseBase) != Global.GetLength(cs.caseBase))
     {
         Global.errors2.Add("несовпадение длины caseBase caseStat");
     }
 }
コード例 #10
0
ファイル: TestSickList.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestSickList r)
 {
     if (this.sickList.CreationDate != r.sickList.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestSickList");
     }
     if (this.sickList.Header != r.sickList.Header)
     {
         Global.errors3.Add("Несовпадение Header TestSickList");
     }
     if (this.sickList.SickListInfo.DateEnd != r.sickList.SickListInfo.DateEnd)
     {
         Global.errors3.Add("Несовпадение DateEnd TestSickList");
     }
     if (this.sickList.SickListInfo.DateStart != r.sickList.SickListInfo.DateStart)
     {
         Global.errors3.Add("Несовпадение DateStart TestSickList");
     }
     if (this.sickList.SickListInfo.DisabilityDocReason != r.sickList.SickListInfo.DisabilityDocReason)
     {
         Global.errors3.Add("Несовпадение DisabilityDocReason TestSickList");
     }
     if (this.sickList.SickListInfo.DisabilityDocState != r.sickList.SickListInfo.DisabilityDocState)
     {
         Global.errors3.Add("Несовпадение DisabilityDocState TestSickList");
     }
     if (this.sickList.SickListInfo.IsPatientTaker != r.sickList.SickListInfo.IsPatientTaker)
     {
         Global.errors3.Add("Несовпадение IsPatientTaker TestSickList");
     }
     if (this.sickList.SickListInfo.Number != r.sickList.SickListInfo.Number)
     {
         Global.errors3.Add("Несовпадение Number TestSickList");
     }
     if (Global.GetLength(this.guardian) != Global.GetLength(r.guardian))
     {
         Global.errors3.Add("Несовпадение длины guardian TestSickList");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestSickList");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestSickList");
     }
 }
コード例 #11
0
 private void FindMismatch(TestGuardian g)
 {
     if (g.guardian != null)
     {
         if (this.guardian.IdRelationType != g.guardian.IdRelationType)
         {
             Global.errors3.Add("Несовпадение IdRelationType TestGuardian");
         }
         if (this.guardian.UnderlyingDocument != g.guardian.UnderlyingDocument)
         {
             Global.errors3.Add("Несовпадение UnderlyingDocument TestGuardian");
         }
         if (Global.GetLength(this.person) != Global.GetLength(g.person))
         {
             Global.errors3.Add("Несовпадение длины person TestGuardian");
         }
     }
 }
コード例 #12
0
ファイル: TestPerson.cs プロジェクト: nbIxMaN/EMKT
 public TestPerson(PersonWithIdentity p)
 {
     person = p;
     if (person.Sex == 0)
     {
         person.Sex = 3;
     }
     name = new TestHumanName(p.HumanName);
     if ((p.Documents != null) && (Global.GetLength(p.Documents) != 0))
     {
         List <TestIdentityDocument> doc = new List <TestIdentityDocument>();
         foreach (IdentityDocument d in p.Documents)
         {
             doc.Add(new TestIdentityDocument(d));
         }
         documents = doc;
     }
 }
コード例 #13
0
 private void FindMismatch(TestLaboratoryReport r)
 {
     if (this.laboratoryReport.CreationDate != r.laboratoryReport.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestLaboratoryReport");
     }
     if (this.laboratoryReport.Header != r.laboratoryReport.Header)
     {
         Global.errors3.Add("Несовпадение Header TestLaboratoryReport");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestLaboratoryReport");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestLaboratoryReport");
     }
 }
コード例 #14
0
ファイル: TestForm027U.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestForm027U r)
 {
     if (this.form027U.CreationDate != r.form027U.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestForm027U");
     }
     if (this.form027U.Header != r.form027U.Header)
     {
         Global.errors3.Add("Несовпадение Header TestForm027U");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestForm027U");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestForm027U");
     }
 }
コード例 #15
0
ファイル: TestService.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestService s)
 {
     if (this.document.DateEnd != s.document.DateEnd)
     {
         Global.errors3.Add("Несовпадение DateEnd TestService");
     }
     if (this.document.DateStart != s.document.DateStart)
     {
         Global.errors3.Add("Несовпадение DateStart TestService");
     }
     if (this.document.IdServiceType != s.document.IdServiceType)
     {
         Global.errors3.Add("Несовпадение IdServiceType TestService");
     }
     if (this.document.PaymentInfo.HealthCareUnit != s.document.PaymentInfo.HealthCareUnit)
     {
         Global.errors3.Add("Несовпадение HealthCareUnit TestService");
     }
     if (this.document.PaymentInfo.IdPaymentType != s.document.PaymentInfo.IdPaymentType)
     {
         Global.errors3.Add("Несовпадение IdPaymentType TestService");
     }
     if (this.document.PaymentInfo.PaymentState != s.document.PaymentInfo.PaymentState)
     {
         Global.errors3.Add("Несовпадение PaymentState TestService");
     }
     if (this.document.PaymentInfo.Quantity != s.document.PaymentInfo.Quantity)
     {
         Global.errors3.Add("Несовпадение Quantity TestService");
     }
     if (this.document.PaymentInfo.Tariff != s.document.PaymentInfo.Tariff)
     {
         Global.errors3.Add("Несовпадение Tariff TestService");
     }
     if (this.document.ServiceName != s.document.ServiceName)
     {
         Global.errors3.Add("Несовпадение ServiceName TestService");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(s.doctor))
     {
         Global.errors3.Add("Несовпадение длинны doctor TestService");
     }
 }
コード例 #16
0
ファイル: TestAmbStep.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestAmbStep astep)
 {
     if (this.ambStep.IdVisitPlace != astep.ambStep.IdVisitPlace)
     {
         Global.errors3.Add("несовпадение IdVisitPlace TestAmbStep");
     }
     if (this.ambStep.IdVisitPurpose != astep.ambStep.IdVisitPurpose)
     {
         Global.errors3.Add("несовпадение IdVisitPurpose TestAmbStep");
     }
     if (Global.GetLength(this.medRecords) != Global.GetLength(astep.medRecords))
     {
         Global.errors3.Add("несовпадение длинны medRecords TestAmbStep");
     }
     if (Global.GetLength(this.step) != Global.GetLength(astep.step))
     {
         Global.errors3.Add("несовпадение длинны step TestAmbStep");
     }
 }
コード例 #17
0
ファイル: TestDischargeSummary.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestDischargeSummary r)
 {
     if (this.dischargeSummary.CreationDate != r.dischargeSummary.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestDischargeSummary");
     }
     if (this.dischargeSummary.Header != r.dischargeSummary.Header)
     {
         Global.errors3.Add("Несовпадение Header TestDischargeSummary");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestDiagnosis");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestDiagnosis");
     }
 }
コード例 #18
0
ファイル: TestConsultNote.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestConsultNote r)
 {
     if (this.consultNote.CreationDate != r.consultNote.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestConsultNote");
     }
     if (this.consultNote.Header != r.consultNote.Header)
     {
         Global.errors3.Add("Несовпадение Header TestConsultNote");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestConsultNote");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestConsultNote");
     }
 }
コード例 #19
0
ファイル: TestStatStep.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestStatStep astep)
 {
     if (this.statStep.BedNumber != astep.statStep.BedNumber)
     {
         Global.errors3.Add("несовпадение BedNumber TestStatStep");
     }
     if (this.statStep.BedProfile != astep.statStep.BedProfile)
     {
         Global.errors3.Add("несовпадение BedProfile TestStatStep");
     }
     if (this.statStep.DaySpend != astep.statStep.DaySpend)
     {
         Global.errors3.Add("несовпадение DaySpend TestStatStep");
     }
     if (this.statStep.HospitalDepartmentName != astep.statStep.HospitalDepartmentName)
     {
         Global.errors3.Add("несовпадение HospitalDepartmentName TestStatStep");
     }
     if (this.statStep.IdHospitalDepartment != astep.statStep.IdHospitalDepartment)
     {
         Global.errors3.Add("несовпадение IdHospitalDepartment TestStatStep");
     }
     if (this.statStep.IdRegimen != astep.statStep.IdRegimen)
     {
         Global.errors3.Add("несовпадение IdRegimen TestStatStep");
     }
     if (this.statStep.WardNumber != astep.statStep.WardNumber)
     {
         Global.errors3.Add("несовпадение WardNumber TestStatStep");
     }
     if (Global.GetLength(this.medRecords) != Global.GetLength(astep.medRecords))
     {
         Global.errors3.Add("несовпадение длины MedRecords TestStatStep");
     }
     if (Global.GetLength(this.step) != Global.GetLength(astep.step))
     {
         Global.errors3.Add("несовпадение длины step TestStatStep");
     }
 }
コード例 #20
0
ファイル: TestDoctor.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestDoctor d)
 {
     if (d.doctor != null)
     {
         if (this.doctor.IdLpu != d.doctor.IdLpu)
         {
             Global.errors3.Add("Несовпадение IdLpu TestDoctor");
         }
         if (this.doctor.IdPosition != d.doctor.IdPosition)
         {
             Global.errors3.Add("Несовпадение IdPosition TestDoctor");
         }
         if (this.doctor.IdSpeciality != d.doctor.IdSpeciality)
         {
             Global.errors3.Add("Несовпадение IdSpeciality TestDoctor");
         }
         if (Global.GetLength(this.person) != Global.GetLength(d.person))
         {
             Global.errors3.Add("Несовпадение длины person TestDoctor");
         }
     }
 }
コード例 #21
0
ファイル: TestPerson.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestPerson b)
 {
     if (this.person.Birthdate != b.person.Birthdate)
     {
         Global.errors3.Add("Несовпадение Birthdate TestPerson");
     }
     if (this.person.Sex != b.person.Sex)
     {
         Global.errors3.Add("Несовпадение Sex TestPerson");
     }
     if (this.person.IdPersonMis != b.person.IdPersonMis)
     {
         Global.errors3.Add("Несовпадение IdPersonMis TestPerson");
     }
     if (Global.GetLength(this.docs) != Global.GetLength(b.docs))
     {
         Global.errors3.Add("Несовпадение длины Documents TestPerson");
     }
     if (Global.GetLength(this.name) != Global.GetLength(b.name))
     {
         Global.errors3.Add("Несовпадение длины name TestPerson");
     }
 }
コード例 #22
0
ファイル: TestMiacClient.cs プロジェクト: nbIxMaN/EMKT
        public void GetCasesByPeriod(string GUID, DateTime datestart, DateTime dateend)
        {
            List <TestCaseBase> MyFindedCase = new List <TestCaseBase>();

            using (SqlConnection connection = Global.GetSqlConnection())
            {
                string findCaseString =
                    "SELECT * FROM \"Case\" WHERE OpenDate >= '" + datestart + "' AND OpenDate <= '" + dateend + "' AND CloseDate IS NOT NULL AND IsCancelled = 'False'";
                SqlCommand command = new SqlCommand(findCaseString, connection);
                using (SqlDataReader IdCaseReader = command.ExecuteReader())
                {
                    while (IdCaseReader.Read())
                    {
                        string      guid      = IdCaseReader["SystemGuid"].ToString();
                        string      idCaseMis = IdCaseReader["IdCaseMIS"].ToString();
                        string      idLpu     = Global.GetIdIdLpu(IdCaseReader["IdLpu"].ToString());
                        string      patientId = IdCaseReader["IdPerson"].ToString();
                        TestAmbCase ambCase   = TestAmbCase.BuildAmbCaseFromDataBaseData(guid, idLpu, idCaseMis, patientId);
                        if ((object)ambCase != null)
                        {
                            MyFindedCase.Add(ambCase);
                        }
                        TestStatCase statCase = TestStatCase.BuildAmbCaseFromDataBaseData(guid, idLpu, idCaseMis, patientId);
                        if ((object)statCase != null)
                        {
                            MyFindedCase.Add(statCase);
                        }
                        string idCase = IdCaseReader["IdCase"].ToString();
                    }
                }
            }
            CaseBase[]          cb = client.GetCasesByPeriod(GUID, datestart, dateend);
            List <TestCaseBase> FunctionFindedCase = new List <TestCaseBase>();

            foreach (CaseBase i in cb)
            {
                CaseAmb ca = i as CaseAmb;
                if ((object)ca != null)
                {
                    using (SqlConnection connection = Global.GetSqlConnection())
                    {
                        string findCaseString =
                            "SELECT TOP(1) [SystemGuid] FROM \"ExternalId\" WHERE IdLpu = '" + Global.GetIdInstitution(ca.IdLpu) + "' AND IdPersonMIS = '" + ca.IdPatientMis + "'";
                        SqlCommand command = new SqlCommand(findCaseString, connection);
                        using (SqlDataReader IdCaseReader = command.ExecuteReader())
                        {
                            while (IdCaseReader.Read())
                            {
                                GUID = IdCaseReader["SystemGuid"].ToString();
                            }
                        }
                    }
                    TestAmbCase tac = new TestAmbCase(GUID, (EMKServise.CaseAmb)ConvertCase(ca));
                    //if (!tac.CheckCaseInDataBase())
                    //    Global.errors1.Add("Что-то пошло не так");
                    FunctionFindedCase.Add(tac);
                }
                CaseStat cs = i as CaseStat;
                if ((object)cs != null)
                {
                    using (SqlConnection connection = Global.GetSqlConnection())
                    {
                        string findCaseString =
                            "SELECT TOP(1) [SystemGuid] FROM \"ExternalId\" WHERE IdLpu = '" + Global.GetIdInstitution(cs.IdLpu) + "' AND IdPersonMIS = '" + cs.IdPatientMis + "'";
                        SqlCommand command = new SqlCommand(findCaseString, connection);
                        using (SqlDataReader IdCaseReader = command.ExecuteReader())
                        {
                            while (IdCaseReader.Read())
                            {
                                GUID = IdCaseReader["SystemGuid"].ToString();
                            }
                        }
                    }
                    TestStatCase tsc = new TestStatCase(GUID, (EMKServise.CaseStat)ConvertCase(cs));
                    //if (!tsc.CheckCaseInDataBase())
                    //    Global.errors1.Add("Что-то пошло не так");
                    FunctionFindedCase.Add(tsc);
                }
            }
            if (Global.GetLength(MyFindedCase) > Global.GetLength(FunctionFindedCase))
            {
                Global.errors1.Add("Возвращено меньше, чем в базе");
            }
            if (Global.GetLength(MyFindedCase) < Global.GetLength(FunctionFindedCase))
            {
                Global.errors1.Add("Возвращено больше, чем в базе");
            }
            if (Global.GetLength(MyFindedCase) == Global.GetLength(FunctionFindedCase))
            {
                if (!Global.IsEqual(MyFindedCase.ToArray(), FunctionFindedCase.ToArray()))
                {
                    Global.errors1.AddRange(Global.errors2);
                }
            }
        }
コード例 #23
0
 private void FindMismatch(TestDispensaryOne r)
 {
     if (this.dispansaryOne.CreationDate != r.dispansaryOne.CreationDate)
     {
         Global.errors3.Add("Несовпадение CreationDate TestDispensaryOne");
     }
     if (this.dispansaryOne.HasExpertCareRefferal != r.dispansaryOne.HasExpertCareRefferal)
     {
         Global.errors3.Add("Несовпадение HasExpertCareRefferal TestDispensaryOne");
     }
     if (this.dispansaryOne.HasExtraResearchRefferal != r.dispansaryOne.HasExtraResearchRefferal)
     {
         Global.errors3.Add("Несовпадение HasExtraResearchRefferal TestDispensaryOne");
     }
     if (this.dispansaryOne.HasHealthResortRefferal != r.dispansaryOne.HasHealthResortRefferal)
     {
         Global.errors3.Add("Несовпадение HasHealthResortRefferal TestDispensaryOne");
     }
     if (this.dispansaryOne.HasPrescribeCure != r.dispansaryOne.HasPrescribeCure)
     {
         Global.errors3.Add("Несовпадение HasPrescribeCure TestDispensaryOne");
     }
     if (this.dispansaryOne.HasSecondStageRefferal != r.dispansaryOne.HasSecondStageRefferal)
     {
         Global.errors3.Add("Несовпадение HasSecondStageRefferal TestDispensaryOne");
     }
     if (this.dispansaryOne.Header != r.dispansaryOne.Header)
     {
         Global.errors3.Add("Несовпадение CreationDate TestDispensaryOne");
     }
     if (this.dispansaryOne.IsGuested != r.dispansaryOne.IsGuested)
     {
         Global.errors3.Add("Несовпадение IsGuested TestDispensaryOne");
     }
     if (this.dispansaryOne.IsUnderObservation != r.dispansaryOne.IsUnderObservation)
     {
         Global.errors3.Add("Несовпадение IsUnderObservation TestDispensaryOne");
     }
     if (this.dispansaryOne.HealthGroup.HealthGroupInfo.Date != r.dispansaryOne.HealthGroup.HealthGroupInfo.Date)
     {
         Global.errors3.Add("Несовпадение HealthGroupInfo.Date TestDispensaryOne");
     }
     if (this.dispansaryOne.HealthGroup.HealthGroupInfo.IdHealthGroup != r.dispansaryOne.HealthGroup.HealthGroupInfo.IdHealthGroup)
     {
         Global.errors3.Add("Несовпадение HealthGroupInfo.IdHealthGroup TestDispensaryOne");
     }
     if (Global.GetLength(this.recommendation) != Global.GetLength(r.recommendation))
     {
         Global.errors3.Add("Несовпадение длины recommendation TestDispensaryOne");
     }
     if (Global.GetLength(this.doctor) != Global.GetLength(r.doctor))
     {
         Global.errors3.Add("Несовпадение длины doctor TestDispensaryOne");
     }
     if (Global.GetLength(this.hdDoctor) != Global.GetLength(r.hdDoctor))
     {
         Global.errors3.Add("Несовпадение длины hdDoctor TestDispensaryOne");
     }
     if (Global.GetLength(this.attachment) != Global.GetLength(r.attachment))
     {
         Global.errors3.Add("Несовпадение длины attachment TestDispensaryOne");
     }
 }
コード例 #24
0
ファイル: TestPatient.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestPatient b)
 {
     if (this.patient.FamilyName != b.patient.FamilyName)
     {
         Global.errors2.Add("несовпадение FamilyName TestPatient");
     }
     if (this.patient.MiddleName != b.patient.MiddleName)
     {
         Global.errors2.Add("несовпадение MiddleName TestPatient");
     }
     if (this.patient.GivenName != b.patient.GivenName)
     {
         Global.errors2.Add("несовпадение GivenName TestPatient");
     }
     if (this.patient.BirthDate != b.patient.BirthDate)
     {
         Global.errors2.Add("несовпадение BirthDate TestPatient");
     }
     if (this.patient.Sex != b.patient.Sex)
     {
         Global.errors2.Add("несовпадение Sex TestPatient");
     }
     if (this.patient.IsVip != b.patient.IsVip)
     {
         Global.errors2.Add("несовпадение IsVip TestPatient");
     }
     if (this.patient.SocialStatus != b.patient.SocialStatus)
     {
         Global.errors2.Add("несовпадение SocialStatus TestPatient");
     }
     if (this.patient.SocialGroup != b.patient.SocialGroup)
     {
         Global.errors2.Add("несовпадение SocialGroup TestPatient");
     }
     if (this.patient.IdLivingAreaType != b.patient.IdLivingAreaType)
     {
         Global.errors2.Add("несовпадение IdLivingAreaType TestPatient");
     }
     if (this.patient.IdBloodType != b.patient.IdBloodType)
     {
         Global.errors2.Add("несовпадение IdBloodType TestPatient");
     }
     if (this.patient.DeathTime != b.patient.DeathTime)
     {
         Global.errors2.Add("несовпадение DeathTime TestPatient");
     }
     if (Global.GetLength(this.docs) != Global.GetLength(b.docs))
     {
         Global.errors2.Add("несовпадение длины documents TestPatient");
     }
     if (Global.GetLength(this.conts) != Global.GetLength(b.conts))
     {
         Global.errors2.Add("несовпадение длины contacts TestPatient");
     }
     if (Global.GetLength(this.adds) != Global.GetLength(b.adds))
     {
         Global.errors2.Add("несовпадение длины addreses TestPatient");
     }
     if (Global.GetLength(this.job) != Global.GetLength(b.job))
     {
         Global.errors2.Add("несовпадение длины job TestPatient");
     }
     if (Global.GetLength(this.privilege) != Global.GetLength(b.privilege))
     {
         Global.errors2.Add("несовпадение длины privilege TestPatient");
     }
     if (Global.GetLength(this.birthplace) != Global.GetLength(b.birthplace))
     {
         Global.errors2.Add("несовпадение длины birthplace TestPatient");
     }
 }
コード例 #25
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;
         }
     }
 }
コード例 #26
0
ファイル: TestCaseBase.cs プロジェクト: nbIxMaN/EMKT
 private void FindMismatch(TestCaseBase cb)
 {
     if (this.caseBase.CloseDate != cb.caseBase.CloseDate)
     {
         Global.errors3.Add("несовпадение CloseDate TestCaseBase");
     }
     if (this.caseBase.Comment != cb.caseBase.Comment)
     {
         Global.errors3.Add("несовпадение Comment TestCaseBase");
     }
     if (this.caseBase.Confidentiality != cb.caseBase.Confidentiality)
     {
         Global.errors3.Add("несовпадение Confidentiality TestCaseBase");
     }
     if (this.caseBase.CuratorConfidentiality != cb.caseBase.CuratorConfidentiality)
     {
         Global.errors3.Add("несовпадение CuratorConfidentiality TestCaseBase");
     }
     if (this.caseBase.DoctorConfidentiality != cb.caseBase.DoctorConfidentiality)
     {
         Global.errors3.Add("несовпадение DoctorConfidentiality TestCaseBase");
     }
     if (this.caseBase.HistoryNumber != cb.caseBase.HistoryNumber)
     {
         Global.errors3.Add("несовпадение HistoryNumber TestCaseBase");
     }
     if (this.caseBase.IdCaseAidType != cb.caseBase.IdCaseAidType)
     {
         Global.errors3.Add("несовпадение IdCaseAidType TestCaseBase");
     }
     if (this.caseBase.IdCaseMis != cb.caseBase.IdCaseMis)
     {
         Global.errors3.Add("несовпадение IdCaseMis TestCaseBase");
     }
     if (this.caseBase.IdCaseResult != cb.caseBase.IdCaseResult)
     {
         Global.errors3.Add("несовпадение IdCaseResult TestCaseBase");
     }
     if (this.caseBase.IdLpu != cb.caseBase.IdLpu)
     {
         Global.errors3.Add("несовпадение IdLpu TestCaseBase");
     }
     if (this.caseBase.IdPaymentType != cb.caseBase.IdPaymentType)
     {
         Global.errors3.Add("несовпадение IdPaymentType TestCaseBase");
     }
     if (this.caseBase.OpenDate != cb.caseBase.OpenDate)
     {
         Global.errors3.Add("несовпадение OpenDate TestCaseBase");
     }
     if (Global.GetLength(this.guardian) != Global.GetLength(cb.guardian))
     {
         Global.errors3.Add("несовпадение длины guardian TestCaseBase");
     }
     if (Global.GetLength(this.patient) != Global.GetLength(cb.patient))
     {
         Global.errors3.Add("несовпадение длины patient TestCaseBase");
     }
     if (Global.GetLength(this.autor) != Global.GetLength(cb.autor))
     {
         Global.errors3.Add("несовпадение длины autor TestCaseBase");
     }
     if (Global.GetLength(this.authenticator) != Global.GetLength(cb.authenticator))
     {
         Global.errors3.Add("несовпадение длины authenticator TestCaseBase");
     }
     if (Global.GetLength(this.legalAuthenticator) != Global.GetLength(cb.legalAuthenticator))
     {
         Global.errors3.Add("несовпадение длины legalAuthenticator TestCaseBase");
     }
 }
コード例 #27
0
ファイル: TestStatCase.cs プロジェクト: nbIxMaN/EMKT
        public void ChangeUpdateStatCase(string guid, CaseStat cs)
        {
            GUID = guid.ToLower();
            if (cs != null)
            {
                if (cs.DeliveryCode != null)
                {
                    this.caseStat.DeliveryCode = cs.DeliveryCode;
                }
                if (cs.IdIntoxicationType != 0)
                {
                    this.caseStat.IdIntoxicationType = cs.IdIntoxicationType;
                }
                if (cs.IdPatientConditionOnAdmission != 0)
                {
                    this.caseStat.IdPatientConditionOnAdmission = cs.IdPatientConditionOnAdmission;
                }
                if (cs.IdTypeFromDiseaseStart != 0)
                {
                    this.caseStat.IdTypeFromDiseaseStart = cs.IdTypeFromDiseaseStart;
                }
                if (cs.IdTransportIntern != 0)
                {
                    this.caseStat.IdTransportIntern = cs.IdTransportIntern;
                }
                if (cs.IdHospChannel != 0)
                {
                    this.caseStat.IdHospChannel = cs.IdHospChannel;
                }
                this.caseStat.RW1Mark  = cs.RW1Mark;
                this.caseStat.AIDSMark = cs.AIDSMark;
                caseBase.UpdateCaseBase(guid, cs);
                if (cs.MedRecords != null)
                {
                    List <TestMedRecord>    newMedRecords = new List <TestMedRecord>();
                    TestTfomsInfo           tfi           = null;
                    TestClinicMainDiagnosis cmd           = null;
                    TestDischargeSummary    ds            = null;
                    TestConsultNote         cn            = null;
                    TestDeathInfo           tdi           = null;

                    foreach (object i in cs.MedRecords)
                    {
                        Service ser = i as Service;
                        if (ser != null)
                        {
                            newMedRecords.Add(new TestService(ser, cs.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, cs.IdLpu));
                        }

                        ClinicMainDiagnosis cd = i as ClinicMainDiagnosis;
                        if ((cd != null) && (cs.HospResult != IdDeath) && (cd.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis))
                        {
                            cmd = new TestClinicMainDiagnosis(cd, cs.IdLpu);
                        }

                        ClinicMainDiagnosis ca = i as ClinicMainDiagnosis;
                        if ((ca != null) && (cs.HospResult == IdDeath) && (ca.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis))
                        {
                            cmd = new TestClinicMainDiagnosis(ca, cs.IdLpu);
                        }

                        Referral r = i as Referral;
                        if (r != null)
                        {
                            newMedRecords.Add(new TestReferral(r, cs.IdLpu));
                        }

                        SickList sl = i as SickList;
                        if (sl != null)
                        {
                            newMedRecords.Add(new TestSickList(sl, cs.IdLpu));
                        }

                        DischargeSummary pds = i as DischargeSummary;
                        if (pds != null)
                        {
                            ds = new TestDischargeSummary(pds, cs.IdLpu);
                        }

                        LaboratoryReport lr = i as LaboratoryReport;
                        if (lr != null)
                        {
                            newMedRecords.Add(new TestLaboratoryReport(lr, cs.IdLpu));
                        }

                        ConsultNote pcn = i as ConsultNote;
                        if (pcn != null)
                        {
                            cn = new TestConsultNote(pcn, cs.IdLpu);
                        }

                        AppointedMedication ap = i as AppointedMedication;
                        if (ap != null)
                        {
                            newMedRecords.Add(new TestAppointedMedication(ap, cs.IdLpu));
                        }

                        DeathInfo di = i as DeathInfo;
                        if (di != null)
                        {
                            tdi = new TestDeathInfo(di);
                        }

                        Form027U form = i as Form027U;
                        if (form != null)
                        {
                            newMedRecords.Add(new TestForm027U(form, cs.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);
                            }

                            TestAppointedMedication ap = i as TestAppointedMedication;
                            if (!Global.IsEqual(ap, null))
                            {
                                newMedRecords.Add(ap);
                            }

                            TestDeathInfo di = i as TestDeathInfo;
                            if (!Global.IsEqual(tdi, null) && (!Global.IsEqual(di, null)))
                            {
                                newMedRecords.Add(di);
                            }
                            else
                            if (!Global.IsEqual(tdi, null))
                            {
                                newMedRecords.Add(tdi);
                            }

                            TestForm027U form = i as TestForm027U;
                            if (!Global.IsEqual(form, null))
                            {
                                newMedRecords.Add(form);
                            }
                        }
                    }
                    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);
                        }
                        if (!Global.IsEqual(tdi, null))
                        {
                            newMedRecords.Add(tdi);
                        }
                    }
                    this.records = newMedRecords;
                }
            }
        }