BookMD 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/BookMD.gemspec +32 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/.DS_Store +0 -0
- data/lib/BookMD.rb +6 -0
- data/lib/BookMD/version.rb +3 -0
- data/lib/Gemfile +12 -0
- data/lib/Gemfile.lock +50 -0
- data/lib/README.md +1 -0
- data/lib/bookMD2.rb +182 -0
- data/lib/dr_class.rb +10 -0
- data/lib/patients.txt +24 -0
- data/lib/table +0 -0
- data/lib/user.rb +35 -0
- metadata +108 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d128ff7d4e941a9a8c01ec82fde0bf7a62a5d2e56ea5dcf73e4b469bcab7b1e9
|
4
|
+
data.tar.gz: 538cd933cbb1c4f8508aaec51b6b8afecd9feb62b3812e274bda0eea229536e8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c02665d2c517450cb228b8db94221385a4aa3abd0d0ff3e1280955b35a1822b133c35973535f70d9376bde603659972ba9b8035d60fc0c97b03745a18cd08828
|
7
|
+
data.tar.gz: e0fc1db5a14f5ba7bc75fd89c28fc876c6210aba56d4e15286fe5693613e4cc8bd352b85942e1807680a802fb203c96ee5e0575873c110395dfd22f1b5e9652a
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/BookMD.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative 'lib/BookMD/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "BookMD"
|
5
|
+
spec.version = BookMD::VERSION
|
6
|
+
spec.authors = ["GorginZ"]
|
7
|
+
spec.email = ["georgia.z.leng@gmail.com"]
|
8
|
+
|
9
|
+
spec.summary = "GP appointment booker"
|
10
|
+
spec.description = "Online appointment booker"
|
11
|
+
spec.homepage = "https://github.com/GorginZ/BookMD/tree/master/lib"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
+
|
15
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
16
|
+
|
17
|
+
# spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
# spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
19
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
spec.add_dependency "tty-prompt", "~> 0.21.0"
|
30
|
+
spec.add_dependency "tty-box", "~> 0.5.0"
|
31
|
+
spec.add_dependency "tty-table", "~> 0.11.0"
|
32
|
+
end
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at georgia.z.leng@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 GorginZ
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# BookMD
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/BookMD`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'BookMD'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install BookMD
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/BookMD. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/BookMD/blob/master/CODE_OF_CONDUCT.md).
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
41
|
+
|
42
|
+
## Code of Conduct
|
43
|
+
|
44
|
+
Everyone interacting in the BookMD project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/BookMD/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "BookMD"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/.DS_Store
ADDED
Binary file
|
data/lib/BookMD.rb
ADDED
data/lib/Gemfile
ADDED
data/lib/Gemfile.lock
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
colorize (0.8.1)
|
5
|
+
equatable (0.6.1)
|
6
|
+
necromancer (0.5.1)
|
7
|
+
pastel (0.7.3)
|
8
|
+
equatable (~> 0.6)
|
9
|
+
tty-color (~> 0.5)
|
10
|
+
strings (0.1.8)
|
11
|
+
strings-ansi (~> 0.1)
|
12
|
+
unicode-display_width (~> 1.5)
|
13
|
+
unicode_utils (~> 1.4)
|
14
|
+
strings-ansi (0.2.0)
|
15
|
+
tty-box (0.5.0)
|
16
|
+
pastel (~> 0.7.2)
|
17
|
+
strings (~> 0.1.6)
|
18
|
+
tty-cursor (~> 0.7)
|
19
|
+
tty-color (0.5.1)
|
20
|
+
tty-cursor (0.7.1)
|
21
|
+
tty-prompt (0.21.0)
|
22
|
+
necromancer (~> 0.5.0)
|
23
|
+
pastel (~> 0.7.0)
|
24
|
+
tty-reader (~> 0.7.0)
|
25
|
+
tty-reader (0.7.0)
|
26
|
+
tty-cursor (~> 0.7)
|
27
|
+
tty-screen (~> 0.7)
|
28
|
+
wisper (~> 2.0.0)
|
29
|
+
tty-screen (0.7.1)
|
30
|
+
tty-table (0.11.0)
|
31
|
+
equatable (~> 0.6)
|
32
|
+
necromancer (~> 0.5)
|
33
|
+
pastel (~> 0.7.2)
|
34
|
+
strings (~> 0.1.5)
|
35
|
+
tty-screen (~> 0.7)
|
36
|
+
unicode-display_width (1.7.0)
|
37
|
+
unicode_utils (1.4.0)
|
38
|
+
wisper (2.0.1)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
colorize (~> 0.8.1)
|
45
|
+
tty-box
|
46
|
+
tty-prompt
|
47
|
+
tty-table
|
48
|
+
|
49
|
+
BUNDLED WITH
|
50
|
+
2.1.4
|
data/lib/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# terminal_app
|
data/lib/bookMD2.rb
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'tty-prompt'
|
3
|
+
require 'tty-reader'
|
4
|
+
require 'tty-table'
|
5
|
+
require 'tty-box'
|
6
|
+
prompt = TTY::Prompt.new
|
7
|
+
|
8
|
+
def drs_info
|
9
|
+
box = TTY::Box.frame(width: 30, height: 10, align: :center) do
|
10
|
+
"info about docs specialisations etc"
|
11
|
+
end
|
12
|
+
drs = TTY::Table.new header: ['Dr. Gregor','Dr. Helen Kouzmin','Dr Kooray','Dr. Sade Weatley','Dr. Patrick Chan'], rows: [['Monday', 'Monday','-----','-----','Monday',], ['Tuesday', 'Tuesday','Tuesday','Tuesday','Tuesday'], ['Wednesday', 'Wednesday','Wednesday','-----','Wednesday'],['Thursday', 'Thursday','Thursday','-----','Thursday'],['Friday', 'Friday','Friday','Friday','Friday']]
|
13
|
+
# drs.render(:ascii)
|
14
|
+
puts "availability for all doctors"
|
15
|
+
puts box
|
16
|
+
puts drs.render(:ascii)
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
def day_select
|
22
|
+
|
23
|
+
prompt = TTY::Prompt.new
|
24
|
+
day_choice = prompt.select("Select Appointment Day") do |menu|
|
25
|
+
menu.choice 'Monday'
|
26
|
+
menu.choice 'Tuesday'
|
27
|
+
menu.choice 'Wednesday'
|
28
|
+
menu.choice 'Thursday'
|
29
|
+
menu.choice 'Friday'
|
30
|
+
end
|
31
|
+
|
32
|
+
case
|
33
|
+
when day_choice == 'Monday'
|
34
|
+
mon_time_selection
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
def mon_time_selection
|
41
|
+
prompt = TTY::Prompt.new
|
42
|
+
choices = %w("8.30" "9.00")
|
43
|
+
time_choice = prompt.multi_select("Select time", choices)
|
44
|
+
# return time_choice
|
45
|
+
puts time_choice
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
# return day_choice + time_choices
|
50
|
+
|
51
|
+
|
52
|
+
# def monday_display
|
53
|
+
# system("clear")
|
54
|
+
# mondaytimes = TTY::Table.new header:
|
55
|
+
|
56
|
+
# ['Dr. Gregor','Dr. Helen Kouzmin','Dr. Patrick Chan'], rows: [['8.30am', '9.00','9.30'], ['11.30', '2.00pm','3.00pm']]
|
57
|
+
|
58
|
+
# mondaytimes.render(:ascii)
|
59
|
+
# end
|
60
|
+
|
61
|
+
|
62
|
+
# def monday_appointments
|
63
|
+
# prompt = TTY::Prompt.new
|
64
|
+
# monday_select = prompt.select("welcome to bookMD") do |menu|
|
65
|
+
# menu.choice 'Dr. Gregor 8.30am'
|
66
|
+
# menu.choice 'Dr. Gregor 11.30'
|
67
|
+
# menu.choice 'Dr. Helen Kouzmin 9.00am'
|
68
|
+
# menu.choice 'Dr. Helen Kouzmin 2.00pm'
|
69
|
+
# menu.choice 'Dr. Patrivk Chan 9.30am'
|
70
|
+
# menu.choice 'Dr. Patrivk Chan 3.00pm'
|
71
|
+
# menu.choice 'Back to week availability'
|
72
|
+
|
73
|
+
# end
|
74
|
+
|
75
|
+
# end
|
76
|
+
|
77
|
+
# def monday_selector
|
78
|
+
# monday_appointment = menu.choice
|
79
|
+
# # case
|
80
|
+
|
81
|
+
|
82
|
+
# # when monday_select == 'Dr. Gregor 8.30am'
|
83
|
+
|
84
|
+
# # when monday_select == 'Dr. Gregor 11.30'
|
85
|
+
# # appointment_time = 'Dr. Gregor 11.30'
|
86
|
+
|
87
|
+
# # when monday_select == 'Dr. Helen Kouzmin 2.00pm'
|
88
|
+
# # appointment_time = 'Dr. Helen Kouzmin 2.00'
|
89
|
+
# # when monday_select == 'Dr. Helen Kouzmin 9.00am'
|
90
|
+
# # print "9"
|
91
|
+
# # when monday_select == 'Dr. Patrivk Chan 9.30am'
|
92
|
+
# # print "kkj"
|
93
|
+
# # when monday_select == 'Dr. Patrivk Chan 3.00pm'
|
94
|
+
# # print "c 3"
|
95
|
+
# # when monday_select == 'Back to week availability'
|
96
|
+
# # system("clear")
|
97
|
+
# # print booking_info
|
98
|
+
# return menu.choice
|
99
|
+
# # end
|
100
|
+
# end
|
101
|
+
|
102
|
+
# def tuesday_display
|
103
|
+
# system("clear")
|
104
|
+
# tuesdaytimes = TTY::Table.new header:
|
105
|
+
|
106
|
+
# ['Dr. Gregor','Dr. Helen Kouzmin','Dr Kooray', 'Dr. Sade Weatley','Dr. Patrick Chan'], rows: [['9.30am', '10.00am','2.30pm','9.00am','10.00am'], ['1.30pm', '2.00pm','3.00pm','3.00pm ',' ']]
|
107
|
+
|
108
|
+
# tuesdaytimes.render(:ascii)
|
109
|
+
# end
|
110
|
+
|
111
|
+
# def tuesday_appointments
|
112
|
+
# prompt = TTY::Prompt.new
|
113
|
+
# tuesday_select = prompt.select("Tuesday Appointments - Scroll down to view all appointment availabilities") do |menu|
|
114
|
+
# menu.choice 'Dr. Gregor 9.30am'
|
115
|
+
# menu.choice 'Dr. Gregor 1.30'
|
116
|
+
# menu.choice 'Dr. Helen Kouzmin 10.00am'
|
117
|
+
# menu.choice 'Dr. Helen Kouzmin 2.00pm'
|
118
|
+
# menu.choice 'Dr. Lanka Kooray 2.30pm'
|
119
|
+
# menu.choice 'Dr. Lanka Kooray 3.00pm'
|
120
|
+
# menu.choice 'Dr. Sade Weatley 9.00am'
|
121
|
+
# menu.choice 'Dr. Sade Weatley 3.00pm'
|
122
|
+
# menu.choice 'Dr. Patrivk Chan 10.00am'
|
123
|
+
# menu.choice 'Back to week availability'
|
124
|
+
|
125
|
+
# end
|
126
|
+
# case
|
127
|
+
# when tuesday_select == 'Dr. Gregor 8.30am'
|
128
|
+
# print "greg"
|
129
|
+
# when tuesday_select== 'Dr. Gregor 8.90am'
|
130
|
+
# prompt = TTY::Prompt.new
|
131
|
+
# confirm = prompt.yes?('Confirm appointment 9.30?')
|
132
|
+
# when tuesday_select == 'Dr. Gregor 11.30'
|
133
|
+
# print "l"
|
134
|
+
# when tuesday_select == 'Dr. Helen Kouzmin 2.00pm'
|
135
|
+
# print "2"
|
136
|
+
# when tuesday_select == 'Dr. Helen Kouzmin 9.00am'
|
137
|
+
# print "9"
|
138
|
+
# when tuesday_select == 'Dr. Patrivk Chan 9.30am'
|
139
|
+
# print "kkj"
|
140
|
+
# when tuesday_select == 'Dr. Patrivk Chan 3.00pm'
|
141
|
+
# print "c 3"
|
142
|
+
# when tuesday_select == 'Back to week availability'
|
143
|
+
# system("clear")
|
144
|
+
# print booking_info
|
145
|
+
# end
|
146
|
+
# end
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
def start
|
151
|
+
prompt = TTY::Prompt.new
|
152
|
+
system("clear")
|
153
|
+
first_menu = prompt.select("welcome to bookMD") do |menu|
|
154
|
+
menu.choice 'book_appointment'
|
155
|
+
menu.choice 'manage_appointments'
|
156
|
+
end
|
157
|
+
return first_menu
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
start
|
163
|
+
case
|
164
|
+
when first_menu = 'book_appointment'
|
165
|
+
drs_info
|
166
|
+
day_select
|
167
|
+
when firt_menu = 'manage_appointments'
|
168
|
+
puts "current appointments"
|
169
|
+
end
|
170
|
+
# return welcome
|
171
|
+
# end
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
data/lib/dr_class.rb
ADDED
data/lib/patients.txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
{:Name=>"ehllo", :Phone=>"ehlloe", :Email=>"helkjdsf"}
|
2
|
+
|
3
|
+
{:Name=>"help", :Phone=>"help", :Email=>"helpo"}
|
4
|
+
|
5
|
+
{:Name=>"god", :Phone=>"god", :Email=>"god"}
|
6
|
+
|
7
|
+
{:Name=>"georgia", :Phone=>"0415357444", :Email=>"georgia.z.leng@gmail.com"}
|
8
|
+
|
9
|
+
{:Name=>"Liam", :Phone=>"928374", :Email=>"liam.email"}
|
10
|
+
|
11
|
+
{:Name=>"test", :Phone=>"test", :Email=>"test"}
|
12
|
+
|
13
|
+
{:Name=>"another test", :Phone=>"another test", :Email=>"another test"}
|
14
|
+
|
15
|
+
{:Name=>"Georgia Zoi Leng", :Phone=>"0415357444", :Email=>"georgia.z.leng@gmail.com", :Travel=>"n"}
|
16
|
+
|
17
|
+
{:Name=>"jjjj", :Phone=>"jjjj", :Email=>"jjjj", :Travel=>"n"}
|
18
|
+
|
19
|
+
{:Name=>"Georgia", :Phone=>"jfhkjadhf", :Email=>"k;adsjfl;kdajf", :Travel=>"N"}
|
20
|
+
|
21
|
+
{:Name=>"jesse", :Phone=>"78656345345", :Email=>"jesse.@gmail", :Travel=>"N"}
|
22
|
+
|
23
|
+
{:Name=>"GEORGIA", :Phone=>"020202020", :Email=>"EMAIL", :Travel=>"N"}
|
24
|
+
|
data/lib/table
ADDED
File without changes
|
data/lib/user.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
def make_patient #this method makes a patient from user input in terminal
|
3
|
+
patients = {}
|
4
|
+
|
5
|
+
print "Name: "
|
6
|
+
name = gets.chomp
|
7
|
+
print "Phone: "
|
8
|
+
phone = gets.chomp
|
9
|
+
print "Email: "
|
10
|
+
email = gets.chomp
|
11
|
+
print "have you been overseas in the last two weeks or in close contact with someone who has? type Y or N: "
|
12
|
+
travel = gets.chomp
|
13
|
+
patient = {
|
14
|
+
'Name': name,
|
15
|
+
'Phone': phone,
|
16
|
+
'Email': email,
|
17
|
+
'Travel': travel
|
18
|
+
}
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
def printer(make_patient) #this method takes the patient from make_patient method and adds it to txt file
|
23
|
+
separator = ' '
|
24
|
+
File.open("patients.txt","a+") do |f| #flag
|
25
|
+
|
26
|
+
f.puts(make_patient)
|
27
|
+
f.puts(separator)
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
p printer(make_patient)
|
33
|
+
|
34
|
+
|
35
|
+
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: BookMD
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- GorginZ
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tty-prompt
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.21.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.21.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: tty-box
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tty-table
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.11.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.11.0
|
55
|
+
description: Online appointment booker
|
56
|
+
email:
|
57
|
+
- georgia.z.leng@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".DS_Store"
|
63
|
+
- ".gitignore"
|
64
|
+
- ".rspec"
|
65
|
+
- ".travis.yml"
|
66
|
+
- BookMD.gemspec
|
67
|
+
- CODE_OF_CONDUCT.md
|
68
|
+
- Gemfile
|
69
|
+
- LICENSE.txt
|
70
|
+
- README.md
|
71
|
+
- Rakefile
|
72
|
+
- bin/console
|
73
|
+
- bin/setup
|
74
|
+
- lib/.DS_Store
|
75
|
+
- lib/BookMD.rb
|
76
|
+
- lib/BookMD/version.rb
|
77
|
+
- lib/Gemfile
|
78
|
+
- lib/Gemfile.lock
|
79
|
+
- lib/README.md
|
80
|
+
- lib/bookMD2.rb
|
81
|
+
- lib/dr_class.rb
|
82
|
+
- lib/patients.txt
|
83
|
+
- lib/table
|
84
|
+
- lib/user.rb
|
85
|
+
homepage: https://github.com/GorginZ/BookMD/tree/master/lib
|
86
|
+
licenses:
|
87
|
+
- MIT
|
88
|
+
metadata: {}
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options: []
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 2.3.0
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubygems_version: 3.1.2
|
105
|
+
signing_key:
|
106
|
+
specification_version: 4
|
107
|
+
summary: GP appointment booker
|
108
|
+
test_files: []
|