Discover millions of ebooks, audiobooks, and so much more with a free trial

From $11.99/month after trial. Cancel anytime.

The Making of a Doctor
The Making of a Doctor
The Making of a Doctor
Ebook1,321 pages19 hours

The Making of a Doctor

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Part One of Java coding formulated by Segun using hundreds of pre-defined MySQL queries to query (or question) the GP databases created by Segun, the physician, of his consultations.
LanguageEnglish
Release dateDec 14, 2021
ISBN9781982284909
The Making of a Doctor

Read more from Julius Adebiyi Sodipo

Related to The Making of a Doctor

Related ebooks

Medical For You

View More

Related articles

Reviews for The Making of a Doctor

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    The Making of a Doctor - Julius Adebiyi Sodipo

    Copyright © 2022 Julius Adebiyi Sodipo.

    All rights reserved. No part of this book may be used or reproduced by any means, graphic, electronic, or mechanical, including photocopying, recording, taping or by any information storage retrieval system without the written permission of the author except in the case of brief quotations embodied in critical articles and reviews.

    Balboa Press

    A Division of Hay House

    1663 Liberty Drive

    Bloomington, IN 47403

    www.balboapress.co.uk

    UK TFN: 0800 0148647 (Toll Free inside the UK)

    UK Local: (02) 0369 56325 (+44 20 3695 6325 from outside the UK)

    Because of the dynamic nature of the Internet, any web addresses or links contained in this book may have changed since publication and may no longer be valid. The views expressed in this work are solely those of the author and do not necessarily reflect the views of the publisher, and the publisher hereby disclaims any responsibility for them.

    The author of this book does not dispense medical advice or prescribe the use of any technique as a form of treatment for physical, emotional, or medical problems without the advice of a physician, either directly or indirectly. The intent of the author is only to offer information of a general nature to help you in your quest for emotional and spiritual well-being. In the event you use any of the information in this book for yourself, which is your constitutional right, the author and the publisher assume no responsibility for your actions.

    Any people depicted in stock imagery provided by Getty Images are models, and such images are being used for illustrative purposes only.

    Certain stock imagery © Getty Images.

    ISBN: 978-1-9822-8489-3 (sc)

    ISBN: 978-1-9822-8491-6 (hc)

    ISBN: 978-1-9822-8490-9 (e)

    Balboa Press rev. date:   12/14/2021

    CONTENTS

    Dedication

    Appreciation

    Aim

    Introduction

    Experience of a solo GP (virtually) Practice in suburban England (Java coding) Part 1

    DEDICATION

    I dedicate this book to my four sons:

    Julius Adedeji, John Adesola, Isaac Adetokunbo and Johnson Adeyinka;

    their mother Gloria Adanma;

    to the memory of my:

    father’s father Papa (Chief) Isaac Omolaja Sodipo;

    father’s mother Madam Bilewunmi-omo Sodipo (alias Iya Ita-oloti);

    mother’s mother Nee Alice Aina Ero-Phillips (alias Iya Alakara);

    mother Madam (Chief) Harriet Olufunke Ibidunni Sodipo

    father, Dr (Chief) John Adewunmi Akanbi Sodipo.

    APPRECIATION

    I will like to thank my wife, Gloria Adanma (Nee Okoroafor), for showing fleeting interests during the production of the whole project and to thank my son, Isaac Adetokunbo, for editing and proof-reading the book.

    AIM

    Any proceeds from the sale(s) or distribution of this book should be used in setting up a Fund, which should be invested in a safe investment. This fund should be called Dr Julius Adebiyi Sodipo’s Fund.

    All the proceeds being generated from the sale of the book (or project) as well as all the proceeds from his estate should be deposited as Capital into the fund. The managers of the Estate Fund should not get more than 10% of the income generated by the Fund each year. The proceeds in the Fund should be invested in a relatively safe investment and what is generated should be called the Fund Income.

    So, should any of the remaining of my estate, after deduction of any debts and taxes should be added to the Dr Julius Adebiyi Sodipo’s Fund. The monies in the fund should be distributed from time to time occasionally but regularly to my biological grandchildren, biological great grandchildren, biological great great grandchildren, and biological generations yet to be born with no conditions attached. For example, for those who are eligible i.e., my biological descendants, 30 percent of the yearly income should be distributed equally yearly rather than 5 percent monthly. Those who are managing the Fund and its distribution should receive 5 to 10 percent of the yearly income, as appropriate to use in maintaining the fund and as their fees.

    The remaining 90% (or 95%) of the yearly income generated by the Estate Fund, reiterated here, should be equally divided between the biological posterity of Dr Julius Adebiyi Sodipo for generations to come including those yet unborn for as long as possible as far as the Estate exists.

    The division of the Estate Fund’s income should be as follows:

    Each member of his (my) biological posterity should get their own share from the age of 30 years old until the age of 55 years old, or they are no longer alive if this should happen earlier. As reiterated earlier their own share should be given to them yearly or more frequently if the managers feel it is in the best interest of the recipient to do so.

    An independent legal firm (team) mutually agreeable to most of the stakeholders must be employed. The legal firm is to ensure the smooth running by the Fund Managers, to ensure that the managers keep to the protocol set out above or not to significantly deviate from it. The legal team should receive 5% of the yearly income of the fund as their renumeration.

    INTRODUCTION

    This idea and realism of writing this book came to me to write a brief overview of Segun as a teenager in his country of birth of Nigeria and to travel through his journey from then until about his retirement as a doctor. There will be inevitable gaps, for which Segun whole-heartedly apologises. A sizeable amount is allocated to life before his university days. There is a noticeable abrupt end and allocation of the book towards his experience as a medical student. This is done on purpose in view of the way Segun felt and still feels being unfairly treated towards the end of his period as a student in the University.

    Efforts to introduce his experiences as a doctor are deliberate and apologies for any perceived idea of turning the contents of the book to more of science. Segun feels this is necessary to be able to show his experiences and knowledge as a medical doctor.

    245.png

    EXPERIENCE OF A SOLO GP

    (VIRTUALLY) PRACTICE IN SUBURBAN

    ENGLAND (JAVA CODING) PART 1

    The GP Practice was in the East of England, close to the South East of England border. The period covered was in the late 1990s to early 20s, covering a period of just under 20 years.

    The GP Practice was covered by two GPs and when the senior GP partner retired after about one year of the junior partner joining the Practice, the Practice was then solo run by the junior partner. Initially, for about 18 months out of hours cover was run by a co-operative of local GPs (so to say). The out of cover started from 7.00pm when the Surgeries close until 11.00pm, when the on-call doctor handed over to a commercially run out of hours service. Although the GPs handed over the care of their patients to the commercially run out of hours service, they were still ultimately responsible for their patients. The on-call service run by the local GPs was over the weekdays only. The weekends were covered by the commercially run service, that is Saturdays and Sundays.

    Each GP Practice was responsible for paying its own fees to the commercial service, which was calculated based on the population of the list size of the Practice. There was a rota service between the local GPs which included cover for holidays or sicknesses, the latter involving more complicated arrangements. The on-call services by the GPs lasted for about 18 months when they all opted out of the out of hours service and the responsibilities for the patients during those hours was transferred to the government.

    The information being presented were anonymously gathered by the GP, at the end of each day and entered the data into own created database, other than the names of the local GPs. No specific patient’s or patients’ identity can be traced from the information provided.

    If you are interested in finding out more about the clinical experience of the GP, specific decisions taken during the approximately 20 years period of practice by the GP based on specific questions (or queries), please see PS below and carefully follow the instructions.

    PS: To get the local host working please follow the next steps and the ongoing ones.

    1. Right click on Wampserve32 on the desktop and click on Run as administrator.

    2. Wait for the W icon to appear at the bottom on the task bar, which is initially red, and to turn to green.

    3. Click on the green W icon, then click on Start all Services.

    4. Similarly, run the NetBeans IDE icon as administrator.

    5. When the program loads up you may get a warning dialog box stating the following: Project Problems. One or more project resources could not be found. Right-click the project in the Projects window and choose Resolve Project Problems to find the missing resources. You should ignore all this and just click on Close.

    6. Click on Services.

    7. Right click on Java DB.

    8. Click on Start Server.

    9. You may find that steps 6, 7 and 8 may not be necessary in the updated versions.

    10. Click on Files.

    11. Open your desired files, for example JavaDecember1997_December2005_Surgery_Consultations2 means that queries can be found from consultations seen by the Solo Doctor between December 1997 and December 2005.

    A. Click on + beside the chosen file.

    B. Click on the + beside src.

    C. Click on + beside jJava …... consultations2

    D. Right click on the .java file.

    E. Click on Open, to open the file.

    12. Look under private void QueryResult().

    A. Choose the result you want, the year query by choosing the number.

    B. Towards the end of the private void QueryResult() before the Catch, insert the number of the Result to show when you run the query.

    C. Please note that it is not possible to delete, update or add new record(s).

    13. Look under private void Query.

    A. Look for the same number as that of the chosen under QueryResult().

    B. Copy only the text and the semi-colons.

    14. Look for public void connect which is almost at the end of the file.

    A. Look for SQL = some text;

    B. Highlight the underlined and paste the copied text (that is the query with the same number as the number of the QueryResult()).

    15. Run the query, to get the result of the query, by clicking the green arrow in the task above in the program or pressing the F6 keyboard button.

    16. Follow the self-explanatory instructions on the box, so produced, if desired to view more records one at a time.

    17. The appropriate steps described above can be repeated for different queries.

    18. Because some records are missing, especially between January 2002 to September 2002, that is no year 2002 records for the months January to September (missing), this will be reflected when the query is run. Once the pop-up button, informing the user that such record is not available, click the pop-up button to clear it. Lots of text in red will appear below. These should be ignored, and the running of the program can be stopped or exited.

    19. To stop or exit the running of the program, do the following: Click on Run at the top of the program. A dialog box is brought up and at the bottom of the box, click on Stop Build/Run, otherwise you may have difficulty running other queries. An alternative way is to click on the small x in a box that appears the right of a box showing running… in blue next to for example oncall_database_form (run). This brings up a Cancel Running Task box that asks Are you sure you want to cancel oncall_database_form (run)? Yes or No. You can then click on Yes to cancel the running

    20. The same steps can be followed to run the oncall database from which will show the consultations dealt with by the Doctor while working on call in the co-operative system. So, you will need to repeat steps 10 to 12 again, only doing this on the YearlyOncall.java file.

    21. There are times when the result of the query is zero records, that is no records are available for the query. This can happen for example if you run a query requesting for the number of consultations dealt with in December 1997. You will get an information Message box saying, Illegal operation on empty result set. Click the okay button, the message box will disappear. Another information Message box will then appear showing there are no records for the query. Once the okay button is clicked, then you will get a line of the same message saying that there are no records for the query in the Output console, under run: and above BUILD SUCCESSFUL (total time: x seconds). Note x is the value it takes to run the query.

    22. When the result of the query is two, the Next button may not work in displaying the Record 2 …, to get the right message you should click on the last button instead.

    23. It is very important to back up the files containing the database and the queries. Sometimes for reasons unknown it is necessary to install Wampserver 32 and Wampserver 64 as it may be difficult if not impossible to run the Wampserver 32. Unfortunately, there may not be a warning that this will happen. To install the Wampservers, you need to uninstall the Wampservers on the computer.

    24. So, the folder www in the Wamp32 folder should be copied and saved elsewhere where it can easily be located as on the Desktop, as well as the bin (not cgi-bin) folder (which contains the database) copied and kept elsewhere, preferably a different site. Once the Wampservers have been installed and everything is working properly including the phpadmin and the MySql is working properly and adding the appropriate password. It should be noted that the first time the MySql is opened only root for the username and no password is needed initially.

    25. The copied www and the bin folders can then be recopied back to the newly installed folder.

    26. The last three steps described above are only necessary for codings where MySql not SQL was the database. These are for PHP, Java and Python.

    27. Rarely, an apparent error develops in a file preventing it from opening. Efforts to detect and correct the problem may prove abortive. If this happens, please don’t panic but just follow the steps detailed below as appropriate.

    28. A new file will need to be created. This could involve opening a similar file with no error and copying it as a text file preferably or using the notepad ++. Go through it and change the appropriate month and dates, making sure an original copy is kept as a template.

    29. Similar files are the following: January and February 1997 to 2006; January and February 2007 to 2015. Other similar files are March to December, 1997 to 2005; March to December, 2006 to 2015. For example, if the file with the error is June 1997 to 2005, then a file like May 1997 to 2005. Because 2002 records are not absent for the months October to December, this should not be given.

    30. Because the copying, pasting and changing the months and dates as detailed above in sections 26 and 27 is rather very tedious, there is an alternative method described below.

    31. A tried and tested method is by using visual basic for application for Excel (vba for Excel program. To do this, please follow the steps below.

    32. Go to G: drive, then click DATA, then click Desktop and highlight the file: Surgery SQL query tables template testsep2019.xlsm, preferably the latest one. Open it with excel.

    33. Once opened, make sure Sheet6 is highlighted and picked. Then click on Developer at the top. Ensure that macros are enabled. Then double click on View Code at the top. Text editor sheet showing the codes for Sheet6 can be seen. Look for the code MyString = Replace (MyString2, November, December). Remove the apostrophe sign (‘) at the beginning to activate the code.

    34. You can also activate the code showing Mystring2 = Cells(StartNumber, B).Value.

    35. Then click on the X, i.e. excel sign, or the object icon to take you to the Worksheet. Copy the whole program on the Text Document and paste it to cell A1 and to B1, ensuring that both A and B columns are empty prior to the pasting.

    36. Then click on the Visual Basic icon below File or the View Code at the top to take you back to the codes. Ensure the cursor is located on an activated code and press F5 to run the program. Before running the program ensure that the text you want to change is located in the first double quote sign, e.g. November as in our own example and enter what you want to change it to within the second double quote sign, as December in our example. So, for example the error is in a December file and the November file has not got any error.

    37. In our example of error being in the December file, you will also need to change november to december (that is changing from Proper case to lower case to accommodate for what is required for in the queries section) as using the method described in step 31 above. Before doing this it is imperative that you copy the contents of column A to column B. This ensures that the December file is now what is acted on.

    38. Again .11. needs to be changed to .12. using the methods described in step 35. This ensures that month in the weekly queries are changed appropriately.

    39. Go back to the Worksheet and highlight column A. Copy only the contents of the column A and paste it on a new text file which has already been created.

    40. To create a new program, follow the steps described below: go to File on the Java form and click on New project, a Choose Project dialog box appears, highlight Java and Java Application, Click on Next> to open the Name and Location dialog box. Enter the name, e.g. JavaDecember1997_December2005_Surgery_Consultations2a. Note that this must be a different name from any existing file, then press Finish to create the New File. This can be opened and the copied file from the Worksheet can then be pasted on the new file to replace whatever was in the file.

    41. Before the new file can be run without any error, the following needs to be done.

    42. Highlight Libraries after opening the file, then the Source Packages. Right click on the Libraries to show a small box, click Add Jar/Folder … to open a dialog box. Highlight derbyclient.jar, and then click open. You may find this steps in paragraph 40 may not be required with later files, which use MySql instead of Derby.

    43. Repeat the same as in step 38 above, but this time choose Add Library. In the Available Libraries dialog, highlight MySQL JDBS Driver and click on create. You may find this steps in paragraph 41 may not be required with later files, which use MySql instead of Derby.

    44. Assuming there had not been any error(s), you should now be able to run the file as normal.

    45. If there is any problem accessing the oncall project (called on YearlyOncall.java). This may have to be updated if necessary or required. This is found on G drive, then click on Documents, then click on NetBeansProjects. To open this, one needs to open the java program by opening the NetBeans IDE as administrator, click on File at the top and then click on open and then navigate to the NetBeansProjects and click on oncall_database_form to open the yearlyOnCall.java. To do the latter, click on the oncall_database_form, then click on src, then on Consultations and then right-click on YearlyOncall.java to open it.

    Java - Questions, Results, MySQL Queries and Programming Codes

    Yearly On Call.java

    /*

      * To change this license header, choose License Headers in Project Properties.

      * To change this template file, choose Tools | Templates

      * and open the template in the editor.

      */

    package Consultations;

    import java.sql.Connection;

    import java.sql.DriverManager;

    import java.sql.SQLException;

    import java.sql.Statement;

    import java.sql.ResultSet;

    import javax.swing.JOptionPane;

    public class YearlyOncall extends javax.swing.JFrame {

            ComboBox comboOne;

            Connection con;

            Statement stmt;

            ResultSet rs;

            int curRow = 0;

            int m = 0;

            int n = 0;

            int i = 0;

            int u = 0;

            String[] sqlResult;

            String[] query;

            public YearlyOncall() {

                    initComponents();

                    DoConnect();

                    QueryResult();

                    FirstRecordNumber();

            }

    //

            /**

              * This method is called from within the constructor to initialize the form.

              * WARNING: Do NOT modify this code. The content of this method is always

              * regenerated by the Form Editor.

              */

            @SuppressWarnings(unchecked)

            // collapsed desc=Generated Code>

            private void initComponents() {

                    jPanel1 = new javax.swing.JPanel();

                    textSex = new javax.swing.JTextField();

                    textAge = new javax.swing.JTextField();

                    textInitials = new javax.swing.JTextField();

                    textGP = new javax.swing.JTextField();

                    textDateSeen = new javax.swing.JTextField();

                    textSeenByMethod = new javax.swing.JTextField();

                    jLabel1 = new javax.swing.JLabel();

                    jLabel2 = new javax.swing.JLabel();

                    jLabel3 = new javax.swing.JLabel();

                    jLabel4 = new javax.swing.JLabel();

                    jLabel5 = new javax.swing.JLabel();

                    jLabel6 = new javax.swing.JLabel();

                    jScrollPane1 = new javax.swing.JScrollPane();

                    textComplaints = new javax.swing.JTextArea();

                    jScrollPane2 = new javax.swing.JScrollPane();

                    textTreatments = new javax.swing.JTextArea();

                    jLabel7 = new javax.swing.JLabel();

                    jLabel8 = new javax.swing.JLabel();

                    jPanel2 = new javax.swing.JPanel();

                    btnFirst = new javax.swing.JButton();

                    btnPrevious = new javax.swing.JButton();

                    btnNext = new javax.swing.JButton();

                    btnLast = new javax.swing.JButton();

                    textRecordNumber = new javax.swing.JTextField();

                    jLabel9 = new javax.swing.JLabel();

                    jPanel3 = new javax.swing.JPanel();

                    btnUpdateRecord = new javax.swing.JButton();

                    btnDelete = new javax.swing.JButton();

                    btnNewRecord = new javax.swing.JButton();

                    btnSaveRecord = new javax.swing.JButton();

                    btnCancelNewRecord = new javax.swing.JButton();

                    jPanel4 = new javax.swing.JPanel();

                    jScrollPane3 = new javax.swing.JScrollPane();

                    textQueryResult = new javax.swing.JTextArea();

                    jLabel10 = new javax.swing.JLabel();

                    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

                    jLabel1.setText(Date Seen);

                    jLabel2.setText(Initials);

                    jLabel3.setText(Sex);

                    jLabel4.setText(GP);

                    jLabel5.setText(Age);

                    jLabel6.setText(Seen By Method);

                    textComplaints.setColumns(20);

                    textComplaints.setFont(new java.awt.Font(Monospaced, 1, 13)); // NOI18N

                    textComplaints.setLineWrap(true);

                    textComplaints.setRows(5);

                    textComplaints.setWrapStyleWord(true);

                    jScrollPane1.setViewportView(textComplaints);

                    textTreatments.setColumns(20);

                    textTreatments.setFont(new java.awt.Font(Monospaced, 1, 13)); // NOI18N

                    textTreatments.setLineWrap(true);

                    textTreatments.setRows(5);

                    textTreatments.setWrapStyleWord(true);

                    jScrollPane2.setViewportView(textTreatments);

                    jLabel7.setText(Complaints);

                    jLabel8.setText(Treatments);

                    btnFirst.setText(First);

                    btnFirst.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnFirstActionPerformed(evt);

                            }

                    });

                    btnPrevious.setText(Previous);

                    btnPrevious.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnPreviousActionPerformed(evt);

                            }

                    });

                    btnNext.setText(Next);

                    btnNext.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnNextActionPerformed(evt);

                            }

                    });

                    btnLast.setText(Last);

                    btnLast.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnLastActionPerformed(evt);

                            }

                    });

                    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

                    jPanel2.setLayout(jPanel2Layout);

                    jPanel2Layout.setHorizontalGroup(

                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel2Layout.createSequentialGroup()

                                    .addContainerGap()

                                    .addComponent(btnFirst)

                                    .addGap(43, 43, 43)

                                    .addComponent(btnPrevious)

                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                    .addComponent(btnNext)

                                    .addGap(77, 77, 77)

                                    .addComponent(btnLast)

                                    .addGap(40, 40, 40))

                    );

                    jPanel2Layout.setVerticalGroup(

                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel2Layout.createSequentialGroup()

                                    .addGap(28, 28, 28)

                                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                            .addComponent(btnFirst)

                                            .addComponent(btnPrevious)

                                            .addComponent(btnNext)

                                            .addComponent(btnLast))

                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

                    );

                    textRecordNumber.setFont(new java.awt.Font(Tahoma, 1, 12)); // NOI18N

                    textRecordNumber.setName(textRecordNumber); // NOI18N

                    jLabel9.setFont(new java.awt.Font(Tahoma, 1, 12)); // NOI18N

                    jLabel9.setText(Record Number);

                    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

                    jPanel1.setLayout(jPanel1Layout);

                    jPanel1Layout.setHorizontalGroup(

                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel1Layout.createSequentialGroup()

                                    .addGap(24, 24, 24)

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addGroup(jPanel1Layout.createSequentialGroup()

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(textDateSeen, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel1))

                                                    .addGap(18, 18, 18)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addGroup(jPanel1Layout.createSequentialGroup()

                                                                    .addComponent(jLabel9)

                                                                    .addGap(0, 0, Short.MAX_VALUE))

                                                            .addComponent(textRecordNumber))

                                                    .addGap(18, 18, 18)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(textInitials, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel2))

                                                    .addGap(112, 112, 112)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(jLabel3)

                                                            .addComponent(textSex, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))

                                                    .addGap(70, 70, 70))

                                            .addGroup(jPanel1Layout.createSequentialGroup()

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(textGP, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel4))

                                                    .addGap(46, 46, 46)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(textAge, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel5))

                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(textSeenByMethod, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel6))

                                                    .addGap(37, 37, 37))

                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                            .addComponent(jLabel7))

                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                                            .addComponent(jLabel8)

                                                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE))

                                                    .addGap(18, 18, 18))))

                            .addGroup(jPanel1Layout.createSequentialGroup()

                                    .addContainerGap()

                                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

                    );

                    jPanel1Layout.setVerticalGroup(

                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel1Layout.createSequentialGroup()

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addGroup(jPanel1Layout.createSequentialGroup()

                                                    .addGap(6, 6, 6)

                                                    .addComponent(jLabel1))

                                            .addGroup(jPanel1Layout.createSequentialGroup()

                                                    .addContainerGap()

                                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                                            .addComponent(jLabel2)

                                                            .addComponent(jLabel3)))

                                            .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))

                                    .addGap(18, 18, 18)

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                            .addComponent(textSex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(textInitials, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(textDateSeen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(textRecordNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

                                    .addGap(30, 30, 30)

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                            .addComponent(jLabel4)

                                            .addComponent(jLabel5)

                                            .addComponent(jLabel6))

                                    .addGap(18, 18, 18)

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                            .addComponent(textSeenByMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(textAge, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(textGP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

                                                    .addComponent(jLabel8)

                                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))

                                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

                                                    .addComponent(jLabel7)

                                                    .addGap(21, 21, 21)))

                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)

                                            .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))

                                    .addGap(18, 18, 18)

                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addGap(57, 57, 57))

                    );

                    btnUpdateRecord.setText(Update Record);

                    btnUpdateRecord.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnUpdateRecordActionPerformed(evt);

                            }

                    });

                    btnDelete.setText(Delete Record);

                    btnDelete.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnDeleteActionPerformed(evt);

                            }

                    });

                    btnNewRecord.setText(New Record);

                    btnNewRecord.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnNewRecordActionPerformed(evt);

                            }

                    });

                    btnSaveRecord.setText(Save New Record);

                    btnSaveRecord.setEnabled(false);

                    btnSaveRecord.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnSaveRecordActionPerformed(evt);

                            }

                    });

                    btnCancelNewRecord.setText(Cancel New Record);

                    btnCancelNewRecord.setEnabled(false);

                    btnCancelNewRecord.addActionListener(new java.awt.event.ActionListener() {

                            public void actionPerformed(java.awt.event.ActionEvent evt) {

                                    btnCancelNewRecordActionPerformed(evt);

                            }

                    });

                    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);

                    jPanel3.setLayout(jPanel3Layout);

                    jPanel3Layout.setHorizontalGroup(

                            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel3Layout.createSequentialGroup()

                                    .addComponent(btnUpdateRecord)

                                    .addGap(18, 18, 18)

                                    .addComponent(btnDelete)

                                    .addGap(29, 29, 29)

                                    .addComponent(btnNewRecord)

                                    .addGap(18, 18, 18)

                                    .addComponent(btnSaveRecord)

                                    .addGap(18, 18, 18)

                                    .addComponent(btnCancelNewRecord)

                                    .addContainerGap(21, Short.MAX_VALUE))

                    );

                    jPanel3Layout.setVerticalGroup(

                            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel3Layout.createSequentialGroup()

                                    .addGap(20, 20, 20)

                                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                                            .addComponent(btnUpdateRecord)

                                            .addComponent(btnDelete)

                                            .addComponent(btnNewRecord)

                                            .addComponent(btnSaveRecord)

                                            .addComponent(btnCancelNewRecord))

                                    .addContainerGap(19, Short.MAX_VALUE))

                    );

                    textQueryResult.setEditable(false);

                    textQueryResult.setColumns(20);

                    textQueryResult.setFont(new java.awt.Font(Monospaced, 1, 14)); // NOI18N

                    textQueryResult.setLineWrap(true);

                    textQueryResult.setRows(10);

                    textQueryResult.setWrapStyleWord(true);

                    jScrollPane3.setViewportView(textQueryResult);

                    jLabel10.setFont(new java.awt.Font(Tahoma, 1, 14)); // NOI18N

                    jLabel10.setText(Query Result);

                    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);

                    jPanel4.setLayout(jPanel4Layout);

                    jPanel4Layout.setHorizontalGroup(

                            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel4Layout.createSequentialGroup()

                                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addGroup(jPanel4Layout.createSequentialGroup()

                                                    .addContainerGap()

                                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 614, javax.swing.GroupLayout.PREFERRED_SIZE))

                                            .addGroup(jPanel4Layout.createSequentialGroup()

                                                    .addGap(209, 209, 209)

                                                    .addComponent(jLabel10)))

                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

                    );

                    jPanel4Layout.setVerticalGroup(

                            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel4Layout.createSequentialGroup()

                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addGap(18, 18, 18)

                                    .addComponent(jLabel10)

                                    .addContainerGap())

                    );

                    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

                    getContentPane().setLayout(layout);

                    layout.setHorizontalGroup(

                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(layout.createSequentialGroup()

                                    .addContainerGap()

                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                            .addGroup(layout.createSequentialGroup()

                                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                                    .addGap(0, 0, Short.MAX_VALUE))

                                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

                                    .addContainerGap())

                    );

                    layout.setVerticalGroup(

                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(layout.createSequentialGroup()

                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                    .addContainerGap())

                    );

                    pack();

            }//

            private void btnNextActionPerformed(java.awt.event.ActionEvent evt) {

                    // TODO add your handling code here:

                    try{

                            if (rs.next()){

                            String date_seen = rs.getString(DateSeen);

                            String initials = rs.getString(Initials);

                            String sex = rs.getString(Sex);

                            String gp = rs.getString(GP);

                            String age = rs.getString(Age);

                            String complaints = rs.getString(Complaints);

                            String treatments = rs.getString(Treatments);

                            String seen_by_method = rs.getString(SeenByMethod);

                            //DISPLAY THE FIRST RECORD IN THE TEXT FIELDS

                            textDateSeen.setText(date_seen);

                            textInitials.setText(initials);

                            textSex.setText(sex);

                            textGP.setText(gp);

                            textAge.setText(age);

                            textComplaints.setText(complaints);

                            textTreatments.setText(treatments);

                            textSeenByMethod.setText(seen_by_method);

                            NextRecordNumber();

                            }

                            else {

                                    rs.previous();

                                    JOptionPane.showMessageDialog(YearlyOncall.this, End of File);

                            }

                    }

                    catch (SQLException err) {

                            JOptionPane.showMessageDialog(YearlyOncall.this, err.getMessage());

                    }

            }

            private void btnPreviousActionPerformed(java.awt.event.ActionEvent evt) {

                    // TODO add your handling code here:

                    try{

                            if (rs.previous()){

                            String date_seen = rs.getString(DateSeen);

                            String initials = rs.getString(Initials);

                            String sex = rs.getString(Sex);

                            String gp = rs.getString(GP);

                            String age = rs.getString(Age);

                            String complaints = rs.getString(Complaints);

                            String treatments = rs.getString(Treatments);

                            String seen_by_method = rs.getString(SeenByMethod);

                            //DISPLAY THE FIRST RECORD IN THE TEXT FIELDS

                            textDateSeen.setText(date_seen);

                            textInitials.setText(initials);

                            textSex.setText(sex);

                            textGP.setText(gp);

                            textAge.setText(age);

                            textComplaints.setText(complaints);

                            textTreatments.setText(treatments);

                            textSeenByMethod.setText(seen_by_method);

                            PreviousRecordNumber();

                            }

                            else {

                                    rs.next();

                                    JOptionPane.showMessageDialog(YearlyOncall.this, Start of File);

                            }

                    }

                    catch (SQLException err) {

                            JOptionPane.showMessageDialog(YearlyOncall.this, err.getMessage());

                    }

            }

            private void QueryResult(){

              String[] sqlResult = new String[48];

              String[] query = new String[48];

            try {

                        for (int m = 0; m != (47); m++){

    sqlResult[0] = All consultations seen out of hours in 1997 and 1998 and shows their abbreviated complaints (First 15 letters of their complaints).;

    query[0] = Select DateSeen, Initials, Sex, GP, Age, SUBSTRING(Complaints, 1, 15) AS Complaints, Treatments, SeenByMethod FROM oncall1998 UNION SELECT DateSeen, Initials, Sex, GP, Age, SUBSTRING(Complaints, 1, 15) AS Complaints, Treatments, SeenByMethod FROM oncall1997;

    sqlResult[1] = All consultations seen out of hours in 1997 and 1998 and do not have referred In their notes but not seen In the month Of January In both years. ;

    query[1] = "Select * FROM oncall1998 WHERE Treatments Not Like ‘%refer%’ AND DateSeen

    Enjoying the preview?
    Page 1 of 1
    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy