From 126ce73012ff793ec415cbc03d5912b9afe50549 Mon Sep 17 00:00:00 2001 From: sergei kasianenko Date: Thu, 4 Jul 2024 23:24:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BF=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=20=D1=83=D1=87=D0=B5=D1=82=D0=BD=D0=B0=D1=8F=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B0=20=D0=91=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- directions/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/directions/models.py b/directions/models.py index d9cb915610..84001c5257 100644 --- a/directions/models.py +++ b/directions/models.py @@ -2236,6 +2236,23 @@ class Meta: verbose_name_plural = 'Внешние лабораторные номера заказов' +class ComplexResearchAccountPerson(models.Model): + complex_research = models.ForeignKey(directory.Researches, null=True, blank=True, help_text='Комплексная из справочника', db_index=True, on_delete=models.SET_NULL) + iss_list = models.CharField(max_length=1024, null=False, db_index=True, help_text="Исследования для комплексной услуги") + researches_id_list = models.CharField(max_length=128, null=False, db_index=True, help_text="Список услуг-id комплекса") + researches_title_list = models.CharField(max_length=128, null=False, db_index=True, help_text="Список услуг-наименования комплекса") + patient_card = models.ForeignKey(Clients.Card, default=None, blank=True, null=True, help_text='Карта пациента', db_index=True, on_delete=models.SET_NULL) + models.DateTimeField(auto_now_add=True, help_text='Дата создания направления', db_index=True) + + + def __str__(self): + return f"{self.complex_research} {self.iss_list}" + + class Meta: + verbose_name = 'Комплексная услуги' + verbose_name_plural = 'Комплексные услуги' + + class Issledovaniya(models.Model): """ Направления на исследования @@ -2316,6 +2333,7 @@ class Issledovaniya(models.Model): external_add_order = models.ForeignKey(ExternalAdditionalOrder, db_index=True, blank=True, null=True, default=None, help_text="Внешний заказ", on_delete=models.SET_NULL) plan_start_date = models.DateTimeField(null=True, blank=True, db_index=True, help_text='Планируемое время начала услуги') billing = models.ForeignKey(contracts.BillingRegister, db_index=True, blank=True, null=True, default=None, help_text="Принадлежит счету", on_delete=models.SET_NULL) + complex_account = models.ForeignKey(ComplexResearchAccountPerson, db_index=True, blank=True, null=True, default=None, help_text="Принадлежит комплексу", on_delete=models.SET_NULL) @staticmethod def save_billing(billing_id, iss_ids): From b0df565949c97dd1eb85e049a0c6c2bc89fc483d Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko <41939763+urchinpro@users.noreply.github.com> Date: Thu, 4 Jul 2024 23:25:33 +0800 Subject: [PATCH 2/2] Update directions/models.py Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- directions/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/directions/models.py b/directions/models.py index 84001c5257..f3f41d7f7e 100644 --- a/directions/models.py +++ b/directions/models.py @@ -2244,7 +2244,6 @@ class ComplexResearchAccountPerson(models.Model): patient_card = models.ForeignKey(Clients.Card, default=None, blank=True, null=True, help_text='Карта пациента', db_index=True, on_delete=models.SET_NULL) models.DateTimeField(auto_now_add=True, help_text='Дата создания направления', db_index=True) - def __str__(self): return f"{self.complex_research} {self.iss_list}"