Skip to content

Commit

Permalink
Merge branch 'develop' into medexam_improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellheor1 authored Oct 23, 2023
2 parents b49b070 + 0ded7d5 commit a2c07cd
Show file tree
Hide file tree
Showing 11 changed files with 770 additions and 677 deletions.
2 changes: 1 addition & 1 deletion api/directions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def directions_generate(request):
hospital_override=p.get("hospital_override", -1),
price_category=p.get("priceCategory", -1),
case_id=p.get("caseId", -2),
case_by_direction=p.get("caseByDirection", -2),
case_by_direction=p.get("caseByDirection", False),
)
for _ in range(p.get("directions_count", 1)):
rc = Napravleniya.gen_napravleniya_by_issledovaniya(*args, **kwargs)
Expand Down
1 change: 1 addition & 0 deletions appconf/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def l2_modules() -> dict:
"case",
"hide_show_count_param",
"fraction_comment",
"required_choose_case",
]
},
"consults_module": SettingManager.get("consults_module", default='false', default_type='b'),
Expand Down
33 changes: 33 additions & 0 deletions directory/sql_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,36 @@ def is_lab_filter_research(reserches_id):
)
rows = namedtuplefetchall(cursor)
return rows


def get_lab_research_reference_books():
with connection.cursor() as cursor:
cursor.execute(
"""
SELECT
directory_fractions.id as fraction_id,
directory_fractions.title as fraction_title,
directory_fractions.fsli as fraction_fsli,
directory_fractions.ref_m as fraction_ref_m,
directory_fractions.ref_f as fraction_ref_f,
du.title as unit_title,
du.code as unit_code,
du.ucum as unit_ucum,
dr.id as research_id,
dr.title as research_title,
dr.internal_code as research_internal_code,
dr.code as research_nmu_code
FROM directory_fractions
LEFT JOIN directory_researches dr on dr.id = directory_fractions.research_id
LEFT JOIN directory_unit du on du.id = directory_fractions.unit_id
LEFT JOIN podrazdeleniya_podrazdeleniya pp on dr.podrazdeleniye_id = pp.id
WHERE pp.p_type = 2
order by dr.id
""",
params={},
)
rows = namedtuplefetchall(cursor)
return rows
1 change: 1 addition & 0 deletions integration_framework/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@
path('get-value-field', views.get_value_field),
path('get-price-data', views.get_price_data),
path('get-prices-by-date', views.get_prices_by_date),
path('get-reference-books', views.get_reference_books),
]
1,375 changes: 714 additions & 661 deletions integration_framework/views.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions l2-frontend/src/registerHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export default (instance: Vue): void => {
monitoring = false,
priceCategory = null,
caseId,
caseByDirection = false,
}) => {
if (cardPk === -1 && !monitoring) {
instance.$root.$emit('msg', 'error', 'Не выбрана карта');
Expand Down Expand Up @@ -196,6 +197,7 @@ export default (instance: Vue): void => {
hospital_override: hospitalOverride,
priceCategory,
caseId,
caseByDirection,
})
.then(data => {
instance.$store.dispatch(actions.DEC_LOADING);
Expand Down
5 changes: 4 additions & 1 deletion l2-frontend/src/ui-cards/SelectedResearches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,9 @@ export default {
needChangeCase() {
return this.$store.getters.modules.l2_case && this.kk !== 'stationar' && this.kk !== 'cd';
},
needRequiredChooseCase() {
return this.$store.getters.modules.l2_required_choose_caseChoose;
},
researches_departments() {
const r = {};
const deps = {
Expand Down Expand Up @@ -882,7 +885,7 @@ export default {
return this.canChangeHospitalDirection && this.hospital_override === -1;
},
needSelectCase() {
return (!this.parentCase && this.needChangeCase && this.research_case === -2);
return (!this.parentCase && this.needChangeCase && this.research_case === -2 && this.needRequiredChooseCase);
},
need_update_object() {
const r = [];
Expand Down
6 changes: 3 additions & 3 deletions l2-frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2887,9 +2887,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001549"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz"
integrity sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==
version "1.0.30001550"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001550.tgz"
integrity sha512-p82WjBYIypO0ukTsd/FG3Xxs+4tFeaY9pfT4amQL8KWtYH7H9nYwReGAbMTJ0hsmRO8IfDtsS6p3ZWj8+1c2RQ==

case-sensitive-paths-webpack-plugin@^2.3.0:
version "2.4.0"
Expand Down
2 changes: 1 addition & 1 deletion laboratory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2023.10.171159+2a3547"
__version__ = "2023.10.181129+e96d81"
VERSION = __version__
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ skip-string-normalization = true

[tool.poetry]
name = "l2"
version = "2023.10.171159+2a3547"
version = "2023.10.181129+e96d81"
description = ""
authors = ["Mikhail Privalov <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -60,7 +60,7 @@ selenium = "3.141.0"
simplejson = "3.18.4"
six = "1.16.0"
sqlparse = "0.4.3"
urllib3 = "1.26.12"
urllib3 = "1.26.18"
xlwt = "1.3.0"
python-docx = "^0.8.11"
zeep = "4.1.0"
Expand Down

0 comments on commit a2c07cd

Please sign in to comment.