public IEnumerable <DwhManifest> Generate(EmrDto emrSetup) { var sites = _reader.GetSites(); var patientProfiles = _reader.GetSitePatientProfiles(); return(DwhManifest.Create(patientProfiles, emrSetup, sites)); }
private List <DwhManifest> CreateManifests(List <PatientExtract> patients) { var manifests = new List <DwhManifest>(); var siteCodes = patients .Select(x => x.SiteCode) .Distinct(); foreach (var s in siteCodes) { var manifest = new DwhManifest(s); var pks = patients .Where(x => x.SiteCode == s) .Select(x => x.PatientPK) .Distinct() .ToList(); if (null != pks) { if (pks.Count > 0) { manifest.PatientPks.AddRange(pks); } } manifests.Add(manifest); } return(manifests); }
public IEnumerable <DwhManifest> Generate() { var patientProfiles = _reader.ReadProfiles(); return(DwhManifest.Create(patientProfiles)); }