Code Monkey home page Code Monkey logo

pe's People

Contributors

halfwhole avatar

Watchers

 avatar  avatar

pe's Issues

`appt-add` with recurrence that is not an integer number gives an error

To reproduce:
appt-add p/2 sdt/01-01-2020 0003 edt/01-01-2020 0004 rmin/0.1

INFO: ----------------[USER COMMAND][appt-add p/2 sdt/01-01-2020 0003 edt/01-01-2020 0004 rmin/0.1]
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1787)
	at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1670)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Node.fireEvent(Node.java:8879)
	at com.sun.javafx.scene.control.behavior.TextFieldBehavior.fire(TextFieldBehavior.java:184)
	at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:330)
	at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$KeyHandler.process(Scene.java:4058)
	at javafx.scene.Scene$KeyHandler.access$1500(Scene.java:4004)
	at javafx.scene.Scene.processKeyEvent(Scene.java:2121)
	at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2595)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:248)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
	at com.sun.glass.ui.View.handleKeyEvent(View.java:547)
	at com.sun.glass.ui.View.notifyKey(View.java:971)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76)
	at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273)
	at com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83)
	at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1784)
	... 47 more
Caused by: java.lang.NumberFormatException: For input string: "0.1"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.base/java.lang.Long.parseLong(Long.java:692)
	at java.base/java.lang.Long.parseLong(Long.java:817)
	at cs.f10.t1.nursetraverse.model.datetime.RecurringDateTime.isValidSingleFrequency(RecurringDateTime.java:87)
	at cs.f10.t1.nursetraverse.logic.parser.ParserUtil.parseFrequency(ParserUtil.java:251)
	at cs.f10.t1.nursetraverse.logic.parser.appointment.AddAppointmentCommandParser.parse(AddAppointmentCommandParser.java:69)
	at cs.f10.t1.nursetraverse.logic.parser.AppParser.parseCommand(AppParser.java:145)
	at cs.f10.t1.nursetraverse.logic.LogicManager.execute(LogicManager.java:50)
	at cs.f10.t1.nursetraverse.ui.MainWindow.executeCommand(MainWindow.java:239)
	at cs.f10.t1.nursetraverse.ui.CommandBox.handleCommandEntered(CommandBox.java:50)
	... 57 more

`pat-clear` clears all patients, but not their appointments

Since appointments are closely related to their patients, pat-clear should clear not only all patients, but all the appointments associated with patients too (which is all of them). But these are not cleared, leaving the appointments untouched (which doesn't seem right!).

Moreover, when we clear all patients and then try to edit the appointments using say appt-edit 7 desc/new-description, we get this:

The patient index provided is invalid.

[This problem is only observed when deleting patients with pat-clear, but not when deleting patients individually with pat-delete.]

`app-help` and `app-exit` gives an error when entering it as the first command

How to reproduce:

  • Start the app.
  • Enter as the first command app-help or app-exit.

Result:

  • Error: Command attempted to make changes but is not a MutatorCommand

one.png

It works on subsequent tries though, but not the first one.

[EDIT: this probably works on many/all commands here on my side, so changing the severity to High.]

Visits should really be editable

It's a common thing to want to edit your visits after you're done with them (not when they're ongoing), but I don't see a way to do so currently.

  • Start times and end times are set by the system, when you enter visit-start and visit-end. It's quite common however in practice for visits to only be entered after the actual visitation was done (it's how many volunteers operate in real life).
  • Again, if errors are made along the way, they cannot be rectified afterwards.

Error messages for adding appointments not fully informative

To reproduce:

  • appt-add p/7 sdt/12-12-2020 1000 edt/12-12-2020 0000 (assuming patient index 7 exists)

Expected:

  • Since the appointment fails because the end date-time is before the start date-time, it should reflect that in the error message.

Actual error message, where there's no mention of end date-time needing to be after start date-time:

End Date Time should be of the format dd-MM-yyyy HHmm and adhere to the following constraints:
1. The values that substitute 'dd', 'MM', 'yyyy', 'HH' and 'mm' must all be numerical numbers.

Minor error in error message for `appt-edit`

Try appt-edit 314152653589793238, and the error message is:

The index provided is not a positive unsigned integer.

I realise this is really pretty minor, but technically it is a positive unsigned integer ;-;

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.