Hospital Equipment Loan System

Like many businesses, HELS are starting to make use of computers and computer systems to make the day-to-day operation of their company easier on the management and more efficient. As the nature of the business is unique and no existing packages are suitable for handling the business demands and requirements and has been decided that a custom made application should be designed to meet this challenge.Hospital Equipment Loan System specified that such a system should be able to:Have the ability to store details of the equipment.Have a suitable item code to be devised, which identifies each piece of equipment individually, while indicating what type of equipment it is.Find the following information for any individual piece of equipment:1) Whether it is available, being repaired or out on loan2) If on loan, to whom and at what address or ward number3) If on loan, when it is due to be returned or the loan renewed4) If being repaired, when was it sent for repairThe package needs to be suitable for the required purpose, to satisfy the set criteria, and importantly be easy to use and maintain to make life easier for HELS staff – the program should improve the efficiency of the business and not make things more difficult than they already are.Example of the type of equipment that must be loaned and kept track of:Description of ItemNumber in StockCost of ReplacementWheelchair – Junior2�275Wheelchair – Small2�295Wheelchair – Medium3�320Wheelchair – Large2�350Crutch – Junior4�75Crutch – Adult6�95Elbow Crutch – Junior2�85Elbow Crutch – Adult4�105Neck Collar – Junior3�17.50Neck Collar – Adult5�23.75? Design – Data Input and Validation:The information required by the program will be input using text boxes, as used by most other applications, and will be arranged in a logical order onscreen for easy navigation and association.The text boxes automatically support features such as copy and paste shortcuts, and single-level undo – in case text is deleted accidentally. These features are available from the right click menu of these text boxes as shown.Depending on the type of data, if there is only a limited selection of available values, I will make use of a different control, which allows the selection of a value from a list, shown to the left. For example, there are only a finite number of wards to which a patient can belong. The fact that I used a combo box limits or eliminates the occurrence for errors because the user is not inputting information but merely choosing from a list.Validation of input:This data will be checked for validation in real-time as the data is entered from the keyboard. This is made possible for the text boxes in Visual Basic are using the code “TextBox_change” event, which is run every time the data contained within the text box changes. It is then possible to write code that will check the value entered and then give a visual indication if the value is appropriate or not by changing the colour, font and background of the text boxes.The drop-down list boxes for the customer details form does not need validating, as it is only possible to select a valid ward from the list – no invalid wards are available.The use of validation reminds the user to complete all information. So if the user leaves out any specific information, an error message will appear.? Design – Data Output:The program outputs data in two ways. One is the information displayed on-screen to the user. The second method of output is the printed output that the program must produce, of all the equipment borrowed and brought back, in short all details inputted by the users and brought together and printed off in one small report.On-screen Output:Entering of customer details / wardSelecting of equipmentEntering the access passwordError messagesValidation rulesPrinted Outputs:Customer details and equipmentTime length of loan and dateManagement StatisticsThe printed output is produced using the print faculties built into Visual Basic exposed through the printer object; this will then use any available printers on the system to produce the output from the program. To give the printouts a professional appearance and style, I have designed a logo for the company which is saved as a graphics file in the location of the program on disc.Businesslogo.bmpEvery time output is required, the graphic is printed first and then the output from the program follows. Finally a standard company motto is printed, giving the contact number of the company and a message of thanks.To make comments or would just like to contact HospitalEquipmentLoanSystemTelephone: 0800 1297430 Online: Email: [email protected] Facsimile: 0800 1297432? Design – User Interface:My application has been created so it will be extremely easy for the user to understand and use the application. When the program initially starts up there is login screen, which is then followed by a simple form that allows the user to access 4 separate forms as displayed below.When you access the main form (frmMaindisplay), the user will be able to access another four forms as described below…As you can see, once the user has completed the customer information form, they can proceed to the main form for equipment hire (frmLoans); from which the equipment is loaned. Here, the information which is inputted is repeated in the loans form and is saved (The area is highlighted above).This form has the ability to calculate the week’s loan period and calculates the amount of equipment loaned. Either one piece equipment or a range …E.g.Once the items were selected, the number in stock would be updated. As you can see from this screenshot, the number in stock should be five but because the user selected three items the number in stock has changed to two. This proves that the calculator for this function works. But I will test it further to see the extent of this facility and if there are any problems.Once the user has selected all the necessary items and is all loaned out, the user is required to press the button “loan” so that the information will be saved and can proceed to the following forms.Like the loans form, there are several other forms jus like it, so that it can cater for the other points of the specification such as repairs and reports etc.? Design – User Interface 2:The password prompt form is easy to design, it will require a text box for the password, and two command buttons for OK and Cancel. The positioning should obey the standard of buttons to the right or below the main controls, and I have chosen the following layout:This layout allows for simple operation and uses the standard accepted system of a username and password, although the username will be fixed to “H.E.L.S.” and made non-editable (locked) so that it cannot be modified. There is only need for one username. The password field will be made to accept passwords and display the password as asterisks, for extra security.Code for password / security:Option ExplicitPublic LoginSucceeded As BooleanPrivate Sub cmdCancel_Click()’set the global var to false’to denote a failed loginLoginSucceeded = FalseMe.HideEnd SubPrivate Sub cmdOK_Click()’check for correct passwordIf txtPassword = “cedric” Then’place code to here to pass the’success to the calling sub’setting a global var is the easiestLoginSucceeded = TrueMe.HidefrmMaindisplay.ShowElseMsgBox “Invalid Password, try again!”, , “Login”txtPassword.SetFocusSendKeys “{Home}+{End}”End IfEnd SubIf the user inputs an incorrect password a message will be displayed, saying “Invalid Password, try again!” To increase security I have integrated another package called EasyEncrypto so that the files will be encrypted all the time unless decrypted by the user. In order to keep the data used by the program secure, a password feature will restrict access to the program to trusted individuals. This means that any user with access to the computer, but does not know the password cannot create or modify (or even start) any part of the program without the password. Because the data files used by the system are reads from and written to using random access, they are not in a human-readable format, so it is virtually impossible of successfully modify there contents without access to the program.? Data Flow Diagram:? Design – Record Structure ; File Organisation:The files that store the equipment and customer details will be created using the “Random Access Files” feature of visual basic. This provides direct access to store records of a fixed size to a file. Two files are used, one for the equipment and the other for customer details. These files should exist in the directory containing the program. In order to write random access files, each record must be defined using Type statement. These specify what each record should contain so that the size of each record, and hence the structure of the random access files, can be determined. Here the Type statements for the application.Private Type StockLoadStockLoad_1 As IntegerStockLoad_2 As IntegerStockLoad_3 As IntegerStockLoad_4 As IntegerStockLoad_5 As IntegerStockLoad_6 As IntegerStockLoad_7 As IntegerStockLoad_8 As IntegerStockLoad_9 As IntegerStockLoad_10 As IntegerEnd TypePrivate Type DetailsCustomer_1 As String * 18Customer_2 As String * 18Customer_3 As String * 18Customer_4 As String * 18Customer_5 As String * 18Customer_6 As String * 18Customer_7 As String * 12Customer_8 As StringItemCode1 As String * 12ItemCode2 As String * 12ItemCode3 As String * 12ItemCode4 As String * 12ItemCode5 As String * 12ItemCode6 As String * 12ItemCode7 As String * 12ItemCode8 As String * 12ItemCode9 As String * 12ItemCode10 As String * 12ItemCode11 As String * 12ItemCode12 As String * 12ItemCode13 As String * 12ItemCode14 As String * 12ItemCode15 As String * 12ItemCode16 As String * 12ItemCode17 As String * 12ItemCode18 As String * 12ItemCode19 As String * 12ItemCode20 As String * 12ItemCode21 As String * 12ItemCode22 As String * 12ItemCode23 As String * 12ItemCode24 As String * 12ItemCode25 As String * 12ItemCode26 As String * 12ItemCode27 As String * 12ItemCode28 As String * 12ItemCode29 As String * 12ItemCode30 As String * 12ItemCode31 As String * 12ItemCode32 As String * 12ItemCode33 As String * 12ReturnDate As String * 8LoanAmount As IntegerEnd TypePrivate Type CheckpointCheck_1 As IntegerCheck_2 As IntegerCheck_3 As IntegerCheck_4 As IntegerCheck_5 As IntegerCheck_6 As IntegerCheck_7 As IntegerCheck_8 As IntegerCheck_9 As IntegerCheck_10 As IntegerCheck_11 As IntegerCheck_12 As IntegerCheck_13 As IntegerCheck_14 As IntegerCheck_15 As IntegerCheck_16 As IntegerCheck_17 As IntegerCheck_18 As IntegerCheck_19 As IntegerCheck_20 As IntegerCheck_21 As IntegerCheck_22 As IntegerCheck_23 As IntegerCheck_24 As IntegerCheck_25 As IntegerCheck_26 As IntegerCheck_27 As IntegerCheck_28 As IntegerCheck_29 As IntegerCheck_30 As IntegerCheck_31 As IntegerCheck_32 As IntegerCheck_33 As IntegerEnd Type*For each type statement there is a corresponding Public arrays of the type’s defined. These are used to hold all of the data while the program is running – similar to a table of file in a database. All the files are loaded from the disc into the corresponding arrays upon program load for use throughout the entire program. When the program is exited the files are updated using the records from the arrays.? Printing Reports and Overview form:(Code for printing summary letters for customers)Private Sub CmdLetter_Click()CommonDialog1.ShowPrinterPrinter.PrintQuality = vbPRPQHighPrinter.PaintPicture LoadPicture(App.Path & “Businesslogo.bmp”), 0, 0Printer.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Font.Name = “Times New Roman”Printer.Font.Size = 14Printer.FontBold = TruePrinter.Print ” ” & “____________________________________________________________”Printer.Print ” ” & “Loan Statistics for ” & Format(Now, “DD/MM/YY”)Printer.Print ” ” & “Loan Statistics for ” & lblItem.CaptionPrinter.Print ” ” & “————————————————————“Printer.PrintPrinter.Font.Name = ” Times New Roman “Printer.Font.Size = 12Printer.PrintPrinter.Print ” ” & ” ” & “Dear ” & lblTitle.Caption & lblName.CaptionPrinter.PrintPrinter.Print ” ” & “This is simply a reminder that the equipment you have loaned from us”Printer.Print ” ” & “is due back in exactly one week. Please ensure that you note this and”Printer.Print ” ” & “return the equipment on the agreed date or there will be an issuing of”Printer.Print ” ” & “a penalty.”Printer.PrintPrinter.PrintPrinter.PrintPrinter.PrintPrinter.PrintPrinter.PrintPrinter.PrintPrinter.Print ” ” & “Your sincerely”Printer.Print ” ” & “Cedric John”Printer.Print ” ” & “Reminder from Hospital Equipment Loan System”Printer.Print ” ” & “____________________________________________________________”End SubPrivate Sub cmdPrintDetails_Click()On Error GoTo HandlerIf chkCustomer.Value = 1 ThenCommonDialog1.ShowPrinterPrinter.PrintQuality = vbPRPQHighPrinter.PaintPicture LoadPicture(App.Path & “Businesslogo.bmp”), 0, 0Printer.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Font.Name = “MS Sans Serif”Printer.Font.Size = 14Printer.FontBold = TruePrinter.Print ” ” & “____________________________________________________________”Printer.Print ” ” & “Loan Statistics for ” & Format(Now, “DD/MM/YY”)Printer.Print ” ” & “Loan Statistics for ” & lblItem.CaptionPrinter.Print ” ” & “————————————————————“Printer.PrintPrinter.Font.Name = “MS Sans Serif”Printer.Font.Size = 12Printer.Print ” ” & ” ” & “Title “; Tab(30); lblTitle.CaptionPrinter.Print ” ” & ” ” & “Name “; Tab(30); lblName.CaptionPrinter.Print ” ” & ” ” & “Address “; Tab(30); lblAddress_1.CaptionPrinter.Print ” “; Tab(30); lblAddress_2.CaptionPrinter.Print ” ” & ” ” & “City “; Tab(30); lblCity.CaptionPrinter.Print ” ” & ” ” & “Postcode “; Tab(30); lblPostcode.CaptionPrinter.Print ” ” & ” ” & “Telephone “; Tab(30); lblTelephone.CaptionPrinter.Print ” ” & ” ” & “Ward “; Tab(30); lblWards.CaptionPrinter.Print ” ” & “————————————————————“Printer.PrintPrinter.Print ” ” & ” ” & “Item Code “; Tab(30); lblItem.CaptionPrinter.Print ” ” & ” ” & “Return “; Tab(30); lblReturnDate.CaptionPrinter.Print ” ” & ” ” & “Number of Loans “; Tab(30); lblNumLoan.CaptionPrinter.Print ” ” & “————————————————————“Printer.Print ” ” & “____________________________________________________________”End IfIf chkRepair.Value = 1 ThenCommonDialog1.ShowPrinterPrinter.PrintQuality = vbPRPQHighPrinter.PaintPicture LoadPicture(App.Path & “Businesslogo.bmp”), 0, 0Printer.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Print vbCrLfPrinter.Font.Name = “MS Sans Serif”Printer.Font.Size = 14Printer.FontBold = TruePrinter.Print ” ” & “____________________________________________________________”Printer.Print ” ” & “Loan Statistics for ” & Format(Now, “DD/MM/YY”)Printer.Print ” ” & “Loan Statistics for ” & lblItemCode.Caption & lblState.CaptionPrinter.Print ” ” & “————————————————————“Printer.PrintPrinter.Font.Name = “MS Sans Serif”Printer.Font.Size = 12Printer.Print ” ” & ” ” & “Description “; Tab(30); lblDescription.CaptionPrinter.PrintPrinter.Print ” ” & ” ” & “Item Code “; Tab(30); lblItemCode.CaptionPrinter.PrintPrinter.Print ” ” & ” ” & “Cost Of Replacement “; Tab(30); lblReplaceCost.CaptionPrinter.PrintPrinter.Print ” ” & “————————————————————“Printer.PrintPrinter.Print ” ” & ” ” & “Sent: Date “; Tab(30); lblDate.CaptionPrinter.Print ” ” & ” ” & “Return: Date “; Tab(30); lblLoanDate.CaptionPrinter.PrintPrinter.Print ” ” & “————————————————————“Printer.Print ” ” & “____________________________________________________________”End IfExit SubHandler: MsgBox “Select the printing style”, vbCriticalEnd Sub? Did my program meet the specification?The first aspect of the specification is that I must be able to produce a hard copy of the information, of any piece of equipment. This has been proved on pages 10 and 11. The next aspect concerns the loan period. The equipment is lent out for a 6-week period in the first place, but this loan can be renewed for periods of 6 weeks.The check boxes allow the user to choose from a length of one week to six weeks as requested in the specification.The text box next to “Return on the:” displays the date of the week that it should be returned and if the user is not sure of the current date they can select “Today’s date” and the date of that day will appear.The specification also asked to allow the user to input name and address. Also there must be a range for the ward numbers. The wards must range from W1 to W10. So there must be 10 different options. I have chosen the ward ranges to appear in a combo box form as shown below.Cedric John Computer Science – Major Project 01/04/02Candidate # : Centre # : Page 1

Leave a Reply

Your email address will not be published. Required fields are marked *


I'm Heidi!

Would you like to get a custom essay? How about receiving a customized one?

Check it out