Skip to content

Commit

Permalink
Merge pull request #4064 from mikhailprivalov/complexResearchAccount
Browse files Browse the repository at this point in the history
Комплекс учетная таблица БД
  • Loading branch information
urchinpro authored Jul 5, 2024
2 parents e4bc743 + b0df565 commit 57298e6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions directions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,22 @@ 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):
"""
Направления на исследования
Expand Down Expand Up @@ -2316,6 +2332,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):
Expand Down

0 comments on commit 57298e6

Please sign in to comment.