Giter Club home page Giter Club logo

com2002's People

Contributors

ayyess avatar djreynolds1 avatar eroc33 avatar mholeys avatar

Watchers

 avatar  avatar  avatar  avatar

com2002's Issues

Using java.time

I think we should be using the java.time API rather than java.util.Date. java.util.Date seems to be being depreciated and java.time.(LocalDate|LocalTime) looks to work better with java.sql.(Date|Time).

Pre handin checklist

A list of things we should do just before final handin:

  • Optimise all imports
  • Reformat all code (through eclipse/intellij/astyle)

Feel free to edit this to add anything else we might need to do

Exception when creating a appointment

Seems like this is caused by subtracting 1 for date offset.
Tried creating an appointment on 2016/11/19 at 9:40 but it tries to create it for the 18th instead

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2016-11-18-Dentist-09:40:00' for key 'PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) at com.mysql.jdbc.Util.getInstance(Util.java:408) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073) at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009) at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5098) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994) at uk.ac.shef.com2002.grp4.databases.AppointmentUtils.lambda$insertAppointment$10(AppointmentUtils.java:77) at uk.ac.shef.com2002.grp4.databases.ConnectionManager.lambda$withStatement$13(ConnectionManager.java:59) at uk.ac.shef.com2002.grp4.databases.ConnectionManager.withConnection(ConnectionManager.java:26) at uk.ac.shef.com2002.grp4.databases.ConnectionManager.withStatement(ConnectionManager.java:56) at uk.ac.shef.com2002.grp4.databases.AppointmentUtils.insertAppointment(AppointmentUtils.java:71) at uk.ac.shef.com2002.grp4.calendar.AppointmentCreationFrame.saveDetails(AppointmentCreationFrame.java:73) at uk.ac.shef.com2002.grp4.calendar.AppointmentCreationFrame$2.actionPerformed(AppointmentCreationFrame.java:58) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6535) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227) at java.awt.Dialog.show(Dialog.java:1084) at java.awt.Component.show(Component.java:1673) at java.awt.Component.setVisible(Component.java:1625) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at uk.ac.shef.com2002.grp4.AppointmentPanel$2.onRelease(AppointmentPanel.java:81) at uk.ac.shef.com2002.grp4.calendar.CalendarClickListener.notify(CalendarClickListener.java:30) at uk.ac.shef.com2002.grp4.calendar.CalendarComp.notifySlotListeners(CalendarComp.java:208) at uk.ac.shef.com2002.grp4.calendar.CalendarComp$2.mouseReleased(CalendarComp.java:78) at java.awt.Component.processMouseEvent(Component.java:6535) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Spurious print statements

Should we try to keep random print statements out of our (committed) code?
(If we do need some sort of more permanent logging maybe we should look into java.util.logging)

Payments

  • Viewing a customer's payments
  • Creating payments

Practitioner as enum

in calendar we have a Practitioner enum, it might simplify the code in a couple of places if we use this enum instead of a string in Appointment.
Thoughts?

AppointmentComp types

AppointmentComp currently takes 2 Calendars for start and end, but only uses the time component, so should probably take java.time.LocalTimes. Thoughts?

JDatePicker on hidpi screens

JDatePicker looks odd on HiDpi screens, I've made a fork of the repo ( https://github.com/Eroc33/JDatePicker ) and somewhat improved the situation, but if we use that version we'll have to use local dependencies, and put the jar into version control. Thoughts?

EDIT: Also the JDatePicker devs don't appear to be accepting pull requests, and are ignoring issues, so we can't just get the improvement upstreamed.

Javadoc

We need javadoc on pretty much everything

  • uk.ac.shef.com2002.grp4.*
    • common.*
      • calendar.*
        • AppointmentComp.java
        • AppointmentCreationFrame.java
        • AppointmentFrame.java
        • CalendarClickListener.java
        • CalendarComp.java
        • CalendarView.java
        • EmptyAppointment.java
      • data.*
        • Address.java
        • Appointment.java
        • Patient.java
        • PatientPlan.java
        • Plan.java
        • Treatment.java
        • TreatmentApplication.java
      • databases.*
        • AddressUtils.java
        • AppointmentUtils.java
        • ConnectionManager.java
        • InitialiseTables.java
        • PatientPlanUtils.java
        • PatientUtils.java
        • PlanUtils.java
        • TreatmentApplicationUtils.java
        • TreatmentUtils.java
      • payment.*
        • PaymentDialog.java
        • Receipt.java
        • TreatmentPrice.java
      • util.*
        • CostUtil.java
        • uk.ac.shef.com2002.grp4.util.DPIScaling
      • AddressComponent.java
      • AddressSelector.java
      • BaseDialog.java
      • BaseInfoComponent.java
      • CreateAddressDialog.java
      • CreatePatientDialog.java
      • FindAddressDialog.java
      • FindPatientDialog.java
      • Launcher.java
      • Partner.java
      • PatientComponent.java
      • PatientSelector.java
      • PlanSelector.java
      • UserFacingException.java
    • partnerview.*
      • AppointmentDetailsPartner.java
      • BookDayDialog.java
      • FindTreatment.java
      • PartnerApp.java
    • secretaryview.*
      • AppointmentPanel.java
      • PatientDetailsDialog.java
      • PatientPanel.java
      • SecretaryApp.java

Should CalenderComp only store 1 colum of data (1 day of 1 practioner)?

Related to #26, practionerCombo should be moved from AppointmentFrame. I was thinking it could be moved to CalenderComp. CalenderComp would then select appointments by practioner and date.

CalenderView (and everywhere else) should either get a list of practioners from the database or hardcoding it in one place.

Use of both Practitioner and Partner

We are using both partner and practitioner for the dentist/hygienist.
We should probably change to just be one.
Specification talks about partner so perhaps that one.

Package Refactoring

Since we now have several main classes I was thinking about some package refactoring along the lines of:

  • uk.ac.shef.com2002.grp4.common : all the db code, all the reusable ui components
    (sub packages should be the same as existing sub packages)
  • uk.ac.shef.com2002.grp4.partnerview: PartnerFrame (maybe renamed to PartnerApp), and anything used only by that
  • uk.ac.shef.com2002.grp4.secretaryview: Main (maybe renamed to SecretaryApp), and anything used only by that

This should all be very simple with intellij, or eclipse's refactoring, but it would be best to make sure no-one has any local changes left to commit before doing this.

Write .equals() methods for each class

Each class should really have an equals method.

  • data/Address.java
  • data/Appointment.java
  • data/Patient.java
  • data/PatientPlan.java
  • data/Plan.java
  • data/Treatment.java

Common Launcher

It might be useful to have a single panel with 2 buttons as a launcher for both the main views

Software query processing list

  • Registering a new patient and then showing that the new patient exists in the DB.

  • Subscribing a patient to a healthcare plan and then showing that the patient is linked with the relevant plan in the DB, through a new record of relevant treatment - credits for the plan, for the current year

  • Creating an appointment for a patient to see the dentist and showing that this appointment appears in the receptionist’s week - to - view calendar for the dentist, and also appears in the dentist’s appointments for that day

  • Attempting to create two appointments for a patient that are refused, either because the patient or the partner already have appointments at this time

  • Booking two days holiday for the hygienist and then showing that blank appointments fill the relevant two days on the hygienist’s week - to - view calendar

  • Recording two treatments given by the dentist to a patient and then showing that these have been added to the bill for the appointment

  • Displaying the total cost of an appointment for a patient who is on a healthcare plan, showing the total cost of treatments and the amount owed by the patient

  • Processing a payment by a patient who is on a healthcare plan, showing how their treatment - credits for that year are adjusted, and that they now owe nothing

Inconsistent Language

In some places we use "Customer", and other places "Patient", we should probably try to just use one term everywhere.

Payment and Receipt

  • Add unpaid amount to patient table
  • Change unpaid amount/treatment plan amounts on completion of appointment
  • Create receipt as a document which can be printed/emailed/etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.