• 吴裕雄 PYTHON 人工智能——智能医疗系统后台智能分诊模块及系统健康养生公告简约版代码展示


    #coding:utf-8
    
    import sys
    import cx_Oracle
    import numpy as np
    import pandas as pd
    import tensorflow as tf
    
    def main(argv):
        conn=cx_Oracle.connect('doctor/admin@localhost:1521/tszr')
        cursor = conn.cursor()
        sql = "select distinct surgery from menzhen"
        cursor.execute(sql)
        rows = cursor.fetchall()
        dipart = []
        for row in rows:
            dipart.append(row[0])
        ############################################
        sql = "select distinct surgery,surgerychest from menzhen"
        cursor.execute(sql)
        rows = cursor.fetchall()
        dipartmentSubj = []
        for row in rows:
            one = []
            one.append(row[0])
            one.append(row[1])
            dipartmentSubj.append(one)
        ###########################################################
        sql = "select illSubject,question from questb"
        cursor.execute(sql)
        rows = cursor.fetchall()
        subjectQues = []
        for row in rows:
            one = []
            one.append(row[0])
            one.append(row[1])
            subjectQues.append(one)
        #############################################################
        sym = ""
        for i in range(len(argv)):
            sym += argv[i]
        symptom = []
        symptom.extend(sym)
        subCount = []
        for j in range(len(subjectQues)):
            temp = []
            que = []
            que.extend(subjectQues[j][1])
            count = 0
            for i in range(len(symptom)):
                if(symptom[i]!="," or symptom[i]!=" "):
                    for k in range(len(que)):
                        if(symptom[i]==que[k]):
                            count = count + 1
            temp.append(subjectQues[j][0])
            temp.append(count)
            subCount.append(temp)
        ############################################################
        for i in range(len(subCount)):
            for j in range(len(dipartmentSubj)):
                if(subCount[i][0]==dipartmentSubj[j][1]):
                    subCount[i].append(dipartmentSubj[j][0])
        symMaxCount = sorted(subCount,key=(lambda x:x[1]),reverse=True)           
        print("根据你输入的问题,经过大数据分析建议你选择以下的门诊部和对应的科:")
        print("门诊部门:"+symMaxCount[0][2])
        print("对应的科:"+symMaxCount[0][0])
        
    # if __name__ == '__main__':
    #     main(sys.argv)
    
    print("===================>>系统智能分诊功能模块<<===================")
    inputInfo = input("请输入你的症状:")
    main(inputInfo)

    #系统健康公告
    import sys
    import cx_Oracle
    import numpy as np
    import pandas as pd
    import tensorflow as tf
    
    conn=cx_Oracle.connect('doctor/admin@localhost:1521/tszr')
    cursor = conn.cursor()
    
    sql = "select TITLE,ARTICLE from SYSTEMINFORMATION"
    cursor.execute(sql)
    rows = cursor.fetchall()
    sysinfo = []
    for row in rows:
        temp = []
        temp.append(row[0])
        temp.append(row[1])
        sysinfo.append(temp)
        
    print("================>>系统养生推荐公告功能模块<<===============")
    for i in sysinfo:
        print("节气:"+i[0])
        print("养生建议:"+i[1])

  • 相关阅读:
    Hausdorff distance between mesh and its symmertic one.
    Fast algorithm to compute minimum volume oriented bounding box
    C++文件读写详解(ofstream,ifstream,fstream)
    libCURL开源库在VS2010环境下编译安装,配置详解
    VPB和OSGGIS安装
    OpenSceneGraph 笔记--如何导出三角形数据
    OpenGL编程指南(第七版)
    osgAnimation例子的注释的注释
    osg 示例程序解析之osgdelaunay
    VS2010+64+OSG3.2.1之五Plugins dae编译
  • 原文地址:https://www.cnblogs.com/tszr/p/10852729.html
Copyright © 2020-2023  润新知