public void AddOrUpdate(Package p, string ndcProductId) { Guid g; if (NdcProductIdToDrug.TryGetValue(ndcProductId, out g)) { p.Id = Guid.NewGuid(); p.DrugId = g; Ndc_ProductForPackageInfo ppi; if (ProductForPackage.TryGetValue(ndcProductId, out ppi)) { p.LabelerName = ppi.LabelerName; p.ApplicationNumber = ppi.ApplicationNumber; } Packages.Add(p); string ndc = StringFunctions.ConvertToNdc11(p.Ndc); if (!NdcToDrug.ContainsKey(ndc) && !NdcToPackage.ContainsKey(ndc)) { NdcToDrug.Add(ndc, g); NdcToPackage.Add(ndc, p.Id); } } }
public void AddOrUpdate(Nadac n, string ndc) { Guid ndcId, drugId; if (NdcToDrug.TryGetValue(ndc, out drugId) && NdcToPackage.TryGetValue(ndc, out ndcId)) { n.PackageId = ndcId; n.DrugId = drugId; n.Id = Guid.NewGuid(); Nadacs.Add(n); } }
public void AddOrUpdate(FederalUpperLimit ful, string ndc) { Guid ndcId, drugId; if (NdcToDrug.TryGetValue(ndc, out drugId) && NdcToPackage.TryGetValue(ndc, out ndcId)) { ful.Id = Guid.NewGuid(); ful.PackageId = ndcId; ful.DrugId = drugId; Fuls.Add(ful); } }
public void AddOrUpdate(StateDrugUtilization sdu, string ndc) { Guid ndcId, drugId; if (NdcToDrug.TryGetValue(ndc, out drugId) && NdcToPackage.TryGetValue(ndc, out ndcId)) { sdu.PackageId = ndcId; sdu.DrugId = drugId; sdu.Id = Guid.NewGuid(); SDUs.Enqueue(sdu); } }