Initial commit

This commit is contained in:
2024-08-23 00:06:07 +03:00
commit 60eebe2901
10 changed files with 14720 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+6
View File
@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (dispensary_sv)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (dispensary_sv)" project-jdk-type="Python SDK" />
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/dispensary_sv.iml" filepath="$PROJECT_DIR$/.idea/dispensary_sv.iml" />
</modules>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
View File
+1
View File
@@ -0,0 +1 @@
I11, I10, I12, I13, I14, I15, I20, I21, I22, I23, I24, I25, I44, I45, I46, I47, I48, I49, I50, I65.2, I67.8, I69.0, I69.1, I69.2, I69.3, I69.4, Z95.0, Z95.1, Z95.5, E11, E10, D12.6, D12.8, D13.4, D37.6, E78, J12, J13, J14, J41.0, J41.1, J41.8, J44.0, J44.8, J44.9, J45.0, J45.1, J45.8, J45.9, J47.0, J84.1, K20, K21.0, K22.0, K22.2, K22.7, K25, K26, K29.4, K29.5, K31.7, K50, K51, K62.1, K70.3, K74.3, K74.4, K74.5, K74.6, K86, M81.5, N18.1, N18.9, R73.0, R73.9
+49
View File
@@ -0,0 +1,49 @@
import csv
def dispensary():
"""Функция нужна для определения, нуждается ли данный код МКБ-10 в диспансерном
наблюдении терапевтом. Другие специальности не включены. Пока что..."""
icd_input = input('Введите код МКБ-10: ').capitalize()
icd_split = icd_input[0]
icd_input = transponding(icd_split) + icd_input[1:]
print(icd_finder(icd_input))
with open('icd_list_physician', 'r') as icd:
icd = icd.read()
if icd_input in icd:
print('Подлежит диспансерному наблюдению у терапевта')
else:
print('Не подлежит диспансерному наблюдению')
def transponding(letter):
"""Функция переводит русскую букву в соответствующую английскую согласно раскладке qwerty/йцукен"""
rus = ['Й','Ц','У','К','Е','Н','Г','Ш','Щ','З','Ф','Ы','В','А','П','Р','О','Л','Д','Я','Ч','С','М','И','Т','Ь']
eng = ['Q','W','E','R','T','Y','U','I','O','P','A','S','D','F','G','H','J','K','L','Z','X','C','V','B','N','M']
if letter in rus:
list_index = rus.index(letter)
return eng[list_index]
else:
return letter
def icd_finder(code):
"""Этот скрипт ищет код МКБ в справочнике и выводит его описание в консоль.
За csv файл со справочником МКБ благодарен Антону(ak4nv)Кочневу
Github: https://github.com/ak4nv/mkb10"""
with open('mkb10.csv', mode='r', encoding='utf-8') as mkb:
reader = csv.reader(mkb)
for row in reader:
if code in row:
return row[1]
return 'Указанного кода нет в справочнике МКБ-10'
dispensary()
+14630
View File
File diff suppressed because it is too large Load Diff