码迷,mamicode.com
首页 > 其他好文 > 详细

HBV检测数据分析

时间:2014-12-20 12:52:41      阅读:309      评论:0      收藏:0      [点我收藏+]

标签:

#一。总述:this program is used for HBV data analysis
# need more data to improve it, a HBV expert‘s help is necessary


#二.检查数据包括data include:
#(1)HBsAg,(hepatitis B surface antigen) 表面抗原;
#阳性判断被HBV感染标志之一,但阴性不能排除隐匿性HBV病毒
#(2)HBsAB,(hepatitis B surface antibody)HBV表面抗体
#(3)HBcAg,(Hepatitis B Core antigen) 核心抗原;
#(4)HBeAg, (Hepatitis B e antigen),e抗原
#(5)HBeAb ,(Hepatitis B e antibody) HBV的e抗体
#(6) HBV-preS1Ag

#2HBV-DNA

#3.肝功十二项

#4.血常规检测 (淋巴细胞,白细胞,中性线细胞)
#(1)白细胞:正常值(4-10)*10的9次方/L,如果增多--各种细菌感染,炎症,严重烧伤
#如果减少脾功能亢进,造血功能障碍,放射线,药物,化学毒素等引起骨髓抑制,疟疾,伤寒,
#病毒感染,副伤寒。
#(2)中性粒细胞(neutrophil):正常值(0.1-1.5)*10的9次方/L.增高:细菌感染,炎症;
#降低:病毒性感染
#(3)淋巴细胞:正常值(0.8-4.0)*10的9次方/L,增高:百日咳,传染性单核细胞增多症,病毒感染,急性传染性淋巴细胞增多症,淋巴细胞性白血病;
#降低:免疫缺陷


#三.程序目的:
#(1)描述HBV性质
#(2)检测Occult hepatitis B virus 隐匿性HBV病毒
#(3)检测慢性HBV病毒chronic HBV
#(4)检测急性HBV病毒 acute HBV
#(4.1)大三阳检测---传染性强
#(4.2)小三阳检测--传染性弱
# (5)检测变异HBV病毒 mutated HBV
# (6)检测病毒恢复期 recovery period
#(7)传染方式
#(8)疫苗注射咨询
#(9)免疫耐受期检测


#四.单词
# incubation (传染病的)潜伏期
#onset 发病
#semen精液
#vaginal secretions阴道分泌物
#wound exudates伤口分泌物
#antigen 抗原
#antibody 抗体

def introduction_HBV():
print """(1)HBV is short for Hepatitis B virus.\n(2)HBV is a DNA virus.\n(3)HBV is a
species of the genus Orthohepadnavirus, which is likewise a part of the
Hepadnaviridaefamily of viruses.\n(4)HBV can causes the hepatitis B and other disease
.\n(5)The incubation period from the time of exposure to onset of symptoms is 6 weeks to 6 months.
\n(6)HBV is found in highest concentrations in blood and in lower concentrations
in other body fluids (e.g., semen, vaginal secretions, and wound exudates).
\n(7)more information:http://en.wikipedia.org/wiki/Hepatitis_B_virus \nhttp://www.chinacdc.
cn/jkzt/crb/bdxgy/yxbdxgy/201301/t20130106_75116.htm"""

def transimission_HBV():
print """(1)blood\n(2)sex\n(3)born by mother\n(4)damaged skin or mucous \n(5)body fluids\n(6)drug injection"""

#HBV_DNA阳性测试,如果大于10**3,表示阳性
def HBV_DNA_test(HBV_DNA_value):
if HBV_DNA_value>10**3:
HBV_DNA="p"


def detect_HBV(HBsAg):
#是否感染HBV
if HBsAg=="p":
detect_result=True
if HBsAg=="n":
detect_result=False
print "healthy,but need HBV_DNA test to check Occulthepatitis B virus or mutated HBV"

return detect_result


def contagious_level(HBeAg,HBV_DNA=""):
#HBV传染强度测试
if HBeAg=="p" and HBV_DNA=="p":
contagious_result="high"

#需要进一步验证
if HBeAg=="n":
contagious_result="low"

return contagious_result



def detect__Occulthepatitis_B_virus(HBsAg,HBV_DNA):
#逆隐性HBV病毒

if HBsAg=="n" and HBV_DNA=="p":
result_Occulthepatitis_B_virus=True
elif HBsAg=="n" and HBV_DNA=="n":
result_Occulthepatitis_B_virus=False
else:
print "consult a doctor"

return result_Occulthepatitis_B_virus



def detect__mutated_HBV():
#HBV病毒变异判断
print "HBeAg positive or negative?"
HBeAg=raw_input().lower()
print "HBeAb positive or negative?"
HBeAb=raw_input().lower()
print "HBV_DNA positive or negative?"
HBV_DNA=raw_input().lower()
if HBeAg=="negative" or HBeAg=="n" and HBeAb=="positive" or HBeAb=="p" and\
HBV_DNA=="positive" or HBV_DNA=="p":
print "mutated HBV infected"
print "you may need a longer time to cure"


def recover_HBV(HBsAg,HBsAb,HBeAg,HBeAb,HBcAb,HBV_DNA):
#免疫恢复期判断(以前感染过HBV)

if HBsAg=="n"and HBeAg=="n" and HBV_DNA=="n" and HBeAb=="p" and HBcAb=="p" and HBsAb=="p" :
print "congulation! you are in recovery period! and have antibody for HBV"
result_recover_HBV=True


elif HBsAg=="n"and HBeAg=="n" and HBV_DNA=="n" and HBeAb=="p" and HBcAb=="p" and HBsAb=="n":
print "congulation! you are in recovery period! but you have no antibody for HBV,\
you should better consult a doctor for HBV vaccine"
result_recover_HBV=True

else:
print "you need to consult a doctor"

return result_recover_HBV

 

def vaccine_consult():
#是否接受疫苗
if recover_HBV()==True:

print "enter the HBsAb number:"
HBsAb_number=input()

if HBsAb_number<10:
print "you are in low level of HBV protection,consult \
a doctor for HBV vaccine injection"
else:
print"you are safe from HBV, but be careful for mutated HBV"

 

def HBV_status(HBsAg="",HBsAb="",HBeAg="",HBeAb="",HBcAb="",HBV_DNA="",AST=0,ALT=0):
# chronic HBV 急性乙肝前期
if HBsAg=="p" and HBsAb=="n" and HBeAg=="p" and HBeAb=="n" and HBcAb=="n":
result= "maybe chronic HBV infection early period"

# chronic HBV 急性乙肝后期
if HBsAg=="p" and HBsAb=="n" and HBeAg=="n" and HBeAb=="n" and HBcAb=="n":
result= "maybe chronic HBV infection later period"

# 大三阳,传染性高
if HBsAg=="p" and HBsAb=="n" and HBeAg=="p" and HBeAb=="n" and HBcAb=="p":
result="maybe da_san_yang"

#小三阳,传染性小
if HBsAg=="p" and HBsAb=="n" and HBeAg=="n" and HBeAb=="p" and HBcAb=="p":
result=" maybe xiao_san_yang"

 



def AST_devide_ALT(AST,ALT):
#AST/ALT比值,比值越大,肝破坏越大
return float(AST)/ALT

 



def hepatitis_status():
#相对参考,肝受损程度
value_AST_devide_ALT=AST_devide_ALT(AST,ALT)
if value_AST_devide_ALT<1:
result_hepatitis_status="maybe acute hepatitis"
else:
result_hepatitis_status="maybe chronic hepatitis"

return result_hepatitis_status

def blood_test(WBC,lympha,neutrophil):
#测试仪器---血液细胞分析仪检验(不同测试仪器标准参数不一样)
#(1)白细胞:正常值(3.5-9.5)*10的9次方/L,如果增多--各种细菌感染,炎症,严重烧伤
#如果减少脾功能亢进,造血功能障碍,放射线,药物,化学毒素等引起骨髓抑制,疟疾,伤寒,
#病毒感染,副伤寒。
#(2)中性粒细胞(neutrophil):正常值(0.1-1.5)*10的9次方/L.增高:细菌感染,炎症;
#降低:病毒性感染
#(3)淋巴细胞:正常值(0.8-4.0)*10的9次方/L,增高:百日咳,传染性单核细胞增多症,病毒感染,急性传染性淋巴细胞增多症,淋巴细胞性白血病;
#降低:免疫缺陷
if WBC<3.5*(10**9) or neutrophil<2.0*(10**9) or lympha>4.0*(10**9):
result__blood_test="maybe virus infection"

if WBC>9.5*(10**9) or neutrophil>1.5*(10**9):
result__blood_test="maybe bacteria infection"

return result__blood_test

 

#免疫耐受期 immune tolerence
def immune_tolerence(result_hepatitis_status,HBV_DNA,result_HBV_status):
if result_hepatitis_status=="maybe acute hepatitis",and HBV_DNA=="p",and \
result_HBV_status="maybe da_san_yang":
return True

#main()

def main():

#HBV_DNA_value
print "input HBV_DNA number:"
HBV_DNA_value=input()


#HBsAg
print "HBsAg positive or negative?"
HBsAg=raw_input().lower()
HBsAg=HBsAg[0]

#HBsAb
print "HBsAb positive or negative?"
HBsAb=raw_input().lower()
HBsAb=HBsAb[0]

#HBeAg
print "HBeAg positive or negative?"
HBeAg=raw_input().lower()
HBeAg=HBeAg[0]

#HBeAb
print "HBeAb positive or negative?"
HBeAb=raw_input().lower()
HBeAb=HBeAb[0]

#HBcAb
print "HBcAb positive or negative?"
HBcAb=raw_input().lower()
HBcAb=HBcAb[0]

#HBV_DNA
print "HBV_DNA positive or negative?"
HBV_DNA=raw_input().lower()
HBV_DNA=HBV_DNA[0]

#AST
print "enter the AST number:"
AST=input()

#ALT
print "enter the ALT number:"
ALT=input()

#WBC 白细胞
print "enter the WBC value:"
WBC=input()

#lymphatic cell 淋巴细胞
print "enter the lympha value:"
lympha=input()


#neutrophil 中性细胞
print "enter the neutrophil value:"
neutrophil=input()

result_hepatitis_status=hepatitis_status()

result_HBV_status=HBV_status()

 



# result_recover_HBV=recover_HBV()

 

 

 

 

 

 

 

 

 

 

 

 





HBV检测数据分析

标签:

原文地址:http://www.cnblogs.com/biopy/p/4175242.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!