Skip to content
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

Merged
merged 42 commits into from
Oct 10, 2023
Merged

Case amb #3087

merged 42 commits into from
Oct 10, 2023

Conversation

urchinpro
Copy link
Collaborator

Описание изменений

Case amb

@@ -405,6 +407,7 @@ def researches_params(request):
def researches_update(request):
response = {"ok": False}
request_data = json.loads(request.body)
print(request_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

if len(title) > 0 and (desc or Podrazdeleniya.objects.filter(pk=department_pk).exists()):
print("попал")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

api/views.py Outdated
@@ -517,6 +517,7 @@ def departments(request):
}
if hasattr(request, 'plain_response') and request.plain_response:
return data
print(data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

api/views.py Outdated
if e < 4 or not en[e] or e == 13:
continue

t = e - 4
has_def = DResearches.objects.filter(hide=False, site_type__isnull=True, **DResearches.filter_type(e)).exists()
if e == 16:
print("has_def")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

api/views.py Outdated
if e < 4 or not en[e] or e == 13:
continue

t = e - 4
has_def = DResearches.objects.filter(hide=False, site_type__isnull=True, **DResearches.filter_type(e)).exists()
if e == 16:
print("has_def")
print(has_def)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

api/views.py Outdated
@@ -762,6 +767,8 @@
t1.join()
t2.join()

print(ret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

api/views.py Outdated Show resolved Hide resolved
@@ -330,6 +332,7 @@ def filter_type(t):
14: dict(is_application=True),
15: dict(is_monitoring=True),
16: dict(is_expertise=True),
17: dict(is_case=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
17: dict(is_case=True)
17: dict(is_case=True),

directory/models.py Outdated Show resolved Hide resolved
urchinpro and others added 6 commits September 22, 2023 19:21
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -330,6 +332,7 @@ def filter_type(t):
14: dict(is_application=True),
15: dict(is_monitoring=True),
16: dict(is_expertise=True),
17: dict(is_case=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
17: dict(is_case=True)
17: dict(is_case=True),

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
api/views.py Outdated
@@ -2634,6 +2635,7 @@ def get_price_data(request):
@group_required('Конструктор: Настройка организации')
def update_price(request):
request_data = json.loads(request.body)
print(request_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

@login_required
def patient_open_case(request):
request_data = json.loads(request.body)
print("request_data")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

def patient_open_case(request):
request_data = json.loads(request.body)
print("request_data")
print(request_data)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

print("request_data")
print(request_data)
card_pk = request_data.get("card_pk", None)
print(card_pk)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <841> reported by reviewdog 🐶
local variable 'child_direction' is assigned to but never used

api/directions/views.py Outdated Show resolved Hide resolved
api/directions/views.py Outdated Show resolved Hide resolved
urchinpro and others added 3 commits September 27, 2023 20:50
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
data_case[o_case.iss_id] = ""
child_direction = tree_direction(o_case.iss_id)
for child in child_direction:
print(child)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

data_case[o_case.iss_id] = ""
child_direction = tree_direction(o_case.iss_id)
for child in child_direction:
print(child)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

Comment on lines +503 to +505
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
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
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
)
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)

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

@@ -165,6 +168,7 @@ def directions_generate(request):
hospital_department_override=p.get("hospital_department_override", -1),
hospital_override=p.get("hospital_override", -1),
price_category=p.get("priceCategory", -1),
case_id = p.get("caseId", -2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
case_id = p.get("caseId", -2),
case_id=p.get("caseId", -2),

n = Napravleniya.objects.filter(parent_case_id=o_case.iss_id).first()
iss = Issledovaniya.objects.filter(napravleniye=n).first()
if iss:
title = iss.research.short_title if iss.research.short_title else iss.research.title
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
title = iss.research.short_title if iss.research.short_title else iss.research.title
title = iss.research.short_title if iss.research.short_title else iss.research.title

Comment on lines 1525 to 1545
client_id,
doc_current if not for_rmis else None,
finsource,
diagnos,
history_num,
doc_current,
ofname_id,
ofname,
for_rmis=for_rmis,
rmis_data=rmis_data,
parent_id=parent_iss,
parent_auto_gen_id=parent_auto_gen,
parent_slave_hosp_id=parent_slave_hosp,
rmis_slot=rmis_slot,
direction_purpose=direction_purpose,
external_organization=external_organization,
price_category=price_category,
hospital=hospital_override,
external_order=external_order,
price_name_id=price_name,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
client_id,
doc_current if not for_rmis else None,
finsource,
diagnos,
history_num,
doc_current,
ofname_id,
ofname,
for_rmis=for_rmis,
rmis_data=rmis_data,
parent_id=parent_iss,
parent_auto_gen_id=parent_auto_gen,
parent_slave_hosp_id=parent_slave_hosp,
rmis_slot=rmis_slot,
direction_purpose=direction_purpose,
external_organization=external_organization,
price_category=price_category,
hospital=hospital_override,
external_order=external_order,
price_name_id=price_name,
)
client_id,
doc_current if not for_rmis else None,
finsource,
diagnos,
history_num,
doc_current,
ofname_id,
ofname,
for_rmis=for_rmis,
rmis_data=rmis_data,
parent_id=parent_iss,
parent_auto_gen_id=parent_auto_gen,
parent_slave_hosp_id=parent_slave_hosp,
rmis_slot=rmis_slot,
direction_purpose=direction_purpose,
external_organization=external_organization,
price_category=price_category,
hospital=hospital_override,
external_order=external_order,
price_name_id=price_name,
)

Comment on lines +1547 to +1551
issledovaniye_case = Issledovaniya(
napravleniye=napravleniye_case,
research=research_case,
deferred=False
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
issledovaniye_case = Issledovaniya(
napravleniye=napravleniye_case,
research=research_case,
deferred=False
)
issledovaniye_case = Issledovaniya(napravleniye=napravleniye_case, research=research_case, deferred=False)

@@ -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
Copy link
Contributor

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

@@ -165,6 +168,7 @@ def directions_generate(request):
hospital_department_override=p.get("hospital_department_override", -1),
hospital_override=p.get("hospital_override", -1),
price_category=p.get("priceCategory", -1),
case_id = p.get("caseId", -2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <251> reported by reviewdog 🐶
unexpected spaces around keyword / parameter equals

@@ -165,6 +168,7 @@ def directions_generate(request):
hospital_department_override=p.get("hospital_department_override", -1),
hospital_override=p.get("hospital_override", -1),
price_category=p.get("priceCategory", -1),
case_id = p.get("caseId", -2),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <251> reported by reviewdog 🐶
unexpected spaces around keyword / parameter equals

n = Napravleniya.objects.filter(parent_case_id=o_case.iss_id).first()
iss = Issledovaniya.objects.filter(napravleniye=n).first()
if iss:
title = iss.research.short_title if iss.research.short_title else iss.research.title
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <271> reported by reviewdog 🐶
multiple spaces after keyword

data_case.append({"id": o_case.iss_id, "label": f"{title} от {o_case.date_create}"})


data = {"data": data_case}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <303> reported by reviewdog 🐶
too many blank lines (2)

rmis_slot=rmis_slot,
direction_purpose=direction_purpose,
external_organization=external_organization,
price_category=price_category,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <122> reported by reviewdog 🐶
continuation line missing indentation or outdented

direction_purpose=direction_purpose,
external_organization=external_organization,
price_category=price_category,
hospital=hospital_override,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <122> reported by reviewdog 🐶
continuation line missing indentation or outdented

external_organization=external_organization,
price_category=price_category,
hospital=hospital_override,
external_order=external_order,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <122> reported by reviewdog 🐶
continuation line missing indentation or outdented

price_category=price_category,
hospital=hospital_override,
external_order=external_order,
price_name_id=price_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <122> reported by reviewdog 🐶
continuation line missing indentation or outdented

hospital=hospital_override,
external_order=external_order,
price_name_id=price_name,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <122> reported by reviewdog 🐶
continuation line missing indentation or outdented

@mikhailprivalov mikhailprivalov merged commit cecf416 into develop Oct 10, 2023
6 checks passed
@delete-merged-branch delete-merged-branch bot deleted the caseAmb branch October 10, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants