Esempio n. 1
0
        public IList <T> FetchList(string FileName)
        {
            var discharges = new ToDataSet().Parse(FileName);

            List <ModelDischarge> attendances = discharges.Tables[0].AsEnumerable()
                                                .Select(row => new ModelDischarge
            {
                EpisodeId             = row.Field <string>(0),
                OrganisationCode      = row.Field <string>(1),
                OrganisationName      = row.Field <string>(2),
                PBCConsortiaName      = row.Field <string>(3),
                TypeOfAdmission       = row.Field <string>(4),
                DischargeWardCode     = row.Field <string>(5),
                DischargeWard         = row.Field <string>(6),
                DischargeHospitalSite = row.Field <string>(7),
                DischargeSpeciality   = row.Field <string>(8),
                NHSNo             = row.Field <string>(9),
                PASHospitalNumber = row.Field <string>(10),
                PatientName       = row.Field <string>(11),
                DateOfBirth       = row.Field <DateTime>(12),
                AdmissionDate     = row.Field <DateTime>(13),
                DischargeDate     = row.Field <DateTime>(14),
                DishDeceasedFlag  = row.Field <string>(15)
            }
                                                        ).ToList();

            return(attendances as IList <T>);
        }
Esempio n. 2
0
        public IList <T> FetchList(string FileName)
        {
            var dsAttendances = new ToDataSet().Parse(FileName);

            var attendances = dsAttendances.Tables[0].AsEnumerable()
                              .Select(row => new ModelAttendance
            {
                AandEDepartment      = row.Field <string>(0) ?? "Null",
                AandEDepartementName = row.Field <string>(1) ?? "Null",
                AandEUniqueId        = row.Field <string>(2) ?? "Null",
                PasId                = row.Field <string>(3) ?? "Null",
                PatientName          = row.Field <string>(4) ?? "Null",
                DateOfBirth          = row.Field <DateTime>(5),
                PhoneNo              = row.Field <string>(6) ?? "Null",
                NHSNo                = row.Field <string>(7) ?? "Null",
                GPCode               = row.Field <string>(8) ?? "Null",
                OrganisationCode     = row.Field <string>(9) ?? "Null",
                OrgainsationName     = row.Field <string>(10) ?? "Null",
                DateOfArrival        = row.Field <DateTime>(11),
                TimeOfArrival        = row.Field <string>(12) ?? "Null",
                SourceOfReferralCode = row.Field <string>(13) ?? "Null",
                ArrivalMode          = row.Field <string>(14) ?? "Null",
                PresentedWith        = row.Field <string>(15) ?? "Null",
                DiagnosisCode        = row.Field <string>(16) ?? "Null",
                DiagnosisDescription = row.Field <string>(17) ?? "Null",
                InvestigationCodeOne = row.Field <string>(18) ?? "Null",
                InvestigationCodeTwo = row.Field <string>(19) ?? "Null",
                TreatmentCodeOne     = row.Field <string>(20) ?? "Null",
                TreatmentCodeTwo     = row.Field <string>(21) ?? "Null",
                TreatmentCodeThree   = row.Field <string>(22) ?? "Null",
                HRG = row.Field <string>(23) ?? "Null",
                AttendanceDisposal = row.Field <string>(24) ?? "1"
            }
                                      ).ToList();

            return(attendances as IList <T>);
        }