Skip to content

Commit 6ae87e4

Browse files
committed
configured to suit a school like design
1 parent 1ab4ffd commit 6ae87e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2786
-1674
lines changed

abac/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
def create_app(config_class=Config):
2121
app = Flask(__name__)
2222
app.config.from_object(Config)
23-
mongo.init_app(app)
23+
mongo.init_app(app, ssl=True, ssl_cert_reqs='CERT_NONE')
2424
bcrypt.init_app(app)
2525
cors.init_app(app)
2626

abac/admin/routes.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def getAddWorker(user):
100100
@admin_login_required
101101
def addWorker(user):
102102
url = '/admin/workers/add/'
103-
103+
104104
# collecting form data
105105
form = request.form
106106
fname = form['fname']
@@ -197,6 +197,7 @@ def viewRecord(user):
197197
# getting the patient
198198
patient = Patient.get_user(id)
199199

200+
start = datetime.utcnow()
200201
# instantiating the encryption algorithm
201202
key = current_app.config['SECRET_KEY'].encode()
202203
gc = generateCipher(key)
@@ -205,8 +206,6 @@ def viewRecord(user):
205206
ABAC --- ABE
206207
207208
208-
209-
210209
Returning data based on health record type
211210
mp ---- medicine prescriptions
212211
vi ---- vitals
@@ -215,9 +214,17 @@ def viewRecord(user):
215214
if data == 'mp':
216215
view = 'Medical Prescriptions'
217216
records = Patient.get_mp(id)
217+
time = datetime.utcnow() - start
218+
with open(r'C:\Users\Samperfect\Downloads\Codes\Projects\abac\time.csv', 'a') as f:
219+
f.write(f"retrieve ciphertext, {time.total_seconds()}\n")
220+
f.close()
218221
if records:
219222
records = Patient.get_mp(id)['record']
220223
records = gc.decode(records)['record']
224+
time = datetime.utcnow() - start
225+
with open(r'C:\Users\Samperfect\Downloads\Codes\Projects\abac\time.csv', 'a') as f:
226+
f.write(f"decode ciphertext, {time.total_seconds()}\n")
227+
f.close()
221228
elif data == 'vi':
222229
view = 'Health Vitals'
223230
records = Patient.get_vi(id)
@@ -305,13 +312,20 @@ def saveRecord(user):
305312

306313
data = request.get_json()
307314

315+
start = datetime.utcnow()
316+
308317
# instantiating the encryption algorithm
309318
key = current_app.config['SECRET_KEY'].encode()
310319
gc = generateCipher(key)
311320

312321
# turning the EHR into ciphertext
313322
ciphertext = gc.encode(data)
314323

324+
time = datetime.utcnow() - start
325+
with open(r'C:\Users\Samperfect\Downloads\Codes\Projects\abac\time.csv', 'a') as f:
326+
f.write(f"generate ciphertext, {time.total_seconds()}\n")
327+
f.close()
328+
315329
# getting the type of record and patient to be updated
316330
record = request.args.get('record')
317331
pid = request.args.get('id')
@@ -325,6 +339,8 @@ def saveRecord(user):
325339
elif record == 'ph':
326340
Patient().save_ph(pid, ciphertext)
327341

342+
343+
328344
return jsonify({"status": True, "message": "EHR Update Successfully"})
329345

330346

abac/static/main/static/css/style.blue.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.blue.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.default.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.green.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.green.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.pink.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.pink.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.red.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.red.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.sea.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.sea.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/static/main/static/css/style.violet.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
=========================================
33
=========================================
44
5-
Medicio | Bootstrap Medical Template
5+
Anointed Communications College | Bootstrap Medical Template
66
77
=========================================
88
========================================= */

abac/static/main/static/css/style.violet.min.css.map

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

abac/templates/main/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6-
<title>Medicio | E-Health Care</title>
6+
<title>Anointed Communications College | E-Health Care</title>
77
<meta name="description" content="" />
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
99
<meta name="robots" content="all,follow" />

abac/templates/main/contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6-
<title>Medicio | Bootstrap Medical Template</title>
6+
<title>Anointed Communications College | Bootstrap Medical Template</title>
77
<meta name="description" content="" />
88
<meta name="viewport" content="width=device-width, initial-scale=1" />
99
<meta name="robots" content="all,follow" />

abac/templates/main/footer.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<footer class="">
22
<div class="copyrights">
33
<div class="container text-center py-4">
4-
<p class="mb-0 text-muted">&copy; 2021, Medicio.</p>
4+
<p class="mb-0 text-muted">
5+
&copy; 2021, Anointed Communications College, Osogbo.
6+
</p>
57
</div>
68
</div>
79
</footer>

abac/templates/main/header.html

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,9 @@
1717
height="21.96"
1818
viewBox="0 0 141.36 21.96"
1919
>
20-
<g id="logo" transform="translate(-184.71 -47.52)">
21-
<path
22-
id="Path_10"
23-
data-name="Path 10"
24-
d="M26.91,0l-.06-21H21.03L14.37-9.81,7.53-21H1.71V0H8.16V-9.24l4.56,7.35h3.12L20.4-9.57,20.46,0ZM37.29-5.34V-8.1h8.88v-5.1H37.29v-2.46H47.4V-21H30.33V0H47.79V-5.34ZM50.52,0H60.87c7.02,0,11.85-3.99,11.85-10.5S67.89-21,60.87-21H50.52ZM57.6-5.52v-9.96h2.97a4.625,4.625,0,0,1,5.01,4.98,4.625,4.625,0,0,1-5.01,4.98ZM75.3,0h7.08V-21H75.3ZM96.66.48c4.11,0,7.35-1.5,9.42-4.2l-4.47-3.99a5.673,5.673,0,0,1-4.59,2.46c-2.94,0-4.92-2.04-4.92-5.25s1.98-5.25,4.92-5.25a5.673,5.673,0,0,1,4.59,2.46l4.47-3.99c-2.07-2.7-5.31-4.2-9.42-4.2-6.75,0-11.7,4.53-11.7,10.98S89.91.48,96.66.48Z"
25-
transform="translate(183 69)"
26-
fill="#1a1a1a"
27-
/>
28-
<path
29-
id="Path_11"
30-
data-name="Path 11"
31-
d="M1.71,0H8.79V-21H1.71ZM23.22.48c6.84,0,11.85-4.62,11.85-10.98S30.06-21.48,23.22-21.48,11.37-16.86,11.37-10.5,16.38.48,23.22.48Zm0-5.73c-2.61,0-4.71-1.98-4.71-5.25s2.1-5.25,4.71-5.25,4.71,1.98,4.71,5.25S25.83-5.25,23.22-5.25Z"
32-
transform="translate(291 69)"
33-
fill="#323584"
34-
/>
35-
</g>
20+
<text x="0" y="22" fill="#1a1a1a" font-weight="900" font-size="29">
21+
ANOINTED
22+
</text>
3623
</svg>
3724
</a>
3825
<button
@@ -52,7 +39,7 @@
5239
<i class="far fa-clock h4 text-muted"></i>
5340
<div class="ml-2">
5441
<h6 class="text-muted text-uppercase mb-0 text-small">
55-
Mon - Fri: 08:00AM - 20:00PM
42+
Mon - Fri: 08:00AM - 17:00PM
5643
</h6>
5744
<p class="small text-gray mb-0">Saturday and Sunday - CLOSED</p>
5845
</div>
@@ -63,7 +50,7 @@ <h6 class="text-muted text-uppercase mb-0 text-small">
6350
<i class="fas fa-headphones-alt h4 text-muted"></i>
6451
<div class="ml-2">
6552
<h6 class="text-muted text-uppercase mb-0 text-small">
66-
+234 810 830 5239
53+
+234 803 300 2278
6754
</h6>
6855
<p class="small text-gray mb-0">Contact Us For Help</p>
6956
</div>
@@ -86,10 +73,10 @@ <h6 class="text-muted text-uppercase mb-0 text-small">
8673
>
8774
</li>
8875
<li class="nav-item">
89-
<a class="nav-link" href="/about">About </a>
76+
<!-- <a class="nav-link" href="/about">About </a> -->
9077
</li>
9178
<li class="nav-item">
92-
<a class="nav-link" href="/patients/signup">Patient Regitration</a>
79+
<a class="nav-link" href="/patients/signup">Student Regitration</a>
9380
</li>
9481
<!-- <li class="nav-item dropdown">
9582
<a
@@ -132,7 +119,7 @@ <h6 class="text-muted text-uppercase mb-0 text-small">
132119
d-inline-block
133120
"
134121
href="/patients/signin"
135-
>Make an Appointment</a
122+
>Contact a Sickbay Director</a
136123
>
137124
</li>
138125
</ul>

0 commit comments

Comments
 (0)