-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case amb #3087
Case amb #3087
Changes from 24 commits
b348c32
7379597
4c03c71
eaefd3f
b167f46
99e6b06
2046432
1667c99
e18ba81
7768dc5
b3b10d9
7f393f4
0326357
1b0b7b2
390a27d
5a2412f
f7f9ddc
5486c79
e65f035
4d67e31
94c9bbb
5188f4e
07e1bd5
b132d1d
5efedc2
62387f1
581414c
d087a08
cd2b61b
2e86003
ae39ed9
ddafb37
6c60cd7
4745778
5014c6a
aa3cd89
84c7594
7b5b773
288c71a
80d83e4
44c2d2b
de5e490
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ | |
from utils.common import non_selected_visible_type, none_if_minus_1, values_from_structure_data | ||
from utils.dates import normalize_date, date_iter_range, try_strptime | ||
from utils.dates import try_parse_range | ||
from utils.tree_directions import tree_direction | ||
from utils.xh import check_float_is_valid, short_fio_dots | ||
from .sql_func import ( | ||
get_history_dir, | ||
|
@@ -93,6 +94,7 @@ | |
get_directions_by_user, | ||
get_confirm_direction_by_hospital, | ||
get_directions_meta_info, | ||
get_patient_open_case_data, | ||
) | ||
from api.stationar.stationar_func import hosp_get_hosp_direction, hosp_get_text_iss | ||
from forms.forms_func import hosp_get_operation_data | ||
|
@@ -108,6 +110,7 @@ def directions_generate(request): | |
result = {"ok": False, "directions": [], "directionsStationar": [], "message": ""} | ||
if request.method == "POST": | ||
p = json.loads(request.body) | ||
print(p) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [flake8] <201> reported by reviewdog 🐶 |
||
card_pk = p.get("card_pk") | ||
card = None | ||
if card_pk == -1: | ||
|
@@ -310,7 +313,7 @@ def directions_history(request): | |
# status: 4 - выписано пользователем, 0 - только выписанные, 1 - Материал получен лабораторией. 2 - результат подтвержден, 3 - направления пациента, -1 - отменено, | ||
if req_status == 4: | ||
user_creater = request.user.doctorprofile.pk | ||
if req_status in [0, 1, 2, 3, 5]: | ||
if req_status in [0, 1, 2, 3, 5, 7]: | ||
patient_card = pk | ||
|
||
if req_status == 5: | ||
|
@@ -459,6 +462,10 @@ def directions_history(request): | |
continue | ||
elif type_service == 'is_lab' and (i[11] or i[14] or i[15] or i[16] or i[17] or i[18] or i[19]): | ||
continue | ||
elif req_status == 7 and not i[36]: | ||
continue | ||
elif i[36] and req_status != 7: | ||
continue | ||
if i[0] != last_dir: | ||
status = min(status_set) | ||
if len(lab) > 0: | ||
|
@@ -470,7 +477,7 @@ def directions_history(request): | |
if aux_researches_obj.exists(): | ||
aux_researches = [{"pk": i.aux_research.pk, "title": i.aux_research.title} for i in aux_researches_obj] | ||
has_aux = True | ||
if (req_status == 2 and status == 2) or (req_status in [3, 4] and status != -2) or (req_status == 1 and status == 1) or (req_status == 0 and status == 0): | ||
if (req_status == 2 and status == 2) or (req_status in [3, 4, 7] and status != -2) or (req_status == 1 and status == 1) or (req_status == 0 and status == 0): | ||
final_result.append( | ||
{ | ||
'pk': dir, | ||
|
@@ -581,7 +588,7 @@ def directions_history(request): | |
if aux_researches_obj.exists(): | ||
aux_researches = [{"pk": i.aux_research.pk, "title": i.aux_research.title} for i in aux_researches_obj] | ||
has_aux = True | ||
if (req_status == 2 and status == 2) or (req_status in [3, 4] and status != -2) or (req_status == 1 and status == 1) or (req_status == 0 and status == 0): | ||
if (req_status == 2 and status == 2) or (req_status in [3, 4, 7] and status != -2) or (req_status == 1 and status == 1) or (req_status == 0 and status == 0): | ||
final_result.append( | ||
{ | ||
'pk': dir, | ||
|
@@ -1442,6 +1449,7 @@ def directions_paraclinic_form(request): | |
| Q(research__is_monitoring=True) | ||
| Q(research__is_expertise=True) | ||
| Q(research__is_aux=True) | ||
| Q(research__is_case=True) | ||
) | ||
) | ||
.select_related('research', 'research__microbiology_tube', 'research__podrazdeleniye') | ||
|
@@ -4424,3 +4432,20 @@ def meta_info(request): | |
index_num = res_direction.index(i['direction']) | ||
sort_result[index_num] = i | ||
return JsonResponse({"rows": sort_result}) | ||
|
||
|
||
@login_required | ||
def patient_open_case(request): | ||
request_data = json.loads(request.body) | ||
card_pk = request_data.get("card_pk", None) | ||
data_case = {} | ||
if card_pk: | ||
open_case = get_patient_open_case_data(card_pk) | ||
for o_case in open_case: | ||
data_case[o_case.iss_id] = "" | ||
child_direction = tree_direction(o_case.iss_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [flake8] <841> reported by reviewdog 🐶 |
||
for child in child_direction: | ||
print(child) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [flake8] <201> reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [flake8] <201> reported by reviewdog 🐶 |
||
|
||
data = {"data": ""} | ||
return JsonResponse(data) |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -500,6 +500,9 @@ class Napravleniya(models.Model): | |||||||||
parent_slave_hosp = models.ForeignKey( | ||||||||||
'Issledovaniya', related_name='parent_slave_hosp', help_text="Из стационарного протокола", db_index=True, blank=True, null=True, default=None, on_delete=models.SET_NULL | ||||||||||
) | ||||||||||
parent_case = models.ForeignKey( | ||||||||||
'Issledovaniya', related_name='parent_case', help_text="Случай основание", db_index=True, blank=True, null=True, default=None, on_delete=models.SET_NULL | ||||||||||
) | ||||||||||
Comment on lines
+503
to
+505
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [black-format] reported by reviewdog 🐶
Suggested change
|
||||||||||
rmis_slot_id = models.CharField(max_length=20, blank=True, null=True, default=None, help_text="РМИС слот") | ||||||||||
microbiology_n = models.CharField(max_length=10, blank=True, default='', help_text="Номер в микробиологической лаборатории") | ||||||||||
time_microbiology_receive = models.DateTimeField(null=True, blank=True, db_index=True, help_text='Дата/время приёма материала микробиологии') | ||||||||||
|
Unchanged files with check annotations Beta
return result; | ||
}; | ||
export const convertSubjectNameToTitle = (object: any, subjectName: string | null, name: string) => { | ||
const obj = object || convertSubjectNameToCertObject(subjectName); | ||
// eslint-disable-next-line no-console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[flake8] <401> reported by reviewdog 🐶
'utils.tree_directions.tree_direction' imported but unused