Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

With two similar data sets, what is some suggested code to perform the following commands in VBA: 1) Insert a new module. Name it Part1.

image text in transcribedimage text in transcribedWith two similar data sets, what is some suggested code to perform the following commands in VBA:

1) Insert a new module. Name it Part1. Insert a new procedure and name it Length. Name the portion of the data set that includes patient name as patient, assuming the number of patients is not known. 2) Add code to select the worksheet Proc Time. Name the data set that includes procedure and their length of time as ProcTime, assuming the number of procedures is not known. 3) Add code to sore the data in the Proc Time range into two arrays. 4) Add code that first asks a user for a patients name - use James Brenman as default. Next, add code to find patient and capture patients procedure. 5) Add code to look up for the length of patients procedure from the arrays in Step 3. Next, display a message, such as James Bremants procedure, IST RFA, will take 75 minutes. 6) Insert a new module. Name it Part2. Copy/Paste the procedure that you developed in Part1 and rename it as StoreProcTimes. Move the declaration of the arrays for the procedure and the procedure times to Public declaration area. Simplify the procedure so that it only includes the code for storing data into the two arrays [Steps 2 and Step 3 of Part1]. 7) Insert a new procedure, named DayLoad that first names the range for the Procedure Date and then it calls procedure StoreProcTimes in Step 1.8) Add code to find and accumulate the length of procedures scheduled for 9/1/2017, i.e., it computes the load for the given day. Display a message to announce the load. [Hint: if x is a type DATE variable, then x = 9/1/2017] 9) Insert a new module. Name it Part3. Insert a new procedure and name it DailyLoad. 10) Store the name of the days of the week in an array, using the Array Function, starting with Sunday, the first day of the week. 11) Add code that that it names the range for the Procedure Date and calls procedure StoreProcTimes to store procedure time data in an array. 12) Add code so that it accumulates total number of procedures for each day of the week as well as the load for each day of the week in a two-dimension array. [Hint: utilize Excel Function WEEKDAY.] 13) Add code that it asks for a day of the week. It then displays a message such as On average, the EP lab is utilized for 4.5 hours on Mondays. 14) Insert a new module. Name it Part4. Develop a function that returns TRUE if, for a given patient, both the average of the INR reading is less than 1.5 and the standard deviation of the INR readings is less than .5, otherwise it return FALSE. [Hint test your function for a give case. Develop a procedure that asks a user for a patient name. Then it calls the function is step 1. If the function return TRUE, display a message such as James Bremans INR record is satisfactory for the procedure. If the function returns FALSE, display a message such as James Bremans INR record is not satisfactory for the procedure.

PtName Last4 Mileage Diagnosis Procedure 2 Madelyn Carberry 3 Mallory Latz 4 Charles Brenman 5 Kelley Green 6 Alec Rhoney 7 Matthew Ma 8 Matthew Dilley 9 Clayton Brenman 10 Jackson Rouse 11 Nathan Rhoney 12 Nicholas Hill 13 Meghan Barnes 14 Hossam Ellis 15 Alec Thomas 16 Madeline Dilley 17 Chandler Sharma 18 Adam To 19 Katelyn Hanser 20 Joseph Ellis 21 Matthew Brown 22 Nathan Houser 23 Nicholas Trinkle 24 Maggie Drahuse 25 Casey Barnes 26 Charlene Murnick 27 Mikayla Patel 28 Joanne Arnold 29 Maggie Casabonne 8947 7662 5586 9639 8647 6575 7112 5479 1438 9740 6322 5505 4755 8214 24 Chronotropic incompetence atypical Aflutter RFA Sotalol load HIS bundle lead atypical Aflutter RFA atypical Aflutter RFA Lead extraction Amiodarone load Propafenone Flecainide load Amiodarone load 86 Chronotropic incompetence 107 AVNRT 26 AVNRT 23 CVA 118 Chronotropic incompetence 148 PVC 168 Afib 167 NICM 142 Bradycardia 174 Bradycardia 90 CVA 142 Atypical Afl 79 Chronotropic incompetence 120 AVNRT 160 Intraventricular conduction delay 118 CVA 46 Bradycardia 132 Chronotropic incompetence Amiodarone load atypical Aflutter RFA Amiodarone load CRT-D 3581 6687 4234 HIS bun Tikosyn load 1180 1328 7613 1200 1314 9289 3986 6137 1967 10 Chronotropic incompetence 180 CVA Leadless PPM Flecainide load atypical Aflutter RFA Amiodarone load 186 Bradycardia 60 Chronotropic incompetence 29 NICM 107 Chronotropic incompetence 110 CVA 59 AVNRT PtName Last4 Mileage Diagnosis Procedure 2 Madelyn Carberry 3 Mallory Latz 4 Charles Brenman 5 Kelley Green 6 Alec Rhoney 7 Matthew Ma 8 Matthew Dilley 9 Clayton Brenman 10 Jackson Rouse 11 Nathan Rhoney 12 Nicholas Hill 13 Meghan Barnes 14 Hossam Ellis 15 Alec Thomas 16 Madeline Dilley 17 Chandler Sharma 18 Adam To 19 Katelyn Hanser 20 Joseph Ellis 21 Matthew Brown 22 Nathan Houser 23 Nicholas Trinkle 24 Maggie Drahuse 25 Casey Barnes 26 Charlene Murnick 27 Mikayla Patel 28 Joanne Arnold 29 Maggie Casabonne 8947 7662 5586 9639 8647 6575 7112 5479 1438 9740 6322 5505 4755 8214 24 Chronotropic incompetence atypical Aflutter RFA Sotalol load HIS bundle lead atypical Aflutter RFA atypical Aflutter RFA Lead extraction Amiodarone load Propafenone Flecainide load Amiodarone load 86 Chronotropic incompetence 107 AVNRT 26 AVNRT 23 CVA 118 Chronotropic incompetence 148 PVC 168 Afib 167 NICM 142 Bradycardia 174 Bradycardia 90 CVA 142 Atypical Afl 79 Chronotropic incompetence 120 AVNRT 160 Intraventricular conduction delay 118 CVA 46 Bradycardia 132 Chronotropic incompetence Amiodarone load atypical Aflutter RFA Amiodarone load CRT-D 3581 6687 4234 HIS bun Tikosyn load 1180 1328 7613 1200 1314 9289 3986 6137 1967 10 Chronotropic incompetence 180 CVA Leadless PPM Flecainide load atypical Aflutter RFA Amiodarone load 186 Bradycardia 60 Chronotropic incompetence 29 NICM 107 Chronotropic incompetence 110 CVA 59 AVNRT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions