def generate_complex_patient():
  od = collections.OrderedDict()
  od['phn'] = demographics.ID()
  od['name'] = name.find_name()
  od['birthdate'] = '"' + demographics.birthdate(random.choice(['%Y-%m-%d', '%b %d, %Y', '%d %B %Y'])) + '"'
  od['postal_code'] = address.ca_postal_code(address.ca_city())
  od['province'] = 'Alberta'
  od['province_abbr'] = address.ca_province_abbr(od['province'])
  od['gender'] = demographics.gender()
  od['phone'] = phone_number.phone_number()
  od['education'] = '"' + demographics.education() + '"'
  return od
Exemple #2
0
def generate_complex_patient():
    od = collections.OrderedDict()
    od['phn'] = demographics.ID()
    od['name'] = name.find_name()
    od['birthdate'] = '"' + demographics.birthdate(
        random.choice(['%Y-%m-%d', '%b %d, %Y', '%d %B %Y'])) + '"'
    od['postal_code'] = address.ca_postal_code(address.ca_city())
    od['province'] = 'Alberta'
    od['province_abbr'] = address.ca_province_abbr(od['province'])
    od['gender'] = demographics.gender()
    od['phone'] = phone_number.phone_number()
    od['education'] = '"' + demographics.education() + '"'
    return od
def create_card():
    return {
        "name":
        name.find_name(),
        "username":
        internet.user_name(),
        "email":
        internet.email(),
        "address": {
            "streetA": address.street_name(),
            "streetB": address.street_address(),
            "streetC": address.street_address(True),
            "streetD": address.secondary_address(),
            "city": address.city(),
            "ukCounty": address.uk_county(),
            "ukCountry": address.uk_country(),
            "zipcode": address.zip_code()
        },
        "phone":
        phone_number.phone_number(),
        "website":
        internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        },
        "posts": [{
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }, {
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }, {
            "words": lorem.words(),
            "sentence": lorem.sentence(),
            "sentences": lorem.sentences(),
            "paragraph": lorem.paragraph()
        }]
    }
def user_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "street": address.street_name(),
            "suite": address.secondary_address(),
            "city": address.city(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        }
    }
Exemple #5
0
def create_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "streetA": address.street_name(),
            "streetB": address.street_address(),
            "streetC": address.street_address(True),
            "streetD": address.secondary_address(),
            "city": address.city(),
            "ukCounty": address.uk_county(),
            "ukCountry": address.uk_country(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        },
        "posts": [
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            },
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            },
            {
                "words": lorem.words(),
                "sentence": lorem.sentence(),
                "sentences": lorem.sentences(),
                "paragraph": lorem.paragraph()
            }
        ]
    }
Exemple #6
0
def user_card():
    return {
        "name": name.find_name(),
        "username": internet.user_name(),
        "email": internet.email(),
        "address": {
            "street": address.street_name(),
            "suite": address.secondary_address(),
            "city": address.city(),
            "zipcode": address.zip_code()
        },
        "phone": phone_number.phone_number(),
        "website": internet.domain_name(),
        "company": {
            "name": company.company_name(),
            "catchPhrase": company.catch_phrase(),
            "bs": company.bs()
        }
    }
Exemple #7
0
def populateDrinkers():

    con = mdb.connect('localhost', 'user', 'pass', 'barlytics')
    curr = con.cursor()
    professions = [['doctor', 2], ['lawyer',2],  ['engineer',2], ['teacher',1], ['contruction worker', 1], ['dentist', 1], ['nurse',1], ['cashier',0], ['janitor',0], ['garbage man', 0], ['driver', 0]]
    genders = ['m', 'f']

    for i in range(0, 9002):
        name = names.get_full_name()
        rand = choice(professions)
        profession = rand[0]
        income = rand[1];
        gender = choice(genders)
        age = choice([randint(18,21), randint(21, 35), randint(21,35), randint(21,35), randint(35, 55), randint (35, 55), randint(55,100)])
        phone = phone_number.phone_number()
        city = address.city()
        addr = str(randint(1,255)) + address.street_name()
        try:
            curr.execute('INSERT INTO drinkers VALUES ("' + str(name) + '", "' + city +  '", "' + str(phone) +  '", "' + str(addr) +  '", "' + profession +  '", "' + str(age) +  '", "' + str(income) +  '", "' + gender + '");')
        except mdb.IntegrityError:
            print "Integrity Error: "
            i = i - 1
        # print 'INSERT INTO drinkers VALUES ("' + name + '", "' + city +  '", "' + phone +  '", "' + addr +  '", "' + profession +  '", "' + str(age) +  '", "' + str(income) + '");'
        con.commit()
Exemple #8
0
            attendee['lastNameOnId'] = name.last_name()
            attendee['nameOnIdIsPreferredName'] = False
        else:
            attendee['firstNameOnId'] = attendee['firstName']
            attendee['lastNameOnId'] = attendee['lastName']
            attendee['nameOnIdIsPreferredName'] = True

        if random.randint(1, 100) < 60:  # Random chance of having a badge name
            attendee['fanName'] = get_badge_name()
        else:
            attendee['fanName'] = ""

        attendee['postal'] = address.zip_code()
        attendee['country'] = "United States of America"

        attendee['phone'] = phone_number.phone_number()
        attendee['email'] = internet.email()
        attendee['birthdate'] = "{0:4d}-{1:02d}-{2:02d}".format(
            birth_date.year, birth_date.month, birth_date.day)

        attendee['emergencyName'] = name.find_name()
        attendee['emergencyPhone'] = phone_number.phone_number()

        if age <= 17:
            attendee['parentName'] = attendee['emergencyName']
            attendee['parentPhone'] = attendee['emergencyPhone']
            attendee['emergencyContactSameAsParent'] = True
        else:
            attendee['parentName'] = ""
            attendee['parentPhone'] = ""
            attendee['emergencyContactSameAsParent'] = False