public WaterfallCollectionSource(WaterfallCollectionView collectionView)
        {
            // Initialize
            CollectionView = collectionView;

            Ad ad1 = new Ad();

            ad1.Name           = "1945 G-44A Widgeon";
            ad1.Price          = "$325,000";
            ad1.Classification = new Amphibian();
            ad1.Manufacturer   = new Grumman();
            ad1.Image          = UIImage.FromBundle("gruman_ad.jpg");
            ad1.Broker         = "Prairie Aircraft Sales, Ltd.";
            ad1.Teaser         = "Is pleased to announce the acquisition of the Cessna Piston Dealership for the provinces of Manitoba, Saskatchewan, Alberta and the North West Territories. We continue to represent Cessna for the full Caravan line for all of Western Northern Canada as well as all makes and models of Pre-owned aircraft from singles to Jets.";

            Ad ad2 = new Ad();

            ad2.Name           = "1987 Scoopers CL215";
            ad2.Price          = "$3,000,000";
            ad2.Classification = new Amphibian();
            ad2.Manufacturer   = new Bombardier();
            ad2.Image          = UIImage.FromBundle("bombardier_ad.jpg");
            ad2.Broker         = "Lone Star Jet";
            ad2.Teaser         = "We offer Fast, Accurate, reliable NAAA Certified Aircraft Appraisal Services, nationwide! Senior certified member of National Aircraft Appraisers Association. The Aviation Industry's leading source for Certified Appraisals since 1980. NAAA Certified Aircraft Appraisals";

            Ad ad3 = new Ad();

            ad3.Name           = "1969 Scoopers CL215";
            ad3.Price          = "$2,500,000";
            ad3.Classification = new Amphibian();
            ad3.Manufacturer   = new Bombardier();
            ad3.Image          = UIImage.FromBundle("bombardier_ad2.jpg");
            ad3.Broker         = "The 206 Express";
            ad3.Teaser         = "John Hopkinson & Associates was incorporated in 1979 as an international aircraft brokerage and consulting firm. JH&A specializes in corporate and commuter aircraft.";

            Ad ad4 = new Ad();

            ad4.Name           = "1988 Scoopers CL215.jpg";
            ad4.Price          = "$3,000,000";
            ad4.Classification = new Amphibian();
            ad4.Manufacturer   = new Bombardier();
            ad4.Image          = UIImage.FromBundle("bombardier_ad3.jpg");
            ad4.Broker         = "Technical Aircraft Services,LLC";
            ad4.Teaser         = "To offer professional services in the area's of airframe & powerplant maintenance, inspection, start up, record keeping, training, aircraft purchasing, leasing, financing, etc.";


            Ad ad5 = new Ad();

            ad5.Name           = "1945 G-44A Widgeon";
            ad5.Price          = "$325,000";
            ad5.Classification = new Amphibian();
            ad5.Manufacturer   = new Grumman();
            ad5.Image          = UIImage.FromBundle("gruman_ad.jpg");
            ad5.Broker         = "Prairie Aircraft Sales, Ltd.";
            ad5.Teaser         = "Is pleased to announce the acquisition of the Cessna Piston Dealership for the provinces of Manitoba, Saskatchewan, Alberta and the North West Territories. We continue to represent Cessna for the full Caravan line for all of Western Northern Canada as well as all makes and models of Pre-owned aircraft from singles to Jets.";

            //Ad ad6 = new Ad();
            //ad6.Name = "1987 Scoopers CL215 Aircraft Details";
            //ad6.Price = "$3,000,000";
            //ad6.Classification = new Amphibian();
            //ad6.Manufacturer = new Bombardier();
            //ad6.Image = UIImage.FromBundle("bombardier_ad.jpg");

            //Ad ad7 = new Ad();
            //ad7.Name = "1969 Scoopers CL215 Aircraft Details";
            //ad7.Price = "$2,500,000";
            //ad7.Classification = new Amphibian();
            //ad7.Manufacturer = new Bombardier();
            //ad7.Image = UIImage.FromBundle("bombardier_ad2.jpg");

            //Ad ad8 = new Ad();
            //ad8.Name = "1988 Scoopers CL215 Aircraft Details.jpg";
            //ad8.Price = "$3,000,000";
            //ad8.Classification = new Amphibian();
            //ad8.Manufacturer = new Bombardier();
            //ad8.Image = UIImage.FromBundle("bombardier_ad3.jpg");

            AdList.Add(ad1);
            AdList.Add(ad2);
            AdList.Add(ad3);
            AdList.Add(ad4);
            AdList.Add(ad5);
            //AdList.Add(ad6);
            //AdList.Add(ad7);
            //AdList.Add(ad8);

            // Init numbers collection
            for (int n = 0; n < 5; ++n)
            {
                int rndNumber = rnd.Next(1, 3);

                if (rndNumber == 2)
                {
                    Heights.Add(rndNumber * 135.0f);
                }
                else
                {
                    Heights.Add(rndNumber * 170.0f);
                }
            }
        }
Ejemplo n.º 2
0
        public Patient(HL7.Patient patient)
        {
            Random rand = new Random();

            ID             = patient.Id;
            FirstName      = patient.Name.ElementAt(0).Given.ElementAt(0);
            LastName       = patient.Name.ElementAt(0).Family.ElementAt(0);
            MiddleName     = "";
            Sex            = patient.GenderElement.Value.ToString();
            Ethnicity      = ethnicities[rand.Next(0, ethnicities.Length)];
            Insurance_Type = "Unknown";
            Date_Of_Birth  = Convert.ToDateTime(patient.BirthDate);
            Add_Address(patient.Address.ElementAt(0).Line.ElementAt(0), patient.Address.ElementAt(0).City, patient.Address.ElementAt(0).State, patient.Address.ElementAt(0).PostalCode, patient.Address.ElementAt(0).District);

            //if there isn't a saved practitioner generate and add it to the list, otherwise uses the provided one
            if (patient.CareProvider.Count == 0)
            {
                PractitionerIDs.Add(rand.Next(1, 5));
            }
            else
            {
                foreach (var practitionerRef in patient.CareProvider)
                {
                    PractitionerIDs.Add(Int32.Parse(practitionerRef.Reference.Replace("Practitioner/", "")));
                }
            }

            //default hypertension
            Has_HyperTension  = false;
            HypertensionClass = HypertensionClassification.Normal;

            //default bmi
            BMIClass = BMIClassification.Normal;

            foreach (Data_Holder dh in Patient_Data.PatientInfo(ID))
            {
                switch (dh.Type)
                {
                case "BMI":
                    BMIs.Add(new BMI(dh.Date, dh.Measurement));
                    break;

                case "WEIGHT":
                    Weights.Add(new Weight(dh.Date, dh.Measurement));
                    break;

                case "HEIGHT":
                    Heights.Add(new Height(dh.Date, dh.Measurement));
                    break;

                case "HEMOGLOBIN":
                    Hemoglobins.Add(new Hemoglobin(dh.Date, dh.Measurement));
                    HemoglobinClass = (dh.Measurement < (decimal)0.057) ? HemoglobinClassification.Normal : HemoglobinClassification.High;
                    break;

                case "HYPERTENSION":
                    Has_HyperTension  = true;
                    HypertensionClass = HypertensionClassification.Diagnosed;
                    break;
                }
            }
        }