Analysis of HBV detection data

Source: Internet
Author: User
Tags hbsab

#一. General: This program was used for the HBV data analysis
# need more data to improve it, a HBV expert ' s help is necessary


#二. Check data includes:
# (1) HBsAg, surface antigen (hepatitis B surface antigen);
#阳性判断被HBV感染标志之一, but negative can not rule out the occult HBV virus
# (2) Hbsab, (hepatitis B surface antibody) HBV surface antibody
# (3) HBcAg, (hepatitis B core antigen) core antigen;
# (4) HBeAg, (hepatitis B e antigen), E antigen
# (5) Hbeab, (hepatitis B e antibody) HBV e antibody
# (6) Hbv-pres1ag

#2HBV-dna

#3.12 liver function

#4. Blood routine assays (lymphocytes, leukocytes, neutral cells)
# (1) White blood cells: normal (4-10) *10 9-L, if increased--various bacterial infections, inflammation, severe burns
#如果减少脾功能亢进, hematopoietic dysfunction, radiation, drugs, chemical toxins and other causes of bone marrow suppression, malaria, typhoid,
#病毒感染, Paratyphoid.
# (2) neutrophils (neutrophil): Normal (0.1-1.5) *10 9-L. Increase: bacterial infection, inflammation;
#降低: Viral infections
# (3) lymphocyte: Normal (0.8-4.0) *10 9-L, increased: pertussis, infectious monocytes, viral infections, acute infectious lymphocytic syndrome, lymphocytic leukemia;
#降低: Immune deficiency


#三. Purpose of the program:
# (1) Description of HBV properties
# (2) Detection of occult hepatitis B virus occult HBV virus
# (3) Detection of chronic HBV virus chronic HBV
# (4) Detection of acute HBV in acute HBV virus
# (4.1) Big detection---infectious strong
# (4.2) applied detection--infectious weak
# (5) Detection of mutated HBV virus mutated HBV
# (6) Detect virus recovery period recovery period
# (7) Infection mode
# (8) Vaccine injection Counseling
# (9) Detection of immune tolerance period


#四. Words
# incubation (infectious) incubation period
#onset onset
#semen精液
#vaginal secretions Vaginal secretions
#wound exudates Wound secretion
#antigen antigen
#antibody Antibodies

Def INTRODUCTION_HBV ():
Print "" "(1) HBV is short for hepatitis B virus.\n (2) HBV was 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 are 6 weeks to 6 months.
\ n (6) HBV is found in highest concentrations in blood and in lower concentrations
In the 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阳性测试, if greater than 10**3, indicates positive
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 "Need a longer time to cure"


def RECOVER_HBV (Hbsag,hbsab,hbeag,hbeab,hbcab,hbv_dna):
#免疫恢复期判断 (previously infected with HBV)

If hbsag== "n" and hbeag== "n" and hbv_dna== "n" and hbeab== "P" and hbcab== "P" and hbsab== "P":
Print "congulation! You is in recovery period! and has 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 is in recovery period! But you had no antibody for hbv,\
Should better consult a doctor for HBV vaccine "
Result_recover_hbv=true

Else
Print "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 is in the low level of the HBV protection,consult \
A doctor for HBV vaccine injection "
Else
Print "You is safe from HBV, but is careful for mutated HBV"

def hbv_status (hbsag= "", hbsab= "", hbeag= "", hbeab= "", hbcab= "", hbv_dna= "", ast=0,alt=0):
# chronic HBV Acute hepatitis B prophase
If hbsag== "P" and hbsab== "n" and hbeag== "P" and hbeab== "n" and hbcab== "n":
result= "Maybe chronic HBV infection early period"

# chronic HBV Acute hepatitis B late
If hbsag== "P" and hbsab== "n" and hbeag== "n" and hbeab== "n" and hbcab== "n":
result= "Maybe chronic HBV infection later period"

# Big Samyang, Contagious high
If hbsag== "P" and hbsab== "n" and hbeag== "P" and hbeab== "n" and hbcab== "P":
result= "Maybe Da_san_yang"

#小三阳, infectious small
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 ratio, the greater the ratio, the greater the liver damage
return float (AST)/alt



Def hepatitis_status ():
#相对参考, the degree of liver damage
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):
#测试仪器---Blood cell analyzer test (different test instrument standard parameters)
# (1) White blood cells: normal (3.5-9.5) *10 9 times L, if increased--various bacterial infections, inflammation, severe burns
#如果减少脾功能亢进, hematopoietic dysfunction, radiation, drugs, chemical toxins and other causes of bone marrow suppression, malaria, typhoid,
#病毒感染, Paratyphoid.
# (2) neutrophils (neutrophil): Normal (0.1-1.5) *10 9-L. Increase: bacterial infection, inflammation;
#降低: Viral infections
# (3) lymphocyte: Normal (0.8-4.0) *10 9-L, increased: pertussis, infectious monocytes, viral infections, acute infectious lymphocytic syndrome, lymphocytic leukemia;
#降低: Immune deficiency
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 white blood cells
Print "Enter the WBC value:"
Wbc=input ()

#lymphatic Cell lymphocytes
Print "Enter the Lympha value:"
Lympha=input ()


#neutrophil Neutral cells
Print "Enter the Neutrophil value:"
Neutrophil=input ()

Result_hepatitis_status=hepatitis_status ()

Result_hbv_status=hbv_status ()



# RESULT_RECOVER_HBV=RECOVER_HBV ()





Analysis of HBV detection data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.