Пример #1
0
        public void Fill(AmazonS3Client client, string bucket, Vendors vendor, int buildingId)
        {
            _pregnancyConcepts = new PregnancyConcepts();

            var lookup = new Lookup();
            var prefix =
                $"{vendor}/{buildingId}/Lookups/PregnancyDrug.txt";

            Console.WriteLine(bucket + "/" + prefix);
            lookup.Fill(client, bucket, prefix);
            _lookups.Add("PregnancyDrug", lookup);
        }
Пример #2
0
        public void Fill(bool forLookup)
        {
            _genderConcepts = new GenderLookup();
            _genderConcepts.Load();

            _pregnancyConcepts = new PregnancyConcepts();

            using (var client = new AmazonS3Client(Settings.Current.S3AwsAccessKeyId,
                                                   Settings.Current.S3AwsSecretAccessKey, Amazon.RegionEndpoint.USEast1))
            {
                foreach (var qd in Settings.Current.Building.SourceQueryDefinitions)
                {
                    Load(client, qd.ConditionOccurrence);
                    Load(client, qd.DrugExposure);
                    Load(client, qd.ProcedureOccurrence);
                    Load(client, qd.Observation);
                    Load(client, qd.VisitOccurrence);
                    //Load(client, qd.CareSites);
                    //Load(client, qd.Providers);
                    Load(client, qd.Death);
                    Load(client, qd.Measurement);
                    Load(client, qd.DeviceExposure);
                    Load(client, qd.Note);

                    Load(client, qd.VisitCost);
                    Load(client, qd.ProcedureCost);
                    Load(client, qd.DeviceCost);
                    Load(client, qd.ObservationCost);
                    Load(client, qd.MeasurementCost);
                    Load(client, qd.DrugCost);
                }

                var lookup = new Lookup();
                var prefix =
                    $"{Settings.Current.Building.Vendor}/{Settings.Current.Building.Id}/Lookups/PregnancyDrug.txt";
                Console.WriteLine(Settings.Current.Bucket + "/" + prefix);
                lookup.Fill(client, Settings.Current.Bucket, prefix);
                _lookups.Add("PregnancyDrug", lookup);
            }
        }
Пример #3
0
        /// <summary>
        /// Fill vocabulary for source to conceptId mapping
        /// </summary>
        /// <param name="forLookup">true - fill vocab. for: CareSites, Providers, Locations; false - rest of us</param>
        public void Fill(bool forLookup, bool readFromS3)
        {
            _genderConcepts = new GenderLookup();
            _genderConcepts.Load();

            _pregnancyConcepts = new PregnancyConcepts();

            foreach (var qd in Settings.Current.Building.SourceQueryDefinitions)
            {
                if (forLookup)
                {
                    Load(qd.CareSites);
                    Load(qd.Providers);
                    Load(qd.Locations);
                }
                else
                {
                    Load(qd.Persons);
                    Load(qd.ConditionOccurrence);
                    Load(qd.DrugExposure);
                    Load(qd.ProcedureOccurrence);
                    Load(qd.Observation);
                    Load(qd.VisitOccurrence);
                    Load(qd.VisitDetail);
                    Load(qd.Death);
                    Load(qd.Measurement);
                    Load(qd.DeviceExposure);
                    Load(qd.Note);

                    Load(qd.VisitCost);
                    Load(qd.ProcedureCost);
                    Load(qd.DeviceCost);
                    Load(qd.ObservationCost);
                    Load(qd.MeasurementCost);
                    Load(qd.DrugCost);
                }
            }
            LoadPregnancyDrug();
        }