diff --git a/directions/forms/forms580.py b/directions/forms/forms580.py index f5fbac461b..6689ee8330 100644 --- a/directions/forms/forms580.py +++ b/directions/forms/forms580.py @@ -43,7 +43,7 @@ def form_01(request_data): buffer = BytesIO() pagesize = (80 * mm, 120 * mm) - doc = SimpleDocTemplate(buffer, pagesize=pagesize, leftMargin=2 * mm, rightMargin=0 * mm, topMargin=1 * mm, bottomMargin=1 * mm, allowSplitting=1, title="Форма {}".format("80 мм")) + doc = SimpleDocTemplate(buffer, pagesize=pagesize, leftMargin=2 * mm, rightMargin=2 * mm, topMargin=1 * mm, bottomMargin=1 * mm, allowSplitting=1, title="Форма {}".format("80 мм")) styleSheet = getSampleStyleSheet() style = styleSheet["Normal"] style.fontName = "PTAstraSerifReg" @@ -55,7 +55,7 @@ def form_01(request_data): styleFL = deepcopy(style) styleFL.firstLineIndent = 0 - styleFL.fontSize = 20 + styleFL.fontSize = 16 styleCenter = deepcopy(style) styleCenter.alignment = TA_CENTER @@ -91,13 +91,13 @@ def form_01(request_data): ], ] - tbl = Table(opinion, colWidths=(33 * mm, 42 * mm)) + tbl = Table(opinion, colWidths=(30 * mm, 45 * mm)) tbl.setStyle( TableStyle( [ ('GRID', (0, 0), (-1, -1), 0.1, colors.white), ('VALIGN', (0, 0), (-1, -1), 'TOP'), - ('LEFTPADDING', (1, 0), (-1, -1), -1 * mm), + ('LEFTPADDING', (1, 0), (-1, -1), -5 * mm), ('LEFTPADDING', (0, 0), (-1, -1), -0.3 * mm), ] ) diff --git a/directory/models.py b/directory/models.py index b86ae4c37e..b4874fd6eb 100644 --- a/directory/models.py +++ b/directory/models.py @@ -305,6 +305,7 @@ class Researches(models.Model): cpp_template_files = models.TextField(max_length=500, default=None, null=True, blank=True, help_text="{1: 'название шаблона',2: 'название шаблона', 3: 'название шаблона'}") cda_template_file = models.CharField(max_length=50, db_index=True, blank=True, default="", null=True, help_text="название шаблона cda-шаблона") n3_id_med_document_type = models.SmallIntegerField(default=0, blank=True, help_text="N3 id_med_document_type") + ecp_id = models.CharField(max_length=16, default='', blank=True, verbose_name='Код услуги в ЕЦП') @staticmethod def save_plan_performer(tb_data): @@ -877,6 +878,7 @@ class Fractions(models.Model): fsli = models.CharField(max_length=32, default=None, null=True, blank=True) patient_control_param = models.ForeignKey(PatientControlParam, default=None, null=True, blank=True, help_text='Контролируемый параметр', on_delete=models.SET_NULL) not_send_odli = models.BooleanField(help_text="Не отправлять данные в ОДЛИ", default=False) + ecp_id = models.CharField(max_length=16, default='', blank=True, verbose_name='Код теста в ЕЦП') def get_unit(self): if self.unit: @@ -898,6 +900,9 @@ def get_unit_str(self): def get_fsli_code(self): return (self.fsli or '').strip() + def get_ecp_code(self): + return (self.ecp_id or '').strip() + def __str__(self): return self.research.title + " | " + self.title diff --git a/integration_framework/views.py b/integration_framework/views.py index 3e94c9ed89..d3e08b8992 100644 --- a/integration_framework/views.py +++ b/integration_framework/views.py @@ -419,6 +419,7 @@ def issledovaniye_data(request): "unitCode": u.code if u else None, "ref": refs, "interpretation": "N" if norm and norm[0] == ResultRight.RESULT_MODE_NORMAL else "A", + "ecpId": r.fraction.get_ecp_code(), } ) @@ -445,6 +446,7 @@ def issledovaniye_data(request): "comments": i.lab_comment, "isGistology": i.research.is_gistology, "isParaclinic": i.research.is_paraclinic, + "ecpResearchId": i.research.ecp_id, } )