This commit is contained in:
512song committed 2023-06-21 15:32:01 +08:00
1 parent 745a533cfc
commit 669d78e9e9
2 files changed
+72 -120

No files matched your search

+9 -9
View File
@@ -72,15 +72,15 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 22,
"id": "5cea2f5e-37fc-4857-8455-090a634a1c0a",
"metadata": {
"execution": {
"iopub.execute_input": "2023-06-07T05:49:26.121460Z",
"iopub.status.busy": "2023-06-07T05:49:26.121014Z",
"iopub.status.idle": "2023-06-07T05:49:26.306153Z",
"shell.execute_reply": "2023-06-07T05:49:26.305167Z",
"shell.execute_reply.started": "2023-06-07T05:49:26.121430Z"
"iopub.execute_input": "2023-06-21T07:13:31.520222Z",
"iopub.status.busy": "2023-06-21T07:13:31.519385Z",
"iopub.status.idle": "2023-06-21T07:13:31.624516Z",
"shell.execute_reply": "2023-06-21T07:13:31.623557Z",
"shell.execute_reply.started": "2023-06-21T07:13:31.520178Z"
},
"tags": []
},
@@ -89,9 +89,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"1307\n",
"1508\n",
"ok\n",
"1508\n"
"1704\n"
]
}
],
@@ -100,7 +100,7 @@
"import json\n",
"\n",
"\n",
"wb = openpyxl.load_workbook('data/长炼医院新增监测花名册(热电部).xlsx')\n",
"wb = openpyxl.load_workbook('data/长炼医院新增监测花名册(化工部).xlsx')\n",
"sheet = wb.active\n",
"# sheets = wb.sheetnames\n",
"filename = 'data/长炼医院人员名单.json'\n",
+63 -111
View File
@@ -114,26 +114,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2023-05-09T03:14:50.263302Z",
"iopub.status.busy": "2023-05-09T03:14:50.262465Z",
"iopub.status.idle": "2023-05-09T03:14:50.269294Z",
"shell.execute_reply": "2023-05-09T03:14:50.268106Z",
"shell.execute_reply.started": "2023-05-09T03:14:50.263258Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['气郁组']\n"
]
}
],
"outputs": [],
"source": [
"import re\n",
"\n",
@@ -151,26 +136,11 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2022-12-09T03:42:01.099247Z",
"iopub.status.busy": "2022-12-09T03:42:01.098719Z",
"iopub.status.idle": "2022-12-09T03:42:01.108853Z",
"shell.execute_reply": "2022-12-09T03:42:01.106707Z",
"shell.execute_reply.started": "2022-12-09T03:42:01.099199Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"33\n"
]
}
],
"outputs": [],
"source": [
"import time\n",
"\n",
@@ -189,29 +159,11 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2023-05-12T04:10:03.168210Z",
"iopub.status.busy": "2023-05-12T04:10:03.167782Z",
"iopub.status.idle": "2023-05-12T04:10:03.176045Z",
"shell.execute_reply": "2023-05-12T04:10:03.174828Z",
"shell.execute_reply.started": "2023-05-12T04:10:03.168182Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"bs b'\\xc0\\xee\\xb5t'\n",
"decode-bs: 李祎\n",
"gbcode: b'\\xc2\\xed\\xc1\\xa2\\xd1\\xc7'\n",
"gbs: c2edc1a2d1c7\n"
]
}
],
"outputs": [],
"source": [
"import binascii\n",
"\n",
@@ -230,8 +182,7 @@
{
"cell_type": "markdown",
"metadata": {
"tags": [],
"toc-hr-collapsed": true
"tags": []
},
"source": [
"## 医药体测"
@@ -360,6 +311,55 @@
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 体质数据处理"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### 体质对应数据导入"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"execution": {
"iopub.execute_input": "2023-06-19T05:24:25.797002Z",
"iopub.status.busy": "2023-06-19T05:24:25.796160Z",
"iopub.status.idle": "2023-06-19T05:24:25.804970Z",
"shell.execute_reply": "2023-06-19T05:24:25.803852Z",
"shell.execute_reply.started": "2023-06-19T05:24:25.796962Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'C-14呼气试验阳性': {'病症对应中医辨证': ['湿热内盛', '脾胃虚弱'], '病症分析': 'C-14呼气试验是一种用于检测幽门螺杆菌感染的方法,通过摄入C-14标记的尿素,然后呼出含有C-14的二氧化碳进行检测。如果呼出的C-14二氧化碳含量高于正常水平即为阳性,表示感染了幽门螺杆菌。'}, 'C反应蛋白(CRP)升高': {'病症对应中医辨证': ['湿热内盛', '气血不畅'], '病症分析': 'C反应蛋白是一种血液中的蛋白质,常常用于衡量炎症的程度。当身体遭受感染、炎症、创伤等影响时,会出现CRP升高的现象。'}, 'V1呈QS型': {'病症对应中医辨证': ['气滞血瘀', '气血不足'], '病症分析': '心电图上V1导联呈现QS型,通常是一种正常的变异,也可能表示心肌损伤或心肌缺血等问题。'}, '癌胚抗原(定量)(CEA)增高': {'病症对应中医辨证': ['气滞血瘀', '痰湿阻滞', '外邪入侵'], '病症分析': 'CEA是一种蛋白质,当人体某些器官、如胃、肝、肺、乳腺、结肠等出现癌变时,会释放出更多的CEA,因此血液中CEA的浓度可能会增加。'}, '胆囊息肉样病变': {'病症对应中医辨证': ['气滞血瘀', '湿热内盛', '痰湿阻滞'], '病症分析': '指在胆囊内部发现了一些类似于息肉的突起,可能会引起胆囊炎、胆管阻塞等问题,需要注意观察和治疗。'}, '动脉血管弹性稍下降': {'病症对应中医辨证': ['气滞血瘀', '气血不畅'], '病症分析': '指动脉血管的弹性略有下降,可能是因为年龄、高血压、高血脂等原因导致,需要注意预防和控制血压和血脂。'}, '动脉血管弹性下降': {'病症对应中医辨证': ['气滞血瘀', '气血不畅', '气血不足'], '病症分析': '动脉血管弹性下降是指血管壁的弹性降低,即血管失去了正常的伸缩性。通常是由于动脉硬化引起的,这会增加心血管疾病的风险。'}, '窦性心动过缓': {'病症对应中医辨证': ['气滞血瘀', '痰湿阻滞'], '病症分析': '这是指心脏的节律过缓,心率在每分钟60次以下,可能会导致头晕、乏力、心慌等症状。'}, '肥胖': {'病症对应中医辨证': ['气滞血瘀', '脏腑失调', '肾气不足', '脾虚湿阻', '痰湿阻滞'], '病症分析': '指身体的脂肪组织过多,体重超过正常范围,可能会导致一些心血管疾病、糖尿病、关节疼痛等问题。'}, '肺大疱': {'病症对应中医辨证': ['肺气不足', '痰湿阻滞', '外邪入侵'], '病症分析': '肺组织内一个或多个气腔突出,通常由于肺泡壁的破裂或肺组织的破坏所致。它们可能会导致肺功能下降等问题。'}, '肺结节': {'病症对应中医辨证': ['气滞血瘀', '肝气郁结', '痰湿阻滞'], '病症分析': '指肺部出现大小不一的结节,可能是良性的肺结节,也有可能是恶性的肺癌。'}, '肺少许慢性炎症': {'病症对应中医辨证': ['气血不畅', '肺气不足', '外邪入侵'], '病症分析': '指肺部有轻微的慢性炎症反应,可能由于吸入异物、感染等原因引起,如果不及时治疗可能会加重。'}, '肺少许炎症': {'病症对应中医辨证': ['肝气郁结', '脾胃虚弱', '肾气不足', '外邪入侵'], '病症分析': '表示肺部存在炎症反应,可能是由于细菌、病毒或其他病原体引起的。'}, '肝囊肿': {'病症对应中医辨证': ['气滞血瘀', '肝气郁结'], '病症分析': '指肝脏内出现液体充填的囊肿,多数为良性病变。肝囊肿通常不会引起明显的症状,但如果囊肿过大或者数量过多时,可能会压迫周围的组织或器官,引起腹痛、不适等症状。'}, '肝实质光点密集': {'病症对应中医辨证': ['气滞血瘀', '情志不畅'], '病症分析': '指在肝脏的超声检查中发现了一些密集的、光点状的区域,可能提示肝脏存在一些异常变化,如脂肪肝等。'}, '肝实质光点稍密集': {'病症对应中医辨证': ['气滞血瘀', '肝气郁结', '湿热内盛', '脾虚湿阻'], '病症分析': '指在肝脏的超声检查中发现了一些密集的、光点状的区域,可能提示肝脏存在一些异常变化,如脂肪肝等。'}, '肝血管瘤': {'病症对应中医辨证': ['气滞血瘀', '肝气郁结', '外邪入侵'], '病症分析': '肝血管瘤是一种良性的肝脏肿瘤,由肝脏内的毛细血管扩张形成。大多数病人无症状,但在少数情况下可能会出现疼痛、肝功能异常等症状。'}, '骨量减少': {'病症对应中医辨证': ['气滞血瘀', '气血不足', '肝肾不足'], '病症分析': '指骨骼中的骨量逐渐减少,骨密度下降,导致骨质疏松症等疾病。骨量减少通常会增加骨折的风险,特别是在老年人群体中,更容易发生危险。'}, '骨质疏松': {'病症对应中医辨证': ['气Line truncated
]
}
],
"source": [
"import json\n",
"\n",
"filename = 'data/tijianbingzheng.txt'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl)\n",
"m_key = set()\n",
"for k, v in dict1.items():\n",
" for item in v.keys():\n",
" m_key.add(item)\n",
"print(dict1)"
]
},
{
"cell_type": "markdown",
"metadata": {
@@ -1282,12 +1282,7 @@
" sheet[f'D{i}'] = v['年龄']\n",
" sheet[f'E{i}'] = ','.join(v['病症']) \n",
" i += 1\n",
"\n",
"wb.save(filename) \n",
"\n",
"\n",
"\n",
"\n"
"wb.save(filename)"
]
},
{
@@ -1335,15 +1330,8 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2022-12-09T03:45:39.442887Z",
"iopub.status.busy": "2022-12-09T03:45:39.442350Z",
"iopub.status.idle": "2022-12-09T03:45:39.579904Z",
"shell.execute_reply": "2022-12-09T03:45:39.578629Z",
"shell.execute_reply.started": "2022-12-09T03:45:39.442840Z"
},
"tags": []
},
"outputs": [],
@@ -1380,56 +1368,20 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {
"execution": {
"iopub.execute_input": "2022-12-09T03:46:12.149945Z",
"iopub.status.busy": "2022-12-09T03:46:12.149314Z",
"iopub.status.idle": "2022-12-09T03:46:12.163591Z",
"shell.execute_reply": "2022-12-09T03:46:12.161659Z",
"shell.execute_reply.started": "2022-12-09T03:46:12.149895Z"
},
"tags": []
},
"outputs": [
{
"ename": "AttributeError",
"evalue": "'str' object has no attribute 'render_notebook'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-16-fc8263bd7096>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mbar\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrender_notebook\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m: 'str' object has no attribute 'render_notebook'"
]
}
],
"outputs": [],
"source": [
"bar.render_notebook()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"execution": {
"iopub.execute_input": "2022-12-09T03:45:26.505194Z",
"iopub.status.busy": "2022-12-09T03:45:26.504668Z",
"iopub.status.idle": "2022-12-09T03:45:26.519538Z",
"shell.execute_reply": "2022-12-09T03:45:26.518053Z",
"shell.execute_reply.started": "2022-12-09T03:45:26.505147Z"
}
},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "unexpected EOF while parsing (<ipython-input-13-aff59bd6347d>, line 31)",
"output_type": "error",
"traceback": [
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-13-aff59bd6347d>\"\u001b[0;36m, line \u001b[0;32m31\u001b[0m\n\u001b[0;31m .render(\"bar_histogram.html\")\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m unexpected EOF while parsing\n"
]
}
],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pyecharts.globals import CurrentConfig, NotebookType\n",
"CurrentConfig.NOTEBOOK_TYPE = NotebookType.JUPYTER_LAB\n",