Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json for zip pc #3239

Merged
merged 59 commits into from
Dec 8, 2023
Merged

Json for zip pc #3239

merged 59 commits into from
Dec 8, 2023

Conversation

urchinpro
Copy link
Collaborator

Описание изменений

cpp заготовка

@api_view(["POST"])
def send_cpp_result(request):
pk = request.GET.get("pk")
research_pks = request.GET.get("research", "*")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <841> reported by reviewdog 🐶
local variable 'research_pks' is assigned to but never used

"EmployeePositionUUID": ""
}

position = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <841> reported by reviewdog 🐶
local variable 'position' is assigned to but never used

"RiskGroup": "справочник",
"PMORecommendations": "справочник",
"result": "medexam",
"FactorsUUID": ["uuid", "uuid"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <241> reported by reviewdog 🐶
multiple spaces after ','

"gender": individual.sex.lower(),
"birthdate": individual.birthday.strftime("%Y%m%d"),
"EmployeeSubdivisionCode": "",
"EmployeePositionUUID": ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"EmployeePositionUUID": ""
"EmployeePositionUUID": "",

Comment on lines 3378 to 3392
position = {
"uuid": "uuid",
"title": ""
}

contract = {
"ContraсtUUID": "",
"ContragentUUID": "",
"ResultUUID": "a755e6ab-296c-11eb-9451-00505683bb6c",
"number": "",
"uuid": "",
"date_start": "",
"date_end": "",
"company": ""
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
position = {
"uuid": "uuid",
"title": ""
}
contract = {
"ContraсtUUID": "",
"ContragentUUID": "",
"ResultUUID": "a755e6ab-296c-11eb-9451-00505683bb6c",
"number": "",
"uuid": "",
"date_start": "",
"date_end": "",
"company": ""
}
position = {"uuid": "uuid", "title": ""}
contract = {"ContraсtUUID": "", "ContragentUUID": "", "ResultUUID": "a755e6ab-296c-11eb-9451-00505683bb6c", "number": "", "uuid": "", "date_start": "", "date_end": "", "company": ""}

"departments": [
{"title": "", "uuid": ""},
{"title": "", "uuid": ""},
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
]
],

"RiskGroup": "справочник",
"PMORecommendations": "справочник",
"result": "medexam",
"FactorsUUID": ["uuid", "uuid"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"FactorsUUID": ["uuid", "uuid"],
"FactorsUUID": ["uuid", "uuid"],

"result": "medexam",
"FactorsUUID": ["uuid", "uuid"],
"CertificateNumber": "",
"CertificateDate": ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"CertificateDate": ""
"CertificateDate": "",

Comment on lines 3421 to 3426
result = {
"patient": patient,
"company": company,
"contract": contract,
"result": result
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
result = {
"patient": patient,
"company": company,
"contract": contract,
"result": result
}
result = {"patient": patient, "company": company, "contract": contract, "result": result}

utils/nsi_directories.py Outdated Show resolved Hide resolved
@@ -1536,7 +1536,7 @@ def directions_paraclinic_form(request):
card_documents = d.client.get_card_documents(check_has_type=['СНИЛС'])

has_snils = bool(card_documents)

print(d.doc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

env = Environment(loader=file_loader, trim_blocks=True, lstrip_blocks=True)
tm = env.get_template('cpp_result.xml')
msg = tm.render(data=data)
print(msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.


def gen_resul_cpp2():
str_addr = "templates/cpp/"
result_file_name= "cpp_result.xml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [flake8] <225> reported by reviewdog 🐶
missing whitespace around operator

env = Environment(loader=file_loader, trim_blocks=True, lstrip_blocks=True)
tm = env.get_template(result_file_name)
msg = tm.render(data=data)
print(msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[flake8] <201> reported by reviewdog 🐶
print found.

forms/views.py Outdated Show resolved Hide resolved

def gen_resul_cpp2():
str_addr = "templates/cpp/"
result_file_name= "cpp_result.xml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
result_file_name= "cpp_result.xml"
result_file_name = "cpp_result.xml"

urchinpro and others added 4 commits November 30, 2023 14:26
# Conflicts:
#	poetry.lock
* Настройка необходимости отправки в ЦПП для компании
* Добавление колонки статуса отправки в ЦПП по пациенту
api/views.py Outdated Show resolved Hide resolved
Comment on lines +2417 to +2421
data = {
"company": Company.as_json(company),
"contract": PriceName.as_json(price),
"patient": patient
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
data = {
"company": Company.as_json(company),
"contract": PriceName.as_json(price),
"patient": patient
}
data = {"company": Company.as_json(company), "contract": PriceName.as_json(price), "patient": patient}

api/directions/views.py Outdated Show resolved Hide resolved
api/directions/views.py Outdated Show resolved Hide resolved
Comment on lines +1199 to +1200


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

Comment on lines 94 to 95


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

urchinpro and others added 9 commits December 6, 2023 15:32
# Conflicts:
#	api/views.py
#	directions/models.py
#	xml_generate/views.py
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
forms/views.py Outdated


def generate_xml(request):

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change

'низкий риск': '0330c6cd-d54d-4caf-b2b4-46790b3cfda4',
'умеренный риск': 'be2dddf1-70b8-40a2-acc0-9dfdc6bf29d0',
'высокий риск': 'b077b932-d429-4534-bda3-323776b0e3a8',
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c'
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c',

'Низкий': 'bff9f99c-8b01-4ac9-afbf-6e8b6e6d25fc',
'Средний': 'c57b87e8-d195-47f4-bbe3-5a3056b9bbcc',
'Высокий': '820e43db-54c1-46ce-9c08-85dc0aae8204',
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff',

utils/nsi_directories.py Outdated Show resolved Hide resolved
'низкий риск': '0330c6cd-d54d-4caf-b2b4-46790b3cfda4',
'умеренный риск': 'be2dddf1-70b8-40a2-acc0-9dfdc6bf29d0',
'высокий риск': 'b077b932-d429-4534-bda3-323776b0e3a8',
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c'
'очень высокий риск': '5a961da8-b430-48af-83f6-f827297f087c',

'Низкий': 'bff9f99c-8b01-4ac9-afbf-6e8b6e6d25fc',
'Средний': 'c57b87e8-d195-47f4-bbe3-5a3056b9bbcc',
'Высокий': '820e43db-54c1-46ce-9c08-85dc0aae8204',
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff',

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
'Низкий': 'bff9f99c-8b01-4ac9-afbf-6e8b6e6d25fc',
'Средний': 'c57b87e8-d195-47f4-bbe3-5a3056b9bbcc',
'Высокий': '820e43db-54c1-46ce-9c08-85dc0aae8204',
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff'
'Очень высокий': '50b7894e-d990-4c40-a1e1-19b043f0c5ff',

urchinpro and others added 3 commits December 6, 2023 18:05
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
"patient": patient
}
field_titles = [
"СНИЛС", "Дата осмотра", "Результат медицинского осмотра", "Группы риска", "Группы риска по SCORE",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"СНИЛС", "Дата осмотра", "Результат медицинского осмотра", "Группы риска", "Группы риска по SCORE",
"СНИЛС",
"Дата осмотра",
"Результат медицинского осмотра",
"Группы риска",
"Группы риска по SCORE",

field_titles = [
"СНИЛС", "Дата осмотра", "Результат медицинского осмотра", "Группы риска", "Группы риска по SCORE",
"Дата присвоения группы здоровья",
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
"Вредные факторы",
"Группа здоровья",
"Номер справки",
"Дата выдачи справки",

'values': {
'Медицинские противопоказания к работе не выявлены': '17988ff4-fed9-4c95-b03d-6da09aa9e895',
'Медицинские противопоказания к работе выявлены': '9eda5102-80fe-4444-afcc-4464f6d43a71',
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7'
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7',

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
"Группы риска",
"Группы риска по SCORE",
"Дата присвоения группы здоровья",
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
"Вредные факторы",
"Группа здоровья",
"Номер справки",
"Дата выдачи справки",

'values': {
'Медицинские противопоказания к работе не выявлены': '17988ff4-fed9-4c95-b03d-6da09aa9e895',
'Медицинские противопоказания к работе выявлены': '9eda5102-80fe-4444-afcc-4464f6d43a71',
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7'
'Выдана справка о необходимости дополнительного медицинского обследования': '20487f06-1140-4659-aa61-7fa8a93eeaa7',

"Группы риска",
"Группы риска по SCORE",
"Дата присвоения группы здоровья",
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
"Вредные факторы", "Группа здоровья", "Номер справки", "Дата выдачи справки"
"Вредные факторы",
"Группа здоровья",
"Номер справки",
"Дата выдачи справки",

@urchinpro urchinpro merged commit 1de0ae7 into develop Dec 8, 2023
6 checks passed
@delete-merged-branch delete-merged-branch bot deleted the jsonForZip_pc branch December 8, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants