Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
021e4ff
Many node modules deprecated, upgrading and removing node_modules from
justin-ait Jul 10, 2023
c2d7703
Upgraded Django, Python and required packages. Fixed breaking changes.
justin-ait Jul 10, 2023
bfbca5b
Added configuration to containerize and run via gunicorn/nginx
justin-ait Aug 11, 2023
bc31b62
Resolved issue displaying problems
justin-ait Aug 11, 2023
9047c9a
Removed deprecated references to long type
justin-ait Aug 14, 2023
ac59e09
Resolved issues uploading and viewing files
justin-ait Aug 14, 2023
8478290
Updates to runtime config
justin-ait Aug 17, 2023
bd76faf
update .gitignore + requirement.txt
jwang-augusto Aug 25, 2023
86dbda6
Added URL config for debug toolbar
justin-ait Aug 25, 2023
1c560ee
refactor
jwang-augusto Aug 29, 2023
c829c79
Refactored list_unregistered_users to improve performance
justin-ait Aug 29, 2023
a59b851
comment out problem segments, effected, effecting
jwang-augusto Aug 29, 2023
83a459c
Merge branch 'v-next' into refactor-queries
jwang-augusto Aug 30, 2023
be0b098
fix date format
jwang-augusto Aug 30, 2023
a6be475
Updates to nginx/gunicorn config
justin-ait Aug 30, 2023
ee69420
Merge branch 'v-next' of https://github.com/smallbrainrecords/foundat…
justin-ait Aug 30, 2023
bd42656
update get_user_labeled_list
jwang-augusto Aug 31, 2023
d8ef984
Merge branch 'v-next' of https://github.com/smallbrainrecords/foundat…
jwang-augusto Aug 31, 2023
617fb72
Numerous bug fixes, disabled timeit interceptor
justin-ait Sep 21, 2023
7d175dd
Updated to load all todos on patient admin page load
justin-ait Sep 22, 2023
0a79370
Resolving issue with tz awareness when submitting forms with user input
justin-ait Sep 27, 2023
0bc04ca
Resolved logout issue and file upload size limit
justin-ait Sep 28, 2023
1c722c6
added one bmi per encounter solution
jjherrera1998P Sep 28, 2021
08c7ae8
Resolved issue with display of patient name on search
justin-ait Oct 2, 2023
cc0be9b
Resolved issues with saving user edits and display of patient record on
justin-ait Oct 2, 2023
99b6036
Resolved issue with copied encounter data
justin-ait Oct 5, 2023
b55ad46
Bug fixes and performance improvements
justin-ait Oct 13, 2023
72dddc8
Resolved bugs related to SNOMED querying
justin-ait Oct 16, 2023
20877a2
Bug fixes and resolving BMI handling
justin-ait Oct 24, 2023
074a345
Minor bug fixes
justin-ait Oct 30, 2023
c1db9fa
Bug fixes, migrations needed to allow deletes of encounters and
justin-ait Nov 9, 2023
5be2984
Resolving search error
justin-ait Jul 23, 2024
d8ffc13
Adding note field to data types, resolving failure to delete issue,
justin-ait Jul 30, 2024
544ec6a
Enabling deactivation of users, prerequisites for filtering non patient
justin-ait Aug 8, 2024
34f90aa
Updates to filter out inactive users from tagging
justin-ait Aug 16, 2024
6aec0ca
Incrementing revision
justin-ait Aug 16, 2024
c0bed70
Upgrade Django to v5, remove unused htmlcov/, remove unused deps from
justin-ait Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
project/local_settings.py
.DS_Store
20 changes: 18 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
project/local_settings.py

media/*
staticdev_bk/*
templates_bk/*
Expand All @@ -9,8 +10,23 @@ templates_bk/*
media
Icon
static/CACHE
static/node_modules
static/node_modules/
staticdev/CACHE
venv
.coverage
/static/css/.sass-cache/
/static/css/.sass-cache/
.venv
.vscode
*.pem
.venv/*
static/node_modules/*
client-cert.pem
client-key.pem
server-ca.pem
project/settings.py

*.key
*.crt
*.pem

.DS_Store
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.12-bookworm

ARG django_settings_module
ENV DJANGO_SETTINGS_MODULE=${django_settings_module}

RUN apt-get -y update && apt-get -y install nginx

COPY nginx.conf /etc/nginx/sites-available/default

COPY . /
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

EXPOSE 8000
EXPOSE 80

RUN chmod u+x init.sh
ENTRYPOINT ["./init.sh"]
29 changes: 14 additions & 15 deletions apps/a1c_app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
"""
from django.conf.urls import url

from a1c_app.views import *
from django.urls import re_path

urlpatterns = [
url(r'^(?P<a1c_id>\d+)/info$', get_a1c_info),
url(r'^(?P<value_id>\d+)/value_info$', get_observation_value_info),
url(r'^(?P<a1c_id>\d+)/add_note$', add_note),
url(r'^(?P<component_id>\d+)/add_value$', add_value),
url(r'^(?P<a1c_id>\d+)/patient_refused$', patient_refused),
url(r'^note/(?P<note_id>\d+)/edit$', edit_note),
url(r'^note/(?P<note_id>\d+)/delete$', delete_note),
url(r'^value/(?P<value_id>\d+)/delete$', delete_value),
url(r'^value/(?P<value_id>\d+)/edit$', edit_value),
url(r'^value/(?P<value_id>\d+)/add_note$', add_value_note),
url(r'^value/note/(?P<note_id>\d+)/edit$', edit_value_note),
url(r'^value/note/(?P<note_id>\d+)/delete$', delete_value_note),
url(r'^(?P<a1c_id>\d+)/track/click/$', track_a1c_click),
re_path(r"^(?P<a1c_id>\d+)/info$", get_a1c_info),
re_path(r"^(?P<value_id>\d+)/value_info$", get_observation_value_info),
re_path(r"^(?P<a1c_id>\d+)/add_note$", add_note),
re_path(r"^(?P<component_id>\d+)/add_value$", add_value),
re_path(r"^(?P<a1c_id>\d+)/patient_refused$", patient_refused),
re_path(r"^note/(?P<note_id>\d+)/edit$", edit_note),
re_path(r"^note/(?P<note_id>\d+)/delete$", delete_note),
re_path(r"^value/(?P<value_id>\d+)/delete$", delete_value),
re_path(r"^value/(?P<value_id>\d+)/edit$", edit_value),
re_path(r"^value/(?P<value_id>\d+)/add_note$", add_value_note),
re_path(r"^value/note/(?P<note_id>\d+)/edit$", edit_value_note),
re_path(r"^value/note/(?P<note_id>\d+)/delete$", delete_value_note),
re_path(r"^(?P<a1c_id>\d+)/track/click/$", track_a1c_click),
]
49 changes: 29 additions & 20 deletions apps/a1c_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,28 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
"""
from django.contrib.auth.decorators import login_required

from common.views import *
from data_app.serializers import ObservationValueTextNoteSerializer, ObservationValueSerializer
from emr.models import AOneCTextNote, ObservationComponent, UserProfile, ObservationValueTextNote, \
AOneC, ObservationValue
from data_app.serializers import (
ObservationValueSerializer,
ObservationValueTextNoteSerializer,
)
from django.contrib.auth.decorators import login_required
from emr.models import (
AOneC,
AOneCTextNote,
ObservationComponent,
ObservationValue,
ObservationValueTextNote,
UserProfile,
)
from emr.operations import op_add_event
from problems_app.operations import add_problem_activity
from .serializers import AOneCTextNoteSerializer, AOneCSerializer

from .serializers import AOneCSerializer, AOneCTextNoteSerializer


# set problem authentication to false if not physician, admin
@timeit
#@timeit
def set_problem_authentication_false(actor_profile, problem):
role = actor_profile.role
authenticated = role in ["physician", "admin"]
Expand All @@ -35,7 +44,7 @@ def set_problem_authentication_false(actor_profile, problem):


@login_required
@timeit
#@timeit
def track_a1c_click(request, a1c_id):
actor = request.user
a1c_info = AOneC.objects.get(id=a1c_id)
Expand All @@ -49,7 +58,7 @@ def track_a1c_click(request, a1c_id):


@login_required
@timeit
#@timeit
def get_a1c_info(request, a1c_id):
a1c_info = AOneC.objects.get(id=a1c_id)
resp = {}
Expand All @@ -61,7 +70,7 @@ def get_a1c_info(request, a1c_id):
# Note
@permissions_required(["add_a1c_note"])
@login_required
@timeit
#@timeit
def add_note(request, a1c_id):
resp = {}
note = request.POST.get("note")
Expand All @@ -75,7 +84,7 @@ def add_note(request, a1c_id):

@permissions_required(["edit_a1c_note"])
@login_required
@timeit
#@timeit
def edit_note(request, note_id):
resp = {}

Expand All @@ -90,7 +99,7 @@ def edit_note(request, note_id):

@permissions_required(["delete_a1c_note"])
@login_required
@timeit
#@timeit
def delete_note(request, note_id):
resp = {}

Expand All @@ -102,7 +111,7 @@ def delete_note(request, note_id):

@permissions_required(["add_a1c"])
@login_required
@timeit
#@timeit
def patient_refused(request, a1c_id):
a1c = AOneC.objects.get(id=a1c_id)
observation = a1c.observation
Expand Down Expand Up @@ -132,7 +141,7 @@ def patient_refused(request, a1c_id):
# Value
@permissions_required(["add_a1c"])
@login_required
@timeit
#@timeit
def add_value(request, component_id):
resp = {}
actor_profile = UserProfile.objects.get(user=request.user)
Expand Down Expand Up @@ -169,7 +178,7 @@ def add_value(request, component_id):

@permissions_required(["delete_observation_component"])
@login_required
@timeit
#@timeit
def delete_value(request, value_id):
resp = {}
ObservationValue.objects.get(id=value_id).delete()
Expand All @@ -178,7 +187,7 @@ def delete_value(request, value_id):


@login_required
@timeit
#@timeit
def get_observation_value_info(request, value_id):
resp = {}

Expand All @@ -193,7 +202,7 @@ def get_observation_value_info(request, value_id):

@permissions_required(["edit_observation_component"])
@login_required
@timeit
#@timeit
def edit_value(request, value_id):
resp = {}

Expand All @@ -211,7 +220,7 @@ def edit_value(request, value_id):
# Value Note
@permissions_required(["add_a1c_note"])
@login_required
@timeit
#@timeit
def add_value_note(request, value_id):
resp = {}

Expand All @@ -225,7 +234,7 @@ def add_value_note(request, value_id):

@permissions_required(["edit_a1c_note"])
@login_required
@timeit
#@timeit
def edit_value_note(request, note_id):
resp = {}
note = request.POST.get('note')
Expand All @@ -241,7 +250,7 @@ def edit_value_note(request, note_id):

@permissions_required(["delete_a1c_note"])
@login_required
@timeit
#@timeit
def delete_value_note(request, note_id):
resp = {}

Expand Down
61 changes: 26 additions & 35 deletions apps/colons_app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,34 @@
along with this program. If not, see <http://www.gnu.org/licenses/>
"""

from django.conf.urls import url

from colons_app.views import *
from django.urls import re_path

urlpatterns = [
url(r'^(?P<colon_id>\d+)/info$', get_colon_info),
url(r'^(?P<colon_id>\d+)/refuse$', refuse),
url(r'^(?P<colon_id>\d+)/not_appropriate$', not_appropriate),

url(r'^study/(?P<study_id>\d+)/info$', get_study_info),
url(r'^(?P<colon_id>\d+)/add_study$', add_study),
url(r'^(?P<study_id>\d+)/edit_study$', edit_study),
url(r'^(?P<study_id>\d+)/delete_study$', delete_study),

url(r'^study/(?P<study_id>\d+)/upload_image$', upload_study_image),
url(r'^study/(?P<study_id>\d+)/addImage$', add_study_image),
url(r'^study/(?P<study_id>\d+)/image/(?P<image_id>\d+)/delete$', delete_study_image),

url(r'^(?P<colon_id>\d+)/add_factor$', add_factor),
url(r'^(?P<colon_id>\d+)/delete_factor$', delete_factor),


url(r'^(?P<colon_id>\d+)/add_note$', add_note),
url(r'^note/(?P<note_id>\d+)/edit$', edit_note),
url(r'^note/(?P<note_id>\d+)/delete$', delete_note),

url(r'^(?P<colon_id>\d+)/track/click$', track_colon_click),

re_path(r"^(?P<colon_id>\d+)/info$", get_colon_info),
re_path(r"^(?P<colon_id>\d+)/refuse$", refuse),
re_path(r"^(?P<colon_id>\d+)/not_appropriate$", not_appropriate),
re_path(r"^study/(?P<study_id>\d+)/info$", get_study_info),
re_path(r"^(?P<colon_id>\d+)/add_study$", add_study),
re_path(r"^(?P<study_id>\d+)/edit_study$", edit_study),
re_path(r"^(?P<study_id>\d+)/delete_study$", delete_study),
re_path(r"^study/(?P<study_id>\d+)/upload_image$", upload_study_image),
re_path(r"^study/(?P<study_id>\d+)/addImage$", add_study_image),
re_path(
r"^study/(?P<study_id>\d+)/image/(?P<image_id>\d+)/delete$", delete_study_image
),
re_path(r"^(?P<colon_id>\d+)/add_factor$", add_factor),
re_path(r"^(?P<colon_id>\d+)/delete_factor$", delete_factor),
re_path(r"^(?P<colon_id>\d+)/add_note$", add_note),
re_path(r"^note/(?P<note_id>\d+)/edit$", edit_note),
re_path(r"^note/(?P<note_id>\d+)/delete$", delete_note),
re_path(r"^(?P<colon_id>\d+)/track/click$", track_colon_click),
# new restURL
url(r'^(?P<colon_id>\d+)$', get_colon_info),
url(r'^(?P<colon_id>\d+)/studies$', get_colon_cancer_studies),
url(r'^(?P<colon_id>\d+)/studies/(?P<study_id>\d+)$', colon_cancer_study),

url(r'^(?P<colon_id>\d+)/risk-factors$', get_risk_factors),
url(r'^(?P<colon_id>\d+)/risk-factors/(?P<risk_factor_id>\d+)$', risk_factor),

url(r'^(?P<colon_id>\d+)/notes$', get_notes),
url(r'^(?P<colon_id>\d+)/notes/(?P<note_id>\d+)$', note),

re_path(r"^(?P<colon_id>\d+)$", get_colon_info),
re_path(r"^(?P<colon_id>\d+)/studies$", get_colon_cancer_studies),
re_path(r"^(?P<colon_id>\d+)/studies/(?P<study_id>\d+)$", colon_cancer_study),
re_path(r"^(?P<colon_id>\d+)/risk-factors$", get_risk_factors),
re_path(r"^(?P<colon_id>\d+)/risk-factors/(?P<risk_factor_id>\d+)$", risk_factor),
re_path(r"^(?P<colon_id>\d+)/notes$", get_notes),
re_path(r"^(?P<colon_id>\d+)/notes/(?P<note_id>\d+)$", note),
]
Loading