zackmark29
Elite
Yung line 39
missing yung selectillness
if 'selectIllness' in illnessList:
missing yung selectillness
if 'selectIllness' in illnessList:
gMembers = ['Name 1', 'Name 2', 'Name 3']let me see your code
bakit while = loop
gMembers = ['Name 1', 'Name 2', 'Name 3']
pMenu = ['Serch', 'View', 'Add', 'Exit']
illNumber = 0
newPres = []
print("-------Dr. Python: A Program for Patient's Prescription-------")
# must display the following:
# Group Name
# Names of each member
# Course code and Description
# Program, Year And Section
# Academic Year and Semester
print('Group 1')
print("Member's Name")
for member in gMembers:
print(member)
print('Course Code and Description')
print('Program, Year and Section')
print('Academic Year and Semester')
print("-------Dr. Python: A Program for Patient's Prescription Menu-------")
print("Select one of the following: ")
for i, items in enumerate(pMenu):
#pNumber += 1 remove this you can do enumerate
print(str(i+1)+'.'+items)
print("-------Dr. Python: A Program for Patient's Prescription User Choice-------")
illnessesList = ['Eczema', 'Sinus Infection', 'Diabetes',
'Ring Worm', 'Chickenpox', 'Sore Eyes', 'Rashes', 'Osteoporosis',
'Measles', 'Headache', 'Gout', 'Food Allergies', 'Fiver', 'Diarrhea',
'Flu', 'UTI', 'Vertigo', 'Fever', 'Flu', 'Gout', 'Headaches', 'Ear Pain',
'Bronchitis', 'Bronchiolitis', 'Cough']
while True:
try:
patientChoice = int(input('Select Choice: '))
except:
print('Sorry Invalid input, please try again')
break
if patientChoice == 1:
searchIllness = input('Search Illness: ').title() #.title means automatically make capital letter the user's input para mag match sa illness lists
print()
print(f'Searching {searchIllness}')
if searchIllness in illnessesList:
print(searchIllness + ' is one of the illnesses included in the list.')
print('Generating report(s)..........')
else:
#just put this here instead at the end of the loop. Para hindi na mag check bawat statement.
print('Sorry, ', searchIllness + ' does no exist in the list')
print('Please, try again.')
break
print()
if searchIllness == illnessesList[0]:
print('Eczema')
print('Prescription')
print('\nMedecine: Bioderm Oinment', '\nNumber of Medecine to Buy: 1 Pack', '\nNumber of Medecine to Take: 1 pack','\nHow to Take the Medecine: Onve a day after bath', '\nDoctors Reccomendation: Take a rest')
elif searchIllness == illnessesList[1]:
print('Sinus Infection')
print('Prescription')
print('\nMedecine: Saline nasal spray', '\nNumber of Medecine to Buy: 1 Battle', '\nNumber of Medecine to Take: 1 Battle','\nHow to Take the Medecine: Several times a day.', '\nDoctors Reccomendation: Put a warm compress ober the nose and forehead to help relieve sinus presseure.')
elif searchIllness == illnessesList[2]:
print('Diabetes')
print('Prescription')
print('\nMedecine: Lantus Insulin(inject)', '\nNumber of Medecine to Buy: 10 Pack', '\nNumber of Medecine to Take: 10 pack',
'\nHow to Take the Medecine: Once daily at Bedtime', '\nDoctors Reccomendation: Eat more, Healthy fats from nuts, olive oil, fish oils, flax seeds, or avocados.')
elif searchIllness == illnessesList[3]:
print('Ring Worm')
print('Prescription')
print('\nMedecine: Antifungal Cream', '\nNumber of Medecine to Buy: 1 Pack',
'\nNumber of Medecine to Take: 1 pack/Until the Ring worm heal.', '\nHow to Take the Medecine: Use also Apple cider vinegar.')
elif searchIllness == illnessesList[4]:
print('Chickenpox')
print('Prescription')
print('\nMedecine: Acyclovir Oinment', '\nNumber of Medecine to Buy: 1 Pack', '\nNumber of Medecine to Take: 1 pack',
'\nHow to Take the Medecine: Once a day after bath', '\nDoctors Reccomendation: To feel comportable at night apply a cooling cream or gel.')
elif searchIllness == illnessesList[5]:
print('Sore Eyes')
print('Prescription')
print('\nMedecine: Naphazoline(Liquid)', '\nNumber of Medecine to Buy: 1 Pack', '\nNumber of Medecine to Take: 1 pack', '\nHow to Take the Medecine: Apply it or Drop it in your eyes in ,Morning and night',
'\nDoctors Reccomendation: Dont touch or rub your eyes, where sunglasses when outside and also drink enough water to stay hydrated. ')
elif searchIllness == illnessesList[6]:
print('Rashes')
print('Prescription')
print('\nMedecine: Zink oxide Oinment', '\nNumber of Medecine to Buy: 1 Pack', '\nNumber of Medecine to Take: 1 pack',
'\nHow to Take the Medecine: Apply it after take a bath', '\nDoctors Reccomendation: Apply any mousturizing cream.')
elif searchIllness == illnessesList[7]:
print('Osteoporosis')
print('Prescription')
print('\nMedecine: Alendronic tablet', '\nNumber of Medecine to Buy: 14 Pack', '\nNumber of Medecine to Take: 14 pack',
'\nHow to Take the Medecine: Two times a week', '\nDoctors Reccomendation: have a healthy and varied diet with plenty of fresh fruit, vegetables and whole grains.')
elif searchIllness == illnessesList[8]:
print('Measles')
print('Prescription')
print('\nMedecine: Naproxen Sodium', '\nNumber of Medecine to Buy: 10 Pack', '\nNumber of Medecine to Take: 10 pack',
'\nHow to Take the Medecine: Two times a day. Morning and Night.', '\nDoctors Reccomendation: Get rest and avoid busy activites.')
elif searchIllness == illnessesList[9]:
print('Headache')
print('Prescription')
print('\nMedecine: Saridon(Tablet)', '\nNumber of Medecine to Buy: 6 ', '\nNumber of Medecine to Take: 6 ',
'\nHow to Take the Medecine: one to two times a day.', '\nDoctors Reccomendation: Use an ice pack on your forehead, scalp or neck.')
elif searchIllness == illnessesList[10]:
print('Gout')
print('Prescription')
print('\nMedecine: Aspirin(Tanlet)', '\nNumber of Medecine to Buy: 10 Pack', '\nNumber of Medecine to Take: 10 pack',
'\nHow to Take the Medecine: Two times a day', '\nDoctors Reccomendation: Drink plenty of Fluids')
elif searchIllness == illnessesList[11]:
print('Food Allergies')
print('Prescription')
print('\nMedecine: Loratidine(Tablet)', '\nNumber of Medecine to Buy: 1 Pack', '\nNumber of Medecine to Take: 1 pack',
'\nHow to Take the Medecine: onve a day ,drink after dinner.', '\nDoctors Reccomendation: Avoid the food that vause sign and systoms.')
elif searchIllness == illnessesList[12]:
print('Fiver')
print('Prescription')
print(' \nMedecine: Biogesic(Tablet)', '\nNumber of Medecine to Buy: 6 Pack', '\nNumber of Medecine to Take: 6 pack', '\nHow to Take the Medecine: Two times a day after lunch and dinner.',
'\nDoctors Reccomendation: For a low-grade fever, your doctor may not recommend treatment to lower your body temperature. These minor fevers may even be helpful in reducing the number of microbes causing your illness.')
elif searchIllness == illnessesList[13]:
print('Diarrhea')
print('Prescription')
print('\nMedecine: Diatabs(Tablet)', '\nNumber of Medecine to Buy: 2 ', '\nNumber of Medecine to Take: 2 ',
'\nHow to Take the Medecine: Two times a day.', '\nDoctors Reccomendation: Discontinue if there is no improvment after 2 days.')
elif searchIllness == illnessesList[14]:
print('Flu')
print('Prescription')
print('\nMedecine: Oseltamovir(Tablet)', '\nNumber of Medecine to Buy: 5 ', '\nNumber of Medecine to Take: 5 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[15]:
print('Scabies')
print('Prescription')
print('\nMedecine: Permethrin(Tablet)', '\nNumber of Medecine to Buy: 5 ', '\nNumber of Medecine to Take: 5 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[15]:
print('Schizophrenia')
print('Prescription')
print('\nMedecine: Vitamins(Tablet)', '\nNumber of Medecine to Buy: Many ', '\nNumber of Medecine to Take: Many ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[16]:
print('Scoliosis')
print('Prescription')
print('\nMedecine: Painkillers(Tablet)', '\nNumber of Medecine to Buy: 1 ', '\nNumber of Medecine to Take: 1 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[17]:
print('Shingles')
print('Prescription')
print('\nMedecine: Pamciclovir(Tablet)', '\nNumber of Medecine to Buy: 5 ', '\nNumber of Medecine to Take: 5 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[18]:
print('Sore Throat')
print('Prescription')
print('\nMedecine: Tylenol(Liquid)', '\nNumber of Medecine to Buy: 1 pack ', '\nNumber of Medecine to Take: 1 pack ',
'\nHow to Take the Medecine: one table spoon a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[19]:
print('Toothache')
print('Prescription')
print('\nMedecine: Acetaminophen(Liquid)', '\nNumber of Medecine to Buy: 8 ', '\nNumber of Medecine to Take: 8 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[20]:
print('Stomach Ache')
print('Prescription')
print('\nMedecine: Kaopectate *****(Tablet)', '\nNumber of Medecine to Buy: 3 ', '\nNumber of Medecine to Take: 3 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[21]:
print('UTI')
print('Prescription')
print('\nMedecine: Ampicillin(Tablet)', '\nNumber of Medecine to Buy: 56 ', '\nNumber of Medecine to Take: 28 to 56 ',
'\nHow to Take the Medecine: two times a day after lunch and dinner.', '\nDoctors Reccomendation: Take a rest.')
elif searchIllness == illnessesList[22]:
print('Vertigo')
print('Prescription')
print('\nMedecine: Dramamine(Tablet)', '\nNumber of Medecine to Buy: 2 ', '\nNumber of Medecine to Take: 2 ',
'\nHow to Take the Medecine: once a day.', '\nDoctors Reccomendation: Take a rest.')
newPres.append(searchIllness)
print(searchIllness + ' Updated the existing list')
print('New Prescription to', searchIllness, 'is required')
print('Add a Prescription')
presDate = input('Input Date: ')
presHospAdd = input('Input Clinic/Hospital Address: ')
presHosContNum = input('Input Clinic/Hospital Contact Number: ')
presPNum = int(input("Input Patient's Number: "))
presPName = input("Input Patient's Name: ")
presIllnessTitle = input("Input Patient's Illness Title: ")
presMedToTake = input('Name of medicine to be taken: ')
presNumOfMedToBuy = int(input('Number of medicine to buy: '))
presNumOfMedtoTake = int(input('Input Number of Medicine to be taken: '))
presProcessHowtoTakeMed = input('Process how to take medicine: ')
presDrRec = input("Input Dr.'s Recommendation: ")
presDrNameNSignature = input("Input Dr.'s Name and Signature: ")
print('Generating report(s)..........')
print('Printing official prescription..........')
print("-------Dr. Python: A Program for Patient's Prescription Official Report-------")
print('Date: ', presDate)
print('Clinic or Hospital Address: ', presHospAdd)
print('Clinic or Hospital Contact Number: ', presHosContNum)
print("Patient's Number: ", presPNum)
print("Patient's Name: ", presPName)
print('Title of Illness: ', presIllnessTitle)
print("Name pf Medicine to be taken: ", presMedToTake)
print("Number of medicine to buy: ", presNumOfMedToBuy)
print("Number of medicine to be taken: ", presNumOfMedtoTake)
print("Process on how to take the medicine: ", presProcessHowtoTakeMed)
print("Doctor's Recommendations: ", presDrRec)
print("Doctor's Name and Signature: ", presDrNameNSignature)
elif patientChoice == 2:
print("Viewing illnesses")
print('Displaying available illnesses')
for i, illness in enumerate(illnessesList):
print(str(i+1)+'.'+illness)
elif patientChoice == 3:
print('Add a Prescription')
presDate = input('Input Date: ')
presHospAdd = input('Input Clinic/Hospital Address: ')
presHosContNum = input('Input Clinic/Hospital Contact Number: ')
presPNum = int(input("Input Patient's Number: "))
presPName = input("Input Patient's Name: ")
presIllnessTitle = input("Input Patient's Illness Title: ")
presMedToTake = input('Name of medicine to be taken: ')
presNumOfMedToBuy = int(input('Number of medicine to buy: '))
presNumOfMedtoTake = int(input('Input Number of Medicine to be taken: '))
presProcessHowtoTakeMed = input('Process how to take medicine: ')
presDrRec = input("Input Dr.'s Recommendation: ")
presDrNameNSignature = input("Input Dr.'s Name and Signature: ")
print('Generating report(s)..........')
print('Printing official prescription..........')
print("-------Dr. Python: A Program for Patient's Prescription Official Report-------")
print('Date: ', presDate)
print('Clinic or Hospital Address: ', presHospAdd)
print('Clinic or Hospital Contact Number: ', presHosContNum)
print("Patient's Number: ", presPNum)
print("Patient's Name: ", presPName)
print('Title of Illness: ', presIllnessTitle)
print("Name pf Medicine to be taken: ", presMedToTake)
print("Number of medicine to buy: ", presNumOfMedToBuy)
print("Number of medicine to be taken: ", presNumOfMedtoTake)
print("Process on how to take the medicine: ", presProcessHowtoTakeMed)
print("Doctor's Recommendations: ", presDrRec)
print("Doctor's Name and Signature: ", presDrNameNSignature)
elif patientChoice == 4:
print('Thank you for using our Dr. Python Program')
print()
break
