From b348c32200ea7b9f9e6f15c2f37257cd48178a87 Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Fri, 22 Sep 2023 11:57:05 +0800 Subject: [PATCH 01/38] . --- api/views.py | 1 + appconf/manager.py | 1 + directory/models.py | 3 +++ l2-frontend/src/construct/ConstructParaclinic.vue | 4 ++++ l2-frontend/src/construct/ParaclinicResearchEditor.vue | 5 +++-- podrazdeleniya/models.py | 2 ++ pyproject.toml | 2 +- 7 files changed, 15 insertions(+), 3 deletions(-) diff --git a/api/views.py b/api/views.py index 14e0e05ede..ac083abc07 100644 --- a/api/views.py +++ b/api/views.py @@ -517,6 +517,7 @@ def departments(request): } if hasattr(request, 'plain_response') and request.plain_response: return data + print(data) return JsonResponse(data) if can_edit: diff --git a/appconf/manager.py b/appconf/manager.py index c8a7484bd1..1c68eeb2fc 100644 --- a/appconf/manager.py +++ b/appconf/manager.py @@ -168,6 +168,7 @@ def l2_modules() -> dict: "price_customer", "price_externel_performer", "ftp", + "case", ] }, "consults_module": SettingManager.get("consults_module", default='false', default_type='b'), diff --git a/directory/models.py b/directory/models.py index 4a74e91b69..2e2081780f 100644 --- a/directory/models.py +++ b/directory/models.py @@ -243,6 +243,7 @@ class Researches(models.Model): is_monitoring = models.BooleanField(default=False, blank=True, help_text="Это мониторинг", db_index=True) is_expertise = models.BooleanField(default=False, blank=True, help_text="Это экспертиза", db_index=True) is_aux = models.BooleanField(default=False, blank=True, help_text="Это вспомогательный", db_index=True) + is_case = models.BooleanField(default=False, blank=True, help_text="Это случай", db_index=True) site_type = models.ForeignKey(ResearchSite, default=None, null=True, blank=True, help_text='Место услуги', on_delete=models.SET_NULL, db_index=True) need_vich_code = models.BooleanField(default=False, blank=True, help_text="Необходимость указания кода вич в направлении") paraclinic_info = models.TextField(blank=True, default="", help_text="Если это параклиническое исследование - здесь указывается подготовка и кабинет") @@ -357,6 +358,8 @@ def reversed_type(self): return -13 if self.is_microbiology or self.is_citology or self.is_gistology: return 2 - Podrazdeleniya.MORFOLOGY + if self.is_case: + return -16 return self.podrazdeleniye_id or -2 @property diff --git a/l2-frontend/src/construct/ConstructParaclinic.vue b/l2-frontend/src/construct/ConstructParaclinic.vue index 1b512caf80..9bb7760911 100644 --- a/l2-frontend/src/construct/ConstructParaclinic.vue +++ b/l2-frontend/src/construct/ConstructParaclinic.vue @@ -277,6 +277,10 @@ export default { d.push({ value: -8, label: '– Гистология' }); } } + + if (this.modules.l2_case) { + d.push({ value: -16, label: 'Случаи' }); + } } this.departments_of_type = d; diff --git a/l2-frontend/src/construct/ParaclinicResearchEditor.vue b/l2-frontend/src/construct/ParaclinicResearchEditor.vue index c8f2293f2d..a8353b52e2 100644 --- a/l2-frontend/src/construct/ParaclinicResearchEditor.vue +++ b/l2-frontend/src/construct/ParaclinicResearchEditor.vue @@ -461,7 +461,7 @@
-