Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CS2113-F11-4] OneDoc #18

Open
wants to merge 427 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 213 commits
Commits
Show all changes
427 commits
Select commit Hold shift + click to select a range
0b4e0fb
Edited Developer Guide for VisitList Component
karthikstar Oct 21, 2022
e96013d
Merge pull request #91 from kaseykwok/enable-gradle-assertion
RiaVora Oct 21, 2022
5ba3ea9
Merge pull request #93 from karthikstar/branch-editDGVisits
RiaVora Oct 21, 2022
8b35304
Merge pull request #92 from RiaVora/developerGuide
karthikstar Oct 21, 2022
edde5bb
add Prescription DeveloperGuide
morbenami1 Oct 21, 2022
204b7b9
Merge pull request #94 from morbenami1/master
karthikstar Oct 21, 2022
98cee24
updated Parser to contain asserts
Oct 21, 2022
26394ca
changed variable names that were incorrect to fix bug
Oct 21, 2022
8103783
Merge pull request #97 from RiaVora/assertParser
karthikstar Oct 21, 2022
4509c18
Merge pull request #100 from RiaVora/bugViewPatient
karthikstar Oct 21, 2022
18b12db
added parsing checks for main method and patient methods
Oct 21, 2022
c31d1bd
added more tests for patients, visits, and prescriptions
Oct 21, 2022
c6d0cd4
updated parser test to remove bad comments
Oct 21, 2022
1931c27
Merge pull request #101 from RiaVora/junitParser
karthikstar Oct 21, 2022
aec2f50
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Oct 21, 2022
14a3ee0
Added viewVisit function, modified viewPatient function
karthikstar Oct 21, 2022
aea222f
Fix gradle issues
karthikstar Oct 21, 2022
710b825
Merge pull request #102 from karthikstar/branch-ViewVisitsOfPatient
RiaVora Oct 21, 2022
d6d5574
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Oct 21, 2022
5f2ca79
Edit DG for VisitList
karthikstar Oct 21, 2022
bca5f80
Merge pull request #103 from karthikstar/branch-editDGVisitsV2
RiaVora Oct 21, 2022
fac9a06
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Oct 21, 2022
4faf1e8
Added JUnit Testing and Assertions for VisitList
karthikstar Oct 21, 2022
64b4fc0
Fixed printing syntax to solve JUnit Testing error in Windows
karthikstar Oct 22, 2022
bcfc4a2
Fixed printing snytax for Visit class
karthikstar Oct 22, 2022
2d1df4c
Merge branch 'master' into branch-Storage
dhanish265 Oct 22, 2022
0117623
Fix view active prescription
kaseykwok Oct 23, 2022
c88ce51
Merge pull request #109 from kaseykwok/fix-viewing-prescription
dhanish265 Oct 23, 2022
b7857e7
temporary commit to pull changes from other developers
dhanish265 Oct 23, 2022
0911559
Merge pull request #105 from karthikstar/branch-JUnitTestForVisits
dhanish265 Oct 23, 2022
4da0df0
Add all storage functions relating to reading and writing of data on …
dhanish265 Oct 23, 2022
d818517
Merge branch 'master' into branch-Storage
dhanish265 Oct 23, 2022
2258c09
add acknowledgements for Storage file
dhanish265 Oct 23, 2022
48a806e
Merge pull request #110 from dhanish265/branch-Storage
karthikstar Oct 23, 2022
b78ad6c
Add getTotalPrescriptions function
kaseykwok Oct 25, 2022
ff3a960
Merge pull request #114 from kaseykwok/get-total-pres
karthikstar Oct 26, 2022
84d17d3
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Oct 26, 2022
bea7275
Modify editReason and added new deleteReasaon function in VisitList c…
karthikstar Oct 26, 2022
b691425
Modify editReason function to handle edge case
karthikstar Oct 26, 2022
5fca922
Modify deleteReason function to handle edge case
karthikstar Oct 26, 2022
d9c0bc7
Merge pull request #115 from karthikstar/branch-ModifyVisitFunctions
morbenami1 Oct 26, 2022
a5ee4e6
updated parser methods and index language
Oct 26, 2022
1c8b17d
Merge pull request #122 from RiaVora/newParserMethods
karthikstar Oct 26, 2022
0503fe8
updated parser section of developer guide as well as instructions and…
Oct 26, 2022
b2bf5b5
Merge pull request #124 from RiaVora/parseGuide
morbenami1 Oct 26, 2022
8529eda
Edit prescription on the spot
kaseykwok Oct 26, 2022
a83d4fe
Merge pull request #134 from kaseykwok/edit-prescription-on-the-spot
RiaVora Oct 26, 2022
7cba87d
Draw diagrams for activate, add and class diagram of prescriptionList
kaseykwok Oct 26, 2022
2ed9adb
Add 2 sequence diagrams of prescriptionList into DG
kaseykwok Oct 26, 2022
3df31f2
User Stories Developer guide
morbenami1 Oct 26, 2022
1c526b8
Merge pull request #135 from kaseykwok/prescription-sequence-diagram
morbenami1 Oct 27, 2022
f61265e
Merge branch 'master' of https://github.com/AY2223S1-CS2113-F11-4/tp
morbenami1 Oct 27, 2022
a00eba7
Merge pull request #136 from morbenami1/master
kaseykwok Oct 27, 2022
23d816d
Add index for add Patient and add Prescription
morbenami1 Oct 27, 2022
5efe197
Merge branch 'master' of https://github.com/AY2223S1-CS2113-F11-4/tp
morbenami1 Oct 27, 2022
772fe34
all messages of object and one message converted to one function
morbenami1 Oct 27, 2022
ad26d5b
added index to print object
morbenami1 Oct 27, 2022
df24f31
unused functions deleted
morbenami1 Oct 27, 2022
0a92d65
syntax errpr
morbenami1 Oct 27, 2022
8b4f970
Add gitignore
kaseykwok Oct 27, 2022
25b871f
syntax
morbenami1 Oct 27, 2022
11b84c5
added gitignore
morbenami1 Oct 27, 2022
b6f1e0c
updated tests
morbenami1 Oct 27, 2022
b669875
added the main menu portion to the user guide
Oct 27, 2022
cded4d4
updated tests
morbenami1 Oct 27, 2022
ea1b29a
syntax changes
morbenami1 Oct 27, 2022
f4be8f3
Merge pull request #138 from RiaVora/userGuide
kaseykwok Oct 27, 2022
38fbee3
Temp commit
kaseykwok Oct 27, 2022
203474a
Merge branch 'master' into prescription-user-guide
kaseykwok Oct 27, 2022
c4a4514
test changes
morbenami1 Oct 27, 2022
4307258
test changes
morbenami1 Oct 27, 2022
711d611
Fix new line formatting in user guide
kaseykwok Oct 27, 2022
ede05f8
updated parser and patientList to support unique IDs
Oct 27, 2022
8bf9513
test changes
morbenami1 Oct 27, 2022
7755a5f
syntax
morbenami1 Oct 27, 2022
9d39485
fixed a line that was too long
Oct 27, 2022
d5b0c99
syntax tests
morbenami1 Oct 27, 2022
19fa5dc
syntax tests
morbenami1 Oct 27, 2022
f81fe30
moved plus to a new line
Oct 27, 2022
91933e1
syntax tests
morbenami1 Oct 27, 2022
938ed17
syntax tests
morbenami1 Oct 27, 2022
f76ba63
Add all commands in prescription sub menu in UG
kaseykwok Oct 27, 2022
d7ab5f9
Test TOC
kaseykwok Oct 27, 2022
7f7ce54
Fix 's issues in the UG TOC
kaseykwok Oct 27, 2022
be52914
Add relevant PatientList documentation in the DG, including Sequence …
dhanish265 Oct 27, 2022
157d3c6
Merge pull request #140 from kaseykwok/prescription-user-guide
dhanish265 Oct 27, 2022
42cd338
Merge pull request #139 from RiaVora/uniqueIDs
dhanish265 Oct 27, 2022
d4e8ad4
Merge pull request #141 from dhanish265/branch-DocumentationGuidePati…
kaseykwok Oct 27, 2022
7aa4162
Add Patient related commands and information in the User Guide
dhanish265 Oct 27, 2022
657486c
Merge pull request #142 from dhanish265/branch-UGPatient
kaseykwok Oct 27, 2022
34350ed
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Oct 28, 2022
33edb74
Edit Developer and User Guide, to add visit implementation details
karthikstar Oct 28, 2022
918ed0f
Merge pull request #143 from karthikstar/branch-editDGV2
RiaVora Oct 28, 2022
cf10a21
user guide command summary
morbenami1 Oct 28, 2022
fdae550
Merge branch 'master' of https://github.com/AY2223S1-CS2113-F11-4/tp
morbenami1 Oct 28, 2022
97033a0
Merge pull request #137 from morbenami1/master
morbenami1 Oct 28, 2022
8197871
Add Project Portfolio Page of Dhanish
dhanish265 Nov 1, 2022
53af65c
Merge pull request #194 from dhanish265/branch-DhanishPPP
RiaVora Nov 1, 2022
b652594
Not allow duplicates of prescription
kaseykwok Nov 2, 2022
187ef7e
Refactor PrescriptionListTest with duplicate case tests added
kaseykwok Nov 2, 2022
6c5faa2
Merge pull request #197 from kaseykwok/unique-prescription
morbenami1 Nov 3, 2022
a57bd38
added "visit" and "prescription" to print
morbenami1 Nov 3, 2022
9a86a4f
syntax change
morbenami1 Nov 3, 2022
c5b4638
Merge pull request #198 from morbenami1/master
karthikstar Nov 3, 2022
08c3177
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Nov 3, 2022
d45f5df
Fixed duplicate visit bug and deleteReason bug for existing visit wit…
karthikstar Nov 3, 2022
7d4ef74
Merge pull request #199 from karthikstar/branch-visitBugs
RiaVora Nov 3, 2022
f6702a9
Add exit command to user guide
kaseykwok Nov 3, 2022
813cc2f
Reformat AboutUs with link to kaseykwok.md
kaseykwok Nov 3, 2022
5d43a09
Merge pull request #200 from kaseykwok/ug-exit-command
dhanish265 Nov 3, 2022
3affda4
Fill up the PPP draft
kaseykwok Nov 3, 2022
9c3a6d9
Fix About Us links
kaseykwok Nov 3, 2022
05a1a6d
Merge pull request #201 from kaseykwok/ppp-draft
dhanish265 Nov 3, 2022
f643090
Fix some formatting issues
dhanish265 Nov 3, 2022
4e7b222
Add some contributions to PPP
dhanish265 Nov 3, 2022
0d7259d
Fix merge conflicts
dhanish265 Nov 3, 2022
f34d9e4
fix some JUnit Testing to support new formatting
dhanish265 Nov 3, 2022
0905820
Merge pull request #202 from dhanish265/branch-fixFormattingErrors
kaseykwok Nov 3, 2022
46d58cc
Fix errors arising due to not checking validity of text files before …
dhanish265 Nov 3, 2022
99012fe
Fix Checkstyle violation
dhanish265 Nov 3, 2022
89f33b7
Fix errors caused by inpur redirection tests
dhanish265 Nov 3, 2022
77325a4
Merge pull request #203 from dhanish265/branch-fixSaveFunction
kaseykwok Nov 3, 2022
b78d0d2
Add Help command for sub menus
kaseykwok Nov 3, 2022
ff7be73
Merge branch 'master' into help-command
kaseykwok Nov 3, 2022
9e14d4a
Update user guide and PPP
kaseykwok Nov 3, 2022
4047132
Fix tabs to space in expected output
kaseykwok Nov 3, 2022
d87a34e
Merge pull request #204 from kaseykwok/help-command
karthikstar Nov 4, 2022
03826f7
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Nov 4, 2022
be970c6
Added Karthik's PPP
karthikstar Nov 4, 2022
9a1c76d
Edited AboutUs.md
karthikstar Nov 4, 2022
dea19f8
Merge pull request #206 from karthikstar/branch-addPPP
kaseykwok Nov 4, 2022
a42ece9
added specific error messages for patient and visit
Nov 4, 2022
5e6f41f
updated ppp
Nov 4, 2022
b0fc744
Merge pull request #207 from RiaVora/ppp
karthikstar Nov 4, 2022
c8b94f6
did some work on parsing prescription errors
Nov 4, 2022
6fa3b87
finished specific error messages for each command
Nov 4, 2022
ac7af68
Move PlantUML diagrams to docs directory
kaseykwok Nov 4, 2022
783e005
Merge pull request #209 from kaseykwok/move-diagrams-into-docs
karthikstar Nov 4, 2022
684811d
Remove text files to facilitate gitignore
kaseykwok Nov 4, 2022
636325f
updated Parser with constants and cleaner error messages
Nov 4, 2022
adf4191
Merge branch 'master' into errorMessaging
RiaVora Nov 4, 2022
e4ff4ad
updated Parser commands and fixed Gradle issues
Nov 4, 2022
336f624
updated parser from bugs and fixed wording
Nov 4, 2022
7283ca8
completed the error messaging and gradle fixes
Nov 4, 2022
736773f
Merge pull request #208 from RiaVora/errorMessaging
karthikstar Nov 4, 2022
20c3a91
shortened a few mwthods and removed unnecessary comment
Nov 4, 2022
970f9b7
Merge pull request #210 from RiaVora/codeReview
karthikstar Nov 5, 2022
1033494
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Nov 5, 2022
385914d
Fixed minor issues for UI and UG
karthikstar Nov 5, 2022
c7f9e4e
Edited EXPECTED.txt file
karthikstar Nov 5, 2022
f53dc10
Fix EXPECTED.txt issues
karthikstar Nov 5, 2022
cca6b1c
Fix text-ui-test issues
karthikstar Nov 5, 2022
0985847
Merge pull request #211 from karthikstar/fixMinorBugs
kaseykwok Nov 5, 2022
1971737
added a help message to the end of each error message and simplified …
Nov 5, 2022
5b80bcf
added few optimizations
Nov 5, 2022
029813d
Format changes to PlantUML diagram
kaseykwok Nov 5, 2022
e2a92e4
Merge pull request #213 from RiaVora/helpError
dhanish265 Nov 5, 2022
d4c839a
Fix PrescriptionList class diagram
kaseykwok Nov 5, 2022
0e7292f
Add more JavaDoc for PrescriptionList class
kaseykwok Nov 5, 2022
7245665
Make sequence diagram for adding new prescription more generic
kaseykwok Nov 5, 2022
4c22a17
Omit getting prescription string and index with ref frame
kaseykwok Nov 5, 2022
e1637f2
Fix add and activate diagram
kaseykwok Nov 5, 2022
bd098b1
Add diagrams and elaboration to the DG
dhanish265 Nov 5, 2022
cb7ccbb
Fix some checkstyle issues
dhanish265 Nov 5, 2022
bac808b
Merge pull request #231 from dhanish265/branch-DG-Updates
kaseykwok Nov 5, 2022
1608e89
Merge branch 'master' into gitignore-text
kaseykwok Nov 5, 2022
e5e6118
Merge branch 'master' into gitignore-text
kaseykwok Nov 5, 2022
1a07d61
Merge branch 'master' into dg-ug-fix
kaseykwok Nov 5, 2022
a83ce98
Add edit prescription sequence diagram and further simply other diagrams
kaseykwok Nov 5, 2022
ef8fa06
Viewing prescription sequence diagram
kaseykwok Nov 5, 2022
9964c38
Test pages style
kaseykwok Nov 5, 2022
5b8689e
Test theme
kaseykwok Nov 5, 2022
871f4c2
Test theme yml
kaseykwok Nov 5, 2022
b20fb57
Fail to make a theme works
kaseykwok Nov 5, 2022
988e8a6
Make bolded titles as headers
kaseykwok Nov 5, 2022
6446074
Fix in user guide
kaseykwok Nov 5, 2022
af4cd8b
Merge pull request #234 from kaseykwok/dg-ug-fix
karthikstar Nov 6, 2022
dddd334
Merge pull request #232 from kaseykwok/gitignore-text
karthikstar Nov 6, 2022
4959bbe
Change name to full name
kaseykwok Nov 6, 2022
b91b0a0
updated developer guide with parser information, non-functional requi…
Nov 6, 2022
8014102
checks if birthdate, date, and time entered in input are valid
morbenami1 Nov 6, 2022
803834a
syntax
morbenami1 Nov 6, 2022
721344e
syntax
morbenami1 Nov 6, 2022
c253c75
syntax tests
morbenami1 Nov 6, 2022
b2b1054
syntax changes
morbenami1 Nov 6, 2022
28dce41
syntax
morbenami1 Nov 6, 2022
3a404d2
changes to visit for 2000 to 2050
morbenami1 Nov 6, 2022
702c66b
updated ppp to list all contributions
Nov 6, 2022
35a9968
Merge pull request #236 from morbenami1/master
RiaVora Nov 6, 2022
d8c1dd0
ppp and comannd summary
morbenami1 Nov 6, 2022
62f6d1c
Merge pull request #235 from RiaVora/dgfix
kaseykwok Nov 6, 2022
eaff1c7
Merge pull request #237 from RiaVora/pppfinish
kaseykwok Nov 6, 2022
a75a468
ppp and UI component
morbenami1 Nov 6, 2022
a639af7
Merge branch 'master' of https://github.com/AY2223S1-CS2113-F11-4/tp
morbenami1 Nov 6, 2022
254d05f
ppp
morbenami1 Nov 6, 2022
ed18e3b
updates printing functions
morbenami1 Nov 6, 2022
8a9c15d
Merge branch 'MorV2_DateAndTime'
morbenami1 Nov 6, 2022
63aae07
syntax
morbenami1 Nov 6, 2022
3eb79db
syntax
morbenami1 Nov 6, 2022
63bd07a
syntax
morbenami1 Nov 6, 2022
ff3b416
invalid date - makes sure the dat exists
morbenami1 Nov 6, 2022
a65fd7c
syntax
morbenami1 Nov 6, 2022
6f878cc
checks that dates are valid
morbenami1 Nov 6, 2022
e2810b8
syntax
morbenami1 Nov 6, 2022
db6d945
usee guide commands
morbenami1 Nov 6, 2022
d7f724f
Merge pull request #239 from morbenami1/master
kaseykwok Nov 6, 2022
100aac2
small changes
morbenami1 Nov 6, 2022
814a2a1
Merge pull request #240 from morbenami1/master
morbenami1 Nov 6, 2022
89211b7
edited about us page
Nov 6, 2022
b0b6b93
Merge pull request #241 from RiaVora/aboutus
dhanish265 Nov 6, 2022
402933f
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Nov 6, 2022
a9d5179
Updated UG, DG, PPP, and Edited VisitListTest to shorten code using s…
karthikstar Nov 6, 2022
43b1771
Merge pull request #242 from karthikstar/branch-fixv2.1bugs
kaseykwok Nov 6, 2022
8f1ad22
Add architecture and OneDoc related things in DG
kaseykwok Nov 6, 2022
4f90385
Simplify the sequence diagrams and align the images to top
kaseykwok Nov 6, 2022
e33d838
Merge branch 'master' into dg-main-component
kaseykwok Nov 6, 2022
a8b1fa0
Change homepage
kaseykwok Nov 6, 2022
8b341db
Add TOC for DG
kaseykwok Nov 6, 2022
e6c4b6b
Structure according to address book
kaseykwok Nov 6, 2022
daf1bee
Add manual testing structure and minor fix in UG
kaseykwok Nov 6, 2022
fa79c1f
Add manual testing for prescription features
kaseykwok Nov 6, 2022
b73e961
Edit PPP
kaseykwok Nov 6, 2022
d6b98c9
Minor fix in PPP
kaseykwok Nov 6, 2022
3cd2ffb
Add javaDoc for classes and methods authored
kaseykwok Nov 6, 2022
a882364
Merge pull request #246 from kaseykwok/dg-main-component
karthikstar Nov 7, 2022
55d5159
Merge pull request #247 from kaseykwok/java-docs
karthikstar Nov 7, 2022
93eae29
Minor fix in architecture diagram
kaseykwok Nov 7, 2022
2f58fb2
Meta file for build jar
kaseykwok Nov 7, 2022
402bb1a
Minor fix in activate prescription output message
kaseykwok Nov 7, 2022
28046f6
Merge pull request #248 from kaseykwok/diagram-fix
karthikstar Nov 7, 2022
8d40b6a
updated testing to include how to test patient and visit section
Nov 7, 2022
0d049cf
added more information abuot visits testing
Nov 7, 2022
1bd6755
Merge pull request #249 from RiaVora/dgTesting
kaseykwok Nov 7, 2022
d7c7c39
Fix DG flow and TOC
kaseykwok Nov 7, 2022
371c324
Merge pull request #250 from kaseykwok/fix-dg-toc
RiaVora Nov 7, 2022
e5be161
Add changes such that invalid dates and times can be detected in data…
dhanish265 Nov 7, 2022
118984c
Merge pull request #252 from dhanish265/branch-fixReadInvalidDateTime…
kaseykwok Nov 7, 2022
284e439
updated visit to check against birth date
Nov 7, 2022
33a1493
updated variable to be closer to declaration
Nov 7, 2022
9c9d15e
updated to add java docs
Nov 7, 2022
73f7b4f
added periods
Nov 7, 2022
858ba7d
Merge pull request #255 from RiaVora/javadoc
kaseykwok Nov 7, 2022
6357370
fixed failing tests
Nov 7, 2022
d9221ba
Merge pull request #253 from RiaVora/birthdatevisit
karthikstar Nov 7, 2022
f6a6e0b
Merge branch 'master' of https://github.com/karthikstar/tp
karthikstar Nov 7, 2022
93863cd
Updated java docs for Visit and VisitList, and edited exception messa…
karthikstar Nov 7, 2022
f5af290
Fix checkstyle errors
karthikstar Nov 7, 2022
c0932f6
Merge pull request #257 from karthikstar/branch-updateJavaDoc
kaseykwok Nov 7, 2022
272cb2d
Add run jar command to UG and DG
kaseykwok Nov 7, 2022
5509507
Merge pull request #259 from kaseykwok/add-run-command
RiaVora Nov 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke project template
# OneDoc

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test {
}

application {
mainClassName = "seedu.duke.Duke"
mainClassName = "OneDoc"
}

shadowJar {
Expand All @@ -43,4 +43,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
Binary file added diagrams/PrescriptionListClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions diagrams/PrescriptionListClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml
class PrescriptionList {
+ void add(ui:UI, patientId:String, medicine:String, dosage:String, timeInterval:String)
+ void add(ui:UI, patientId:String, medicine:String, dosage:String, timeInterval:String, isActive:boolean)
+ void viewAll(ui:UI)
+ void viewPatientPrescription(ui:UI, patientId:String)
+ void viewActivePatientPrescription(ui:UI, patientId:String)
+ void edit(ui:UI, prescriptionNumber:int, medicine:String, dosage:String, timeInterval:String)
+ void activatePrescription(ui:UI, prescriptionNumber:String)
+ void deactivatePrescription(ui:UI, prescriptionNumber:String)
}

class Prescription {
}

class UI {}

PrescriptionList *-down-> "*" Prescription : "contains" >
PrescriptionList .right.> UI
@enduml
7 changes: 7 additions & 0 deletions diagrams/Sample.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@startuml
Class01 <|-- Class02
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 -- Class10
@enduml
15 changes: 8 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# About us

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
Display | Name | Github Profile | Portfolio
--------|:----------:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Dhanish | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Kasey Kwok | [Github](https://github.com/kaseykwok) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Mor Ben Ami | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)

103 changes: 99 additions & 4 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,96 @@

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}

## Design & implementation

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
Storage class and its functions are largely adapted from Dhanish's IP on Duke.

## Design & implementation

The Patient and PatientList classes are used in conjunction to manage patients, and the list of patients. Each patient has a name,
an ID, a date of birth and gender. The PatientList class holds an ArrayList of Patients and manipulates them accordingly.

At the start of the program, a new PatientList object is instantiated. Through methods in the Storage class, data is read from the
relevant text files to create Patients that existed prior to the last closure of the program, and then adds these patients to the
ArrayList in PatientList. This finishes the initial set-up.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a diagram showing the overall structure of the program could be added.

Methods in PatientList class:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a sequence diagram could be added to better give an understanding on the methods

addPatient - this method takes in the aforementioned variables through UI class and parses them. If they are all valid, a new
Patient is created and added to the ArrayList in PatientList.

findPatient - this method takes in an ID, iterates through the ArrayList of Patients and compares the ID with the ID of each of the
existing Patients in the list. If there is a match, the corresponding Patient is returned. Else, returns null.

retrievePatient - this method is very similar to findPatient, but instead of returning the Patient found, it prints out the details
of the Patient using the toString method in the Patient class.

listPatients - this method first checks if the ArrayList of Patients is non-empty. If not so, it prints a message that there are
no patients in the system currently and terminates.
Else, it iterates through the ArrayList of Patients and uses the toString method in Patient to print out the details of each Patient.

modifyPatientDetails - this method takes in name, birthDate, gender and ID. It tries to find the patient with a matching ID.
If the patient is not found, returns. Else, if the name is not an empty String, replace the existing name with the input name.
Repeat for birthDate and gender.

### VisitList Component

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there could be a class diagram used here for a better visual understanding of the design and implementation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a class diagram for the VisitList Component as well.

The `VisitList` Component,
* stores the list of visits
* can add new visit to the list
* can edit reason for an existing visit in the list
* can view all visits in the list
* can view all visits for a patient
* can view a specific visit
* depends on `UI` class (as the `VisitList` component interacts with user through the UI component, and makes use of its methods to print details)

**Methods in `VisitList` class:**
* `addVisit` - This method allows user to add a visit to the `VisitList` by specifying `id` of patient, `dateOfVisit`, and `timeOfVisit`.
* `editReason` - This method allows user to edit reason for an existing visit, by specifying `id` of patient and `reason` for visit
* `viewAll` - This method iterates through the list of all visits, and prints each visit record
* `viewPatient` - This method iterates through the list of all visits, and prints the visit records that match the specified `id` of patient
* `viewVisit` - This method iterates through the list of all visits, and prints the visit record that matches the specified `index` of the visit

### PrescriptionList component
**API**: `PrescriptionList.java`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The composition of the Prescription object is already shown by the prescription arrow and the unidirectional navigability. The "contains" might be redundant.

![](../diagrams/PrescriptionListClassDiagram.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PrescriptionClassDiagram is not shown in the DG. And the notations by PlantUML are considered a bugs (not standard UML), so should hide it
image
image


The `PrescriptionList` component,
* stores the list of prescriptions
* can add new prescription to the list
* can edit existing prescriptions inside the list
* can change the status of prescription inside the list
* can view all prescriptions, view a patient's prescription or view a patient's active prescription
* depends on `UI` class (because the `PrescriptionList` component needs to interact with user through the `UI`
component)

**Methods in `PrescriptionList` class:**

* **`add`** - This method allow user to add prescription into the list by specifying `patientId`, `medicine`, `dosage` and
`timeInterval`.
* **`viewAll`** - This methods iterates through the list of all prescriptions and print the details of prescriptions from
all patients.
* **`viewPatientPrescription`** - This method iterates through the list of prescriptions and print the details of
prescriptions from the specified `patientId`.
* **`viewActivePatientPrescription`** - This method iterates through the list of prescriptions and print the details of
all active prescriptions with the specified `patientId`
* **`edit`** - This method allows user to edit the `medicine`, `dosage` or `timeInterval` of the prescription of the
specified index
* **`activatePrescription`** - This method allows user to set the prescription of specified index as active.
* **`deactivatePrescription`** - This method allows user to set the prescription of specified index as inactive.

### Prescription component
The `Prescription` component,
* stores the medicine name
* the medicines timeInterval
* patient ID
* dosage
* if the Prescription is active or not

**Methods in `Prescription` class:**
* 'add' - creates a new Prescription - needs to insert all the components except if active or not (if not included the default is active )
* Getters and Setters for each of the components
* Print format
* method that checks if a patient has the Prescription
* method that checks if a patient has the Prescription and if the Prescription is active
## Product scope
### Target user profile
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add more details for these part in the future


Expand All @@ -27,8 +112,18 @@

## Non-Functional Requirements

{Give non-functional requirements}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this is a non-functional requirements

Parser:

The parsing class utilizes regex for each of the commands for two main reasons: usability and error-catching.

For usability, the input is automatically separated into distinct groups through the Java regex library, which allows
input such as ID, name, etc. to be pulled out in multi-word or one word parts.

For error-catching, the input is checked to be in a certain format (i.e. DOB is DD-MM-YYYY)
or of a certain type (i.e. the ID is one word made up of letters and numbers).

If there is an error, the regex also helps with identifying the exact error issue, and
sending that back to the user.
## Glossary

* *glossary item* - Definition
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/MainMenuState.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public enum MainMenuState {
PATIENT,
VISIT,
PRESCRIPTION,
INVALID,
EXIT
}
79 changes: 79 additions & 0 deletions src/main/java/OneDoc.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
public class OneDoc {

private static UI ui;
protected PatientList patientsList;
protected VisitList visitsList;
protected PrescriptionList prescriptionsList;
protected static Parser parser;
protected static Storage storage;
private static MainMenuState mainMenuState;

public OneDoc() {
ui = new UI();
patientsList = new PatientList();
visitsList = new VisitList();
prescriptionsList = new PrescriptionList();
storage = new Storage();
storage.loadData(patientsList, visitsList, prescriptionsList);
parser = new Parser(patientsList, visitsList, prescriptionsList, ui, storage);
mainMenuState = MainMenuState.INVALID;
}

public static void main(String[] args) {
new OneDoc();
run();
}

public static void subMenuRun() {
SubMenuState subMenuState = SubMenuState.IN_SUB_MENU;

ui.printSubMenu(mainMenuState);
while (true) {
String input = ui.readLine();
switch (mainMenuState) {
case PATIENT:
subMenuState = parser.patientParser(input);
break;
case VISIT:
subMenuState = parser.visitParser(input);
break;
case PRESCRIPTION:
subMenuState = parser.prescriptionParser(input);
break;
default:
break;
}

if (subMenuState == SubMenuState.BACK_TO_MAIN) {
break;
} else if (subMenuState == SubMenuState.EXIT) {
mainMenuState = MainMenuState.EXIT;
break;
}
}
}

public static void mainMenuRun() {
while (mainMenuState != MainMenuState.EXIT) {
ui.printMainMenu();
String input = ui.readLine();
mainMenuState = parser.mainMenuParser(input);

if (mainMenuState == MainMenuState.EXIT) {
break;
} else if (mainMenuState == MainMenuState.INVALID) {
ui.printInvalidMainMenuErrorMessage();
continue;
}

subMenuRun();
}
}

public static void run() {
ui.printWelcomeMessage();
mainMenuRun();
ui.printExitMessage();
}
}

6 changes: 6 additions & 0 deletions src/main/java/OneDocException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public class OneDocException extends Exception {

public OneDocException(String message) {
super(message);
}
}
Loading