Skip to content

Commit

Permalink
Merge branch 'develop' into dataRangeDirectionHistory
Browse files Browse the repository at this point in the history
  • Loading branch information
urchinpro authored Jul 2, 2024
2 parents 5feee48 + e6b8d08 commit 8d762ef
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
10 changes: 7 additions & 3 deletions api/stationar/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,17 @@ def hosp_services_by_type(request):
r_type = data["r_type"]
result = []
type_by_key = HospitalService.TYPES_BY_KEYS.get(r_type, -1)
hosp_research = None
if request.user.doctorprofile.hosp_research_template:
hosp_research = request.user.doctorprofile.hosp_research_template
elif request.user.doctorprofile.podrazdeleniye.hosp_research_default:
hosp_research = request.user.doctorprofile.podrazdeleniye.hosp_research_default
for i in Issledovaniya.objects.filter(napravleniye__pk=base_direction_pk, research__is_hospital=True):
hosp_research = i.research
if not hosp_research:
hosp_research = i.research
if int(data['hospResearch']) > -1:
hosp_research = int(data['hospResearch'])

if request.user.doctorprofile.podrazdeleniye.hosp_research_default_id:
hosp_research = request.user.doctorprofile.podrazdeleniye.hosp_research_default_id
for hs in HospitalService.objects.filter(site_type=type_by_key, main_research=hosp_research, hide=False):
result.append(
{
Expand Down
2 changes: 1 addition & 1 deletion laboratory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2024.7.11421+410b5b"
__version__ = "2024.7.20313+7482a8"
VERSION = __version__
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ skip-string-normalization = true

[tool.poetry]
name = "l2"
version = "2024.7.11421+410b5b"
version = "2024.7.20313+7482a8"
description = ""
authors = ["Mikhail Privalov <[email protected]>"]
license = "MIT"
Expand Down
10 changes: 10 additions & 0 deletions users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Meta:


class Position(models.Model):
title = models.CharField(max_length=255, help_text='Название')
title = models.CharField(max_length=255, help_text='Название')
hide = models.BooleanField(help_text='Скрытие', default=False)
rmis_id = models.PositiveSmallIntegerField(default=None, db_index=True, blank=True, null=True)
Expand Down Expand Up @@ -110,6 +111,15 @@ class DoctorProfile(models.Model):
date_stop_certificate = models.DateField(help_text='Дата окончания сертификата', db_index=True, default=None, blank=True, null=True)
replace_doctor_cda = models.ForeignKey('self', related_name='used_doctor_cda', help_text="Замена доктора для cda", blank=True, null=True, default=None, on_delete=models.SET_NULL)
additional_info = models.TextField(default='', blank=True, help_text='Дополнительная информация описывать словарем {}')
hosp_research_template = models.ForeignKey(
'directory.Researches',
related_name='hosp_research_template',
blank=True,
default=None,
null=True,
verbose_name="Услуга стационара по котрой по умолчанию подгружаются шаблоны",
on_delete=models.CASCADE,
)

@staticmethod
def get_system_profile():
Expand Down

0 comments on commit 8d762ef

Please sign in to comment.