Skip to content

Instantly share code, notes, and snippets.

@vmandic
Created October 25, 2018 18:17
Show Gist options
  • Save vmandic/4faf4059d9a4869c497fa2e7d78e11f2 to your computer and use it in GitHub Desktop.
Save vmandic/4faf4059d9a4869c497fa2e7d78e11f2 to your computer and use it in GitHub Desktop.
meds-processor, p3, s3
static readonly DateTime filterDtStartWith2014 = new DateTime(2014, 1, 3);
void ParseSupplementaryListsUpTo2014_01(ISet<HzzoMedsDownloadDto> meds) =>
ParseHzzoExcelDocuments(meds.Where(x =>
x.ValidFrom <= filterDtStartWith2014 &&
(
x.FileName.ToLowerInvariant().Contains("dopunska") ||
x.FileName.ToLowerInvariant().Contains("dll")
)), DrugListType.Supplementary, false);
void ParsePrimaryListsUpTo2014_01(ISet<HzzoMedsDownloadDto> meds) =>
ParseHzzoExcelDocuments(meds.Where(x =>
x.ValidFrom <= filterDtStartWith2014 &&
(
x.FileName.ToLowerInvariant().Contains("osnovna") ||
x.FileName.ToLowerInvariant().Contains("oll")
)), DrugListType.Primary, false);
static void ParseSupplementaryListsStartingWith2014_02(ISet<HzzoMedsDownloadDto> meds) =>
ParseHzzoExcelDocuments(meds.Where(x =>
x.ValidFrom > filterDtStartWith2014 &&
(
x.FileName.ToLowerInvariant().Contains("dopunska") ||
x.FileName.ToLowerInvariant().Contains("dll")
)), DrugListType.Supplementary, true);
static void ParsePrimaryListsStartingWith2014_02(ISet<HzzoMedsDownloadDto> meds) =>
ParseHzzoExcelDocuments(meds.Where(x =>
x.ValidFrom > filterDtStartWith2014 &&
(
x.FileName.ToLowerInvariant().Contains("osnovna") ||
x.FileName.ToLowerInvariant().Contains("oll")
)), DrugListType.Primary, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment