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

Only $11.99/month after trial. Cancel anytime.

The Making of a Doctor
The Making of a Doctor
The Making of a Doctor
Ebook1,344 pages16 hours

The Making of a Doctor

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Part Two of Visual Basic.Net coding formulated by Segun using hundreds of pre-defined SQL queries to query (or question) the GP databases created by Segun, the physician, from his Consultations.
LanguageEnglish
Release dateNov 9, 2021
ISBN9781982284732
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 © 2021 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-8471-8 (sc)

    ISBN: 978-1-9822-8472-5 (hc)

    ISBN: 978-1-9822-8473-2 (e)

    Balboa Press rev. date:     11/05/2021

    CONTENTS

    Dedication

    Appreciation

    AIM

    Introduction

    Experience of a solo GP (virtually) Practice in suburban England (Visual Basic.Net coding) Part 2

    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.

    99415.png

    Experience of a solo

    GP (virtually) Practice

    in suburban England

    (Visual Basic.Net coding)

    Part 2

    ‘SETTING OUT THE DATA IN THE sqlquery ARRAY & PICKING THE APPROPRIATE ONE

    query(0) = SELECT * FROM January2007 WHERE Notes LIKE ‘%c%’

    query(1) = SELECT * FROM (SELECT * FROM January2007 UNION SELECT * FROM January2008)

    query(2) = SELECT TOP 10 * FROM January2007 WHERE Diagnosis IN (SELECT Diagnosis FROM January2008 ORDER BY Diagnosis)

    query(3) = SELECT * FROM January2007 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(4) = SELECT * FROM January2007 WHERE Complaints IN (SELECT Complaints FROM January2008)

    query(5) = SELECT * FROM January2007 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(6) = Select * FROM January2007 WHERE SurgeryDate BETWEEN ‘01.01.07’ AND ‘08.01.07’

    query(7) = SELECT * FROM January2007 WHERE SurgeryDate BETWEEN ‘08.01.07’ AND ‘15.01.07’

    query(8) = SELECT * FROM January2007 WHERE SurgeryDate BETWEEN ‘15.01.07’ AND ‘22.01.07’

    query(9) = SELECT * FROM January2007 WHERE SurgeryDate BETWEEN ‘22.01.07’ AND ‘32.01.07’

    query(10) = SELECT * FROM January2007 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2008 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(11) = SELECT * FROM January2007 A WHERE EXISTS (SELECT * FROM January2008 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(12) = SELECT * FROM January2007 WHERE Diagnosis IN (SELECT Diagnosis FROM January2008)

    query(13) = SELECT * FROM January2007 WHERE Treatments IN (SELECT Treatments FROM January2008 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(14) = SELECT * FROM January2007 WHERE Complaints IN (SELECT Complaints FROM January2008)

    query(15) = SELECT * FROM January2007 WHERE Complaints IN (SELECT Complaints FROM January2008 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(16) = SELECT * FROM January2007 WHERE Diagnosis IN (SELECT Diagnosis FROM January2008)

    query(17) = SELECT * FROM January2007 UNION SELECT * FROM January2008

    query(18) = SELECT * FROM (SELECT * FROM January2007 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2008 WHERE Diagnosis = ‘URTI’)

    query(19) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2007

    query(20) = SELECT TOP 50 * FROM January2007 ORDER BY TimeOut DESC

    query(21) = SELECT TOP 20 * FROM January2007 ORDER BY TimeIn

    query(22) = SELECT * FROM January2008 WHERE Notes LIKE ‘%c%’

    query(23) = SELECT * FROM (SELECT * FROM January2008 UNION SELECT * FROM January2009)

    query(24) = SELECT TOP 10 * FROM January2008 WHERE Diagnosis IN (SELECT Diagnosis FROM January2009 ORDER BY Diagnosis)

    query(25) = SELECT * FROM January2008 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(26) = SELECT * FROM January2008 WHERE Complaints IN (SELECT Complaints FROM January2009)

    query(27) = SELECT * FROM January2008 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(28) = Select * FROM January2008 WHERE SurgeryDate BETWEEN ‘01.01.08’ AND ‘08.01.08’

    query(29) = SELECT * FROM January2008 WHERE SurgeryDate BETWEEN ‘08.01.08’ AND ‘15.01.08’

    query(30) = SELECT * FROM January2008 WHERE SurgeryDate BETWEEN ‘15.01.08’ AND ‘22.01.08’

    query(31) = SELECT * FROM January2008 WHERE SurgeryDate BETWEEN ‘22.01.08’ AND ‘32.01.08’

    query(32) = SELECT * FROM January2008 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2009 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(33) = SELECT * FROM January2008 A WHERE EXISTS (SELECT * FROM January2009 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(34) = SELECT * FROM January2008 WHERE Diagnosis IN (SELECT Diagnosis FROM January2009)

    query(35) = SELECT * FROM January2008 WHERE Treatments IN (SELECT Treatments FROM January2009 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(36) = SELECT * FROM January2008 WHERE Complaints IN (SELECT Complaints FROM January2009)

    query(37) = SELECT * FROM January2008 WHERE Complaints IN (SELECT Complaints FROM January2009 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(38) = SELECT * FROM January2008 WHERE Diagnosis IN (SELECT Diagnosis FROM January2009)

    query(39) = SELECT * FROM January2008 UNION SELECT * FROM January2009

    query(40) = SELECT * FROM (SELECT * FROM January2008 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2009 WHERE Diagnosis = ‘URTI’)

    query(41) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2008

    query(42) = SELECT TOP 50 * FROM January2008 ORDER BY TimeOut DESC

    query(43) = SELECT TOP 20 * FROM January2008 ORDER BY TimeIn

    query(44) = SELECT * FROM January2009 WHERE Notes LIKE ‘%c%’

    query(45) = SELECT * FROM (SELECT * FROM January2009 UNION SELECT * FROM January2010)

    query(46) = SELECT TOP 10 * FROM January2009 WHERE Diagnosis IN (SELECT Diagnosis FROM January2010 ORDER BY Diagnosis)

    query(47) = SELECT * FROM January2009 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(48) = SELECT * FROM January2009 WHERE Complaints IN (SELECT Complaints FROM January2010)

    query(49) = SELECT * FROM January2009 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(50) = Select * FROM January2009 WHERE SurgeryDate BETWEEN ‘01.01.09’ AND ‘08.01.09’

    query(51) = SELECT * FROM January2009 WHERE SurgeryDate BETWEEN ‘08.01.09’ AND ‘15.01.09’

    query(52) = SELECT * FROM January2009 WHERE SurgeryDate BETWEEN ‘15.01.09’ AND ‘22.01.09’

    query(53) = SELECT * FROM January2009 WHERE SurgeryDate BETWEEN ‘22.01.09’ AND ‘32.01.09’

    query(54) = SELECT * FROM January2009 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2010 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(55) = SELECT * FROM January2009 A WHERE EXISTS (SELECT * FROM January2010 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(56) = SELECT * FROM January2009 WHERE Diagnosis IN (SELECT Diagnosis FROM January2010)

    query(57) = SELECT * FROM January2009 WHERE Treatments IN (SELECT Treatments FROM January2010 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(58) = SELECT * FROM January2009 WHERE Complaints IN (SELECT Complaints FROM January2010)

    query(59) = SELECT * FROM January2009 WHERE Complaints IN (SELECT Complaints FROM January2010 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(60) = SELECT * FROM January2009 WHERE Diagnosis IN (SELECT Diagnosis FROM January2010)

    query(61) = SELECT * FROM January2009 UNION SELECT * FROM January2010

    query(62) = SELECT * FROM (SELECT * FROM January2009 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2010 WHERE Diagnosis = ‘URTI’)

    query(63) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2009

    query(64) = SELECT TOP 50 * FROM January2009 ORDER BY TimeOut DESC

    query(65) = SELECT TOP 20 * FROM January2009 ORDER BY TimeIn

    query(66) = SELECT * FROM January2010 WHERE Notes LIKE ‘%c%’

    query(67) = SELECT * FROM (SELECT * FROM January2010 UNION SELECT * FROM January2011)

    query(68) = SELECT TOP 10 * FROM January2010 WHERE Diagnosis IN (SELECT Diagnosis FROM January2011 ORDER BY Diagnosis)

    query(69) = SELECT * FROM January2010 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(70) = SELECT * FROM January2010 WHERE Complaints IN (SELECT Complaints FROM January2011)

    query(71) = SELECT * FROM January2010 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(72) = Select * FROM January2010 WHERE SurgeryDate BETWEEN ‘01.01.10’ AND ‘08.01.10’

    query(73) = SELECT * FROM January2010 WHERE SurgeryDate BETWEEN ‘08.01.10’ AND ‘15.01.10’

    query(74) = SELECT * FROM January2010 WHERE SurgeryDate BETWEEN ‘15.01.10’ AND ‘22.01.10’

    query(75) = SELECT * FROM January2010 WHERE SurgeryDate BETWEEN ‘22.01.10’ AND ‘32.01.10’

    query(76) = SELECT * FROM January2010 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2011 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(77) = SELECT * FROM January2010 A WHERE EXISTS (SELECT * FROM January2011 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(78) = SELECT * FROM January2010 WHERE Diagnosis IN (SELECT Diagnosis FROM January2011)

    query(79) = SELECT * FROM January2010 WHERE Treatments IN (SELECT Treatments FROM January2011 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(80) = SELECT * FROM January2010 WHERE Complaints IN (SELECT Complaints FROM January2011)

    query(81) = SELECT * FROM January2010 WHERE Complaints IN (SELECT Complaints FROM January2011 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(82) = SELECT * FROM January2010 WHERE Diagnosis IN (SELECT Diagnosis FROM January2011)

    query(83) = SELECT * FROM January2010 UNION SELECT * FROM January2011

    query(84) = SELECT * FROM (SELECT * FROM January2010 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2011 WHERE Diagnosis = ‘URTI’)

    query(85) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2010

    query(86) = SELECT TOP 50 * FROM January2010 ORDER BY TimeOut DESC

    query(87) = SELECT TOP 20 * FROM January2010 ORDER BY TimeIn

    query(88) = SELECT * FROM January2011 WHERE Notes LIKE ‘%c%’

    query(89) = SELECT * FROM (SELECT * FROM January2011 UNION SELECT * FROM January2012)

    query(90) = SELECT TOP 10 * FROM January2011 WHERE Diagnosis IN (SELECT Diagnosis FROM January2012 ORDER BY Diagnosis)

    query(91) = SELECT * FROM January2011 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(92) = SELECT * FROM January2011 WHERE Complaints IN (SELECT Complaints FROM January2012)

    query(93) = SELECT * FROM January2011 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(94) = Select * FROM January2011 WHERE SurgeryDate BETWEEN ‘01.01.11’ AND ‘08.01.11’

    query(95) = SELECT * FROM January2011 WHERE SurgeryDate BETWEEN ‘08.01.11’ AND ‘15.01.11’

    query(96) = SELECT * FROM January2011 WHERE SurgeryDate BETWEEN ‘15.01.11’ AND ‘22.01.11’

    query(97) = SELECT * FROM January2011 WHERE SurgeryDate BETWEEN ‘22.01.11’ AND ‘32.01.11’

    query(98) = SELECT * FROM January2011 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2012 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(99) = SELECT * FROM January2011 A WHERE EXISTS (SELECT * FROM January2012 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(100) = SELECT * FROM January2011 WHERE Diagnosis IN (SELECT Diagnosis FROM January2012)

    query(101) = SELECT * FROM January2011 WHERE Treatments IN (SELECT Treatments FROM January2012 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(102) = SELECT * FROM January2011 WHERE Complaints IN (SELECT Complaints FROM January2012)

    query(103) = SELECT * FROM January2011 WHERE Complaints IN (SELECT Complaints FROM January2012 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(104) = SELECT * FROM January2011 WHERE Diagnosis IN (SELECT Diagnosis FROM January2012)

    query(105) = SELECT * FROM January2011 UNION SELECT * FROM January2012

    query(106) = SELECT * FROM (SELECT * FROM January2011 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2012 WHERE Diagnosis = ‘URTI’)

    query(107) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2011

    query(108) = SELECT TOP 50 * FROM January2011 ORDER BY TimeOut DESC

    query(109) = SELECT TOP 20 * FROM January2011 ORDER BY TimeIn

    query(110) = SELECT * FROM January2012 WHERE Notes LIKE ‘%c%’

    query(111) = SELECT * FROM (SELECT * FROM January2012 UNION SELECT * FROM January2013)

    query(112) = SELECT TOP 10 * FROM January2012 WHERE Diagnosis IN (SELECT Diagnosis FROM January2013 ORDER BY Diagnosis)

    query(113) = SELECT * FROM January2012 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(114) = SELECT * FROM January2012 WHERE Complaints IN (SELECT Complaints FROM January2013)

    query(115) = SELECT * FROM January2012 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(116) = Select * FROM January2012 WHERE SurgeryDate BETWEEN ‘01.01.12’ AND ‘08.01.12’

    query(117) = SELECT * FROM January2012 WHERE SurgeryDate BETWEEN ‘08.01.12’ AND ‘15.01.12’

    query(118) = SELECT * FROM January2012 WHERE SurgeryDate BETWEEN ‘15.01.12’ AND ‘22.01.12’

    query(119) = SELECT * FROM January2012 WHERE SurgeryDate BETWEEN ‘22.01.12’ AND ‘32.01.12’

    query(120) = SELECT * FROM January2012 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2013 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(121) = SELECT * FROM January2012 A WHERE EXISTS (SELECT * FROM January2013 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(122) = SELECT * FROM January2012 WHERE Diagnosis IN (SELECT Diagnosis FROM January2013)

    query(123) = SELECT * FROM January2012 WHERE Treatments IN (SELECT Treatments FROM January2013 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(124) = SELECT * FROM January2012 WHERE Complaints IN (SELECT Complaints FROM January2013)

    query(125) = SELECT * FROM January2012 WHERE Complaints IN (SELECT Complaints FROM January2013 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(126) = SELECT * FROM January2012 WHERE Diagnosis IN (SELECT Diagnosis FROM January2013)

    query(127) = SELECT * FROM January2012 UNION SELECT * FROM January2013

    query(128) = SELECT * FROM (SELECT * FROM January2012 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2013 WHERE Diagnosis = ‘URTI’)

    query(129) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2012

    query(130) = SELECT TOP 50 * FROM January2012 ORDER BY TimeOut DESC

    query(131) = SELECT TOP 20 * FROM January2012 ORDER BY TimeIn

    query(132) = SELECT * FROM January2013 WHERE Notes LIKE ‘%c%’

    query(133) = SELECT * FROM (SELECT * FROM January2013 UNION SELECT * FROM January2014)

    query(134) = SELECT TOP 10 * FROM January2013 WHERE Diagnosis IN (SELECT Diagnosis FROM January2014 ORDER BY Diagnosis)

    query(135) = SELECT * FROM January2013 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(136) = SELECT * FROM January2013 WHERE Complaints IN (SELECT Complaints FROM January2014)

    query(137) = SELECT * FROM January2013 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(138) = Select * FROM January2013 WHERE SurgeryDate BETWEEN ‘01.01.13’ AND ‘08.01.13’

    query(139) = SELECT * FROM January2013 WHERE SurgeryDate BETWEEN ‘08.01.13’ AND ‘15.01.13’

    query(140) = SELECT * FROM January2013 WHERE SurgeryDate BETWEEN ‘15.01.13’ AND ‘22.01.13’

    query(141) = SELECT * FROM January2013 WHERE SurgeryDate BETWEEN ‘22.01.13’ AND ‘32.01.13’

    query(142) = SELECT * FROM January2013 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2014 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(143) = SELECT * FROM January2013 A WHERE EXISTS (SELECT * FROM January2014 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(144) = SELECT * FROM January2013 WHERE Diagnosis IN (SELECT Diagnosis FROM January2014)

    query(145) = SELECT * FROM January2013 WHERE Treatments IN (SELECT Treatments FROM January2014 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(146) = SELECT * FROM January2013 WHERE Complaints IN (SELECT Complaints FROM January2014)

    query(147) = SELECT * FROM January2013 WHERE Complaints IN (SELECT Complaints FROM January2014 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(148) = SELECT * FROM January2013 WHERE Diagnosis IN (SELECT Diagnosis FROM January2014)

    query(149) = SELECT * FROM January2013 UNION SELECT * FROM January2014

    query(150) = SELECT * FROM (SELECT * FROM January2013 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2014 WHERE Diagnosis = ‘URTI’)

    query(151) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2013

    query(152) = SELECT TOP 50 * FROM January2013 ORDER BY TimeOut DESC

    query(153) = SELECT TOP 20 * FROM January2013 ORDER BY TimeIn

    query(154) = SELECT * FROM January2014 WHERE Notes LIKE ‘%c%’

    query(155) = SELECT * FROM (SELECT * FROM January2014 UNION SELECT * FROM January2015)

    query(156) = SELECT TOP 10 * FROM January2014 WHERE Diagnosis IN (SELECT Diagnosis FROM January2015 ORDER BY Diagnosis)

    query(157) = SELECT * FROM January2014 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(158) = SELECT * FROM January2014 WHERE Complaints IN (SELECT Complaints FROM January2015)

    query(159) = SELECT * FROM January2014 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(160) = Select * FROM January2014 WHERE SurgeryDate BETWEEN ‘01.01.14’ AND ‘08.01.14’

    query(161) = SELECT * FROM January2014 WHERE SurgeryDate BETWEEN ‘08.01.14’ AND ‘15.01.14’

    query(162) = SELECT * FROM January2014 WHERE SurgeryDate BETWEEN ‘15.01.14’ AND ‘22.01.14’

    query(163) = SELECT * FROM January2014 WHERE SurgeryDate BETWEEN ‘22.01.14’ AND ‘32.01.14’

    query(164) = SELECT * FROM January2014 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2015 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(165) = SELECT * FROM January2014 A WHERE EXISTS (SELECT * FROM January2015 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(166) = SELECT * FROM January2014 WHERE Diagnosis IN (SELECT Diagnosis FROM January2015)

    query(167) = SELECT * FROM January2014 WHERE Treatments IN (SELECT Treatments FROM January2015 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(168) = SELECT * FROM January2014 WHERE Complaints IN (SELECT Complaints FROM January2015)

    query(169) = SELECT * FROM January2014 WHERE Complaints IN (SELECT Complaints FROM January2015 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(170) = SELECT * FROM January2014 WHERE Diagnosis IN (SELECT Diagnosis FROM January2015)

    query(171) = SELECT * FROM January2014 UNION SELECT * FROM January2015

    query(172) = SELECT * FROM (SELECT * FROM January2014 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2015 WHERE Diagnosis = ‘URTI’)

    query(173) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2014

    query(174) = SELECT TOP 50 * FROM January2014 ORDER BY TimeOut DESC

    query(175) = SELECT TOP 20 * FROM January2014 ORDER BY TimeIn

    query(176) = SELECT * FROM January2015 WHERE Notes LIKE ‘%c%’

    query(177) = SELECT * FROM (SELECT * FROM January2015 UNION SELECT * FROM January2007)

    query(178) = SELECT TOP 10 * FROM January2015 WHERE Diagnosis IN (SELECT Diagnosis FROM January2007 ORDER BY Diagnosis)

    query(179) = SELECT * FROM January2015 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(180) = SELECT * FROM January2015 WHERE Complaints IN (SELECT Complaints FROM January2007)

    query(181) = SELECT * FROM January2015 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(182) = Select * FROM January2015 WHERE SurgeryDate BETWEEN ‘01.01.15’ AND ‘08.01.15’

    query(183) = SELECT * FROM January2015 WHERE SurgeryDate BETWEEN ‘08.01.15’ AND ‘15.01.15’

    query(184) = SELECT * FROM January2015 WHERE SurgeryDate BETWEEN ‘15.01.15’ AND ‘22.01.15’

    query(185) = SELECT * FROM January2015 WHERE SurgeryDate BETWEEN ‘22.01.15’ AND ‘32.01.15’

    query(186) = SELECT * FROM January2015 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM January2007 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(187) = SELECT * FROM January2015 A WHERE EXISTS (SELECT * FROM January2007 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(188) = SELECT * FROM January2015 WHERE Diagnosis IN (SELECT Diagnosis FROM January2007)

    query(189) = SELECT * FROM January2015 WHERE Treatments IN (SELECT Treatments FROM January2007 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(190) = SELECT * FROM January2015 WHERE Complaints IN (SELECT Complaints FROM January2007)

    query(191) = SELECT * FROM January2015 WHERE Complaints IN (SELECT Complaints FROM January2007 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(192) = SELECT * FROM January2015 WHERE Diagnosis IN (SELECT Diagnosis FROM January2007)

    query(193) = SELECT * FROM January2015 UNION SELECT * FROM January2007

    query(194) = SELECT * FROM (SELECT * FROM January2015 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM January2007 WHERE Diagnosis = ‘URTI’)

    query(195) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM January2015

    query(196) = SELECT TOP 50 * FROM January2015 ORDER BY TimeOut DESC

    query(197) = SELECT TOP 20 * FROM January2015 ORDER BY TimeIn

    key_data_sqlResult = sqlResult(m)

    key_data_query = query(m)

    Next m

    ‘PASS THE SQL STRING AND CONNECTION OBJECT TO THE DATA_ADAPTER

    da = New OleDb.OleDbDataAdapter(key_data_query, con)

    ‘FILL THE DATASET WITH RECORDS FROM THE DATABASE TABLE

    da.Fill(ds, January_Consultations)

    ‘CLOSE THE DATABASE

    con.Close()

    ‘GET HOW MANY ROWS ARE IN THE DATABASE TABLE

    MaxRows = ds.Tables(January_Consultations).Rows.Count

    ‘SET A VAUE FOR THE INC VARIABLE

    inc = -1

    End Sub

    Private Sub RecordNumber()

    txtRecordNumber.Text = (Record & (inc + 1) & of & MaxRows & Records)

    End Sub

    Private Sub NavigateRecords()

    txtSurgeryDate.Text = ds.Tables(January_Consultations).Rows(inc).Item(0)

    txtDateOfBirth.Text = ds.Tables(January_Consultations).Rows(inc).Item(1)

    txtSex.Text = ds.Tables(January_Consultations).Rows(inc).Item(2)

    If IsDBNull(ds.Tables(January_Consultations).Rows(inc).Item(3)) = True Then

    txtDiagnosis.Text =

    Else

    txtDiagnosis.Text = ds.Tables(January_Consultations).Rows(inc).Item(3)

    End If

    ‘txtDiagnosis.Text = ds.Tables(April_Consultations).Rows(inc).Item(3)

    txtTimeIn.Text = ds.Tables(January_Consultations).Rows(inc).Item(4)

    txtTimeOut.Text = ds.Tables(January_Consultations).Rows(inc).Item(5)

    If IsDBNull(ds.Tables(January_Consultations).Rows(inc).Item(6)) = True Then

    txtComplaints.Text =

    Else

    txtComplaints.Text = ds.Tables(January_Consultations).Rows(inc).Item(6)

    End If

    ‘txtComplaints.Text = ds.Tables(January_Consultations).Rows(inc).Item(6)

    If IsDBNull(ds.Tables(January_Consultations).Rows(inc).Item(7)) = True Then

    txtTreatments.Text =

    Else

    txtTreatments.Text = ds.Tables(January_Consultations).Rows(inc).Item(7)

    End If

    ‘txtTreatments.Text = ds.Tables(January_Consultations).Rows(inc).Item(7)

    If IsDBNull(ds.Tables(January_Consultations).Rows(inc).Item(8)) = True Then

    txtInitials.Text =

    Else

    txtInitials.Text = ds.Tables(January_Consultations).Rows(inc).Item(8)

    End If

    ‘txtInitials.Text = ds.Tables(January_Consultations).Rows(inc).Item(8)

    If IsDBNull(ds.Tables(January_Consultations).Rows(inc).Item(9)) = True Then

    txtNotes.Text =

    Else

    txtNotes.Text = ds.Tables(January_Consultations).Rows(inc).Item(9)

    End If

    ‘txtNotes.Text = ds.Tables(January_Consultations).Rows(inc).Item(9)

    RecordNumber()

    QueryResult()

    End Sub

    Private Sub btnNext_Click(sender As Object, e As EventArgs) Handles btnNext.Click

    If inc <> MaxRows - 1 Then

    inc = inc + 1

    NavigateRecords()

    Else

    MessageBox.Show(No More Rows)

    MessageBox.Show(The result of the query is + key_data_sqlResult)

    End If

    End Sub

    Private Sub btnPrevious_Click(sender As Object, e As EventArgs) Handles btnPrevious.Click

    If inc > 0 Then

    inc = inc - 1

    NavigateRecords()

    ElseIf inc = -1 Then

    MessageBox.Show(No Records Yet)

    ElseIf inc = 0 Then

    MessageBox.Show(First Record)

    End If

    End Sub

    Private Sub btnLast_Click(sender As Object, e As EventArgs) Handles btnLast.Click

    If inc <> MaxRows - 1 Then

    inc = MaxRows - 1

    NavigateRecords()

    End If

    End Sub

    Private Sub btnFirst_Click(sender As Object, e As EventArgs) Handles btnFirst.Click

    If inc <> 0 Then

    inc = 0

    NavigateRecords()

    End If

    End Sub

    Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    If inc = -1 Then

    MessageBox.Show(No Record to be updated)

    Else

    ds.Tables(January_Consultations).Rows(inc).Item(0) = txtSurgeryDate.Text

    ds.Tables(January_Consultations).Rows(inc).Item(1) = txtDateOfBirth.Text

    ds.Tables(January_Consultations).Rows(inc).Item(2) = txtSex.Text

    If IsDBNull(txtDiagnosis.Text) = True Then

    ds.Tables(January_Consultations).Rows(inc).Item(3) =

    Else

    ds.Tables(January_Consultations).Rows(inc).Item(3) = txtDiagnosis.Text

    End If

    ds.Tables(January_Consultations).Rows(inc).Item(4) = txtTimeIn.Text

    ds.Tables(January_Consultations).Rows(inc).Item(5) = txtTimeOut.Text

    If IsDBNull(txtComplaints.Text) = True Then

    ds.Tables(January_Consultations).Rows(inc).Item(6) =

    Else

    ds.Tables(January_Consultations).Rows(inc).Item(6) = txtComplaints.Text

    End If

    If IsDBNull(txtTreatments.Text) = True Then

    ds.Tables(January_Consultations).Rows(inc).Item(7) =

    Else

    ds.Tables(January_Consultations).Rows(inc).Item(7) = txtTreatments.Text

    End If

    ds.Tables(January_Consultations).Rows(inc).Item(8) = txtInitials.Text

    If IsDBNull(txtNotes.Text) = True Then

    ds.Tables(January_Consultations).Rows(inc).Item(9) =

    Else

    ds.Tables(January_Consultations).Rows(inc).Item(9) = txtNotes.Text

    da.Update(ds, January_Consultations)

    MessageBox.Show(Data updated)

    End If

    End If

    End Sub

    Private Sub btnAddNew_Click(sender As Object, e As EventArgs) Handles btnAddNew.Click

    btnCommit.Enabled = True

    btnAddNew.Enabled = False

    btnUpdate.Enabled = False

    btnDelete.Enabled = False

    txtSurgeryDate.Clear()

    txtDateOfBirth.Clear()

    txtSex.Clear()

    txtDiagnosis.Clear()

    txtTimeIn.Clear()

    txtTimeOut.Clear()

    txtComplaints.Clear()

    txtTreatments.Clear()

    txtInitials.Clear()

    txtNotes.Clear()

    txtRecordNumber.Clear()

    End Sub

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

    btnCommit.Enabled = False

    btnAddNew.Enabled = True

    btnUpdate.Enabled = True

    btnDelete.Enabled = True

    inc = 0

    NavigateRecords()

    End Sub

    Private Sub btnCommit_Click(sender As Object, e As EventArgs) Handles btnCommit.Click

    If inc <> -1 Then

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    Dim dsNewRow As DataRow

    dsNewRow = ds.Tables(January_Consultations).NewRow()

    dsNewRow.Item(SurgeryDate) = txtSurgeryDate.Text

    dsNewRow.Item(DateOfBirth) = txtDateOfBirth.Text

    dsNewRow.Item(Sex) = txtSex.Text

    dsNewRow.Item(Diagnosis) = txtDiagnosis.Text

    dsNewRow.Item(TimeIn) = txtTimeIn.Text

    dsNewRow.Item(TimeOut) = txtTimeOut.Text

    dsNewRow.Item(Complaints) = txtComplaints.Text

    dsNewRow.Item(Treatments) = txtTreatments.Text

    ‘dsNewRow.Item(NumbersID) = txtNumbersID.Text

    dsNewRow.Item(Initials) = txtInitials.Text

    dsNewRow.Item(Notes) = txtNotes.Text

    ds.Tables(January_Consultations).Rows.Add(dsNewRow)

    da.Update(ds, January_Consultations)

    MessageBox.Show(New Record added to the Database)

    btnCommit.Enabled = False

    btnAddNew.Enabled = True

    btnUpdate.Enabled = True

    btnDelete.Enabled = True

    End If

    End Sub

    Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click

    If MessageBox.Show(Do you really want to Delete this Record?, Delete, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then

    MessageBox.Show(Operation Cancelled)

    Exit Sub

    End If

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    ds.Tables(January_Consultations).Rows(inc).Delete()

    MaxRows = MaxRows - 1

    inc = 0

    da.Update(ds, January_Consultations)

    NavigateRecords()

    End Sub

    Private Sub QueryResult()

    txtQueryResult.Text = (Record & (inc + 1) & of & key_data_sqlResult)

    End Sub

    End Class

    January 1997 to January 2006 Surgery Consultations Form1

    Public Class Form1

    Dim SecondForm As New Form2

    Public Shared ComboText As String

    Public Shared qryPresent As Boolean

    Public Shared sqlQuestion(219) ‘DECLARES sqlQuestion array.

    Public Shared query(219) As String ‘DECLARES query array.

    Public Shared sqlResult(219) As String ‘DECLARES sqlResult array.

    Public Shared cb As ComboBox

    Dim qryA As String

    Dim QueryResult1 As String

    Dim MaxRows As Integer

    Dim inc As Integer

    Dim m As Integer

    Dim i As Integer

    Dim z As Integer

    Dim n As Integer

    Dim key_data_sqlResult As String ‘DECLARES THE VARIABLE key_data_query.

    Dim key_data_query As String ‘DECLARES THE VARIABLE key_sqlResult.

    Dim con As New OleDb.OleDbConnection ‘THE CONNECTION OBJECT

    Dim dbProvider As String ‘HOLDS THE PROVIDER

    Dim dbSource As String ‘HOLDS THE DATA SOURCE

    Dim MyDocumentsFolder As String ‘HOLDS THE DOCUMENTS FOLDER

    Dim TheDatabase As String ‘HOLDS THE DATABASE NAME

    Dim FullDatabasePath As String ‘HOLDS THE DATABASE PATH

    Dim ds As New DataSet ‘HOLDS A DataSet OBJECT

    Dim da As OleDb.OleDbDataAdapter ‘HOLDS A DataAdapter OBJECT

    Dim sql As String ‘HOLDS A SQL STRING

    ‘STORE QUERY RESULTS

    ‘sqlResult(0) = Patients seen in January 1997 whose notes entries began with the letter ‘C’

    ‘sqlResult(1) = Patients seen in January 1997 and in January 1998.

    ‘sqlResult(2) = Patients seen in January 1997 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 1997 and have similar diagnosis in January 1998

    ‘sqlResult(3) = The appointments before 1050 hours and after 1730 hours in January 1997.

    ‘sqlResult(4) = Patients seen in January 1997 who have similar complaints as those seen in January 1998

    ‘sqlResult(5) = Patients referred in January 1997.

    ‘sqlResult(6) = Patients seen in the first week of January 1997.

    ‘sqlResult(7) = Patients seen in the second week of January 1997.

    ‘sqlResult(8) = Patients seen in the third week of January 1997.

    ‘sqlResult(9) = Patients seen from the 22nd to the end of January 1997.

    ‘sqlResult(10) = Patients seen in January 1997 who had similarly entered complaints and similarly entered treatments in both months, January 1997 and January 1998, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(11) = Patients seen in January 1997 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 1998.

    ‘sqlResult(12) = Patients seen in January 1997 who had similarly entered diagnosis as those seen in January 1998

    ‘sqlResult(13) = Patients seen in January 1997 who have similar entries under treatments as the consultations seen in January 1998 with both years of consultations having had entries under Notes

    ‘sqlResult(14) = Patients seen in January 1997 who have similar complaints as those seen in January 1998

    ‘sqlResult(15) = Patients seen in January 1997 who had similarly complaints entries as those seen in January 1998, both having consultation time of more than 10 minutes.

    ‘sqlResult(16) = Patients seen in January 1997 who had similarly entered diagnosis as those seen in January 1998.

    ‘sqlResult(17) = Patients seen in January 1997 and January 1998.

    ‘sqlResult(18) = Patients seen in January 1997 who had entries of URTI under Diagnosis and patients seen in January 1998 who also had similar entries under Diagnosis.

    ‘sqlResult(19) = Patients seen in January 1997 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(20) = The last fifty seen appointments in January 1997.

    ‘sqlResult(21) = First twenty appointments in January 1997.

    ‘sqlResult(22) = Patients seen in January 1998 whose notes entries began with the letter ‘C’

    ‘sqlResult(23) = Patients seen in January 1998 and in January 1999.

    ‘sqlResult(24) = Patients seen in January 1998 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 1998 and have similar diagnosis in January 1999

    ‘sqlResult(25) = The appointments before 1050 hours and after 1730 hours in January 1998.

    ‘sqlResult(26) = Patients seen in January 1998 who have similar complaints as those seen in January 1999

    ‘sqlResult(27) = Patients referred in January 1998.

    ‘sqlResult(28) = Patients seen in the first week of January 1998.

    ‘sqlResult(29) = Patients seen in the second week of January 1998.

    ‘sqlResult(30) = Patients seen in the third week of January 1998.

    ‘sqlResult(31) = Patients seen from the 22nd to the end of January 1998.

    ‘sqlResult(32) = Patients seen in January 1998 who had similarly entered complaints and similarly entered treatments in both months, January 1998 and January 1999, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(33) = Patients seen in January 1998 who had similarly entered notes, similarly entered treatments Or similarly entered date of births in January 1999.

    ‘sqlResult(34) = Patients seen in January 1998 who had similarly entered diagnosis as those seen in January 1999

    ‘sqlResult(35) = Patients seen in January 1998 who have similar entries under treatments as the consultations seen in January 1999 with both years of consultations having had entries under Notes

    ‘sqlResult(36) = Patients seen in January 1998 who have similar complaints as those seen in January 1999

    ‘sqlResult(37) = Patients seen in January 1998 who had similarly complaints entries as those seen in January 1999, both having consultation time of more than 10 minutes.

    ‘sqlResult(38) = Patients seen in January 1998 who had similarly entered diagnosis as those seen in January 1999.

    ‘sqlResult(39) = Patients seen in January 1998 And January 1999.

    ‘sqlResult(40) = Patients seen in January 1998 who had entries of URTI under Diagnosis And patients seen in January 1999 who also had similar entries under Diagnosis.

    ‘sqlResult(41) = Patients seen in January 1998 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(42) = The last fifty seen appointments in January 1998.

    ‘sqlResult(43) = First twenty appointments in January 1998.

    ‘sqlResult(44) = Patients seen in January 1999 whose notes entries began with the letter ‘C’

    ‘sqlResult(45) = Patients seen in January 1999 and in January 2000.

    ‘sqlResult(46) = Patients seen in January 1999 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 1999 and have similar diagnosis in January 2000

    ‘sqlResult(47) = The appointments before 1050 hours and after 1730 hours in January 1999.

    ‘sqlResult(48) = Patients seen in January 1999 who have similar complaints as those seen in January 2000

    ‘sqlResult(49) = Patients referred in January 1999.

    ‘sqlResult(50) = Patients seen in the first week of January 1999.

    ‘sqlResult(51) = Patients seen in the second week of January 1999.

    ‘sqlResult(52) = Patients seen in the third week of January 1999.

    ‘sqlResult(53) = Patients seen from the 22nd to the end of January 1999.

    ‘sqlResult(54) = Patients seen in January 1999 who had similarly entered complaints and similarly entered treatments in both months, January 1999 and January 2000, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(55) = Patients seen in January 1999 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2000.

    ‘sqlResult(56) = Patients seen in January 1999 who had similarly entered diagnosis as those seen in January 2000

    ‘sqlResult(57) = Patients seen in January 1999 who have similar entries under treatments as the consultations seen in January 2000 with both years of consultations having had entries under Notes

    ‘sqlResult(58) = Patients seen in January 1999 who have similar complaints as those seen in January 2000

    ‘sqlResult(59) = Patients seen in January 1999 who had similarly complaints entries as those seen in January 2000, both having consultation time of more than 10 minutes.

    ‘sqlResult(60) = Patients seen in January 1999 who had similarly entered diagnosis as those seen in January 2000.

    ‘sqlResult(61) = Patients seen in January 1999 and January 2000.

    ‘sqlResult(62) = Patients seen in January 1999 who had entries of URTI under Diagnosis and patients seen in January 2000 who also had similar entries under Diagnosis.

    ‘sqlResult(63) = Patients seen in January 1999 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(64) = The last fifty seen appointments in January 1999.

    ‘sqlResult(65) = First twenty appointments in January 1999.

    ‘sqlResult(66) = Patients seen in January 2000 whose notes entries began with the letter ‘C’

    ‘sqlResult(67) = Patients seen in January 2000 and in January 2001.

    ‘sqlResult(68) = Patients seen in January 2000 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2000 and have similar diagnosis in January 2001

    ‘sqlResult(69) = The appointments before 1050 hours and after 1730 hours in January 2000.

    ‘sqlResult(70) = Patients seen in January 2000 who have similar complaints as those seen in January 2001

    ‘sqlResult(71) = Patients referred in January 2000.

    ‘sqlResult(72) = Patients seen in the first week of January 2000.

    ‘sqlResult(73) = Patients seen in the second week of January 2000.

    ‘sqlResult(74) = Patients seen in the third week of January 2000.

    ‘sqlResult(75) = Patients seen from the 22nd to the end of January 2000.

    ‘sqlResult(76) = Patients seen in January 2000 who had similarly entered complaints and similarly entered treatments in both months, January 2000 and January 2001, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(77) = Patients seen in January 2000 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2001.

    ‘sqlResult(78) = Patients seen in January 2000 who had similarly entered diagnosis as those seen in January 2001

    ‘sqlResult(79) = Patients seen in January 2000 who have similar entries under treatments as the consultations seen in January 2001 with both years of consultations having had entries under Notes

    ‘sqlResult(80) = Patients seen in January 2000 who have similar complaints as those seen in January 2001

    ‘sqlResult(81) = Patients seen in January 2000 who had similarly complaints entries as those seen in January 2001, both having consultation time of more than 10 minutes.

    ‘sqlResult(82) = Patients seen in January 2000 who had similarly entered diagnosis as those seen in January 2001.

    ‘sqlResult(83) = Patients seen in January 2000 and January 2001.

    ‘sqlResult(84) = Patients seen in January 2000 who had entries of URTI under Diagnosis and patients seen in January 2001 who also had similar entries under Diagnosis.

    ‘sqlResult(85) = Patients seen in January 2000 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(86) = The last fifty seen appointments in January 2000.

    ‘sqlResult(87) = First twenty appointments in January 2000.

    ‘sqlResult(88) = Patients seen in January 2001 whose notes entries began with the letter ‘C’

    ‘sqlResult(89) = Patients seen in January 2001 and in January 2002.

    ‘sqlResult(90) = Patients seen in January 2001 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2001 and have similar diagnosis in January 2002

    ‘sqlResult(91) = The appointments before 1050 hours and after 1730 hours in January 2001.

    ‘sqlResult(92) = Patients seen in January 2001 who have similar complaints as those seen in January 2002

    ‘sqlResult(93) = Patients referred in January 2001.

    ‘sqlResult(94) = Patients seen in the first week of January 2001.

    ‘sqlResult(95) = Patients seen in the second week of January 2001.

    ‘sqlResult(96) = Patients seen in the third week of January 2001.

    ‘sqlResult(97) = Patients seen from the 22nd to the end of January 2001.

    ‘sqlResult(98) = Patients seen in January 2001 who had similarly entered complaints and similarly entered treatments in both months, January 2001 and January 2002, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(99) = Patients seen in January 2001 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2002.

    ‘sqlResult(100) = Patients seen in January 2001 who had similarly entered diagnosis as those seen in January 2002

    ‘sqlResult(101) = Patients seen in January 2001 who have similar entries under treatments as the consultations seen in January 2002 with both years of consultations having had entries under Notes

    ‘sqlResult(102) = Patients seen in January 2001 who have similar complaints as those seen in January 2002

    ‘sqlResult(103) = Patients seen in January 2001 who had similarly complaints entries as those seen in January 2002, both having consultation time of more than 10 minutes.

    ‘sqlResult(104) = Patients seen in January 2001 who had similarly entered diagnosis as those seen in January 2002.

    ‘sqlResult(105) = Patients seen in January 2001 and January 2002.

    ‘sqlResult(106) = Patients seen in January 2001 who had entries of URTI under Diagnosis and patients seen in January 2002 who also had similar entries under Diagnosis.

    ‘sqlResult(107) = Patients seen in January 2001 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(108) = The last fifty seen appointments in January 2001.

    ‘sqlResult(109) = First twenty appointments in January 2001.

    ‘sqlResult(110) = Patients seen in January 2002 whose notes entries began with the letter ‘C’

    ‘sqlResult(111) = Patients seen in January 2002 and in January 2003.

    ‘sqlResult(112) = Patients seen in January 2002 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2002 and have similar diagnosis in January 2003

    ‘sqlResult(113) = The appointments before 1050 hours and after 1730 hours in January 2002.

    ‘sqlResult(114) = Patients seen in January 2002 who have similar complaints as those seen in January 2003

    ‘sqlResult(115) = Patients referred in January 2002.

    ‘sqlResult(116) = Patients seen in the first week of January 2002.

    ‘sqlResult(117) = Patients seen in the second week of January 2002.

    ‘sqlResult(118) = Patients seen in the third week of January 2002.

    ‘sqlResult(119) = Patients seen from the 22nd to the end of January 2002.

    ‘sqlResult(120) = Patients seen in January 2002 who had similarly entered complaints and similarly entered treatments in both months, January 2002 and January 2003, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(121) = Patients seen in January 2002 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2003.

    ‘sqlResult(122) = Patients seen in January 2002 who had similarly entered diagnosis as those seen in January 2003

    ‘sqlResult(123) = Patients seen in January 2002 who have similar entries under treatments as the consultations seen in January 2003 with both years of consultations having had entries under Notes

    ‘sqlResult(124) = Patients seen in January 2002 who have similar complaints as those seen in January 2003

    ‘sqlResult(125) = Patients seen in January 2002 who had similarly complaints entries as those seen in January 2003, both having consultation time of more than 10 minutes.

    ‘sqlResult(126) = Patients seen in January 2002 who had similarly entered diagnosis as those seen in January 2003.

    ‘sqlResult(127) = Patients seen in January 2002 and January 2003.

    ‘sqlResult(128) = Patients seen in January 2002 who had entries of URTI under Diagnosis and patients seen in January 2003 who also had similar entries under Diagnosis.

    ‘sqlResult(129) = Patients seen in January 2002 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(130) = The last fifty seen appointments in January 2002.

    ‘sqlResult(131) = First twenty appointments in January 2002.

    ‘sqlResult(132) = Patients seen in January 2003 whose notes entries began with the letter ‘C’

    ‘sqlResult(133) = Patients seen in January 2003 and in January 2004.

    ‘sqlResult(134) = Patients seen in January 2003 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2003 and have similar diagnosis in January 2004

    ‘sqlResult(135) = The appointments before 1050 hours and after 1730 hours in January 2003.

    ‘sqlResult(136) = Patients seen in January 2003 who have similar complaints as those seen in January 2004

    ‘sqlResult(137) = Patients referred in January 2003.

    ‘sqlResult(138) = Patients seen in the first week of January 2003.

    ‘sqlResult(139) = Patients seen in the second week of January 2003.

    ‘sqlResult(140) = Patients seen in the third week of January 2003.

    ‘sqlResult(141) = Patients seen from the 22nd to the end of January 2003.

    ‘sqlResult(142) = Patients seen in January 2003 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2004.

    ‘sqlResult(143) = Patients seen in January 2003 who had similarly entered complaints and similarly entered treatments in both months, January 2003 and January 2004, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(144) = Patients seen in January 2003 who had similarly entered diagnosis as those seen in January 2004

    ‘sqlResult(145) = Patients seen in January 2003 who have similar entries under treatments as the consultations seen in January 2004 with both years of consultations having had entries under Notes

    ‘sqlResult(146) = Patients seen in January 2003 who have similar complaints as those seen in January 2004

    ‘sqlResult(147) = Patients seen in January 2003 who had similarly complaints entries as those seen in January 2004, both having consultation time of more than 10 minutes.

    ‘sqlResult(148) = Patients seen in January 2003 who had similarly entered diagnosis as those seen in January 2004.

    ‘sqlResult(149) = Patients seen in January 2003 and January 2004.

    ‘sqlResult(150) = Patients seen in January 2003 who had entries of URTI under Diagnosis and patients seen in January 2004 who also had similar entries under Diagnosis.

    ‘sqlResult(151) = Patients seen in January 2003 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(152) = The last fifty seen appointments in January 2003.

    ‘sqlResult(153) = First twenty appointments in January 2003.

    ‘sqlResult(154) = Patients seen in January 2004 whose notes entries began with the letter ‘C’

    ‘sqlResult(155) = Patients seen in January 2004 and in January 2005.

    ‘sqlResult(156) = Patients seen in January 2004 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2004 and have similar diagnosis in January 2005

    ‘sqlResult(157) = The appointments before 1050 hours and after 1730 hours in January 2004.

    ‘sqlResult(158) = Patients seen in January 2004 who have similar complaints as those seen in January 2005

    ‘sqlResult(159) = Patients referred in January 2004.

    ‘sqlResult(160) = Patients seen in the first week of January 2004.

    ‘sqlResult(161) = Patients seen in the second week of January 2004.

    ‘sqlResult(162) = Patients seen in the third week of January 2004.

    ‘sqlResult(163) = Patients seen from the 22nd to the end of January 2004.

    ‘sqlResult(164) = Patients seen in January 2004 who had similarly entered complaints and similarly entered treatments in both months, January 2004 and January 2005, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(165) = Patients seen in January 2004 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2005.

    ‘sqlResult(166) = Patients seen in January 2004 who had similarly entered diagnosis as those seen in January 2005

    ‘sqlResult(167) = Patients seen in January 2004 who have similar entries under treatments as the consultations seen in January 2005 with both years of consultations having had entries under Notes

    ‘sqlResult(168) = Patients seen in January 2004 who have similar complaints as those seen in January 2005

    ‘sqlResult(169) = Patients seen in January 2004 who had similarly complaints entries as those seen in January 2005, both having consultation time of more than 10 minutes.

    ‘sqlResult(170) = Patients seen in January 2004 who had similarly entered diagnosis as those seen in January 2005.

    ‘sqlResult(171) = Patients seen in January 2004 and January 2005.

    ‘sqlResult(172) = Patients seen in January 2004 who had entries of URTI under Diagnosis and patients seen in January 2005 who also had similar entries under Diagnosis.

    ‘sqlResult(173) = Patients seen in January 2004 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(174) = The last fifty seen appointments in January 2004.

    ‘sqlResult(175) = First twenty appointments in January 2004.

    ‘sqlResult(176) = Patients seen in January 2005 whose notes entries began with the letter ‘C’

    ‘sqlResult(177) = Patients seen in January 2005 and in January 2006.

    ‘sqlResult(178) = Patients seen in January 2005 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2005 and have similar diagnosis in January 2006

    ‘sqlResult(179) = The appointments before 1050 hours and after 1730 hours in January 2005.

    ‘sqlResult(180) = Patients seen in January 2005 who have similar complaints as those seen in January 2006

    ‘sqlResult(181) = Patients referred in January 2005.

    ‘sqlResult(182) = Patients seen in the first week of January 2005.

    ‘sqlResult(183) = Patients seen in the second week of January 2005.

    ‘sqlResult(184) = Patients seen in the third week of January 2005.

    ‘sqlResult(185) = Patients seen from the 22nd to the end of January 2005.

    ‘sqlResult(186) = Patients seen in January 2005 who had similarly entered complaints and similarly entered treatments in both months, January 2005 and January 2006, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(187) = Patients seen in January 2005 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 2006.

    ‘sqlResult(188) = Patients seen in January 2005 who had similarly entered diagnosis as those seen in January 2006

    ‘sqlResult(189) = Patients seen in January 2005 who have similar entries under treatments as the consultations seen in January 2006 with both years of consultations having had entries under Notes

    ‘sqlResult(190) = Patients seen in January 2005 who have similar complaints as those seen in January 2006

    ‘sqlResult(191) = Patients seen in January 2005 who had similarly complaints entries as those seen in January 2006, both having consultation time of more than 10 minutes.

    ‘sqlResult(192) = Patients seen in January 2005 who had similarly entered diagnosis as those seen in January 2006.

    ‘sqlResult(193) = Patients seen in January 2005 and January 2006.

    ‘sqlResult(194) = Patients seen in January 2005 who had entries of URTI under Diagnosis and patients seen in January 2006 who also had similar entries under Diagnosis.

    ‘sqlResult(195) = Patients seen in January 2005 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(196) = The last fifty seen appointments in January 2005.

    ‘sqlResult(197) = First twenty appointments in January 2005.

    ‘sqlResult(198) = Patients seen in January 2006 whose notes entries began with the letter ‘C’

    ‘sqlResult(199) = Patients seen in January 2006 and in January 1997.

    ‘sqlResult(200) = Patients seen in January 2006 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 2006 and have similar diagnosis in January 1997

    ‘sqlResult(201) = The appointments before 1050 hours and after 1730 hours in January 2006.

    ‘sqlResult(202) = Patients seen in January 2006 who have similar complaints as those seen in January 1997

    ‘sqlResult(203) = Patients referred in January 2006.

    ‘sqlResult(204) = Patients seen in the first week of January 2006.

    ‘sqlResult(205) = Patients seen in the second week of January 2006.

    ‘sqlResult(206) = Patients seen in the third week of January 2006.

    ‘sqlResult(207) = Patients seen from the 22nd to the end of January 2006.

    ‘sqlResult(208) = Patients seen in January 2006 who had similarly entered complaints and similarly entered treatments in both months, January 2006 and January 1997, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(209) = Patients seen in January 2006 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 1997.

    ‘sqlResult(210) = Patients seen in January 2006 who had similarly entered diagnosis as those seen in January 1997

    ‘sqlResult(211) = Patients seen in January 2006 who have similar entries under treatments as the consultations seen in January 1997 with both years of consultations having had entries under Notes

    ‘sqlResult(212) = Patients seen in January 2006 who have similar complaints as those seen in January 1997

    ‘sqlResult(213) = Patients seen in January 2006 who had similarly complaints entries as those seen in January 1997, both having consultation time of more than 10 minutes.

    ‘sqlResult(214) = Patients seen in January 2006 who had similarly entered diagnosis as those seen in January 1997.

    ‘sqlResult(215) = Patients seen in January 2006 and January 1997.

    ‘sqlResult(216) = Patients seen in January 2006 who had entries of URTI under Diagnosis and patients seen in January 1997 who also had similar entries under Diagnosis.

    ‘sqlResult(217) = Patients seen in January 2006 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(218) = The last fifty seen appointments in January 2006.

    ‘sqlResult(219) = First twenty appointments in January 2006.

    ‘STORE THE SQL STRING

    ‘1 Write a query that lists all patients seen in January 1997 whose notes entries began with the letter ‘C’

    ‘2 Write a query that displays all the consultations in January 1997 and January 1998

    ‘3 Write a query that lists all patients seen in January 1997 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in January 1997 and have similar diagnosis in January 1998

    ‘4 Write a query that lists appointments before 1050 hours and after 1730 hours in January 1997

    ‘5 Write a query that lists those seen in January 1997 who have similar complaints as those seen in January 1998

    ‘6 Write a query to list all those referred in January 1997

    ‘7 Write a query that lists all consultations in the first week of January 1997

    ‘8 Write a query that lists all consultations in the second week of January 1997

    ‘9 Write a query that lists all consultations in the third week of January 1997

    ‘10 Write a query that lists all consultations from the 22nd to the end of January 1997

    ‘11 Write a query that lists all consultations seen in January 1997 who had similarly entered complaints and similarly entered treatments in both months January 1997 and January 1998, but the notes entries in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘12 Write a query that lists all the consultations seen in January 1997 who had similarly entered notes, similarly entered treatments or similarly entered date of births in January 1998

    ‘13 Write a query that lists all patients seen in January 1997 who have similar diagnosis as those seen in January 1998

    ‘14 Write a query that lists all consultations in January 1997

    Enjoying the preview?
    Page 1 of 1