Skip to content

Commit

Permalink
Merge pull request #3134 from moodpulse/fix_upload_file
Browse files Browse the repository at this point in the history
Загрузка файла мед. осмотров - Fix
  • Loading branch information
urchinpro authored Oct 17, 2023
2 parents 9da9db6 + afc0cb4 commit 0680f44
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions api/parse_file/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ def add_factors_from_file(request):
request_obj.user = request.user
request_obj.method = "POST"
request_obj.META["HTTP_AUTHORIZATION"] = bearer_token
current_patient = check_enp(request_obj)
if current_patient.data.get("message"):
current_patient = None
if snils_data and snils_data != "None":
current_patient = check_enp(request_obj)
if not current_patient or current_patient.data.get("message"):
patient_card = search_by_fio(request_obj, family_data, name_data, patronymic_data, birthday_data)
if patient_card is None:
possible_family = find_and_replace(family_data, "е", "ё")
Expand Down
2 changes: 1 addition & 1 deletion api/patients/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def patients_search_card(request):
| Q(card__phone__in=normalized_phones)
| Q(card__doctorcall__phone__in=normalized_phones)
)
if is_ecp_search or ":" in query[0]:
if is_ecp_search and query or (query and ":" in query[0]):
ecp_id = query.split(':')[1]
patient_data = search_patient_ecp_by_person_id(ecp_id)
if patient_data and (patient_data.get('PersonSnils_Snils') or patient_data.get('enp')):
Expand Down
5 changes: 4 additions & 1 deletion l2-frontend/src/construct/ConstructCompany.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
/>
<VeTable
:columns="columns"
:table-data="examinationList"
:table-data="examListPagination"
row-key-field-name="card_id"
:checkbox-option="checkboxOption"
/>
Expand Down Expand Up @@ -433,6 +433,9 @@ export default {
isNewCompany() {
return !this.editorCompany.pk;
},
examListPagination() {
return this.examinationList.slice((this.page - 1) * this.pageSize, this.page * this.pageSize);
},
},
mounted() {
this.getCompanies();
Expand Down

0 comments on commit 0680f44

Please sign in to comment.