Skip to content

Commit

Permalink
fix form 003
Browse files Browse the repository at this point in the history
  • Loading branch information
urchinpro committed Dec 6, 2024
1 parent 0704fac commit 72aedde
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions forms/forms_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,22 +458,11 @@ def primary_reception_get_data(hosp_first_num, site_type=0):
'Время установления диагноза',
'Кому доверяю',
]
cda_dict_title = {}
result_by_cda = {}
if CDA_TITLES_FIELDS_PRIMARY_RESEARCH:
cda_ids_data = cda_data_by_title(tuple(CDA_TITLES_FIELDS_PRIMARY_RESEARCH))
cda_ids = [i.id for i in cda_ids_data]
cda_dict_title = {i.id: i.title for i in cda_ids_data}
fields_data = get_title_fields_by_cda_relation(primary_research_id, tuple(cda_ids))
titles_field = [i.title for i in fields_data]

list_values = None
if titles_field and hosp_primary_receptions:
list_values = get_result_value_iss(hosp_primary_iss, primary_research_id, titles_field)

if CDA_TITLES_FIELDS_PRIMARY_RESEARCH:
result_by_cda = {cda_dict_title.get(value[4]): value[2] for value in list_values}

date_entered_value, time_entered_value, type_transport, medicament_allergy = '', '', '', ''
who_directed, plan_hospital, extra_hospital, type_hospital = '', '', '', ''
time_start_ill, diagnos_who_directed, diagnos_entered = '', '', ''
Expand Down Expand Up @@ -694,7 +683,6 @@ def primary_reception_get_data(hosp_first_num, site_type=0):
'date_diagnosis': date_diagnosis,
'time_diagnosis': time_diagnosis,
'whom_transfer_health_data': whom_transfer_health_data,
'result_by_cda': result_by_cda,
}


Expand All @@ -721,7 +709,7 @@ def primary_reception_get_data_by_cda(hosp_first_num, site_type=0):
if titles_field and hosp_primary_receptions:
list_values = get_result_value_iss(hosp_primary_iss, primary_research_id, titles_field)

if CDA_TITLES_FIELDS_PRIMARY_RESEARCH:
if CDA_TITLES_FIELDS_PRIMARY_RESEARCH and list_values:
result_by_cda = {cda_dict_title.get(value[4]): value[2] for value in list_values}

return {
Expand Down

0 comments on commit 72aedde

Please sign in to comment.