mirror of
https://github.com/tvastri-studio/iaso.git
synced 2025-04-03 19:50:16 -04:00
feat: add intake form
This commit is contained in:
parent
babb403a55
commit
6dab371176
1
.prettierignore
Normal file
1
.prettierignore
Normal file
|
@ -0,0 +1 @@
|
|||
*.html
|
6
Pipfile
6
Pipfile
|
@ -6,6 +6,12 @@ name = "pypi"
|
|||
[packages]
|
||||
django = "*"
|
||||
django-pipeline = "*"
|
||||
django-tables2 = "*"
|
||||
django-crispy-forms = "*"
|
||||
crispy-bootstrap5 = "*"
|
||||
django-extensions = "*"
|
||||
requests = "*"
|
||||
django-formtools = "*"
|
||||
|
||||
[dev-packages]
|
||||
|
||||
|
|
175
Pipfile.lock
generated
175
Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "6388d47a0e942fb020a063d843ec1e1250f86e6698315bfb35a774d4bb16741e"
|
||||
"sha256": "46d1f654fee3e0d41b1e5a164971d938cfa453c99b3c79db5303e053ee390b91"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -18,19 +18,140 @@
|
|||
"default": {
|
||||
"asgiref": {
|
||||
"hashes": [
|
||||
"sha256:71e68008da809b957b7ee4b43dbccff33d1b23519fb8344e33f049897077afac",
|
||||
"sha256:9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506"
|
||||
"sha256:33958cb2e4b3cd8b1b06ef295bd8605cde65b11df51d3beab39e2e149a610ab3",
|
||||
"sha256:8de379fcc383bcfe4507e229fc31209ea23d4831c850f74063b2c11639474dd2"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==3.6.0"
|
||||
"version": "==3.7.1"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7",
|
||||
"sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"
|
||||
],
|
||||
"markers": "python_version >= '3.6'",
|
||||
"version": "==2023.5.7"
|
||||
},
|
||||
"charset-normalizer": {
|
||||
"hashes": [
|
||||
"sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6",
|
||||
"sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1",
|
||||
"sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e",
|
||||
"sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373",
|
||||
"sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62",
|
||||
"sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230",
|
||||
"sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be",
|
||||
"sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c",
|
||||
"sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0",
|
||||
"sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448",
|
||||
"sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f",
|
||||
"sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649",
|
||||
"sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d",
|
||||
"sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0",
|
||||
"sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706",
|
||||
"sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a",
|
||||
"sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59",
|
||||
"sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23",
|
||||
"sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5",
|
||||
"sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb",
|
||||
"sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e",
|
||||
"sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e",
|
||||
"sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c",
|
||||
"sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28",
|
||||
"sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d",
|
||||
"sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41",
|
||||
"sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974",
|
||||
"sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce",
|
||||
"sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f",
|
||||
"sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1",
|
||||
"sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d",
|
||||
"sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8",
|
||||
"sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017",
|
||||
"sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31",
|
||||
"sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7",
|
||||
"sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8",
|
||||
"sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e",
|
||||
"sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14",
|
||||
"sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd",
|
||||
"sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d",
|
||||
"sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795",
|
||||
"sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b",
|
||||
"sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b",
|
||||
"sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b",
|
||||
"sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203",
|
||||
"sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f",
|
||||
"sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19",
|
||||
"sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1",
|
||||
"sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a",
|
||||
"sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac",
|
||||
"sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9",
|
||||
"sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0",
|
||||
"sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137",
|
||||
"sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f",
|
||||
"sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6",
|
||||
"sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5",
|
||||
"sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909",
|
||||
"sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f",
|
||||
"sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0",
|
||||
"sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324",
|
||||
"sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755",
|
||||
"sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb",
|
||||
"sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854",
|
||||
"sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c",
|
||||
"sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60",
|
||||
"sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84",
|
||||
"sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0",
|
||||
"sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b",
|
||||
"sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1",
|
||||
"sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531",
|
||||
"sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1",
|
||||
"sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11",
|
||||
"sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326",
|
||||
"sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df",
|
||||
"sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"
|
||||
],
|
||||
"markers": "python_full_version >= '3.7.0'",
|
||||
"version": "==3.1.0"
|
||||
},
|
||||
"crispy-bootstrap5": {
|
||||
"hashes": [
|
||||
"sha256:0745a67199619149b7feca87dab7a45664876ed50fb582b38fd2aeb3f8a8d869",
|
||||
"sha256:f3ff1ef5cb379fe80b1b02e245008f276444098a4bdb8d855bed84c623798a85"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==0.7"
|
||||
},
|
||||
"django": {
|
||||
"hashes": [
|
||||
"sha256:44f714b81c5f190d9d2ddad01a532fe502fa01c4cb8faf1d081f4264ed15dcd8",
|
||||
"sha256:f2f431e75adc40039ace496ad3b9f17227022e8b11566f4b363da44c7e44761e"
|
||||
"sha256:066b6debb5ac335458d2a713ed995570536c8b59a580005acb0732378d5eb1ee",
|
||||
"sha256:7efa6b1f781a6119a10ac94b4794ded90db8accbe7802281cd26f8664ffed59c"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==4.1.7"
|
||||
"version": "==4.2.1"
|
||||
},
|
||||
"django-crispy-forms": {
|
||||
"hashes": [
|
||||
"sha256:90193b068bf948d9c68449bc8260afed1a8e2afe11ee0bac8c4ebfaeb175b322",
|
||||
"sha256:d1d4e585929058a9ab3b797666ea5b69320b9ba7937f9d146d32173246a6fd13"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.0"
|
||||
},
|
||||
"django-extensions": {
|
||||
"hashes": [
|
||||
"sha256:2a4f4d757be2563cd1ff7cfdf2e57468f5f931cc88b23cf82ca75717aae504a4",
|
||||
"sha256:421464be390289513f86cb5e18eb43e5dc1de8b4c27ba9faa3b91261b0d67e09"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==3.2.1"
|
||||
},
|
||||
"django-formtools": {
|
||||
"hashes": [
|
||||
"sha256:21f8d5dac737f1e636fa8a0a10969c1c32f525a6dfa27c29592827ba70d9643a",
|
||||
"sha256:49ea8a64ddef4728a558bf5f8f622c0f4053b979edcf193bf00dd80432ab2f12"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.4.1"
|
||||
},
|
||||
"django-pipeline": {
|
||||
"hashes": [
|
||||
|
@ -40,13 +161,45 @@
|
|||
"index": "pypi",
|
||||
"version": "==2.1.0"
|
||||
},
|
||||
"sqlparse": {
|
||||
"django-tables2": {
|
||||
"hashes": [
|
||||
"sha256:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34",
|
||||
"sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268"
|
||||
"sha256:e336fdf8899a8fab110550a40cad956064bd4054818e0b972c1893b3e2542168",
|
||||
"sha256:f6c1623aac188d29aae9cf6b4de3211c96c525e49890654bec3359c181600eb9"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.5.3"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4",
|
||||
"sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==0.4.3"
|
||||
"version": "==3.4"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f",
|
||||
"sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2.31.0"
|
||||
},
|
||||
"sqlparse": {
|
||||
"hashes": [
|
||||
"sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3",
|
||||
"sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c"
|
||||
],
|
||||
"markers": "python_version >= '3.5'",
|
||||
"version": "==0.4.4"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc",
|
||||
"sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.0.2"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import uuid
|
||||
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
from django.urls import path
|
||||
from django.contrib.auth import views as auth_views
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
path("login/", views.login, name="login"),
|
||||
path("logout/", views.logout, name="logout"),
|
||||
path("login/", auth_views.LoginView.as_view(template_name="auth/login.html"), name="login"),
|
||||
path("logout/", auth_views.LogoutView.as_view(template_name="auth/logout.html"), name="logout"),
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
from django.shortcuts import render
|
||||
from django.shortcuts import render, redirect
|
||||
from ..dashboard.views import dashboard
|
||||
|
||||
# Create your views here.
|
||||
|
@ -12,10 +12,4 @@ def index(request):
|
|||
"form": form
|
||||
}
|
||||
|
||||
return render(request, 'auth/login.html', context=context)
|
||||
|
||||
def login(request):
|
||||
return render(request, 'auth/login.html')
|
||||
|
||||
def logout(request):
|
||||
return render(request, 'auth/logout.html')
|
||||
return redirect('login')
|
0
iaso/apps/patients/__init__.py
Normal file
0
iaso/apps/patients/__init__.py
Normal file
5
iaso/apps/patients/admin.py
Normal file
5
iaso/apps/patients/admin.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from django.contrib import admin
|
||||
from . import models
|
||||
|
||||
# Register your models here.
|
||||
admin.site.register(models.Patient)
|
6
iaso/apps/patients/apps.py
Normal file
6
iaso/apps/patients/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AuthConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "iaso.apps.patients"
|
32
iaso/apps/patients/forms.py
Normal file
32
iaso/apps/patients/forms.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
from django import forms
|
||||
from .models import Patient
|
||||
|
||||
from crispy_forms.helper import FormHelper
|
||||
from crispy_forms.layout import Layout, Fieldset, Submit, Div, MultiField
|
||||
|
||||
class PatientCreateForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Patient
|
||||
fields = ["first_name", "last_name", "email", "phone_number", "address"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.method = "POST"
|
||||
self.helper.form_class = "form-inline"
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Div(
|
||||
"Create a patient",
|
||||
Div(
|
||||
"first_name",
|
||||
"last_name",
|
||||
),
|
||||
"email",
|
||||
"phone_number",
|
||||
"address"
|
||||
),
|
||||
Submit("submit", "Create")
|
||||
)
|
37
iaso/apps/patients/migrations/0001_initial.py
Normal file
37
iaso/apps/patients/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Generated by Django 4.2.1 on 2023-05-15 18:55
|
||||
|
||||
from django.db import migrations, models
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="Patient",
|
||||
fields=[
|
||||
(
|
||||
"uuid",
|
||||
models.UUIDField(
|
||||
default=uuid.uuid4,
|
||||
editable=False,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
),
|
||||
),
|
||||
("date_created", models.DateTimeField(auto_now_add=True)),
|
||||
("date_modified", models.DateTimeField(auto_now=True)),
|
||||
("first_name", models.CharField(max_length=50)),
|
||||
("last_name", models.CharField(max_length=50)),
|
||||
("email", models.EmailField(blank=True, max_length=254, null=True)),
|
||||
(
|
||||
"phone_number",
|
||||
models.CharField(blank=True, max_length=50, null=True),
|
||||
),
|
||||
("address", models.CharField(blank=True, max_length=50, null=True)),
|
||||
],
|
||||
),
|
||||
]
|
0
iaso/apps/patients/migrations/__init__.py
Normal file
0
iaso/apps/patients/migrations/__init__.py
Normal file
21
iaso/apps/patients/models.py
Normal file
21
iaso/apps/patients/models.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
import uuid
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Patient(models.Model):
|
||||
uuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
date_created = models.DateTimeField(auto_now_add=True)
|
||||
date_modified = models.DateTimeField(auto_now=True)
|
||||
|
||||
first_name = models.CharField(max_length=50, blank=False, null=False)
|
||||
last_name = models.CharField(max_length=50, blank=False, null=False)
|
||||
|
||||
email = models.EmailField(max_length=254, blank=True, null=True)
|
||||
phone_number = models.CharField(max_length=50, blank=True, null=True)
|
||||
address = models.CharField(max_length=50, blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.first_name} {self.last_name}"
|
||||
|
||||
def __unicode__(self):
|
||||
return self.id
|
3
iaso/apps/patients/tests.py
Normal file
3
iaso/apps/patients/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
10
iaso/apps/patients/urls.py
Normal file
10
iaso/apps/patients/urls.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "patients"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
path("create", views.create, name="create"),
|
||||
]
|
39
iaso/apps/patients/views.py
Normal file
39
iaso/apps/patients/views.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
from django.shortcuts import render
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
from django.core.mail import send_mail
|
||||
|
||||
from .forms import PatientCreateForm
|
||||
|
||||
# Create your views here.
|
||||
def index(request):
|
||||
return render(request, "patients/index.html")
|
||||
|
||||
def create(request):
|
||||
if request.method == "POST":
|
||||
form = PatientCreateForm(request.POST)
|
||||
|
||||
if form.is_valid():
|
||||
patient = form.save()
|
||||
|
||||
send_mail(
|
||||
"Fill out your patient intake form!",
|
||||
f"Thank you for your interest in the Shrivatsa Center. Here is the link to your personalized intake form: http://localhost:8000/portal/intake?id={patient.uuid}",
|
||||
settings.EMAIL_HOST_USER,
|
||||
[patient.email]
|
||||
)
|
||||
|
||||
return render(request, "patients/index.html")
|
||||
else:
|
||||
context = {
|
||||
"form": form
|
||||
}
|
||||
|
||||
return render(request, "patients/create.html", context=context)
|
||||
|
||||
context = {
|
||||
"form": PatientCreateForm()
|
||||
}
|
||||
|
||||
return render(request, "patients/create.html", context=context)
|
0
iaso/apps/portal/__init__.py
Normal file
0
iaso/apps/portal/__init__.py
Normal file
3
iaso/apps/portal/admin.py
Normal file
3
iaso/apps/portal/admin.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
iaso/apps/portal/apps.py
Normal file
6
iaso/apps/portal/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PortalConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
name = "iaso.apps.portal"
|
509
iaso/apps/portal/forms.py
Normal file
509
iaso/apps/portal/forms.py
Normal file
|
@ -0,0 +1,509 @@
|
|||
from django import forms
|
||||
from .models import IntakeForm, Medication, Supplament, Condition, Surgery, Injury
|
||||
|
||||
from crispy_forms.helper import FormHelper
|
||||
from crispy_forms.layout import Layout, Fieldset, Row, Column, HTML, Div
|
||||
from crispy_bootstrap5.bootstrap5 import FloatingField
|
||||
|
||||
class MedicationIntakeForm(forms.ModelForm):
|
||||
medicine = forms.CharField(max_length=100,required=False, label="Medicine Name")
|
||||
dose = forms.CharField(max_length=100,required=False, label="Dosage (mg, ml, etc.)")
|
||||
frequency = forms.CharField(max_length=100,required=False, label="Frequency (daily, weekly, etc.)")
|
||||
duration = forms.CharField(max_length=100,required=False, label="About how long ago did you start?")
|
||||
|
||||
class Meta:
|
||||
model = Medication
|
||||
fields = [
|
||||
"medicine",
|
||||
"dose",
|
||||
"frequency",
|
||||
"duration",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
HTML('<h3>Medication {{forloop.counter}}</h3>'),
|
||||
Row(
|
||||
Column(FloatingField('medicine'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('dose'), css_class='form-group col-md-6 mb-0'),
|
||||
),
|
||||
Row(
|
||||
Column(FloatingField('frequency'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('duration'), css_class='form-group col-md-6 mb-0'),
|
||||
)
|
||||
)
|
||||
|
||||
MedicationFormSet = forms.modelformset_factory(
|
||||
Medication,
|
||||
form=MedicationIntakeForm,
|
||||
)
|
||||
|
||||
class SupplamentIntakeForm(forms.ModelForm):
|
||||
name = forms.CharField(max_length=100,required=False, label="Name")
|
||||
dose = forms.CharField(max_length=100,required=False, label="Dosage (tsp, drops, etc.)")
|
||||
frequency = forms.CharField(max_length=100,required=False, label="Frequency (daily, weekly, etc.)")
|
||||
duration = forms.CharField(max_length=100,required=False, label="About how long ago did you start?")
|
||||
|
||||
class Meta:
|
||||
model = Medication
|
||||
fields = [
|
||||
"name",
|
||||
"dose",
|
||||
"frequency",
|
||||
"duration",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
HTML('<h3>Supplament {{forloop.counter}}</h3>'),
|
||||
Row(
|
||||
Column(FloatingField('name'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('dose'), css_class='form-group col-md-6 mb-0'),
|
||||
),
|
||||
Row(
|
||||
Column(FloatingField('frequency'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('duration'), css_class='form-group col-md-6 mb-0'),
|
||||
)
|
||||
)
|
||||
|
||||
SupplamentFormSet = forms.modelformset_factory(
|
||||
Supplament,
|
||||
form=SupplamentIntakeForm,
|
||||
extra=1
|
||||
)
|
||||
|
||||
class ConditionIntakeForm(forms.ModelForm):
|
||||
name = forms.ChoiceField(choices=Condition.CONDITIONS, required=False, label="Condition")
|
||||
when_diagnosed = forms.CharField(max_length=100,required=False, label="About when were you diagnosed?")
|
||||
|
||||
class Meta:
|
||||
model = Condition
|
||||
fields = [
|
||||
"name",
|
||||
"when_diagnosed",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
Div(
|
||||
Column(FloatingField('name'), css_class='mx-2'),
|
||||
Column(FloatingField('when_diagnosed'), css_class='mx-2'),
|
||||
)
|
||||
)
|
||||
|
||||
ConditionFormSet = forms.modelformset_factory(
|
||||
Condition,
|
||||
form=ConditionIntakeForm,
|
||||
)
|
||||
|
||||
class SurgeryIntakeForm(forms.ModelForm):
|
||||
name = forms.CharField(max_length=100,required=False, label="Name")
|
||||
when = forms.CharField(max_length=100,required=False, label="When did you have this surgery?")
|
||||
|
||||
class Meta:
|
||||
model = Condition
|
||||
fields = [
|
||||
"name",
|
||||
"when",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Div(
|
||||
Column(FloatingField('name'), css_class='mx-2'),
|
||||
Column(FloatingField('when'), css_class='mx-2'),
|
||||
)
|
||||
)
|
||||
|
||||
SurgeryFormSet = forms.modelformset_factory(
|
||||
Surgery,
|
||||
form=SurgeryIntakeForm,
|
||||
)
|
||||
|
||||
class InjuryIntakeForm(forms.ModelForm):
|
||||
name = forms.CharField(max_length=100,required=False, label="Name")
|
||||
when = forms.CharField(max_length=100,required=False, label="When did you have this injury?")
|
||||
|
||||
class Meta:
|
||||
model = Condition
|
||||
fields = [
|
||||
"name",
|
||||
"when",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Div(
|
||||
Column(FloatingField('name'), css_class='mx-2'),
|
||||
Column(FloatingField('when'), css_class='mx-2'),
|
||||
)
|
||||
)
|
||||
|
||||
InjuryFormSet = forms.modelformset_factory(
|
||||
Injury,
|
||||
form=InjuryIntakeForm,
|
||||
)
|
||||
|
||||
class IntakeFormPage1(forms.ModelForm):
|
||||
full_name = forms.CharField(max_length=100, required=True, label="Full Name")
|
||||
date_of_birth = forms.DateField(label="Date of Birth", widget=forms.DateInput(attrs={'type': 'date'}))
|
||||
age = forms.IntegerField(required=True, label="Age")
|
||||
phone_number = forms.CharField(max_length=100, required=False, label="Phone Number")
|
||||
email = forms.EmailField(required=False, label="Email")
|
||||
|
||||
address_line_1 = forms.CharField(max_length=100, required=True, label="Address Line 1")
|
||||
address_line_2 = forms.CharField(max_length=100, required=False, label="Address Line 2 (optional)")
|
||||
city = forms.CharField(max_length=100, required=True, label="City")
|
||||
state = forms.CharField(max_length=20, required=True, label="State")
|
||||
zip_code = forms.CharField(max_length=20, required=True, label="Zip")
|
||||
|
||||
emergency_contact_name = forms.CharField(max_length=100, required=True, label="Emergency Contact Name")
|
||||
emergency_contact_phone_number = forms.CharField(max_length=100, required=True, label="Phone Number")
|
||||
emergency_contact_relationship = forms.CharField(max_length=100, required=True, label="Relationship to you")
|
||||
|
||||
primary_care_provider = forms.CharField(max_length=100, required=False, label="Primary Care Provider")
|
||||
other_care = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 30}), label="Who else are you seeing for your health needs? (optional)")
|
||||
|
||||
takes_perscribed_medication = forms.BooleanField(required=False, label="Do you take any prescribed medication?")
|
||||
takes_herbal_medicine = forms.BooleanField(required=False, label="Have you ever taken any herbal medicine?")
|
||||
has_done_shiatsu = forms.BooleanField(required=False, label="Have you ever done shiatsu?")
|
||||
has_cat = forms.BooleanField(required=False, label="Do you have a cat?")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
fields = [
|
||||
"full_name",
|
||||
"date_of_birth",
|
||||
"age",
|
||||
"phone_number",
|
||||
"email",
|
||||
|
||||
"address_line_1",
|
||||
"address_line_2",
|
||||
"city",
|
||||
"state",
|
||||
"zip_code",
|
||||
|
||||
"emergency_contact_name",
|
||||
"emergency_contact_phone_number",
|
||||
"emergency_contact_relationship",
|
||||
|
||||
"primary_care_provider",
|
||||
"other_care",
|
||||
|
||||
"takes_perscribed_medication",
|
||||
"takes_herbal_medicine",
|
||||
"has_done_shiatsu",
|
||||
"has_cat",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
|
||||
self.helper.form_tag = False
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Fieldset(
|
||||
'Personal Information',
|
||||
FloatingField('full_name'),
|
||||
Row(
|
||||
Column(FloatingField('date_of_birth'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('age'), css_class='form-group col-md-6 mb-0'),
|
||||
),
|
||||
Row(
|
||||
Column(FloatingField('phone_number'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('email'), css_class='form-group col-md-6 mb-0'),
|
||||
),
|
||||
HTML('<h3>Address</h3>'),
|
||||
FloatingField('address_line_1'),
|
||||
FloatingField('address_line_2'),
|
||||
Row(
|
||||
Column(FloatingField('city'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('state'), css_class='form-group col-md-3 mb-0'),
|
||||
Column(FloatingField('zip_code'), css_class='form-group col-md-3 mb-0'),
|
||||
),
|
||||
css_class='rounded-3 p-3'
|
||||
),
|
||||
|
||||
Fieldset(
|
||||
'Emergency Contact',
|
||||
FloatingField('emergency_contact_name'),
|
||||
Row(
|
||||
Column(FloatingField('emergency_contact_phone_number'), css_class='form-group col-md-6 mb-0'),
|
||||
Column(FloatingField('emergency_contact_relationship'), css_class='form-group col-md-6 mb-0'),
|
||||
),
|
||||
css_class='rounded-3 p-3'
|
||||
),
|
||||
|
||||
Fieldset(
|
||||
'Current Care',
|
||||
FloatingField('primary_care_provider'),
|
||||
FloatingField('other_care'),
|
||||
'takes_perscribed_medication',
|
||||
'takes_herbal_medicine',
|
||||
'has_done_shiatsu',
|
||||
'has_cat',
|
||||
css_class='rounded-3 p-3'
|
||||
)
|
||||
)
|
||||
|
||||
class IntakeFormPage5(forms.ModelForm):
|
||||
allergies = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Allergies (optional)")
|
||||
other_conditions = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Other conditions (optional)")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
fields = [
|
||||
"allergies",
|
||||
"other_conditions",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
|
||||
self.helper.form_tag = False
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Fieldset(
|
||||
'Other Conditions',
|
||||
FloatingField('allergies'),
|
||||
FloatingField('other_conditions'),
|
||||
css_class='rounded-3 p-3'
|
||||
)
|
||||
)
|
||||
|
||||
class IntakeFormPage8(forms.ModelForm):
|
||||
mother = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Mother")
|
||||
father = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Father")
|
||||
maternal_grandmother = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Maternal Grandmother")
|
||||
maternal_grandfather = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Maternal Grandfather")
|
||||
paternal_grandmother = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Paternal Grandmother")
|
||||
paternal_grandfather = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Paternal Grandfather")
|
||||
sisters = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Sisters")
|
||||
brothers = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Brothers")
|
||||
children = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Children")
|
||||
extended_family = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Extended Family")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
fields = [
|
||||
"mother",
|
||||
"father",
|
||||
"maternal_grandmother",
|
||||
"maternal_grandfather",
|
||||
"paternal_grandmother",
|
||||
"paternal_grandfather",
|
||||
"sisters",
|
||||
"brothers",
|
||||
"children",
|
||||
"extended_family",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
FloatingField('mother'),
|
||||
FloatingField('father'),
|
||||
FloatingField('maternal_grandmother'),
|
||||
FloatingField('maternal_grandfather'),
|
||||
FloatingField('paternal_grandmother'),
|
||||
FloatingField('paternal_grandfather'),
|
||||
FloatingField('sisters'),
|
||||
FloatingField('brothers'),
|
||||
FloatingField('children'),
|
||||
FloatingField('extended_family'),
|
||||
)
|
||||
|
||||
class IntakeFormPage9(forms.ModelForm):
|
||||
tobacco = forms.BooleanField(required=False, label="Do you use tobacco?")
|
||||
smoking_or_chewing_tobacco = forms.ChoiceField(required=False, widget=forms.RadioSelect, choices=[('smoking', 'Smoking'), ('chewing', 'Chewing')], label='Do you smoke or chew tobacco?')
|
||||
how_long_tobacco = forms.CharField(required=False,max_length=100, label="How long have you been using tobacco?")
|
||||
how_much_tobacco = forms.CharField(required=False,max_length=100, label="How much do you use? (packs per day, etc.)")
|
||||
|
||||
alcohol = forms.BooleanField(required=False, label="Do you drink?")
|
||||
how_much_alcohol = forms.CharField(required=False,max_length=100, label="How much do you drink? (glasses per day, etc.)")
|
||||
how_often_alcohol = forms.CharField(required=False,max_length=100, label="How often do you drink?")
|
||||
what_kind_alcohol = forms.CharField(required=False,max_length=100, label="What kind of alcohol do you drink? (beer, wine, etc.)")
|
||||
|
||||
marijuana = forms.BooleanField(required=False, label="Do you use marijuana or other THC-derivative products?")
|
||||
smoking_or_eating_marjuana = forms.ChoiceField(required=False, widget=forms.RadioSelect, choices=[('smoking', 'Smoking'), ('eating', 'Eating')], label='Do you smoke or eat marajuana?')
|
||||
how_much_marajuana = forms.CharField(required=False,max_length=100, label="How much do you use? (joints per day, etc.)")
|
||||
how_often_marajuana = forms.CharField(required=False,max_length=100, label="How often do you use?")
|
||||
|
||||
soft_drinks = forms.BooleanField(required=False, label="Do you drink soft drinks regularly?")
|
||||
how_often_soft_drinks = forms.CharField(required=False,max_length=100)
|
||||
|
||||
caffiene = forms.BooleanField(required=False, label="Do you drink coffee or other caffinated beverages?")
|
||||
what_form_caffiene = forms.CharField(required=False,max_length=100, label="What form of caffiene do you drink? (coffee, tea, etc.)")
|
||||
how_often_caffiene = forms.CharField(required=False,max_length=100, label="How often do you drink caffiene?")
|
||||
|
||||
other_substances = forms.BooleanField(required=False, label="Do you use any other substances?")
|
||||
what_kind_other_substances = forms.CharField(required=False,max_length=100, label="What kind of substances do you use?")
|
||||
how_much_other_substances = forms.CharField(required=False,max_length=100, label="How much do you use?")
|
||||
how_often_other_substances = forms.CharField(required=False,max_length=100, label="How often do you use?")
|
||||
|
||||
exercise = forms.BooleanField(required=False, label="Do you exercise on a regular basis?")
|
||||
how_often_exercise = forms.CharField(required=False,max_length=100, label="How often do you exercise?")
|
||||
what_kind_exercise = forms.CharField(required=False,max_length=100, label="What kind of exercise do you do? (running, yoga, etc.)")
|
||||
|
||||
occupation = forms.BooleanField(required=False, label="Do you have an occupation currently?")
|
||||
type_occupation = forms.CharField(required=False,max_length=100, label="What kind of occupation do you have?")
|
||||
hours_per_week_occupation = forms.CharField(required=False,max_length=100, label="How many hours per week do you work?")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
|
||||
fields = [
|
||||
"tobacco",
|
||||
"smoking_or_chewing_tobacco",
|
||||
"how_long_tobacco",
|
||||
"how_much_tobacco",
|
||||
|
||||
"alcohol",
|
||||
"how_much_alcohol",
|
||||
"how_often_alcohol",
|
||||
"what_kind_alcohol",
|
||||
|
||||
"marijuana",
|
||||
"smoking_or_eating_marjuana",
|
||||
"how_much_marajuana",
|
||||
"how_often_marajuana",
|
||||
|
||||
"soft_drinks",
|
||||
"how_often_soft_drinks",
|
||||
|
||||
"caffiene",
|
||||
"what_form_caffiene",
|
||||
"how_often_caffiene",
|
||||
|
||||
"other_substances",
|
||||
"what_kind_other_substances",
|
||||
"how_much_other_substances",
|
||||
"how_often_other_substances",
|
||||
|
||||
"exercise",
|
||||
"how_often_exercise",
|
||||
"what_kind_exercise",
|
||||
|
||||
"occupation",
|
||||
"type_occupation",
|
||||
"hours_per_week_occupation",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
Fieldset(
|
||||
'',
|
||||
'tobacco',
|
||||
Div(
|
||||
Column('smoking_or_chewing_tobacco', css_class='mx-2'),
|
||||
Column(FloatingField('how_long_tobacco'), css_class='mx-2'),
|
||||
Column(FloatingField('how_much_tobacco'), css_class='mx-2'),
|
||||
),
|
||||
'alcohol',
|
||||
Div(
|
||||
Column(FloatingField('how_much_alcohol'), css_class='mx-2'),
|
||||
Column(FloatingField('how_often_alcohol'), css_class='mx-2'),
|
||||
Column(FloatingField('what_kind_alcohol'), css_class='mx-2'),
|
||||
),
|
||||
'marijuana',
|
||||
Div(
|
||||
Column('smoking_or_eating_marjuana', css_class='mx-2'),
|
||||
Column(FloatingField('how_much_marajuana'), css_class='mx-2'),
|
||||
Column(FloatingField('how_often_marajuana'), css_class='mx-2'),
|
||||
),
|
||||
'soft_drinks',
|
||||
Div(
|
||||
Column(FloatingField('how_often_soft_drinks'), css_class='mx-2'),
|
||||
),
|
||||
'caffiene',
|
||||
Div(
|
||||
Column(FloatingField('what_form_caffiene'), css_class='mx-2'),
|
||||
Column(FloatingField('how_often_caffiene'), css_class='mx-2'),
|
||||
),
|
||||
'other_substances',
|
||||
Div(
|
||||
Column(FloatingField('what_kind_other_substances'), css_class='mx-2'),
|
||||
Column(FloatingField('how_much_other_substances'), css_class='mx-2'),
|
||||
Column(FloatingField('how_often_other_substances'), css_class='mx-2'),
|
||||
),
|
||||
'exercise',
|
||||
Div(
|
||||
Column(FloatingField('how_often_exercise'), css_class='mx-2'),
|
||||
Column(FloatingField('what_kind_exercise'), css_class='mx-2'),
|
||||
),
|
||||
'occupation',
|
||||
Div(
|
||||
Column(FloatingField('type_occupation'), css_class='mx-2'),
|
||||
Column(FloatingField('hours_per_week_occupation'), css_class='mx-2'),
|
||||
),
|
||||
css_class='rounded-3 p-3'
|
||||
)
|
||||
)
|
||||
|
||||
class IntakeFormPage10(forms.ModelForm):
|
||||
pain_points = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Where do you feel pain or discomfort?")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
fields = [
|
||||
"pain_points",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
|
||||
self.helper.layout = Layout(
|
||||
Fieldset(
|
||||
'Pain Points',
|
||||
FloatingField('pain_points'),
|
||||
css_class='rounded-3 p-3'
|
||||
)
|
||||
)
|
||||
|
||||
class IntakeFormPage11(forms.ModelForm):
|
||||
what_do_you_hope_to_gain_from_shiatsu = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="What are your current reasons for seeking therapy from Shrivatsa Center? Do you have a specific goal for our time together?")
|
||||
how_did_you_hear_about_us = forms.CharField(max_length=1000, required=False, widget=forms.Textarea(attrs={'rows': 3}), label="Were you referred to us? If so, by whom?")
|
||||
|
||||
class Meta:
|
||||
model = IntakeForm
|
||||
fields = [
|
||||
"how_did_you_hear_about_us",
|
||||
"what_do_you_hope_to_gain_from_shiatsu",
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.helper = FormHelper()
|
||||
self.helper.form_tag = False
|
||||
self.helper.layout = Layout(
|
||||
'how_did_you_hear_about_us',
|
||||
'what_do_you_hope_to_gain_from_shiatsu',
|
||||
)
|
62
iaso/apps/portal/migrations/0001_initial.py
Normal file
62
iaso/apps/portal/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Generated by Django 4.2.1 on 2023-05-27 19:01
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='IntakeForm',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('full_name', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('date_of_birth', models.DateField(blank=True, null=True)),
|
||||
('age', models.IntegerField(blank=True, null=True)),
|
||||
('phone_number', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('email', models.EmailField(blank=True, max_length=254, null=True)),
|
||||
('address_line_1', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('address_line_2', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('city', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('state', models.CharField(blank=True, max_length=20, null=True)),
|
||||
('zip_code', models.CharField(blank=True, max_length=20, null=True)),
|
||||
('emergency_contact_name', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('emergency_contact_phone_number', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('emergency_contact_relationship', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('primary_care_provider', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('other_care', models.TextField(blank=True, null=True)),
|
||||
('takes_perscribed_medication', models.BooleanField(default=False)),
|
||||
('takes_herbal_medicine', models.BooleanField(default=False)),
|
||||
('has_done_shiatsu', models.BooleanField(default=False)),
|
||||
('has_cat', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Supplament',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('dose', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('frequency', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('duration', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('intake_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.intakeform')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Medication',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('medicine', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('dose', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('frequency', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('duration', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('intake_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.intakeform')),
|
||||
],
|
||||
),
|
||||
]
|
23
iaso/apps/portal/migrations/0002_condition.py
Normal file
23
iaso/apps/portal/migrations/0002_condition.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Generated by Django 4.2.1 on 2023-05-27 21:28
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('portal', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Condition',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(blank=True, choices=[('hypertenstion', 'Hypertenstion'), ('diabetes', 'Diabetes'), ('heart_attack', 'Heart Attack'), ('stroke', 'Stroke'), ('blood_clot', 'Blood Clot'), ('seizures', 'Seizures'), ('cancer', 'Cancer'), ('mental_illness', 'Mental Illness')], max_length=100, null=True)),
|
||||
('when_diagnosed', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('intake_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.intakeform')),
|
||||
],
|
||||
),
|
||||
]
|
|
@ -0,0 +1,97 @@
|
|||
# Generated by Django 4.2.1 on 2023-05-27 22:14
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('portal', '0002_condition'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='allergies',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='brothers',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='children',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='extended_family',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='father',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='maternal_grandfather',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='maternal_grandmother',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='mother',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='other_conditions',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='paternal_grandfather',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='paternal_grandmother',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='intakeform',
|
||||
name='sisters',
|
||||
field=models.TextField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='condition',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, choices=[('hypertension', 'Hypertension'), ('diabetes', 'Diabetes'), ('heart_attack', 'Heart Attack'), ('stroke', 'Stroke'), ('blood_clot', 'Blood Clot'), ('seizures', 'Seizures'), ('cancer', 'Cancer'), ('mental_illness', 'Mental Illness')], max_length=100, null=True),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Surgery',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('when', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('intake_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.intakeform')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Injury',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('when', models.CharField(blank=True, max_length=100, null=True)),
|
||||
('intake_form', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.intakeform')),
|
||||
],
|
||||
),
|
||||
]
|
0
iaso/apps/portal/migrations/__init__.py
Normal file
0
iaso/apps/portal/migrations/__init__.py
Normal file
135
iaso/apps/portal/models.py
Normal file
135
iaso/apps/portal/models.py
Normal file
|
@ -0,0 +1,135 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class IntakeForm(models.Model):
|
||||
# personal information
|
||||
full_name = models.CharField(max_length=100, blank=True, null=True)
|
||||
date_of_birth = models.DateField(blank=True, null=True)
|
||||
age = models.IntegerField(blank=True, null=True)
|
||||
phone_number = models.CharField(max_length=100, blank=True, null=True)
|
||||
email = models.EmailField(blank=True, null=True)
|
||||
|
||||
# address
|
||||
address_line_1 = models.CharField(max_length=100, blank=True, null=True)
|
||||
address_line_2 = models.CharField(max_length=100, blank=True, null=True)
|
||||
city = models.CharField(max_length=100, blank=True, null=True)
|
||||
state = models.CharField(max_length=20, blank=True, null=True)
|
||||
zip_code = models.CharField(max_length=20, blank=True, null=True)
|
||||
|
||||
emergency_contact_name = models.CharField(max_length=100, blank=True, null=True)
|
||||
emergency_contact_phone_number = models.CharField(max_length=100, blank=True, null=True)
|
||||
emergency_contact_relationship = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
# current care
|
||||
primary_care_provider = models.CharField(max_length=100, blank=True, null=True)
|
||||
other_care = models.TextField(blank=True, null=True)
|
||||
|
||||
# questions
|
||||
takes_perscribed_medication = models.BooleanField(default=False)
|
||||
takes_herbal_medicine = models.BooleanField(default=False)
|
||||
has_done_shiatsu = models.BooleanField(default=False)
|
||||
has_cat = models.BooleanField(default=False)
|
||||
|
||||
# other conditions
|
||||
allergies = models.TextField(blank=True, null=True)
|
||||
other_conditions = models.TextField(blank=True, null=True)
|
||||
|
||||
# family history
|
||||
mother = models.TextField(blank=True, null=True)
|
||||
father = models.TextField(blank=True, null=True)
|
||||
maternal_grandmother = models.TextField(blank=True, null=True)
|
||||
maternal_grandfather = models.TextField(blank=True, null=True)
|
||||
paternal_grandmother = models.TextField(blank=True, null=True)
|
||||
paternal_grandfather = models.TextField(blank=True, null=True)
|
||||
sisters = models.TextField(blank=True, null=True)
|
||||
brothers = models.TextField(blank=True, null=True)
|
||||
children = models.TextField(blank=True, null=True)
|
||||
extended_family = models.TextField(blank=True, null=True)
|
||||
|
||||
# lifestyle
|
||||
tobacco = models.BooleanField(default=False)
|
||||
smoking_or_chewing_tobacco = models.BooleanField(choices=[('smoking', 'Smoking'), ('chewing', 'Chewing')], blank=True, null=True)
|
||||
how_long_tobacco = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_much_tobacco = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
alcohol = models.BooleanField(default=False)
|
||||
how_much_alcohol = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_often_alcohol = models.CharField(max_length=100, blank=True, null=True)
|
||||
what_kind_alcohol = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
marijuana = models.BooleanField(default=False)
|
||||
smoking_or_eating_marjuana = models.BooleanField(choices=[('smoking', 'Smoking'), ('eating', 'Eating')], blank=True, null=True)
|
||||
how_much_marajuana = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_often_marajuana = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
soft_drinks = models.BooleanField(default=False)
|
||||
how_often_soft_drinks = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
caffiene = models.BooleanField(default=False)
|
||||
what_form_caffiene = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_often_caffiene = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
exercise = models.BooleanField(default=False)
|
||||
how_often_exercise = models.CharField(max_length=100, blank=True, null=True)
|
||||
what_kind_exercise = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
occupation = models.BooleanField(default=False)
|
||||
what_occupation = models.CharField(max_length=100, blank=True, null=True)
|
||||
hours_per_week_occupation = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
other_substances = models.BooleanField(default=False)
|
||||
what_kind_other_substances = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_much_other_substances = models.CharField(max_length=100, blank=True, null=True)
|
||||
how_often_other_substances = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return
|
||||
|
||||
def __unicode__(self):
|
||||
return
|
||||
|
||||
class Medication(models.Model):
|
||||
medicine = models.CharField(max_length=100, blank=True, null=True)
|
||||
dose = models.CharField(max_length=100, blank=True, null=True)
|
||||
frequency = models.CharField(max_length=100, blank=True, null=True)
|
||||
duration = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
intake_form = models.ForeignKey(IntakeForm, on_delete=models.CASCADE)
|
||||
|
||||
class Supplament(models.Model):
|
||||
name = models.CharField(max_length=100, blank=True, null=True)
|
||||
dose = models.CharField(max_length=100, blank=True, null=True)
|
||||
frequency = models.CharField(max_length=100, blank=True, null=True)
|
||||
duration = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
intake_form = models.ForeignKey(IntakeForm, on_delete=models.CASCADE)
|
||||
|
||||
class Condition(models.Model):
|
||||
CONDITIONS = [
|
||||
("hypertension", "Hypertension"),
|
||||
("diabetes", "Diabetes"),
|
||||
("heart_attack", "Heart Attack"),
|
||||
("stroke", "Stroke"),
|
||||
("blood_clot", "Blood Clot"),
|
||||
("seizures", "Seizures"),
|
||||
("cancer", "Cancer"),
|
||||
("mental_illness", "Mental Illness"),
|
||||
]
|
||||
|
||||
|
||||
name = models.CharField(max_length=100, choices=CONDITIONS, blank=True, null=True)
|
||||
when_diagnosed = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
intake_form = models.ForeignKey(IntakeForm, on_delete=models.CASCADE)
|
||||
|
||||
class Surgery(models.Model):
|
||||
name = models.CharField(max_length=100, blank=True, null=True)
|
||||
when = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
intake_form = models.ForeignKey(IntakeForm, on_delete=models.CASCADE)
|
||||
|
||||
class Injury(models.Model):
|
||||
name = models.CharField(max_length=100, blank=True, null=True)
|
||||
when = models.CharField(max_length=100, blank=True, null=True)
|
||||
|
||||
intake_form = models.ForeignKey(IntakeForm, on_delete=models.CASCADE)
|
3
iaso/apps/portal/tests.py
Normal file
3
iaso/apps/portal/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
9
iaso/apps/portal/urls.py
Normal file
9
iaso/apps/portal/urls.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "portal"
|
||||
|
||||
urlpatterns = [
|
||||
path("intake", views.IntakeWizard.as_view(), name="intake"),
|
||||
]
|
52
iaso/apps/portal/views.py
Normal file
52
iaso/apps/portal/views.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
import requests
|
||||
|
||||
from django.shortcuts import render
|
||||
from django.conf import settings
|
||||
|
||||
from formtools.wizard.views import SessionWizardView
|
||||
|
||||
from . import forms
|
||||
|
||||
FORMS = [
|
||||
("1", forms.IntakeFormPage1),
|
||||
("2", forms.MedicationFormSet),
|
||||
("3", forms.SupplamentFormSet),
|
||||
("4", forms.ConditionFormSet),
|
||||
("5", forms.IntakeFormPage5),
|
||||
("6", forms.SurgeryFormSet),
|
||||
("7", forms.InjuryFormSet),
|
||||
("8", forms.IntakeFormPage8),
|
||||
("9", forms.IntakeFormPage9),
|
||||
("10", forms.IntakeFormPage10),
|
||||
("11", forms.IntakeFormPage11),
|
||||
]
|
||||
|
||||
TEMPLATES = {
|
||||
1: "portal/intake-page1.html",
|
||||
2: "portal/intake-page2.html",
|
||||
3: "portal/intake-page3.html",
|
||||
4: "portal/intake-page4.html",
|
||||
5: "portal/intake-page5.html",
|
||||
6: "portal/intake-page6.html",
|
||||
7: "portal/intake-page7.html",
|
||||
8: "portal/intake-page8.html",
|
||||
9: "portal/intake-page9.html",
|
||||
10: "portal/intake-page10.html",
|
||||
11: "portal/intake-page11.html",
|
||||
}
|
||||
|
||||
# Create your views here.
|
||||
class IntakeWizard(SessionWizardView):
|
||||
form_list = FORMS
|
||||
|
||||
get_template_names = lambda self: TEMPLATES[int(self.steps.current)]
|
||||
|
||||
def get_context_data(self, form, **kwargs):
|
||||
context = super().get_context_data(form=form, **kwargs)
|
||||
context['GOOGLE_PLACES_API_KEY'] = settings.GOOGLE_PLACES_API_KEY
|
||||
return context
|
||||
|
||||
def done(self, form_list, **kwargs):
|
||||
form_data = self.get_all_cleaned_data()
|
||||
print(form_data)
|
||||
return render(self.request, 'portal/intake_submit.html', {'form_data': form_data})
|
|
@ -3,18 +3,22 @@ from django.urls import reverse_lazy
|
|||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
# iaso
|
||||
"iaso.apps.users",
|
||||
"iaso.apps.patients",
|
||||
"iaso.apps.dashboard",
|
||||
"iaso.apps.portal",
|
||||
|
||||
# packages
|
||||
"pipeline",
|
||||
"django_tables2",
|
||||
"formtools",
|
||||
"crispy_forms",
|
||||
"crispy_bootstrap5",
|
||||
"django_extensions",
|
||||
|
||||
# django
|
||||
"django.contrib.admin",
|
||||
|
@ -73,6 +77,8 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
},
|
||||
]
|
||||
|
||||
LOGIN_REDIRECT_URL = "index"
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/4.1/topics/i18n/
|
||||
|
@ -114,16 +120,23 @@ PIPELINE = {
|
|||
}
|
||||
}
|
||||
|
||||
scss_files = [
|
||||
sass_files = [
|
||||
"skeleton",
|
||||
"base",
|
||||
"login"
|
||||
"nav",
|
||||
"auth",
|
||||
"dashboard",
|
||||
"patients",
|
||||
"intake",
|
||||
]
|
||||
|
||||
for name in scss_files:
|
||||
PIPELINE["STYLESHEETS"].update({name: {"source_filenames": ["css/%s.scss" % name], "output_filename": "css/%s.css" % name}})
|
||||
for name in sass_files:
|
||||
PIPELINE["STYLESHEETS"].update({name: {"source_filenames": ["css/%s.sass" % name], "output_filename": "css/%s.css" % name}})
|
||||
|
||||
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap5"
|
||||
CRISPY_TEMPLATE_PACK = "bootstrap5"
|
||||
|
||||
MEDIA_ROOT = BASE_DIR / 'media/'
|
||||
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
# Default primary key field type
|
||||
|
@ -131,4 +144,6 @@ MEDIA_URL = '/media/'
|
|||
|
||||
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||
|
||||
from .secret import *
|
||||
GOOGLE_PLACES_API_KEY = ""
|
||||
|
||||
from .secret import *
|
||||
|
|
|
@ -2,6 +2,15 @@ from . import BASE_DIR
|
|||
|
||||
DEBUG=True
|
||||
SECRET_KEY='insecure_secret_key'
|
||||
GOOGLE_PLACES_API_KEY=''
|
||||
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||
EMAIL_HOST = 'smtp.gmail.com'
|
||||
EMAIL_HOST_USER = 'your_username@gmail.com'
|
||||
EMAIL_HOST_PASSWORD = 'asdfasdfasdfdasf'
|
||||
EMAIL_PORT = 587
|
||||
EMAIL_USE_TLS = True
|
||||
EMAIL_USE_SSL = False
|
||||
|
||||
if DEBUG:
|
||||
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
|
||||
|
|
1
iaso/static/css/_colors.sass
Normal file
1
iaso/static/css/_colors.sass
Normal file
|
@ -0,0 +1 @@
|
|||
$accent-color: #23408E
|
109
iaso/static/css/_reset.sass
Normal file
109
iaso/static/css/_reset.sass
Normal file
|
@ -0,0 +1,109 @@
|
|||
html,
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
applet,
|
||||
object,
|
||||
iframe,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote,
|
||||
pre,
|
||||
a,
|
||||
abbr,
|
||||
acronym,
|
||||
address,
|
||||
big,
|
||||
cite,
|
||||
code,
|
||||
del,
|
||||
dfn,
|
||||
em,
|
||||
img,
|
||||
ins,
|
||||
kbd,
|
||||
q,
|
||||
s,
|
||||
samp,
|
||||
small,
|
||||
strike,
|
||||
strong,
|
||||
sub,
|
||||
sup,
|
||||
tt,
|
||||
var,
|
||||
b,
|
||||
u,
|
||||
i,
|
||||
center,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
fieldset,
|
||||
form,
|
||||
label,
|
||||
legend,
|
||||
table,
|
||||
caption,
|
||||
tbody,
|
||||
tfoot,
|
||||
thead,
|
||||
tr,
|
||||
th,
|
||||
td,
|
||||
article,
|
||||
aside,
|
||||
canvas,
|
||||
details,
|
||||
embed,
|
||||
figure,
|
||||
figcaption,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
output,
|
||||
ruby,
|
||||
section,
|
||||
summary,
|
||||
time,
|
||||
mark,
|
||||
audio,
|
||||
video
|
||||
margin: 0
|
||||
padding: 0
|
||||
border: 0
|
||||
font: inherit
|
||||
vertical-align: baseline
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
section
|
||||
display: block
|
||||
body
|
||||
line-height: 1
|
||||
ol,
|
||||
ul
|
||||
list-style: none
|
||||
blockquote,
|
||||
q
|
||||
quotes: none
|
||||
blockquote
|
||||
&:before, &:after
|
||||
content: none
|
6
iaso/static/css/_variables.sass
Normal file
6
iaso/static/css/_variables.sass
Normal file
|
@ -0,0 +1,6 @@
|
|||
@font-face
|
||||
font-family: 'leitura-roman'
|
||||
src: url("fonts/Leitura\ Roman\ 2.otf")
|
||||
|
||||
$font-stack: "leitura-roman", "Georgia", serif
|
||||
$italics-stack: "leitura-roman", "Georgia", serif
|
25
iaso/static/css/auth.sass
Normal file
25
iaso/static/css/auth.sass
Normal file
|
@ -0,0 +1,25 @@
|
|||
@import "reset"
|
||||
|
||||
body
|
||||
box-sizing: border-box
|
||||
font-family: 'Open Sans', sans-serif
|
||||
|
||||
#login
|
||||
height: 90vh
|
||||
width: 100vw
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
flex-direction: column
|
||||
|
||||
input, button
|
||||
display: flex
|
||||
padding: 0.2vw
|
||||
margin: 0.5vw 0
|
||||
width: 100%
|
||||
|
||||
align-items: center
|
||||
justify-content: center
|
||||
flex-direction: column
|
||||
|
||||
|
35
iaso/static/css/base.sass
Normal file
35
iaso/static/css/base.sass
Normal file
|
@ -0,0 +1,35 @@
|
|||
@import 'reset'
|
||||
@import 'variables'
|
||||
@import 'colors'
|
||||
|
||||
header
|
||||
min-height: 5vh
|
||||
background-color: $accent-color
|
||||
font-family: 'Open Sans', sans-serif
|
||||
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
flex-direction: row
|
||||
padding: 0 2vw
|
||||
|
||||
a
|
||||
color: white !important
|
||||
text-decoration: none !important
|
||||
|
||||
.profile
|
||||
display: flex
|
||||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
.picture
|
||||
margin-right: 10px
|
||||
display: inline-block
|
||||
|
||||
height: 3vh
|
||||
width: 3vh
|
||||
border-radius: 50%
|
||||
|
||||
background-repeat: no-repeat
|
||||
background-position: center center
|
||||
background-size: cover
|
|
@ -1,276 +0,0 @@
|
|||
/* base.scss */
|
||||
|
||||
/*
|
||||
* Skeleton V1.2
|
||||
* Copyright 2011, Dave Gamache
|
||||
* www.getskeleton.com
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* 6/20/2012
|
||||
*/
|
||||
|
||||
|
||||
/* Table of Content
|
||||
==================================================
|
||||
#Reset & Basics
|
||||
#Basic Styles
|
||||
#Site Styles
|
||||
#Typography
|
||||
#Links
|
||||
#Lists
|
||||
#Images
|
||||
#Buttons
|
||||
#Forms
|
||||
#Misc */
|
||||
|
||||
|
||||
/* #Reset & Basics (Inspired by E. Meyers)
|
||||
================================================== */
|
||||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline; }
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
|
||||
display: block; }
|
||||
body {
|
||||
line-height: 1; }
|
||||
ol, ul {
|
||||
list-style: none; }
|
||||
blockquote, q {
|
||||
quotes: none; }
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none; }
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0; }
|
||||
|
||||
.arrow-down {
|
||||
position: relative!important;
|
||||
left: 114px;
|
||||
z-index: 100!important;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 9px solid transparent;
|
||||
border-right: 9px solid transparent;
|
||||
border-top: 9px solid blue!important;
|
||||
}
|
||||
|
||||
/* #Basic Styles
|
||||
================================================== */
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #444;
|
||||
-webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
|
||||
-webkit-text-size-adjust: 100%; }
|
||||
|
||||
|
||||
/* #Typography
|
||||
================================================== */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #181818;
|
||||
/*font-family: "Georgia", "Times New Roman", serif;*/
|
||||
/*font-weight: normal; */
|
||||
}
|
||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
|
||||
h1 { font-size: 46px; line-height: 50px; margin-bottom: 14px;}
|
||||
h2 { font-size: 35px; line-height: 40px; margin-bottom: 10px; }
|
||||
h3 { font-size: 28px; line-height: 34px; margin-bottom: 8px; }
|
||||
h4 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
|
||||
h5 { font-size: 17px; line-height: 24px; }
|
||||
h6 { font-size: 14px; line-height: 21px; }
|
||||
.subheader { color: #777; }
|
||||
|
||||
p { margin: 0 0 20px 0; }
|
||||
p img { margin: 0; }
|
||||
p.lead { font-size: 21px; line-height: 27px; color: #777; }
|
||||
|
||||
em { font-style: italic; }
|
||||
strong { font-weight: bold; color: #333; }
|
||||
small { font-size: 80%; }
|
||||
|
||||
/* Blockquotes */
|
||||
blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
|
||||
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
|
||||
blockquote cite { display: block; font-size: 12px; color: #555; }
|
||||
blockquote cite:before { content: "\2014 \0020"; }
|
||||
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
|
||||
|
||||
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
|
||||
|
||||
|
||||
/* #Links
|
||||
================================================== */
|
||||
a, a:visited { color: #333; text-decoration: underline; outline: 0; }
|
||||
a:hover, a:focus { color: #000; }
|
||||
p a, p a:visited { line-height: inherit; }
|
||||
#inviteeshow:hover { text-decoration: underline; cursor: pointer; }
|
||||
|
||||
|
||||
/* #Lists
|
||||
================================================== */
|
||||
ul, ol { margin-bottom: 20px; }
|
||||
ul { list-style: none outside; }
|
||||
ol { list-style: decimal; }
|
||||
ol, ul.square, ul.circle, ul.disc { margin-left: 30px; }
|
||||
ul.square { list-style: square outside; }
|
||||
ul.circle { list-style: circle outside; }
|
||||
ul.disc { list-style: disc outside; }
|
||||
ul ul, ul ol,
|
||||
ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 90%; }
|
||||
ul ul li, ul ol li,
|
||||
ol ol li, ol ul li { margin-bottom: 6px; }
|
||||
li { line-height: 18px; margin-bottom: 12px; }
|
||||
ul.large li { line-height: 21px; }
|
||||
li p { line-height: 21px; }
|
||||
|
||||
/* #Images
|
||||
================================================== */
|
||||
|
||||
img.scale-with-grid {
|
||||
max-width: 100%;
|
||||
height: auto; }
|
||||
|
||||
|
||||
/* #Buttons
|
||||
================================================== */
|
||||
|
||||
.button,
|
||||
button,
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"] {
|
||||
background: #FFF; /* Old browsers */
|
||||
background: #FFF -moz-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.1) 100%); /* FF3.6+ */
|
||||
background: #FFF -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.1)), color-stop(100%,rgba(0,0,0,.1))); /* Chrome,Safari4+ */
|
||||
background: #FFF -webkit-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: #FFF -o-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%); /* Opera11.10+ */
|
||||
background: #FFF -ms-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%); /* IE10+ */
|
||||
background: #FFF linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%); /* W3C */ border: 1px solid #aaa;
|
||||
border: 1px solid #aaa;
|
||||
border-top: 1px solid #ccc;
|
||||
border-left: 1px solid #ccc;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
color: #444;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px rgba(255, 255, 255, .75);
|
||||
box-shadow: 0 1px 4px 0 rgba(0,0,0,0.06);
|
||||
cursor: pointer;
|
||||
margin-bottom: 20px;
|
||||
line-height: normal;
|
||||
padding: 8px 10px;
|
||||
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; }
|
||||
|
||||
.button:hover,
|
||||
button:hover,
|
||||
input[type="submit"]:hover,
|
||||
input[type="reset"]:hover,
|
||||
input[type="button"]:hover {
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15); }
|
||||
|
||||
.button:active,
|
||||
button:active,
|
||||
input[type="submit"]:active,
|
||||
input[type="reset"]:active,
|
||||
input[type="button"]:active {
|
||||
font-weight: bold;
|
||||
color: #FFF;
|
||||
background-color: #333;
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15); }
|
||||
|
||||
.button.full-width,
|
||||
button.full-width,
|
||||
input[type="submit"].full-width,
|
||||
input[type="reset"].full-width,
|
||||
input[type="button"].full-width {
|
||||
width: 100%;
|
||||
padding-left: 0 !important;
|
||||
padding-right: 0 !important;
|
||||
text-align: center; }
|
||||
|
||||
/* Fix for odd Mozilla border & padding issues */
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/* #Forms
|
||||
================================================== */
|
||||
|
||||
form {
|
||||
margin-bottom: 20px; }
|
||||
fieldset {
|
||||
margin-bottom: 20px; }
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="email"],
|
||||
textarea,
|
||||
select {
|
||||
border: 1px solid #ccc;
|
||||
padding: 6px 4px;
|
||||
outline: none;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #777;
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06);
|
||||
margin: 0;
|
||||
width: 210px;
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
margin-bottom: 20px;
|
||||
background: #fff; }
|
||||
select {
|
||||
padding: 0; }
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="email"]:focus,
|
||||
textarea:focus {
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15);
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15); }
|
||||
textarea {
|
||||
min-height: 60px; }
|
||||
label,
|
||||
legend {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 13px; }
|
||||
select {
|
||||
width: 220px; }
|
||||
input[type="checkbox"] {
|
||||
display: inline; }
|
||||
label span,
|
||||
legend span {
|
||||
font-weight: normal;
|
||||
font-size: 13px;
|
||||
color: #444; }
|
||||
|
||||
/* #Misc
|
||||
================================================== */
|
||||
.remove-bottom { margin-bottom: 0 !important; }
|
||||
.half-bottom { margin-bottom: 10px !important; }
|
||||
.add-bottom { margin-bottom: 20px !important; }
|
0
iaso/static/css/dashboard.sass
Normal file
0
iaso/static/css/dashboard.sass
Normal file
BIN
iaso/static/css/fonts/Leitura Roman 2.otf
Normal file
BIN
iaso/static/css/fonts/Leitura Roman 2.otf
Normal file
Binary file not shown.
83
iaso/static/css/intake.sass
Normal file
83
iaso/static/css/intake.sass
Normal file
|
@ -0,0 +1,83 @@
|
|||
@import "colors"
|
||||
@import "variables"
|
||||
@import "reset"
|
||||
|
||||
body
|
||||
font-family: $font-stack
|
||||
background: #FFFEF2
|
||||
|
||||
form
|
||||
width: 60%
|
||||
margin: 0 auto
|
||||
display: flex
|
||||
flex-direction: column
|
||||
padding: 20px
|
||||
padding-bottom: 0px
|
||||
zoom: 1.5
|
||||
|
||||
img
|
||||
margin: 50px auto
|
||||
width: 15%
|
||||
|
||||
h1
|
||||
font-size: 2em
|
||||
font-weight: normal
|
||||
padding: 20px
|
||||
padding-top: 0
|
||||
text-align: center
|
||||
text-decoration: none
|
||||
|
||||
span
|
||||
border-bottom: 1px solid black
|
||||
|
||||
h3
|
||||
font-size: 1.2em
|
||||
font-weight: normal
|
||||
padding: 1em 0 1em .3em
|
||||
text-align: left
|
||||
text-decoration: underline
|
||||
|
||||
fieldset
|
||||
padding: 10px 20px
|
||||
width: 100%
|
||||
margin-bottom: 10px
|
||||
border: 1px solid lighten($accent-color, .5)
|
||||
|
||||
legend
|
||||
text-align: left
|
||||
padding: 0 5px
|
||||
font-size: 1.3em
|
||||
float: none !important
|
||||
width: auto !important
|
||||
|
||||
.progress-bar
|
||||
width: 50%
|
||||
margin: 0 auto
|
||||
margin-bottom: 1.2em
|
||||
|
||||
progress
|
||||
width: 100%
|
||||
|
||||
.conditions-form, .injuries-form, .surgeries-form
|
||||
display: flex
|
||||
flex-direction: row
|
||||
|
||||
&>div
|
||||
width: 90%
|
||||
display: flex
|
||||
|
||||
&:first-child
|
||||
width: 66%
|
||||
|
||||
&:last-child
|
||||
width: 33%
|
||||
|
||||
a
|
||||
margin: auto
|
||||
margin-right: 0
|
||||
margin-top: 0
|
||||
|
||||
span
|
||||
width: 40px
|
||||
height: 40px
|
||||
text-align: center
|
|
@ -1,3 +0,0 @@
|
|||
* {
|
||||
color: red
|
||||
}
|
51
iaso/static/css/nav.sass
Normal file
51
iaso/static/css/nav.sass
Normal file
|
@ -0,0 +1,51 @@
|
|||
.dash
|
||||
width: 100%
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: row
|
||||
|
||||
overflow: hidden
|
||||
|
||||
nav
|
||||
width: 10%
|
||||
height: 100%
|
||||
|
||||
display: flex
|
||||
justify-content: start
|
||||
align-items: center
|
||||
flex-direction: column
|
||||
padding-top: 20px
|
||||
|
||||
div
|
||||
width: 8vw
|
||||
height: 8vw
|
||||
margin-bottom: 20px
|
||||
display: flex
|
||||
|
||||
a
|
||||
height: 100%
|
||||
width: 100%
|
||||
border-radius: 5px
|
||||
border: 2px solid #23408E
|
||||
|
||||
background-repeat: no-repeat
|
||||
background-position: center center
|
||||
background-size: 40%
|
||||
|
||||
&.index-icon
|
||||
background-image: url("https://icons.getbootstrap.com/assets/icons/speedometer.svg")
|
||||
|
||||
&.appointments-icon
|
||||
background-image: url("https://icons.getbootstrap.com/assets/icons/calendar-event.svg")
|
||||
|
||||
&.patients-icon
|
||||
background-image: url("https://icons.getbootstrap.com/assets/icons/file-earmark-person.svg")
|
||||
|
||||
&.labs-icon
|
||||
background-image: url("https://icons.getbootstrap.com/assets/icons/radioactive.svg")
|
||||
|
||||
main
|
||||
width: 90%
|
||||
height: 100%
|
||||
|
||||
padding: 20px
|
0
iaso/static/css/patients.sass
Normal file
0
iaso/static/css/patients.sass
Normal file
267
iaso/static/css/skeleton.sass
Normal file
267
iaso/static/css/skeleton.sass
Normal file
|
@ -0,0 +1,267 @@
|
|||
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
|
||||
margin: 0
|
||||
padding: 0
|
||||
border: 0
|
||||
font-size: 100%
|
||||
font: inherit
|
||||
vertical-align: baseline
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
|
||||
display: block
|
||||
body
|
||||
line-height: 1
|
||||
background: #fff
|
||||
font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
color: #444
|
||||
-webkit-font-smoothing: antialiased
|
||||
-webkit-text-size-adjust: 100%
|
||||
ol, ul
|
||||
list-style: none
|
||||
blockquote, q
|
||||
quotes: none
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after
|
||||
content: ''
|
||||
content: none
|
||||
table
|
||||
border-collapse: collapse
|
||||
border-spacing: 0
|
||||
.arrow-down
|
||||
position: relative!important
|
||||
left: 114px
|
||||
z-index: 100!important
|
||||
width: 0
|
||||
height: 0
|
||||
border-left: 9px solid transparent
|
||||
border-right: 9px solid transparent
|
||||
border-top: 9px solid blue!important
|
||||
html, body
|
||||
height: 100%
|
||||
width: 100%
|
||||
h1, h2, h3, h4, h5, h6
|
||||
color: #181818
|
||||
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a
|
||||
font-weight: inherit
|
||||
h1
|
||||
font-size: 46px
|
||||
line-height: 50px
|
||||
margin-bottom: 14px
|
||||
h2
|
||||
font-size: 35px
|
||||
line-height: 40px
|
||||
margin-bottom: 10px
|
||||
h3
|
||||
font-size: 28px
|
||||
line-height: 34px
|
||||
margin-bottom: 8px
|
||||
h4
|
||||
font-size: 21px
|
||||
line-height: 30px
|
||||
margin-bottom: 4px
|
||||
h5
|
||||
font-size: 17px
|
||||
line-height: 24px
|
||||
h6
|
||||
font-size: 14px
|
||||
line-height: 21px
|
||||
.subheader
|
||||
color: #777
|
||||
p
|
||||
margin: 0 0 20px 0
|
||||
img
|
||||
margin: 0
|
||||
&.lead
|
||||
font-size: 21px
|
||||
line-height: 27px
|
||||
color: #777
|
||||
em
|
||||
font-style: italic
|
||||
strong
|
||||
font-weight: bold
|
||||
color: #333
|
||||
small
|
||||
font-size: 80%
|
||||
blockquote, blockquote p
|
||||
font-size: 17px
|
||||
line-height: 24px
|
||||
color: #777
|
||||
font-style: italic
|
||||
blockquote
|
||||
margin: 0 0 20px
|
||||
padding: 9px 20px 0 19px
|
||||
border-left: 1px solid #ddd
|
||||
cite
|
||||
display: block
|
||||
font-size: 12px
|
||||
color: #555
|
||||
&:before
|
||||
content: "\2014 \0020"
|
||||
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited
|
||||
color: #555
|
||||
hr
|
||||
border: solid #ddd
|
||||
border-width: 1px 0 0
|
||||
clear: both
|
||||
margin: 10px 0 30px
|
||||
height: 0
|
||||
a, a:visited
|
||||
color: #333
|
||||
text-decoration: underline
|
||||
outline: 0
|
||||
a:hover, a:focus
|
||||
color: #000
|
||||
p a, p a:visited
|
||||
line-height: inherit
|
||||
#inviteeshow
|
||||
&:hover
|
||||
text-decoration: underline
|
||||
cursor: pointer
|
||||
ul, ol
|
||||
margin-bottom: 20px
|
||||
ul
|
||||
list-style: none outside
|
||||
&.square
|
||||
list-style: square outside
|
||||
&.circle
|
||||
list-style: circle outside
|
||||
&.disc
|
||||
list-style: disc outside
|
||||
&.large
|
||||
li
|
||||
line-height: 21px
|
||||
ol
|
||||
list-style: decimal
|
||||
ol, ul.square, ul.circle, ul.disc
|
||||
margin-left: 30px
|
||||
ul ul, ul ol,
|
||||
ol ol, ol ul
|
||||
margin: 4px 0 5px 30px
|
||||
font-size: 90%
|
||||
ul ul li, ul ol li,
|
||||
ol ol li, ol ul li
|
||||
margin-bottom: 6px
|
||||
li
|
||||
line-height: 18px
|
||||
margin-bottom: 12px
|
||||
p
|
||||
line-height: 21px
|
||||
img
|
||||
&.scale-with-grid
|
||||
max-width: 100%
|
||||
height: auto
|
||||
.button,
|
||||
button,
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"]
|
||||
background: #FFF
|
||||
background: #FFF -moz-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.1) 100%)
|
||||
background: #FFF -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.1)), color-stop(100%,rgba(0,0,0,.1)))
|
||||
background: #FFF -webkit-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%)
|
||||
background: #FFF -o-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%)
|
||||
background: #FFF -ms-linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%)
|
||||
background: #FFF linear-gradient(top, rgba(255,255,255,.1) 0%,rgba(0,0,0,.1) 100%)
|
||||
border: 1px solid #aaa
|
||||
border: 1px solid #aaa
|
||||
border-top: 1px solid #ccc
|
||||
border-left: 1px solid #ccc
|
||||
-moz-border-radius: 3px
|
||||
-webkit-border-radius: 3px
|
||||
border-radius: 3px
|
||||
color: #444
|
||||
display: inline-block
|
||||
font-size: 11px
|
||||
font-weight: bold
|
||||
text-decoration: none
|
||||
text-shadow: 0 1px rgba(255, 255, 255, .75)
|
||||
box-shadow: 0 1px 4px 0 rgba(0,0,0,0.06)
|
||||
cursor: pointer
|
||||
margin-bottom: 20px
|
||||
line-height: normal
|
||||
padding: 8px 10px
|
||||
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
.button:hover,
|
||||
button:hover,
|
||||
input[type="submit"]:hover,
|
||||
input[type="reset"]:hover,
|
||||
input[type="button"]:hover
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
.button:active,
|
||||
button:active,
|
||||
input[type="submit"]:active,
|
||||
input[type="reset"]:active,
|
||||
input[type="button"]:active
|
||||
font-weight: bold
|
||||
color: #FFF
|
||||
background-color: #333
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
.button.full-width,
|
||||
button.full-width,
|
||||
input[type="submit"].full-width,
|
||||
input[type="reset"].full-width,
|
||||
input[type="button"].full-width
|
||||
width: 100%
|
||||
padding-left: 0 !important
|
||||
padding-right: 0 !important
|
||||
text-align: center
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner
|
||||
border: 0
|
||||
padding: 0
|
||||
form
|
||||
margin-bottom: 20px
|
||||
fieldset
|
||||
margin-bottom: 20px
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="email"],
|
||||
textarea,
|
||||
select
|
||||
border: 1px solid #ccc
|
||||
padding: 6px 4px
|
||||
outline: none
|
||||
-moz-border-radius: 2px
|
||||
-webkit-border-radius: 2px
|
||||
border-radius: 2px
|
||||
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
color: #777
|
||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.06)
|
||||
margin: 0
|
||||
width: 210px
|
||||
max-width: 100%
|
||||
display: block
|
||||
margin-bottom: 20px
|
||||
background: #fff
|
||||
select
|
||||
padding: 0
|
||||
width: 220px
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
input[type="email"]:focus,
|
||||
textarea:focus
|
||||
-webkit-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
-moz-box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
box-shadow: 0 0 10px 1px rgba(62,188,255,0.15)
|
||||
textarea
|
||||
min-height: 60px
|
||||
label,
|
||||
legend
|
||||
display: block
|
||||
font-weight: bold
|
||||
font-size: 13px
|
||||
input[type="checkbox"]
|
||||
display: inline
|
||||
label span,
|
||||
legend span
|
||||
font-weight: normal
|
||||
font-size: 13px
|
||||
color: #444
|
||||
.remove-bottom
|
||||
margin-bottom: 0 !important
|
||||
.half-bottom
|
||||
margin-bottom: 10px !important
|
||||
.add-bottom
|
||||
margin-bottom: 20px !important
|
BIN
iaso/static/images/emblem.png
Normal file
BIN
iaso/static/images/emblem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
iaso/static/images/shetal.png
Normal file
BIN
iaso/static/images/shetal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
310
iaso/static/js/formset.js
Normal file
310
iaso/static/js/formset.js
Normal file
|
@ -0,0 +1,310 @@
|
|||
/**
|
||||
* jQuery Formset 1.5-pre
|
||||
* @author Stanislaus Madueke (stan DOT madueke AT gmail DOT com)
|
||||
* @requires jQuery 1.2.6 or later
|
||||
*
|
||||
* Copyright (c) 2009, Stanislaus Madueke
|
||||
* All rights reserved.
|
||||
*
|
||||
* Licensed under the New BSD License
|
||||
* See: http://www.opensource.org/licenses/bsd-license.php
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.formset = function (opts) {
|
||||
var options = $.extend({}, $.fn.formset.defaults, opts),
|
||||
flatExtraClasses = options.extraClasses.join(" "),
|
||||
totalForms = $("#id_" + options.prefix + "-TOTAL_FORMS"),
|
||||
maxForms = $("#id_" + options.prefix + "-MAX_NUM_FORMS"),
|
||||
minForms = $("#id_" + options.prefix + "-MIN_NUM_FORMS"),
|
||||
childElementSelector = "input,select,textarea,label,div",
|
||||
$$ = $(this),
|
||||
applyExtraClasses = function (row, ndx) {
|
||||
if (options.extraClasses) {
|
||||
row.removeClass(flatExtraClasses);
|
||||
row.addClass(options.extraClasses[ndx % options.extraClasses.length]);
|
||||
}
|
||||
},
|
||||
updateElementIndex = function (elem, prefix, ndx) {
|
||||
var idRegex = new RegExp(prefix + "-(\\d+|__prefix__)-"),
|
||||
replacement = prefix + "-" + ndx + "-";
|
||||
if (elem.attr("for"))
|
||||
elem.attr("for", elem.attr("for").replace(idRegex, replacement));
|
||||
if (elem.attr("id"))
|
||||
elem.attr("id", elem.attr("id").replace(idRegex, replacement));
|
||||
if (elem.attr("name"))
|
||||
elem.attr("name", elem.attr("name").replace(idRegex, replacement));
|
||||
},
|
||||
hasChildElements = function (row) {
|
||||
return row.find(childElementSelector).length > 0;
|
||||
},
|
||||
showAddButton = function () {
|
||||
return (
|
||||
maxForms.length == 0 || // For Django versions pre 1.2
|
||||
maxForms.val() == "" ||
|
||||
maxForms.val() - totalForms.val() > 0
|
||||
);
|
||||
},
|
||||
/**
|
||||
* Indicates whether delete link(s) can be displayed - when total forms > min forms
|
||||
*/
|
||||
showDeleteLinks = function () {
|
||||
return (
|
||||
minForms.length == 0 || // For Django versions pre 1.7
|
||||
minForms.val() == "" ||
|
||||
totalForms.val() - minForms.val() > 0
|
||||
);
|
||||
},
|
||||
insertDeleteLink = function (row) {
|
||||
var delCssSelector = $.trim(options.deleteCssClass).replace(
|
||||
/\s+/g,
|
||||
"."
|
||||
),
|
||||
addCssSelector = $.trim(options.addCssClass).replace(/\s+/g, ".");
|
||||
|
||||
var delButtonHTML =
|
||||
'<a class="' +
|
||||
options.deleteCssClass +
|
||||
'" href="javascript:void(0)">' +
|
||||
options.deleteText +
|
||||
"</a>";
|
||||
if (options.deleteContainerClass) {
|
||||
// If we have a specific container for the remove button,
|
||||
// place it as the last child of that container:
|
||||
row
|
||||
.find('[class*="' + options.deleteContainerClass + '"]')
|
||||
.append(delButtonHTML);
|
||||
} else if (row.is("TR")) {
|
||||
// If the forms are laid out in table rows, insert
|
||||
// the remove button into the last table cell:
|
||||
row.children(":last").append(delButtonHTML);
|
||||
} else if (row.is("UL") || row.is("OL")) {
|
||||
// If they're laid out as an ordered/unordered list,
|
||||
// insert an <li> after the last list item:
|
||||
row.append("<li>" + delButtonHTML + "</li>");
|
||||
} else {
|
||||
// Otherwise, just insert the remove button as the
|
||||
// last child element of the form's container:
|
||||
row.append(delButtonHTML);
|
||||
}
|
||||
|
||||
// Check if we're under the minimum number of forms - not to display delete link at rendering
|
||||
if (!showDeleteLinks()) {
|
||||
row.find("a." + delCssSelector).hide();
|
||||
}
|
||||
|
||||
row.find("a." + delCssSelector).click(function () {
|
||||
var row = $(this).parents("." + options.formCssClass),
|
||||
del = row.find('input:hidden[id $= "-DELETE"]'),
|
||||
buttonRow = row.siblings(
|
||||
"a." + addCssSelector + ", ." + options.formCssClass + "-add"
|
||||
),
|
||||
forms;
|
||||
if (del.length) {
|
||||
// We're dealing with an inline formset.
|
||||
// Rather than remove this form from the DOM, we'll mark it as deleted
|
||||
// and hide it, then let Django handle the deleting:
|
||||
del.val("on");
|
||||
row.hide();
|
||||
forms = $("." + options.formCssClass).not(":hidden");
|
||||
totalForms.val(forms.length);
|
||||
} else {
|
||||
row.remove();
|
||||
// Update the TOTAL_FORMS count:
|
||||
forms = $("." + options.formCssClass).not(
|
||||
".formset-custom-template"
|
||||
);
|
||||
totalForms.val(forms.length);
|
||||
}
|
||||
for (var i = 0, formCount = forms.length; i < formCount; i++) {
|
||||
// Apply `extraClasses` to form rows so they're nicely alternating:
|
||||
applyExtraClasses(forms.eq(i), i);
|
||||
if (!del.length) {
|
||||
// Also update names and IDs for all child controls (if this isn't
|
||||
// a delete-able inline formset) so they remain in sequence:
|
||||
forms
|
||||
.eq(i)
|
||||
.find(childElementSelector)
|
||||
.each(function () {
|
||||
updateElementIndex($(this), options.prefix, i);
|
||||
});
|
||||
}
|
||||
}
|
||||
// Check if we've reached the minimum number of forms - hide all delete link(s)
|
||||
if (!showDeleteLinks()) {
|
||||
$("a." + delCssSelector).each(function () {
|
||||
$(this).hide();
|
||||
});
|
||||
}
|
||||
// Check if we need to show the add button:
|
||||
if (buttonRow.is(":hidden") && showAddButton()) buttonRow.show();
|
||||
// If a post-delete callback was provided, call it with the deleted form:
|
||||
if (options.removed) options.removed(row);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
$$.each(function (i) {
|
||||
var row = $(this),
|
||||
del = row.find('input:checkbox[id $= "-DELETE"]');
|
||||
if (del.length) {
|
||||
// If you specify "can_delete = True" when creating an inline formset,
|
||||
// Django adds a checkbox to each form in the formset.
|
||||
// Replace the default checkbox with a hidden field:
|
||||
if (del.is(":checked")) {
|
||||
// If an inline formset containing deleted forms fails validation, make sure
|
||||
// we keep the forms hidden (thanks for the bug report and suggested fix Mike)
|
||||
del.before(
|
||||
'<input type="hidden" name="' +
|
||||
del.attr("name") +
|
||||
'" id="' +
|
||||
del.attr("id") +
|
||||
'" value="on" />'
|
||||
);
|
||||
row.hide();
|
||||
} else {
|
||||
del.before(
|
||||
'<input type="hidden" name="' +
|
||||
del.attr("name") +
|
||||
'" id="' +
|
||||
del.attr("id") +
|
||||
'" />'
|
||||
);
|
||||
}
|
||||
// Hide any labels associated with the DELETE checkbox:
|
||||
$('label[for="' + del.attr("id") + '"]').hide();
|
||||
del.remove();
|
||||
}
|
||||
if (hasChildElements(row)) {
|
||||
row.addClass(options.formCssClass);
|
||||
if (row.is(":visible")) {
|
||||
insertDeleteLink(row);
|
||||
applyExtraClasses(row, i);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if ($$.length) {
|
||||
var hideAddButton = !showAddButton(),
|
||||
addButton,
|
||||
template;
|
||||
if (options.formTemplate) {
|
||||
// If a form template was specified, we'll clone it to generate new form instances:
|
||||
template =
|
||||
options.formTemplate instanceof $
|
||||
? options.formTemplate
|
||||
: $(options.formTemplate);
|
||||
template
|
||||
.removeAttr("id")
|
||||
.addClass(options.formCssClass + " formset-custom-template");
|
||||
template.find(childElementSelector).each(function () {
|
||||
updateElementIndex($(this), options.prefix, "__prefix__");
|
||||
});
|
||||
insertDeleteLink(template);
|
||||
} else {
|
||||
// Otherwise, use the last form in the formset; this works much better if you've got
|
||||
// extra (>= 1) forms (thnaks to justhamade for pointing this out):
|
||||
if (options.hideLastAddForm)
|
||||
$("." + options.formCssClass + ":last").hide();
|
||||
template = $("." + options.formCssClass + ":last")
|
||||
.clone(true)
|
||||
.removeAttr("id");
|
||||
template.find('input:hidden[id $= "-DELETE"]').remove();
|
||||
// Clear all cloned fields, except those the user wants to keep (thanks to brunogola for the suggestion):
|
||||
template
|
||||
.find(childElementSelector)
|
||||
.not(options.keepFieldValues)
|
||||
.each(function () {
|
||||
var elem = $(this);
|
||||
// If this is a checkbox or radiobutton, uncheck it.
|
||||
// This fixes Issue 1, reported by Wilson.Andrew.J:
|
||||
if (elem.is("input:checkbox") || elem.is("input:radio")) {
|
||||
elem.attr("checked", false);
|
||||
} else {
|
||||
elem.val("");
|
||||
}
|
||||
});
|
||||
}
|
||||
// FIXME: Perhaps using $.data would be a better idea?
|
||||
options.formTemplate = template;
|
||||
|
||||
var addButtonHTML =
|
||||
'<a class="' +
|
||||
options.addCssClass +
|
||||
'" href="javascript:void(0)">' +
|
||||
options.addText +
|
||||
"</a>";
|
||||
if (options.addContainerClass) {
|
||||
// If we have a specific container for the "add" button,
|
||||
// place it as the last child of that container:
|
||||
var addContainer = $('[class*="' + options.addContainerClass + '"');
|
||||
addContainer.append(addButtonHTML);
|
||||
addButton = addContainer.find('[class="' + options.addCssClass + '"]');
|
||||
} else if ($$.is("TR")) {
|
||||
// If forms are laid out as table rows, insert the
|
||||
// "add" button in a new table row:
|
||||
var numCols = $$.eq(0).children().length, // This is a bit of an assumption :|
|
||||
buttonRow = $(
|
||||
'<tr><td colspan="' + numCols + '">' + addButtonHTML + "</tr>"
|
||||
).addClass(options.formCssClass + "-add");
|
||||
$$.parent().append(buttonRow);
|
||||
addButton = buttonRow.find("a");
|
||||
} else {
|
||||
// Otherwise, insert it immediately after the last form:
|
||||
$$.filter(":last").after(addButtonHTML);
|
||||
addButton = $$.filter(":last").next();
|
||||
}
|
||||
|
||||
if (hideAddButton) addButton.hide();
|
||||
|
||||
addButton.click(function () {
|
||||
var formCount = parseInt(totalForms.val()),
|
||||
row = options.formTemplate
|
||||
.clone(true)
|
||||
.removeClass("formset-custom-template"),
|
||||
buttonRow = $(
|
||||
$(this)
|
||||
.parents("tr." + options.formCssClass + "-add")
|
||||
.get(0) || this
|
||||
),
|
||||
delCssSelector = $.trim(options.deleteCssClass).replace(/\s+/g, ".");
|
||||
applyExtraClasses(row, formCount);
|
||||
row.insertBefore(buttonRow).show();
|
||||
row.find(childElementSelector).each(function () {
|
||||
updateElementIndex($(this), options.prefix, formCount);
|
||||
});
|
||||
totalForms.val(formCount + 1);
|
||||
// Check if we're above the minimum allowed number of forms -> show all delete link(s)
|
||||
if (showDeleteLinks()) {
|
||||
$("a." + delCssSelector).each(function () {
|
||||
$(this).show();
|
||||
});
|
||||
}
|
||||
// Check if we've exceeded the maximum allowed number of forms:
|
||||
if (!showAddButton()) buttonRow.hide();
|
||||
// If a post-add callback was supplied, call it with the added form:
|
||||
if (options.added) options.added(row);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
return $$;
|
||||
};
|
||||
|
||||
/* Setup plugin defaults */
|
||||
$.fn.formset.defaults = {
|
||||
prefix: "form", // The form prefix for your django formset
|
||||
formTemplate: null, // The jQuery selection cloned to generate new form instances
|
||||
addText: "add another", // Text for the add link
|
||||
deleteText: "remove", // Text for the delete link
|
||||
addContainerClass: null, // Container CSS class for the add link
|
||||
deleteContainerClass: null, // Container CSS class for the delete link
|
||||
addCssClass: "add-row", // CSS class applied to the add link
|
||||
deleteCssClass: "delete-row", // CSS class applied to the delete link
|
||||
formCssClass: "dynamic-form", // CSS class applied to each form in a formset
|
||||
extraClasses: [], // Additional CSS classes, which will be applied to each form in turn
|
||||
keepFieldValues: "", // jQuery selector for fields whose values should be kept when the form is cloned
|
||||
added: null, // Function called each time a new form is added
|
||||
removed: null, // Function called each time a form is deleted
|
||||
hideLastAddForm: false, // When set to true, hide last empty add form (becomes visible when clicking on add button)
|
||||
};
|
||||
})(jQuery);
|
5401
iaso/static/js/jquery.min.js
vendored
Normal file
5401
iaso/static/js/jquery.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
{% extends "base_page.html" %}
|
||||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
|
@ -8,23 +8,33 @@
|
|||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'base' %}
|
||||
{% stylesheet 'login' %}
|
||||
{% stylesheet 'auth' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div id="login">
|
||||
<h1 id="logo"
|
||||
style="margin-bottom: 10px; color: #000000!important; text-shadow: -0px 0 #DDE3EB, 0 0px #DDE3EB, 0px 0 #DDE3EB, 0 -0px #DDE3EB!important;">
|
||||
iaso</h1>
|
||||
<form method="POST" action="?i=redirect&r=YToxOntzOjE6ImkiO3M6NDoibWFpbiI7fQ=="><input type="text" name="user"
|
||||
style="background: url(https://i.imgur.com/a80wRzt.png) no-repeat scroll 7px 3px; padding-left: 30px; background-size: 17px; width: 184px; margin-bottom: 10px;"><input
|
||||
type="password" name="pass"
|
||||
style="background: url(https://i.imgur.com/Z2JxXsv.png) no-repeat scroll 7px 4px; padding-left: 30px; background-size: 16px; width: 184px; margin-bottom: 10px;"><input
|
||||
type="submit" value="Access">
|
||||
<blockquote style="border-left: 0px">
|
||||
<p style="margin-bottom: 10px; font-size: 15px;">Gladness becomes Weeping</p><cite>Amos Tutuola</cite>
|
||||
</blockquote>
|
||||
</form><a href="?i=forget" id="forget">don't remember your pass?</a>
|
||||
<h1>iaso.</h1>
|
||||
{% if form.errors %}
|
||||
<p>Your username and password didn't match. Please try again.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if next %}
|
||||
{% if user.is_authenticated %}
|
||||
<p>Your account doesn't have access to this page. To proceed,
|
||||
please login with an account that has access.</p>
|
||||
{% else %}
|
||||
<p>Please login to see this page.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<form action="{% url 'login' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="text" name="username" placeholder="Username" required="required" />
|
||||
<input type="password" name="password" placeholder="Password" required="required" />
|
||||
<button type="submit" class="btn btn-primary btn-block btn-large">Let me in.</button>
|
||||
<input type="hidden" name="next" value="{{next}}">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
20
iaso/templates/auth/logout.html
Normal file
20
iaso/templates/auth/logout.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - logout
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'auth' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div id="login">
|
||||
<h1>goodbye.</h1>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -1 +1,16 @@
|
|||
<!-- dashboard.html -->
|
||||
{% extends "page_with_nav.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - dashboard
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'dashboard' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Let's cook.</h1>
|
||||
{% endblock content %}
|
15
iaso/templates/nav.html
Normal file
15
iaso/templates/nav.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% load static %}
|
||||
<nav>
|
||||
<div>
|
||||
<a href="{% url 'index' %}" class="index-icon"></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'index' %}" class="appointments-icon"></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'patients:index' %}" class="patients-icon"></a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'index' %}" class="labs-icon"></a>
|
||||
</div>
|
||||
</nav>
|
|
@ -11,9 +11,13 @@
|
|||
{% block css %}
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100italic,400italic,700italic,100,400,700">
|
||||
{% endblock %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
|
||||
|
||||
{% block js %}
|
||||
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
36
iaso/templates/page_with_header.html
Normal file
36
iaso/templates/page_with_header.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'skeleton' %}
|
||||
{% stylesheet 'base' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
{% endblock js %}
|
||||
|
||||
{% block body %}
|
||||
<header>
|
||||
<a id="clock"></a>
|
||||
<a>iaso.</a>
|
||||
<a class="profile">
|
||||
<div class="picture" style="background-image: url({% static 'images/shetal.png' %})"></div>
|
||||
<div class="name">Shetal Patel</div>
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<script>
|
||||
document.getElementById('clock').innerHTML = new Date().toLocaleTimeString();
|
||||
|
||||
setInterval(() => {
|
||||
document.getElementById('clock').innerHTML = new Date().toLocaleTimeString();
|
||||
},1000);
|
||||
</script>
|
||||
|
||||
{% block main %}
|
||||
{% endblock main %}
|
||||
|
||||
{% endblock body %}
|
21
iaso/templates/page_with_nav.html
Normal file
21
iaso/templates/page_with_nav.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "page_with_header.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'nav' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ block.super }}
|
||||
{% endblock js %}
|
||||
|
||||
{% block main %}
|
||||
<div class="dash">
|
||||
{% include "nav.html" %}
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
{% endblock main %}
|
21
iaso/templates/patients/create.html
Normal file
21
iaso/templates/patients/create.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "page_with_nav.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - patients
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'patients' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<a href="{% url 'patients:index' %}">back</a>
|
||||
<form method="post">
|
||||
{% crispy form %}
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endblock content %}
|
16
iaso/templates/patients/index.html
Normal file
16
iaso/templates/patients/index.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "page_with_nav.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
|
||||
{% block title %}
|
||||
{{ block.super }} - patients
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ block.super }}
|
||||
{% stylesheet 'patients' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<a href="{% url 'patients:create' %}">create patient</a>
|
||||
{% endblock content %}
|
117
iaso/templates/portal/intake-page1.html
Normal file
117
iaso/templates/portal/intake-page1.html
Normal file
|
@ -0,0 +1,117 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Patient Intake Form</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
||||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{ GOOGLE_PLACES_API_KEY }}&libraries=places"></script>
|
||||
<script>
|
||||
|
||||
let calculateAge = (e) => {
|
||||
let today = new Date();
|
||||
let birthDate = new Date(e.target.value);
|
||||
var age = today.getFullYear() - birthDate.getFullYear();
|
||||
let m = today.getMonth() - birthDate.getMonth();
|
||||
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
|
||||
if (age > 0 && age < 100)
|
||||
document.getElementById('id_1-age').value = age;
|
||||
}
|
||||
|
||||
document.getElementById("id_1-date_of_birth").addEventListener("change", calculateAge, false);
|
||||
|
||||
const isNumericInput = (event) => {
|
||||
const key = event.keyCode;
|
||||
return ((key >= 48 && key <= 57) || // Allow number line
|
||||
(key >= 96 && key <= 105) // Allow number pad
|
||||
);
|
||||
};
|
||||
|
||||
const isModifierKey = (event) => {
|
||||
const key = event.keyCode;
|
||||
return (event.shiftKey === true || key === 35 || key === 36) || // Allow Shift, Home, End
|
||||
(key === 8 || key === 9 || key === 13 || key === 46) || // Allow Backspace, Tab, Enter, Delete
|
||||
(key > 36 && key < 41) || // Allow left, up, right, down
|
||||
(
|
||||
// Allow Ctrl/Command + A,C,V,X,Z
|
||||
(event.ctrlKey === true || event.metaKey === true) &&
|
||||
(key === 65 || key === 67 || key === 86 || key === 88 || key === 90)
|
||||
)
|
||||
};
|
||||
|
||||
const enforceFormat = (event) => {
|
||||
// Input must be of a valid number format or a modifier key, and not longer than ten digits
|
||||
if(!isNumericInput(event) && !isModifierKey(event)){
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
|
||||
const formatToPhone = (event) => {
|
||||
if(isModifierKey(event)) {return;}
|
||||
|
||||
const input = event.target.value.replace(/\D/g,'').substring(0,10); // First ten digits of input only
|
||||
const areaCode = input.substring(0,3);
|
||||
const middle = input.substring(3,6);
|
||||
const last = input.substring(6,10);
|
||||
|
||||
if(input.length > 6){event.target.value = `(${areaCode}) ${middle}-${last}`;}
|
||||
else if(input.length > 3){event.target.value = `(${areaCode}) ${middle}`;}
|
||||
else if(input.length > 0){event.target.value = `(${areaCode}`;}
|
||||
};
|
||||
|
||||
const phoneNumberFields = [document.getElementById('id_1-phone_number'), document.getElementById('id_1-emergency_contact_phone_number')];
|
||||
for (var i = 0; i < phoneNumberFields.length; i++) {
|
||||
let inputElement = phoneNumberFields[i];
|
||||
inputElement.addEventListener('keydown',enforceFormat, false);
|
||||
inputElement.addEventListener('keyup',formatToPhone, false);
|
||||
}
|
||||
|
||||
google.maps.event.addDomListener(window, 'load', (e) => {
|
||||
var input = document.getElementById('id_1-address_line_1');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input);
|
||||
|
||||
google.maps.event.addListener(autocomplete, 'place_changed', function() {
|
||||
var place = autocomplete.getPlace();
|
||||
console.log(place);
|
||||
document.getElementById('id_1-address_line_1').value = place.address_components[0].long_name + " " + place.address_components[1].long_name;
|
||||
document.getElementById('id_1-city').value = place.address_components[2].long_name;
|
||||
document.getElementById('id_1-state').value = place.address_components[4].short_name;
|
||||
document.getElementById('id_1-zip_code').value = place.address_components[6].long_name;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
39
iaso/templates/portal/intake-page10.html
Normal file
39
iaso/templates/portal/intake-page10.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Areas of pain</span></h1>
|
||||
<h3 class="text-decoration-none">Please identify areas of pain.</h3>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
40
iaso/templates/portal/intake-page11.html
Normal file
40
iaso/templates/portal/intake-page11.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Final Remarks</span></h1>
|
||||
|
||||
<h3 class="text-decoration-none">Thank you for spending your time and filling out this form. Here are two final questions for you.</h3>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
68
iaso/templates/portal/intake-page2.html
Normal file
68
iaso/templates/portal/intake-page2.html
Normal file
|
@ -0,0 +1,68 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Prescription Medication</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
<h3 class="text-decoration-none">If you take any prescribed medications, please list them below, otherwise, hit "Next"</h3>
|
||||
{{ wizard.form.management_form|crispy }}
|
||||
{% for form in wizard.form.forms %}
|
||||
<div class="medication-form">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
|
||||
{% csrf_token %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/formset.js' %}"></script>
|
||||
<script>
|
||||
let updateIndicies = (e) => {
|
||||
let forms = document.getElementsByClassName('medication-form');
|
||||
for (i = 0; i < forms.length; i++) {
|
||||
let header = forms[i].getElementsByTagName('h3')[0];
|
||||
header.innerHTML = `Medication ${i + 1}`;
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('form .medication-form').formset({
|
||||
addText: 'Add Medication',
|
||||
deleteText: 'Remove Medication',
|
||||
addCssClass: 'btn btn-outline-success my-3',
|
||||
deleteCssClass: 'btn btn-outline-danger',
|
||||
added: updateIndicies,
|
||||
removed: updateIndicies,
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
68
iaso/templates/portal/intake-page3.html
Normal file
68
iaso/templates/portal/intake-page3.html
Normal file
|
@ -0,0 +1,68 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Other Medicine</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
<h3 class="text-decoration-none">If you take any herbal medicines / supplaments / over-the-counter medicine, please list them below, otherwise, hit "Next"</h3>
|
||||
{{ wizard.form.management_form|crispy }}
|
||||
{% for form in wizard.form.forms %}
|
||||
<div class="supplament-form">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% csrf_token %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/formset.js' %}"></script>
|
||||
<script>
|
||||
let updateIndicies = (e) => {
|
||||
let forms = document.getElementsByClassName('supplament-form');
|
||||
for (i = 0; i < forms.length; i++) {
|
||||
let header = forms[i].getElementsByTagName('h3')[0];
|
||||
header.innerHTML = `Supplament ${i + 1}`;
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('form .supplament-form').formset({
|
||||
addText: 'Add Supplament',
|
||||
deleteText: 'Remove Supplament',
|
||||
addCssClass: 'btn btn-outline-success my-3',
|
||||
deleteCssClass: 'btn btn-outline-danger',
|
||||
added: updateIndicies,
|
||||
removed: updateIndicies,
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
57
iaso/templates/portal/intake-page4.html
Normal file
57
iaso/templates/portal/intake-page4.html
Normal file
|
@ -0,0 +1,57 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Medical History</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
<h3 class="text-decoration-none">Please add any of the following conditions you may have been diagnosed with. You may enter additional medical history on the next page.</h3>
|
||||
{{ wizard.form.management_form|crispy }}
|
||||
{% for form in wizard.form.forms %}
|
||||
<div class="conditions-form">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% csrf_token %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/formset.js' %}"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('form .conditions-form').formset({
|
||||
addText: 'Add Condition',
|
||||
deleteText: `<span class='btn btn-outline-danger'>×</span>`,
|
||||
addCssClass: 'btn btn-outline-success my-3'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
39
iaso/templates/portal/intake-page5.html
Normal file
39
iaso/templates/portal/intake-page5.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Other Conditions</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
||||
{% endblock %}
|
57
iaso/templates/portal/intake-page6.html
Normal file
57
iaso/templates/portal/intake-page6.html
Normal file
|
@ -0,0 +1,57 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Surgical History</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
<h3 class="text-decoration-none">Please list any surgeries you've had.</h3>
|
||||
{{ wizard.form.management_form|crispy }}
|
||||
{% for form in wizard.form.forms %}
|
||||
<div class="surgeries-form">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% csrf_token %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/formset.js' %}"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('form .surgeries-form').formset({
|
||||
addText: 'Add Surgery',
|
||||
deleteText: `<span class='btn btn-outline-danger'>×</span>`,
|
||||
addCssClass: 'btn btn-outline-success my-3'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
57
iaso/templates/portal/intake-page7.html
Normal file
57
iaso/templates/portal/intake-page7.html
Normal file
|
@ -0,0 +1,57 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Accidents & Injuries</span></h1>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
<h3 class="text-decoration-none">Please list any major accidents or injuries you may have had.<br><span class="fst-italic small muted">If you are deciding whether an event was major, you should probably mark it down.</span></h3>
|
||||
{{ wizard.form.management_form|crispy }}
|
||||
{% for form in wizard.form.forms %}
|
||||
<div class="injuries-form">
|
||||
{% crispy form %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% csrf_token %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||
<script src="{% static 'js/formset.js' %}"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('form .injuries-form').formset({
|
||||
addText: 'Add Accident/Injury',
|
||||
deleteText: `<span class='btn btn-outline-danger'>×</span>`,
|
||||
addCssClass: 'btn btn-outline-success my-3'
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
39
iaso/templates/portal/intake-page8.html
Normal file
39
iaso/templates/portal/intake-page8.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Family History</span></h1>
|
||||
<h3 class="text-decoration-none">Please list your family's medical history below.</h3>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% endblock %}
|
69
iaso/templates/portal/intake-page9.html
Normal file
69
iaso/templates/portal/intake-page9.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
{% extends "page_base.html" %}
|
||||
{% load static %}
|
||||
{% load pipeline %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block title %}Patient Intake Form{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
{{ wizard.form.media }}
|
||||
{% stylesheet 'intake' %}
|
||||
<style>
|
||||
.form-check-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input[type="radio"] + label {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
{% csrf_token %}
|
||||
|
||||
<img src="{% static 'images/emblem.png' %}">
|
||||
<h1><span>Social History</span></h1>
|
||||
<h3 class="text-decoration-none">Please list your social history below.</h3>
|
||||
|
||||
{{ wizard.management_form }}
|
||||
|
||||
{% if wizard.form.forms %}
|
||||
{{ wizard.form.management_form }}
|
||||
{% for form in wizard.form.forms %}
|
||||
{% crispy form %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% crispy wizard.form %}
|
||||
{% endif %}
|
||||
{% include 'portal/progress_row.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
||||
<script>
|
||||
let sections = document.querySelectorAll('.checkboxinput');
|
||||
|
||||
sections.forEach((checkbox) => {
|
||||
checkbox.addEventListener('change', (e) => {
|
||||
let section = checkbox.parentElement.parentElement.nextElementSibling
|
||||
|
||||
if (e.target.checked) {
|
||||
section.style = 'display: block';
|
||||
} else {
|
||||
section.style = 'display: none';
|
||||
}
|
||||
});
|
||||
|
||||
checkbox.parentElement.parentElement.nextElementSibling.style = 'display: none';
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
1
iaso/templates/portal/intake_submit.html
Normal file
1
iaso/templates/portal/intake_submit.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{ request }}
|
14
iaso/templates/portal/progress_row.html
Normal file
14
iaso/templates/portal/progress_row.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="d-flex justify-content-between">
|
||||
{% if wizard.steps.prev %}
|
||||
<button name="wizard_goto_step" class="col-md-4 m-2 text-left btn btn-lg border border-black" type="submit" value="{{ wizard.steps.prev }}">Previous</button>
|
||||
{% endif %}
|
||||
{% if wizard.steps.next %}
|
||||
<input class="col-md-4 m-2 text-center btn btn-lg border border-black" type="submit" value="Next"></input>
|
||||
{% else %}
|
||||
<input class="col-md-4 m-2 text-center btn btn-lg border border-black" type="submit" value="Submit"></input>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="progress-bar">
|
||||
<p class="p-3 text-center">Page {{wizard.steps.step1}} of {{wizard.steps.count}}</p>
|
||||
<progress value="{{ wizard.steps.step1 }}" max="{{ wizard.steps.count }}"></progress>
|
||||
</div>
|
|
@ -2,6 +2,9 @@ from django.contrib import admin
|
|||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("", include("iaso.apps.auth.urls")),
|
||||
path("admin/", admin.site.urls),
|
||||
path("patients/", include("iaso.apps.patients.urls", namespace="patients")),
|
||||
path("portal/", include("iaso.apps.portal.urls", namespace="portal"))
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user