Latest amendment on 5 February 2012

V. Kouba

 

 

E P I Z O O  -  SOFTWARE PACKAGE FOR ANIMAL POPULATION HEALTH ANALYSES AND DISEASE CONTROL PROGRAMMING

 

APPLICABLE IN ALL MS WINDOWS VERSIONS (UP TO VISTA)

 

Historically first software in the world for anti-epizootic activities at all levels applicable also in human epidemiology

 

EPIZOO SOFTWARE KNOW-HOW ATTACHED

(containing more than 20 thousand command lines)

 

 

    The EPIZOO software was developed as the follow-up of the author’s Doctor of Science (DrSc.) thesis “Principy metodologie soustavy kvantitativních ukazatelů zdravosti a nemocnosti animální populace určených pro epizootologickou analýzu“ (Comprehensive system of quantitative methods for animal population health/disease analyses) defended at the University of Veterinary Sciences, Brno in 1976. The majority of the analytic methods of this thesis were used in the author’s General Epizootiology textbooks (firstly in Czech, then in Spanish and finally in English). This software was developed to facilitate the study of the students, the practical problem solutions by the veterinarians  as well as the theoretical and applied research of animal/disease mass phenomena at all levels of animal populations.

 

     The EPIZOO software was developed specifically for the analyses of animal population health and control of diseases, including those transmissible to man. The other purpose is to facilitate animal population health programming, mainly the control of communicable diseases. The package, covering large spectrum of veterinary practice problems, represents an integral and complex system of methods and indicators. It is useful for diagnosis results evaluation, health/disease problems solution, research, studies, modelling, simulating,   education and training in epizootiology, veterinary epidemiology, veterinary public health and population medicine. The methods for action-oriented population analyses for adequate decision-making have the priority. Particular attention has been given also to the methods related to national and international trade such as disease risk assessment and management (through testing, diseases reduction and eradication).    


 

  The overwhelming majority of the EPIZOO methods are applicable for any animal kingdom species (domestic, wild, vertebrate, invertebrate, etc.) health-related states and events, for any population disease (infectious and  non-infectious), anywhere and at any time.

 

   First version was written in Spanish containing mainly analytic methods described in the author’s textbook “Epizootiología general” published in 1987. Following versions were written only in English, initially used for education and training purposes. In 1993  the World Health Organization (WHO) in Geneva took over EPIZOO distribution through 1.4 megabyte diskettes. From 1996 the EPIZOO has been available on the WHO internet websites, first under the address “http://tron.is.s.u-tokyo.ac.jp/WHO/whosis/vph/epizoo/epizoo.htm”, and later under http://www.who.ch/whosis/vph/epizoo/epizoo.htm and finally under   http://www.who.int/emc/diseases/zoo/epizoo.html up to March 2005. WHO was distributing EPIZOO versions from 2.4 up to 3.2 . Later EPIZOO versions are  available on author’s new website in http://vaclavkouba.byl.cz/software/software.zip.  

 

Examples:

 

 Weekly Epidemiological Record, World Health Organisation, 1993, 68, page 349: “Veterinary public health – Computer software package:  “ A computer software package, EPIZOO, has been developed specifically for analysis of information on animal health and diseases, including those transmissible to man. The software package includes indicators to analyse data on morbidity and mortality, geographical distribution, animal population characteristics, and dynamics of epizootics. It helps to prepare for investigations of animal population health and disease, to analyse diagnosis and consequences of illness, to design animal health programmes, to estimate costs and evaluate programmes. It also include some sampling and other simple and practical statistical techniques.  It is written to facilitate information management for problem-solving, modelling, simulation studies and training in veterinary epidemiology and for action-oriented epidemiological analyses and decision-making. The EPIZOO version 2.4 fits onto 1.4 megabyte diskette and can be used on IBM compatible personal computers with MS-DOS operating system.  The software package, which was developed by Professor V. Kouba (P.B. 516, 17000 Prague 7, Czech Republic) is easy to use and does not require training or even a manual. It can be obtained (in English only) free of charge by writing to Chief, Veterinary Public Health, World Health Organisation, CH-1211 Geneva 27, Switzerland. The request should be accompanied by a 1.4 MB (3½ inch) diskette.”

 

World Health Organisation website for Communicable diseases surveillance and Response  www.who.int/csr - Utilities with following text : “ A computer software package, EPIZOO, has been developed specifically for analysis of information on animal health and diseases, including those transmissible to man. The software package includes indicators to analyse data on morbidity and mortality, geographical distribution, animal population characteristics, and dynamics of epizootics. It helps to prepare for investigations of animal population health and disease, to analyse diagnosis and consequences of illness, to design animal health programmes, to estimate costs and evaluate programmes. It also include some sampling and other simple and practical statistical techniques.” (The web address was changed in March 2005).

 

Only during first nine months, i.e. up to 6 October 1994, the WHO HQs sent on request the EPIZOO diskettes to 73 institutes in 46 countries *). During next years there were sent further hundreds of the EPIZOO software. Afterwards the mass distribution was realized through the WHO websites.

 

*) England (17), USA (12), Italy (9), Germany (9), Spain (5), France (5), Netherlands (5), New Zealand (5), Israel (3), Australia (3), Sweden (3), Switzerland (3), Canada (3), Tunis (2), Denmark (2), Uganda (2), Greece (2), Iran (2), Argentina (2), Bahamas, Zimbabwe, Slovenia, Turkey, Mozambique, Belize, Ireland, Latvia, Taiwan, Cyprus, Thailand, Nepal, Hungary, Austria, Hong-Kong, United Arab Emirates, Belgium, South Africa, Bolivia, Malaysia, Mexico, India, Maroc, Uruguay, Malta and Trinidad.

 

Diskettes with EPIZOO software were also distributed with personal instruction of the author to all European Chief Veterinary Officers attending  Regional Conference of the Office International of Epizootics held in Prague, Czechoslovakia in September 1998.

 

     World Health Organisation also published a particular paper

 

V. Kouba (1995) : „EPIZOO: software for veterinary epidemiology training and problem solving”. Bulletin of the World Health Organisation, Volume 73, No. 1, 77-83 

 

and included this software  among the  “Utilities” of the Division of Emerging and other Communicable Diseases Surveillance and Control (EMC) and later of the Division of Communicable Disease Surveillance and Response (CSR).

 

     International Office of Epizootics (OIE) also published  papers on this software:

 

 - V. Kouba: „EPIZOO - software package of selected methods for animal population health analysis and programming (ver. 2.5a)”.  Rev. sci. tech. Off. Int. Epiz., 1994, 13 (3),637-650

 - V. Kouba: “Computerized methods for animal health risk assessment using the EPIZOO 2.6 program”.  Rev. sci. tech. Office International des Epizooties, 1997, 16 (3), 793-799.

 

    The EPIZOO version 4.0 (May 2003) package of 1389 Kbytes (it fits onto one 1.4 megabyte diskette without compression) with 25 thousand command lines includes also a sub-software called EPIZMETH. It contains explanatory subprogrammes of detailed information on all EPIZOO methods (formulae, their composition, input data, calculation procedure, etc.) having the same structure (menus). EPIZOO, version 4.0, consists of 14 modules, 172 subprogrammes with 318 different methods covering all major fields of animal population health/disease analysis and programming. The rich menu of the methods provides the user with the chance to select the most adequate procedure for the solution of specific problems. EPIZOO can be run under MS DOS as well as under all versions of the MS WINDOWS, including MS WINDOWS VISTA operation systems.

 

    EPIZOO is a relatively simple tool for the veterinarians in the field, diagnostic laboratories, slaughterhouses and management practice, for veterinary educators, instructors, students and trainees as well as for specialists of related careers.

    

      This fully user-friendly programme makes easier the analyses and  decision processes. The time saved, avoiding tedious manual calculations, can be used for other professional activities. The use of this software is simple, there is no need for any manual or training. The user, after keying "epizoo", selects from the menus the method desired and answers the questions computer asks him. The results in the form of text, numeric value of resulting relevant indicators, tables and graphs are obtained immediately.

 

      The  software package has been further developed and the latest version represents up today the most comprehensive system of quantitative methods and indicators for animal population health/disease analyses and programming. The  EPIZOO, version 4.0a (March 2005)  is available, again   free of charge, in http://vaclavkouba.byl.cz/software/software.zip.

 

As follow-up are available:

 

- „Comprehensive system of quantitative methods for population health/disease analyses – examples of practical application“ (http://vaclavkouba.byl.cz/epiexamples.htm) containing 371 examples using hundreds of quantitative (mathematically expressed) indicators of the EPIZOO  software tested and used in practice for animal population health and disease analyses and control programmes at local, national and international levels.

 

- „Comprehensive system of quantitative methods for population health/disease analyses – formulae and procedures“ (http://vaclavkouba.byl.cz/epimethodology.htm) containing detailed descriptions of all methods used in EPIZOO, i.e. „know-how“ : mathematical formulae, their components,  data processing and result forming.

 

Additionally is available also Spanish written EPIZOOT, version 1.0,  software package in http://vaclavkouba.byl.cz/software/epizoot.zip  and „El sistema de los métodos cuantitativos para los análisis de la salud de las poblaciones animales – ejemplos de la aplicación práctica“ (http://vaclavkouba.byl.cz/epiejemplos.htm) containing more than one hundred examples of the application of quantitative methods and indicators for animal population health/disease analyses and programming. 

 

 

Notes:

 

      Originally under MS DOS the EPIZOO was using full screen. Under WINDOWS operation system the EPIZOO starts using only smaller windows (¼ screen size); for the window expanding to full screen following procedures to be used:

 

      1) place cursor on the upper blue bar and press right  mouse button

      2) select Properties

      3) select Display Option

      4) select Full Screen – press OK

      5) select Apply Properties

      6) select “Save properties for future windows with the same title” – press OK

   

      Printing: Under MSDOS the EPIZOO full screen contents  could be printed immediately using “PRINT SCREEN” key. Under WINDOWS operation system with the Microsoft WORD package following procedure to be used:

      1) Open a new file in WORD where the copied screen will be pasted

      2) place cursor on the upper blue bar and press right  mouse button

      3) select Edit

      4) select Mark

      5) with the coursor, placed in the EPIZOO window left upper corner, while pressing left mouse button, mark by cursor move what is to be copied

      6) place cursor on the upper blue bar and press right  mouse button

      7) select Edit

      8) select Copy

      9) open prepared the WORD file and locate the place where the EPIZOO window contents to be included

     10) select Edit

     11) select Paste

     12) select Print

 

 

 

   EPIZOO has following structure and contents:

 

1. Animal population characteristics of health importance

 

   Animal population species/categories  structures and their territorial distribution; breeding, production and ecological conditions influencing population distribution; selected indicators related to disease resistance and susceptibility of animals; average production per animal, input, space and time units; population dynamics - "vertical movement" (survival rates); estimation of population size based on average density and on capture/recapture of wildlife.

 

2. Basic indicators of animal population health/disease analysis

 

   Indicators for animal population health/disease analysis such as prevalence, incidence and extinction; indicators of presence and absence of animal health phenomena; indicators for the analysis of animal population collective health, viability, disease morbidity, mortality and nidality (focality); indicators of disease territorial distribution; human - animal populations relations and zoonoses.

 

3. Animal population health structures

 

   Animal population epizootiological structure; disease territorial structure; foci types' structure; morbidity, mortality and nidality structure by causes and forms; disease occurrence according to animal species and categories, breeding, production and ecological conditions; proportions of disease different forms, symptoms and findings of specific etiological agents and antibodies.

 

4. Indicators of epizootic process dynamics

 

   Comparative indexes of animal health phenomena dynamics; average of changing numbers of diseased animals, foci, etc.; seasonality of population health/disease phenomena; indicators of morbidity and nidality tendency; relations between new cases and space, time, diseased animals and foci; population 'vertical movement' and chronic disease process; estimation of surviving diseased animals according to survival rates; territorial propagation of transmissible diseases; development of disease frequency with cyclic, ascending and descending tendencies; chronological time series of population health phenomena.

 

5. Animal disease risk assessment

 

   General indicators of animal disease risk; risk probability assessment of disease introduction, risk comparison of a disease introduction from several territories, risk comparison of several diseases introduction from one territory; animal population movement, transfer, concentration as potential risks of disease propagation; food consumption as potential risk of food-borne diseases.

 

6. Consequences of animal population health and disease

 

   Animal population benefit and disease losses in production; public health consequences of diseases common to animals and man; losses due to specific disease according to average parameters; losses due to animal death, condemnation of carcasses, utility reduction and reproduction deterioration; inputs' benefit/losses in healthy/diseased animals; losses due to population health/disease measures; cost of animal population health mass actions.

 

7. Investigations of animal population health situation

 

   Evaluation of diagnostic method quality (specificity and sensitivity); indicators of animal population investigation grade; proportions of different types of diagnostic tests; infectious disease evidence and notification grades; positivity and negativity of test results; agreement between test results of two investigators, concordance grade of compared test results and comparison of two tests according to their specificity and sensitivity; population multi-etiological investigations; testing parasitic diseases extensity and intensity; testing infection intensity grades; predictive values according to Bayes' theorem.

 

8. Sampling in animal population health investigations

 

   Random numbers for selection of representative sample of animals and herds; sample size for detecting presence of a disease in a population, for estimating prevalence in large and finite populations and for estimating prevalence using confidence interval and absolute difference; sample size for estimating mean of population health phenomena; sample size for detecting difference between two prevalences and between two means; sample size for estimating prevalence from simple and cluster random samples; stratified sampling in animal population investigations; probability of  failure to detect diseased animals.

 

9 .Animal population health programmes

 

   Method for selection of priority diseases for animal health programmes; model for animal morbidity and nidality prognosis; planning for animal morbidity reduction (in linear form and in curve form); planning for animal population specific health recovery; planning/prognosis of reducing nidality, mortality and losses and of expanding specific disease free territory; evaluation of specific mass animal health actions (incl. vaccinations); 'critical path' method in animal population health planning; justified distribution of animal health programme inputs; animal health programme/measures coverage.

 

10. Cost and efficiency of animal population health programmes

 

    Basic indicators of economic benefit/cost analysis; absolute economic benefit of animal health programmes; biological, public health and production cost/effectiveness of animal health programmes; effectiveness of prophylactic measures and recovery rates; final situation in populations with and without programme; programme benefit/cost ratio in discounted and cumulative monetary values; economic effect after specific animal disease eradication; public health and biological effect  of specific animal disease eradication; consumption and cost of vaccines, drugs and other substances; animal health programme implementation.

 

11.Complementary subprogrammes - I

 

   Disease introduction risk assessment applying user-defined criteria; risk probability of test negative results in infected animals; risk probability that at least one animal import unit is infected; survival of diseased and vaccinated animals according to their replacement process; prevalence of foci and intrafocal diseased/exposed animals; prevalence based on outbreaks, herd size and infection duration; relations between prevalence of population and of affected herds; rate of spread of animal disease outbreaks; animals and livestock units per territory unit, inhabitant and veterinarian.

 

12.Complementary subprogrammes - II

 

    Morbidity and mortality adjustment based on category structure standards; two population rates adjustment based on standard proportions and category standards; true prevalence estimation based on diagnostic method detectability; selection of priority diseases for control programme; selection of methods for specific disease control programme; survey response rate; dilution of solution for disinfection, disinfestation, etc.; values of animal products per one veterinarian and animal commodity export/import size per one veterinarian; per capita production of food of animal origin.

 

13. Selected statistical methods

 

    Arithmetic means and measures of dispersion; calculation of proportions including standard error; conversion between percentage/proportion and absolute data; distribution of cumulative frequencies; Chi-square test and contingency tables; linear regression and correlation coefficient; McNemar's test, Fisher's test; arithmetic operations.

 

14  Other selected statistical and economic methods

 

    Tests of the difference between two proportions and two arithmetic means; test of the difference in means of two small-sized samples; confidence intervals estimates for population mean and proportion, for the difference between means and between proportions; Student's 't' critical values;  analysis of critical point of production economic efficiency; application of interest, discount and inflation rates;  conversion between metric and Anglo-Saxon measures. Veterinary service cost and animal population/production values; models of budget for animal population health programmes.

 

 

  More information see in author's  articles:

 

- Rev. sci. tech. Office International des Epizooties, 1994, 13 (3),637-650.

- Bulletin of the World Health Organization, 1995, 73 (1), 77-83.

.

 

Other reference see in: http://vetgate.ac.uk/whatsnew/detail/3005565.html

 

                                                                                  

                                                                                                       Prof.Dr Vaclav K o u b a, DrSc.

 

 

Annex:

 

EPIZOO, version 4.0a (2005)

 

         M A I N    M  E  N  U    OF   SUBPROGRAMME  GROUPS

 

         1-Animal population - characteristics of health importance

         2-Animal population health/disease analysis - basic indicators

         3-Selected indicators of animal population health structures

         4-Selected indicators of epizootic process dynamics

         5-Selected indicators of animal disease risk assessment

         6-Consequences of animal population health and disease

         7-Investigations of animal population health situation

         8-Methods related to sampling in population investigations

         9-Selected aspects of animal population health programmes

         10-Cost and efficiency of animal population health programmes

         11-Complementary subprogrammes - I

         12-Complementary subprogrammes - II

         13-Annex I - Selected basic statistical methods

         14-Annex II - Other selected statistical and economic methods

 

1-ANIMAL POPULATION - SELECTED CHARACTERISTICS OF HEALTH IMPORTANCE

 

     1-Animal population size and species structure

     2-Animal population categories (strata) structure

     3-Animal population territorial distribution

     4-Breeding/production conditions influencing animals distribution

     5-Ecological conditions influencing animals distribution

     6-Selected indicators related to disease resistant animals

     7-Selected indicators related to disease susceptible animals

     8-Animal population production per animal, input, space and time

     9-Animal population dynamics - 'vertical movement'

     10-Estimation of animals number according to survival rates

     11-Estimation of number of wild animals (vertebrates+invertebrates)

     12-Estimation of animal population size based on capture/recapture

     13-Estimation of animal population size based on average density

 

2-ANIMAL POPULATION HEALTH/DISEASE ANALYSIS - BASIC  INDICATORS

 

      1-General indicators for animal population health analysis

      2-Indicators of presence/absence of animal health phenomena

      3-Selected indicators of animal population health (disease free)

      4-Selected indicators of animal population morbidity

      5-Selected indicators of animal population viability (survival)

      6-Selected indicators of animal population mortality

      7-Selected indicators of animal disease nidality (focality)

      8-Selected indicators of animal disease territorial distribution

      9-Human/animal populations and zoonoses

 

3-SELECTED INDICATORS OF ANIMAL POPULATION HEALTH STRUCTURES

 

      1-Animal population epizootiological structure

      2-Animal population disease territorial structure

      3-Animal population diseases foci (outbreaks) types' structure

      4-Territory epizootiological structure

      5-Morbidity, mortality and nidality structure by causes/forms

      6-Disease occurrence according to animal species and categories

      7-Disease occurrence according to breeding/production conditions

      8-Disease occurrence according to ecological conditions

      9-Tables of animal disease occurrence acc. to dif. criteria

      10-Tables of animal population, farms and territory epi. structure

      11-Tables of disease foci and intrafocal structure

      12-Proportions of disease different forms/symptoms findings

      13-Proportions of specific etiological agents/antibodies findings

 

 4-SELECTED INDICATORS OF EPIZOOTIC PROCESS DYNAMICS

 

       1-Comparative indexes of population health phenomena dynamics

       2-Average of changing numbers of diseased animals, foci etc.

       3-Seasonality of population health/disease phenomena

       4-Selected tendency indicators of morbidity and nidality

       5-Relations between new cases and space/time/diseased/foci

       6-Population 'vertical movement' and chronic disease process

       7-Number of diseased animals according to survival rates

       8-Territorial propagation of transmissible diseases

       9-Development of disease frequency with cyclic tendency

       10-Development of disease with ascending/descending tendency

       11-Chronological time series of population health phenomenon

   

5-SELECTED INDICATORS OF ANIMAL DISEASE RISK ASSESSMENT

 

       1-General indicators of animal disease risk

       2-Risk probability assessment of animal disease introduction I.

       3-Risk probability assessment of animal disease introduction II.

       4-Risk comparison of a disease introduction from several territories

       5-Risk comparison of several diseases introduction from one territory

       6-Animal population movement as potential risk of disease propagation

       7-Animal products transfer as potential risk of disease propagation

       8-Concentration of animals as potential risk of disease propagation

       9-Risk probability assessment of animal disease propagation

       10-Per capita food consumption as potential risk of food-born diseases

 

6-CONSEQUENCES OF ANIMAL POPULATION HEALTH AND DISEASE

 

       1-Animal health benefit and disease losses in production

       2-Public health consequences of diseases common to animals and man

       3-Losses due to specific disease according to average parameters

       4-Losses due to death and condemnation of animal carcasses

       5-Losses due to diseased animals' utility reduction

       6-Losses due to diseased animals' reproduction deterioration

       7-Inputs benefit/losses in healthy/diseased animals

       8-Summary tables of losses due to animal population diseases

       9-Cost of population health mass actions

       10-Economic losses due to population health/disease measures' costs

       11-Blanc summary tables of animal population disease consequences

 

 7-INVESTIGATIONS OF ANIMAL POPULATION HEALTH SITUATION

 

       1-Evaluation of diagnostic method quality

       2-Indicators of animal population investigation grade

       3-Proportions of different types of diagnostic tests

       4-Infectious disease evidence and notification grades

       5-Positivity and negativity of test results

       6-Agreement between test results of two investigators

       7-Concordance grade of compared tests' results

       8-Summary table of animal disease investigations

       9-Summary table of animal disease investigation results

       10-Population/sample multi-etiological investigations

       11-Testing parasitic diseases extensity and intensity

       12-Testing infection intensity grades in animals

       13-Comparison of two tests acc. specificity/sensitivity

       14-Relationship of positively and negatively tested animals

       15-Predictive value according to Bayes' theorem

 

8-SELECTED SAMPLING METHODS FOR POPULATION HEALTH INVESTIGATIONS

  

       1-Random numbers for selection of representative animals/herds

       2-Sample size for detecting presence of a disease in a population

       3-Sample size for estimating prevalence in large population

       4-Sample size for estimating prevalence using confidence interval

       5-Sample size for estimating prevalence using absolute difference

       6-Sample size for estimating prevalence in finite population

       7-Sample size for detecting difference between two prevalences

       8-Sample size for estimating mean of population health phenomena - I.

       9-Sample size for estimating mean of population health phenomena - II.

       10-Sample size for detecting difference between two means

       11-Stratified sampling for population health investigations

       12-Estimating prevalence from simple and cluster random samples

       13-Probability of failure to detect diseased animals

 

9-SELECTED ASPECTS OF ANIMAL POPULATION HEALTH PROGRAMMES

 

       1-Selection of priority diseases for animal health programmes

       2-Simple model of morbidity/nidality changes' prognosis

       3-Planning/prognosis of morbidity reduction (in linear form)

       4-Planning/prognosis of morbidity reduction (in curve form)

       5-Planning/prognosis of animal population specific health recovery

       6-Animal population health/disease mass actions (incl.vaccinations)

       7-'Critical path' method in animal population health planning

       8-Distribution of animal population health programme inputs

       9-Animal population health programme/measures' coverage

       10-Planning/prognosis of reducing nidality, mortality and losses

       11-Planning/prognosis of expanding specific disease free territory

 

10-COST AND EFFICIENCY OF ANIMAL POPULATION HEALTH PROGRAMMES

            

       1-Simple indicators of economic benefit/cost analysis

       2-Simple absolute economic benefit of animal health programme

       3-Biological cost/effectiveness of animal health programme

       4-Public health cost/effectiveness of animal health programme

       5-Production cost/effectiveness of animal health programme

       6-Effectiveness of prophylactic measures and recovery rates

       7-Final situation in populations with and without programme

       8-Consumption and cost of vaccines, drugs and other substances

       9-Programme benefit/cost ratio in discounted monetary values

       10-Programme benefit/cost ratio in cumulative monetary values

       11-Economic effect after specific animal disease eradication

       12-Public health effect of specific zoonosis eradication

       13-Biological effect of specific animal disease eradication

       14-Implementation of animal population health programme

  

11-COMPLEMENTARY SUBPROGRAMMES - I

 

       1-Disease introduction risk assessment applying user-defined criteria

       2-Risk probability of test negative results in infected animals

       3-Risk probability that at least one animal import unit is infected

       4-Survival of diseased and vaccinated animals acc. to replacement

       5-Table of number changes of foci, intrafocal and diseased animals

       6-Point prevalence of foci and intrafocal diseased/exposed animals

       7-Table of foci and diseased animals incidence/extinction

       8-Table of slaughtered animals and disease findings

       9-Prevalence based on outbreaks, herd size and infection duration

       10-Relations between prevalence of population and of affected herds

       11-Animals/livestock units per territory/inhabitant/veterinarian

       12-Rates of spread of animal disease outbreaks

     

12-COMPLEMENTARY SUBPROGRAMMES - II

  

       1-Health rates' adjustment based on category structure standards

       2-Morbidity/mortality adjustment based on category rates' standards

       3-Two populations rates' adjustment based on standard proportions

       4-Two populations rates' adjustment based on category standards

       5-Selection of methods for specific disease control programme

       6-Survey response rate

       7-Dilution of solution for disinfection, disinfestation, etc.

       8-Summary value of animal products per one veterinarian

       9-Values of individual animal products per one veterinarian

       10-Animal commodity export/import size per one veterinarian

       11-Per capita production of food of animal origin

       12-Selection of priority diseases for control programme

       13-True prevalence estimation based on diag. method detectability

 

13-ANNEX  I - SELECTED BASIC STATISTICAL METHODS

 

       1-Arithmetic mean and measures of dispersion

       2-Arithmetic mean from grouped data and measures of dispersion

       3-Calculation of proportion and its standard error

       4-Conversion between percentage/proportion and absolute data

       5-Distribution of cumulative frequencies

       6-Chi-square test and contingency tables

       7-McNemar's test - paired chi-square test

       8-Linear regression and correlation coefficient

       9-Fisher's test for small frequencies' comparison

       10-Moving averages - smoothing of time series

       11-Simple arithmetic operations

 

14-ANNEX  II - OTHER SELECTED STATISTICAL AND ECONOMIC METHODS

 

       1-Test of the difference between two proportions

       2-Test of the difference between two arithmetic means

       3-Test of the difference in means of two small-sized samples

       4-Test of matched comparison between different values in pairs

       5-Confidence intervals estimates for population mean

       6-Confidence intervals estimates for population proportion

       7-Confidence intervals for the difference between means

       8-Confidence intervals for the difference between proportions

       9-Table of Student's 't' critical values

       10-Veterinary service cost and animal population/production values

       11-Conversion between metric and Anglo-Saxon measures

       12-Analysis of critical point of production economic efficiency

       13-Application of interest, discount and inflation rate

       14-Conversion between national currencies' values

       15-Model of budget for animal health programme - I

       16-Model of budget for animal health programme - II

 

 

 

 

EPIZOO – know-how

 

INTRODUCTION

 

M A I N    M  E  N  U    OF   SUBPROGRAMME  GROUPS

 

 

5  PRINT"EPIZOO40, ver. 4.0, 2003"

16 CLS:PRINT:PRINT:PRINT:PRINT "  ";

17 FOR P=1 TO 76:PRINT CHR$(178);

18 NEXT P

20 PRINT TAB(3)CHR$(178);

21 PRINT TAB(78)CHR$(178)

30 PRINT TAB(3)CHR$(178);TAB(30)" E   P   I   Z   O   O  ";TAB(78)CHR$(178)

31 PRINT TAB(3)CHR$(178);TAB(78)CHR$(178)

32 PRINT TAB(3)CHR$(178);TAB(36)"version 4.0";TAB(78)CHR$(178)

33 PRINT TAB(3)CHR$(178);TAB(78)CHR$(178)

36 PRINT TAB(3)CHR$(178);TAB(29)"Prof.Dr  Vaclav  K o u b a";TAB(78)CHR$(178)

37 PRINT TAB(3)CHR$(178);TAB(78)CHR$(178)

38 PRINT TAB(3)CHR$(178);TAB(78)CHR$(178)

40 PRINT TAB(3)CHR$(178);TAB(15)"EPIZOO is a software package of selected methods for";TAB(78)CHR$(178)

46 PRINT TAB(3)CHR$(178);TAB(6)"animal  p o p u l a t i o n   h e a l t h   analysis  and  programming";TAB(78)CHR$(178)

47 PRINT TAB(3)CHR$(178);TAB(78)CHR$(178)

51 PRINT "  ";

52 FOR P=1 TO 76:PRINT CHR$(178);

53 NEXT P

69 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:GOTO 120

120 PRINT

130 INPUT"                                                      Key ENTER to continue",Q

140 ON Q GOTO 150

150 CLS:PRINT"I N F O R M A T I O N   AND   I N S T R U C T I O N S :"

151 PRINT"a) This software contains methods for training, problem solutions and "

152 PRINT"   simulation related to animal population health analyses and programmes."

153 PRINT"b) Subprogrammes' selection and data inputs to be very  c a r e f u l  !"

154 PRINT"   A l l  operation  i n s t r u c t i o n s  must be  r e s p e c t e d !"

156 PRINT"c) All questions about numbers to be processed (true/real, reported, estimated"

158 PRINT"   or fictitious) and decision alternatives (s m a l l  letters in brackets)"

157 PRINT"   must be answered ! For decimal numbers use points (not commas) !"

159 PRINT"d) If asked for more data on one line separating  c o m m a s  must be used !"

160 PRINT"e) W a r n i n g  ! Extreme data inputs or omitting data may terminate"

161 PRINT"   the programme going to DOS starting line or 'hang' computer action !"

162 PRINT"f) Corrections are possible on the same line or after completing imput part."

163 PRINT"g) When specifying health, disease or foci their forms/types (all, apparent,"

164 PRINT"   based on indirect diagnostic methods only, etc. ) should be identified."

165 PRINT"h) Results' interpretation to be  l o g i c a l  (biologically meaningful) !"

166 PRINT"   Quality depends mainly on input data reliability based on field/laboratory"

167 PRINT"   investigations and clear definitions considering also influencing factors."

175 PRINT"i) For continuing ENTER key and for printing PRINT SCREEN key to be used."

185 PRINT"j) For processing a larger amount of data or data requiring more sophisticated"

186 PRINT"   methods, storage, graphs or spreadsheets alternative software to be used."

386 PRINT"k) Detailed information on EPIZOO individual subprogramme methods/procedures"

387 PRINT"   see in EPIZMETH (go out from EPIZOO main menu and key 'epizmeth')."

493 PRINT"j) This software may be freely copied."

495 INPUT"                                                  Key ENTER to go to Main Menu",Q

496 ON Q GOTO 560

560 CHAIN "EPIZ40MM.KOU"

570 SYSTEM

 

         1-Animal population - characteristics of health importance

        

5 ON ERROR GOTO 14025

6 IDM$="Input data missing !"

7 IDE$="Input data error !"

10 PRINT"EPIZ4001.KOU":REM:26/4/2002

14 e$="EPIZOO, ver.4.0,":v$=DATE$

15 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(9)"1-ANIMAL POPULATION - SELECTED CHARACTERISTICS OF HEALTH IMPORTANCE"

40 PRINT TAB(9)"==================================================================="

500 PRINT:PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(9)"1-Animal population size and species structure"

520 PRINT TAB(9)"2-Animal population categories (strata) structure"

530 PRINT TAB(9)"3-Animal population territorial distribution"

540 PRINT TAB(9)"4-Breeding/production conditions influencing animals distribution"

550 PRINT TAB(9)"5-Ecological conditions influencing animals distribution"

555 PRINT TAB(9)"6-Selected indicators related to disease resistant animals"

560 PRINT TAB(9)"7-Selected indicators related to disease susceptible animals "

565 PRINT TAB(9)"8-Animal population production per animal, input, space and time"

570 PRINT TAB(9)"9-Animal population dynamics - 'vertical movement'"

575 PRINT TAB(9)"10-Estimation of animals number according to survival rates"

580 PRINT TAB(9)"11-Estimation of number of wild animals (vertebrates+invertebrates)"

590 PRINT TAB(9)"12-Estimation of animal population size based on capture/recapture"

595 PRINT TAB(9)"13-Estimation of animal population size based on average density"

610 PRINT:PRINT TAB(9)"14-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 14000

660 IF Z$="y" THEN GOTO 15 ELSE GOTO 14000

690 INPUT"        Enter choice number : ",M

695 IF M=1 OR M=2 OR M=3 OR M=4 OR M=5 OR M=6 OR M=7 OR M=8 OR M=9 OR M=10 OR M=11 OR M=12 OR M=13 OR M=14 THEN GOTO 700 ELSE 650

700 ON M GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.1-ANIMAL POPULATIONS SIZE AND SPECIES STRUCTURE"

1010 PRINT"================================================="

1015 PRINT"Notes: Applicable also on the etiological agents' vectors and reservoirs."

1016 PRINT"       Differentiate total and at risk populations !!!"

1200 PRINT"INPUT DATA:"

1229 INPUT"     animal populations ";P$

1230 INPUT"     place (territory, land, sector, etc.) ";PL$

1231 INPUT"     time ";TI$

1232 INPUT"     number (2 up to 11 !) of evaluated animal species ";N:REM: up 18???

1233 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 1980

1245 PRINT:PRINT"  List animal species (names up to 15 characters), number of animals :":PRINT

1250 FOR I=1 TO N

1260 PRINT TAB(10)I;"";

1270 INPUT" species, animals ";  S$(I),U#(I)

1275 IF S$(I)="" OR U#(I)=0 THEN PRINT:PRINT IDM$:GOTO 1980 ELSE 1280

1280 NEXT I

1300 SU=0

1301 FOR I=1 TO N

1302 SU=SU+U#(I)

1305 NEXT I

1400 PRINT

1401 MAX=U#(1):KP=1

1402 FOR I=2 TO N

1403 IF U#(I)>MAX THEN MAX=U#(I):KP=I

1404 NEXT I

1405 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1406 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

1407 IF I$="m" THEN GOTO 10

1408 IF I$="c" THEN GOTO 1000

1409 IF I$=CHR$(13) THEN GOTO 1410:'X$=INPUT$(1):IF X$<>CHR$(13) THEN GOTO 1000

1410 CLS:PRINT:PRINT TAB(8)"SPECIES    STRUCTURE     OF     ANIMAL    POPULATION":PRINT

1420 PRINT TAB(10)"Animal population: "P$

1421 PRINT"Place: "PL$;TAB(50)"Time: "TI$

1610 PRINT:PRINT

1615 PRINT TAB(5)"Species";TAB(26)"Absolute";TAB(39)"Proportion";TAB(54)"Percentage"

1616 PRINT TAB(26)"Number":PRINT

1617 FOR I=1 TO N

1619 PRINT TAB(5)USING"\             \";S$(I);

1620 PRINT TAB(25)INT(U#(I));TAB(40)USING"#.####";U#(I)/SU;

1621 PRINT TAB(55)USING"##.####";(U#(I)/SU)*100

1622 NEXT I

1623 S#=0

1624 FOR I=1 TO N

1625 S#=S#+U#(I)

1626 NEXT I

1627 PRINT:PRINT TAB(5)"T o t a l";TAB(25)INT(S#);TAB(40)"1.000000";TAB(54)"100.0000"

1630 PRINT

1633 A$=INKEY$:IF A$="" THEN GOTO 1633

1634 IF N=1 THEN GOTO 1981

1635 CLS:PRINT:PRINT TAB(6)"S P E C I E S   S T R U C T U R E    OF    ANIMAL    POPULATION"

1636 'GOTO 1680:

1637 IF MAX<(SU/2) THEN GOTO 1640 ELSE 1680

1640 PRINT:PRINT TAB(12)"(";CHR$(223);" represents 1 % of total "INT(S#);" animals)":PRINT

1641 PRINT

1645 PRINT TAB(3)"Species";TAB(20)"0         10        20        30        40        50 %"

1646 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

1651 FOR I=1 TO N

1652 Z=(U#(I)/SU)*100

1653 IF Z<1 THEN GOTO 1654 ELSE 1660

1654 IF Z>0 THEN GOTO 1655 ELSE 1660

1655 PRINT TAB(3)USING"\             \";S$(I);

1656 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 1670

1660 PRINT TAB(3)USING"\             \";S$(I);

1661 PRINT TAB(20)CHR$(179);

1663 FOR K=1 TO (U#(I)/SU)*100

1664 PRINT CHR$(223);

1665 NEXT K

1666 PRINT

1670 NEXT I:GOTO 1790

1680 PRINT:PRINT TAB(12)"(";CHR$(223);" represents 2 % of total "INT(S#);" animals)":PRINT

1681 PRINT:PRINT TAB(3)"Species";TAB(20)"0         20        40        60        80       100 %"

1682 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

1683 FOR I=1 TO N

1684 Z=(U#(I)/SU)*50

1685 IF Z<1 THEN GOTO 1686 ELSE 1689

1686 IF Z>0 THEN GOTO 1687 ELSE 1689

1687 PRINT TAB(3)USING"\             \";S$(I);

1688 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 1695

1689 PRINT TAB(3)USING"\             \";S$(I);

1690 PRINT TAB(20)CHR$(179);

1691 FOR K=1 TO (U#(I)/SU)*50

1692 PRINT CHR$(223);

1693 NEXT K

1694 PRINT

1695 NEXT I

1790 REM: good-ERASE S$,U

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.2-ANIMAL POPULATION CATEGORIES (STRATA) STRUCTURE"

2010 PRINT"==================================================="

2013 PRINT"(according to breed, age, gender, weight, physiological stage, nutrition"

2014 PRINT"status, immunity status, performance, type/level of productivity, type of"

2015 PRINT"breeding, type of exploitation, production stage, technology, concentration)"

2100 PRINT"INPUT DATA:"

2110 INPUT"     place, time ";PL$,TI$

2115 INPUT"     species ";SP$

2119 INPUT"     category according to ";CA$

2120 INPUT"     number (2 up to 11 !) of subgroups within this category ";N:REM up to 20???

2121 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 2980

2129 PRINT TAB(6)"List data: "

2130 PRINT"     name of subgroup (up to 15 characters), number of animals :"

2131 FOR I=1 TO N

2132 PRINT TAB(10)I;": ";

2133 INPUT SG$(I),NA#(I)

2134 IF SG$(I)="" OR NA#(I)=0 THEN PRINT:PRINT IDM$:GOTO 2980 ELSE 2135

2135 NEXT I

2139 SU#=0

2140 FOR I=1 TO N

2141 SU#=SU#+NA#(I)

2145 NEXT I

2149 MAX=NA#(1):KP=1

2150 FOR I=2 TO N

2151 IF NA#(I)>MAX THEN MAX=NA#(I):KP=I

2152 NEXT I

2154 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2155 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

2156 IF I$="m" THEN GOTO 10

2157 IF I$="c" THEN GOTO 2000

2158 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT:PRINT TAB(8)"C A T E G O R Y   S T R U C T U R E   OF  ANIMAL  POPULATION":PRINT

2210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

2211 PRINT"     Species: ";SP$

2212 PRINT"     Category according to: "CA$:PRINT

2220 PRINT TAB(5)"Category ";TAB(30)"Number of";TAB(45)"Proportion";TAB(59)"Percentage"

2221 PRINT TAB(5)"Subgroup";TAB(30)"Animals":PRINT

2230 FOR I=1 TO N

2231 PRINT TAB(5)USING"\               \";SG$(I);

2232 PRINT TAB(29)INT(NA#(I));TAB(46)USING"#.######";NA#(I)/SU#;

2233 PRINT TAB(60)USING"##.####";(NA#(I)/SU#)*100

2234 NEXT I

2240 PRINT:PRINT TAB(5)"T o t a l";TAB(29)INT(SU#);TAB(46)"1.000000";TAB(59)"100.0000

2500 A$=INKEY$:IF A$="" THEN GOTO 2500

2501 IF N=1 THEN GOTO 2980

2550 CLS:PRINT:PRINT TAB(8)"C A T E G O R Y   S T R U C T U R E   OF  ANIMAL  POPULATION"

2551 IF MAX<(SU#/2) THEN GOTO 2552 ELSE 2580

2552 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 1 % of total "INT(SU#);" animals)":PRINT

2553 PRINT

2560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

2561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

2565 FOR I=1 TO N

2566 Z=(NA#(I)/SU#)*100

2567 IF Z<1 THEN GOTO 2568 ELSE 2571

2568 IF Z>0 THEN GOTO 2569 ELSE 2571

2569 PRINT TAB(2)USING"\               \";SG$(I);

2570 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 2579

2571 PRINT TAB(2)USING"\               \";SG$(I);

2572 PRINT TAB(20)CHR$(179);

2573 FOR K=1 TO (NA#(I)/SU#)*100

2574 PRINT CHR$(223);

2575 NEXT K

2576 PRINT

2579 NEXT I:GOTO 2980

2580 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of total "INT(SU#);" animals)":PRINT

2582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

2584 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

2585 FOR I=1 TO N

2586 Z=(NA#(I)/SU#)*50

2587 IF Z<1 THEN GOTO 2588 ELSE 2591

2588 IF Z>0 THEN GOTO 2589 ELSE 2591

2589 PRINT TAB(2)USING"\               \";SG$(I);

2590 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 2599

2591 PRINT TAB(2)USING"\               \";SG$(I);

2592 PRINT TAB(20)CHR$(179);

2593 FOR K=1 TO (NA#(I)/SU#)*50

2594 PRINT CHR$(223);

2595 NEXT K

2596 PRINT

2599 NEXT I

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2983 ELSE 2990

2983 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.3-ANIMAL POPULATION TERRITORIAL DISTRIBUTION"

3010 PRINT"=============================================="

3100 PRINT TAB(6)"This subprogramme calculates:"

3102 PRINT TAB(10)"1) animal population - territorial density and distribution"

3104 PRINT TAB(10)"2) farms - average number of animals and territorial distribution"

3111 PRINT TAB(10)"3) animal population - simple territorial distribution"

3114 INPUT"     Enter choice number: ",S

3115 IF S=1 OR S=2 OR S=3 THEN GOTO 3120 ELSE PRINT IDE$:GOTO 3980

3120 PRINT"INPUT DATA"

3123 INPUT"     place (territory), time ";PL$,TI$

3124 INPUT"     species, category(ies) ";SP$,CA$

3125 IF (S=1) THEN INPUT"     space measure unit (up to 7 characters !) ";SU$:GOTO 3128

3126 IF (S=2) THEN INPUT"     farm type ";FT$

3128 INPUT"     number (2 up to 11 !) of data on space and animals ";N

3130 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 3980

3135 PRINT"  List data (names up to 15 characters; all numeric data must be >0 !):"

3140 FOR I=1 TO N

3141 PRINT"  ";I;"";

3142 IF (S=1) THEN GOTO 3143 ELSE 3148

3143 INPUT"  subterritory, s i z e, animals ";TE$(I),TS#(I),AN#(I):GOTO 3165

3148 IF (S=2) THEN GOTO 3149 ELSE 3152

3149 INPUT"  subterritory, number of  f a r m s, animals ";TE$(I),TS#(I),AN#(I):GOTO 3165

3152 IF (S=3) THEN GOTO 3153 ELSE 3165

3153 INPUT"  subterritory, number of animals ";TE$(I),AN#(I):GOTO 3165

3165 IF TE$(I)="" OR AN#(I)=0 THEN PRINT:PRINT IDM$:GOTO 3980 ELSE 3166

3166 NEXT I

3169 SU1#=0:SU2#=0

3170 FOR I=1 TO N

3171 SU1#=SU1#+TS#(I)

3172 NEXT I

3173 FOR I=1 TO N

3174 SU2#=SU2#+AN#(I)

3175 NEXT I

3178 MAX=AN#(1):KP=1

3179 FOR I=2 TO N

3180 IF AN#(I)>MAX THEN MAX=AN#(I):KP=I

3181 NEXT I

3187 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3188 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

3189 IF I$="m" THEN GOTO 10

3190 IF I$="c" THEN GOTO 3000

3191 IF I$=CHR$(13) THEN GOTO 3200

3200 CLS:PRINT

3202 IF S=1 THEN PRINT TAB(5)"ANIMAL  P O P U L A T I O N  - TERRITORIAL  DENSITY  AND  DISTRIBUTION":PRINT

3204 IF S=2 THEN PRINT TAB(5)"F A R M S:  AVERAGE NUMBER OF ANIMALS  AND TERRITORIAL DISTRIBUTION":PRINT

3206 IF S=3 THEN PRINT TAB(5)"ANIMAL  P O P U L A T I O N  -  TERRITORIAL   D I S T R I B U T I O N":PRINT

3212 PRINT"Place: "PL$;TAB(50)"Time: ";TI$

3214 PRINT"Species: "SP$;TAB(40)"Category(ies): ";CA$:PRINT

3215 IF S=2 THEN PRINT TAB(15)"Farm type: "FT$

3250 PRINT

3310 IF (S=1) THEN GOTO 3311 ELSE 3320

3311 PRINT TAB(2)"Subterritory";TAB(19)USING"\     \";SU$;

3312 PRINT TAB(30)"Number of";TAB(47)"Average";TAB(57)"Proportion";TAB(68)"Percentage":GOTO 3334

3320 IF (S=2) THEN GOTO 3330 ELSE 3340

3330 PRINT TAB(2)"Subterritory";TAB(19)"Farms";

3332 PRINT TAB(30)"Number of";TAB(47)"Average";TAB(57)"Proportion";TAB(68)"Percentage"

3333 PRINT TAB(30)"Animals";TAB(47)"Number";TAB(57)"(from  a l l   farms)":PRINT:GOTO 3354

3334 PRINT TAB(30)"Animals";TAB(47)"Density":PRINT:GOTO 3354

3340 IF S=3 THEN PRINT TAB(2)"Subterritory";TAB(30)"Number of";TAB(50)"Proportion";TAB(68)"Percentage"

3342 IF S=3 THEN PRINT TAB(30)"Animals":PRINT

3354 IF (S=2) THEN GOTO 3355 ELSE 3360

3355 FOR I=1 TO N

3356 PRINT TAB(2)USING"\             \";TE$(I);

3357 PRINT TAB(18)TS#(I);TAB(29)INT(AN#(I));TAB(45)USING"######.##";AN#(I)/TS#(I);TAB(58)USING"#.######";TS#(I)/SU1#;

3358 PRINT TAB(70)USING"##.####";(TS#(I)/SU1#)*100:NEXT I

3359 GOTO 3380

3360 IF (S=1) THEN GOTO 3361 ELSE 3370

3361 FOR I=1 TO N

3363 PRINT TAB(2)USING"\             \";TE$(I);

3364 PRINT TAB(18)TS#(I);TAB(29)INT(AN#(I));TAB(45)USING"######.##";AN#(I)/TS#(I);TAB(58)USING"#.######";AN#(I)/SU2#;

3366 PRINT TAB(70)USING"##.####";(AN#(I)/SU2#)*100

3369 NEXT I:GOTO 3380

3370 FOR I=1 TO N

3371 PRINT TAB(2)USING"\             \";TE$(I);

3372 PRINT TAB(29)INT(AN#(I));TAB(46)USING"######.######";AN#(I)/SU2#;

3373 PRINT TAB(70)USING"##.####";(AN#(I)/SU2#)*100

3374 NEXT I:PRINT

3375 PRINT TAB(2)"T o t a l";TAB(29)INT(SU2#);TAB(51)"1.000000";TAB(69)"100.0000"

3376 GOTO 3390

3380 PRINT

3382 PRINT TAB(2)"T o t a l";TAB(18)INT(SU1#);TAB(29)INT(SU2#);TAB(45)USING"######.##";SU2#/SU1#;

3383 PRINT TAB(58)"1.000000";TAB(69)"100.0000"

3390 IF (S=1) OR (S=3) THEN GOTO 3405 ELSE 3980

3405 A$=INKEY$:IF A$="" THEN GOTO 3405

3406 IF N=1 THEN GOTO 3981

3410 CLS:PRINT

3411 IF S=1 OR S=3 THEN PRINT TAB(5)"S P A C E   STRUCTURE  OF  ANIMAL  P O P U L A T I O N  DISTRIBUTION"

3413 IF MAX<(SU2#/2) THEN GOTO 3414 ELSE 3450

3414 IF S=1 OR S=3 THEN PRINT:PRINT TAB(12)"(";CHR$(223);" represents 1 % of total "INT(SU2#);"  animals)":PRINT

3416 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         10        20        30        40        50 %"

3417 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

3420 FOR I=1 TO N

3421 Z=(AN#(I)/SU2#)*100

3422 IF Z<1 THEN GOTO 3423 ELSE 3426

3423 IF Z>0 THEN GOTO 3424 ELSE 3426

3424 PRINT TAB(2)USING"\             \";TE$(I);

3425 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 3440

3426 PRINT TAB(2)USING"\             \";TE$(I);

3427 PRINT TAB(20)CHR$(179);

3428 FOR K=1 TO (AN#(I)/SU2#)*100

3429 PRINT CHR$(223);

3430 NEXT K

3431 PRINT

3440 NEXT I

3445 PRINT:GOTO 3980

3450 IF S=1 OR S=3 THEN PRINT:PRINT TAB(12)"(";CHR$(223);" represents 2 % of total "INT(SU2#);"  animals)":PRINT

3452 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         20        40        60        80       100 %"

3453 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

3454 FOR I=1 TO N

3460 Z=(AN#(I)/SU2#)*50

3461 IF Z<1 THEN GOTO 3462 ELSE 3470

3462 IF Z>0 THEN GOTO 3463 ELSE 3470

3463 PRINT TAB(2)USING"\             \";TE$(I);

3464 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 3480

3470 PRINT TAB(2)USING"\             \";TE$(I);

3471 PRINT TAB(20)CHR$(179);

3473 FOR K=1 TO (AN#(I)/SU2#)*50

3474 PRINT CHR$(223);

3475 NEXT K

3479 PRINT

3480 NEXT I

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3985 ELSE 3990

3985 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.4-BREEDING/PRODUCTION CONDITIONS INFLUENCING ANIMALS DISTRIBUTION"

4002 PRINT"==================================================================="

4006 PRINT"(animal breeding/production exploitation, technology, concentration, housing,"

4007 PRINT"herd/flock/farm size, management, economic sector, etc.)"

4100 PRINT"INPUT DATA:"

4105 INPUT"     place, time ";PL$,TI$

4110 INPUT"     type of breeding/production conditions ";EC$

4119 INPUT"     criterion for subgrouping ";CA$

4120 INPUT"     conditions measure units (up to 10 characters) ";MU$

4121 INPUT"     number (2 up to 11 !) of evaluated subgroups ";N

4122 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 4980

4129 PRINT"List data: "

4130 PRINT"name (up to 16 charac.) of subgroup, number (integer >0 !) of measure units:"

4131 FOR I=1 TO N

4132 PRINT TAB(10)I;": ";

4133 INPUT SG$(I),NA(I)

4134 IF SG$(I)="" OR NA(I)=0 THEN PRINT:PRINT IDM$:GOTO 4980 ELSE 4135

4135 NEXT I

4139 SU=0

4140 FOR I=1 TO N

4141 SU=SU+NA(I)

4145 NEXT I

4148 MAX=NA(1):KP=1

4149 FOR I=2 TO N

4150 IF NA(I)>MAX THEN MAX=NA(I):KP=I

4151 NEXT I

4154 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4155 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

4156 IF I$="m" THEN GOTO 10

4157 IF I$="c" THEN GOTO 4000

4158 IF I$=CHR$(13) THEN GOTO 4200

4200 CLS:PRINT:PRINT"  BREEDING/PRODUCTION CONDITIONS INFLUENCING DISTRIBUTION OF ANIMALS":PRINT

4205 PRINT TAB(6)"Conditions: "EC$

4210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

4212 PRINT"Criterion for subgroupping: "CA$:PRINT

4220 PRINT TAB(5)"Subgroup";TAB(31)USING"\          \";MU$;TAB(45)"Proportion";TAB(59)"Percentage":PRINT

4230 FOR I=1 TO N

4231 PRINT TAB(5)USING"\              \";SG$(I);

4232 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

4233 PRINT TAB(60)USING"##.####";(NA(I)/SU)*100

4234 NEXT I

4240 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(59)"100.0000

4500 A$=INKEY$:IF A$="" THEN GOTO 4500

4501 IF N=1 THEN GOTO 4981

4550 CLS:PRINT:PRINT"   BREEDING/PRODUCTION CONDITIONS INFLUENCING DISTRIBUTION OF ANIMALS"

4551 IF MAX<(SU/2) THEN GOTO 4552 ELSE 4580

4552 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of the total"INT(SU)  MU$;")"

4553 PRINT:PRINT

4560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

4561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

4565 FOR I=1 TO N

4566 Z=(NA(I)/SU)*100

4567 IF Z<1 THEN GOTO 4568 ELSE 4571

4568 IF Z>0 THEN GOTO 4569 ELSE 4571

4569 PRINT TAB(2)USING"\              \";SG$(I);

4570 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 4578

4571 PRINT TAB(2)USING"\              \";SG$(I);

4572 PRINT TAB(20)CHR$(179);

4573 FOR K=1 TO (NA(I)/SU)*100

4574 PRINT CHR$(223);

4575 NEXT K

4576 PRINT

4578 NEXT I

4579 PRINT:GOTO 4980

4580 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total "INT(SU)  MU$;")":PRINT

4582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

4584 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

4585 FOR I=1 TO N

4586 Z=(NA(I)/SU)*50

4587 IF Z<1 THEN GOTO 4588 ELSE 4591

4588 IF Z>0 THEN GOTO 4589 ELSE 4591

4589 PRINT TAB(3)USING"\              \";SG$(I);

4590 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 4599

4591 PRINT TAB(3)USING"\              \";SG$(I);

4592 PRINT TAB(20)CHR$(179);

4593 FOR K=1 TO (NA(I)/SU)*50

4594 PRINT CHR$(223);

4595 NEXT K

4596 PRINT

4599 NEXT I:PRINT

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.5-ECOLOGICAL CONDITIONS INFLUENCING ANIMALS DISTRIBUTION"

5002 PRINT"=========================================================="

5005 PRINT"[atmospherical, geospherical, hydrospherical and biospherical (flora,fauna)"

5006 PRINT"factors, hygiene, etc.]"

5100 PRINT"INPUT DATA:"

5105 INPUT"     place, time ";PL$,TI$

5110 INPUT"     type of ecological conditions ";EC$

5119 INPUT"     criterion for subgrouping ";CA$

5120 INPUT"     ecological conditions measure units (up to 10 characters)";MU$

5121 INPUT"     number (2 up to 11 !) of evaluated subgroups ";N

5122 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 5980

5129 PRINT"List data: "

5130 PRINT"name (up to 16 charac.) of subgroup, number (integer >0 !) of measure units:"

5131 FOR I=1 TO N

5132 PRINT TAB(15)I;": ";

5133 INPUT SG$(I),NA(I)

5134 IF SG$(I)="" OR NA(I)=0 THEN PRINT:PRINT IDM$:GOTO 5980 ELSE 5135

5135 NEXT I

5139 SU=0

5140 FOR I=1 TO N

5141 SU=SU+NA(I)

5145 NEXT I

5148 MAX=NA(1):KP=1

5149 FOR I=2 TO N

5150 IF NA(I)>MAX THEN MAX=NA(I):KP=I

5151 NEXT I

5154 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5155 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

5156 IF I$="m" THEN GOTO 10

5157 IF I$="c" THEN GOTO 5000

5158 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT:PRINT"   ECOLOGICAL CONDITIONS INFLUENCING ANIMAL POPULATION DISTRIBUTION":PRINT

5205 PRINT TAB(6)"Conditions: "EC$

5210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

5212 PRINT"Criterion for subgroupping: "CA$:PRINT

5220 PRINT TAB(5)"Subgroup";TAB(31)USING"\          \";MU$;

5221 PRINT TAB(45)"Proportion";TAB(59)"Percentage":PRINT

5230 FOR I=1 TO N

5231 PRINT TAB(5)USING"\              \";SG$(I);

5232 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

5233 PRINT TAB(60)USING"##.####";(NA(I)/SU)*100

5234 NEXT I

5240 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(59)"100.0000

5500 A$=INKEY$:IF A$="" THEN GOTO 5500

5501 IF N=1 THEN GOTO 5981

5550 CLS:PRINT:PRINT TAB(8)" S T R U C T U R E   OF  E C O L O G I C A L  CONDITIONS"

5551 IF MAX<(SU/2) THEN GOTO 5552 ELSE 5580

5552 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of the total"INT(SU)  MU$;")":PRINT

5553 PRINT

5560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

5561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

5565 FOR I=1 TO N

5566 Z=(NA(I)/SU)*100

5567 IF Z<1 THEN GOTO 5568 ELSE 5571

5568 IF Z>0 THEN GOTO 5569 ELSE 5571

5569 PRINT TAB(2)USING"\                \";SG$(I);

5570 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 5578

5571 PRINT TAB(2)USING"\                \";SG$(I);

5572 PRINT TAB(20)CHR$(179);

5573 FOR K=1 TO (NA(I)/SU)*100

5574 PRINT CHR$(223);

5575 NEXT K

5576 PRINT

5578 NEXT I

5579 PRINT:GOTO 5980

5580 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total "INT(SU)  MU$;")":PRINT

5582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

5584 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

5585 FOR I=1 TO N

5586 Z=(NA(I)/SU)*50

5587 IF Z<1 THEN GOTO 5588 ELSE 5591

5588 IF Z>0 THEN GOTO 5589 ELSE 5591

5589 PRINT TAB(3)USING"\              \";SG$(I);

5590 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 5599

5591 PRINT TAB(3)USING"\              \";SG$(I);

5592 PRINT TAB(20)CHR$(179);

5593 FOR K=1 TO (NA(I)/SU)*50

5594 PRINT CHR$(223);

5595 NEXT K

5596 PRINT

5599 NEXT I:PRINT

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.6-SELECTED INDICATORS RELATED TO DISEASE RESISTANT ANIMALS"

6010 PRINT"============================================================"

6030 PRINT"INPUT DATA:"

6056 INPUT"     species, category(ies) ";SP$,CA$

6057 INPUT"     type/form of population resistance ";RE$

6058 INPUT"     place ";LU$

6060 PRINT"     Do you want to calculate point prevalence at a given moment (m)"

6061 INPUT"                         or indicators related to a given period (p) ";P$

6062 IF P$<>"m" AND P$<>"p" THEN PRINT IDE$:GOTO 6980

6063 IF P$="m" THEN GOTO 6068

6064 IF P$="p" THEN GOTO 6069

6068 INPUT"     time-moment ";TI$:GOTO 6070

6069 INPUT"     time-period ";TI$:GOTO 6082

6070 PRINT:INPUT"     total number of animals existing at the given moment        ";A:PRINT

6071 INPUT"     number of resistant animals existing at the given moment    ";ER

6072 IF A=0 OR ER=0 THEN PRINT:PRINT IDM$:GOTO 6980 ELSE 6154

6082 PRINT:PRINT"     total number of animals existing"

6083 INPUT"                     at the beginning of the period         ";D

6085 INPUT"     total number of animals existing in the period         ";B

6086 INPUT"     average number of animals in the period                ";C:PRINT

6103 PRINT"     number of resistant animals existing"

6104 INPUT"                         at the beginning of the period     ";DR

6105 INPUT"     number of resistant animals existing in the period     ";FR

6107 INPUT"     average number of resistant animals in the period      ";GR:PRINT

6109 INPUT"     number of new resistant animals in the period          ";HR

6111 PRINT"     number of extinct resistant animals (dead+slaughtered+"

6112 INPUT"       +removed+with immunity end) in the period            ";IR

6114 IF (D+B+C+DR+FR+GR+HR+IR)=0 THEN PRINT IDM$:GOTO 6980

6120 PRINT

6154 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6155 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

6156 IF I$="m" THEN GOTO 10

6157 IF I$="c" THEN GOTO 6000

6158 IF I$=CHR$(13) THEN GOTO 6200

6200 CLS:PRINT TAB(6)"SELECTED INDICATORS RELATED TO DISEASE RESISTANT ANIMALS":PRINT

6208 PRINT TAB(6)"Type of resistance: ";RE$:PRINT

6209 PRINT"Place: "LU$;TAB(50)"Time: "TI$

6210 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:PRINT

6211 PRINT

6212 IF P$="m" THEN GOTO 6310 ELSE 6215

6215 IF DR>0 AND D>0 THEN GOTO 6315

6220 IF FR>0 AND B>0 THEN GOTO 6320

6230 IF GR>0 AND C>0 THEN GOTO 6330

6240 IF HR>0 AND B>0 THEN GOTO 6340

6250 IF HR>0 AND C>0 THEN GOTO 6350

6260 IF HR>0 AND D>0 THEN GOTO 6360

6270 IF IR>0 AND B>0 THEN GOTO 6370

6280 IF IR>0 AND C>0 THEN GOTO 6380

6290 IF IR>0 AND D>0 THEN GOTO 6390 ELSE 6980

6310 PRINT:PRINT TAB(6)"Point prevalence rate of resistant animals        =   ";USING"#.####";ER/A:PRINT

6311 PRINT"                                                       = ";USING"###.####";(ER/A)*100;

6312 PRINT"  %":PRINT

6313 PRINT:GOTO 6980

6315 PRINT:PRINT"     Initial point prevalence rate of resistant animals     =   ";USING"#.####";DR/D:GOTO 6220

6320 PRINT"     Period prevalence rate of resistant animals            =   ";USING"#.####";FR/B:GOTO 6230

6330 PRINT"     Average prevalence rate of resistant animals           =   ";USING"#.####";GR/C:GOTO 6240

6340 PRINT:PRINT"     Incidence rate of resistant animals to existing total  =   ";USING"#.####";HR/B:GOTO 6250

6350 PRINT"     Incidence rate of resistant animals to average total   =   ";USING"#.####";HR/C:GOTO 6260

6360 PRINT"     Incidence rate of resistant animals to initial total   =   ";USING"#.####";HR/D:GOTO 6270

6370 PRINT:PRINT"     Extinction rate of resistant animals to existing total =   ";USING"#.####";IR/B:GOTO 6280

6380 PRINT"     Extinction rate of resistant animals to average total  =   ";USING"#.####";IR/C:GOTO 6290

6390 PRINT"     Extinction rate of resistant animals to initial total  =   ";USING"#.####";IR/D

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.7-SELECTED INDICATORS RELATED TO DISEASE SUSCEPTIBLE ANIMALS"

7010 PRINT"=============================================================="

7050 PRINT"INPUT DATA:"

7056 INPUT"     species, category(ies) ";SP$,CA$

7057 INPUT"     type of population susceptibility ";SU$

7058 INPUT"     place ";LU$

7060 PRINT"     Do you want to calculate point prevalence at a given moment (m)"

7061 INPUT"                         or indicators related to a given period (p) ";P$

7062 IF P$<>"m" AND P$<>"p" THEN PRINT IDE$:GOTO 7980

7063 IF P$="m" THEN GOTO 7068

7064 IF P$="p" THEN GOTO 7069

7068 PRINT:INPUT"     time-moment ";TI$:PRINT:GOTO 7070

7069 INPUT"     time-period ";TI$:GOTO 7082

7070 PRINT:INPUT"     total number of animals existing at the given moment       ";A:PRINT

7071 INPUT"     number of susceptible animals existing at the given moment ";ES

7072 IF A=0 OR ES=0 THEN PRINT:PRINT IDM$:GOTO 7980 ELSE GOTO 7120

7082 PRINT:PRINT"     total number of animals existing"

7083 INPUT"                                 at the beginning of the period ";D

7085 INPUT"     total number of animals existing in the period             ";B

7086 INPUT"     average number of animals in the period                    ";C:PRINT

7103 PRINT"     number of susceptible animals existing"

7104 INPUT"                                 at the beginning of the period ";DS

7105 INPUT"     number of susceptible animals existing in the period       ";FS

7107 INPUT"     average number of susceptible animals in the period        ";GS:PRINT

7109 INPUT"     number of new susceptible animals in the period            ";HS

7111 PRINT"     number of extinct susceptible animals (dead+slaughtered+"

7112 INPUT"                              +removed+immunized) in the period ";IS

7114 IF (D+B+C+DS+FS+GS+HS+IS)=0 THEN PRINT IDM$:GOTO 7980

7120 PRINT

7154 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7155 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

7156 IF I$="m" THEN GOTO 10

7157 IF I$="c" THEN GOTO 7000

7158 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT TAB(6)"SELECTED INDICATORS RELATED TO DISEASE SUSCEPTIBLE ANIMALS"

7208 PRINT:PRINT TAB(6)"Type of susceptibility: ";SU$:PRINT

7209 PRINT"Place: "LU$;TAB(50)"Time: "TI$

7210 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:PRINT

7211 PRINT

7212 IF P$="m" THEN GOTO 7310 ELSE 7215

7215 IF DS>0 AND D>0 THEN GOTO 7315

7220 IF FS>0 AND B>0 THEN GOTO 7320

7230 IF GS>0 AND C>0 THEN GOTO 7330

7240 IF HS>0 AND B>0 THEN GOTO 7340

7250 IF HS>0 AND C>0 THEN GOTO 7350

7260 IF HS>0 AND D>0 THEN GOTO 7360

7270 IF IS>0 AND B>0 THEN GOTO 7370

7280 IF IS>0 AND C>0 THEN GOTO 7380

7290 IF IS>0 AND D>0 THEN GOTO 7390 ELSE 7980

7310 PRINT:PRINT TAB(6)"Point prevalence rate of susceptible animals       =   ";USING"#.####";ES/A:PRINT

7311 PRINT"                                                        = "USING"###.####";(ES/A)*100;

7312 PRINT"  %":GOTO 7980

7315 PRINT:PRINT"     Initial point prevalence rate of susceptible animals     =   ";USING"#.####";DS/D:GOTO 7220

7320 PRINT"     Period prevalence rate of susceptible animals            =   ";USING"#.####";FS/B:GOTO 7230

7330 PRINT"     Average prevalence rate of susceptible animals           =   ";USING"#.####";GS/C:GOTO 7240

7340 PRINT:PRINT"     Incidence rate of susceptible animals to existing total  =   ";USING"#.####";HS/B:GOTO 7250

7350 PRINT"     Incidence rate of susceptible animals to average total   =   ";USING"#.####";HS/C:GOTO 7260

7360 PRINT"     Incidence rate of susceptible animals to initial total   =   ";USING"#.####";HS/D:GOTO 7270

7370 PRINT:PRINT"     Extinction rate of susceptible animals to existing total =   ";USING"#.####";IS/B:GOTO 7280

7380 PRINT"     Extinction rate of susceptible animals to average total  =   ";USING"#.####";IS/C:GOTO 7290

7390 PRINT"     Extinction rate of susceptible animals to initial total  =   ";USING"#.####";IS/D

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.8-ANIMAL POPULATION AVERAGE PRODUCTION PER ANIMAL, INPUT, SPACE AND TIME"

8010 PRINT"=========================================================================="

8050 PRINT TAB(6)"This subprogramme calculates average animal production per:"

8052 PRINT TAB(10)"1) animal     2) input      3) space       4) time"

8060 INPUT"     Enter choice number: ",CH

8070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 8080 ELSE PRINT IDE$:GOTO 8980

8080 PRINT"INPUT DATA:"

8100 INPUT"     place, period ";PL$,PE$

8101 INPUT"     species, category(ies) ";SP$,CA$

8103 IF CH=1 THEN INPUT"     total number of animals ";AN ELSE GOTO 8105

8104 IF AN=0 THEN PRINT IDM$:GOTO 8980 ELSE 8119

8105 IF CH=2 OR CH=3 OR CH=4 THEN INPUT"     animal product ";PR$

8106 IF CH=2 OR CH=3 OR CH=4 THEN INPUT"     product measure units (up to 6 characters !) ";MU$

8107 IF CH=2 THEN INPUT"     total quantity of product                    ";Q#

8108 IF CH=2 AND Q#=0 THEN PRINT IDM$:GOTO 8980 ELSE 8117

8117 IF CH=3 THEN INPUT"     space measure units (up to 6 characters !)   ";U$

8118 IF CH=4 THEN INPUT"     time measure units (up to 6 characters !)    ";U$

8119 INPUT"     How many data to be processed (up to 11 !)   ";N

8120 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 8980

8123 PRINT:PRINT"List data (names up to 16 charac.), values (integer >0 !) in measure units:"

8124 FOR I=1 TO N

8125 PRINT I;"";

8126 IF CH=1 THEN INPUT" product, measure units, total quantity ";IN$(I),U$(I),Q#(I)

8127 IF CH=2 THEN INPUT" input type, input units, input value ";IN$(I),U$(I),Q#(I)

8128 IF CH=3 THEN INPUT" place, size, total product quantity ";IN$(I),S(I),Q#(I)

8129 IF CH=4 THEN INPUT" subperiod, duration, total product quantity ";IN$(I),S(I),Q#(I)

8130 IF IN$(I)="" OR Q#(I)=0 THEN PRINT:PRINT IDM$:GOTO 8980 ELSE 8131

8131 NEXT I

8132 T#=0:S=0

8133 FOR I=1 TO N

8134 T#=T#+Q#(I)

8135 S=S+S(I)

8136 NEXT I

8138 MAX=Q#(1):KP=1

8139 FOR I=2 TO N

8140 IF Q#(I)>MAX THEN MAX=Q#(I):KP=I

8141 NEXT I

8142 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8143 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

8144 IF I$="m" THEN GOTO 10

8145 IF I$="c" THEN GOTO 8000

8146 IF I$=CHR$(13) THEN GOTO 8150

8150 CLS:PRINT::PRINT TAB(4)"A N I M A L  P O P U L A T I O N   A V E R A G E    P R O D U C T I O N":PRINT

8151 PRINT"Place: "PL$;TAB(50)"Period: "PE$

8152 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8153 IF CH=2 OR CH=3 OR CH=4 THEN PRINT"Product: "PR$;TAB(40)"Measure units: "MU$ ELSE 8154

8154 IF CH=1 THEN PRINT TAB(14)"Total number of animals: ";INT(AN)

8156 IF CH=2 THEN PRINT TAB(14)"Total quantity of product: "INT(Q#+.5):PRINT

8157 IF CH=1 THEN GOTO 8158 ELSE 8164

8158 PRINT

8159 PRINT TAB(6)"Product";TAB(25)"Measure";TAB(40)"Quantity";TAB(60)"Average"

8160 IF CH=1 THEN PRINT TAB(25)"Units";TAB(60)"per Animal":PRINT

8161 FOR I=1 TO N:PRINT I;TAB(6)USING"\              \";IN$(I);

8162 PRINT TAB(25)U$(I);TAB(39)INT(Q#(I)+.5);TAB(60)USING"####.####";Q#(I)/AN:NEXT I:PRINT

8163 GOTO 8980

8164 IF CH=2 THEN GOTO 8165 ELSE 8172

8165 PRINT

8166 PRINT TAB(6)"Input";TAB(25)"Input";TAB(40)"Input";TAB(60)"Average "MU$

8167 PRINT TAB(25)"Unit";TAB(40)"Quantity";TAB(60)"per Input Unit":PRINT

8168 FOR I=1 TO N

8169 PRINT I;TAB(6)USING"\              \";IN$(I);

8170 PRINT TAB(25)U$(I);TAB(39)INT(Q#(I)+.5);TAB(60)USING"####.####";Q#/Q#(I)

8171 NEXT I:GOTO 8980

8172 PRINT

8173 IF CH=3 THEN D$="Place":IF CH=3 THEN Z$="Size"

8174 IF CH=4 THEN D$="Superiod":IF CH=4 THEN Z$="Duration"

8175 PRINT TAB(3)D$;TAB(21)Z$;TAB(31)"Quantity";TAB(45)"Average "MU$

8176 PRINT TAB(21)U$;TAB(31)"of Product";TAB(45)"per "U$;

8177 PRINT TAB(60)"Proportion";TAB(75)"%"

8178 PRINT

8188 FOR I=1 TO N

8189 PRINT TAB(3)USING"\              \";IN$(I);

8190 PRINT TAB(20)INT(S(I)+.5);TAB(30)INT(Q#(I)+.5);TAB(44)USING"########.##";Q#(I)/S(I);

8191 PRINT TAB(61)USING"#.####";Q#(I)/T#;

8192 PRINT TAB(71)USING"###.####";Q#(I)/T#*100

8193 NEXT I:PRINT

8194 IF CH=3 OR CH=4 THEN GOTO 8195 ELSE 8980

8195 PRINT TAB(3)"T o t a l";TAB(20)INT(S+.5);TAB(30)INT(T#+.5);TAB(44)USING"########.##";(T#/S);

8196 PRINT TAB(61)"1.0000";TAB(71)"100.0000"

8200 A$=INKEY$:IF A$="" THEN GOTO 8200

8201 IF N=1 THEN GOTO 8981

8205 CLS:PRINT:PRINT TAB(5)"A N I M A L  P O P U L A T I O N   A V E R A G E    P R O D U C T I O N"

8210 IF MAX>(T#/2) THEN GOTO 8212 ELSE 8240

8212 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 2 % of total "INT(T#+.5)  MU$;")":PRINT

8216 PRINT:PRINT TAB(3)D$;TAB(25)"0         20        40        60        80       100 %"

8218 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8219 FOR I=1 TO N

8220 Z=Q#(I)/T#*50

8221 IF Z<1 THEN GOTO 8222 ELSE 8225

8222 IF Z>0 THEN GOTO 8223 ELSE 8225

8223 PRINT TAB(2)USING"\              \";IN$(I);

8224 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8235

8225 PRINT TAB(2)USING"\              \";IN$(I);

8226 PRINT TAB(25)CHR$(179);

8227 FOR K=1 TO Q#(I)/T#*50

8228 PRINT CHR$(223);

8230 NEXT K

8235 NEXT I:GOTO 8980

8240 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(T#+.5)  MU$;")":PRINT

8246 PRINT:PRINT TAB(3)D$;TAB(25)"0         10        20        30        40        50 %"

8248 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8249 FOR I=1 TO N

8250 Z=Q#(I)/T#*100

8251 IF Z<1 THEN GOTO 8252 ELSE 8255

8252 IF Z>0 THEN GOTO 8253 ELSE 8255

8253 PRINT TAB(2)USING"\              \";IN$(I);

8254 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8265

8255 PRINT TAB(2)USING"\              \";IN$(I);

8256 PRINT TAB(25)CHR$(179);

8257 FOR K=1 TO Q#(I)/T#*100

8258 PRINT CHR$(223);

8260 NEXT K

8265 NEXT I

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.9-ANIMAL POPULATION DYNAMICS - 'VERTICAL MOVEMENT'"

9002 PRINT"===================================================="

9020 PRINT TAB(3)"This subprogramme calculates :"

9022 PRINT TAB(5)"1) combination of numbers of existing, new and extinct animals"

9023 PRINT TAB(5)"2) animal population replacement (restocking) rates"

9025 PRINT TAB(5)"3) estimate of number of animals  w i t h i n  one regular generation cycle"

9026 PRINT TAB(5)"4) estimate of number of animals  w i t h i n  one regular"

9027 PRINT "                            c o n t i n u i n g  production/breeding cycle"

9028 PRINT TAB(5)"5) addition and withdrawal rates of animal population (applicable"

9029 PRINT TAB(5)"                                   also on import/export of animals)"

9030 PRINT TAB(5)"6) simple model of animal population growth"

9041 INPUT"  Enter choice number: ",S

9050 IF S=1 OR S=2 OR S=3 OR S=4 OR S=5 OR S=6 THEN GOTO 9062 ELSE PRINT IDE$:GOTO 9980

9062 PRINT"INPUT DATA"

9063 INPUT"     place, time-period "PL$,TI$

9065 INPUT"     species, category(ies) ";SP$,CA$

9068 IF S=1 THEN GOTO 9070 ELSE 9079

9070 PRINT"Question about indicator to be calculated to be left without the answer ! "

9071 PRINT"The other  t h r e e  data must be given ! Attention to values' logic !":PRINT

9072 INPUT"     number of animals existing at the beginning of the period     ";AO#

9073 INPUT"     number of  n e w  born and introduced animals in the period   ";AN#

9074 PRINT"     number of  e x t i n c t (dead+slaughtered+removed) animals"

9075 INPUT"                                                     in the period ";AE#

9076 INPUT"     number of animals existing at the  e n d  of the period       ";AF#:PRINT

9077 IF (AO#+AN#+AE#+AF#)=0 THEN PRINT IDM$:GOTO 9980 ELSE 9184

9079 IF S=2 THEN GOTO 9080 ELSE 9087

9080 PRINT:INPUT"     number of animals existing at the beginning of the period     ";AO

9081 INPUT"     number of  n e w  born animals in the period                  ";AB

9082 INPUT"     number of animals introduced in the period                    ";AI

9083 INPUT"     number of animals existing in the period                      ";AP

9084 INPUT"     average number of animals existing in the period              ";AA

9085 INPUT"     duration (in days) of one population reproduction cycle       ";RC

9086 IF (AB+AI+AP+AA)=0 THEN PRINT IDM$:GOTO 9980

9087 IF S=3 THEN GOTO 9088 ELSE 9094

9088 PRINT:INPUT"     number of animals at the beginning of the period          ";AO

9089 PRINT"     duration (in days) of one regular generation"

9090 INPUT"                                          (replacement) cycle  ";RC

9091 PRINT"     duration (in days) between the initial and evaluated"

9092 INPUT"                      days  w i t h i n  the generation cycle  ";PX

9093 IF AO=0 OR RC=0 OR PX=0 OR PX>RC THEN PRINT IDE$:GOTO 9980 ELSE 9184

9094 IF S=4 THEN GOTO 9095 ELSE 9110

9095 PRINT:INPUT"     number of animals at the beginning of the period              ";AOP

9096 PRINT"     duration (in days) of one regular  c o n t i n u i n g"

9097 INPUT"                         production/breeding (replacement) cycle   ";PPC

9098 PRINT"     duration (in days) between the initial and evaluated "

9099 INPUT"                days  w i t h i n  the production/breeding cycle   ";PPX

9100 IF AOP=0 OR PPC=0 OR PPX=0 OR PPX>PPC THEN PRINT IDE$:GOTO 9980 ELSE 9184

9110 IF S=5 THEN GOTO 9111 ELSE 9150

9111 PRINT:PRINT"     total number of animals existing"

9112 INPUT"                               at the beginning of the period    ";D

9113 INPUT"     total number of animals existing in the period              ";B

9114 INPUT"     average number of animals existing in the period            ";C

9115 INPUT"     number of new (born+introduced) animals in the period       ";H

9116 PRINT"     number of extinct animals (dead+slaughtered+removed)"

9117 INPUT"                                            in the period        ";I

9118 IF (H+I)=0 THEN PRINT IDM$:GOTO 9980 ELSE 9184

9150 IF S=6 THEN GOTO 9151 ELSE 9184

9151 INPUT"     number of animals at the beginning of the period            ";AI

9169 INPUT"     number (2 up to 11 !) of planned subperiods                 ";N

9170 IF AI=0 OR N=0 OR N>11 THEN PRINT IDE$:GOTO 9980

9174 CLS:PRINT:PRINT"List data:":PRINT

9175 PRINT"subperiod (name up to 12 characters !),"

9176 PRINT"     supposed number of new (born+introduced) animals,"

9177 PRINT"         supposed number of extinct (dead+slaughtered+removed) animals"

9178 PRINT

9179 FOR I=1 TO N

9180 PRINT TAB(10)I;":";

9181 INPUT" ";SU$(I),IN(I),EX(I)

9182 IF SU$(I)="" THEN PRINT:PRINT IDM$:GOTO 9980 ELSE 9183

9183 NEXT I

9184 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9185 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

9186 IF I$="m" THEN GOTO 10

9187 IF I$="c" THEN GOTO 9000

9188 IF I$=CHR$(13) THEN GOTO 9200

9200 CLS:IF S=6 THEN PRINT:PRINT TAB(6)"SIMPLE  MODEL  FOR  A N I M A L   P O P U L A T I O N   G R O W T H":GOTO 9205

9202 CLS:PRINT:PRINT"RESULT:"

9205 PRINT:PRINT"Place: "PL$;TAB(50)"Time-period: "TI$

9207 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

9208 PRINT

9210 IF S=1 THEN GOTO 9220 ELSE 9250

9220 PRINT:IF AO#>0 AND AN#>0 AND AE#>0 THEN PRINT TAB(5)"Number of animals at the end of the period            = "INT(AO#+AN#-AE#)

9222 IF AF#>0 AND AN#>0 AND AE#>0 THEN PRINT:PRINT TAB(5)"Number of animals at the beginning of the period      = "INT(AF#-AN#+AE#)

9224 IF AF#>0 AND AO#>0 AND AE#>0 THEN PRINT:PRINT TAB(5)"Number of new animals in the period                   = "INT(AF#-AO#+AE#)

9226 IF AO#>0 AND AF#>0 AND AN#>0 THEN PRINT:PRINT TAB(5)"Number of extinct animals in the period               = "INT(AO#-AF#+AN#)

9228 IF AO#>0 AND AN#>0 THEN PRINT:PRINT TAB(5)"Number of animals existing in the period              = "INT(AO#+AN#)

9230 IF AF#>0 AND AN#>0 AND AE#>0 THEN PRINT:PRINT TAB(5)"Number of animals existing in the period              = "INT((AF#-AN#+AE#)+AN#)

9232 IF AF#>0 AND AO#>0 AND AE#>0 THEN PRINT:PRINT TAB(5)"Number of animals existing in the period              = "INT((AF#-AO#+AE#)+AO#)

9240 GOTO 9980

9250 IF S=2 THEN GOTO 9255 ELSE 9300

9255 REM:IF (AB+AI)>0 AND AO>0 AND AP<0 THEN GOTO 9256

9256 REM:LET AP=(AB+AI+AO)

9260 PRINT:IF (AB+AI)>0 AND AO>0 THEN GOTO 9261 ELSE 9263

9261 PRINT"      Replacement (restocking) rate":PRINT

9262 PRINT"                               to initial number of animals  =  ";USING"#.####";(AB+AI)/AO:PRINT

9263 IF (AB+AI)>0 AND AP>0 THEN GOTO 9264 ELSE 9266

9264 PRINT"      Replacement (restocking) rate":PRINT

9265 PRINT"                               to existing number of animals =  ";USING"#.####";(AB+AI)/AP:PRINT

9266 IF (AB+AI)>0 AND AA>0 THEN GOTO 9267 ELSE 9269

9267 PRINT"      Replacement (restocking) rate":PRINT

9268 PRINT"                               to average number of animals  =  ";USING"#.####";(AB+AI)/AA:PRINT

9269 PRINT

9270 IF RC>0 THEN PRINT"      Annual proportion of reproduction cycle                = ";USING"##.####";365/RC

9272 GOTO 9980

9300 IF S=3 THEN GOTO 9310 ELSE 9350

9310 PRINT:PRINT"   Estimated number of animals existing at the beginning":PRINT

9311 PRINT"                  and still remaining +/  at the evaluated day    =  "INT(AO*(1-PX/RC)):PRINT

9312 PRINT:PRINT"   ------------------------------"

9313 PRINT:PRINT"   +/ If not removed prematurely and in absence of migration."

9314 GOTO 9980

9350 IF S=4 THEN GOTO 9351 ELSE 9360

9351 PRINT:PRINT"   Estimated number of animals existing at the beginning":PRINT

9352 PRINT"                  and still remaining +/  at the evaluated day    =  "INT(AOP*(1-PPX/PPC)):PRINT

9353 PRINT:PRINT"   ------------------------------"

9354 PRINT:PRINT"   +/ If not removed prematurely and in absence of migration."

9359 GOTO 9980

9360 IF S=5 THEN GOTO 9400 ELSE 9450

9400 PRINT:IF H>0 AND B>0 THEN PRINT"       Addition rate of animals to existing total         =   ";USING"#.####";H/B

9429 IF H>0 AND C>0 THEN PRINT"       Addition rate of animals to average total          =   ";USING"#.####";H/C

9431 IF H>0 AND D>0 THEN PRINT"       Addition rate of animals to initial total          =   ";USING"#.####";H/D

9433 IF I>0 AND B>0 THEN PRINT:PRINT"       Withdrawal rate of animals to existing total       =   ";USING"#.####";I/B

9435 IF I>0 AND C>0 THEN PRINT"       Withdrawal rate of animals to average total        =   ";USING"#.####";I/C

9437 IF I>0 AND D>0 THEN PRINT"       Withdrawal rate of animals to initial total        =   ";USING"#.####";I/D:PRINT

9440 IF H>0 AND I>0 THEN PRINT"       Balance between additions and withdrawals          =   "INT(H-I):PRINT

9442 PRINT"       Ratio of animal population additions/withdrawals   = ";USING"###.####";H/I

9444 PRINT"       Ratio of animal population withdrawals/additions   = ";USING"###.####";I/H

9449 GOTO 9980

9450 IF S=6 THEN GOTO 9451 ELSE 9980

9451 PRINT TAB(5)"Initial number of animals:";INT(AI+.5)

9460 'PRINT:PRINT TAB(6)"SIMPLE  MODEL  FOR  A N I M A L   P O P U L A T I O N   G R O W T H  "

9464 PRINT

9472 PRINT TAB(8)"Subperiod";TAB(28)"New";TAB(44)"Extinct";TAB(60)"FINAL"

9473 PRINT:IN=0:EX=0

9474 FOR I=1 TO N

9475 IN=IN+IN(I)

9476 EX=EX+EX(I)

9477 PRINT I;TAB(8)USING"\          \";SU$(I);

9478 PRINT TAB(27)INT(IN(I));TAB(43)INT(EX(I));TAB(59)INT(AI+IN-EX)

9479 NEXT I

9480 A$=INKEY$:IF A$="" THEN GOTO 9480

9481 IF N=1 THEN GOTO 9981 ELSE 9482

9482 IF (AI+IN-EX)<(AI/100*40) OR (AI+IN-EX)>(AI/100*160) THEN GOTO 9981 ELSE 9486

9486 'A$=INKEY$:IF A$="" THEN GOTO 9486

9487 CLS:PRINT:PRINT TAB(6)"SIMPLE  MODEL  FOR  A N I M A L   P O P U L A T I O N   G R O W T H  "

9488 PRINT:PRINT TAB(12)"(";CHR$(223);" represents 2 % of initial total"INT(AI);" animals)":PRINT

9489 PRINT

9490 PRINT TAB(2)"End of"

9491 PRINT TAB(2)"Subperiod";TAB(15)"40        60        80       100       120       140       160 %"

9492 PRINT TAB(15)CHR$(179)"---------|---------|---------|---------|---------|---------I"

9493 PRINT TAB(7)"(Start)";TAB(15)CHR$(179);

9494 FOR P=1 TO 30:PRINT CHR$(223);

9495 NEXT P

9496 LET U=0

9497 FOR I=1 TO N

9498 U=U+(IN(I)-EX(I))

9499 Z=(((AI+U)/AI)*50)-20

9500 IF Z<1 THEN GOTO 9501 ELSE 9504

9501 IF Z>0 THEN GOTO 9502 ELSE 9504

9502 PRINT TAB(2)USING"\          \";SU$(I);

9503 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 9512

9504 PRINT TAB(2)USING"\          \";SU$(I);

9505 PRINT TAB(15)CHR$(179);

9506 FOR K=1 TO (((AI+U)/AI)*50)-20

9510 PRINT CHR$(223);

9511 NEXT K

9512 NEXT I

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.10-ESTIMATION OF NUMBER OF ANIMALS ACCORDING TO SURVIVAL RATES"

10010 PRINT"================================================================"

10020 PRINT"(after a series of subperiods and in absence of migration)"

10050 PRINT"INPUT DATA:"

10070 INPUT"     place, period ";LU$,PE$

10072 INPUT"     species, category(ies) ";ES$,CA$

10080 INPUT"     total number of animals at the beginning ";A

10085 INPUT"     number (up to 11 !) of subperiods ";N

10086 IF A=0 OR N=0 OR N>11 THEN PRINT IDE$:GOTO 10980

10089 PRINT TAB(3)"List of data : "

10090 PRINT"     name of subperiod (up to 15 characters), coefficient of survival "

10091 PRINT"       probability in form of proportion (number between >0 and 1 !) :"

10093 FOR I=1 TO N

10094 PRINT TAB(15)"subperiod  No";I;

10095 INPUT NA$(I),X(I)

10096 IF NA$(I)="" OR X(I)=0 THEN PRINT:PRINT IDM$:GOTO 10980 ELSE 10097

10097 IF X(I)>1 THEN PRINT"Error! Data is major than 1 ! ":GOTO 10980 ELSE 10098

10098 NEXT I

10100 R=1

10101 FOR I=1 TO N

10103 R=R*X(I)

10105 NEXT I

10106 IF R=0 THEN GOTO 10980

10150 PRINT:PRINT:PRINT

10151 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10152 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

10153 IF I$="m" THEN GOTO 10

10154 IF I$="c" THEN GOTO 10000

10155 IF I$=CHR$(13) THEN GOTO 10200

10200 CLS:PRINT:PRINT TAB(5)"ESTIMATION OF  NUMBERS OF ANIMALS ACCORDING TO  S U R V I V A L  RATES"

10205 PRINT

10206 PRINT"Place: "LU$;TAB(50)"Period: "PE$

10207 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$:PRINT

10210 PRINT"    From the initial ";INT(A);"animals after ";INT(N);" subperiods"

10220 PRINT TAB(13)"it can be estimated about";

10230 PRINT TAB(40)INT((R*A)+0.5);"surviving animals.":PRINT

10250 PRINT TAB(9)"Subperiod";TAB(33)"Survival";TAB(47)"Cumulative";TAB(60)"Animals"

10251 PRINT TAB(33)"Rate";TAB(47)"Survival";TAB(60)"at the End"

10252 PRINT TAB(47)"Rate";TAB(60)"of Subperiod":PRINT

10259 S=1

10260 FOR I = 1 TO N

10261 S=S*X(I)

10262 PRINT I;TAB(8)USING"\              \";NA$(I);

10263 PRINT TAB(33)USING"#.####";X(I);TAB(47)S;

10264 PRINT TAB(60)INT((A*S)+0.5)

10265 NEXT I

10300 A$=INKEY$:IF A$="" THEN GOTO 10300

10310 CLS:PRINT:PRINT TAB(5)"ESTIMATION OF  NUMBERS OF ANIMALS ACCORDING TO  S U R V I V A L  RATES"

10311 'IF N<4 THEN GOTO 10312 ELSE

10312 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of initial total"INT(A);" animals)":PRINT

10316 PRINT TAB(2)"End of"

10318 PRINT TAB(2)"Subperiod";TAB(20)"0         20        40        60        80       100 %"

10320 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

10322 PRINT TAB(11)"(Start)";TAB(20)CHR$(179);

10323 FOR P=1 TO 50:PRINT CHR$(223);

10324 NEXT P

10325 S=1

10326 FOR I=1 TO N

10327 S=S*X(I)

10328 Z=S*50

10329 IF Z<1 THEN GOTO 10330 ELSE 10333

10330 IF Z>0 THEN GOTO 10331 ELSE 10333

10331 PRINT TAB(2)USING"\              \";NA$(I);

10332 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 10339

10333 PRINT TAB(2)USING"\              \";NA$(I);

10334 PRINT TAB(20)CHR$(179);

10335 FOR K=1 TO S*50

10336 PRINT CHR$(223);

10337 NEXT K

10339 NEXT I

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10986 IF R$="y" OR R$="n" THEN GOTO 10987 ELSE 10990

10987 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.11-ESTIMATES OF THE NUMBER OF WILD ANIMALS (VERTEBRATES AND INVERTEBRATES)"

11015 PRINT"============================================================================"

11020 PRINT"(rough estimates based on territory population samples investigations)"

11050 PRINT"INPUT DATA:"

11051 INPUT"     animal species ";SP$

11058 INPUT"     place (territory), time ";PL$,TI$

11065 INPUT"     surface measure units (up to 8 characters !) ";MU$

11066 INPUT"     total territory in surface measure units     ";NT

11070 INPUT"     number (up to 11 !) of selected representative subterritories ";N

11071 IF NT=0 OR N=0 OR N>11 THEN PRINT IDE$:GOTO 11980

11100 PRINT"   List data: subterritory names (up to 11 characters), total size"

11106 PRINT"     surface units, investigated surface size, number of found animals:"

11150 FOR I=1 TO N

11151 PRINT TAB(8)I;". subterritory: ";

11152 INPUT" "NA$(I),SU(I),IN(I),PO(I)

11153 IF NA$(I)="" OR SU(I)=0 OR IN(I)=0 OR PO(I)=0 THEN PRINT:PRINT IDM$:GOTO 11985

11155 IF SU(I)<IN(I) THEN PRINT:PRINT"Error in input ! Investigated size cannot be major than total size !":GOTO 11980

11156 NEXT I

11157 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11158 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

11159 IF I$="m" THEN GOTO 10

11160 IF I$="c" THEN GOTO 11000

11165 IF I$=CHR$(13) THEN GOTO 11200

11200 CLS:PRINT:PRINT" E S T I M A T E S   O F  T H E   N U M B E R   O F   W I L D   A N I M A L S":PRINT

11203 'IF DI$="" THEN GOTO 11208 ELSE 11207

11208 PRINT"Species: ";SP$;TAB(50)"Time: "TI$

11209 PRINT"Place: "PL$;TAB(50)"Size: "INT(NT);" ";MU$:PRINT

11210 PRINT TAB(15)"S u r f a c e  in "MU$;TAB(45)"A    n    i    m    a    l    s "

11211 PRINT" Selected";TAB(15)"---------------------------";TAB(44)"-----------------------------------"

11220 PRINT" Represent.";TAB(15)"Total";TAB(25)"Investi-";TAB(35)"Terri-";TAB(45)"Found";TAB(53)"Average";TAB(63)"Estimate";TAB(73)"Propor-"

11222 PRINT" Sub-";TAB(25)"gated";TAB(35)"tory Pro-";TAB(53)"per ";TAB(63)"of Total";TAB(73)"tion"

11224 'PRINT TAB(15)USING"\    \";MU$;

11225 PRINT" territory";TAB(35)"portion";TAB(53)USING"\      \";MU$

11226 PRINT

11230 T=0:SU=0:IN=0:PO=0

11232 FOR I=1 TO N

11233 T=T+((SU(I)*(PO(I)/IN(I))))

11234 SU=SU+SU(I)

11235 IN=IN+IN(I)

11236 PO=PO+PO(I)

11237 NEXT I

11240 FOR I=1 TO N

11241 PRINT" ";USING"\         \";NA$(I);

11242 PRINT TAB(14)INT(SU(I));TAB(24)INT(IN(I));TAB(35)USING"#.####";IN(I)/SU(I);

11243 PRINT TAB(44)INT(PO(I));TAB(53)USING"#####.#";PO(I)/IN(I);

11244 PRINT TAB(62)INT(((SU(I)*(PO(I))/IN(I)))+.5);TAB(74)USING"#.####";((PO(I)*SU(I))/IN(I))/T

11245 NEXT I

11246 PRINT

11247 PRINT" T O T A L";TAB(14)INT(SU);TAB(24)INT(IN);TAB(35)USING"#.####";IN/SU;

11248 PRINT TAB(44)INT(PO);TAB(53)USING"#####.#";PO/IN;

11249 PRINT TAB(62)INT(T+.5);TAB(74)"1.0000"

11250 A$=INKEY$:IF A$="" THEN GOTO 11250

11255 CLS:PRINT:PRINT"If this average per ";USING"\      \";MU$

11256 PRINT TAB(10)"is applied on the total territory of";INT(NT);USING"\      \";MU$

11257 PRINT TAB(20)"then it can be estimated about "

11266 PRINT TAB(30)INT(NT*(PO/IN)+.5);" animals (";SP$;") living there."

11270 PRINT:PRINT

11280 PRINT"Do you want to estimate the number of specific disease agents"

11281 INPUT"   reservoirs among the animals of the above species, yes(y) or no(n) ";Y$

11282 IF Y$="y" OR Y$="n" THEN GOTO 11283 ELSE 11985

11283 IF Y$="y" THEN GOTO 11284 ELSE 11985

11284 PRINT:PRINT:PRINT"ADDITIONAL INPUT DATA: ":PRINT:

11285 INPUT"specific disease ";DI$

11286 INPUT"estimated percentage of animals reservoirs (vectors) ";P:PRINT

11310 PRINT:PRINT"If the estimated percentage is applied on the total territory,"

11313 PRINT TAB(10)"then it can be roughly estimated"

11315 PRINT TAB(20)"about ";INT((NT*(PO/IN)*P/100)+.5) SP$;" - reservoirs (carriers)"

11316 PRINT TAB(30)"of "DI$" agents living there."

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11986 IF R$="y" OR R$="n" THEN GOTO 11987 ELSE 11990

11987 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.12-ESTIMATION OF ANIMAL POPULATION SIZE BASED ON CAPTURE/RECAPTURE"

12020 PRINT"===================================================================="

12030 PRINT"in the absence of migration                                  (Ref.: Cannon,Roe)"

12040 PRINT"(This capture-recapture sampling scheme is applicable on ferar animals"

12045 PRINT"or where mustering is difficult. )":PRINT

12100 PRINT"INPUT DATA:":PRINT

12101 INPUT"     species ";SP$

12103 INPUT"     place (territory), time ";PL$,TI$

12110 PRINT:INPUT"     total number of captured-marked and released animals         ";D:PRINT

12120 PRINT"     total number of animals captured  a f t e r   a   t i m e"

12125 PRINT"               suitable to allow for mixing of the population,"

12126 INPUT"                   but which would preclude many deaths/births    ";N:PRINT

12130 INPUT"     number of recaptured animals of the original capture         ";X

12131 IF D=0 OR N=0 OR X=0 OR X>D THEN PRINT IDE$:GOTO 12981 ELSE 12151

12151 'CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12152 'PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

12153 'IF I$="m" THEN GOTO 10

12154 'IF I$="c" THEN GOTO 12000

12155 'IF I$=CHR$(13) THEN GOTO 12200

12200 'CLS:PRINT:PRINT TAB(6)"ESTIMATION OF ANIMAL POPULATION SIZE BASED ON CAPTURE/RECAPTURE":PRINT

12201 ''PRINT"Species: "SP$

12203 'PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

12210 PRINT:PRINT"RESULT:":PRINT

12220 PRINT"     Very rough estimation of the population size = about "INT(D*(N/X)+.5);"animals"

12221 GOTO 12981

12222 NA=D*(N/X)

12225 PRINT:PRINT"NA=D*(N/X) ="D*(N/X)

12226 P=D/NA:Q=1-P

12300 PRINT"P=D/NA ="(D/NA)

12301 PRINT"Q=1-P = "1-P:SE=SQR((P*Q)/NA)

12302 PRINT"SE=SQR((P*Q)/NA) ="SQR((P*Q)/NA)

12306 F=N/NA:PRINT"F=N/NA ="N/NA

12307 COR=SQR(1-F):PRINT"COR=SQR(1-F)="SQR(1-F)

12308 PRINT "SE*NA"SE*NA

12310 PRINT"1 % ="INT(NA/100)

12311 PRINT"upper = D/P ="(D/P)

12312 SE%=INT(SE*(NA/100)*100)

12320 PRINT"SE%=INT(SE*(NA/100)*100)"INT(SE*(NA/100)*100)

12340 'PRINT"Results:"INT(NA);" +- "SE%

12981 A$=INKEY$:IF A$="" THEN GOTO 12981

12985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12986 IF R$="y" OR R$="n" THEN GOTO 12987 ELSE 12990

12987 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"1.13-ESTIMATION OF ANIMAL POPULATION SIZE BASED ON AVERAGE DENSITY"

13005 PRINT"=================================================================="

13010 PRINT TAB(5)"This subprogramme calculates animal population size for:"

13015 PRINT TAB(10)"1) multiform territory knowing the surface size"

13017 PRINT TAB(10)"2) circular territory knowing the radius"

13019 PRINT TAB(10)"3) square territory knowing the side length"

13020 PRINT TAB(10)"4) oblong territory knowing the length and width"

13021 PRINT TAB(10)"5) volumen space knowing the length, width and depth (height)"

13030 INPUT"    Enter choice number: ",CH

13031 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 THEN GOTO 13050 ELSE PRINT IDE$:GOTO 13980

13050 PRINT"INPUT DATA:"

13060 INPUT"     place, time ";PL$,TI$

13070 INPUT"     species ";SP$

13071 IF CH<>5 THEN INPUT"     surface measure unit ";SMU$

13072 IF CH=5 THEN INPUT"     volume measure unit ";VMU$ ELSE 13075

13073 IF CH=5 THEN INPUT"     average density of animals per one volumen measure unit ";AD

13075 IF CH<>5 THEN INPUT"     average density of animals per one surface measure unit ";AD

13076 IF AD=0 THEN PRINT IDM$:GOTO 13980 ELSE 13080

13080 IF CH=1 THEN GOTO 13100

13081 IF CH=2 THEN GOTO 13200

13084 IF CH=3 THEN GOTO 13300

13086 IF CH=4 THEN GOTO 13400

13087 IF CH=5 THEN GOTO 13420

13100 INPUT"     total territory size in surface measure units           ";TS

13150 IF TS=0 THEN PRINT IDM$:GOTO 13980 ELSE 13451

13200 INPUT"     length measure units                                    ";LU$

13210 INPUT"     radius in length measure units                          ";RA:GOTO 13424

13300 INPUT"     length measure units                                    ";LU$

13310 INPUT"     length of square side in length measure units           ";LS:GOTO 13424

13400 INPUT"     length measure units                                    ";LU$

13410 INPUT"     oblong length in measure units                          ";OL

13411 INPUT"     oblong width in measure units                           ";OW:GOTO 13424

13420 INPUT"     length measure units                                    ";LU$

13421 INPUT"     length in measure units                                 ";OL

13422 INPUT"     width in measure units                                  ";OW

13423 INPUT"     depth (height) in measure units                         ";DE

13424 IF CH=1 AND TS=0 OR CH=2 AND RA=0 OR CH=3 AND LS=0 OR CH=4 AND OL=0 OR CH=5 AND OL=0 THEN PRINT IDE$:GOTO 13980

13451 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

13452 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

13453 IF I$="m" THEN GOTO 10

13454 IF I$="c" THEN GOTO 13000

13455 IF I$=CHR$(13) THEN GOTO 13500

13500 CLS:PRINT:PRINT TAB(6)"ESTIMATION OF ANIMAL POPULATION SIZE BASED ON AVERAGE DENSITY":PRINT

13502 PRINT TAB(10)"Place: "PL$;TAB(50)"Time: "TI$

13503 PRINT TAB(10)"Species: "SP$

13504 IF CH<>5 THEN PRINT:PRINT TAB(10)"Average density of animals per "SMU$" : "USING"####.####";AD:PRINT

13505 IF CH=5 THEN PRINT:PRINT TAB(10)"Average density of animals per "VMU$" : "USING"####.####";AD:PRINT

13506 IF CH=1 THEN PRINT TAB(20)"Territory size: ";INT(TS+.5) SMU$:PRINT

13508 PRINT:PRINT

13510 IF CH=1 THEN PRINT TAB(6)"Rough estimation of the population size  =  "INT(AD*TS+.5);" animals":GOTO 13980

13520 PI=3.1415926535

13524 IF CH=2 THEN PRINT TAB(6)"Territory size                           =  "INT((PI*RA^2)+.5) SMU$:PRINT

13525 IF CH=2 THEN PRINT TAB(6)"Rough estimation of the population size  =  "INT((AD*PI*RA^2)+.5);" animals":GOTO 13980

13529 IF CH=3 THEN PRINT TAB(6)"Territory size                           =  "INT(LS^2+.5) SMU$:PRINT

13530 IF CH=3 THEN PRINT TAB(6)"Rough estimation of the population size  =  "INT(AD*LS^2+.5);" animals":GOTO 13980

13539 IF CH=4 THEN PRINT TAB(6)"Territory size                           =  "INT(OL*OW+.5) SMU$:PRINT

13540 IF CH=4 THEN PRINT TAB(6)"Rough estimation of the population size  =  "INT(AD*OL*OW+.5);" animals":GOTO 13980

13541 IF CH=5 THEN PRINT TAB(6)"Volumen size                             =  "INT(OL*OW*DE+.5) VMU$:PRINT

13550 IF CH=5 THEN PRINT TAB(6)"Rough estimation of the population size  =  "INT(AD*OL*OW*DE+.5);"animals"

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

13986 IF R$="y" OR R$="n" THEN GOTO 13987 ELSE 13990

13987 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

14000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

14002 IF Z$="y" OR Z$="n" THEN GOTO 14010 ELSE 14030

14010 IF Z$="y" THEN GOTO 14020 ELSE 14030

14020 CHAIN"EPIZ40MM.KOU"

14025 CLS:PRINT:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

14030 SYSTEM

 

 

 

2-Animal population health/disease analysis - basic indicators

 

5 ON ERROR GOTO 10025

6 IDM$="Input data missing !"

7 IDE$="Input data error !"

10 PRINT"EPIZ4002.KOU":REM:13/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS::PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(7)"2-ANIMAL POPULATION HEALTH/DISEASE ANALYSIS - BASIC INDICATORS"

50 PRINT TAB(7)"=============================================================="

500 PRINT:PRINT TAB(12)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(7)"1-General indicators for animal population health analysis"

520 PRINT TAB(7)"2-Indicators of presence/absence of animal health phenomena"

530 PRINT TAB(7)"3-Selected indicators of animal population health (disease free)"

540 PRINT TAB(7)"4-Selected indicators of animal population morbidity"

550 PRINT TAB(7)"5-Selected indicators of animal population viability (survival)"

560 PRINT TAB(7)"6-Selected indicators of animal population mortality"

570 PRINT TAB(7)"7-Selected indicators of animal disease nidality (focality)"

580 PRINT TAB(7)"8-Selected indicators of animal disease territorial distribution"

600 PRINT TAB(7)"9-Human/animal populations and zoonoses"

609 PRINT

610 PRINT TAB(7)"10-E N D  of this group of subprogrammes":PRINT

611 PRINT"Recommendation: small resulting values of the indicators to be multiplied by"

612 PRINT"100 (per 100 basic units), by 1000 (per 1000 basic units), etc.":PRINT

640 GOTO 690

645 CLS

650 INPUT"Do you want to continue with this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 10000

660 IF Z$="y" THEN 20 ELSE GOTO 10000

690 INPUT"      Enter choice number : ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.1-GENERAL INDICATORS FOR ANIMAL POPULATION HEALTH ANALYSIS"

1010 PRINT"============================================================"

1100 PRINT"INPUT DATA:"

1102 PRINT"basic units (animals - total, at  r i s k; herds, flocks, farms, space units,"

1103 INPUT"      territory units, product units and other epi. risk units) ";UB$

1104 PRINT"epi. units (basic units with health related characteristic (e.g. disease free,"

1105 INPUT"      diseased, pathogen carriers, etc.)  or events ";UE$

1106 INPUT"     place ";LU$

1107 PRINT"Do you want to calculate point(moment) prevalence at a given moment (m)"

1108 INPUT"                            or indicators related to a given period (p) ";P$

1110 IF P$="m" OR P$="p" THEN GOTO 1112 ELSE PRINT IDE$:GOTO 1980

1112 IF P$="m" THEN GOTO 1113 ELSE 1114

1113 PRINT:INPUT"     time-moment ";TI$:GOTO 1120

1114 INPUT"     time-period ";TI$:GOTO 1150

1120 PRINT:INPUT"     total number of basic units existing at the given moment ";A:PRINT

1121 INPUT"            number of epi. units existing at the given moment ";E

1122 IF A=0 OR E=0 THEN PRINT IDM$:GOTO 1980 ELSE 1190

1150 PRINT:PRINT"     number of basic units existing"

1152 INPUT"                                at the beginning of the period     ";D

1153 INPUT"     number of basic units existing in the period                  ";B

1155 INPUT"     average number of basic units in the period                   ";C

1156 PRINT

1159 INPUT"     number of epi. units at the beginning of the period           ";DB

1160 INPUT"     number of epi. units existing in the period                   ";F

1162 INPUT"     average number of epi. units in the period                    ";G

1166 PRINT:INPUT"     number of new epi. units in the period                        ";H

1168 INPUT"     number of extinct epi. units in the period                    ";I

1169 IF (D+B+C+DB+F+G+I)=0 THEN PRINT:PRINT IDM$:GOTO 1980

1190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1191 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

1192 IF I$="m" THEN GOTO 10

1193 IF I$="c" THEN GOTO 1000

1194 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT:PRINT TAB(6)"GENERAL INDICATORS  FOR  ANIMAL  POPULATION  HEALTH  ANALYSIS"

1500 PRINT

1501 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

1502 PRINT TAB(6)"Basic units: "UB$

1503 PRINT TAB(6)"Epi. units: "UE$:PRINT:PRINT

1505 IF P$="m" THEN GOTO 1506 ELSE 1520

1506 PRINT:PRINT TAB(10)"Point prevalence rate of epi. units   =     ";USING"#.####";E/A

1507 PRINT

1508 PRINT TAB(10)"                                      =   ";USING"###.####  %";E/A*100;

1509 GOTO 1980

1520 IF D>0 AND DB>0 THEN GOTO 1611

1525 IF F>0 AND B>0 THEN GOTO 1620

1530 IF G>0 AND C>0 THEN GOTO 1630

1540 IF H>0 AND B>0 THEN GOTO 1631

1550 IF H>0 AND C>0 THEN GOTO 1650

1560 IF H>0 AND D>0 THEN GOTO 1660

1570 IF I>0 AND B>0 THEN GOTO 1661

1580 IF I>0 AND C>0 THEN GOTO 1680

1590 IF I>0 AND D>0 THEN GOTO 1690 ELSE 1980

1611 'PRINT

1615 PRINT"     Initial point prevalence rate of epi. units          =   ";USING"#.####";DB/D:GOTO 1525

1620 PRINT"     Period (interval) prevalence rate of epi. units      =   ";USING"#.####";F/B:GOTO 1530

1630 PRINT"     Average prevalence rate of epi. units                =   ";USING"#.####";G/C:GOTO 1540

1631 PRINT

1640 PRINT"     Incidence rate of epi. units to existing total       =   ";USING"#.####";H/B:GOTO 1550

1650 PRINT"     Incidence rate of epi. units to average total        =   ";USING"#.####";H/C:GOTO 1560

1660 PRINT"     Incidence rate of epi. units to initial total        =   ";USING"#.####";H/D:GOTO 1570

1661 PRINT

1670 PRINT"     Extinction rate of epi. units to existing total      =   ";USING"#.####";I/B:GOTO 1580

1680 PRINT"     Extinction rate of epi. units to average total       =   ";USING"#.####";I/C:GOTO 1590

1690 PRINT"     Extinction rate of epi. units to initial total       =   ";USING"#.####";I/D:PRINT

1695 PRINT:PRINT"Note: To get values per 100, 1000, 10000, 100000, etc. basic units, resulting"

1696 PRINT"      data in form of proportion to be multiplied by 100, 1000,... etc."

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1985 ELSE 1990

1985 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.2-SELECTED INDICATORS OF PRESENCE/ABSENCE DURATION OF ANIMAL POPULATION"

2001 PRINT"    HEALTH PHENOMENON"

2010 PRINT"    ====================================================================="

2020 PRINT TAB(5)"This subprogramme calculates: "

2021 PRINT TAB(10)"1) animal health phenomenon (disease, measure,"

2022 PRINT"                         environment factor, etc.) presence/absence relation"

2023 PRINT TAB(10)"2) disease persistence (endemism) index - according to Dr Astudillo"

2025 INPUT"    Enter choice number: ",CH

2026 IF CH=1 OR CH=2 THEN GOTO 2030 ELSE PRINT IDE$:GOTO 2980

2030 IF CH=2 THEN GOTO 2400 ELSE 2100

2100 PRINT:PRINT"INPUT DATA:"

2112 PRINT

2114 INPUT"     animal health phenomenon    ";FE$

2116 INPUT"     place                       ";LU$

2118 INPUT"     period                      ";PE$

2120 INPUT"     time measure units          ";UT$

2121 PRINT

2130 INPUT"     total duration of  p r e s e n c e  of animal health phenomenon    ";A

2131 INPUT"     total duration of  a b s e n c e  of animal health phenomenon      ";B:PRINT

2133 INPUT"     number of periods of  p r e s e n c e  of animal health phenomenon ";C

2134 INPUT"     number of periods of  a b s e n c e  of animal health phenomenon   ";D

2135 IF (A+B+C+D)=0 THEN PRINT:PRINT IDM$:GOTO 2980

2190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2191 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

2192 IF I$="m" THEN GOTO 10

2193 IF I$="c" THEN GOTO 2000

2194 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT:PRINT"RESULTS:"

2201 PRINT

2202 PRINT"Animal health phenomenon: "FE$:PRINT

2203 PRINT"Place: "LU$;TAB(50)"Period: "PE$

2205 PRINT"Time measure units: "UT$;TAB(40)"Total duration: "(A+B):PRINT

2206 E=A+B

2210 IF A>0 AND C>0 THEN GOTO 2310

2220 IF B>0 AND D>0 THEN GOTO 2320

2230 IF A>0 AND E>0 THEN GOTO 2330

2240 IF B>0 AND E>0 THEN GOTO 2340

2250 IF A>0 AND B>0 THEN GOTO 2350

2260 IF B>0 AND A>0 THEN GOTO 2360 ELSE 2980

2310 PRINT TAB(5)"Average duration of presence of the phenomenon        = ";USING"#####.##";A/C:GOTO 2220

2320 PRINT TAB(5)"Average duration of absence of the phenomenon         = ";USING"#####.##";B/D:GOTO 2230

2330 PRINT:PRINT TAB(5)"Time proportion of presence of the phenomenon         = ";USING"###.####";A/E:GOTO 2240

2340 PRINT TAB(5)"Time proportion of absence of the phenomenon          = ";USING"###.####";B/E:GOTO 2250

2350 PRINT:PRINT TAB(5)"Ratio of periods with/without the phenomenon          = ";USING"###.####";A/B:GOTO 2260

2360 PRINT TAB(5)"Ratio of periods without/with the phenomenon          = ";USING"###.####";B/A

2370 PRINT:GOTO 2980

2400 PRINT:PRINT"INPUT DATA:"

2402 PRINT TAB(6)"There is a need for data on chronological series of disease presence"

2403 PRINT TAB(6)"and absence durations during several years measured in months.":PRINT

2404 INPUT"     disease ";DI$

2405 INPUT"     space, period ";PL$,PE$:PRINT

2406 INPUT"number (up to 11 !) of dif. durations of disease  p r e s e n c e  periods ";N1

2407 INPUT"number (up to 11 !) of dif. durations of disease  a b s e n c e  periods   ";N2

2408 IF N1=0 OR N2=0 THEN GOTO 2419 ELSE 2409

2409 IF N1>11 OR N2>11 THEN PRINT IDE$:GOTO 2980 ELSE 2410

2410 CLS:PRINT:FOR I=1 TO N1

2411 PRINT TAB(5)I;": ";

2412 INPUT"duration of  p r e s e n c e  (in months), frequency ";PR(I),F1(I)

2413 IF PR(I)=0 OR F1(I)=0 THEN GOTO 2419

2414 NEXT I:PRINT

2415 FOR I=1 TO N2:PRINT TAB(5)I;": ";

2416 INPUT"duration of  a b s e n c e  (in months), frequency   ";AB(I),F2(I)

2417 IF AB(I)=0 OR F2(I)=0 THEN GOTO 2419

2418 NEXT I:GOTO 2420

2419 PRINT:PRINT IDM$:GOTO 2980

2420 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2421 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

2422 IF I$="m" THEN GOTO 10

2423 IF I$="c" THEN GOTO 2000

2424 IF I$=CHR$(13) THEN GOTO 2445

2425 S1=0:S2=0

2426 FOR I=1 TO N1

2427 S1=S1+(PR(I)*F1(I))

2428 NEXT I

2429 FOR I=1 TO N2

2430 S2=S2+(AB(I)*F2(I))

2431 NEXT I

2432 T1=0:T2=0

2433 FOR I=1 TO N1

2434 T1=T1+F1(I)

2435 NEXT I

2436 FOR I=1 TO N2

2437 T2=T2+F2(I)

2438 NEXT I

2439 Y=S1/T1

2440 OM1=1/Y

2445 CLS:PRINT:PRINT"RESULT:":PRINT

2446 PRINT TAB(10)"Disease: "DI$:PRINT

2447 PRINT"Space: "PL$;TAB(40)"Period: ";PE$:PRINT

2448 PRINT TAB(10)"Total number of months: "INT(S1+S2+.5):PRINT

2449 PRINT:PRINT TAB(15)"Disease presence omega               = "USING"####.####";OM1:PRINT

2450 X=S2/T2

2452 OM2=1/X

2454 PRINT TAB(15)"Disease absence omega                = "USING"####.####";OM2:PRINT

2460 OM=OM1+OM2

2461 PRINT TAB(15)"Sum of presence and absence omegas   ="USING"#####.####";OM:PRINT

2470 LET E=OM2/OM:PRINT

2471 PRINT TAB(15)"Disease persistence index

2472 PRINT TAB(30)"(endemism index)      =  "USING"###.####";E:PRINT

2475 PRINT"                                                   =  "USING"###.####  %";E*100

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2985 ELSE 2990

2985 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.3-SELECTED INDICATORS OF ANIMAL POPULATION HEALTH"

3010 PRINT"==================================================="

3015 PRINT"related to  d i s e a s e   f r e e   animals: healthy, unaffected, pathogen "

3016 PRINT"free, non diseased; (salubrity, healthiness, wholesomeness, wellness, etc.)"

3030 PRINT"INPUT DATA:"

3050 PRINT"     type/form of animal population health"

3051 INPUT"     (general - crude or particular - cause/attribute specific) ";SA$

3052 INPUT"     species, category(ies) ";SP$,CA$

3054 INPUT"     place ";LU$

3055 PRINT"Do you want to calculate point(moment) prevalence at a given moment (m)"

3056 INPUT"                            or indicators related to a given period (p) ";P$

3057 IF P$="m" OR P$="p" THEN GOTO 3067 ELSE PRINT IDE$:GOTO 3980

3067 IF P$="m" THEN GOTO 3068 ELSE 3069

3068 PRINT:INPUT"     time-moment (point in time) ";TI$:GOTO 3070

3069 INPUT"     time-period ";TI$:GOTO 3080

3070 PRINT:INPUT"     total number of animals existing at the given moment    ";A:PRINT:

3071 INPUT"     number of healthy animals existing at the given moment  ";E

3072 IF A=0 OR E=0 THEN PRINT:PRINT IDM$:GOTO 3980 ELSE 3073

3073 IF E>A THEN GOTO 3074 ELSE 3161

3074 PRINT"Error ! Number of healthy animals cannot be major than all animals !":GOTO 3070

3080 PRINT:INPUT"     total number of animals at the beginning of the period    ";D

3081 INPUT"     total number of animals existing in the period            ";B

3082 INPUT"     average number of animals in the period                   ";C

3152 PRINT:INPUT"     number of healthy animals at the beginning of the period  ";J

3153 INPUT"     number of healthy animals existing in the period          ";F

3154 INPUT"     average number of healthy animals in the period           ";G

3155 PRINT:INPUT"     number of new healthy animals in the period               ";H

3156 PRINT"     number of extinct healthy animals (slaughtered, removed,"

3157 INPUT"                                     diseased)  in the period  ";I

3160 IF (D+J+H+B+C+F+G)=0 THEN PRINT IDM$:GOTO 3980

3161 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3162 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

3163 IF I$="m" THEN GOTO 10

3164 IF I$="c" THEN GOTO 3000

3165 IF I$=CHR$(13) THEN GOTO 3170

3170 CLS:PRINT:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  HEALTH"

3171 PRINT:PRINT TAB(6)"Type/form of population health: ";SA$:PRINT

3172 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

3173 PRINT"Place: ";LU$;TAB(50)"Time: ";TI$:PRINT

3180 IF P$="m" THEN GOTO 3190 ELSE 3200

3190 PRINT:PRINT:PRINT TAB(5)"Point prevalence rate of healthy animals  =   ";USING"#.####";E/A

3191 PRINT

3192 PRINT TAB(5)"                                          = ";USING"###.##";E/A*100;

3193 PRINT" %":PRINT:GOTO 3980

3200 IF J>0 AND D>0 THEN GOTO 3310

3220 IF F>0 AND B>0 THEN GOTO 3320

3230 IF G>0 AND C>0 THEN GOTO 3330

3240 IF H>0 AND B>0 THEN GOTO 3333

3250 IF H>0 AND C>0 THEN GOTO 3350

3260 IF H>0 AND D>0 THEN GOTO 3360

3270 IF I>0 AND B>0 THEN GOTO 3363

3280 IF I>0 AND C>0 THEN GOTO 3380

3290 IF I>0 AND D>0 THEN GOTO 3390 ELSE 3394

3310 PRINT"     Initial point prevalence rate of healthy animals     = ";USING"#.####";J/D:GOTO 3220

3320 PRINT"     Period prevalence rate of healthy animals            = ";USING"#.####";F/B:GOTO 3230

3330 PRINT"     Average prevalence rate of healthy animals           = ";USING"#.####";G/C:GOTO 3240

3333 PRINT

3340 PRINT"     Incidence rate of healthy animals to existing total  = ";USING"#.####";H/B:GOTO 3250

3350 PRINT"     Incidence rate of healthy animals to average total   = ";USING"#.####";H/C:GOTO 3260

3360 PRINT"     Incidence rate of healthy animals to initial total   = ";USING"#.####";H/D:GOTO 3270

3363 PRINT

3370 PRINT"     Extinction rate of healthy animals to existing total = ";USING"#.####";I/B:GOTO 3280

3380 PRINT"     Extinction rate of healthy animals to average total  = ";USING"#.####";I/C:GOTO 3290

3390 PRINT"     Extinction rate of healthy animals to initial total  = ";USING"#.####";I/D:GOTO 3392

3392 A$=INKEY$:IF A$="" THEN GOTO 3392

3393 CLS:PRINT:PRINT:PRINT"Do you want to calculate the relations of the numbers of healthy animals"

3394 INPUT"   to those with other epi. characteristics, yes(y) or no(n) ";EC$

3395 IF EC$="y" THEN GOTO 3396 ELSE 3980

3396 CLS:PRINT:PRINT"INPUT DATA":PRINT

3397 INPUT"     time";GT$:PRINT

3399 INPUT"     number of healthy animals at the given time      ";HT

3400 IF HT<>0 THEN GOTO 3401 ELSE PRINT IDM$: GOTO 3980

3401 INPUT"     number of diseased animals at the given time     ";DT:PRINT

3402 INPUT"     number of intrafocal animals at the given time   ";FT

3403 INPUT"     number of animals at risk at the given time      ";TT:PRINT

3404 INPUT"     number of resistant animals at the given time    ";RT

3405 INPUT"     number of susceptible animals at the given time  ";ST:PRINT

3406 INPUT"     number of investigated animals at the given time ";IT

3407 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3408 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

3409 IF I$="m" THEN GOTO 10

3410 IF I$="c" THEN GOTO 3395

3411 IF I$=CHR$(13) THEN GOTO 3416

3416 CLS:PRINT:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  HEALTH":PRINT

3417 PRINT TAB(6)"Type/form of population health: ";SA$

3418 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

3419 PRINT"Place: ";LU$;TAB(40)"Time: ";GT$:PRINT

3420 IF HT>0 AND DT>0 THEN GOTO 3430 ELSE 3421

3421 IF HT>0 AND FT>0 THEN GOTO 3432 ELSE 3422

3422 IF HT>0 AND TT>0 THEN GOTO 3434 ELSE 3423

3423 IF HT>0 AND RT>0 THEN GOTO 3436 ELSE 3424

3424 IF HT>0 AND ST>0 THEN GOTO 3438 ELSE 3425

3425 IF HT>0 AND IT>0 THEN GOTO 3440 ELSE 3980

3430 PRINT"     Ratio of healthy animals per diseased one          = ";USING"#####.####";HT/DT

3431 PRINT"     Ratio of diseased animals per healthy one          = ";USING"#####.####";DT/HT:GOTO 3421

3432 PRINT:PRINT"     Ratio of healthy animals per intrafocal one        = ";USING"#####.####";HT/FT

3433 PRINT"     Ratio of intrafocal animals per healthy one        = ";USING"#####.####";FT/HT:GOTO 3422

3434 PRINT:PRINT"     Ratio of healthy animals per one at risk           = ";USING"#####.####";HT/TT

3435 PRINT"     Ratio of animals at risk per healthy one           = ";USING"#####.####";TT/HT:GOTO 3423

3436 PRINT:PRINT"     Ratio of healthy animals per resistant one         = ";USING"#####.####";HT/RT

3437 PRINT"     Ratio of resistant animals per healthy one         = ";USING"#####.####";RT/HT:GOTO 3424

3438 PRINT:PRINT"     Ratio of healthy animals per susceptible one       = ";USING"#####.####";HT/ST

3439 PRINT"     Ratio of susceptible animals per healthy one       = ";USING"#####.####";ST/HT:GOTO 3425

3440 PRINT:PRINT"     Ratio of healthy animals per investigated one      = ";USING"#####.####";HT/IT

3441 PRINT"     Ratio of investigated animals per healthy one      = ";USING"#####.####";IT/HT

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3985 ELSE 3990

3985 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.4-SELECTED INDICATORS OF ANIMAL POPULATION MORBIDITY"

4010 PRINT"======================================================"

4080 PRINT"This subprogramme calculates indicators related to diseased animals (unhealthy,"

4081 PRINT"affected, infected, invaded, pathogen carriers), clinical cases, etc. :"

4091 PRINT TAB(7)"1) total population point prevalence rate at a given moment"

4092 PRINT TAB(7)"2) total population morbidity related to a given period"

4093 PRINT TAB(7)"3) specific transmissible disease attack rates (intrafocal incidence)"

4094 PRINT TAB(7)"4) proportional specific disease morbidity rate"

4095 PRINT TAB(7)"5) morbidity indicators related to animals at risk (exposed)"

4096 PRINT TAB(7)"6) animal-time incidence rate"

4097 INPUT"    Enter choice number: ",P

4098 IF P=1 OR P=2 OR P=3 OR P=4 OR P=5 OR P=6 THEN GOTO 4099 ELSE PRINT IDE$:GOTO 4980

4099 'IF P=6 THEN CLS

4100 PRINT"INPUT DATA:"

4101 PRINT"     disease(s)-type/form (general - crude or cause/attribute-specific;"

4102 INPUT"       apparent, true, reported, etc.) ";EN$

4103 INPUT"     species, category(ies) ";SP$,CA$

4140 IF P=1 THEN INPUT"     place, time-moment ";LU$,TI$:GOTO 4240

4142 IF P=2 THEN INPUT"     place, time-period ";LU$,TI$:GOTO 4245

4144 IF P=3 THEN INPUT"     place, time (period of the epizootic) ";LU$,TI$

4145 IF P=3 THEN INPUT"     definition of epizootic initial stage ";IS$:GOTO 4350

4146 IF P=4 THEN INPUT"     place, time (moment or period) ";LU$,TI$:GOTO 4360

4148 IF P=5 THEN INPUT"     place ";LU$:GOTO 4365

4150 IF P=6 THEN INPUT"     place, time-period ";LU$,TI$:GOTO 4390

4239 PRINT IDE$:GOTO 4980

4240 PRINT:INPUT"     total number of animals existing at the given moment        ";A

4241 INPUT"     number of diseased animals existing at the given moment     ";J

4242 PRINT"     number of diseased animals with clinical symptoms"

4243 INPUT"                                 existing at the given moment    ";Z

4244 IF A=0 OR J=0 OR J>A THEN GOTO 4239 ELSE 4410

4245 CLS:PRINT:PRINT"     total number of animals existing"

4246 INPUT"                         at the beginning of the period          ";D

4250 INPUT"     total number of animals existing in the period              ";B

4260 INPUT"     average total number of animals existing in the period      ";C:PRINT

4262 PRINT"Following data cannot be greater than total numbers of animals !":PRINT

4280 INPUT"     number of diseased animals at the beginning of the period   ";E

4290 INPUT"     number of diseased animals existing in the period           ";F

4300 INPUT"     average number of diseased animals in the period            ";G

4310 PRINT:INPUT"     number of new diseased animals in the  period               ";H

4320 PRINT"     number of extinct diseased animals "

4321 INPUT"            (dead+slaughtered+removed+recovered) in the period   ";I

4322 IF (D+B+C+E+F+G+H)=0 OR E>D OR F>B OR G>C THEN GOTO 4239 ELSE 4410

4350 PRINT"     t o t a l  number of  a n i m a l s  at specific risk"

4351 INPUT"          at the  b e g i n n i n g  of intrafocal exposure      ";T

4352 PRINT"     t o t a l  number of animals that develop  d i s e a s e  "

4353 INPUT"          during total period of specific epizootics             ";S

4354 INPUT"     diseased in  i n i t i a l  stage (<total diseased)         ";IS

4355 'INPUT"     number of animals-contacts exposed to first case (proband) ";V

4356 'PRINT"     total number of animals exposed to first case (proband)"

4357 'INPUT"        that develop disease within range of incubation period  ";U

4358 IF T=0 OR S=0 OR IS=>S THEN GOTO 4239 ELSE 4410

4360 PRINT:INPUT"     number of all diseased animals at a given time              ";Y

4362 PRINT"     number of animals diseased due to specific cause(s) only"

4363 INPUT"                                                at a given time  ";W

4364 IF Y=0 OR W=0 THEN GOTO 4239 ELSE 4410

4365 PRINT"   Do you want to evaluate point prevalence at a given moment (m)"

4366 INPUT"                      or indicators related to a given period (p) ";G$

4367 IF G$="m" THEN INPUT"     moment ";TI$:GOTO 4370 ELSE 4368

4368 IF G$="p" THEN INPUT"     period ";TI$:GOTO 4372 ELSE PRINT IDE$:GOTO 4980

4370 PRINT:INPUT"     total number of animals at risk existing at the given moment    ";A

4371 PRINT:INPUT"     number of diseased animals at risk existing at the given moment ";J:GOTO 4385

4372 CLS:PRINT:PRINT"    total number of animals at risk existing

4373 INPUT"                                     at the beginning of the period  ";D

4374 INPUT"    total number of animals at risk existing in the period           ";B

4375 INPUT"    average number of animals at risk existing in the period         ";C:PRINT

4376 INPUT"    number of diseased animals at risk at beginning of the period    ";E

4377 INPUT"    number of diseased animals at risk existing in the period        ";F

4378 INPUT"    average number of diseased animals at risk in the period         ";G

4380 PRINT:INPUT"    number of new diseased animals at risk in the  period            ";H

4382 PRINT"    number of extinct (dead+slaughtered+removed+recovered)"

4384 INPUT"                         diseased animals at risk in the period      ";I:PRINT:GOTO 4386

4385 IF A=0 OR J=0 THEN GOTO 4239 ELSE 4410

4386 IF (D+B+C+E+F+G+I+H)=0 THEN GOTO 4239 ELSE 4410

4390 INPUT"     animal-time unit (day, week, month, year, etc.)                 ";T$

4396 INPUT"     number of new events (diseased animals) in the period           ";NDA

4397 IF T$="" OR NDA=0 THEN GOTO 4239 ELSE 4398

4398 INPUT"Do you know absolute number of animal-time units at risk, yes(y) or no(n) ";Z$

4399 IF Z$="y" OR Z$="n" THEN GOTO 4400 ELSE PRINT IDE$:GOTO 4980

4400 IF Z$="y" THEN GOTO 4401 ELSE 4402

4401 INPUT"     number of animal-time units at risk in the period               ";T:GOTO 4405

4402 INPUT"     average number of animals at risk                               ";ANA

4403 INPUT"     period duration in time units                                   ";PTU

4404 T=ANA*PTU

4405 PRINT

4406 IF Z$="y" AND T=0 OR Z$="n" AND (ANA+PTU)=0 THEN PRINT IDE$:GOTO 4980

4410 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4411 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

4412 IF I$="m" THEN GOTO 10

4413 IF I$="c" THEN GOTO 4000

4414 IF I$=CHR$(13) THEN GOTO 4415

4415 CLS:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  MORBIDITY"

4498 PRINT:PRINT"Disease(s)-type/form: ";EN$

4599 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

4500 IF P<>3 THEN PRINT"Place: "LU$;TAB(50)"Time: "TI$

4501 IF P=3 THEN PRINT"Place: "LU$;TAB(40)"Epizootic period: "TI$

4502 IF P=3 THEN PRINT TAB(6)"Initial stage: "IS$

4503 'PRINT

4504 IF P=1 THEN GOTO 4510

4505 IF P=2 THEN GOTO 4519

4506 IF P=3 THEN GOTO 4750

4507 IF P=4 THEN GOTO 4770

4508 IF P=5 THEN GOTO 4800

4509 IF P=6 THEN GOTO 4900

4510 PRINT:PRINT:PRINT"Point prevalence rate of diseased animals                =   ";USING"#.####";J/A

4511 PRINT TAB(66)" = "USING"###.#### %";(J/A)*100:PRINT

4512 IF Z>0 THEN GOTO 4513 ELSE 4980

4513 PRINT"Point prevalence rate of clinically diseased animals     =   ";USING"#.####";Z/A;

     PRINT TAB(66)" = "USING"###.#### %";(Z/A)*100

4514 IF Z<J THEN PRINT"Point prevalence rate of subclinically diseased animals  =   "USING"#.####";(J-Z)/A

     IF Z<J THEN PRINT TAB(66)" = "USING"###.#### %";(J-Z)/A*100

4515 PRINT"Proportion of clinically diseased animals                =   ";USING"#.####";Z/J

     PRINT TAB(66)" = "USING"###.#### %";(Z/J)*100

4516 IF Z<J THEN PRINT"Proportion of subclinically diseased animals             =   ";USING"#.####";(J-Z)/J ELSE 4980

     PRINT TAB(66)" = "USING"###.#### %";(J-Z)/J*100:PRINT:PRINT

4517 PRINT"Ratio of animals diseased clinically per subclinically one  = ";USING"###.####";Z/(J-Z):PRINT

4518 PRINT"Ratio of animals diseased subclinically per clinically one  = ";USING"###.####";(J-Z)/Z:GOTO 4980

4519 IF E>0 AND D>0 THEN GOTO 4610

4520 IF F>0 AND B>0 THEN GOTO 4620

4530 IF G>0 AND C>0 THEN GOTO 4630

4540 IF H>0 AND B>0 THEN GOTO 4640

4550 IF H>0 AND C>0 THEN GOTO 4650

4560 IF H>0 AND D>0 THEN GOTO 4660

4570 IF I>0 AND B>0 THEN GOTO 4670

4580 IF I>0 AND C>0 THEN GOTO 4680

4590 IF I>0 AND D>0 THEN GOTO 4689 ELSE 4690

4610 PRINT:PRINT"     Initial point prevalence rate of diseased animals      =   ";USING"#.####";E/D:GOTO 4520

4620 PRINT"     Period prevalence rate of diseased animals             =   ";USING"#.####";F/B:GOTO 4530

4630 PRINT"     Average prevalence rate of diseased animals            =   ";USING"#.####";G/C:GOTO 4540

4640 PRINT:PRINT"     Incidence rate of diseased animals to existing total   =   ";USING"#.####";H/B:GOTO 4550

4650 PRINT"     Incidence rate of diseased animals to average total    =   ";USING"#.####";H/C:GOTO 4560

4660 PRINT"     Incidence rate of diseased animals to initial total    =   ";USING"#.####";H/D:GOTO 4570

4670 PRINT:PRINT"     Extinction rate of diseased animals to existing total  =   ";USING"#.####";I/B:GOTO 4580

4680 PRINT"     Extinction rate of diseased animals to average total   =   ";USING"#.####";I/C:GOTO 4590

4689 PRINT"     Extinction rate of diseased animals to initial total   =   ";USING"#.####";I/D:PRINT

4690 A$=INKEY$:IF A$="" THEN GOTO 4690

4691 CLS:PRINT:PRINT"Do you want to calculate the relations of the numbers of diseased animals"

4692 INPUT"   to those with other epi. characteristics, yes(y) or no(n) ";EC$

4693 IF EC$="y" THEN GOTO 4694 ELSE 4980

4694 CLS:PRINT:PRINT"INPUT DATA:":PRINT

4695 PRINT:INPUT"     given time ";GT$:PRINT

4696 INPUT"     number of diseased animals at the given time     ";DT

4697 IF DT<>0 THEN GOTO 4698 ELSE PRINT IDM$:GOTO 4980

4698 INPUT"     number of healthy animals at the given time      ";HT:PRINT

4699 INPUT"     number of intrafocal animals at the given time   ";FT

4700 INPUT"     number of animals at risk at the given time      ";TT:PRINT

4701 INPUT"     number of resistant animals at the given time    ";RT

4702 INPUT"     number of susceptible animals at the given time  ";ST:PRINT

4703 INPUT"     number of investigated animals at the given time ";IT

4704 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4705 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

4706 IF I$="m" THEN GOTO 10

4707 IF I$="c" THEN GOTO 4691

4708 IF I$=CHR$(13) THEN GOTO 4716

4716 CLS:PRINT:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  MORBIDITY":PRINT

4717 PRINT TAB(6)"Disease(s)-type/form: ";EN$

4718 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

4719 PRINT"Place: "LU$;TAB(40)"Time: "GT$:PRINT

4720 IF DT>0 AND HT>0 THEN GOTO 4730 ELSE 4721

4721 IF DT>0 AND FT>0 THEN GOTO 4732 ELSE 4722

4722 IF DT>0 AND TT>0 THEN GOTO 4734 ELSE 4723

4723 IF DT>0 AND RT>0 THEN GOTO 4736 ELSE 4724

4724 IF DT>0 AND ST>0 THEN GOTO 4738 ELSE 4725

4725 IF DT>0 AND IT>0 THEN GOTO 4740 ELSE 4981

4730 PRINT"     Ratio of diseased/healthy animals         = ";USING"#####.####";DT/HT

4731 PRINT"     Ratio of healthy/diseased animals         = ";USING"#####.####";HT/DT:GOTO 4721

4732 PRINT:PRINT"     Ratio of diseased/intrafocal animals      = ";USING"#####.####";DT/FT

4733 PRINT"     Ratio of intrafocal/diseased animals      = ";USING"#####.####";FT/DT:GOTO 4722

4734 PRINT:PRINT"     Ratio of diseased/at risk animals         = ";USING"#####.####";DT/TT

4735 PRINT"     Ratio of at risk/diseased animals         = ";USING"#####.####";TT/DT:GOTO 4723

4736 PRINT:PRINT"     Ratio of diseased/resistant animals       = ";USING"#####.####";DT/RT

4737 PRINT"     Ratio of resistant/diseased animals       = ";USING"#####.####";RT/DT:GOTO 4724

4738 PRINT:PRINT"     Ratio of diseased/susceptible animals     = ";USING"#####.####";DT/ST

4739 PRINT"     Ratio of susceptible/diseased animals     = ";USING"#####.####";ST/DT:GOTO 4725

4740 PRINT:PRINT"     Ratio of diseased/investigated animals    = ";USING"#####.####";DT/IT

4741 PRINT"     Ratio of investigated/diseased animals    = ";USING"#####.####";IT/DT:GOTO 4980

4750 PRINT:PRINT"     Specific disease attack rate (case rate)       =   ";USING"#.####";S/T

4751 PRINT TAB(62)"= ";USING"###.####  %";(S/T)*100:PRINT

4752 IF IS>0 AND T>0 THEN GOTO 4753 ELSE 4980

4753 PRINT"     Specific disease initial stage attack rate     =   ";USING"#.####";IS/T

4754 PRINT TAB(62)"= ";USING"###.####  %";(IS/T)*100

4755 PRINT"     Specific disease post-initial stage attack rate

4756 PRINT"                            (secondary attack rate) =   ";USING"#.####";(S-IS)/T

4757 PRINT TAB(62)"= ";USING"###.####  %";((S-IS)/T)*100

4758 PRINT:PRINT"     Proportion of initial stage attack rate        =   ";USING"#.####";IS/S

     PRINT TAB(62)"= ";USING"###.####  %";IS/S*100

4759 PRINT"     Proportion of post-initial stage attack rate   =   ";USING"#.####";(S-IS)/S

     PRINT TAB(62)"= ";USING"###.####  %";((S-IS)/S)*100:PRINT

4760 PRINT"     Ratio initial/post-initial stage attack rates  =   ";"1 :";USING"###.####";(S-IS)/IS

4765 PRINT"     Ratio post-initial/initial stage attack rates  =   ";"1 :";USING"###.####";IS/(S-IS):GOTO 4980

4770 PRINT:PRINT"     Proportional specific disease morbidity rate   =   ";USING"#.####";W/Y

4771 PRINT:PRINT TAB(53)"= ";USING"###.####";(W/Y)*100;

4772 PRINT"  %"

4774 PRINT:GOTO 4980

4800 IF G$="m" THEN GOTO 4801 ELSE 4818

4801 IF J>0 AND A>0 THEN PRINT:PRINT"     Point prevalence rate of diseased animals at risk       =   ";USING"#.####";J/A

4802 PRINT:PRINT TAB(62)"= ";USING"###.####";(J/A)*100;

4803 PRINT"  %":GOTO 4980

4818 PRINT

4819 IF E>0 AND D>0 THEN PRINT"     Initial point prevalence rate of diseased animals at risk     =  ";USING"#.####";E/D

4820 IF F>0 AND B>0 THEN PRINT"     Period prevalence rate of diseased animals at risk            =  ";USING"#.####";F/B

4830 IF G>0 AND C>0 THEN PRINT"     Average prevalence rate of diseased animals at risk           =  ";USING"#.####";G/C

4840 IF H>0 AND B>0 THEN PRINT:PRINT"     Incidence rate of diseased animals at risk to existing total  =  ";USING"#.####";H/B

4850 IF H>0 AND C>0 THEN PRINT"     Incidence rate of diseased animals at risk to average total   =  ";USING"#.####";H/C

4860 IF H>0 AND D>0 THEN PRINT"     Incidence rate of diseased animals at risk to initial total   =  ";USING"#.####";H/D

4870 IF I>0 AND B>0 THEN PRINT:PRINT"     Extinction rate of diseased animals at risk to existing total =  ";USING"#.####";I/B

4880 IF I>0 AND C>0 THEN PRINT"     Extinction rate of diseased animals at risk to average total  =  ";USING"#.####";I/C

4890 IF I>0 AND D>0 THEN PRINT"     Extinction rate of diseased animals at risk to initial total  =  ";USING"#.####";I/D:GOTO 4980

4900 'PRINT"     Animal-time unit: "T$:PRINT:PRINT

4892 IF NDA>0 AND T>0 THEN GOTO 4904 ELSE 4980

4904 PRINT:PRINT"     Animal-time incidence rate"

4905 PRINT"        (interval incidence density)   = "USING"####.####";NDA/T;

4906 PRINT"  animal-"T$;" at risk"

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4985 ELSE 4990

4985 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.5-SELECTED INDICATORS OF ANIMAL POPULATION VIABILITY (SURVIVAL)"

5010 PRINT"================================================================="

5020 PRINT TAB(6)"This subprogramme calculates survival indicators according to:"

5022 PRINT TAB(10)"1) general population aspects"

5024 PRINT TAB(10)"2) specific health/disease aspects"

5026 PRINT TAB(10)"3) reproduction categories aspects"

5027 PRINT TAB(10)"4) breeding/production categories aspects"

5030 INPUT"     Enter choice number: ",CH

5035 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 5200 ELSE PRINT IDE$:GOTO 5980

5040 PRINT:PRINT IDM$:GOTO 5980

5200 PRINT"INPUT DATA:"

5220 IF CH=2 THEN INPUT"     animals health status - specify:  ",HA$:GOTO 5226

5225 INPUT"     type/form of viability ";VI$

5226 INPUT"     species, category(ies) ";SP$,CA$

5231 INPUT"     place, period ";LU$,TI$:PRINT

5232 IF CH=4 THEN GOTO 5320 ELSE 5235

5235 IF CH=1 OR CH=2 THEN GOTO 5236 ELSE 5238

5236 INPUT"     number of animals existing at the beginning of the period  ";G

5237 INPUT"     number of animals surviving at the end of the period       ";F

5238 IF CH<>4 THEN INPUT"     number of animals existing in the period                   ";D

5240 IF CH<>4 THEN INPUT"     number of animals born (live births) in the period         ";A

5241 IF (G+F+D+A)=0 THEN GOTO 5040 ELSE 5242

5242 IF CH=3 THEN GOTO 5280 ELSE 5243

5243 IF CH=4 THEN GOTO 5320 ELSE 5250

5250 PRINT

5251 IF CH=1 OR CH=2 THEN INPUT"     number of naturally dead animals in the period             ";B

5260 IF CH=1 OR CH=2 THEN INPUT"     number of animals slaughtered in the period                ";C:PRINT

5270 GOTO 5410

5280 PRINT"     number of females in reproductive age"

5281 INPUT"                                     existing in the period     ";E

5310 INPUT"     number of weaned new born animals in the period            ";H:PRINT

5311 IF A=0 OR (E+D)=0 THEN GOTO 5040 ELSE 5410

5320 INPUT"     number of animals at the beginning of breeding period      ";I

5330 INPUT"     number of animals surviving to the end of breeding period  ";J:PRINT

5340 INPUT"     number of animals at the beginning of fattening period     ";K

5350 INPUT"     number of animals surviving to the end of fattening period ";L

5400 IF (I+J+K+L)=0 THEN GOTO 5040 ELSE 5410

5410 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5411 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

5412 IF I$="m" THEN GOTO 10

5413 IF I$="c" THEN GOTO 5000

5415 IF I$=CHR$(13) THEN GOTO 5416

5416 CLS:PRINT:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  VIABILITY  (SURVIVAL)":PRINT

5417 IF CH=2 THEN PRINT TAB(6)"Animals Health Status: "HA$:GOTO 5430

5420 PRINT TAB(6)"Type of viability: "VI$

5430 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

5440 PRINT"Place: "LU$;TAB(50)"Period: "TI$:PRINT

5441 PRINT

5500 IF A>0 AND B>0 AND C>0 THEN GOTO 5600 ELSE 5510

5510 IF A>0 AND E>0 THEN GOTO 5610 ELSE 5520

5520 IF A>0 AND D>0 THEN GOTO 5620 ELSE 5525

5525 IF CH=3 THEN GOTO 5530 ELSE 5635

5530 IF H>0 AND A>0 THEN GOTO 5630 ELSE 5540

5540 IF F>0 AND G>0 THEN GOTO 5640 ELSE 5550

5550 IF CH=4 THEN GOTO 5650 ELSE 5980

5555 'IF I>0 AND J>0 THEN GOTO 5650 ELSE 5560

5560 'IF K>0 AND L>0 THEN GOTO 5660 ELSE 5980

5600 IF CH=1 OR CH=2 THEN PRINT"     Animal population viability  index       =  ";USING"###.####";A/(B+C):GOTO 5510

5610 PRINT:PRINT"     Animal population fertility rate         =  ";USING"###.####";A/E

5611 PRINT TAB(56)"   =  ";USING"###.#### %";(A/E)*100:GOTO 5520

5620 PRINT:PRINT"     Animal population natality rate"

5621 PRINT"                    (crude live birth rate)   =  ";USING"###.####";A/D

5622 PRINT"                                                          =  ";USING"###.#### %";(A/D)*100:GOTO 5530

5630 PRINT:PRINT"     Animal survival-to-weaning rate"

5631 PRINT"             (weaned new born animals' rate)  =  ";USING"  #.####";H/A

5632 PRINT"                                                          =  ";USING"###.#### %";(H/A)*100:GOTO 5550

5635 IF CH=4 THEN GOTO 5650 ELSE 5640

5640 IF CH=1 OR CH=2 THEN PRINT:PRINT"     Animal population survival rate          =  ";USING"  #.####";F/G

5641 PRINT"                                                          =  ";USING"###.#### %";(F/G)*100:GOTO 5980

5650 PRINT:IF I>0 AND J>0 THEN GOTO 5651 ELSE 5654

5651 PRINT"     Breeding animals survival rate           =  ";USING"  #.####";J/I

5652 PRINT"                                                          =  ";USING"###.#### %";(J/I)*100:GOTO 5654

5654 PRINT:IF K>0 AND L>0 THEN GOTO 5661 ELSE 5980

5661 PRINT"     Fattening animals survival rate          =  ";USING"  #.####";L/K

5663 PRINT"                                                          =  ";USING"###.#### %";(L/K)*100

5670 PRINT

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 F=0:D=0:A=0:C=0:E=0:H=0:I=0:J=0:K=0:L=0

5982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5983 IF R$="y" OR R$="n" THEN GOTO 5985 ELSE 5990

5985 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.6-SELECTED INDICATORS OF ANIMAL POPULATION MORTALITY"

6010 PRINT"======================================================"

6051 PRINT"Do you want to evaluate general-crude mortality / crude death rate (g)"

6053 PRINT"or cause/category specific death rate - specific disease mortality (s)"

6055 INPUT"                                        or neonatal mortality rate (n)  ";M$:PRINT

6056 IF M$="g" OR M$="s" OR M$="n" THEN GOTO 6100 ELSE PRINT IDE$:GOTO 6980

6100 PRINT"INPUT DATA:"

6118 IF M$="g" THEN GOTO 6218

6120 IF M$="s" THEN GOTO 6219

6121 IF M$="n" THEN GOTO 6231 ELSE 6051

6218 INPUT"     type of mortality ";MO$:GOTO 6231

6219 INPUT"     specific disease(s)/form ";SD$

6231 INPUT"     place, period ";LU$,TI$

6233 INPUT"     species, category(ies) ";SP$,CA$

6235 IF M$="n" THEN GOTO 6450

6250 PRINT"     total number of animals existing"

6251 INPUT"                         at the beginning of the period           ";B

6260 INPUT"     total number of animals existing in the period               ";C

6265 INPUT"     average total number of animals in the period                ";D

6270 IF (B+C+D)=0 THEN 6454 ELSE 6271

6271 PRINT:INPUT"     total number of naturally dead animals in the period         ";E

6274 IF M$="g" THEN GOTO 6281 ELSE 6400

6281 INPUT"     total number of slaughtered animals in the period            ";H

6282 IF H>0 AND E>0 THEN A=(H+E) ELSE A=0

6283 IF C>0 AND (E+H)>C THEN GOTO 6454

6290 PRINT:INPUT"     total number of diseased animals in the period               ";F

6300 INPUT"     total number of diseased animals naturally dead              ";G

6305 GOTO 6490

6400 IF M$="s" THEN GOTO 6401 ELSE 6450

6401 PRINT:PRINT"     number of specifically diseased animals existing"

6402 INPUT"                                              in the period       ";L

6405 PRINT"     number of naturally dead specifically diseased animals"

6406 INPUT"                                              in the period       ";P

6407 PRINT"     number of slaughtered specifically diseased animals"

6408 INPUT"                                              in the period       ";Q

6409 IF (L+P+Q)=0 OR (P+Q)>L THEN GOTO 6454 ELSE 6410

6410 IF L<P OR E<P THEN PRINT IDE$:GOTO 6980

6427 GOTO 6490

6450 PRINT:INPUT"     number of live animal births in the period                  ";LAB

6452 PRINT:INPUT"     number of deaths of new born animals in the period          ";DNB

6453 IF LAB=0 OR DNB=0 OR DNB>LAB THEN GOTO 6454 ELSE 6490

6454 PRINT:PRINT IDE$:GOTO 6980

6490 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6491 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

6492 IF I$="m" THEN GOTO 10

6493 IF I$="c" THEN GOTO 6000

6494 IF I$=CHR$(13) THEN GOTO 6500

6500 CLS:PRINT TAB(6)"SELECTED INDICATORS  OF  ANIMAL  POPULATION  MORTALITY":PRINT

6501 IF M$="g" THEN GOTO 6504:

6502 IF M$="s" THEN GOTO 6505

6503 IF M$="n" THEN GOTO 6700

6504 PRINT TAB(6)"Type of mortality: "MO$:GOTO 6506

6505 PRINT TAB(6)"Specific disease(s): "SD$

6506 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

6507 PRINT"Place: "LU$;TAB(50)"Period: "TI$:PRINT

6509 IF M$="g" THEN GOTO 6510 ELSE 6660

6510 IF E<0 THEN GOTO 6511 ELSE 6512

6511 LET E=(A-H):GOTO 6519

6512 IF H<0 THEN GOTO 6513 ELSE 6519

6513 LET H=(A-E):GOTO 6519

6519 IF A>0 AND B>0 THEN GOTO 6610

6520 IF A>0 AND C>0 THEN GOTO 6620

6530 IF A>0 AND D>0 THEN GOTO 6630

6540 IF E>0 AND B>0 THEN GOTO 6640

6545 IF E>0 AND C>0 THEN GOTO 6641

6546 IF E>0 AND D>0 THEN GOTO 6642

6547 IF H>0 AND B>0 THEN GOTO 6645

6548 IF H>0 AND C>0 THEN GOTO 6646

6549 IF H>0 AND D>0 THEN GOTO 6647

6550 IF G>0 AND F>0 THEN GOTO 6650 ELSE 6651

6600 PRINT

6610 PRINT"     Animal population total mortality rate to initial total    =  ";USING"#.####";A/B:GOTO 6520

6620 PRINT"     Animal population total mortality rate to existing total   =  ";USING"#.####";A/C:GOTO 6530

6630 PRINT"     Animal population total mortality rate to average total    =  ";USING"#.####";A/D:GOTO 6540

6640 PRINT:PRINT"     Animal population natural mortality rate to initial total  =  ";USING"#.####";E/B:GOTO 6545

6641 PRINT"     Animal population natural mortality rate to existing total =  ";USING"#.####";E/C:GOTO 6546

6642 PRINT"     Animal population natural mortality rate to average total  =  ";USING"#.####";E/D:GOTO 6547

6645 PRINT:PRINT"     Slaughtered animals rate to initial total                  =  ";USING"#.####";H/B:GOTO 6548

6646 PRINT"     Slaughtered animals rate to existing total                 =  ";USING"#.####";H/C:GOTO 6549

6647 PRINT"     Slaughtered animals rate to average total                  =  ";USING"#.####";H/D:GOTO 6550

6650 PRINT:PRINT"     Animal population crude case fatality rate                 =  ";USING"#.####";G/F

6651 PRINT

6652 IF A>0 THEN PRINT"  Note: 'total mortality' is based on a sum of dead and slaughtered animals;"

6653 IF A>0 THEN PRINT"        'natural mortality' is based on naturally dead animals only.":GOTO 6980

6660 PRINT

6661 IF P>0 AND Q>0 AND B>0 THEN GOTO 6681

6662 IF P>0 AND Q>0 AND C>0 THEN GOTO 6682

6663 IF P>0 AND Q>0 AND D>0 THEN GOTO 6683

6664 IF P>0 AND B>0 THEN GOTO 6684

6665 IF P>0 AND C>0 THEN GOTO 6685

6666 IF P>0 AND D>0 THEN GOTO 6686

6667 IF Q>0 AND B>0 THEN GOTO 6687

6668 IF Q>0 AND C>0 THEN GOTO 6688

6669 IF Q>0 AND D>0 THEN GOTO 6689

6670 IF P>0 AND L>0 THEN GOTO 6691

6671 IF P>0 AND E>0 THEN GOTO 6695 ELSE 6980

6675 PRINT

6681 PRINT"   Specific disease total mortality rate to initial total          =  ";USING"#.####";(P+Q)/B:GOTO 6662

6682 PRINT"   Specific disease total mortality rate to existing total         =  ";USING"#.####";(P+Q)/C:GOTO 6663

6683 PRINT"   Specific disease total mortality rate to average total          =  ";USING"#.####";(P+Q)/D:PRINT:GOTO 6664

6684 PRINT"   Specific disease natural mortality rate to initial total        =  ";USING"#.####";P/B:GOTO 6665

6685 PRINT"   Specific disease natural mortality rate to existing total       =  ";USING"#.####";P/C:GOTO 6666

6686 PRINT"   Specific disease natural mortality rate to average total        =  ";USING"#.####";P/D:PRINT:GOTO 6667

6687 PRINT"   Specificaly diseased slaughtered animals rate to initial total  =  ";USING"#.####";Q/B:GOTO 6668

6688 PRINT"   Specificaly diseased slaughtered animals rate to existing total =  ";USING"#.####";Q/C:GOTO 6669

6689 PRINT"   Specificaly diseased slaughtered animals rate to average total  =  ";USING"#.####";Q/D:GOTO 6670

6691 PRINT:PRINT"   Specific disease case fatality rate (lethality)                 =  ";USING"#.####";P/L:GOTO 6671

6695 PRINT"   Specific disease proportional case fatality rate                =  ";USING"#.####";P/E:GOTO 6980

6700 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

6701 PRINT"Place: "LU$;TAB(40)"Period: "TI$:PRINT

6705 PRINT:PRINT TAB(5)"Animal population neonatal mortality rate         =   ";USING"#.####";DNB/LAB:PRINT

6706 PRINT TAB(5)"                                                  = ";USING"###.##";DNB/LAB*100;

6707 PRINT" %":PRINT

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 P=0:L=0:Q=0

6982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6983 IF R$="y" OR R$="n" THEN GOTO 6985 ELSE 6990

6985 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.7-SELECTED INDICATORS OF ANIMAL DISEASE NIDALITY (FOCALITY)"

7010 PRINT"============================================================="

7050 PRINT"INPUT DATA:"

7051 INPUT"     disease(s) ";EN$

7052 INPUT"     species ";SP$

7053 INPUT"     focal measure units (herds, flocks, farms, ranches, etc.) ";FU$

7054 INPUT"     definition of foci ";DF$

7055 INPUT"     type(s)/form(s) of foci (outbreaks) ";TF$

7090 INPUT"     place ";LU$

7091 INPUT"     territorial surface measure units, total number ";TU$,I

7100 PRINT"     Do you want to calculate indicators related to the given moment (m)"

7101 INPUT"                           or indicators related to the given period (p) ";P$

7104 IF P$="m" OR P$="p" THEN GOTO 7114 ELSE PRINT IDE$:GOTO 7980

7114 IF P$="m" THEN GOTO 7115 ELSE 7116

7115 INPUT"     time-moment ";TI$:GOTO 7117

7116 INPUT"     time-period ";TI$:GOTO 7126

7117 IF FU$="herds" THEN GOTO 7122

7119 INPUT"     number of focal measure units existing at the given moment ";C

7120 INPUT"     number of foci existing at the given moment                ";D

7121 INPUT"     number of animals existing in foci at the given moment     ";AN:GOTO 7125

7122 PRINT:INPUT"     number of herds at the given moment                        ";K

7123 INPUT"     number of diseased herds  at the given moment              ";L

7124 INPUT"     number of animals existing in diseased herds               ";HF

7125 IF (C+D+K+L)=0 THEN GOTO 7140 ELSE 7190

7126 PRINT"     number of focal measure units existing"

7127 INPUT"                             at the beginning of the period     ";B

7128 INPUT"     number of foci existing at the beginning of the period     ";BB

7129 INPUT"     number of focal measure units existing in the period       ";E

7130 INPUT"     number of foci existing in the period                      ";F

7131 INPUT"     average number of focal measure units in the period        ";AM

7132 INPUT"     average number of foci in the period                       ";AF

7133 INPUT"     number of new foci in the period                           ";G

7135 INPUT"     number of extinct foci in the period                       ";H

7137 INPUT"     number of animals existing in foci in the period           ";AP

7138 IF (B+BB+E+F+AM+AF+G+H+AP)=0 THEN GOTO 7140 ELSE 7190

7140 PRINT:PRINT IDM$:GOTO 7980

7190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7191 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

7192 IF I$="m" THEN GOTO 10

7193 IF I$="c" THEN GOTO 7000

7194 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT:PRINT TAB(6)"SELECTED INDICATORS OF ANIMAL  DISEASE  NIDALITY  (FOCALITY)":PRINT

7201 PRINT TAB(6)"Disease(s): "EN$

7202 PRINT"Species: "SP$

7203 PRINT TAB(6)"Focal measure units: "FU$

7204 PRINT"Definition of foci: "DF$

7205 PRINT"Type/form of foci: "TF$

7206 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT:PRINT

7207 IF P$="m" THEN GOTO 7208 ELSE 7225

7208 IF D=0 AND C=0 THEN GOTO 7213 ELSE PRINT"    Point prevalence rate of foci                       =      ";USING"#.####";D/C

7209 PRINT"                                                        =    " ;USING"###.####";D/C*100;

7210 PRINT" %":PRINT

7211 IF AN>0 AND D>0 THEN PRINT"    Average number of intrafocal animals" ELSE GOTO 7213

7212 PRINT"                               at the given moment      = ";USING"######.#";AN/D:PRINT:GOTO 7218

7213 IF K>0 AND L>0 THEN PRINT"    Point prevalence rate of diseased herds             = ";USING"     #.####";L/K ELSE GOTO 7216

7214 PRINT"                                                        =    " ;USING"###.####";L/K*100;

7215 PRINT" %":PRINT

7216 IF L>0 AND HF>0 THEN PRINT"    Average number of animals in diseased herds         = ";USING"######.#";HF/L ELSE GOTO 7218

7217 PRINT

7218 IF D>0 AND I>0 THEN PRINT"    Average density of foci per "TU$;"                     =   ";USING"####.######";D/I:PRINT

7219 IF L>0 AND I>0 THEN PRINT"    Average density of diseased herds per "TU$;"           =   ";USING"####.######";L/I:PRINT

7220 IF D>0 AND I>0 THEN PRINT"    Ratio of ";TU$;" per one focus              ";TAB(56)" =   ";USING"####.##";I/D

7221 IF L>0 AND I>0 THEN PRINT"    Ratio of ";TU$;" per one diseased herd     ";TAB(56)" =   ";USING"####.##";I/L

7224 PRINT:GOTO 7980

7225 IF B>0 AND BB>0 THEN GOTO 7320

7230 IF F>0 AND E>0 THEN GOTO 7330

7235 IF AM>0 AND AF>0 THEN GOTO 7335

7240 IF G>0 AND E>0 THEN GOTO 7340

7250 IF H>0 AND E>0 THEN GOTO 7350

7260 IF F>0 AND I>0 THEN GOTO 7360

7286 IF AP>0 AND F>0 THEN GOTO 7386 ELSE 7980

7300 PRINT

7320 PRINT:PRINT"     Initial point prevalence rate of foci          =    ";USING"#.####";BB/B:GOTO 7230

7330 PRINT"     Period prevalence rate of foci                 =    ";USING"#.####";F/E:GOTO 7235

7335 PRINT"     Average prevalence rate of foci                =    ";USING"#.####";AF/AM:GOTO 7240

7340 PRINT:PRINT"     Incidence rate of foci to existing total       =    ";USING"#.####";G/E:GOTO 7250

7350 PRINT"     Extinction rate of foci to existing total      =    ";USING"#.####";H/E:GOTO 7260

7360 PRINT

7361 PRINT"     Average density of foci per "TU$;"                = ";USING"####.####";F/I:GOTO 7286

7386 PRINT:PRINT"     Average number of intrafocal animals in the given period  = ";USING"####.#";AP/F:GOTO 7980

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 C=0:D=0:AN=0:K=0:L=0:HF=0:B=0:BB=0:E=0:F=0:AM=0:AF=0:G=0:H=0:AP=0

7982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7983 IF R$="y" OR R$="n" THEN GOTO 7985 ELSE 7990

7985 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.8-SELECTED INDICATORS OF ANIMAL DISEASE TERRITORIAL DISTRIBUTION"

8010 PRINT"=================================================================="

8020 PRINT"(villages, districts, regions, provinces, counties, zones, countries, etc.)"

8030 PRINT"INPUT DATA:"

8031 INPUT"     disease(s)/form ";FE$

8032 INPUT"     species, category(ies) ";SP$,CA$

8033 INPUT"     place (territory) ";LU$

8040 INPUT"     surface measure units ";SU$

8044 INPUT"     total number of surface measure units of the territory  ";B

8045 IF B=0 THEN PRINT IDM$:GOTO 8980

8110 PRINT"     Do you want to calculate indicators related to the given moment (m)"

8111 INPUT"                           or indicators related to the given period (p) ";P$

8112 IF P$="m" OR P$="p" THEN GOTO 8114 ELSE PRINT IDE$:GOTO 8980

8114 IF P$="m" THEN GOTO 8115 ELSE 8116

8115 INPUT"     time-moment ";TI$:GOTO 8120

8116 INPUT"     time-period ";TI$:GOTO 8140

8120 PRINT:INPUT"     affected area size existing at the given moment         ";D

8121 IF D=0 OR D>B THEN PRINT IDE$:GOTO 8980 ELSE 8122

8122 PRINT:PRINT"     number of animals existing in affected area"

8123 INPUT"                                         at the given moment ";AN:GOTO 8200

8140 PRINT"     number of surface units of affected area"

8150 INPUT"                             at the beginning of the period  ";S

8151 PRINT"     number of surface units"

8152 INPUT"                of affected area existing in the period      ";T

8153 PRINT"     average number of measure units"

8154 INPUT"                         of affected area in the period      ";V

8155 PRINT"     number of surface units"

8156 INPUT"                     of new affected area in the period      ";Y

8157 PRINT"     number of surface units of extinct affected area"

8158 INPUT"                            (become free) in the period      ";W

8160 IF (S+T+V+Y+W)=0 THEN PRINT:PRINT IDM$:GOTO 8980

8200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8201 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

8202 IF I$="m" THEN GOTO 10

8203 IF I$="c" THEN GOTO 8000

8204 IF I$=CHR$(13) THEN GOTO 8205

8205 CLS:PRINT TAB(6)"SELECTED INDICATORS OF ANIMAL  DISEASE  TERRITORIAL  DISTRIBUTION":PRINT

8210 PRINT"Place: "LU$;TAB(50)"Time: "TI$

8215 PRINT TAB(6)"Disease(s): "FE$

8220 PRINT"Species: "SP$;TAB(40)"Category(ies): ";CA$

8221 PRINT TAB(6)"Surface of evaluated territory: "INT(B+.5) SU$

8300 PRINT:PRINT

8307 IF P$="m" THEN GOTO 8308 ELSE 8401

8308 IF B>0 AND D>0 THEN PRINT"    Point prevalence rate of affected area               =      ";USING"#.####";D/B:PRINT

8309 PRINT"                                                         =    " ;USING"###.#### %";D/B*100:PRINT

8320 IF AN>0 AND B>0 THEN PRINT"    Average number of animals in affected area"

8321 IF AN>0 AND B>0 THEN PRINT"                                     per surface unit    =  ";USING"#####.##";AN/D

8322 GOTO 8980

8401 IF B>0 AND S>0 THEN PRINT"     Initial point prevalence rate of affected area     =   ";USING"#.####";S/B;

8402 PRINT

8403 IF B>0 AND T>0 THEN PRINT"     Period prevalence rate of affected area            =   ";USING"#.####";T/B;

8404 IF B>0 AND V>0 THEN PRINT"     Average prevalence rate of affected area           =   ";USING"#.####";V/B;

8405 PRINT

8406 IF B>0 AND Y>0 THEN PRINT:PRINT"     Incidence rate of affected area                    =   ";USING"#.####";Y/B;

8407 PRINT

8408 IF B>0 AND W>0 THEN PRINT:PRINT"     Extinction rate of affected area (recovery rate)   =   ";USING"#.####";W/B;

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8985 ELSE 8990

8985 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"2.9-HUMAN/ANIMAL POPULATIONS AND ZOONOSES"

9001 PRINT"========================================="

9100 PRINT TAB(2)"This subprogramme calculates:"

9102 PRINT TAB(6)"1) human population density and distribution"

9104 PRINT TAB(6)"2) human population categories structure"

9106 PRINT TAB(6)"3) ratios of animal/human populations"

9108 PRINT TAB(6)"4) ratios of animals/humans diseased by zoonoses"

9114 INPUT" Enter choice number: ",S

9115 IF S=1 OR S=2 OR S=3 OR S=4 THEN GOTO 9120 ELSE PRINT IDE$:GOTO 9980

9120 PRINT"INPUT DATA"

9121 INPUT"     place (territory), time ";PL$,TI$

9122 IF (S=1) THEN INPUT"     space measure units (up to 8 characters !) ";SU$

9123 IF (S=3) THEN GOTO 9180

9124 IF (S=2) THEN INPUT"     category according to ";CA$

9125 IF (S=4) THEN INPUT"     zoonotic disease(s) ";DI$

9126 IF (S=4) THEN INPUT"     indicator ";IN$:GOTO 9185

9129 INPUT"     number (up to 11 !) of data ";N

9130 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 9980

9135 PRINT"     List data (names up to 15 characters):"

9140 FOR I=1 TO N

9141 PRINT "    "I;"";

9142 IF (S=1) THEN GOTO 9143 ELSE 9144

9143 INPUT" subterritory, size, persons ";TE$(I),TS(I),AN(I):GOTO 9146

9144 IF (S=2) THEN GOTO 9145

9145 INPUT" category, number of persons ";TE$(I),AN(I)

9146 IF AN(I)=0 THEN PRINT:PRINT IDM$:GOTO 9980 ELSE 9155

9155 NEXT I

9160 SU1=0:SU2=0

9162 FOR I=1 TO N

9164 SU1=SU1+TS(I)

9166 NEXT I

9167 FOR I=1 TO N

9168 SU2=SU2+AN(I)

9169 NEXT I

9170 MAX=AN(1)

9171 FOR I=2 TO N

9172 IF AN(I)>MAX THEN MAX=AN(I)

9173 NEXT I

9179 GOTO 9200

9180 INPUT"     animal species                 ";SP$

9181 INPUT"     number of animals              ";AN

9182 INPUT"     number of persons              ";PE

9183 IF AN=0 OR PE=0 THEN GOTO 9195 ELSE GOTO 9200

9185 INPUT"     animal species                 ";SP$

9186 INPUT"     number of animals              ";AN

9187 'INPUT"     number of healthy animals      ";HA

9188 INPUT"     number of diseased animals     ";DA:PRINT

9189 IF DA=0 THEN GOTO 9195 ELSE 9190

9190 INPUT"     number of persons              ";PE

9191 'INPUT"     number of healthy persons      ";HP

9192 INPUT"     number of diseased persons     ";DP

9193 IF DP=0 THEN GOTO 9195 ELSE 9200

9195 PRINT IDM$:GOTO 9980

9200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9201 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

9202 IF I$="m" THEN GOTO 10

9203 IF I$="c" THEN GOTO 9000

9204 IF I$=CHR$(13) THEN GOTO 9205

9205 CLS:PRINT

9206 IF S=1 THEN PRINT TAB(3)"H U M A N    P O P U L A T I O N  - TERRITORIAL  DENSITY  AND  DISTRIBUTION"

9207 IF S=2 THEN PRINT TAB(5)"H U M A N   P O P U L A T I O N   C A T E G O R Y   S T R U C T U R E"

9208 IF S=3 OR S=4 THEN PRINT"RESULT:":PRINT

9210 PRINT

9211 IF (S=4) THEN PRINT"Disease(s): ";DI$

9212 PRINT"Place: "PL$;TAB(50)"Time: ";TI$

9213 IF (S=2) THEN PRINT"Category according to: "CA$

9215 IF (S=3) THEN GOTO 9450

9216 IF (S=4) THEN GOTO 9500

9250 PRINT

9302 IF S=2 THEN GOTO 9310

9304 PRINT:PRINT TAB(2)"Subterritory";TAB(19)USING"\        \";SU$;

9305 PRINT TAB(31)"Number of";TAB(45)"Average";TAB(55)"Proportion";TAB(66)"Percentage"

9306 PRINT TAB(31)"Inhabitants";TAB(45)"Number":PRINT:GOTO 9354

9310 PRINT:PRINT TAB(3)"Category";TAB(31)"Number of";TAB(45)"Proportion";TAB(60)"Percentage"

9312 PRINT TAB(31)"Inhabitants":PRINT

9354 IF (S=1) THEN GOTO 9355 ELSE 9365

9355 FOR I=1 TO N

9356 PRINT TAB(2)USING"\             \";TE$(I);

9357 PRINT TAB(18)INT(TS(I)+.5);TAB(30)INT(AN(I)+.5);TAB(43)USING"######.##";AN(I)/TS(I);TAB(56)USING"#.######";AN(I)/SU2;

9358 PRINT TAB(66)USING"###.####";(AN(I)/SU2)*100

9359 NEXT I

9360 PRINT:PRINT TAB(2)"T o t a l";TAB(18)INT(SU1+.5);TAB(30)INT(SU2+.5);TAB(43)USING"######.##";SU2/SU1;

9361 PRINT TAB(56)"1.000000";TAB(66)"100.0000"

9363 GOTO 9380

9365 FOR I=1 TO N

9366 PRINT TAB(2)USING"\             \";TE$(I);

9367 PRINT TAB(31)INT(AN(I)+.5);TAB(46)USING"#.######";AN(I)/SU2;

9368 PRINT TAB(60)USING"###.####";(AN(I)/SU2)*100

9369 NEXT I

9370 PRINT

9372 PRINT TAB(2)"T o t a l";TAB(31)INT(SU2+.5);

9373 PRINT TAB(46)"1.000000";TAB(60)"100.0000"

9380 IF (S=1) OR (S=2) THEN GOTO 9400 ELSE 9980

9400 A$=INKEY$:IF A$="" THEN GOTO 9400

9401 IF N=1 THEN GOTO 9981

9410 CLS:PRINT

9411 IF S=1 THEN PRINT TAB(10)"H U M A N   P O P U L A T I O N - TERRITORIAL DISTRIBUTION"

9412 IF S=2 THEN PRINT TAB(4)"H U M A N   P O P U L A T I O N   C A T E G O R Y   S T R U C T U R E"

9413 IF MAX<(SU1/2) OR MAX<(SU2/2) THEN GOTO 9414 ELSE 9430

9414 IF S=1 THEN PRINT:PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(SU2+.5);" inhabitants)":PRINT:GOTO 9416

9415 IF S=2 THEN PRINT:PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(SU2+.5);" inhabitants)":GOTO 9417

9416 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         10        20        30        40        50 %":GOTO 9418

9417 PRINT:PRINT TAB(2)"Category";TAB(20)"0         10        20        30        40        50 %"

9418 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------|"

9419 FOR I=1 TO N

9420 Z=(AN(I)/SU2)*100

9421 IF Z<1 THEN GOTO 9422 ELSE 9425

9422 IF Z>0 THEN GOTO 9423 ELSE 9425

9423 PRINT TAB(2)USING"\             \";TE$(I);

9424 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 9429

9425 PRINT TAB(2)USING"\             \";TE$(I);

9426 PRINT TAB(20)CHR$(179);

9427 FOR K=1 TO (AN(I)/SU2)*100:PRINT CHR$(223);

9428 NEXT K:PRINT

9429 NEXT I:GOTO 9980

9430 IF S=1 THEN PRINT:PRINT TAB(14)"(";CHR$(223);" represents 2 % of total "INT(SU2+.5);" inhabitants)":PRINT:GOTO 9432

9431 IF S=2 THEN PRINT:PRINT TAB(14)"(";CHR$(223);" represents 2 % of total "INT(SU2+.5);" inhabitants)":GOTO 9433

9432 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         20        40        60        80       100 %":GOTO 9434

9433 PRINT:PRINT TAB(2)"Category";TAB(20)"0         20        40        60        80       100 %"

9434 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------|"

9435 FOR I=1 TO N

9436 Z=(AN(I)/SU2)*50

9437 IF Z<1 THEN GOTO 9438 ELSE 9441

9438 IF Z>0 THEN GOTO 9439 ELSE 9441

9439 PRINT TAB(2)USING"\             \";TE$(I);

9440 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 9449

9441 PRINT TAB(2)USING"\             \";TE$(I);

9442 PRINT TAB(20)CHR$(179);

9443 FOR K=1 TO (AN(I)/SU2)*50

9444 PRINT CHR$(223);

9445 NEXT K

9446 PRINT

9447 NEXT I:MAX=0

9449 PRINT:GOTO 9980

9450 PRINT:PRINT"Number of persons: "INT(PE+.5);TAB(40)"Number of "SP$;": "INT(AN+.5)

9451 PRINT:PRINT

9452 PRINT:PRINT"     Ratio of animals per one person           = "USING"####.######";AN/PE;

9453 PRINT"  :   1":PRINT

9454 PRINT"     Ratio of persons per one animal           = "USING"####.######";PE/AN;

9455 PRINT"  :   1":PRINT:PRINT:PRINT

9499 GOTO 9980

9500 PRINT"Animal species: "SP$;TAB(40)"Indicator: "IN$:PRINT:PRINT

9501 IF DA>0 AND PE>0 THEN PRINT"     Ratio of diseased animals per one person            =  "USING"###.####";DA/PE;ELSE GOTO 9503

9502 PRINT"  :   1":PRINT

9503 IF DA>0 AND DP>0 THEN PRINT"     Ratio of diseased animals per one diseased person   ="USING"#####.####";DA/DP;ELSE GOTO 9507

9504 PRINT"  :   1":PRINT

9507 IF DP>0 AND AN>0 THEN PRINT"     Ratio of diseased persons per one animal            =  "USING"###.####";DP/AN;ELSE GOTO 9509

9508 PRINT"  :   1":PRINT

9509 IF DP>0 AND DA>0 THEN PRINT"     Ratio of diseased persons per one diseased animal   =  "USING"###.####";DP/DA;ELSE GOTO 9980

9510 PRINT"  :   1":PRINT

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:MAX=0:TE$="":TS=0:AN=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9985 ELSE 9990

9985 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

10010 IF Z$="y" THEN GOTO 10020 ELSE 10030

10020 CHAIN"EPIZ40MM.KOU"

10025 CLS:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

10030 SYSTEM

 

 

         3-Selected indicators of animal population health structures

 

5  ON ERROR GOTO 14025

6  IDM$="Input data missing !"

7  IDE$="Input data error !"

8  DS$="Data source:"

10 PRINT"EPIZ4003.KOU":REM:7/9/2002

12 REM: 9,11,12 - missing INT ?

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(9)"3-SELECTED INDICATORS OF ANIMAL POPULATION HEALTH STRUCTURES "

40 PRINT TAB(9)"============================================================"

90 PRINT

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(9)"1-Animal population epizootiological structure"

520 PRINT TAB(9)"2-Animal population disease territorial structure"

530 PRINT TAB(9)"3-Animal population diseases foci (outbreaks) types' structure"

540 PRINT TAB(9)"4-Territory epizootiological structure"

550 PRINT TAB(9)"5-Morbidity, mortality and nidality structure by causes/forms"

560 PRINT TAB(9)"6-Disease occurrence according to animal species and categories"

570 PRINT TAB(9)"7-Disease occurrence according to breeding/production conditions"

580 PRINT TAB(9)"8-Disease occurrence according to ecological conditions"

585 PRINT TAB(9)"9-Tables of animal disease occurrence acc. to dif. criteria"

590 PRINT TAB(9)"10-Tables of animal population, farms and territory epi. structure"

600 PRINT TAB(9)"11-Tables of disease foci and intrafocal structure"

602 PRINT TAB(9)"12-Proportions of disease different forms/symptoms findings"

603 PRINT TAB(9)"13-Proportions of specific etiological agents/antibodies findings"

609 PRINT

610 PRINT TAB(9)"14-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 14000

660 IF Z$="y" THEN GOTO 20 ELSE GOTO 14000

690 INPUT"        Enter choice number : ",M

695 IF M=1 OR M=2 OR M=3 OR M=4 OR M=5 OR M=6 OR M=7 OR M=8 OR M=9 OR M=10 OR M=11 OR M=12 OR M=13 OR M=14 THEN GOTO 700 ELSE 650

700 ON M GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.1-ANIMAL POPULATION EPIZOOTIOLOGICAL STRUCTURE "

1010 PRINT"================================================"

1100 PRINT"INPUT DATA:"

1110 INPUT"     disease(s) ";EN$

1112 INPUT"     place, time ";LU$,TI$

1115 INPUT"     species, category(ies) ";SP$,CA$:PRINT

1119 INPUT"     total number of animals of a given population            ";A

1120 IF A=0 THEN GOTO 1121 ELSE 1122

1121 PRINT IDM$:GOTO 1980

1122 PRINT:INPUT"     number of epizootiologically  h e a l t h y  animals     ";B

1126 INPUT"     number of exposed epizootiologically healthy animals     ";F

1127 INPUT"     number of directly exposed epiz. healthy animals         ";H:PRINT

1128 PRINT"     number of animals epizootiologically"

1129 INPUT"          i n d e t e r m i n a t e  with clinical symptoms   ";J:PRINT

1130 PRINT"     number of epizootiologically  a f f e c t e d "

1131 INPUT"                                ( d i s e a s e d )   animals ";D

1132 PRINT"     number of animals epizootiologically affected "

1133 INPUT"                          (diseased) with clinical symptoms   ";L

1134 IF B=0 THEN B=(F+H):IF D=0 THEN D=L

1140 IF (B+J+D)>A THEN GOTO 1145 ELSE 1147

1145 PRINT:PRINT"Error ! Sum of parts cannot be major than total !":GOTO 1980

1147 IF (B+J+D+L+F+H)=0 THEN GOTO 1121 ELSE 1190

1190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1192 IF I$="m" THEN GOTO 10

1193 IF I$="c" THEN GOTO 1000

1194 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT TAB(3)"ANIMAL POPULATION   E P I Z O O T I O L O G I C A L   S T R U C T U R E ":PRINT

1202 PRINT TAB(6)"Disease(s): "EN$

1203 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

1204 PRINT"Place: "LU$;TAB(50)"Time: "TI$

1205 PRINT

1212 PRINT TAB(53)"Number";TAB(64)"Proportion":PRINT

1215 IF B>0 THEN GOTO 1350

1240 IF F>0 AND (B-F)>0 THEN GOTO 1390

1250 IF F>0 THEN GOTO 1400

1260 IF H>0 AND (F-H)>0 THEN GOTO 1410

1270 IF H>0 THEN GOTO 1420

1280 IF (A-B-D)>0 THEN GOTO 1425

1285 IF J>0 AND (A-B-D-J)>0 THEN GOTO 1430

1290 IF J>0 THEN GOTO 1440

1293 IF D>0 THEN GOTO 1445

1294 IF L=0 THEN GOTO 1461 ELSE 1295

1295 IF L>0 AND (D-L)>0 THEN GOTO 1450

1296 IF L>0 THEN GOTO 1460 ELSE GOTO 1980

1350 PRINT TAB(3)"Epizootiologically healthy animals";TAB(52)INT(B);TAB(64)USING"#.####";B/A:GOTO 1240

1390 PRINT TAB(5)"Non-exposed epi.healthy animals";TAB(54)INT((B-F));TAB(66)USING"#.####";(B-F)/A:GOTO 1250

1400 PRINT TAB(5)"Exposed epi.healthy animals";TAB(54)INT(F);TAB(66)USING"#.####";F/A:GOTO 1260

1410 PRINT TAB(7)"Indirectly exposed healthy animals";TAB(56)INT((F-H));TAB(68)USING"#.####";(F-H)/A:GOTO 1270

1420 PRINT TAB(7)"Directly exposed healthy animals";TAB(56)INT(H);TAB(68)USING"#.####";H/A:GOTO 1280

1425 PRINT:PRINT TAB(3)"Epizootiologically indeterminate animals";TAB(52)INT((A-B-D));TAB(64)USING"#.####";(A-B-D)/A:GOTO 1285

1430 PRINT TAB(5)"Epiz.indeterminate anim. without symptoms";TAB(54)INT((A-B-D-J));TAB(66)USING"#.####";(A-B-D-J)/A:GOTO 1290

1440 PRINT TAB(5)"Epiz.indeterminate animals with symptoms";TAB(54)INT(J);TAB(66)USING"#.####";J/A:GOTO 1293

1445 PRINT:PRINT TAB(3)"Epizootiologically affected (diseased) animals";TAB(52)INT(D);TAB(64)USING"#.####";D/A:GOTO 1294

1450 PRINT TAB(5)"Epiz.affected animals without symptoms";TAB(54)INT((D-L));TAB(66)USING"#.####";(D-L)/A:GOTO 1296

1460 PRINT TAB(5)"Epiz.affected animals with symptoms";TAB(54)INT(L);TAB(66)USING"#.####";L/A

1461 PRINT

1470 PRINT TAB(20)"T o t a l";TAB(52)INT(A);TAB(64)"1.0000"

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.2-ANIMAL POPULATION DISEASE TERRITORIAL STRUCTURE"

2010 PRINT"==================================================="

2100 PRINT TAB(2)"This subprogramme calculates:"

2108 PRINT TAB(5)"1) diseased animals' territorial density and distribution"

2110 PRINT TAB(5)"2) farms - diseased animals' average number and territorial distribution"

2112 PRINT TAB(5)"3) diseased animals' simple territorial distribution"

2114 INPUT" Enter choice number :  ",S

2115 IF S=1 OR S=2 OR S=3 THEN GOTO 2120 ELSE PRINT IDE$:GOTO 2980

2120 PRINT"INPUT DATA: "

2121 INPUT"     place (territory), time ";PL$,TI$

2122 INPUT"     species, category(ies) ";SP$,CA$

2123 IF S=1 OR S=2 OR S=3 THEN INPUT"     disease(s) ";DI$

2124 IF S=1 THEN INPUT"     space measure units (up to 9 characters !) ";SU$

2125 INPUT"     number (up to 11 !) of data on space and animals ";N

2126 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 2980

2135 PRINT"  List data (names up to 15 characters; all numeric data must be >0):"

2140 FOR I=1 TO N

2141 PRINT I;

2144 IF S=1 THEN GOTO 2145 ELSE 2150

2145 INPUT"subterritory, size, diseased animals ";TE$(I),TS(I),AN(I):GOTO 2165

2150 IF S=2 THEN GOTO 2151 ELSE 2160

2151 INPUT"subter., farms, diseased animals ";TE$(I),TS(I),AN(I):GOTO 2165

2160 IF S=3 THEN GOTO 2161 ELSE 2165

2161 INPUT"subterritory, diseased animals ";TE$(I),AN(I)

2165 IF AN(I)=0 THEN PRINT IDM$:GOTO 2980 ELSE 2166

2166 NEXT I

2170 SU1=0:SU2=0

2171 FOR I=1 TO N

2172 SU1=SU1+TS(I)

2173 NEXT I

2174 FOR I=1 TO N

2175 SU2=SU2+AN(I)

2176 NEXT I

2179 MAX=AN(1)

2180 FOR I=2 TO N

2184 IF AN(I)>MAX THEN MAX=AN(I)

2186 NEXT I

2190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2192 IF I$="m" THEN GOTO 10

2193 IF I$="c" THEN GOTO 2000

2194 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS

2202 IF S=1 THEN PRINT TAB(5)"D I S E A S E D   ANIMALS'  TERRITORIAL  DENSITY  AND  DISTRIBUTION"

2203 IF S=2 THEN PRINT TAB(5)"F A R M S:  DISEASED  ANIMALS' AVERAGE  AND TERRITORIAL DISTRIBUTION"

2204 IF S=3 THEN PRINT TAB(5)"D I S E A S E D   ANIMALS'   TERRITORIAL   D I S T R I B U T I O N"

2211 PRINT:PRINT TAB(6)"Disease(s): ";DI$

2212 PRINT"Species: "SP$;TAB(40)"Category(ies): ";CA$

2213 PRINT"Place: "PL$;TAB(50)"Time: ";TI$:PRINT

2250 PRINT

2310 IF S=1 THEN GOTO 2311 ELSE 2320

2311 PRINT TAB(2)"Subterritory";TAB(19)USING"\       \";SU$;

2312 PRINT TAB(30)"Diseased";TAB(47)"Average";TAB(57)"Proportion";TAB(68)"Percentage":GOTO 2333

2320 IF S=2 THEN GOTO 2330 ELSE 2340

2330 PRINT TAB(2)"Subterritory";TAB(19)"Farms";

2332 PRINT TAB(30)"Diseased";TAB(47)"Average";TAB(57)"Proportion";TAB(68)"Percentage"

2333 PRINT TAB(30)"Animals";TAB(47)"Number";TAB(57)"of Total";TAB(68)"of Total":PRINT:GOTO 2353

2340 IF S=3 THEN PRINT TAB(2)"Subterritory";TAB(30)"Diseased";TAB(50)"Proportion";TAB(68)"Percentage"

2342 IF S=3 THEN PRINT TAB(30)"Animals";TAB(50)"of Total";TAB(68)"of Total":PRINT

2353 IF S=2 THEN GOTO 2354 ELSE 2360

2354 FOR I=1 TO N

2355 PRINT TAB(2)USING"\             \";TE$(I);

2356 PRINT TAB(18)INT(TS(I));TAB(29)INT(AN(I));TAB(44)USING"######.##";AN(I)/TS(I);TAB(57)USING"#.######";TS(I)/SU1;

2357 PRINT TAB(68)USING"##.####";(TS(I)/SU1)*100

2358 NEXT I

2359 GOTO 2380

2360 IF S=1 THEN GOTO 2361 ELSE 2370

2361 FOR I=1 TO N

2363 PRINT TAB(2)USING"\             \";TE$(I);

2364 PRINT TAB(18)INT(TS(I));TAB(29)INT(AN(I));TAB(44)USING"######.##";AN(I)/TS(I);TAB(57)USING"#.######";AN(I)/SU2;

2366 PRINT TAB(68)USING"##.####";(AN(I)/SU2)*100

2369 NEXT I:GOTO 2380

2370 FOR I=1 TO N

2371 PRINT TAB(2)USING"\             \";TE$(I);

2372 PRINT TAB(29)INT(AN(I));TAB(45)USING"######.######";AN(I)/SU2;

2373 PRINT TAB(68)USING"##.####";(AN(I)/SU2)*100

2374 NEXT I:PRINT

2375 PRINT TAB(2)"T o t a l";TAB(29)INT(SU2);TAB(50)"1.000000";TAB(67)"100.0000"

2376 GOTO 2390

2380 PRINT

2382 PRINT TAB(2)"T o t a l";TAB(18)INT(SU1);TAB(29)INT(SU2);TAB(44)USING"######.##";SU2/SU1;

2383 PRINT TAB(57)"1.000000";TAB(67)"100.0000"

2390 IF N=1 THEN GOTO 2980

2391 IF S=1 OR S=3 THEN GOTO 2405 ELSE 2980

2405 A$=INKEY$:IF A$="" THEN GOTO 2405

2406 IF N=1 THEN GOTO 2981

2410 CLS

2412 IF S=1 OR S=3 THEN PRINT TAB(4)"S P A C E    STRUCTURE   OF   D I S E A S E D   ANIMALS  DISTRIBUTION"

2413 IF MAX<(SU2/2) THEN GOTO 2415 ELSE 2451

2415 IF S=1 OR S=3 THEN PRINT:PRINT TAB(12)"(";CHR$(223);" represents 1 % of total "INT(SU2);" diseased animals)":PRINT

2416 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         10        20        30        40        50 %"

2417 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

2420 FOR I=1 TO N

2421 Z=(AN(I)/SU2)*100

2422 IF Z<1 THEN GOTO 2423 ELSE 2426

2423 IF Z>0 THEN GOTO 2424 ELSE 2426

2424 PRINT TAB(2)USING"\             \";TE$(I);

2425 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 2440

2426 PRINT TAB(2)USING"\             \";TE$(I);

2427 PRINT TAB(20)CHR$(179);

2428 FOR K=1 TO (AN(I)/SU2)*100

2429 PRINT CHR$(223);

2430 NEXT K

2431 PRINT

2440 NEXT I

2445 PRINT:GOTO 2980

2451 IF S=1 OR S=3 THEN PRINT:PRINT TAB(12)"(";CHR$(223);" represents 2 % of total "INT(SU2);" diseased animals)":PRINT

2452 PRINT:PRINT TAB(2)"Subterritory";TAB(20)"0         20        40        60        80       100 %"

2453 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

2454 FOR I=1 TO N

2460 Z=(AN(I)/SU2)*50

2461 IF Z<1 THEN GOTO 2462 ELSE 2470

2462 IF Z>0 THEN GOTO 2463 ELSE 2470

2463 PRINT TAB(2)USING"\             \";TE$(I);

2464 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 2480

2470 PRINT TAB(2)USING"\             \";TE$(I);

2471 PRINT TAB(20)CHR$(179);

2473 FOR K=1 TO (AN(I)/SU2)*50

2474 PRINT CHR$(223);

2475 NEXT K

2479 PRINT

2480 NEXT I

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:MAX=0:TE$="":TS=0:AN=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2985 ELSE 2990

2985 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.3-ANIMAL DISEASE FOCI (OUTBREAKS) TYPES' STRUCTURE"

3010 PRINT"===================================================="

3100 PRINT"INPUT DATA:"

3104 INPUT"     disease(s) ";EN$

3105 INPUT"     species ";SP$

3106 INPUT"     type(s)/form(s) of foci (outbreaks) ";TF$

3107 PRINT"     focal measure units (animal housings, "

3108 INPUT"        herds/flocks areas, farms, ranches, villages, etc.) ";FU$

3109 INPUT"     place ";LU$

3110 INPUT"     time-moment ";TI$:PRINT:GOTO 3140

3120 PRINT IDM$:GOTO 3980

3140 INPUT"     total number of foci existing at the given moment           ";TF:PRINT

3141 IF TF=0 THEN GOTO 3120 ELSE 3151

3151 PRINT"     number of foci with affected (clinically + subclinically)"

3152 INPUT"                                     animals at the given moment ";FA

3153 PRINT"     number of foci with subclinically only affected animals"

3154 INPUT"                                             at the given moment ";CA

3155 PRINT"     number of foci without susceptible animals (depopulated)"

3156 INPUT"                                             at the given moment ";FW

3157 IF (FA+CA+FW)=0 THEN GOTO 3120 ELSE 3165

3165 FAA=(FA+FW):IF FA=0 AND CA>0 THEN FA=CA

3166 IF FAA>TF OR CA>FA THEN GOTO 3167 ELSE 3180

3167 PRINT:PRINT"Error ! Sum of parts cannot be major than total !":GOTO 3980

3180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3182 IF I$="m" THEN GOTO 10

3183 IF I$="c" THEN GOTO 3000

3184 IF I$=CHR$(13) THEN GOTO 3200

3200 CLS:PRINT TAB(10)"F O C I  (O U T B R E A K S)  T Y P E S'   S T R U C T U R E":PRINT

3201 PRINT TAB(6)"Disease(s): "EN$

3202 PRINT"Species: "SP$

3203 PRINT"Place: "LU$;TAB(50)"Time: "TI$

3204 PRINT"Type/form of foci (outbreaks): "TF$

3205 PRINT TAB(6)"Focal measure units: "FU$:PRINT:PRINT

3410 PRINT TAB(7)"Characteristics";TAB(37)"Number";TAB(47)"Proportion";TAB(62)"Percentage":PRINT:PRINT

3411 PRINT TAB(7)"With affected animals";TAB(37)INT(FA);TAB(47);USING"#.####";FA/TF;TAB(62);USING"##.####";FA/TF*100

3412 PRINT TAB(12)"clinically";TAB(40)INT((FA-CA));TAB(50);USING"#.####";(FA-CA)/TF;TAB(65);USING"##.####";(FA-CA)/TF*100

3413 PRINT TAB(12)"subclinically only";TAB(40)INT(CA);TAB(50);USING"#.####";CA/TF;TAB(65);USING"##.####";CA/TF*100

3414 PRINT:PRINT TAB(7)"With non-affected animals"

3415 PRINT TAB(17)"(in observation)";TAB(37)INT(TF-(FA+FW));TAB(47);USING"#.####";(TF-(FA+FW))/TF;TAB(62);USING"##.####";(TF-(FA+FW))/TF*100

3416 PRINT:PRINT TAB(7)"Without susceptible animals"

3417 PRINT TAB(17)"(depopulated)";TAB(37)INT(FW);TAB(47);USING"#.####";FW/TF;TAB(62);USING"##.####";FW/TF*100

3418 PRINT

3419 PRINT TAB(6)" T o t a l";TAB(37)INT(TF);TAB(47)"1.0000";TAB(61)"100.0000"

3420 'IF FW/TF>0 AND FW/TF<2 THEN GOTO 3980

3450 A$=INKEY$:IF A$="" THEN GOTO 3450

3455 CLS:PRINT:PRINT TAB(10)"F O C I  (O U T B R E A K S)  T Y P E S'   S T R U C T U R E"

3457 PRINT:PRINT TAB(17)"(";CHR$(223);" represents 2 % of total "INT(TF);" foci)":PRINT

3458 PRINT TAB(24)"0         20        40        60        80       100 %"

3459 PRINT TAB(24)CHR$(179);"---------|---------|---------|---------|---------I":PRINT TAB(24)CHR$(179)

3460 PRINT"With affected animals";TAB(24);CHR$(179);

3462 FOR K=1 TO ((FA/TF)*100)/2:PRINT CHR$(223);

3463 NEXT K

3464 PRINT:PRINT TAB(24)CHR$(179)

3465 PRINT TAB(4)"clinically";TAB(24);CHR$(179);

3466 FOR K=1 TO ((CA/TF)*100)/2:PRINT CHR$(223);

3467 NEXT K

3468 PRINT:PRINT TAB(24)CHR$(179)

3469 PRINT TAB(4)"subclinically only";TAB(24);CHR$(179);

3470 FOR K=1 TO (((FA-CA)/TF)*100)/2:PRINT CHR$(223);:NEXT K:PRINT

3471 PRINT TAB(24)CHR$(179)

3472 PRINT"In observation";TAB(24);CHR$(179);

3473 FOR K=1 TO ((TF-(FA-FW))/TF)*100/2:PRINT CHR$(223);:NEXT K:PRINT

3474 PRINT TAB(24)CHR$(179)

3475 PRINT"Depopulated";TAB(24);CHR$(179);

3479 FOR K=1 TO ((FW/TF)*100)/2:PRINT CHR$(223);:NEXT K:PRINT

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.4-TERRITORY EPIZOOTIOLOGICAL STRUCTURE"

4010 PRINT"========================================"

4020 PRINT" (villages, districts, regions, provinces, counties, countries, zones, etc.)"

4100 PRINT"INPUT DATA:"

4111 INPUT"     territory ";LU$

4112 INPUT"     time-moment ";TI$

4113 INPUT"     disease(s) ";FE$

4114 INPUT"     species, category(ies) ";SP$,CA$

4115 INPUT"     surface measure units (up to 6 characters !) ";SU$:PRINT:GOTO 4119

4118 PRINT IDM$:GOTO 4980

4119 INPUT"     total number of surface measure units of the territory  ";B

4120 IF B=0 THEN GOTO 4118 ELSE 4121

4121 PRINT:PRINT"     total number of specifically diseased animals"

4122 INPUT"                                           in the territory  ";A

4123 PRINT

4130 PRINT"     number of surface measure units"

4131 INPUT"                          of specific disease(s) free zones  ";L

4132 PRINT"     number of surface measure units of exposed "

4133 INPUT"                specific disease(s) free zones (at risk)     ";M

4135 PRINT"     number of surface measure units of zones affected"

4136 INPUT"                                     by specific disease(s)  ";O

4137 IF L=0 AND M>0 THEN L=M

4138 IF (L+O)>B THEN GOTO 4140 ELSE 4190

4140 PRINT:PRINT"Error ! Sum of parts cannot be major than total !":GOTO 4980

4190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4192 IF I$="m" THEN GOTO 10

4193 IF I$="c" THEN GOTO 4000

4194 IF I$=CHR$(13) THEN GOTO 4200

4200 CLS:PRINT TAB(5)"T E R R I T O R Y   E P I Z O O T I O L O G I C A L   S T R U C T U R E":PRINT

4210 PRINT"Territory: "LU$;TAB(50)"Time: "TI$

4215 PRINT TAB(10)"Disease(s): "FE$

4220 PRINT"Species: "SP$;TAB(40)"Category(ies): ";CA$

4221 PRINT"Surface of evaluated territory: "B  SU$:PRINT

4240 PRINT"   Average density of specifically diseased animals"

4241 PRINT"                                              per one "SU$;

4242 PRINT" =";USING"#####.##";A/B:PRINT

4260 PRINT:PRINT  TAB(44)USING"\     \";SU$;

4261 PRINT TAB(53)"Proportion";TAB(67)"%":PRINT

4272 PRINT TAB(3)"Disease(s) free zones";TAB(43)L;TAB(55)USING"#.####";L/B;TAB(65)USING"##.##";L/B*100

4274 PRINT TAB(6)"Non-exposed free zones (out of risk)";TAB(45)L-M;TAB(57)USING"#.####";(L-M)/B;TAB(67)USING"##.##";((L-M)/B)*100

4276 PRINT TAB(6)"Exposed free zones (at risk)";TAB(45)M;TAB(57)USING"#.####";M/B;TAB(67)USING"##.##";M/B*100

4277 Q=(B-L-O)/B

4278 PRINT:PRINT TAB(3)"Indeterminate zone";TAB(43)(B-L-O);TAB(55)USING"#.####";(B-L-O)/B;TAB(65)USING"##.##";Q*100

4280 PRINT:PRINT TAB(3)"Affected zones";TAB(43)O;TAB(55)USING"#.####";O/B;TAB(65)USING"##.##";O/B*100

4281 PRINT:PRINT TAB(13)"T o t a l";TAB(43)B;TAB(55)"1.0000";TAB(64)"100.00"

4290 PRINT

4300 A$=INKEY$:IF A$="" THEN GOTO 4300

4310 CLS:PRINT TAB(5)"T E R R I T O R Y   E P I Z O O T I O L O G I C A L   S T R U C T U R E":PRINT

4311 PRINT TAB(17)"(";CHR$(223);" represents 2 % of total "B SU$;" )":PRINT

4315 PRINT TAB(24)"0         20        40        60        80       100 %"

4316 PRINT TAB(24)CHR$(179)"---------|---------|---------|---------|---------I":PRINT TAB(24)CHR$(179)

4320 PRINT TAB(3)"Disease free zones";TAB(24);CHR$(179);

4321 FOR K=1 TO (L/B*100)/2:PRINT CHR$(223);

4323 NEXT K

4324 PRINT:PRINT TAB(24)CHR$(179)

4325 PRINT TAB(7)"Non-exposed";TAB(24);CHR$(179);

4326 FOR K=1 TO (((L-M)/B)*100)/2:PRINT CHR$(223);

4327 NEXT K

4328 PRINT:PRINT TAB(24)CHR$(179)

4329 PRINT TAB(7)"Exposed";TAB(24);CHR$(179);

4330 FOR K=1 TO ((M/B)*100)/2:PRINT CHR$(223);:NEXT K:PRINT

4331 PRINT TAB(24)CHR$(179)

4335 PRINT TAB(3)"Indeterminate zones";TAB(24)CHR$(179);

4337 FOR K=1 TO ((B-L-O)/B*100)/2:PRINT CHR$(223);:NEXT K:PRINT

4338 PRINT TAB(24)CHR$(179)

4340 PRINT TAB(3)"Affected zones";TAB(24)CHR$(179);

4342 FOR K=1 TO (O/B*100)/2:PRINT CHR$(223);:NEXT K:PRINT

4344 PRINT:GOTO 4980

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.5-MORBIDITY, MORTALITY, NIDALITY AND TERRITORY STRUCTURE "

5001 PRINT"    ACCORDING TO DIFFERENT CAUSES/FORMS"

5010 PRINT"=========================================================="

5030 PRINT"Do you want to evaluate the structure of: morbidity (d)"

5031 INPUT"or mortality (m) or nidality/focality (f) or affected territory (t) ";Z$

5040 IF Z$="d" OR Z$="m" OR Z$="f" OR Z$="t" THEN GOTO 5100 ELSE PRINT IDE$:GOTO 5980

5100 PRINT"INPUT DATA:"

5125 IF Z$="d" THEN INPUT"     type/form of morbidity ";TM$:GOTO 5130

5126 IF Z$="m" THEN INPUT"     type/form of mortality ";TY$:GOTO 5130

5127 IF Z$="f" THEN INPUT"     type/form of nidality ";TF$:GOTO 5130

5128 IF Z$="t" THEN INPUT"     type/form of affected territory ";TT$

5130 IF Z$<>"t" THEN INPUT"     species, category(ies) ";SP$,CA$

5132 INPUT"     place, time ";PL$,TI$

5133 IF Z$="t" THEN INPUT"     space measure units (up to 10 characters !) ";TMU$

5134 INPUT"     number of evaluated causes/forms (2 up to 11 !) ";N

5135 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 5980

5145 PRINT"List data (names of causes/forms up to 20 characters): "

5150 FOR I=1 TO N

5160 PRINT TAB(5)I;

5161 IF Z$="t" THEN GOTO 5162 ELSE 5170

5162 INPUT" cause/form, number of space units  ";S$(I),U(I):GOTO 5180

5170 INPUT" cause/form, number of cases  ";S$(I),U(I)

5175 IF S$(I)="" THEN PRINT:PRINT IDM$:GOTO 5980 ELSE 5180

5180 NEXT I

5181 SU=0

5182 FOR I=1 TO N

5183 SU=SU+U(I)

5184 NEXT I

5185 MAX=U(1)

5186 FOR I=2 TO N

5187 IF U(I)>MAX THEN MAX=U(I)

5188 NEXT I

5189 IF SU=0 THEN PRINT IDM$:GOTO 5980 ELSE 5190

5190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5192 IF I$="m" THEN GOTO 10

5193 IF I$="c" THEN GOTO 5000

5194 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS

5201 IF Z$="d" THEN PRINT TAB(5)"M O R B I D I T Y   S T R U C T U R E   ACCORDING  TO  CAUSES / FORMS"

5202 IF Z$="m" THEN PRINT TAB(5)"M O R T A L I T Y   S T R U C T U R E   ACCORDING  TO  CAUSES / FORMS"

5203 IF Z$="f" THEN PRINT TAB(3)"D I S E A S E   N I D A L I T Y  STRUCTURE  ACCORDING  TO  CAUSES / FORMS"

5204 IF Z$="t" THEN PRINT TAB(3)"A F F E C T E D   T E R R I T O R Y  STRUCTURE ACCORDING TO CAUSES / FORMS"

5205 PRINT

5215 IF Z$="d" THEN PRINT TAB(5)"Type/form of morbidity: ";TM$:GOTO 5221

5216 IF Z$="m" THEN PRINT TAB(5)"Type/form of mortality: ";TY$:GOTO 5221

5217 IF Z$="f" THEN PRINT TAB(5)"Type/form of nidality: ";TF$:GOTO 5221

5218 IF Z$="t" THEN PRINT TAB(5)"Type/form of affected territory: ";TT$

5221 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

5222 PRINT"Place: "PL$;TAB(50)"Time: "TI$

5223 PRINT

5300 IF Z$="d" OR Z$="m" OR Z$="f" THEN GOTO 5314 ELSE 5316

5314 PRINT TAB(6)"Cause/form";TAB(30)"Number of";TAB(44)"Proportion";TAB(59)"Percentage"

5315 PRINT TAB(30)"Cases/units":PRINT:GOTO 5319

5316 IF Z$="t" THEN PRINT TAB(6)"Cause/form";TAB(30)"Number of";TAB(44)"Proportion";TAB(59)"Percentage"

5317 PRINT TAB(30)USING"\        \";TMU$

5318 PRINT

5319 FOR I=1 TO N

5320 PRINT I;TAB(6)USING"\                  \";S$(I);

5321 PRINT TAB(30)INT(U(I));TAB(45)USING"#.####";U(I)/SU;

5322 PRINT TAB(60)USING"##.####";(U(I)/SU)*100

5323 NEXT I

5325 PRINT:PRINT TAB(5)" T o t a l";TAB(30)INT(SU);TAB(45)"1.0000";TAB(59)"100.0000":PRINT

5331 A$=INKEY$:IF A$="" THEN GOTO 5331

5332 IF N=1 THEN GOTO 5980

5335 CLS

5336 IF Z$="d" THEN PRINT TAB(5)"M O R B I D I T Y   S T R U C T U R E   ACCORDING   TO   CAUSES/FORMS":GOTO 5337

5337 IF Z$="m" THEN PRINT TAB(5)"M O R T A L I T Y   S T R U C T U R E   ACCORDING   TO   CAUSES/FORMS":GOTO 5338

5338 IF Z$="f" THEN PRINT TAB(3)"D I S E A S E   N I D A L I T Y  STRUCTURE   ACCORDING   TO   CAUSES/FORMS":GOTO 5339

5339 IF Z$="t" THEN PRINT TAB(4)"A F F E C T E D   T E R R I T O R Y  STRUCTURE ACCORDING TO CAUSES/FORMS

5340 IF MAX>SU/2 THEN GOTO 5341 ELSE 5400

5341 PRINT:PRINT TAB(17)"("CHR$(223);" represents 2 % of total "INT(SU);" units)":PRINT

5342 PRINT:PRINT TAB(5)"Cause/form";TAB(25)"0         20        40        60        80       100 %"

5343 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

5344 FOR I=1 TO N

5345 Z=((U(I)/SU)*100)/2

5346 IF Z<1 THEN GOTO 5347 ELSE 5350

5347 IF Z>0 THEN GOTO 5348 ELSE 5350

5348 PRINT TAB(3)USING"\                  \";S$(I);

5349 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 5357

5350 PRINT TAB(3)USING"\                  \";S$(I);

5351 PRINT TAB(25)CHR$(179);

5353 FOR K=1 TO ((U(I)/SU)*100)/2

5354 PRINT CHR$(223);

5355 NEXT K

5356 PRINT

5357 NEXT I

5370 PRINT:GOTO 5980

5400 PRINT:PRINT TAB(17)"("CHR$(223);" represents 1 % of total "INT(SU);" units)":PRINT

5405 PRINT:PRINT TAB(5)"Cause/form";TAB(25)"0         10        20        30        40        50 %"

5406 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

5407 FOR I=1 TO N

5408 Z=((U(I)/SU)*100)

5409 IF Z<1 THEN GOTO 5410 ELSE 5413

5410 IF Z>0 THEN GOTO 5411 ELSE 5413

5411 PRINT TAB(3)USING"\                  \";S$(I);

5412 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 5419

5413 PRINT TAB(3)USING"\                  \";S$(I);

5414 PRINT TAB(25)CHR$(179);

5415 FOR K=1 TO (U(I)/SU)*100

5416 PRINT CHR$(223);

5417 NEXT K

5418 PRINT

5419 NEXT I

5420 PRINT

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:MAX=0:S$="":U=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.6-DISEASE OCCURRENCE STRUCTURE ACCORDING TO ANIMAL SPECIES AND CATEGORIES"

6010 PRINT"==========================================================================="

6011 PRINT"This subprogramme calculates disease occurrence according to"

6012 PRINT TAB(10)"1) species (host range)"

6013 PRINT TAB(10)"2) categories"

6014 INPUT"     Enter choice number: ",CH

6015 IF CH=1 OR CH=2 THEN GOTO 6016 ELSE PRINT IDE$:GOTO 6980

6016 IF CH=1 THEN GOTO 6600

6017 IF CH=2 THEN GOTO 6019

6018 GOTO 6015

6019 PRINT"Animal categories according to:"

6020 PRINT"  breed, age, gender, weight, physiological stage, nutrition status, immunity"

6022 PRINT"  status, type/level of productivity, type of breeding, type of exploitation,"

6024 PRINT"  performance, production stage, technology, concentration, etc.":GOTO 6100

6050 PRINT IDM$:GOTO 6980

6100 PRINT"INPUT DATA:"

6105 INPUT"     disease ";DI$

6110 INPUT"     place, time ";PL$,TI$

6115 INPUT"     species, category according to ";SP$,CA$

6120 INPUT"     number (2 up to 11 !) of category subgroups ";N

6121 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 6980

6124 IF N>7 THEN CLS:PRINT

6129 PRINT"  List data:"

6130 PRINT"  name (up to 16 characters) of the subgroup, number of diseased animals:"

6131 FOR I=1 TO N

6132 PRINT TAB(15)I;": ";

6133 INPUT SG$(I),NA(I)

6134 IF SG$(I)="" THEN GOTO 6050 ELSE 6135

6135 NEXT I

6139 SU=0

6140 FOR I=1 TO N

6141 SU=SU+NA(I)

6145 NEXT I

6149 MAX=NA(1)

6150 FOR I=2 TO N

6152 IF NA(I)>MAX THEN MAX=NA(I)

6153 NEXT I

6154 IF SU=0 THEN GOTO 6050 ELSE 6190

6190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6192 IF I$="m" THEN GOTO 10

6193 IF I$="c" THEN GOTO 6000

6194 IF I$=CHR$(13) THEN GOTO 6200

6200 CLS:PRINT TAB(4)"C A T E G O R Y   S T R U C T U R E  OF  D I S E A S E D   A N I M A L S":PRINT

6205 PRINT TAB(6)"Disease: "DI$

6210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

6211 PRINT TAB(6)"Species: "SP$

6212 PRINT TAB(6)"Category according to: "CA$:PRINT

6220 PRINT TAB(5)"Category";TAB(30)"Diseased";TAB(45)"Proportion";TAB(59)"Percentage"

6221 PRINT TAB(5)"Subgroup";TAB(30)"Animals":PRINT

6230 FOR I=1 TO N

6231 PRINT TAB(5)USING"\              \";SG$(I);

6232 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

6233 PRINT TAB(60)USING"###.####";(NA(I)/SU)*100

6234 NEXT I

6240 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(60)"100.0000

6500 A$=INKEY$:IF A$="" THEN GOTO 6500

6501 IF N=1 THEN GOTO 6981

6550 CLS:PRINT TAB(4)"C A T E G O R Y   S T R U C T U R E  OF  D I S E A S E D   A N I M A L S"

6551 IF MAX<(SU/2) THEN GOTO 6552 ELSE 6580

6552 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of the total"INT(SU);" diseased animals)":PRINT

6553 PRINT

6560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

6561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

6562 FOR I=1 TO N

6563 Z=(NA(I)/SU)*100

6564 IF Z<1 THEN GOTO 6565 ELSE 6568

6565 IF Z>0 THEN GOTO 6566 ELSE 6568

6566 PRINT TAB(2)USING"\              \";SG$(I);

6567 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 6574

6568 PRINT TAB(2)USING"\              \";SG$(I);

6569 PRINT TAB(20)CHR$(179);

6570 FOR K=1 TO (NA(I)/SU)*100

6571 PRINT CHR$(223);

6572 NEXT K

6573 PRINT

6574 NEXT I

6575 PRINT:GOTO 6980

6580 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total "INT(SU);" diseased animals)":PRINT

6582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

6583 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

6584 FOR I=1 TO N

6585 Z=(NA(I)/SU)*50

6586 IF Z<1 THEN GOTO 6587 ELSE 6590

6587 IF Z>0 THEN GOTO 6588 ELSE 6590

6588 PRINT TAB(2)USING"\              \";SG$(I);

6589 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 6596

6590 PRINT TAB(2)USING"\              \";SG$(I);

6591 PRINT TAB(20)CHR$(179);

6592 FOR K=1 TO (NA(I)/SU)*50

6593 PRINT CHR$(223);

6594 NEXT K

6595 PRINT

6596 NEXT I

6597 PRINT:GOTO 6980

6600 PRINT"INPUT DATA:"

6605 INPUT"     disease ";DI$

6610 INPUT"     place, time ";PL$,TI$

6620 INPUT"     number (2 up to 11 !) of species ";N

6621 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 6980

6629 PRINT"  List data:"

6630 PRINT"  name (up to 16 characters) of the species, number of diseased animals:"

6631 FOR I=1 TO N

6632 PRINT TAB(15)I;": ";

6633 INPUT SG$(I),NA(I)

6634 IF SG$(I)="" THEN GOTO 6050 ELSE 6635

6635 NEXT I

6639 SU=0

6640 FOR I=1 TO N

6641 SU=SU+NA(I)

6645 NEXT I

6649 MAX=NA(1)

6650 FOR I=2 TO N

6652 IF NA(I)>MAX THEN MAX=NA(I)

6653 NEXT I

6654 PRINT

6655 IF SU=0 THEN GOTO 6050 ELSE 6690

6690 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6691 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6692 IF I$="m" THEN GOTO 10

6693 IF I$="c" THEN GOTO 6000

6694 IF I$=CHR$(13) THEN GOTO 6700

6700 CLS:PRINT TAB(4)"S P E C I E S   S T R U C T U R E  OF  D I S E A S E D   A N I M A L S":PRINT

6705 PRINT TAB(6)"Disease: "DI$

6710 PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

6720 PRINT TAB(5)"Species";TAB(30)"Diseased";TAB(45)"Proportion";TAB(59)"Percentage"

6721 PRINT TAB(30)"Animals":PRINT

6729 FOR I=1 TO N

6730 PRINT TAB(5)USING"\              \";SG$(I);

6731 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

6732 PRINT TAB(60)USING"###.####";(NA(I)/SU)*100

6733 NEXT I

6740 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(60)"100.0000

6800 A$=INKEY$:IF A$="" THEN GOTO 6800

6801 IF N=1 THEN GOTO 6981

6850 CLS:PRINT TAB(4)"S P E C I E S   S T R U C T U R E  OF  D I S E A S E D   A N I M A L S "

6851 IF MAX>(SU/2) THEN GOTO 6880 ELSE 6852

6852 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 1 % of the total"INT(SU);" diseased animals)":PRINT

6853 PRINT

6860 PRINT TAB(2)"Species";TAB(20)"0         10        20        30        40        50 %"

6861 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

6865 FOR I=1 TO N

6866 Z=(NA(I)/SU)*100

6867 IF Z<1 THEN GOTO 6868 ELSE 6871

6868 IF Z>0 THEN GOTO 6869 ELSE 6871

6869 PRINT TAB(2)USING"\              \";SG$(I);

6870 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 6877

6871 PRINT TAB(2)USING"\              \";SG$(I);

6872 PRINT TAB(20)CHR$(179);

6873 FOR K=1 TO (NA(I)/SU)*100

6874 PRINT CHR$(223);

6875 NEXT K

6876 PRINT

6877 NEXT I

6878 PRINT:GOTO 6980

6880 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of total "INT(SU);" diseased animals)":PRINT

6882 PRINT:PRINT TAB(3)"Species";TAB(20)"0         20        40        60        80       100 %"

6884 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

6885 FOR I=1 TO N

6886 Z=(NA(I)/SU)*50

6887 IF Z<1 THEN GOTO 6888 ELSE 6891

6888 IF Z>0 THEN GOTO 6889 ELSE 6891

6889 PRINT TAB(3)USING"\              \";SG$(I);

6890 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 6897

6891 PRINT TAB(3)USING"\              \";SG$(I);

6892 PRINT TAB(20)CHR$(179);

6893 FOR K=1 TO (NA(I)/SU)*50

6894 PRINT CHR$(223);

6895 NEXT K

6896 PRINT

6897 NEXT I:PRINT

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:MAX=0:SG$="":NA=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.7-DISEASE OCCURRENCE ACCORDING TO BREEDING/PRODUCTION CONDITIONS"

7002 PRINT"=================================================================="

7006 PRINT"(according to: animal breeding/production exploitation, technology, "

7007 PRINT"concentration, housing/herd/flock/farm size, management, sector, etc.)":GOTO 7100

7050 PRINT IDM$:GOTO 7980

7100 PRINT"INPUT DATA:"

7102 INPUT"     disease(s) ";DI$

7103 INPUT"     species ";SP$

7110 INPUT"     place, time ";PL$,TI$

7112 INPUT"     type of conditions ";EC$

7120 INPUT"     criterion for subgrouping ";CA$

7121 INPUT"     number (2 up to 11 !) of evaluated subgroups ";N

7122 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 7980

7130 PRINT"  name (up to 15 characters) of the subgroup, number of diseased animals:"

7131 FOR I=1 TO N

7132 PRINT TAB(15)I;": ";

7133 INPUT SG$(I),NA(I)

7134 IF SG$(I)="" THEN GOTO 7050 ELSE 7135

7135 NEXT I

7139 SU=0

7140 FOR I=1 TO N

7141 SU=SU+NA(I)

7145 NEXT I

7149 MAX=NA(1)

7150 FOR I=2 TO N

7152 IF NA(I)>MAX THEN MAX=NA(I)

7153 NEXT I

7154 IF SU=0 THEN GOTO 7050 ELSE 7190

7190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7192 IF I$="m" THEN GOTO 10

7193 IF I$="c" THEN GOTO 7000

7194 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT TAB(4)"ANIMAL  DISEASE  OCCURRENCE  ACCORDING TO  BREEDING/PRODUCTION  CONDITIONS":PRINT

7202 PRINT TAB(6)"Disease: "DI$

7203 PRINT TAB(6)"Species: "SP$

7210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

7211 PRINT"Conditions: "EC$;TAB(40)"Subgrouping acc.: "CA$:PRINT

7220 PRINT TAB(5)"Subgroup";TAB(30)"Diseased";TAB(45)"Proportion";TAB(59)"Percentage"

7221 PRINT TAB(30)"Animals":PRINT

7230 FOR I=1 TO N

7231 PRINT TAB(5)USING"\              \";SG$(I);

7232 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

7233 PRINT TAB(61)USING"##.####";(NA(I)/SU)*100

7234 NEXT I

7240 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(60)"100.0000

7500 A$=INKEY$:IF A$="" THEN GOTO 7500

7501 IF N=1 THEN GOTO 7981

7550 CLS:PRINT TAB(4)"ANIMAL  DISEASE  OCCURRENCE  ACCORDING TO  BREEDING/PRODUCTION  CONDITIONS"

7551 IF MAX<(SU/2) THEN GOTO 7552 ELSE 7580

7552 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of the total "INT(SU);" diseased animals)":PRINT

7553 PRINT

7560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

7561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

7565 FOR I=1 TO N

7566 Z=(NA(I)/SU)*100

7567 IF Z<1 THEN GOTO 7568 ELSE 7571

7568 IF Z>0 THEN GOTO 7569 ELSE 7571

7569 PRINT TAB(2)USING"\              \";SG$(I);

7570 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 7577

7571 PRINT TAB(2)USING"\              \";SG$(I);

7572 PRINT TAB(20)CHR$(179);

7573 FOR K=1 TO (NA(I)/SU)*100

7574 PRINT CHR$(223);

7575 NEXT K

7576 PRINT

7577 NEXT I

7579 PRINT:GOTO 7980

7580 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total "INT(SU);" diseased animals)":PRINT

7582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

7584 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

7585 FOR I=1 TO N

7586 Z=(NA(I)/SU)*50

7587 IF Z<1 THEN GOTO 7588 ELSE 7591

7588 IF Z>0 THEN GOTO 7589 ELSE 7591

7589 PRINT TAB(2)USING"\              \";SG$(I);

7590 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 7597

7591 PRINT TAB(2)USING"\              \";SG$(I);

7592 PRINT TAB(20)CHR$(179);

7593 FOR K=1 TO (NA(I)/SU)*50

7594 PRINT CHR$(223);

7595 NEXT K

7596 PRINT

7597 NEXT I:PRINT

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:MAX=0:SG$="":NA=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.8-DISEASE OCCURRENCE ACCORDING TO ECOLOGICAL CONDITIONS"

8002 PRINT"========================================================="

8005 PRINT"[atmospherical, geospherical, hydrospherical and biospherical (flora/fauna)"

8006 PRINT"factors; hygiene, etc.]"

8100 PRINT"INPUT DATA:"

8102 INPUT"     disease(s) ";DI$

8103 INPUT"     species ";SP$

8110 INPUT"     place, time ";PL$,TI$

8112 INPUT"     type of ecological conditions ";EC$

8120 INPUT"     criterion for subgrouping ";CA$

8121 INPUT"     number (2 up to 11 !) of evaluated subgroups ";N

8122 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 8980

8130 PRINT"  name (up to 16 characters) of the subgroup, number of diseased animals:"

8131 FOR I=1 TO N

8132 PRINT TAB(15)I;": ";

8133 INPUT SG$(I),NA(I)

8134 IF SG$(I)<>"" THEN GOTO 8135 ELSE PRINT IDM$:GOTO 8980

8135 NEXT I

8139 SU=0

8140 FOR I=1 TO N

8141 SU=SU+NA(I)

8145 NEXT I

8149 MAX=NA(1)

8150 FOR I=2 TO N

8151 IF NA(I)>MAX THEN MAX=NA(I)

8152 NEXT I

8153 PRINT DS$;

8154 INPUT" ";DAT$

8155 IF SU<>0 THEN GOTO 8190 ELSE PRINT IDM$:GOTO 8980

8190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8192 IF I$="m" THEN GOTO 10

8193 IF I$="c" THEN GOTO 8000

8194 IF I$=CHR$(13) THEN GOTO 8200

8200 CLS:PRINT TAB(4)"D I S E A S E  OCCURRENCE  ACCORDING  TO  E C O L O G I C A L   CONDITIONS":PRINT

8202 PRINT TAB(6)"Disease: "DI$

8203 PRINT TAB(6)"Species: "SP$

8210 PRINT"Place: "PL$;TAB(50)"Time: "TI$

8211 PRINT"Conditions: "EC$;TAB(40)"Subgrouping acc.: "CA$:PRINT

8220 PRINT TAB(5)"Subgroup";TAB(30)"Diseased";TAB(45)"Proportion";TAB(59)"Percentage"

8221 PRINT TAB(30)"Animals":PRINT

8230 FOR I=1 TO N

8231 PRINT TAB(5)USING"\              \";SG$(I);

8232 PRINT TAB(30)INT(NA(I));TAB(46)USING"#.######";NA(I)/SU;

8233 PRINT TAB(61)USING"##.####";(NA(I)/SU)*100

8234 NEXT I

8240 PRINT:PRINT TAB(5)"T o t a l";TAB(30)INT(SU);TAB(46)"1.000000";TAB(60)"100.0000

8242 PRINT:PRINT DS$;" "DAT$

8500 A$=INKEY$:IF A$="" THEN GOTO 8500

8501 IF N=1 THEN GOTO 8981

8550 CLS:PRINT TAB(4)"D I S E A S E  OCCURRENCE  ACCORDING  TO  E C O L O G I C A L   CONDITIONS"

8551 IF MAX<(SU/2) THEN GOTO 8552 ELSE 8580

8552 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of the total "INT(SU);" diseased animals)":PRINT

8553 PRINT

8560 PRINT TAB(2)"Subgroup";TAB(20)"0         10        20        30        40        50 %"

8561 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

8565 FOR I=1 TO N

8566 Z=(NA(I)/SU)*100

8567 IF Z<1 THEN GOTO 8568 ELSE 8571

8568 IF Z>0 THEN GOTO 8569 ELSE 8571

8569 PRINT TAB(2)USING"\              \";SG$(I);

8570 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 8577

8571 PRINT TAB(2)USING"\              \";SG$(I);

8572 PRINT TAB(20)CHR$(179);

8573 FOR K=1 TO (NA(I)/SU)*100

8574 PRINT CHR$(223);

8575 NEXT K

8576 PRINT

8577 NEXT I

8579 PRINT:GOTO 8980

8580 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total "INT(SU);" diseased animals)":PRINT

8582 PRINT:PRINT TAB(3)"Subgroup";TAB(20)"0         20        40        60        80       100 %"

8584 PRINT TAB(20)CHR$(179)"---------|---------|---------|---------|---------I"

8585 FOR I=1 TO N

8586 Z=(NA(I)/SU)*50

8587 IF Z<1 THEN GOTO 8588 ELSE 8591

8588 IF Z>0 THEN GOTO 8589 ELSE 8591

8589 PRINT TAB(2)USING"\              \";SG$(I);

8590 PRINT TAB(20)CHR$(179);CHR$(249):GOTO 8597

8591 PRINT TAB(2)USING"\              \";SG$(I);

8592 PRINT TAB(20)CHR$(179);

8593 FOR K=1 TO (NA(I)/SU)*50

8594 PRINT CHR$(223);

8595 NEXT K

8596 PRINT

8597 NEXT I:PRINT

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:MAX=0:SG$="":NA=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.9-TABLES OF POPULATION DISEASE OCCURRENCE ACCORDING TO SPECIES,"

9001 PRINT"    CATEGORIES, ECOLOGICAL AND ECONOMIC CONDITIONS"

9010 PRINT"================================================================="

9011 PRINT"This subprogramme creates space/time tables of:"

9013 PRINT TAB(3)"1) population disease occurrence according to species"

9014 PRINT TAB(3)"2) population disease occurrence according to categories"

9015 PRINT TAB(3)"3) population disease occurrence according to ecological conditions"

9016 PRINT TAB(3)"4) population disease occurrence according to economic conditions"

9018 INPUT"     Enter choice number: ",CH

9019 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 9020 ELSE PRINT IDE$:GOTO 9980

9020 PRINT"INPUT DATA"

9022 IF CH=1 THEN SC$="species"

9023 IF CH=2 THEN SC$="categories"

9024 IF CH=3 OR CH=4 THEN SC$="conditions"

9029 INPUT"     place, time (period) ";PL$,TI$

9030 INPUT"     disease ";DI$

9031 IF CH=3 OR CH=4 THEN INPUT"     species ";SP$

9032 PRINT"     number (up to 5 !) of "SC$;" (for table head)";

9033 INPUT"   ";Y

9034 IF Y=<0 THEN PRINT IDM$:GOTO 9980 ELSE 9035

9035 FOR I=1 TO Y

9036 PRINT"        name (up to 8 characters !) of the "SC$;" ";I;

9037 INPUT"  ";SC$(I)

9038 NEXT I

9039 INPUT"     data according to subterritories (s) or time (t) ";DA$

9040 IF DA$="s" OR DA$="t" THEN GOTO 9041 ELSE PRINT IDE$:GOTO 9980

9041 IF DA$="s" THEN DA$="Subterritory"

9042 IF DA$="t" THEN DA$="Time"

9043 INPUT"     measure units ";MU$

9048 INPUT"     number of rows (2 up to 11 !)  ";N

9049 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 9980

9057 CLS:PRINT

9058 PRINT"Row names (up to 10 characters !!), values (integers !) of individual columns"

9059 PRINT"following this sequence (commas between individual data):":PRINT

9070 PRINT TAB(6)DA$;", ";

9071 FOR I= 1 TO Y

9072 PRINT SC$(I);", ";

9073 NEXT

9074 PRINT:PRINT

9075 FOR I= 1 TO N

9076 PRINT TAB(5)I;"row: ";

9077 INPUT "";CO$(I),C(I),D(I),E(I),F(I),G(I)

9078 IF CO$(I)="" THEN PRINT:PRINT IDM$:GOTO 9980 ELSE 9079

9079 NEXT I

9100 IF N<10 THEN PRINT:INPUT"Data source (without commas !) ";DS$

9180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9182 IF I$="m" THEN GOTO 10

9183 IF I$="c" THEN GOTO 9000

9184 IF I$=CHR$(13) THEN GOTO 9200

9200 CLS

9201 IF CH=1 THEN PRINT TAB(6)"POPULATION  DISEASE  OCCURRENCE  ACCORDING  TO  SPECIES"

9202 IF CH=2 THEN PRINT TAB(6)"POPULATION  DISEASE  OCCURRENCE  ACCORDING  TO  CATEGORIES"

9203 IF CH=3 THEN PRINT TAB(6)"POPULATION  DISEASE  OCCURRENCE  ACCORDING  TO  ECOLOGICAL  CONDITIONS"

9204 IF CH=4 THEN PRINT TAB(6)"POPULATION  DISEASE  OCCURRENCE  ACCORDING  TO  ECONOMIC  CONDITIONS"

9206 PRINT

9210 PRINT"Disease: "DI$;TAB(50)"Units: "MU$

9211 IF CH=2 OR CH=3 OR CH=4 THEN PRINT TAB(5)"Species: "SP$

9212 PRINT"Place: "PL$;TAB(50)"Time: "TI$

9213 PRINT

9270 PRINT DA$;TAB(15)"T o t a l";TAB(26)SC$(1);TAB(37)SC$(2);TAB(48)SC$(3);TAB(59)SC$(4);TAB(70)SC$(5):GOTO 9273

9273 PRINT

9300 C=0:D=0:E=0:F=0:G=0

9310 FOR I=1 TO N

9312 C=C+C(I)

9314 D=D+D(I)

9316 E=E+E(I)

9318 F=F+F(I)

9320 G=G+G(I)

9322 NEXT I

9400 FOR I=1 TO N

9402 IF Y=1 THEN PRINT CO$(I);TAB(14)C(I);TAB(25)C(I):GOTO 9420

9404 IF Y=2 THEN PRINT CO$(I);TAB(14)C(I)+D(I);TAB(25)C(I);TAB(36)D(I):GOTO 9420

9406 IF Y=3 THEN PRINT CO$(I);TAB(14)C(I)+D(I)+E(I);TAB(25)C(I);TAB(36)D(I);TAB(47)E(I):GOTO 9420

9408 IF Y=4 THEN PRINT CO$(I);TAB(14)C(I)+D(I)+E(I)+F(I);TAB(25)C(I);TAB(36)D(I);TAB(47)E(I);TAB(58)F(I):GOTO 9420

9410 IF Y=5 THEN PRINT CO$(I);TAB(14)C(I)+D(I)+E(I)+F(I)+G(I);TAB(25)C(I);TAB(36)D(I);TAB(47)E(I);TAB(58)F(I);TAB(69)G(I)

9420 NEXT I:GOTO 9470

9470 PRINT

9478 IF DA$<>"Time" THEN GOTO 9479 ELSE 9498

9479 T=C+D+E+F+G

9481 IF Y=2 THEN PRINT"T o t a l";TAB(14)T;TAB(25)C;TAB(36)D

9482 IF Y=3 THEN PRINT"T o t a l";TAB(14)T;TAB(25)C;TAB(36)D;TAB(47)E

9483 IF Y=4 THEN PRINT"T o t a l";TAB(14)T;TAB(25)C;TAB(36)D;TAB(47)E;TAB(58)F

9484 IF Y=5 THEN PRINT"T o t a l";TAB(14)T;TAB(25)C;TAB(36)D;TAB(47)E;TAB(58)F;TAB(69)G

9485 PRINT

9486 IF Y=2 THEN PRINT"Proportion";TAB(15)"1.0000";TAB(26)USING"#.####";C/T;TAB(37)D/T

9487 IF Y=3 THEN PRINT"Proportion";TAB(15)"1.0000";TAB(26)USING"#.####";C/T;TAB(37)D/T;TAB(47)E/T

9488 IF Y=4 THEN PRINT"Proportion";TAB(15)"1.0000";TAB(26)USING"#.####";C/T;TAB(37)D/T;TAB(48)E/T;TAB(59)F/T

9489 IF Y=5 THEN PRINT"Proportion";TAB(15)"1.0000";TAB(26)USING"#.####";C/T;TAB(37)D/T;TAB(48)E/T;TAB(59)F/T;TAB(70)G/T

9490 PRINT

9498 IF DS$="" THEN GOTO 9850 ELSE PRINT"Data source: "DS$

9850 FOR I=1 TO Y

9851 SC$(I)=""

9852 NEXT I

9900 C(I)=0:D(I)=0:E(I)=0:F(I)=0:G(I)=0:C=0:D=0:E=0:F=0:G=0

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.10-TABLES OF ANIMAL POPULATION, FARMS AND TERRITORY EPI.STRUCTURES"

10010 PRINT"===================================================================="

10015 PRINT"This subprogramme facilitates the creation of tables according to space"

10016 PRINT"and time with following structures:"

10018 PRINT TAB(10)"1) total, free and diseased animals"

10019 PRINT TAB(10)"2) total, free and affected herds"

10020 PRINT TAB(10)"3) total, free and affected farms"

10021 PRINT TAB(10)"4) total, free and affected territory"

10026 INPUT"     Enter choice number: ",CH

10027 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 10030 ELSE PRINT IDE$:GOTO 10980

10030 PRINT"INPUT DATA"

10031 INPUT"     title (in capital letters, without commas !) ";NA$

10032 INPUT"     disease                 ";DI$

10033 INPUT"     species                 ";SP$

10034 INPUT"     place, time             ";PL$,TI$

10035 INPUT"     number of rows (2 up to 11 !)  ";N

10036 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 10980

10037 INPUT"     data according to subterritories (s) or time (t) ";DA$

10038 IF DA$="s" OR DA$="t" THEN GOTO 10039 ELSE PRINT IDE$:GOTO 10980

10039 IF DA$="s" THEN DA$="Territory"

10040 IF DA$="t" THEN DA$="Time"

10041 IF CH=4 THEN INPUT"     surface measure units, data source (without commas !) ";MU$,DS$:GOTO 10046

10042 INPUT"     data source (without commas !) ";DS$

10046 CLS:PRINT:PRINT"  Row names (up to 10 characters !!), values (integers !) of individual columns"

10047 PRINT"  following this sequence (commas between data !):":PRINT

10060 IF CH=1 THEN X$="animals":GOTO 10067

10061 IF CH=2 THEN X$="herds":GOTO 10068

10062 IF CH=3 THEN X$="farms":GOTO 10069

10063 IF CH=4 THEN X$=MU$:GOTO 10070

10067 PRINT TAB(6)DA$;", total animals, disease free animals, diseased animals":GOTO 10072

10068 PRINT TAB(6)DA$;", total herds, disease free herds, affected herds":GOTO 10072

10069 PRINT TAB(6)DA$;", total farms, disease free farms, affected farms":GOTO 10072

10070 PRINT TAB(6)DA$;", total area, disease free area, affected area":GOTO 10072

10072 PRINT:FOR I = 1 TO N

10073 PRINT TAB(5)I;"row: ";

10074 INPUT "";CO$(I),C(I),D(I),E(I)

10075 IF CO$(I)="" OR C(I)=0 THEN PRINT:PRINT IDM$:GOTO 10980 ELSE 10076

10076 IF (D(I)+E(I))>C(I) THEN PRINT IDE$:GOTO 10980

10077 NEXT I

10180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10182 IF I$="m" THEN GOTO 10

10183 IF I$="c" THEN GOTO 10000

10184 IF I$=CHR$(13) THEN GOTO 10200

10200 CLS

10202 PRINT TAB(5)NA$:PRINT

10203 PRINT"Disease: "DI$;TAB(50)"Units: "X$;" ";Y$

10204 PRINT TAB(10)"Species: "SP$

10207 PRINT"Place: "PL$;TAB(50)"Time: "TI$

10212 PRINT

10260 PRINT DA$;TAB(14)"T o t a l";TAB(26)"Dis. Free";TAB(39)"  % ";TAB(48)"Indeterm.";TAB(59)"Affected";TAB(70)"   % "

10268 PRINT

10300 C=0:D=0:E=0:F=0:G=0

10310 FOR I=1 TO N

10312 C=C+C(I)

10314 D=D+D(I)

10316 E=E+E(I)

10318 F=F+F(I)

10320 G=G+G(I)

10322 NEXT I

10400 FOR I=1 TO N

10403 PRINT CO$(I);TAB(13)C(I);TAB(25)D(I);TAB(38)USING"#.####";D(I)/C(I);

10404 PRINT TAB(47)C(I)-(D(I)+E(I));TAB(58)E(I);TAB(70)USING"#.####";E(I)/C(I):GOTO 10420

10420 NEXT I

10471 PRINT

10472 TC=0

10475 FOR I=1 TO N

10476 TC=TC+C(I)

10477 TCY=TC*Y

10478 NEXT I

10479 T=C+D+E+F+G

10483 IF DA$="Territory" THEN PRINT"T o t a l";TAB(13)C;TAB(25)D;TAB(38)USING"#.####";D/C;

10484 IF DA$="Territory" THEN PRINT TAB(47)C-(E+D);TAB(58)E;TAB(70)USING"#.####";E/C

10498 IF DS$="" THEN GOTO 10980 ELSE PRINT:PRINT"Data source: "DS$

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:CO$="":D=0:E=0:C=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10982 IF R$="y" OR R$="n" THEN GOTO 10983 ELSE 10990

10983 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.11-TABLES OF DISEASE FOCI AND INTRAFOCAL STRUCTURES"

11010 PRINT"====================================================="

11015 PRINT"This subprogramme facilitates the creation of the tables according to"

11016 PRINT"space and time, with following structure:"

11022 PRINT TAB(7)"1) foci: total, with diseased animals clinically, subclinically only,"

11023 PRINT TAB(10)"in observation and depopulated"

11024 PRINT TAB(7)"2) intrafocal animals: total, affected clinically and subclinically,"

11025 PRINT TAB(10)"indeterminate and disease free"

11026 INPUT"     Enter choice number: ",CH

11027 IF CH=1 OR CH=2 THEN GOTO 11030 ELSE PRINT IDE$:GOTO 11980

11030 PRINT"INPUT DATA"

11031 INPUT"     title (in capital letters, without commas !) ";NA$

11032 INPUT"     disease                    ";DI$

11033 INPUT"     species                    ";SP$

11034 INPUT"     place, time                ";PL$,TI$

11035 IF CH=1 THEN INPUT"     foci form/type             ";FT$

11036 IF CH=2 THEN INPUT"     disease form/type          ";DT$

11037 INPUT"     data according to subterritories (s) or time (t) ";DA$

11038 IF DA$="s" OR DA$="t" THEN GOTO 11039 ELSE PRINT IDE$:GOTO 11980

11039 IF DA$="s" THEN DA$="Territory"

11040 IF DA$="t" THEN DA$="Time"

11041 INPUT"     data source (without commas !) ";DS$

11043 PRINT

11044 INPUT"     number of rows (2 up to 11 !)  ";N

11045 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 11980

11046 CLS:PRINT:PRINT"  Row names (up to 10 characters !!), values (integers !) of individual columns"

11047 PRINT"  following this sequence (commas between data !):":PRINT

11048 IF CH=1 THEN GOTO 11071 ELSE 11073

11071 PRINT TAB(3)DA$;", f o c i  total, foci with animals diseased clinically,";

11072 PRINT TAB(30)"diseased subclinically only, depopulated foci":GOTO 11075

11073 PRINT TAB(3)DA$;", intrafocal  a n i m a l s  total, diseased clinically,";

11074 PRINT TAB(50)"subclinically, disease free":PRINT

11075 FOR I = 1 TO N

11076 PRINT TAB(5)I;" row: ";

11077 INPUT "";CO$(I),C(I),D(I),E(I),G(I)

11078 IF CO$(I)="" OR C(I)=0 THEN PRINT:PRINT IDM$:GOTO 11980 ELSE 11079

11079 NEXT I

11080 FOR I= 1 TO N

11081 IF (D(I)+E(I)+G(I))>C(I) THEN GOTO 11082 ELSE 11084

11082 PRINT:PRINT "  Error ! Sum of parts cannot be major than total ! ":GOTO 11980

11084 NEXT I

11185 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11186 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11187 IF I$="m" THEN GOTO 10

11188 IF I$="c" THEN GOTO 11000

11189 IF I$=CHR$(13) THEN GOTO 11200

11200 CLS

11205 PRINT TAB(5)NA$:PRINT

11206 IF CH=1 THEN PRINT"Disease: "DI$;TAB(50)"Form/type: "FT$

11207 IF CH=2 THEN PRINT"Disease: "DI$;TAB(50)"Form/type: "DT$

11208 PRINT TAB(10)"Species: "SP$

11209 PRINT"Place: "PL$;TAB(50)"Time: "TI$

11210 PRINT

11211 IF CH=1 THEN GOTO 11212 ELSE 11215

11212 PRINT DA$;TAB(14)"T o t a l";TAB(27)"With    Animals    Diseased";TAB(56)"In";TAB(69)"Depopulated"

11213 PRINT TAB(27)"---------------------------";TAB(56)"Observation"

11214 PRINT TAB(27)"Clinically";TAB(41)"Subclin. only":PRINT:GOTO 11250

11215 PRINT DA$;TAB(15)"T o t a l";TAB(29)"D  i   s   e   a   s  e  d";TAB(57)"Indetermi-";TAB(68)"Disease Free"

11217 PRINT TAB(29)"Clinically";TAB(42)"Subclin. only";TAB(57)"nate":PRINT

11250 FOR I= 1 TO N

11251 F(I)=C(I)-(D(I)+E(I)+G(I))

11252 PRINT CO$(I);TAB(15)C(I);TAB(29)D(I);TAB(42)E(I);TAB(57)F(I);TAB(69)G(I)

11253 NEXT I

11300 C=0:D=0:E=0:F=0:G=0

11310 FOR I=1 TO N

11312 C=C+C(I)

11314 D=D+D(I)

11316 E=E+E(I)

11318 F=F+F(I)

11320 G=G+G(I)

11322 NEXT I

11471 PRINT

11472 TC=0

11475 FOR I=1 TO N

11476 TC=TC+C(I)

11477 TCY=TC*Y

11478 NEXT I

11479 T=C+D+E+F+G

11485 IF DA$="Territory" THEN PRINT"T o t a l";TAB(15)C;TAB(29)D;TAB(42)E;TAB(57)F;TAB(69)G

11500 A$=INKEY$:IF A$="" THEN GOTO 11500

11505 CLS:PRINT:PRINT NA$:PRINT TAB(5)"P r o p o r t i o n s: ":PRINT

11510 IF CH=1 THEN GOTO 11512 ELSE 11515

11512 PRINT DA$;TAB(14)"T o t a l";TAB(27)"With    Animals    Diseased";TAB(56)"In";TAB(69)"Depopulated"

11513 PRINT TAB(27)"---------------------------";TAB(56)"Observation"

11514 PRINT TAB(27)"Clinically";TAB(41)"Subclin. only":PRINT:GOTO 11550

11515 PRINT DA$;TAB(15)"T o t a l";TAB(29)"D  i   s   e   a   s  e  d";TAB(57)"Indetermi-";TAB(68)"Disease Free"

11516 PRINT TAB(29)"Clinically";TAB(42)"Subclin. only";TAB(57)"nate":PRINT

11550 FOR I= 1 TO N

11551 F(I)=C(I)-(D(I)+E(I)+G(I))

11552 PRINT CO$(I);TAB(16)"1.0000";TAB(29)USING"#.####";D(I)/C(I);TAB(42)E(I)/C(I);TAB(57)F(I)/C(I);TAB(70)G(I)/C(I)

11553 NEXT I:PRINT

11685 IF DA$="Territory" THEN PRINT"T o t a l";TAB(16)"1.0000";TAB(29)USING"#.####";D/C;TAB(42)E/C;TAB(57)F/C;TAB(70)G/C

11698 IF DS$="" THEN GOTO 11980 ELSE PRINT:PRINT"Data source: "DS$

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11981 CLS:CO$="":C=0:E=0:D=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11982 IF R$="y" OR R$="n" THEN GOTO 11983 ELSE 11990

11983 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.12-PROPORTIONS OF DISEASE DIFFERENT FORMS/SYMPTOMS FINDINGS "

12010 PRINT"=============================================================="

12050 PRINT"INPUT DATA:"

12052 INPUT"     disease ";DI$

12053 INPUT"     species, category(ies) ";SP$,CA$

12055 INPUT"     place, time ";PL$,TI$

12061 INPUT"     investigations intravitam (i) or postmortem (p)          ";INV$

12062 IF INV$="i" OR INV$="p" THEN GOTO 12063 ELSE PRINT IDE$:GOTO 12980

12063 IF INV$="i" THEN IN$="intravitam investigations "

12064 IF INV$="p" THEN IN$="postmortem investigations "

12065 INPUT"     total number of investigated  d i s e a s e d  animals   ";AN

12066 IF AN=0 THEN PRINT IDM$:GOTO 12980 ELSE 12067

12067 PRINT DS$;

12068 INPUT" ";DAT$

12070 T=0

12075 INPUT"     number (2 up to 11 !) of forms/symptoms/findings         ";N

12076 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 12980

12080 PRINT:PRINT TAB(10)"  List data (names up to 18 characters !!): ":PRINT

12081 FOR I=1 TO N:PRINT TAB(5)I;" ";

12082 IF INV$="i" THEN INPUT"form/symptom, number of cases ";M$(I),X(I)

12083 IF INV$="p" THEN INPUT"finding name, number of cases ";M$(I),X(I)

12084 IF M$(I)="" THEN PRINT:PRINT IDE$:GOTO 12980 ELSE 12085

12085 T=T+X(I)

12086 NEXT I

12087 IF T=0 THEN PRINT:PRINT IDM$:GOTO 12980 ELSE 12088

12088 MAX=X(1)

12089 FOR I=2 TO N

12090 IF X(I)>MAX THEN MAX=X(I):NEXT I

12091 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12092 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12093 IF I$="m" THEN GOTO 10

12094 IF I$="c" THEN GOTO 12000

12095 IF I$=CHR$(13) THEN GOTO 12100

12100 CLS:PRINT:PRINT"    PROPORTIONS  OF  DISEASE  DIFFERENT  FORMS / SYMPTOMS  FINDINGS"

12101 PRINT TAB(3)"Disease: "DI$

12102 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

12103 PRINT"Place: "PL$;TAB(50)"Time: "TI$

12104 PRINT"Results of ";IN$;"of ";AN;"diseased animals:":PRINT

12106 IF INV$="i" THEN PRINT"Form/symptom";

12107 IF INV$="p" THEN PRINT"Finding";

12140 PRINT TAB(20)"Number of";TAB(32)"Total  F i n d i n g s";TAB(58)"Total Diseased Animals"

12145 PRINT TAB(21)"Cases";TAB(32)"Proportion";TAB(45)"Percentage";TAB(58)"Proportion";

12146 PRINT TAB(70)"Percentage"

12150 PRINT

12160 FOR I=1 TO N

12170 PRINT M$(I);TAB(20)X(I);TAB(33)USING"##.####";X(I)/T;

12171 PRINT TAB(46)USING"##.####";X(I)/T*100;

12172 PRINT TAB(59)USING"###.####";X(I)/AN;TAB(71)X(I)/AN*100

12180 NEXT:PRINT

12195 PRINT"T o t a l";TAB(20)T;TAB(34)"1.0000";TAB(45)"100.0000":';TAB(61)USING"#.####";T/AN;

12196 'PRINT TAB(71)USING"###.####";(T/AN)*100

12197 PRINT:PRINT DS$;" "DAT$

12200 A$=INKEY$:IF A$="" THEN GOTO 12200

12201 CLS

12202 IF INV$="i" THEN PRINT TAB(9)"PROPORTIONS  OF  DISEASE  DIFFERENT  INTRAVITAM  FINDINGS"

12203 IF INV$="p" THEN PRINT TAB(9)"PROPORTIONS  OF  DISEASE  DIFFERENT  POSTMORTEM  FINDINGS"

12207 IF MAX>(T/2) THEN GOTO 12212 ELSE 12250

12212 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of total  "INT(T);" findings)":PRINT

12216 PRINT:PRINT TAB(5)"Finding";TAB(25)"0         20        40        60        80       100 %"

12217 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

12219 FOR I=1 TO N

12220 Z=X(I)/T*50

12221 IF Z<1 THEN GOTO 12222 ELSE 12224

12222 IF Z>0 THEN GOTO 12223 ELSE 12224

12223 PRINT TAB(2)M$(I);TAB(25)CHR$(179);CHR$(249):GOTO 12233

12224 PRINT TAB(2)M$(I);TAB(25)CHR$(179);

12226 FOR K=1 TO X(I)/T*50

12228 PRINT CHR$(223);

12230 NEXT K

12233 NEXT I:PRINT:GOTO 12300

12250 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 1 % of total  "INT(T);" findings)":PRINT

12252 PRINT:PRINT TAB(5)"Finding";TAB(25)"0         10        20        30        40        50 %"

12253 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

12255 FOR I=1 TO N

12256 Z=X(I)/T*100

12257 IF Z<1 THEN GOTO 12258 ELSE 12260

12258 IF Z>0 THEN GOTO 12259 ELSE 12260

12259 PRINT TAB(2)M$(I);TAB(25)CHR$(179);CHR$(249):GOTO 12268

12260 PRINT TAB(2)M$(I);TAB(25)CHR$(179);

12262 FOR K=1 TO X(I)/T*100

12264 PRINT CHR$(223);

12266 NEXT K

12268 NEXT I:PRINT

12300 A$=INKEY$:IF A$="" THEN GOTO 12300

12301 CLS

12302 IF INV$="i" THEN PRINT TAB(9)"PROPORTIONS  OF  DISEASE  DIFFERENT  INTRAVITAM  FINDINGS"

12303 IF INV$="p" THEN PRINT TAB(9)"PROPORTIONS  OF  DISEASE  DIFFERENT  POSTMORTEM  FINDINGS"

12312 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of total  "INT(AN);" diseased animals)":PRINT

12316 PRINT:PRINT TAB(5)"Finding";TAB(25)"0         20        40        60        80       100 %"

12317 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

12319 FOR I=1 TO N

12320 Z=X(I)/AN*50

12321 IF Z<1 THEN GOTO 12322 ELSE 12324

12322 IF Z>0 THEN GOTO 12323 ELSE 12324

12323 PRINT TAB(2)M$(I);TAB(25)CHR$(179);CHR$(249):GOTO 12333

12324 PRINT TAB(2)M$(I);TAB(25)CHR$(179);

12326 FOR K=1 TO X(I)/AN*50

12328 PRINT CHR$(223);

12330 NEXT K

12333 NEXT I

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12981 CLS:MAX=0:M$="":X=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12982 IF R$="y" OR R$="n" THEN GOTO 12983 ELSE 12990

12983 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"3.13-PROPORTIONS OF SPECIFIC ETIOLOGICAL AGENTS/ANTIBODIES' FINDINGS"

13010 PRINT"===================================================================="

13050 PRINT"INPUT DATA:"

13052 INPUT"     etiological group ";DI$

13053 INPUT"     species, category(ies) ";SP$,CA$

13055 INPUT"     place, time ";PL$,TI$

13061 INPUT"     etiological agents findings (e) or positive serological findings (s) ";INV$

13062 IF INV$="e" OR INV$="s" THEN GOTO 13063 ELSE PRINT IDE$:GOTO 13980

13063 IF INV$="e" THEN IN$="specific etiological agents investigations:"

13064 IF INV$="s" THEN IN$="serological investigations:"

13065 PRINT DS$;

13066 INPUT" ";DAT$

13070 T=0

13075 INPUT"     number (2 up to 11 !) of etiological agents or antibodies names ";N

13076 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 13980

13080 PRINT:PRINT TAB(10)"  List names (up to 18 characters !!) and numbers: ":PRINT

13081 FOR I=1 TO N:PRINT I;

13082 IF INV$="e" THEN INPUT"etiolology, investigations, findings ";M$(I),Y(I),X(I)

13083 IF INV$="s" THEN INPUT"spec. dis. test, investigations, findings ";M$(I),Y(I),X(I)

13084 IF X(I)>Y(I) THEN PRINT IDE$:GOTO 13980

13085 T=T+X(I)

      TT=TT+Y(I)

13086 NEXT I

13087 IF T=0 THEN PRINT:PRINT IDM$:GOTO 13980 ELSE 13088

13088 MAX=X(1)

13089 FOR I=2 TO N

13090 IF X(I)>MAX THEN MAX=X(I):NEXT I

13091 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

13092 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

13093 IF I$="m" THEN GOTO 10

13094 IF I$="c" THEN GOTO 13000

13095 IF I$=CHR$(13) THEN GOTO 13100

13100 CLS:PRINT" PROPORTIONS OF SPECIFIC ETIOLOGICAL AGENTS/ANTIBODIES' FINDINGS"

13101 PRINT:PRINT"Etiological Group: "DI$

13102 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

13103 PRINT"Place: "PL$;TAB(50)"Time: "TI$

13104 PRINT"Results of ";IN$:PRINT

13140 PRINT TAB(22)"N u m b e r    o f";TAB(55)"Total  F i n d i n g s'"

13145 PRINT TAB(22)"Tests";TAB(32)"Findings";TAB(45)" %";TAB(55)"Proportion";TAB(68)"Percentage"

13150 PRINT

13160 FOR I=1 TO N

13170 PRINT M$(I);TAB(22)INT(Y(I));TAB(32)INT(X(I));

13171 PRINT TAB(41)USING"###.####";(X(I)/Y(I))*100;

13172 PRINT TAB(55)USING"##.####";X(I)/T;

13175 PRINT TAB(70)USING"##.####";X(I)/T*100

13180 NEXT:PRINT

13195 PRINT TAB(5)"T o t a l";TAB(22)INT(TT);TAB(32)INT(T);TAB(56)"1.0000";TAB(69)"100.0000"

13196 PRINT:PRINT DS$;" "DAT$

13200 A$=INKEY$:IF A$="" THEN GOTO 13200

13301 CLS

13302 PRINT"    PROPORTIONS  OF  SPECIFIC  ETIOLOGICAL  AGENTS/ANTIBODIES'  FINDINGS"

13312 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 2 % of total  "INT(T);" findings)":PRINT

13316 PRINT:PRINT TAB(5)"Finding";TAB(25)"0         20        40        60        80       100 %"

13317 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

13319 FOR I=1 TO N

13320 Z=X(I)/T*50

13321 IF Z<1 THEN GOTO 13322 ELSE 13324

13322 IF Z>0 THEN GOTO 13323 ELSE 13324

13323 PRINT TAB(2)M$(I);TAB(25)CHR$(179);CHR$(249):GOTO 13333

13324 PRINT TAB(2)M$(I);TAB(25)CHR$(179);

13326 FOR K=1 TO X(I)/T*50

13328 PRINT CHR$(223);

13330 NEXT K

13333 NEXT I

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13981 CLS:M$="":X=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

13982 IF R$="y" OR R$="n" THEN GOTO 13983 ELSE 13990

13983 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

14000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

14002 IF Z$="y" OR Z$="n" THEN GOTO 14010 ELSE 14030

14010 IF Z$="y" THEN GOTO 14020 ELSE 14030

14020 CHAIN"EPIZ40MM.KOU"

14025 CLS:PRINT:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

14030 SYSTEM

 

4-Selected indicators of epizootic process dynamics

 

 5 ON ERROR GOTO 11995

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4004.KOU":REM:4/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"4-SELECTED INDICATORS OF EPIZOOTIC PROCESS DYNAMICS"

40 PRINT TAB(10)"==================================================="

500 PRINT:PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(10)"1-Comparative indexes of population health phenomena dynamics"

520 PRINT TAB(10)"2-Average of changing numbers of diseased animals, foci etc."

530 PRINT TAB(10)"3-Seasonality of population health/disease phenomena"

540 PRINT TAB(10)"4-Selected tendency indicators of morbidity and nidality"

550 PRINT TAB(10)"5-Relations between new cases and space/time/diseased/foci"

560 PRINT TAB(10)"6-Population 'vertical movement' and chronic disease process"

570 PRINT TAB(10)"7-Number of diseased animals according to survival rates"

580 PRINT TAB(10)"8-Territorial propagation of transmissible diseases"

590 PRINT TAB(10)"9-Development of disease frequency with cyclic tendency"

600 PRINT TAB(10)"10-Development of disease with ascending/descending tendency"

605 PRINT TAB(10)"11-Chronological time series of population health phenomenon":PRINT

610 PRINT TAB(10)"12-E N D  of this group of subprogrammes"

630 PRINT:PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 12000

660 IF Z$="y" THEN 20 ELSE GOTO 12000

670 PRINT

690 INPUT"         Enter choice number : ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.1-COMPARATIVE INDEXES OF POPULATION HEALTH PHENOMENA DYNAMICS"

1020 PRINT"==============================================================="

1030 PRINT"INPUT DATA:"

1031 INPUT"     phenomenon    ";FE$

1032 INPUT"     place, period ";LU$,PE$

1041 NA$="":X=0

1042 DIM NA$(20),X(20)

1049 INPUT"     number of evaluated subperiods or moments (2 up to 18 !) ";N

1050 IF N=0 OR N=1 OR N>18 THEN PRINT IDE$:GOTO 1980 ELSE 1055

1051 'IF N>18 THEN GOTO 1052 ELSE 1055

1052 'PRINT"Error ! More than 18 subperiods/moments ! New input !":GOTO 1049

1055 PRINT"List time (up to 15 characters), phenomenon values (major than 0 ! "

1056 PRINT"                                                -  except the last one):"

1060 FOR I=1 TO N

1062 PRINT TAB(10)I;": ";

1063 INPUT NA$(I),X(I)

1064 IF X(1)=<0 THEN PRINT IDE$:GOTO 1980 ELSE 1065

1065 NEXT I

1066 MAX=X(1)

1067 FOR I=2 TO N

1068 IF X(I)>MAX THEN MAX=X(I)

1069 NEXT I

1070 'PRINT"Note: If a variable is five or more times higher than the first one"

1071 'PRINT"the programme skips index graphs."

1080 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1081 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1082 IF I$="m" THEN GOTO 10

1083 IF I$="c" THEN GOTO 1000

1084 IF I$=CHR$(13) THEN GOTO 1100

1100 CLS:PRINT TAB(5)"COMPARATIVE  INDEXES  OF  POPULATION  HEALTH  PHENOMENA  DYNAMICS":PRINT

1111 PRINT"Phenomenon: "FE$

1112 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

1140 PRINT TAB(6)"Time";TAB(25)"Input Data";TAB(44)"Comparative   I n d e x"

1141 PRINT TAB(45)" Current";TAB(59)" Chain"

1145 PRINT

1150 REM:IF X(1)<0 THEN GOTO 1151 ELSE 1152

1151 PRINT" 1";TAB(6)USING"\              \";NA$(1);

1152 PRINT TAB(23)USING"#########.##";X(1);

1153 REM:PRINT TAB(2)"1";TAB(6)NA$(1);TAB(32)X(1);

1154 PRINT TAB(46)"100.0000";TAB(59)"100.0000"

1160 FOR I=2 TO N

1161 REM:IF X(I)<0 THEN GOTO 1170 ELSE 1171

1170 PRINT I;TAB(6)USING"\              \";NA$(I);

1171 PRINT TAB(23)USING"#########.##";X(I);

1172 REM:PRINT TAB(2)I;TAB(6)NA$(I);TAB(32)X(I);

1173 PRINT TAB(45)USING"####.#### ";(X(I)/X(1))*100;TAB(58)(X(I)/X(I-1)*100)

1180 NEXT I

1190 IF MAX>(X(1)*5) THEN GOTO 1450

1195 'FOR Z=2 TO N:IF (X(I))>(X(I-1)*5) THEN GOTO 1450 ELSE 1196 ??? nedoreseno !??

1200 A$=INKEY$:IF A$="" THEN GOTO 1200

1220 CLS:PRINT TAB(5)"COMPARATIVE  INDEXES  OF  POPULATION  HEALTH  PHENOMENA  DYNAMICS":PRINT

1221 PRINT TAB(5)"C u r r e n t  C o m p a r a t i v e  I n d e x  (fixed initial basis)"

1230 PRINT TAB(19)"(";CHR$(223);" represents 10% of initial "USING"#########.##";X(1);

1231 PRINT" )":PRINT

1234 PRINT TAB(6)"Time";TAB(24)"0        100       200       300       400       500 %"

1235 PRINT TAB(24);CHR$(179);"---------|---------|---------|---------|---------I"

1240 PRINT TAB(2)" 1";TAB(7)USING"\              \";NA$(1);

1241 PRINT TAB(24);CHR$(179);

1242 FOR P=1 TO 10:PRINT CHR$(223);

1243 NEXT P:PRINT" (= 100)"

1250 FOR I=2 TO N

1251 Z=(X(I)/X(1))*10

1252 IF Z<1 THEN GOTO 1253 ELSE 1260

1253 IF Z>0 THEN GOTO 1254 ELSE 1260

1254 PRINT TAB(2);I;TAB(7)USING"\              \";NA$(I);

1255 PRINT TAB(24)CHR$(179);CHR$(249):GOTO 1310

1260 PRINT TAB(2);I;TAB(7)USING"\              \";NA$(I);

1261 PRINT TAB(24)CHR$(179);

1270 FOR K=2 TO (X(I)/X(1))*10+1

1280 PRINT CHR$(223);

1290 NEXT K

1300 PRINT

1310 NEXT I:

1311 REM:Pro nedoreseni grafu s extremnimi hodnotami preskocit chain index

1312 GOTO 1450

1320 A$=INKEY$:IF A$="" THEN GOTO 1320

1330 CLS:PRINT TAB(5)"COMPARATIVE  INDEXES  OF  POPULATION  HEALTH  PHENOMENA  DYNAMICS":PRINT

1331 PRINT TAB(5)"C h a i n   C o m p a r a t i v e  I n d e x  (changing bases)"

1340 PRINT TAB(24)"(";CHR$(223);" represents 10% of previous value)":PRINT

1341 PRINT TAB(6)"Time";TAB(24)"0        100       200       300       400       500 %"

1342 PRINT TAB(24)CHR$(179);"---------|---------|---------|---------|---------I"

1350 PRINT TAB(2)" 1";TAB(7)USING"\              \";NA$(1);

1351 PRINT TAB(24)CHR$(179);

1353 FOR P=1 TO 10:PRINT CHR$(223);

1354 NEXT P:PRINT" (= 100)"

1360 FOR I=2 TO N

1361 Z=(X(I)/X(I-1))*10

1362 IF Z<1 THEN GOTO 1363 ELSE 1370

1363 IF Z>0 THEN GOTO 1364 ELSE 1370

1364 PRINT TAB(2)I;TAB(7)USING"\              \";NA$(I);

1365 PRINT TAB(24)CHR$(179);CHR$(249):GOTO 1420

1370 PRINT TAB(2)I;TAB(7)USING"\              \";NA$(I);

1371 PRINT TAB(24)CHR$(179);

1380 FOR K=2 TO (X(I)/X(I-1))*10+1

1390 PRINT CHR$(223);

1400 NEXT K

1410 PRINT

1420 NEXT I

1450 A$=INKEY$:IF A$="" THEN GOTO 1450

1453 CLS:PRINT TAB(5)"COMPARATIVE  INDEXES  OF  POPULATION  HEALTH  PHENOMENA  DYNAMICS":PRINT

1454 PRINT TAB(14)"C h a i n   c o m p a r a t i v e  i n d e x"

1457 PRINT TAB(14)"(";CHR$(223);" represents 2 % of the maximum   ";USING"#########.##";MAX;

1458 PRINT" )":PRINT

1460 PRINT TAB(7)"Time";TAB(24)"0         20        40        60        80       100 %"

1461 PRINT TAB(24)CHR$(179)"---------|---------|---------|---------|---------I"

1465 FOR I=1 TO N

1466 Z=(X(I)/MAX)*50

1467 IF Z<1 THEN GOTO 1468 ELSE 1471

1468 IF Z>0 THEN GOTO 1469 ELSE 1471

1469 PRINT TAB(2)I;TAB(7)USING"\              \";NA$(I);

1470 PRINT TAB(24)CHR$(179);CHR$(249):GOTO 1480

1471 PRINT TAB(2)I;TAB(7)USING"\              \";NA$(I);

1472 PRINT TAB(24)CHR$(179);

1473 FOR K=1 TO (X(I)/MAX)*50

1474 PRINT CHR$(223);

1475 NEXT K

1476 PRINT

1480 NEXT I

1980 ERASE NA$,X:X=0:NA$=""

1981 A$=INKEY$:IF A$="" THEN GOTO 1981

1982 GOTO 645

1983 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1984 IF R$="y" OR R$="n" THEN GOTO 1985 ELSE 1990

1985 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.2-AVERAGE OF CHANGING NUMBERS OF DISEASED ANIMALS, FOCI"

2001 PRINT"    AND OTHER EPI. PHENOMENA"

2005 PRINT"========================================================="

2010 PRINT TAB(6)"This subprogramme calculates average of:"

2011 PRINT TAB(10)"1) changing numbers of diseased animals"

2012 PRINT TAB(10)"2) changing numbers of foci (outbreaks)"

2013 PRINT TAB(10)"3) changing numbers of epi. phenomenon units"

2015 INPUT"     Enter choice number: ",S

2016 IF S=1 OR S=2 OR S=3 THEN GOTO 2020 ELSE PRINT IDM$:GOTO 2590

2020 PRINT:PRINT"INPUT DATA:"

2021 IF S=1 THEN GOTO 2022 ELSE 2025

2022 INPUT"     disease(s) ";DI$:GOTO 2040

2025 IF S=2 THEN GOTO 2026 ELSE 2030

2026 INPUT"     foci ";FO$:GOTO 2040

2030 IF S=3 THEN GOTO 2031

2031 INPUT"     epi. phenomenon ";EP$

2040 IF S=1 THEN INPUT"     species, category(ies) ";SP$,CA$

2043 INPUT"     place ";LU$

2044 INPUT"     time (initial and final dates of the period) ";PE$

2045 INPUT"     time measure units ";UT$

2050 IF S=1 THEN GOTO 2051 ELSE 2060

2051 PRINT"     number of diseased animals existing"

2052 INPUT"                           at the beginning of period         ";A

2053 'IF A<=0 THEN GOTO 2051 ELSE 2054

2054 PRINT"     number of diseased animals existing"

2055 INPUT"                             at the end of the period         ";B:GOTO 2090

2060 IF S=2 THEN GOTO 2061 ELSE 2070

2061 PRINT"     number of foci (outbreaks) existing"

2062 INPUT"                       at the beginning of the period         ";A

2063 'IF A<=0 THEN GOTO 2061 ELSE 2064

2064 PRINT"     number of foci (outbreaks) existing"

2065 INPUT"                             at the end of the period         ";B:GOTO 2090

2070 IF S=3 THEN GOTO 2071 ELSE 2094

2071 INPUT"     epi. phenomenon measure units ";EPMU$

2072 PRINT"     number of epi. phenomenon measure units"

2073 INPUT"                       at the beginning of the period         ";A

2074 'IF A<=0 THEN GOTO 2072 ELSE 2075

2075 PRINT"     number of epi. phenomenon measure units"

2076 INPUT"                             at the end of the period         ";B:GOTO 2090

2090 INPUT"     total duration of the given period in time measure units ";C

2091 INPUT"     subperiods' average duration in time measure units       ";D#

2092 IF (A+B)=0 OR C=0 OR D#=0 THEN PRINT IDM$:GOTO 2590

2094 IF A=B THEN PRINT"Error ! Initial and final data must be different !":GOTO 2590

2095 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2096 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2097 IF I$="m" THEN GOTO 10

2098 IF I$="c" THEN GOTO 2000

2099 IF I$=CHR$(13) THEN GOTO 2100

2100 CLS:PRINT:PRINT"RESULT:":PRINT

2110 IF S=1 THEN GOTO 2112 ELSE 2114

2112 PRINT TAB(6)"Disease(s): "DI$

2114 IF S=2 THEN GOTO 2115 ELSE 2118

2115 PRINT TAB(6)"Foci: "FO$

2118 IF S=3 THEN PRINT TAB(5)"Epi. phenomenon: "EP$

2119 PRINT:PRINT"Place: "LU$;TAB(50)"Period: "PE$

2120 IF S=1 THEN PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

2121 IF S=3 THEN PRINT TAB(5)"Phenomenon measure units: "EPMU$

2123 PRINT"Number at the beginning: "INT(A);TAB(40)"Number at the end: "INT(B)

2125 PRINT"Duration in "UT$;":"

2126 PRINT"                      Total period: "INT(C)

2127 PRINT"                      Subperiods' average: "D#:PRINT

2130 IF A>B THEN W$="- " ELSE W$=""

2140 IF S=1 THEN Z$="diseased animals"

2142 IF S=2 THEN Z$="foci (outbreaks)"

2146 IF S=3 THEN Z$="epi. phenomena"

2150 IF A<0 THEN A=0.0001

2151 IF B<0 THEN B=0.0001

2515 PRINT:PRINT"     Absolute difference between initial and final number"

2516 PRINT"          of "Z$"                                  =  "INT((B-A)+.5):PRINT

2520 PRINT"     Average absolute value of the change of number"

2530 PRINT"          of "Z$" during one subperiod             =  ";INT((B-A)/(C/D#)+.5)

2540 PRINT

2541 'IF A=0 OR B=0 THEN GOTO 2590

2550 PRINT"     Average relative value of the change of initial number "

2560 PRINT"          of "Z$" during one subperiod             =  ";W$;

2570 PRINT USING"###.## %";(((B-A)/(C/D#))/(B-A))*100

2590 A$=INKEY$:IF A$="" THEN GOTO 2590

2600 CLS:A=0:B=0:C=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2601 IF R$="y" OR R$="n" THEN GOTO 2610 ELSE 2990

2610 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.3-SEASONALITY OF POPULATION HEALTH/DISEASE  PHENOMENA"

3010 PRINT"======================================================="

3011 PRINT"This subprogramme calculates seasonality of:"

3012 PRINT"1) disease(s); 2) other phenomenon (outbreaks, vaccination, costs, losses, etc.)"

3015 INPUT"     Enter choice number:  ",CH

3020 IF CH=1 OR CH=2 THEN GOTO 3050 ELSE PRINT IDE$:GOTO 3890

3050 PRINT"INPUT DATA:"

3053 IF CH=1 THEN GOTO 3054 ELSE 3060

3054 INPUT"     disease(s) ";DI$

3055 INPUT"     species, category(ies) ";SP$,CA$:GOTO 3064

3060 IF CH=2 THEN INPUT"     epi. phenomenon ";FE$

3064 INPUT"     place, period ";LU$,AN$

3065 INPUT"     indicator measure units ";IMU$

3066 INPUT"     number of years (up to 10 !) ";NY

3067 IF NY>10 OR NY=0 THEN PRINT IDE$:GOTO 3890 ELSE 3068

3068 PRINT" Absolute monthly values (if more years' data - key commas between them !)"

3071 INPUT"             January     ";E1,E2,E3,E4,E5,E6,E7,E8,E9,E10

3072 INPUT"             February    ";F1,F2,F3,F4,F5,F6,F7,F8,F9,F10

3073 INPUT"             March       ";M1,M2,M3,M4,M5,M6,M7,M8,M9,M10

3074 INPUT"             April       ";A1,A2,A3,A4,A5,A6,A7,A8,A9,A10

3075 INPUT"             May         ";Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,Y10

3076 INPUT"             June        ";J1,J2,J3,J4,J5,J6,J7,J8,J9,J10

3077 INPUT"             July        ";U1,U2,U3,U4,U5,U6,U7,U8,U9,U10

3078 INPUT"             August      ";G1,G2,G3,G4,G5,G6,G7,G8,G9,G10

3079 INPUT"             September   ";S1,S2,S3,S4,S5,S6,S7,S8,S9,S10

3080 INPUT"             October     ";O1,O2,O3,O4,O5,O6,O7,O8,O9,O10

3081 INPUT"             November    ";N1,N2,N3,N4,N5,N6,N7,N8,N9,N10

3082 INPUT"             December    ";D1,D2,D3,D4,D5,D6,D7,D8,D9,D10

3083 E=E1+E2+E3+E4+E5+E6+E7+E8+E9+E10

3084 F=F1+F2+F3+F4+F5+F6+F7+F8+F9+F10

3085 M=M1+M2+M3+M4+M5+M6+M7+M8+M9+M10

3086 A=A1+A2+A3+A4+A5+A6+A7+A8+A9+A10

3087 Y=Y1+Y2+Y3+Y4+Y5+Y6+Y7+Y8+Y9+Y10

3088 J=J1+J2+J3+J4+J5+J6+J7+J8+J9+J10

3089 U=U1+U2+U3+U4+U5+U6+U7+U8+U9+U10

3090 G=G1+G2+G3+G4+G5+G6+G7+G8+G9+G10

3091 S=S1+S2+S3+S4+S5+S6+S7+S8+S9+S10

3092 O=O1+O2+O3+O4+O5+O6+O7+O8+O9+O10

3093 N=N1+N2+N3+N4+N5+N6+N7+N8+N9+N10

3094 D=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10

3095 LET T=E+F+M+A+Y+J+U+G+S+O+N+D

3096 IF T=0 THEN PRINT IDM$:GOTO 3980

3097 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3098 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3099 IF I$="m" THEN GOTO 10

3100 IF I$="c" THEN GOTO 3000

3101 IF I$=CHR$(13) THEN GOTO 3102

3102 CLS:PRINT:PRINT"     S E A S O N A L I T Y  OF POPULATION HEALTH/DISEASE  PHENOMENA":PRINT

3112 IF CH=1 THEN GOTO 3120 ELSE 3122

3120 PRINT"Disease(s): "DI$

3121 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:GOTO 3123

3122 PRINT"Epi. phenomenon: "FE$

3123 PRINT"Place: "LU$;TAB(50)"Year(s): "AN$

3124 PRINT"Indicator units: "IMU$;TAB(40)"Total cases/units: "INT(T+.5):PRINT

3125 PRINT TAB(21)"Total Number";TAB(38)"%";TAB(46)"Monthly Average";TAB(65)"Season Index"

3127 Z=T/(NY*12)

3130 PRINT

3131 PRINT"     January ";TAB(20)USING"#######.##";E;TAB(35)USING"##.#### ";100*E/T;TAB(47)USING"#######.##";E/NY;

3132 PRINT TAB(65)USING"####.####  %";((E/NY)/Z)*100

3134 PRINT"     February";TAB(20)USING"#######.##";F;TAB(35)USING"##.#### ";100*F/T;TAB(47)USING"#######.##";F/NY;

3135 PRINT TAB(65)USING"####.####  %";((F/NY)/Z)*100

3137 PRINT"     March   ";TAB(20)USING"#######.##";M;TAB(35)USING"##.#### ";100*M/T;TAB(47)USING"#######.##";M/NY;

3138 PRINT TAB(65)USING"####.####  %";((M/NY)/Z)*100

3140 PRINT"     April   ";TAB(20)USING"#######.##";A;TAB(35)USING"##.#### ";100*A/T;TAB(47)USING"#######.##";A/NY;

3141 PRINT TAB(65)USING"####.####  %";((A/NY)/Z)*100

3143 PRINT"     May     ";TAB(20)USING"#######.##";Y;TAB(35)USING"##.#### ";100*Y/T;TAB(47)USING"#######.##";Y/NY;

3144 PRINT TAB(65)USING"####.####  %";((Y/NY)/Z)*100

3146 PRINT"     June    ";TAB(20)USING"#######.##";J;TAB(35)USING"##.#### ";100*J/T;TAB(47)USING"#######.##";J/NY;

3147 PRINT TAB(65)USING"####.####  %";((J/NY)/Z)*100

3149 PRINT"     July    ";TAB(20)USING"#######.##";U;TAB(35)USING"##.#### ";100*U/T;TAB(47)USING"#######.##";U/NY;

3150 PRINT TAB(65)USING"####.####  %";((U/NY)/Z)*100

3152 PRINT"     August  ";TAB(20)USING"#######.##";G;TAB(35)USING"##.#### ";100*G/T;TAB(47)USING"#######.##";G/NY;

3153 PRINT TAB(65)USING"####.####  %";((G/NY)/Z)*100

3155 PRINT"     September";TAB(20)USING"#######.##";S;TAB(35)USING"##.#### ";100*S/T;TAB(47)USING"#######.##";S/NY;

3156 PRINT TAB(65)USING"####.####  %";((S/NY)/Z)*100

3157 PRINT"     October ";TAB(20)USING"#######.##";O;TAB(35)USING"##.#### ";100*O/T;TAB(47)USING"#######.##";O/NY;

3158 PRINT TAB(65)USING"####.####  %";((O/NY)/Z)*100

3159 PRINT"     November";TAB(20)USING"#######.##";N;TAB(35)USING"##.#### ";100*N/T;TAB(47)USING"#######.##";N/NY;

3160 PRINT TAB(65)USING"####.####  %";((N/NY)/Z)*100

3161 PRINT"     December";TAB(20)USING"#######.##";D;TAB(35)USING"##.#### ";100*D/T;TAB(47)USING"#######.##";D/NY;

3162 PRINT TAB(65)USING"####.####  %";((D/NY)/Z)*100

3163 PRINT

3164 PRINT"     T o t a l";TAB(19)USING"########.##";T;

3165 PRINT TAB(34)"100.0000";TAB(47)USING"#######.##";T/(NY*12)

3168 A$=INKEY$:IF A$="" THEN GOTO 3168

3169 C=0

3170 DIM C(12)

3220 LET C(1)=100*E/T

3221 LET C(2)=100*F/T

3222 LET C(3)=100*M/T

3223 LET C(4)=100*A/T

3224 LET C(5)=100*Y/T

3225 LET C(6)=100*J/T

3226 LET C(7)=100*U/T

3227 LET C(8)=100*G/T

3228 LET C(9)=100*S/T

3229 LET C(10)=100*O/T

3230 LET C(11)=100*N/T

3231 LET C(12)=100*D/T:PRINT

3232 MAX=C(1)

3233 FOR I = 2 TO 12

3234 IF C(I)>MAX THEN MAX=C(I)

3235 NEXT I

3236 CLS:PRINT:PRINT TAB(15)" S   E   A   S   O   N   A   L   I   T   Y":PRINT

3237 'PRINT"MAX,C(I)= "MAX,C(1),C(2),C(3),C(12)

3238 IF MAX<50 THEN GOTO 3240 ELSE 3300

3240 PRINT TAB(16)"(";CHR$(223);" represents 1 % of total ";INT(T);" cases/units)":PRINT

3244 PRINT:PRINT TAB(5)"Month";TAB(15)"0         10        20        30        40        50 %"

3245 PRINT TAB(15)CHR$(179);"---------|---------|---------|---------|---------I

3250 FOR I=1 TO 12

3251 Z=C(I)

3252 IF Z<1 THEN GOTO 3253 ELSE 3255

3253 IF Z>0 THEN GOTO 3254 ELSE 3255

3254 PRINT TAB(5)I;TAB(15);CHR$(179);CHR$(249):GOTO 3280

3255 PRINT TAB(5)I;TAB(15);CHR$(179);

3260 FOR K=1 TO C(I)

3261 PRINT CHR$(223);

3270 NEXT K

3275 PRINT

3280 NEXT I:GOTO 3890

3300 PRINT TAB(16)"(";CHR$(223);" represents 2 % of total ";T;" cases/units)":PRINT

3344 PRINT:PRINT TAB(5)"Month";TAB(15)"0         20        40        60        80       100  %"

3345 PRINT TAB(15)CHR$(179);"---------|---------|---------|---------|---------I

3350 FOR I=1 TO 12

3351 Z=C(I)/2

3352 IF Z<1 THEN GOTO 3353 ELSE 3355

3353 IF Z>0 THEN GOTO 3354 ELSE 3355

3354 PRINT TAB(5)I;TAB(15);CHR$(179);CHR$(249):GOTO 3380

3355 PRINT TAB(5)I;TAB(15);CHR$(179);

3360 FOR K=1 TO C(I)/2

3361 PRINT CHR$(223);

3370 NEXT K

3375 PRINT

3380 NEXT I

3890 ERASE C:C=0:C(I)=0:C(1)=0:MAX=0:NY=0

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 GOTO 645

3982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) o no(n) ";R$

3983 IF R$="y" OR R$="n" THEN GOTO 3984 ELSE 3990

3984 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.4-SELECTED TENDENCY INDICATORS OF MORBIDITY AND NIDALITY"

4010 PRINT"=========================================================="

4020 PRINT TAB(6)"This subprogramme calculates tendency indicators of:"

4021 PRINT TAB(10)"1) animal disease morbidity"

4026 PRINT TAB(10)"2) animal disease nidality "

4030 INPUT"     Enter choice number:  ",S

4035 IF S=1 OR S=2 THEN GOTO 4050 ELSE PRINT IDE$:GOTO 4490

4050 PRINT:PRINT"INPUT DATA:"

4052 INPUT"     disease(s) ";EN$

4058 INPUT"     species, category(ies) ";ES$,CA$

4059 INPUT"     place, period ";LU$,PE$

4060 PRINT

4070 IF S=1 THEN GOTO 4071 ELSE 4080

4071 PRINT"     number of diseased animals"

4072 INPUT"                             at the beginning of the period    ";DB

4073 PRINT"     number of diseased animals"

4074 INPUT"                             existing in the period            ";DP

4075 PRINT"     average number of diseased animals"

4076 INPUT"                             existing in the period            ";DA:PRINT

4077 INPUT"     number of new diseased animals in the period              ";A:PRINT

4078 PRINT"     number of extinct diseased animals "

4079 INPUT"       (dead+slaughtered+removed+recovered) in the period      ";B:GOTO 4090

4080 IF S=2 THEN GOTO 4082

4082 PRINT"     number of foci (outbreaks)"

4083 INPUT"                             at the beginning of the period    ";DB

4084 PRINT"     number of foci (outbreaks)"

4085 INPUT"                             existing in the period            ";DP

4086 PRINT"     average number of foci (outbreaks)"

4087 INPUT"                             existing in the period            ";DA:PRINT

4088 INPUT"     number of new foci (outbreaks) in the period              ";A:PRINT

4089 INPUT"     number of extinct foci (outbreaks) in the period          ";B

4090 IF B>(DB+A) THEN GOTO 4091 ELSE 4093

4091 PRINT"Error ! Number of extinct cases cannot be major than the sum of the existing"

4092 PRINT"at the beginning and the new ones !":GOTO 4490

4093 IF DP>0 AND A<>(DP-DB) THEN GOTO 4094 ELSE 4096

4094 PRINT"Error ! Number of new cases cannot be different to the number of existing"

4095 PRINT"in the period reduced by the number at the beginning !":GOTO 4490

4096 IF (DB+DP+DA+A+B)=0 THEN PRINT:PRINT IDM$:GOTO 4490 ELSE 4097

4097 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4098 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4099 IF I$="m" THEN GOTO 10

4100 IF I$="c" THEN GOTO 4000

4101 IF I$=CHR$(13) THEN GOTO 4102

4102 CLS:PRINT:PRINT:PRINT"RESULT:":PRINT

4110 PRINT TAB(6)"Disease(s): "EN$

4112 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

4120 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

4131 IF A=0 THEN A=.0001:IF B=0 THEN B=.0001

4140 IF S=1 THEN Z$="morbidity"

4144 IF S=2 THEN Z$="nidality"

4146 IF S=1 THEN Y$="diseased animals"

4148 IF S=2 THEN Y$="outbreaks"

4220 IF A>0 AND B>0 THEN GOTO 4300

4230 IF A>0 AND D>0 THEN GOTO 4320 ELSE 4240

4240 IF A>0 AND B>0 AND D>0 THEN GOTO 4340 ELSE 4980

4300 IF S=1 THEN PRINT"     Difference between new and extinct diseased animals";TAB(62)"    = "INT(A-B):PRINT

4305 IF S=1 THEN PRINT"     Ratio of new/extinct diseased animals ";TAB(62)"    =";USING"###.####";A/B

4306 IF S=1 THEN PRINT"     Ratio of extinct/new diseased animals ";TAB(62)"    =";USING"###.####";B/A

4308 IF S=2 THEN PRINT"     Difference between new and extinct outbreaks";TAB(62)"   = "INT(A-B):PRINT

4312 IF S=2 THEN PRINT"     Ratio of new/extinct outbreaks";TAB(62)"   ="USING"###.####";A/B

4313 IF S=2 THEN PRINT"     Ratio of extinct/new outbreaks";TAB(62)"   ="USING"###.####";B/A

4314 PRINT:GOTO 4400

4315 'IF A>0 AND DB>0 THEN PRINT"     Ratio of new to initial number of "Y$;TAB(62)" = ";USING"###.####";A/DB

4316 'IF B>0 AND DB>0 THEN PRINT"     Ratio of extinct to initial number of "Y$;TAB(62)" = ";USING"###.####";B/DB

4317 'PRINT

4320 REM:PRINT"     Index of "Z$;" relative stability tendency";TAB(62)" = ";USING"###.####";(1-(A/(A+DB)))

4330 REM:PRINT"     Index of "Z$;" relative instability tendency";TAB(62)" = ";USING"###.####";A/(A+DB)

4331 'PRINT:GOTO 4240

4340 'PRINT"     Index of "Z$;" decreasing tendency";TAB(62)" = ";USING"###.####";(B-A)/DB

4350 'PRINT"     Index of "Z$;" increasing tendency";TAB(62)" = ";USING"###.####";(A-B)/DB

4400 IF A>0 AND DB>0 THEN PRINT"     Index of ";Z$;" stability tendency to initial number     =";USING"###.####";1-(A/DB)

4402 IF A>0 AND DP>0 THEN PRINT"     Index of ";Z$;" stability tendency to existing number    =";USING"###.####";1-(A/DP)

4404 IF A>0 AND DA>0 THEN PRINT"     Index of ";Z$;" stability tendency to average number     =";USING"###.####";1-(A/DA):PRINT

4410 IF A>0 AND B>0 AND DB>0 THEN PRINT"     Index of ";Z$;" reduction tendency to initial number     =";USING"###.####";(B-A)/DB

4412 IF A>0 AND B>0 AND DP>0 THEN PRINT"     Index of ";Z$;" reduction tendency to existing number    =";USING"###.####";(B-A)/DP

4414 IF A>0 AND B>0 AND DA>0 THEN PRINT"     Index of ";Z$;" reduction tendency to average number     =";USING"###.####";(B-A)/DA:PRINT

4420 IF A>0 AND B>0 AND DB>0 THEN PRINT"     Index of ";Z$;" increasing tendency to initial number    =";USING"###.####";(A-B)/DB

4422 IF A>0 AND B>0 AND DP>0 THEN PRINT"     Index of ";Z$;" increasing tendency to existing number   =";USING"###.####";(A-B)/DP

4424 IF A>0 AND B>0 AND DA>0 THEN PRINT"     Index of ";Z$;" increasing tendency to average number    =";USING"###.####";(A-B)/DA:PRINT

4490 A$=INKEY$:IF A$="" THEN GOTO 4490

4980 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.5-RELATIONS BETWEEN NEW CASES AND SPACE/TIME/DISEASED/FOCI"

5010 PRINT"============================================================"

5020 PRINT TAB(6)"This subprogramme calculates following indicators of diseases spreading:"

5021 PRINT TAB(10)"1) ratios of disease new cases/space units"

5022 PRINT TAB(10)"2) ratios of disease new cases/time units (disease frequency)"

5024 PRINT TAB(10)"3) ratios of disease new cases/total diseased animals"

5026 PRINT TAB(10)"4) ratios of new/total foci"

5030 INPUT"     Enter choice number: ",S

5040 IF S=1 OR S=2 OR S=3 OR S=4 THEN GOTO 5050 ELSE PRINT IDE$:GOTO 5980

5050 PRINT:PRINT"INPUT DATA:"

5051 INPUT"     disease(s) ";DI$

5052 INPUT"     species, category(ies) ";ES$,CA$

5053 INPUT"     place, period ";LU$,TI$:PRINT

5054 IF S=1 OR S=2 OR S=3 THEN INPUT"     definition of new cases ";NC$:PRINT

5055 IF S=4 THEN GOTO 5056 ELSE 5060

5056 INPUT"     definition of new foci ";NC$:PRINT

5057 INPUT"     number of new foci                                     ";F

5058 IF F<=0 THEN PRINT IDM$:GOTO 5980 ELSE 5059

5059 GOTO 5068

5060 INPUT"     number of disease new cases                            ";DN

5061 IF DN<=0 THEN PRINT IDM$:GOTO 5980 ELSE 5065

5065 IF S=1 THEN GOTO 5070

5066 IF S=2 THEN GOTO 5080

5067 IF S=3 THEN GOTO 5090

5068 IF S=4 THEN GOTO 5150

5070 INPUT"     space measure unit (up to 5 characters !)              ";SMU$

5072 INPUT"     number of space measure units of the territory         ";SUT

5073 IF SUT=0 THEN PRINT IDM$:GOTO 5980 ELSE 5180

5080 INPUT"     time measure unit (up to 5 characters !)               ";TMU$

5082 INPUT"     number of time measure units of the period             ";TUP

5083 IF TUP=0 THEN PRINT IDM$:GOTO 5980 ELSE 5180

5090 PRINT"     total number of diseased animals"

5091 INPUT"                        at the beginning of the period      ";DAO

5092 PRINT"     total number of diseased animals existing"

5094 INPUT"                                     in the period          ";DAP

5096 PRINT"     total average number of diseased animals

5098 INPUT"                            existing in the period          ";DAA:GOTO 5159

5150 PRINT"     total number of foci existing"

5151 INPUT"                        at the beginning of the period      ";FO

5152 INPUT"     total number of foci existing in the period            ";FP

5156 PRINT"     total average number of foci

5158 INPUT"                            existing in the period          ";FA

5159 IF (DAO+DAP+DAA+FO+FP+FA)=0 THEN PRINT IDM$:GOTO 5980

5180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5182 IF I$="m" THEN GOTO 10

5183 IF I$="c" THEN GOTO 5000

5185 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT:PRINT"RESULT:":PRINT

5204 PRINT TAB(6)"Disease(es): "DI$

5205 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

5206 PRINT"Definition of new cases: "NC$

5207 PRINT"Place: "LU$;TAB(50)"Period: "TI$:PRINT

5210 IF S=1 THEN GOTO 5220 ELSE 5211

5211 IF S=2 THEN GOTO 5250 ELSE 5212

5212 IF S=3 THEN GOTO 5270 ELSE 5214

5214 IF S=4 THEN GOTO 5300 ELSE 5980

5220 PRINT:PRINT

5221 PRINT"   Ratio of disease new cases per one space unit  =  "USING"####.####";DN/SUT;

5222 PRINT" / ";USING"\    \";SMU$

5223 PRINT:PRINT"   Ratio of territory per one new case of disease =  "USING"####.####";SUT/DN;

5224 PRINT"  ";USING"\    \";SMU$;

5225 PRINT" :  1":PRINT:GOTO 5980

5250 PRINT:PRINT

5251 PRINT"   Ratio of disease new cases per one time unit      =  "USING"####.####";DN/TUP;

5252 PRINT" / ";USING"\    \";TMU$

5253 PRINT:PRINT"   Ratio of time period per one new case of disease  =  "USING"####.####";TUP/DN;

5254 PRINT"  ";USING"\   \";TMU$;

5255 PRINT" :  1":PRINT:GOTO 5980:'chybi 's' - byla velka mezera !

5270 PRINT

5271 IF DN>0 AND DAO>0 THEN GOTO 5272 ELSE 5276

5272 PRINT"     Ratio of disease new cases per one diseased animal"

5273 PRINT"                   existing at the beginning of the period  = "USING"####.####";DN/DAO

5274 PRINT"     Ratio of diseased animals existing at the beginning"

5275 PRINT"                 of the period per one new case of disease  = "USING"####.####";DAO/DN

5276 IF DN>0 AND DAP>0 THEN GOTO 5277 ELSE 5281

5277 PRINT:PRINT"     Ratio of disease new cases per one diseased"

5278 PRINT"                        animals existing in the period      = "USING"####.####";DN/DAP

5279 PRINT"     Ratio of diseased animals existing in the period"

5280 PRINT"                               per one new case of disease  = "USING"####.####";DAP/DN

5281 IF DN>0 AND DAA>0 THEN GOTO 5282 ELSE 5980

5282 PRINT:PRINT"     Ratio of disease new cases per one diseased "

5283 PRINT"                animal of average number in the period      = "USING"####.####";DN/DAA

5284 PRINT"     Ratio of diseased animals' average number existing"

5285 PRINT"                 in the period per one new case of disease  = "USING"####.####";DAA/DN

5286 GOTO 5980

5300 IF F>0 AND FO>0 THEN GOTO 5302 ELSE 5307

5302 PRINT"     Ratio of new foci per one focus"

5303 PRINT"                   existing at the beginning of the period  = "USING"####.####";F/FO

5304 PRINT"     Ratio of foci existing at the beginning"

5305 PRINT"                        of the period per one new focus     = "USING"####.####";FO/F

5307 IF F>0 AND FP>0 THEN GOTO 5308 ELSE 5312

5308 PRINT:PRINT"     Ratio of new foci per one focus"

5309 PRINT"                                existing in the period      = "USING"####.####";F/FP

5310 PRINT"     Ratio of foci existing in the period"

5311 PRINT"                                      per one new focus     = "USING"####.####";FP/F

5312 IF F>0 AND FA>0 THEN GOTO 5314 ELSE 5980

5314 PRINT:PRINT"     Ratio of new foci per one focus"

5316 PRINT"                     of average existing in the period      = "USING"####.####";F/FA

5317 PRINT"     Ratio of average number of foci existing"

5318 PRINT"                       in the period per one new focus      = "USING"####.####";FA/F

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.6-POPULATION 'VERTICAL MOVEMENT' AND CHRONIC DISEASE EPIZOOTIC PROCESS"

6002 PRINT"========================================================================"

6010 PRINT TAB(3)"This subprogramme calculates:"

6022 PRINT TAB(6)"1) combination of existing, new and extinct diseased animals"

6025 PRINT TAB(6)"2) diseased animals' replacement rates"

6026 PRINT TAB(6)"3) estimate of remaining diseased animals within one generation cycle"

6028 PRINT TAB(6)"4) estimate of remaining diseased animals"

6029 PRINT"                   within one regular continuing production/breeding cycle"

6031 INPUT"  Enter choice number: ",S

6040 IF S=1 OR S=2 OR S=3 OR S=4 THEN GOTO 6062 ELSE PRINT IDE$:GOTO 6980

6062 PRINT"INPUT DATA"

6063 INPUT"     disease(s) ";DI$

6064 INPUT"     species, category(ies) ";SP$,CA$

6065 INPUT"     place, period ";PL$,TI$

6068 IF S=1 THEN GOTO 6070 ELSE 6080

6070 PRINT"Question about indicator to be calculated  l e a v e   w i t h o u t  a n y"

6071 PRINT"     a n s w e r, however the other three data must be given !":PRINT

6072 INPUT"     number of diseased animals existing at the beginning         ";AO

6073 PRINT"     number of new diseased animals"

6074 INPUT"               (newly diseased+new born diseased+introduced)      ";AN

6075 PRINT"     number of extinct diseased animals"

6076 INPUT"                       (dead+slaughtered+removed+recovered)       ";AE

6077 INPUT"     number of diseased animals existing at the end of the period ";AF

6078 IF (AO+AN+AE+AF)=0 THEN PRINT IDM$:GOTO 6980 ELSE 6100

6080 IF S=2 THEN GOTO 6081 ELSE 6088

6081 PRINT"     number of new diseased animals"

6082 INPUT"               (newly diseased+new born diseased+introduced)       ";AB

     IF AB=0 THEN PRINT IDE$:GOTO 6980 ELSE 6083

6083 PRINT"     total number of diseased animals existing"

6084 INPUT"                               at the beginning of the period      ";AO2

6085 INPUT"     total number of diseased animals existing in the period       ";AP

6086 INPUT"     average number of diseased animals existing in the period     ";AA:PRINT

6087 INPUT"     duration (in days) of one population reproduction cycle       ";RC:GOTO 6100

6088 IF S=3 THEN GOTO 6089 ELSE 6094

6089 PRINT:INPUT"   total number of diseased animals at the beginning of the period ";AO3

     IF AO3=0 THEN PRINT IDE$:GOTO 6980

6090 PRINT"   duration (in days) of one regular generation"

6091 INPUT"                            (replacement/reproduction) cycle       ";RC

6092 PRINT"   duration (in days) between the initial and evaluated "

6093 INPUT"                     days  w i t h i n  the generation cycle       ";PX:GOTO 6100

6094 IF S=4 THEN GOTO 6095

6095 PRINT:INPUT"   total number of diseased animals at the beginning of the period  ";AOP

6096 PRINT"   duration (in days) of one regular continuing "

6097 INPUT"                          production/breeding replacement cycle     ";PPC

6098 PRINT"   duration (in days) between the initial and evaluated days"

6099 INPUT"                     w i t h i n  the production/breeding cycle     ";PPX

     IF AOP=0 OR PPC=0 OR PPX=0 OR PPX=>PPC THEN PRINT IDE$:GOTO 6980

6100 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6101 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6102 IF I$="m" THEN GOTO 10

6103 IF I$="c" THEN GOTO 6000

6104 IF I$=CHR$(13) THEN GOTO 6105

6105 CLS:PRINT"     POPULATION 'VERTICAL MOVEMENT' AND CHRONIC DISEASE EPIZOOTIC PROCESS":PRINT

6106 PRINT TAB(6)"Disease(s): "DI$

6107 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

6108 PRINT"Place: "PL$;TAB(50)"Period: "TI$:PRINT

6109 PRINT

6110 IF S=1 THEN GOTO 6133 ELSE 6150

6133 IF AO=0 THEN GOTO 6134 ELSE 6136

6134 PRINT"     Number of diseased animals at the beginning of the period = "INT((AF-AN+AE)):PRINT

6135 PRINT"     Number of diseased animals existing in the period         = "INT(((AF-AN+AE)+AN)):GOTO 6145

6136 IF AN=0 THEN GOTO 6137 ELSE 6139

6137 PRINT"     Number of new diseased animals in the period              = "INT((AF-AO+AE)):PRINT

6138 PRINT"     Number of diseased animals existing in the period         = "INT(((AF-AN+AE)+AN)):PRINT:GOTO 6145

6139 IF AE=0 THEN GOTO 6140 ELSE 6142

6140 PRINT"     Number of extinct diseased animals in the period          = "INT((AO-AF+AN)):PRINT

6141 PRINT"     Number of diseased animals existing in the period         = "INT((AO+AN)):PRINT:GOTO 6145

6142 IF AF=0 THEN PRINT"     Number of diseased animals at the end of the period       = "INT((AO+AN-AE)):PRINT

6143 PRINT"     Number of diseased animals existing in the period         = "INT(AO+AN):PRINT

6145 GOTO 6980

6150 IF S=2 THEN GOTO 6160 ELSE 6200

6160 IF AB>0 AND AO2>0 THEN PRINT"     Diseased animals' replacement rate to initial number    =   ";USING"#.####";(AB+AI)/AO2

6162 IF AB>0 AND AP>0 THEN PRINT"     Diseased animals' replacement rate to existing number   =   ";USING"#.####";(AB+AI)/AP

6164 IF AB>0 AND AA>0 THEN PRINT"     Diseased animals' replacement rate to average number    =   ";USING"#.####";(AB+AI)/AA

6170 IF RC>0 THEN PRINT:PRINT"     Ratio year/population reproduction cycle                =  ";USING"##.####";365/RC

6171 IF RC>0 THEN PRINT"     Number of years of population reproduction cycle        =  ";USING"##.####";RC/365

6172 GOTO 6980

6200 IF S=3 AND AO3>0 THEN GOTO 6210 ELSE 6250

6210 PRINT"     Estimated number of diseased animals existing at the beginning "

6211 PRINT:PRINT"                     and still remaining */ at the evaluated day  = "INT((AO3*(1-PX/RC))+.5):PRINT

6212 PRINT:PRINT:PRINT"     */ Note: If not eliminated prematurely and in the absence of migration."

6213 GOTO 6980

6250 IF S=4 AND AOP>0 THEN GOTO 6251 ELSE 6980

6251 PRINT"     Estimated number of diseased animals existing at the beginning "

6252 PRINT:PRINT"                     and still remaining */ at the evaluated day  = "INT((AOP*(1-PPX/PPC))+.5):PRINT

6260 PRINT:PRINT:PRINT"     */ Note: If not eliminated prematurely and in absence of migration."

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.7-NUMBER OF DISEASED ANIMALS ACCORDING TO SURVIVAL RATES"

7020 PRINT"=========================================================="

7050 PRINT"INPUT DATA:"

7065 INPUT"     disease(s) ";DI$

7072 INPUT"     species, category(ies) ";ES$,CA$

7073 INPUT"     place, period ";LU$,PE$

7080 INPUT"     total number of diseased animals at the beginning ";A

7081 IF A=0 THEN PRINT IDM$:GOTO 7980 ELSE 7084

7084 INPUT"     number (2 up to 11 !) of age subperiods ";N

7085 IF N<2 OR N>11 THEN PRINT IDE$:GOTO 7980

7089 PRINT"List data: "

7090 PRINT"names (up to 10 characters) of subperiods, coefficients of diseased animals "

7091 PRINT"survival probability (in form of rates, i.e. numbers between >0 and 1 !) :"

7094 FOR I=1 TO N

7095 PRINT TAB(15)I;":  ";

7096 INPUT NA$(I),X(I)

7097 IF NA$(I)="" THEN PRINT IDM$:GOTO 7980 ELSE 7098

7098 IF X(I)>1 THEN PRINT"Error ! Coefficient cannot be major than 1 !":GOTO 7980 ELSE 7099

7099 NEXT I

7100 R=1

7101 FOR I=1 TO N

7102 R=R*X(I)

7103 NEXT I

7104 IF R=0 THEN PRINT IDM$:GOTO 7980 ELSE 7105

7105 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7106 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7107 IF I$="m" THEN GOTO 10

7108 IF I$="c" THEN GOTO 7000

7109 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT"   ESTIMATION OF DISEASED ANIMALS' NUMBER ACCORDING TO SURVIVAL RATES":PRINT

7201 PRINT TAB(6)"Disease(s): "DI$

7202 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

7206 PRINT"Place: "LU$;TAB(50)"Period: "PE$

7207 PRINT TAB(20)"Initial number: "INT(A):PRINT

7250 PRINT TAB(5)"Age";TAB(17)"Survival";TAB(29)"Mortality";TAB(43)"Cumulative";TAB(60)"Surviving"

7251 PRINT TAB(5)"Subperiod";TAB(17)"Rate";TAB(29)"Rate";TAB(43)"Survival";TAB(60)"Dis.Animals"

7252 PRINT TAB(43)"Rate";TAB(60)"at the End":PRINT

7259 S=1:P=1

7260 FOR I=1 TO N

7261 S=S*X(I)

7262 PRINT I;TAB(6);USING"\        \";NA$(I);

7263 PRINT TAB(18)USING"#.####";X(I);

7264 PRINT TAB(30)USING"#.####";(1-X(I));TAB(44)S;

7265 PRINT TAB(60)INT((A*S)+.5)

7266 'FOR Z=N TO 1:'P=P*X(I)

7267 'PRINT TAB(70)USING"#.####";P

7268 'NEXT Z

7269 NEXT I

7300 A$=INKEY$:IF A$="" THEN GOTO 7300

7310 CLS:PRINT:PRINT TAB(6)"ESTIMATION OF NUMBERS OF DISEASED ANIMALS ACCORDING TO SURVIVAL RATES"

7312 PRINT TAB(10)"(";CHR$(223);" represents 2 %  of initial "INT(A);" diseased animals)":PRINT

7313 PRINT:PRINT TAB(6)"End of";TAB(25)"0         20        40        60        80       100 %"

7314 PRINT TAB(6)"Subperiod";TAB(25)CHR$(179);"---------|---------|---------|---------|---------I"

7315 PRINT TAB(17)"(Start)";TAB(25)CHR$(179);

7316 FOR P=1 TO 50:PRINT CHR$(223);

7317 NEXT P

7320 S=1

7321 FOR I=1 TO N

7322 S=S*X(I)

7323 Z=S*50

7324 IF Z<1 THEN GOTO 7325 ELSE 7329

7325 IF Z>0 THEN GOTO 7326 ELSE 7329

7326 PRINT TAB(6);USING"\        \";NA$(I);

7327 PRINT TAB(25);CHR$(179);CHR$(249):GOTO 7336

7329 PRINT TAB(6);USING"\        \";NA$(I);

7330 PRINT TAB(25);CHR$(179);

7331 FOR K=1 TO S*50

7332 PRINT CHR$(223);

7334 NEXT K

7336 NEXT I

7337 PRINT:PRINT

7400 PRINT:PRINT"   From the initial number of";INT(A);"diseased animals after";INT(N);" age subperiods"

7420 PRINT TAB(6)"   it can be estimated about"

7430 PRINT TAB(16)INT((R*A)+.5);"surviving diseased animals (if not removed prematurely)."

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7985 CLS:NA$="":X=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7986 ELSE 7990

7986 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.8-SELECTED INDICATORS OF DISEASE TERRITORIAL PROPAGATION"

8010 PRINT"=========================================================="

8050 PRINT TAB(6)"This subprogramme calculates:"

8052 PRINT TAB(10)"1) combination of velocity, distance and time"

8054 PRINT TAB(10)"2) relations of newly to total affected territory"

8058 INPUT"     Enter choice number:  ",S

8059 IF S=1 OR S=2 THEN GOTO 8100 ELSE PRINT IDE$:GOTO 8980

8100 PRINT"INPUT DATA:"

8121 INPUT"     disease(s) ";EN$

8122 INPUT"     species ";ES$

8123 INPUT"     place, period ";LU$,PE$

8126 INPUT"     territorial surface measure units (up to 10 characters !)  ";US$

8127 IF S=1 THEN GOTO 8128 ELSE 8180

8128 INPUT"     length measure units                                       ";UD$

8129 INPUT"     time measure units                                         ";UT$

8130 PRINT"Do not answer (skip) the question about the indicator to be calculated !"

8131 PRINT"                                       Other two questions must be answered !"

8135 PRINT:INPUT"     velocity of disease propagation per one time measure unit  ";V

8140 INPUT"     distance of disease propagation in length measure units    ";L

8150 INPUT"     time of disease propagation in time measure units          ";T

8155 IF (V+L+T)=0 THEN GOTO 8156 ELSE 8157

8156 PRINT:PRINT IDM$:GOTO 8980

8157 PRINT"Additional input data:"

8160 INPUT"     average density of animals per one surface unit            ";D

8165 PRINT"     estimated excision angle grade (1 - 360)"

8166 INPUT"                        of theoretical circular propagation     ";E:GOTO 8190

8180 PRINT:INPUT"     new affected territory in surface units                    ";SNT

8182 PRINT:PRINT"     affected territory at the beginning of the period"

8183 INPUT"                                            in surface units    ";STO

8184 PRINT"     affected territory existing in the period"

8185 INPUT"                                            in surface units    ";STP

8186 PRINT"     affected territory average existing

8187 INPUT"                          in the period in surface units        ";STA

8188 IF SNT=0 OR (STO+STP+STA)=0 THEN GOTO 8156 ELSE 8190

8190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8192 IF I$="m" THEN GOTO 10

8193 IF I$="c" THEN GOTO 8000

8194 IF I$=CHR$(13) THEN GOTO 8200

8200 CLS:PRINT"     SELECTED INDICATORS OF DISEASE TERRITORIAL PROPAGATION":PRINT

8201 PRINT TAB(6)"Disease(s): "EN$

8202 IF S=1 THEN PRINT"Species: "ES$

8203 IF S=2 THEN PRINT"Species: "ES$;TAB(40)"Surface units: "US$

8204 PRINT"Place: "LU$;TAB(50)"Period: "PE$

8205 REM:IF S=1 AND T>0 THEN PRINT TAB(6)"Time measure units: "UT$

8206 IF S=1 THEN GOTO 8207 ELSE 8400

8207 PRINT:PRINT

8209 IF L>0 AND T>0 AND V=0 THEN GOTO 8320 ELSE 8210

8210 IF V>0 AND T>0 AND L=0 THEN GOTO 8330 ELSE 8220

8220 IF L>0 AND V>0 AND T=0 THEN GOTO 8340 ELSE 8230

8230 IF L>0 OR T>0 AND V>0 THEN GOTO 8345 ELSE 8240

8240 IF D>0 AND L>0 GOTO 8345 ELSE 8980

8320 PRINT"   Estimated velocity of disease propagation"

8321 PRINT"                            per one time measure unit    = "USING"####.##";L/T;

8322 PRINT " "UD$:GOTO 8210

8330 PRINT:PRINT"   Estimated distance of disease propagation"

8331 PRINT"                                 during ";INT(T+.5) UT$;"        =  "INT(V*T+.5);

8332 PRINT" "UD$:GOTO 8220

8340 PRINT:PRINT"   Estimated time needed for disease propagation "

8341 PRINT TAB(23)"   up to the distance of";INT(L+.5) UD$;"     =  "INT(L/V+.5)    UT$:GOTO 8230

8345 W=E/360

8346 IF L=0 THEN L=V*T

8350 IF L>0 AND E>0 THEN PRINT:PRINT"   Estimated affected zone" ELSE 8980

8351 IF W=1 THEN GOTO 8356 ELSE 8357

8356 IF L>0 THEN PRINT TAB(5)"              (if disease propagation is circular)   = ";INT((L*L)*3.1459); US$:GOTO 8360

8357 IF L>0 AND W>0 THEN PRINT TAB(5)"   (if the propagation follows circular excision)    = ";INT((L*L)*3.1459*W); US$

8360 IF D>0 AND L>0 AND W>0 THEN PRINT:PRINT"   Estimated number of animals in affected  zone         = ";INT(D*(L*L)*3.14159*W)

8370 PRINT:GOTO 8980

8400 IF SNT>0 AND STO>0 THEN GOTO 8401 ELSE 8410

8401 PRINT:PRINT"      Ratio of new affected territory per one surface unit"

8402 PRINT"                            of initially affected territory    ="USING"####.####";SNT/STO

8405 PRINT:PRINT"      Ratio of initially affected territory per "

8406 PRINT"                  one surface unit of new affected territory   ="USING"####.####";STO/SNT

8410 IF SNT>0 AND STP>0 THEN GOTO 8411 ELSE 8420

8411 PRINT:PRINT"      Ratio of new affected territory per one surface unit"

8412 PRINT"          of affected territory existing in the period         ="USING"####.####";SNT/STP

8415 PRINT:PRINT"      Ratio of affected territory existing in the period"

8416 PRINT"              per one surface unit of new affected territory   ="USING"####.####";STP/SNT

8420 IF SNT>0 AND STA>0 THEN GOTO 8421 ELSE 8980

8421 PRINT:PRINT"      Ratio of new affected territory per one surface unit"

8422 PRINT"           of affected territory average in the period         ="USING"####.####";SNT/STA

8425 PRINT:PRINT"      Ratio of affected territory average in the period"

8426 PRINT"              per one surface unit of new affected territory   ="USING"####.####";STA/SNT

8427 IF S=1 THEN GOTO 8428 ELSE 8980

8428 PRINT

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.9-DEVELOPMENT OF DISEASE FREQUENCY WITH CYCLIC TENDENCY"

9001 PRINT"========================================================="

9002 PRINT"(sinusoid curve formula adapted by the author)"

9020 REM:Y=A*SIN(((B*(X-C))/D)+A+MIN

9021 REM:Y=number of diseased animals;X=time(in days, weeks, months or years)

9050 PRINT"INPUT DATA:"

9053 INPUT"     disease(s) ";EN$

9054 INPUT"     species, category(ies) ";ES$,CA$

9056 INPUT"     place, period ";LU$,PE$

9057 INPUT"     time measure unit (up to 10 characters) ";UT$:PRINT

9058 PRINT"     supposed amplitude - difference between maximal and minimal"

9059 INPUT"                                     numbers of diseased animals  ";A

9060 IF A=0 THEN PRINT IDM$:GOTO 9980

9062 LET A=A/2

9063 PRINT:INPUT"     minimal number of diseased animals (curve bottom)            ";MIN:PRINT

9064 INPUT"     duration between two peaks of the curve (in time units)      ";V

9065 PRINT:PRINT"     initial value of time (in time measure units) when"

9066 PRINT"       the number of diseased animals is in the curve middle"

9067 INPUT"         i.e. in the middle between maximal and minimal numbers   ";C

9068 PRINT:INPUT"     total period duration in time measure units (up to 18 !)     ";P

9069 IF A=0 OR V=0 OR P=0 THEN PRINT IDM$:GOTO 9980 ELSE 9070

9070 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9071 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9072 IF I$="m" THEN GOTO 10

9073 IF I$="c" THEN GOTO 9000

9074 IF I$=CHR$(13) THEN GOTO 9076

9076 D=57.2958:REM:change of radians in grades by dividing with coef.'D'

9077 LET B=360/V:S=1:GOTO 9100

9080 PRINT:PRINT"     intervals in time units for calculation"

9081 INPUT"                         of supposed number of diseased animals ";S

9082 IF S=0 THEN S=1

9083 IF P/S=>18 THEN GOTO 9084 ELSE 9100

9084 PRINT:PRINT"Please, reconsider this last imput ! It is too small - a part of displayed"

9085 PRINT"              results will be out of one screen !"

9086 INPUT"                    Do you want to correct it, yes(y) or not(n) ";U$

9087 IF U$="y" OR U$="n" THEN GOTO 9088 ELSE 9100

9088 IF U$="n" THEN GOTO 9100 ELSE 9080

9100 CLS:PRINT" DEVELOPMENT OF  D I S E A S E   FREQUENCY WITH  C Y C L I C   T E N D E N C Y"

9111 PRINT TAB(5)"Disease(s): "EN$

9112 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

9113 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

9115 PRINT TAB(18)"Time-end of";TAB(40)"Estimated number"

9116 PRINT TAB(18)UT$;TAB(40)"of diseased animals":PRINT

9120 FOR I=0 TO P STEP S

9130 PRINT TAB(20)INT(I);TAB(45)INT(A*SIN(((I-C)*B)/D)+A+MIN)

9140 NEXT I

9190 PRINT

9200 A$=INKEY$:IF A$="" THEN GOTO 9200

9205 CLS:PRINT" DEVELOPMENT OF  D I S E A S E  FREQUENCY WITH  C Y C L I C   T E N D E N C Y"

9210 PRINT TAB(7)"(";CHR$(223);" represents 2 % of maximum of "INT(MIN+A*2);"diseased animals)"

9211 PRINT TAB(2)"Time-end of"

9213 PRINT TAB(2)USING"\        \";UT$;

9214 PRINT TAB(15)"0         20        40        60        80       100 %"

9215 PRINT TAB(15)CHR$(179)"---------|---------|---------|---------|---------I"

9216 PRINT TAB(15);CHR$(179);

9220 FOR I=0 TO P STEP S

9225 PRINT TAB(1)INT(I);TAB(15);CHR$(179);

9230 FOR K=0 TO (((A*SIN(((I-C)*B)/D)+A+MIN)/(2*A+MIN)*100)/2)-2

9240 PRINT CHR$(223);

9245 NEXT K

9260 NEXT I

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.10-DEVELOPMENT OF DISEASE FREQUENCY WITH ASCENDING/DESCENDING TENDENCY"

10002 PRINT"========================================================================"

10003 PRINT"(part of sinusoid curve formula adapted by the author)"

10200 PRINT"INPUT DATA:"

10211 INPUT"     disease(s) ";EN$

10212 INPUT"     species, category(ies) ";ES$,CA$

10213 INPUT"     place, period ";LU$,PE$

10216 INPUT"     time measure units (up to 10 characters) ";UT$:PRINT

10217 PRINT"     supposed amplitude - difference between maximal and minimal"

10218 INPUT"                                     numbers of diseased animals    ";A

10220 IF A<=0 THEN PRINT IDM$:GOTO 10980 ELSE 10221

10221 LET A=A/2

10230 PRINT:INPUT"     duration between max/min numbers in time units (up to 18 !)    ";MM

10231 PRINT:INPUT"     evaluated period duration in time measure units (up to 18 !)   ";K

10232 IF MM=0 OR MM>18 OR K=0 OR K>18 THEN PRINT IDE$:GOTO 10980 ELSE 10233

10233 PRINT:PRINT"     Is the curve of diseased animals numbers ascending (a)"

10234 INPUT"                                                or descending (d)   ";C$

10236 IF C$="a" THEN GOTO 10240 ELSE 10238

10238 IF C$="d" THEN GOTO 10241 ELSE 10233

10240 PRINT:INPUT"     minimal number of diseased animals at the  b e g i n n i n g   ";MIN:GOTO 10242

10241 PRINT:INPUT"     minimal number of diseased animals at the period  e n d        ";F

10242 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10243 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10244 IF I$="m" THEN GOTO 10

10245 IF I$="c" THEN GOTO 10000

10246 IF I$=CHR$(13) THEN GOTO 10250

10250 D=57.2958:REM:conversion coefficient of radians into grades

10260 LET V=2*MM

10270 B=360/V:S=1:GOTO 10400

10278 PRINT:PRINT"     intervals in time units for calculation"

10279 INPUT"                         of supposed number of diseased animals ";S

10280 IF S=0 THEN S=1

10281 IF K/S=>18 THEN GOTO 10282 ELSE 10400

10282 PRINT:PRINT"   Please, reconsider this last imput ! It is too small - a part of displayed"

10283 PRINT"           results will be out of one screen!"

10284 INPUT"                Do you want to correct it, yes(y) or not(n) ";U$

10285 IF U$="y" THEN GOTO 10279

10286 IF U$="n" THEN GOTO 10400

10400 IF C$="a" THEN GOTO 10500 ELSE 10600

10500 CLS:PRINT TAB(5)" A N I M A L   D I S E A S E   O C C U R R E N C E   DEVELOPMENT"

10511 PRINT TAB(10)"Disease(s): "EN$

10513 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

10514 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

10515 PRINT TAB(18)"Time-end of";TAB(40)"Estimated number"

10516 PRINT TAB(18)UT$;TAB(40)"of diseased animals":PRINT

10517 PRINT TAB(21)"(start)";TAB(43)INT(MIN)

10520 FOR I=S TO MM STEP S

10530 PRINT TAB(20)INT(I);TAB(43)INT((A*SIN((B*I-90)/D))+A+MIN)

10540 NEXT I

10550 FOR I=MM+S TO K STEP S

10560 PRINT TAB(20)INT(I);TAB(43)INT(2*A+MIN)

10570 NEXT I:GOTO 10700

10600 'PRINT:INPUT"     minimal number of diseased animals (at the end)                ";F

10610 REM:curve base - for descending

10620 PRINT

10630 CLS::PRINT TAB(5)" A N I M A L   D I S E A S E   O C C U R R E N C E   DEVELOPMENT"

10635 PRINT TAB(10)"Disease(s): "EN$

10636 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

10638 PRINT"Place: "LU$;TAB(40)"Period: "PE$

10640 PRINT

10645 PRINT TAB(18)"Time-end of";TAB(40)"Estimated number"

10646 PRINT TAB(18) UT$;TAB(40)"of diseased animals":PRINT

10647 PRINT TAB(21)"(start)",TAB(43)INT(2*A+F)

10650 REM:FOR I=1 TO MM STEP S

10655 REM:PRINT TAB(20)INT(I);TAB(43)INT(A*SIN(((I-1)*B+90)/D)+A+F+1

10656 REM:NEXT I

10660 REM:FOR I=MM+S TO K STEP S

10661 REM:PRINT TAB(20)INT(I);TAB(43)INT(F)

10662 REM:NEXT I

10670 FOR I=1 TO MM STEP S :REM:descending

10671 PRINT TAB(20)INT(I);TAB(43)INT((((A*SIN((I*B+90)/D)+A+F)))+.5)

10672 NEXT I

10673 FOR I=MM+S TO K STEP S

10674 PRINT TAB(20)INT(I);

10675 PRINT TAB(43)INT(F)

10676 NEXT I

10700 A$=INKEY$:IF A$="" THEN GOTO 10700

10705 CLS:PRINT TAB(5)" A N I M A L   D I S E A S E   O C C U R R E N C E   DEVELOPMENT"

10710 IF C$="d" THEN PRINT TAB(8)"(";CHR$(223);" represents 2 %  of maximum of"INT(F+A*2);"diseased animals)"

10711 IF C$="a" THEN PRINT TAB(8)"(";CHR$(223);" represents 2 %  of maximum of"INT(MIN+A*2);"diseased animals)"

10712 PRINT"Time-end of"

10713 PRINT USING"\        \"; UT$;

10714 PRINT TAB(15)"0         20        40        60        80       100 %"

10715 PRINT TAB(15)CHR$(179)"---------|---------|---------|---------|---------I"

10717 IF C$="a" THEN GOTO  10720 ELSE 10750

10720 PRINT TAB(2)"(start)";TAB(15);CHR$(179);

10721 FOR Z=0 TO ((MIN/(2*A+MIN)*100)/2)-1 STEP S

10722 PRINT CHR$(223);

10723 NEXT Z

10725 FOR I=1 TO MM STEP S

10726 PRINT TAB(1)INT(I);TAB(15);CHR$(179);

10727 FOR Z=0 TO (((A*SIN((I*B-90)/D)+A+MIN))/(2*A+MIN)*100/2)-1

10728 PRINT CHR$(223);

10729 NEXT Z

10730 NEXT I

10732 FOR I=MM+S TO K STEP S

10734 PRINT TAB(1)INT(I);TAB(15);CHR$(179);

10736 FOR Z=0 TO (((2*A+MIN)/(2*A+MIN))*100)/2-1

10737 PRINT CHR$(223);

10738 NEXT Z

10740 NEXT I

10748 GOTO 10980

10750 PRINT TAB(6)"(start)";TAB(15);CHR$(179);

10751 FOR Z=0 TO (50-1) STEP 1

10752 PRINT CHR$(223);

10753 NEXT Z

10754 FOR I=1 TO MM STEP S :REM:descending

10755 PRINT TAB(1)INT(I);TAB(15);CHR$(179);

10756 FOR Z=0 TO (((A*SIN((I*B+90)/D)+A+F)/(2*A+F))*50)-1

10757 PRINT CHR$(223);

10760 NEXT Z

10762 NEXT I

10770 FOR I=MM+S TO K STEP S

10771 PRINT TAB(1)INT(I);TAB(15);CHR$(179);

10773 FOR Z=0 TO ((F/(2*A+F+1)*50)-1) STEP S

10774 PRINT CHR$(223);

10775 NEXT Z

10776 NEXT I

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10982 IF R$="y" OR R$="n" THEN GOTO 10983 ELSE 10990

10983 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"4.11-CHRONOLOGICAL TIME SERIES OF POPULATION HEALTH PHENOMENON"

11010 PRINT"=============================================================="

11200 N=0:PRINT"INPUT DATA:"

11205 INPUT"     variable (indicator), period ";IN$,P$

11210 INPUT"     number (2 up to 18 !) of data on time and variables ";N

11211 IF N=<1 OR N>18 THEN PRINT IDE$:GOTO 11980

11218 PRINT"List subperiods or moments (up to 15 characters) in chronological order,"

11219 PRINT"variable values (each must be  m a j o r  than >0 ! exception: the last one):"

11221 US$="":V=0

11222 DIM U$(20),V(20)

11240 FOR I=1 TO N

11250 PRINT TAB(20)I;" ";

11260 INPUT U$(I),V(I)

11261 IF U$(I)="" THEN PRINT:PRINT IDM$:GOTO 11980 ELSE 11270

11270 NEXT I

11271 MAX=V(1)

11272 FOR I=2 TO N

11273 IF V(I)>MAX THEN MAX=V(I)

11274 NEXT I

11275 IF MAX=0 OR V(1)<=0 THEN PRINT:PRINT IDE$:GOTO 11980 ELSE 11276

11276 'IF V(1)<=0 THEN GOTO 11218 ELSE 11280

11280 'CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11281 'PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11282 'IF I$="m" THEN GOTO 10

11283 'IF I$="c" THEN GOTO 11000

11284 'IF I$=CHR$(13) THEN GOTO 11300

11300 CLS:PRINT"   CHRONOLOGICAL   T I M E   S E R I E S   OF POPULATION HEALTH PHENOMENON"

11305 PRINT"     Indicator (variable): "IN$

11306 PRINT"     Period: "P$:PRINT

11310 PRINT TAB(2)"Order";TAB(11)"Subperiod/";TAB(32)"Variable";TAB(50)"I    n    d    e    x"

11320 PRINT TAB(2)"Number";TAB(11)"Moment";TAB(34)"Value";TAB(50)"Current";TAB(64)"Chained"

11325 REM:

11330 PRINT

11340 PRINT TAB(3)"1";TAB(11)USING"\             \";U$(1);

11341 PRINT TAB(27)USING"##########.##";V(1);

11342 PRINT TAB(50)"100.00";TAB(65)"100.00"

11350 FOR I=2 TO N

11355 PRINT TAB(2)I;TAB(11)USING"\             \";U$(I);

11356 PRINT TAB(28)USING"#########.##";V(I);

11361 PRINT TAB(47)USING"######.##";(V(I)/V(1)*100);

11362 PRINT TAB(62)USING"######.##";(V(I)/V(I-1)*100)

11370 NEXT I

11380 REM:GOTO 11476

11400 LET P1=0:LET P2=0:LET P3=0:LET P4=0:LET P5=0

11410 FOR I=1 TO N

11420 LET P1=P1+I

11460 P2=P2+V(I)

11461 P3=P3+I*V(I)

11462 P4=P4+I^2

11464 P5=P5+(V(I))^2

11466 NEXT I

11468 B=(P3-P1*P2/N)/(P4-P1^2/N)

11470 'A=(P2-P1*B)/N:REM:zde byl asi problem-Spiegel 233,prvni =0 korelace ??

11471 A=P2/N

11472 IF B<0 THEN LET Z$=" " ELSE LET Z$="+"

11473 PRINT

11474 PRINT" Estimated linear trend (least square line):   Y  = ";USING"#######.##  ";A;

11475 PRINT Z$;USING"#######.##  X";B

11476 A$=INKEY$:IF A$="" THEN GOTO 11476

11550 CLS:PRINT TAB(6)"CHRONOLOGICAL   T I M E   S E R I E S   OF ANIMAL HEALTH PHENOMENON"

11553 PRINT TAB(13)"(";CHR$(223);" represents 2 % of the maximum of "USING"##########.####";MAX;

11554 PRINT" )":PRINT

11560 PRINT"Order";TAB(7)"Time";TAB(26)"0         20        40        60        80       100 %"

11561 PRINT TAB(26)CHR$(179);"---------|---------|---------|---------|---------I"

11562 FOR I=1 TO N

11563 Z=(V(I)/MAX)*50

11564 IF Z<1 THEN GOTO 11565 ELSE 11568

11565 IF Z>0 THEN GOTO 11566 ELSE 11568

11566 PRINT TAB(2)I;TAB(7)USING"\             \";U$(I);

11567 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 11574

11568 PRINT TAB(2)I;TAB(7)USING"\             \";U$(I);

11569 PRINT TAB(26)CHR$(179);

11570 FOR K=1 TO (V(I)/MAX)*50

11571 PRINT CHR$(223);

11572 NEXT K

11573 PRINT

11574 NEXT I

11980 ERASE U$,V,N:U$="":V=0:N=0

11981 A$=INKEY$:IF A$="" THEN GOTO 11981

11982 GOTO 645

      CLS:MV=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11983 IF R$="y" OR R$="n" THEN GOTO 11984 ELSE 11990

11984 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

11995 CLS:PRINT TAB(5)"E R R O R !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

12000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

12002 IF Z$="y" OR Z$="n" THEN GOTO 12010 ELSE 12030

12010 IF Z$="y" THEN GOTO 12020 ELSE 12030

12020 CHAIN"EPIZ40MM.KOU"

12030 SYSTEM

 

 

 

         5-Selected indicators of animal disease risk assessment

        

 

5 ON ERROR GOTO 11025

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4005.KOU":REM:2/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(8)"5-SELECTED INDICATORS OF ANIMAL DISEASE RISK ASSESSMENT"

40 PRINT TAB(8)"======================================================="

500 PRINT:PRINT TAB(13)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(8)"1-General indicators of animal disease risk"

520 PRINT TAB(8)"2-Risk probability assessment of animal disease introduction I."

530 PRINT TAB(8)"3-Risk probability assessment of animal disease introduction II."

540 PRINT TAB(8)"4-Risk comparison of a disease introduction from several territories"

550 PRINT TAB(8)"5-Risk comparison of several diseases introduction from one territory"

560 PRINT TAB(8)"6-Animal population movement as potential risk of disease propagation"

570 PRINT TAB(8)"7-Animal products transfer as potential risk of disease propagation"

580 PRINT TAB(8)"8-Concentration of animals as potential risk of disease propagation"

600 PRINT TAB(8)"9-Risk probability assessment of animal disease propagation"

605 PRINT TAB(8)"10-Per capita food consumption as potential risk of food-born diseases"

609 PRINT

610 PRINT TAB(8)"11-E N D  of this group of subprogrammes"

630 PRINT

631 PRINT TAB(8)"(Note: See also module 11 of the Main Menu !)":PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 11000

660 IF Z$="y" THEN 20 ELSE GOTO 11000

690 INPUT"       Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.1-GENERAL INDICATORS OF ANIMAL DISEASE RISK"

1010 PRINT"============================================="

1011 PRINT TAB(52)"(Ref.:Jenicek; Martin; Toma)

1030 PRINT"INPUT DATA:":PRINT

1032 INPUT"     risk (disease) ";RE$

1034 INPUT"     place ";LU$

1036 INPUT"     time ";TI$

1037 INPUT"     species ";ES$

1038 INPUT"     category(ies) ";CA$:PRINT

1040 PRINT"Each of following input data must be of a major value than 0 !":PRINT

1049 INPUT"     Are you going to input relative (r) or absolute (a) data ";RA$

1051 IF RA$="r" OR RA$="a" THEN GOTO 1052 ELSE PRINT IDE$:GOTO 1980

1052 IF RA$="r" THEN GOTO 1062 ELSE 1068

1062 PRINT:PRINT"(Rates as numbers between >0 and 1 !!!)":PRINT

1063 PRINT:PRINT"     incidence rate (major) among animals  e x p o s e d "

1064 INPUT"                                                to disease risk   ";A:PRINT

1065 PRINT"     incidence rate (minor) among animals  n o n-e x p o s e d"

1066 INPUT"                                                to disease risk   ";B:GOTO 1081

1068 PRINT:INPUT"     number of diseased among animals exposed to the risk         ";AC

1069 INPUT"     number of healthy among animals exposed to the risk          ";CD:PRINT

1075 INPUT"     number of diseased among animals non-exposed to the risk     ";BE

1076 INPUT"     number of healthy among animals non-exposed to the risk      ";DF

1081 IF RA$="r" THEN GOTO 1082 ELSE 1083

1082 IF A=0 OR B=0 OR A>1 OR B>1 THEN PRINT IDE$:GOTO 1980 ELSE 1090

1083 IF AC=0 OR CD=0 OR BE=0 OR DF=0 THEN PRINT IDM$:GOTO 1980

1090 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1091 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1092 IF I$="m" THEN GOTO 10

1093 IF I$="c" THEN GOTO 1000

1094 IF I$=CHR$(13) THEN GOTO 1100

1100 CLS:PRINT TAB(6)"GENERAL  INDICATORS  OF  ANIMAL  DISEASE  RISK":PRINT

1105 PRINT TAB(6)"Risk: "RE$

1106 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

1107 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

1130 IF RA$="r" THEN GOTO 1200 ELSE 1230

1200 PRINT:PRINT"    Grade of relative  risk (risk ratio)          = ";USING"###.####";A/B

1205 PRINT:PRINT"    Grade of attributable (differential) risk     = ";USING"###.####";A-B

1210 PRINT:PRINT"    Fraction of attributable risk                 = ";USING"###.####";(A-B)/A

1215 PRINT:PRINT"    Percentage of attributable risk                    = ";USING"###.#### %";((A-B)/A)*100

1217 OD=(A/(1-A))/(B/(1-B))

1218 PRINT:PRINT"    Grade of risk superiority "

1219 PRINT"            (risk odds ratio, risk coefficient)   = ";USING"###.####";OD

1220 PRINT:GOTO 1980

1230 PRINT

1231 PE=AC/(AC+CD):PNE=BE/(BE+DF)

1232 PRINT"    Grade of relative risk (risk ratio)              = ";USING"###.####";PE/PNE

1233 PRINT:PRINT"    Grade of attributable (differential) risk        = ";USING"###.####";PE-PNE

1234 PRINT:PRINT"    Fraction of attributable risk                    = ";USING"###.####";(PE-PNE)/PE

1235 PRINT:PRINT"    Percentage of attributable risk                       = ";USING"###.#### %";((PE-PNE)/PE)*100

1239 PRINT

1240 PRINT"    Grade of risk superiority"

1241 PRINT"            (risk odds ratio, risk coefficient)      = ";USING"###.####";(AC*DF)/(BE*CD):PRINT

1243 PRINT"    Grade of individual risk of exposed animals      = ";USING"###.####";AC/(AC+CD)

1245 PRINT:PRINT"    Grade of individual risk of non-exposed animals  = ";USING"###.####";BE/(BE+DF)

1290 PRINT:PRINT

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.2-RISK PROBABILITY ASSESSMENT OF ANIMAL DISEASE AGENTS INTRODUCTION I."

2012 PRINT"========================================================================"

2020 PRINT"   This subprogramme calculates a rough probability of potential risk of "

2021 PRINT"   specific animal disease agents to be introduced into a territory (country,"

2022 PRINT"   province, region, ranch, etc.) from abroad. Selected simple criteria"

2023 PRINT"   of  i n a b i l i t y - failure grades (scale between >0 and 1) are used.":PRINT

2024 PRINT"   The input and result interpretation to be based upon theoretical knowledge"

2025 PRINT"   and practical experience and must be epizootiologically meaningful."

2026 PRINT

2030 PRINT"   Note: Diseased animals = affected clinically, subclinically and carriers"

2031 PRINT"                                             of specific etiological agents."

2032 PRINT"         Animal products  = not sterilized raw animal products."

2040 A$=INKEY$:IF A$="" THEN GOTO 2040

2050 CLS:PRINT:PRINT"INPUT DATA:"

2056 PRINT:INPUT"     specific disease ";DI$

2057 INPUT"     commodity to be imported - animals (a) or animal products (p) ";P$

2059 IF P$="a" OR P$="p" THEN GOTO 2060 ELSE PRINT IDE$:GOTO 2981

2060 IF P$="a" THEN GOTO 2061 ELSE 2065

2061 INPUT"     species/category ";SP$

2062 INPUT"     number of animals to be imported ";NA

2063 IF NA=0 THEN PRINT IDM$: GOTO 2981 ELSE 2070

2065 INPUT"     type of animal product ";TP$

2066 INPUT"     measure units ";MU$

2067 INPUT"     quantity of product to be imported ";QP

2068 IF QP=0 THEN PRINT IDM$:GOTO 2981 ELSE 2070

2070 INPUT"     name of importing unit/territory ";IC$

2071 INPUT"     name of exporting unit/territory ";EU$

2075 INPUT"     time - period ";PE$:PRINT

2080 PRINT" All following questions must be answered !":PRINT

2082 PRINT" Disease prevalence rate and grades of input estimates must be major than 0"

2083 PRINT" and expressed as numbers between >0 and 1 !!!"

2084 A$=INKEY$:IF A$="" THEN GOTO 2084

2090 CLS:PRINT TAB(5)"Situation in the territory/population/unit of origin:":PRINT

2093 INPUT"specific disease prevalence rate - true or estimated (>0 - 1)        ";PR:PRINT

2095 IF P$="a" THEN GOTO 2100 ELSE 2120

2100 PRINT"estimated grade of  i n a b i l i t y  (failure) to  d i s c o v e r "

2101 PRINT"a l l  specifically  i n f e c t e d  animals  and  h e r d s (outbreaks)"

2102 PRINT"considering: sensitivity/specificity of diagnostic methods used,"

2103 PRINT"population investigation grade, field and laboratory services capabilities,"

2104 INPUT"active field surveys, reporting/information systems, etc..           ";GD:PRINT

2107 PRINT"estimated grade of  i n a b i l i t y  (failure)  to  a v o i d  "

2108 PRINT"specific disease propagation (n e w   f o c i  - focal incidence) "

2109 PRINT"due to the lack of effective foci isolation and control"

2110 INPUT"and field prevention measures during previous critical period        ";GI:PRINT

2112 PRINT"estimated grade of  i n a b i l i t y  (failure)  to   a v o i d  "

2114 PRINT"d i s e a s e d  (infected) animals to be  e x p o r t e d  (considering:"

2115 PRINT"pre-export animal selection, testing, treatment and control measures, "

2116 PRINT"reliability of certificates, eventual  p r e v i o u s   c a s e s "

2117 INPUT"of exporting diseased animals or their products, etc.)               ";GF:PRINT

2119 GOTO 2150

2120 PRINT"estimated grade of  i n a b i l i t y  (failure) to  d i s c o v e r  "

2121 PRINT"a l l : specifically  i n f e c t ed  animals,  h e r d s (outbreaks) and"

2122 PRINT"particular products containing specific disease etiological  a g e n t s "

2123 PRINT"(considering: sensitivity/specificity of diagnostic methods used,"

2124 PRINT"grade of population/product investigation, field and laboratory "

2125 INPUT"services capabilities, reporting/information systems, etc.)          ";GD:PRINT

2130 PRINT"estimated grade of  i n a b i l i t y  (failure) to   a v o i d  "

2131 PRINT"the contamination of pathogen-free products by specific pathogens"

2132 INPUT"during processing, storing and transport                             ";GI:PRINT

2140 PRINT"estimated grade of  i n a b i l i t y  (failure) to  a v o i d "

2141 PRINT"specific etiological agents to be exported by the particular commodity"

2142 PRINT"(considering: pre-export product selection, testing, treatment"

2143 PRINT"and  protection measures, reliability of certificates, eventual "

2144 INPUT"p r e v i o u s   c a s e s  of 'exporting' disease(s), etc.)        ";GF

2150 IF (PR+GD+GI+GF)=0 THEN PRINT:PRINT IDM$:GOTO 2981

2151 IF GD=0 OR GI=0 OR GF=0 OR GD>1 OR GI>1 OR GF>1 OR PR=0 OR PR>1 THEN GOTO 2152 ELSE 2190

2152 PRINT:PRINT"E r r o r ! All data must be major than 0 and not major than 1 !":GOTO 2981

2190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2192 IF I$="m" THEN GOTO 10

2193 IF I$="c" THEN GOTO 2000

2194 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT"  RISK  PROBABILITY  ASSESSMENT  OF  ANIMAL  DISEASE  AGENTS  INTRODUCTION":PRINT

2206 IF P$="a" THEN H$=SP$

2207 IF P$="p" THEN H$=TP$

2210 PRINT TAB(10)"Commodity: "H$

2211 IF P$="a" THEN PRINT TAB(10)"Number of animals: "NA:GOTO 2213

2212 IF P$="p" THEN PRINT"Measure units: "MU$;TAB(40)"Quantity: "QP

2213 PRINT"Origin: "EU$;TAB(40)"Destination: "IC$

2214 PRINT TAB(10)"Time/period: "PE$:PRINT

2215 PRINT TAB(10)"Exporting territory/population/unit situation: "

2216 PRINT"Disease: "DI$;TAB(50)"Prevalence rate: "USING"#.##";PR

2217 PRINT TAB(10)"Estimated grades of failure in:"

2218 PRINT"Diagnosis: ";USING"#.##";GD;

2219 PRINT TAB(40)"Protection: ";USING"#.##";GI

2220 PRINT TAB(10)"Pre-export 'filter': ";USING"#.##";GF:PRINT

2222 PRINT:PRINT

2250 P=PR*GI*GD*GF

2252 IF P$="a" THEN GOTO 2253 ELSE 2254

2253 Q=1-P:INF=SQR((P*Q)/NA):GOTO 2345

2254 Q=1-P:INF=SQR((P*Q)/QP)

2345 PRINT:PRINT"Risk probability grade of disease introduction  =  "USING"#.########";P;

2356 PRINT " +- ";USING"#.########";1.96*INF:PRINT

2346 IF P$="a" THEN GOTO 2350 ELSE 2380

2350 PRINT:PRINT TAB(10)"Estimated number of infected animals ":PRINT

2351 IF (NA*P)=>1 THEN GOTO 2352 ELSE 2353

2352 PRINT"                to be probably introduced is about   "INT(NA*P+.5):GOTO 2981

2353 PRINT"                to be probably introduced is about   "USING"####.##########";NA*P;

2355 GOTO 2981

2380 PRINT:PRINT TAB(10)"Estimated quantity of infected or contaminated products":PRINT

2381 IF (QP*P)=>1 THEN GOTO 2382 ELSE 2383

2382 PRINT"                to be probably introduced is about   "INT(QP*P+.5)  MU$:GOTO 2981

2383 PRINT"                to be probably introduced is about   "USING"####.##########";(QP*P);

2384 PRINT" "MU$

2981 A$=INKEY$:IF A$="" THEN GOTO 2981

2985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2986 IF R$="y" OR R$="n" THEN GOTO 2987 ELSE 2990

2987 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.3-RISK PROBABILITY ASSESSMENT OF ANIMAL DISEASE AGENTS INTRODUCTION II."

3012 PRINT"========================================================================="

3020 PRINT"   This subprogramme calculates a rough probability of potential risk of"

3021 PRINT"   specific animal disease agents to be introduced into a territory (country,"

3022 PRINT"   province, region, ranch, etc.) from abroad. Selected simple criteria"

3023 PRINT"   of  a b i l i t y  grades (scale between >0 and 1) are used.":PRINT

3024 PRINT"   The input and result interpretation to be based upon theoretical knowledge "

3025 PRINT"   and practical experience and must be epizootiologically meaningful."

3026 PRINT

3030 PRINT"   Note: Diseased animals = affected clinically, subclinically and carriers"

3031 PRINT"                                              of specific etiological agents.

3032 PRINT"         Animal products  = not sterilized raw animal products."

3040 A$=INKEY$:IF A$="" THEN GOTO 3040

3050 CLS:PRINT:PRINT"INPUT DATA:"

3056 PRINT:INPUT"     specific disease ";DI$

3057 INPUT"     commodity to be imported - animals (a) or animal products (p) ";P$

3059 IF P$="a" OR P$="p" THEN GOTO 3060 ELSE PRINT IDE$:GOTO 3981

3060 IF P$="a" THEN GOTO 3061 ELSE 3065

3061 INPUT"     species (category) ";SP$

3062 INPUT"     number of animals to be imported   ";NA

3063 IF NA=0 THEN PRINT IDM$:GOTO 3981 ELSE 3064

3064 GOTO 3070

3065 INPUT"     type of animal product             ";TP$

3066 INPUT"     measure units                      ";MU$

3067 INPUT"     quantity of product to be imported ";QP

3068 IF QP=0 THEN PRINT IDM$:GOTO 3981 ELSE 3070

3070 INPUT"     name of importing unit/territory   ";IC$

3071 INPUT"     name of exporting unit/territory   ";EU$

3076 PRINT

3080 PRINT" All following questions must be answered !":PRINT

3082 PRINT" Disease prevalence rate and grades of input estimates must be major than 0"

3083 PRINT" and expressed as numbers between >0 and 1 !!!"

3084 A$=INKEY$:IF A$="" THEN GOTO 3084

3090 CLS:PRINT TAB(5)"Situation in the exporting original territory/population/unit:":PRINT

3093 INPUT"specific disease prevalence rate - true or estimated (>0 - 1)        ";PR:PRINT

3095 IF P$="a" THEN GOTO 3100 ELSE 3120

3100 PRINT"estimated grade of   a b i l i t y  to  d i s c o v e r   a l l"

3101 PRINT"specifically  i n f e c t e d  animals and  h e r d s (outbreaks)"

3102 PRINT"considering: sensitivity/specificity of diagnostic methods used,"

3103 PRINT"population investigation grade, field and laboratory services "

3104 PRINT"capabilities, active field surveys, reporting/information "

3105 INPUT"systems, etc..                                                       ";GD:PRINT

3107 PRINT"estimated grade of  a b i l i t y   to  a v o i d  specific disease"

3108 PRINT"propagation (avoiding  n e w   f o c i  - focal incidence) thanks to "

3109 INPUT"preventive/control field measures during previous critical period    ";GI:PRINT

3112 PRINT"estimated grade of  a b i l i t y   to   a v o i d   d i s e a s e d"

3114 PRINT"animal(s) to be  e x p o r t e d  (considering: pre-export animal "

3115 PRINT"selection, testing, treatment and control measures, reliability"

3116 PRINT"of certificates, eventual  p r e v i o u s   c a s e s  of exporting "

3117 INPUT"infected animal(s) or product(s), etc.)                              ";GF:PRINT

3119 GOTO 3150

3120 PRINT"estimated grade of  a b i l i t y   to   d i s c o v e r    a l l :"

3121 PRINT"specifically  i n f e c t e d  animals,  h e r d s  (outbreaks) and animal"

3122 PRINT"products containing specific disease etiological  a g e n t s "

3123 PRINT"(considering: sensitivity/specificity of diagnostic methods used,"

3124 PRINT"grade of population/product investigation, field and laboratory"

3126 INPUT"services capabilities, reporting/information systems, etc.)          ";GD:PRINT

3130 PRINT"estimated grade of  a b i l i t y  to   a v o i d   contamination"

3131 PRINT"of pathogen-free products by specific pathogens during processing,"

3132 INPUT"storing and transport                                                ";GI:PRINT

3140 PRINT"estimated grade of  a b i l i t y  to  a v o i d   specific"

3141 PRINT"etiological agents to be exported by the particular commodity"

3142 PRINT"(considering: pre-export product selection, testing, treatment,"

3143 PRINT"and protection measures, reliability of certificates, eventual"

3144 INPUT"p r e v i o u s  c a s e s  of 'exporting' the disease, etc.)        ";GF

3150 IF (PR+GD+GI+GF)=0 THEN PRINT:PRINT IDM$:GOTO 3981

3151 IF GD=0 OR GI=0 OR GF=0 OR GD>1 OR GI>1 OR GF>1 OR PR=0 OR PR>1 THEN GOTO 3152 ELSE 3190

3152 PRINT:PRINT"E r r o r ! All data must be major than 0 and not major than 1 !":GOTO 3981

3190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3192 IF I$="m" THEN GOTO 10

3193 IF I$="c" THEN GOTO 3000

3194 IF I$=CHR$(13) THEN GOTO 3200

3200 CLS:PRINT:PRINT"  RISK  PROBABILITY  ASSESSMENT  OF  ANIMAL  DISEASE  AGENTS INTRODUCTION":PRINT

3206 IF P$="a" THEN H$=SP$

3207 IF P$="p" THEN H$=TP$

3211 PRINT TAB(10)"Commodity: "H$

3212 IF P$="a" THEN PRINT TAB(10)"Number of Animals: "NA:GOTO 3214

3213 IF P$="p" THEN PRINT"Measure Units: "MU$;TAB(40)"Quantity: "QP

3214 PRINT"Origin: "EU$;TAB(40)"Destination: "IC$:PRINT

3215 PRINT TAB(10)"Exporting Territory/Population/Unit Situation: ":PRINT

3216 PRINT"Disease: "DI$;TAB(50)"Prevalence Rate: "USING"#.##";PR

3217 PRINT TAB(10)"Estimated grades of  a b i l i t y  in:"

3218 PRINT"Diagnosis: ";USING"#.##";GD;

3219 PRINT TAB(40)"Protection: ";USING"#.##";GI

3220 PRINT TAB(10)"Pre-export 'filter': ";USING"#.##";GF:PRINT

3222 PRINT:PRINT

3251 P=PR*(1-GI)*(1-GD)*(1-GF)

3252 IF P$="a" THEN GOTO 3253 ELSE 3254

3253 Q=1-P:INF=SQR((P*Q)/NA):GOTO 3345

3254 Q=1-P:INF=SQR((P*Q)/QP)

3345 PRINT:PRINT"Risk probability grade of disease introduction  =  "USING"#.########";P;

3356 PRINT "   +-  ";USING"#.########";1.96*INF:PRINT

3346 IF P$="a" THEN GOTO 3350 ELSE 3380

3350 PRINT:PRINT TAB(10)"Estimated number of infected animals ":PRINT

3351 IF (NA*P)=>1 THEN GOTO 3352 ELSE 3353

3352 PRINT"                to be probably introduced is about   "INT(NA*P+.5):GOTO 3981

3353 PRINT"                to be probably introduced is about   "USING"####.######";NA*P;

3354 'PRINT "   +-  ";USING"####.##########";(NA*P)*INF*1.96

3355 GOTO 3981

3380 PRINT:PRINT TAB(10)"Estimated quantity of affected products":PRINT

3381 IF (QP*P)=>1 THEN GOTO 3382 ELSE 3383

3382 PRINT"           to be probably introduced is about   "INT(QP*P+.5) MU$:GOTO 3981

3383 PRINT"           to be probably introduced is about   "USING"####.##########";QP*P;

3384 PRINT" "MU$

3981 A$=INKEY$:IF A$="" THEN GOTO 3981

3985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3986 IF R$="y" OR R$="n" THEN GOTO 3987 ELSE 3990

3987 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.4-RISK COMPARISON OF DISEASE AGENTS INTRODUCTION FROM SEVERAL TERRITORIES"

4009 PRINT"==========================================================================="

4010 PRINT"This subprogramme compares relative risks of specific disease agents to be"

4011 PRINT"introduced by import from territories  n o t   f r e e  of the disease."

4012 PRINT"   Criteria on disease and exporting territories situation:"

4014 PRINT"a) grade of disease transmissibility - ability to be propagated"

4016 PRINT"b) grade of disease occurrence - considering prevalence, incidence and spread"

4021 PRINT"c) grade of  i n a b i l i t y  to  d i s c o v e r  all infected animals"

4022 PRINT"   and herds (due to insufficient: sensitivity of diagnostic methods used,"

4023 PRINT"   animal population investigation grade, field and laboratory services"

4024 PRINT"   capabilities, active field surveys, reporting/information systems,  etc.)"

4030 PRINT"d) grade of  i n a b i l i t y   to  a v o i d  disease propagation (new foci)"

4031 PRINT"   i.e. inability to protect specific disease free animals, herds and territory"

4032 PRINT"   (due to the lack of or insufficient preventive and control field measures)"

4035 PRINT"e) grade of  i n a b i l i t y   to  r e d u c e  disease  o c c u r r e n c e"

4036 PRINT"   (due to the lack or insufficient: reduction, elimination and/or eradication"

4037 PRINT"   field measures, sanitation actions, field and laboratory services, etc.)"

4040 PRINT"f) grade of  i n e f f e c t i v e n e s s  of  pre-export  'f i l t e r'"

4041 PRINT"   (due to lack or insufficient: pre-export selection, treatment,"

4042 PRINT"   investigations and control measures, reliability of veterinary services and"

4043 PRINT"   their certificates), considering also eventual  p r e v i o u s  c a s e s "

4044 PRINT"   of 'exporting' infected animals or infected/contaminated commodities, etc. "

4099 A$=INKEY$:IF A$="" THEN GOTO 4099

4100 CLS:PRINT"INPUT DATA:"

4123 X$="Territory"

4124 INPUT"     disease ";DI$

4125 INPUT"     importing territory, time ";LU$,TI$

4126 INPUT"     commodity ";CO$

4129 N$="":B=0:G=0:Z=0:S=0:F=0:D=0

4133 INPUT"     Number (2 up to 11 !) of exporting territories to be compared ";N

4134 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 4980

4140 PRINT"Key estimated criteria values on the disease and  exporting territories"

4141 PRINT"            using the  s c a l e  of the   g r a d e s   from 0 to 10 !:"

4142 FOR I=1 TO N

4150 PRINT X$"  No.";I;":";

4155 INPUT" name (up to 15 characters):      "N$(I)

4156 IF N$(I)="" THEN PRINT IDM$:GOTO 4980 ELSE 4159

4159 INPUT"   grade of the disease transmissibility                           ";B#(I)

4160 INPUT"   grade of the disease occurrence                                 ";G#(I)

4161 IF G#(I)=0 THEN GOTO 4162 ELSE 4165

4162 PRINT:PRINT"E r r o r !  For the comparison of risk from affected territories "

4163 PRINT"                      the occurrence grade must be  m a j o r  than 0 !":GOTO 4980

4165 INPUT"   grade of inability to discover all disease cases/outbreaks      ";Z#(I)

4166 INPUT"   grade of inability to avoid new foci                            ";S#(I)

4170 INPUT"   grade of inability to reduce the disease at the territory level ";F#(I)

4172 INPUT"   grade of ineffectiveness of pre-export 'filter'                 ";D#(I)

4175 IF B#(I)>10 OR G#(I)>10 OR Z#(I)>10 OR S#(I)>10 OR F#(I)>10 OR D#(I)>10 THEN GOTO 4176 ELSE 4180

4176 PRINT:PRINT"E r r o r ! Maximum value of individual grades is 10 !":GOTO 4980

4180 NEXT I

4200 CLS:PRINT"     The values of importance multiplier coefficients"

4201 PRINT"                           are fixed (default) as follows:"

4210 PRINT:PRINT TAB(13)"a) disease transmissibility                          = 5"

4211 PRINT TAB(13)"b) disease occurrence                                = 25"

4212 PRINT TAB(13)"c) inability to discover all disease cases/outbreaks = 8"

4213 PRINT TAB(13)"d) inability to avoid new foci of the disease        = 5"

4214 PRINT TAB(13)"e) inability to reduce occurrence of the disease     = 3"

4216 PRINT TAB(13)"f) ineffectiveness of pre-export 'filter'            = 10":PRINT

4220 INPUT"     Do you accept this coefficients (y) or you will fixe others (o) ";R$

4230 IF R$="y" THEN GOTO 4250

4231 IF R$="o" THEN GOTO 4300

4232 GOTO 4250

4250 LET IGB=5:LET IGE=25:LET IGZ=8:LET IGS=5:LET IGF=3:LET IGD=10:GOTO 4400

4300 PRINT:PRINT"     Define other values of importance multiplier coefficients (integers !):"

4310 PRINT:INPUT"            a) disease transmissibility                           ";IGB

4311 INPUT"            b) disease occurrence                                 ";IGE

4312 INPUT"            c) inability to discover all disease cases/outbreaks  ";IGZ

4313 INPUT"            d) inability to avoid new foci of the disease         ";IGS

4314 INPUT"            e) inability to reduce occurrence of the disease      ";IGF

4315 INPUT"            f) ineffectiveness of pre-export 'filter'             ";IGD

4400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4402 IF I$="m" THEN GOTO 10

4403 IF I$="c" THEN GOTO 4000

4404 IF I$=CHR$(13) THEN GOTO 4405

4405 CLS:PRINT TAB(5)"RISK COMPARISON OF DISEASE AGENTS INTRODUCTION FROM SEVERAL TERRITORIES":PRINT

4410 PRINT TAB(5)"Importing territory: ";LU$

4411 PRINT TAB(5)"Commodity: "CO$;TAB(50)"Time: "TI$

4416 PRINT TAB(5)"Disease(s): "DI$:PRINT

4418 PRINT TAB(2)"Exporting";TAB(20)"Grade of Dis.";TAB(35)"Grade of  I n a b i l i t y   to";

4422 PRINT TAB(2)"Territory";TAB(20)"-------------  ---------------------------------";TAB(70)"T O T A L"

4423 PRINT TAB(2)"(with disease";TAB(20)"trans-";TAB(27)"occur-";TAB(35)"disco-";TAB(44)"avoid";

4424 PRINT TAB(53)"reduce";TAB(61)"avoid"

4425 PRINT TAB(2)"occurrence)";TAB(20)"missi-";TAB(27)"rence";TAB(35)"ver ";TAB(44)"new ";TAB(53)"occur-";TAB(61)"agents";TAB(71)"r i s k"

4426 PRINT TAB(20)"bility";TAB(35)"disease";TAB(44)"foci";TAB(53)"rence";TAB(61)"'export'";TAB(71)"points"

4427 PRINT TAB(9)"-----------------------------------------------------------"

4428 PRINT TAB(9)"Multiplier";TAB(20)"*"IGB;TAB(27)"*"IGE;TAB(35)"*"IGZ;TAB(44)"*"IGS;TAB(53)"*"IGF;TAB(61)"*"IGD

4429 PRINT TAB(2)"-----------------------------------------------------------------------------"

4430 FOR I=1 TO N

4431 SU#(I)=B#(I)*IGB+G#(I)*IGE+Z#(I)*IGZ+S#(I)*IGS+F#(I)*IGF+D#(I)*IGD

4451 PRINT TAB(2)USING"\             \";N$(I);

4452 PRINT TAB(21)INT(B#(I));TAB(28)INT(G#(I));TAB(36)INT(Z#(I));TAB(45)INT(S#(I));

4453 PRINT TAB(54)INT(F#(I));TAB(62)INT(D#(I));TAB(70)INT(SU#(I))

4460 NEXT I

4470 A$=INKEY$:IF A$="" THEN GOTO 4470

4471 T=0

4472 FOR I=1 TO N

4473 T=T+SU#(I)

4474 NEXT I

4475 CLS:PRINT TAB(5)"RISK COMPARISON OF DISEASE AGENTS INTRODUCTION FROM SEVERAL TERRITORIES":PRINT

4481 PRINT TAB(10) X$;TAB(30)"Proportion";TAB(50)"Percentage"

4482 PRINT:PRINT TAB(24)"of the total";INT(T);" allocated risk points"

4483 PRINT:PRINT

4484 FOR I=1 TO N

4485 PRINT TAB(10)USING"\             \";N$(I);

4486 PRINT TAB(31)USING"#.####";SU#(I)/T;

4487 PRINT TAB(50)USING"###.####";SU#(I)/T*100

4488 NEXT I

4489 PRINT:PRINT TAB(10)"T o t a l";TAB(31)"1.0000";TAB(50)"100.0000":PRINT

4500 A$=INKEY$:IF A$="" THEN GOTO 4500

4501 CLS:PRINT:PRINT"    RISK COMPARISON OF DISEASE AGENTS INTRODUCTION FROM SEVERAL TERRITORIES"

4502 PRINT

4505 PRINT TAB(10)"(";CHR$(223);" represents 2 % of total"INT(T);"allocated risk points)"

4506 PRINT:PRINT

4507 PRINT TAB(5) X$;TAB(25)"0         20        40        60        80       100 %"

4508 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

4510 FOR I=1 TO N

4512 Z=(SU#(I)/T)*50

4513 IF Z<1 THEN GOTO 4514 ELSE 4520

4514 IF Z>0 THEN GOTO 4515 ELSE 4520

4515 PRINT TAB(5)USING"\             \";N$(I);

4516 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 4525

4520 PRINT TAB(5)USING"\             \";N$(I);

4521 PRINT TAB(25)CHR$(179);

4522 FOR K=1 TO Z

4523 PRINT CHR$(223);

4524 NEXT K

4525 NEXT I

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.5-RISK COMPARISON OF SEVERAL DISEASES AGENTS INTRODUCTION FROM ONE TERRITORY"

5009 PRINT"=============================================================================="

5010 PRINT"This subprogramme compares relative risks of specific diseases agents to be"

5011 PRINT"introduced by import from one territory  n o t   f r e e  of these diseases. "

5012 PRINT"   Criteria on diseases and exporting territory situation:"

5014 PRINT"a) grade of disease transmissibility - ability to be propagated"

5016 PRINT"b) grade of disease occurrence - considering prevalence, incidence and spread"

5021 PRINT"c) grade of  i n a b i l i t y  to  d i s c o v e r  all infected animals and"

5022 PRINT"   herds (due to insufficient: sensitivity of diagnostic methods used,"

5023 PRINT"   animal population investigation grade, field and laboratory services"

5024 PRINT"   capabilities, active field surveys, reporting/information systems, etc.)"

5030 PRINT"d) grade of  i n a b i l i t y   to  a v o i d  disease propagation (new foci)"

5031 PRINT"   i.e. inability to protect specific disease free animals, herds and territory"

5032 PRINT"   (due to the lack of or insufficient preventive and control field measures)"

5035 PRINT"e) grade of  i n a b i l i t y   to  r e d u c e  disease  o c c u r r e n c e"

5036 PRINT"   (due to the lack or insufficient: reduction, elimination and/or eradication"

5037 PRINT"   measures, sanitation actions, field and laboratory services, etc.)"

5040 PRINT"f) grade of  i n e f f e c t i v e n e s s  of pre-export  'f i l t e r'"

5041 PRINT"   (due to lack or insufficient: pre-export selection, treatment,"

5042 PRINT"   investigations and control measures, reliability of veterinary services and"

5043 PRINT"   their certificates), considering also eventual  p r e v i o u s   c a s e s"

5044 PRINT"   of 'exporting' infected animals or infected/contaminated commodities, etc. "

5099 A$=INKEY$:IF A$="" THEN GOTO 5099

5100 CLS:PRINT"INPUT DATA:"

5123 X$="Disease"

5124 INPUT"     exporting territory ";EX$

5125 INPUT"     importing territory, time ";LU$,TI$

5126 INPUT"     commodity ";CO$

5129 N$="":B=0:G=0:Z=0:S=0:F=0:D=0

5133 INPUT"     Number (2 up to 11 !) of selected diseases to be compared ";N

5134 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 5980

5140 PRINT"Key estimated criteria values on the diseases and  exporting territory"

5141 PRINT"              using the  s c a l e  of the  g r a d e s  from 0 to 10 !:"

5142 FOR I=1 TO N

5150 PRINT X$"  No.";I;":";

5155 INPUT" name (up to 15 characters):      "N$(I)

5156 IF N$(I)="" THEN PRINT IDM$:GOTO 5980 ELSE 5159

5159 INPUT"   grade of the disease transmissibility                           ";B#(I)

5160 INPUT"   grade of the disease occurrence                                 ";G#(I)

5161 IF G#(I)=0 THEN GOTO 5162 ELSE 5165

5162 PRINT:PRINT"E r r o r !  For the comparison of risk from affected territories "

5163 PRINT"                             the occurrence grade must be major than 0 !":GOTO 5980

5165 INPUT"   grade of inability to discover all disease cases/outbreaks      ";Z#(I)

5166 INPUT"   grade of inability to avoid new foci                            ";S#(I)

5170 INPUT"   grade of inability to reduce the disease at the territory level ";F#(I)

5172 INPUT"   grade of ineffectiveness of pre-export 'filter'                 ";D#(I)

5175 IF B#(I)>10 OR G#(I)>10 OR Z#(I)>10 OR S#(I)>10 OR F#(I)>10 OR D#(I)>10 THEN GOTO 5176 ELSE 5180

5176 PRINT:PRINT"E r r o r ! Maximum value of individual grades is 10 !":GOTO 5980

5180 NEXT I

5200 CLS:PRINT"     The values of importance multiplier coefficients"

5201 PRINT"                          are fixed (default) as follows:"

5210 PRINT:PRINT TAB(13)"a) disease transmissibility                          = 5"

5211 PRINT TAB(13)"b) disease occurrence                                = 25"

5212 PRINT TAB(13)"c) inability to discover all disease cases/outbreaks = 8"

5213 PRINT TAB(13)"d) inability to avoid new foci of the disease        = 5"

5214 PRINT TAB(13)"e) inability to reduce occurrence of the disease     = 3"

5216 PRINT TAB(13)"f) ineffectiveness of pre-export 'filter'            = 10":PRINT

5220 INPUT"     Do you accept this coefficients (y) or you will fixe others (o) ";R$

5230 IF R$="y" THEN GOTO 5250

5231 IF R$="o" THEN GOTO 5300

5232 GOTO 5250

5250 LET IGB=5:LET IGE=25:LET IGZ=8:LET IGS=5:LET IGF=3:LET IGD=10:GOTO 5400

5300 PRINT:PRINT"     Define other values of importance multiplier coefficients (integers !):"

5310 PRINT:INPUT"            a) disease transmissibility                          ";IGB

5311 INPUT"            b) disease occurrence                                ";IGE

5312 INPUT"            c) inability to discover all disease cases/outbreaks ";IGZ

5313 INPUT"            d) inability to avoid new foci of the disease        ";IGS

5314 INPUT"            e) inability to reduce occurrence of the disease     ";IGF

5315 INPUT"            f) ineffectiveness of pre-export 'filter'            ";IGD

5400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5402 IF I$="m" THEN GOTO 10

5403 IF I$="c" THEN GOTO 5000

5404 IF I$=CHR$(13) THEN GOTO 5405

5405 CLS:PRINT"  RISK COMPARISON OF SEVERAL DISEASES AGENTS INTRODUCTION FROM ONE TERRITORY":PRINT

5410 PRINT TAB(5)"Importing territory: "LU$

5411 PRINT TAB(30)"Exporting territory: "EX$

5413 PRINT TAB(5)"Commodity: "CO$;TAB(40)"Time: "TI$:PRINT

5418 PRINT TAB(20)"Grade   of";TAB(35)"Grade of  i n a b i l i t y   to";

5422 PRINT TAB(20)"-------------  ---------------------------------";TAB(70)"T O T A L"

5423 PRINT TAB(2)"D i s e a s e";TAB(20)"trans-";TAB(27)"occur-";TAB(35)"disco-";TAB(44)"avoid";

5424 PRINT TAB(53)"reduce";TAB(61)"avoid"

5425 PRINT TAB(20)"missi-";TAB(27)"rence";TAB(35)"ver ";TAB(44)"new ";TAB(53)"occur-";TAB(61)"agents";TAB(71)"r i s k"

5426 PRINT TAB(20)"bility";TAB(35)"disease";TAB(44)"foci";TAB(53)"rence";TAB(61)"'export'";TAB(71)"points"

5427 PRINT TAB(9)"-----------------------------------------------------------"

5428 PRINT TAB(9)"Multiplier";TAB(20)"*"IGB;TAB(27)"*"IGE;TAB(35)"*"IGZ;TAB(44)"*"IGS;TAB(53)"*"IGF;TAB(61)"*"IGD

5429 PRINT TAB(2)"-----------------------------------------------------------------------------"

5430 FOR I=1 TO N

5431 SU#(I)=B#(I)*IGB+G#(I)*IGE+Z#(I)*IGZ+S#(I)*IGS+F#(I)*IGF+D#(I)*IGD

5451 PRINT TAB(2)USING"\             \";N$(I);

5452 PRINT TAB(21)INT(B#(I));TAB(28)INT(G#(I));TAB(36)INT(Z#(I));TAB(45)INT(S#(I));

5453 PRINT TAB(54)INT(F#(I));TAB(62)INT(D#(I));TAB(70)INT(SU#(I))

5460 NEXT I

5470 A$=INKEY$:IF A$="" THEN GOTO 5470

5471 T=0

5472 FOR I=1 TO N

5473 T=T+SU#(I)

5474 NEXT I

5481 CLS:PRINT"  RISK COMPARISON OF SEVERAL DISEASES AGENTS INTRODUCTION FROM ONE TERRITORY":PRINT

     PRINT TAB(10) X$;TAB(30)"Proportion";TAB(50)"Percentage"

5482 PRINT:PRINT TAB(26)"of the total";INT(T);" allocated risk points"

5483 PRINT:PRINT

5484 FOR I=1 TO N

5485 PRINT TAB(10)USING"\             \";N$(I);

5486 PRINT TAB(31)USING"#.####";SU#(I)/T;

5487 PRINT TAB(50)USING"###.####";SU#(I)/T*100

5488 NEXT I

5489 PRINT:PRINT TAB(10)"T o t a l";TAB(31)"1.0000";TAB(50)"100.0000":PRINT

5500 A$=INKEY$:IF A$="" THEN GOTO 5500

5501 CLS:PRINT"  RISK COMPARISON OF SEVERAL DISEASES AGENTS INTRODUCTION FROM ONE TERRITORY"

5502 PRINT

5505 PRINT TAB(13)"(";CHR$(223);" represents 2 % of total"INT(T);"allocated risk points)"

5506 PRINT:PRINT

5507 PRINT TAB(5) X$;TAB(25)"0         20        40        60        80       100 %"

5508 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

5510 FOR I=1 TO N

5512 Z=(SU#(I)/T)*50

5513 IF Z<1 THEN GOTO 5514 ELSE 5520

5514 IF Z>0 THEN GOTO 5515 ELSE 5520

5515 PRINT TAB(5)USING"\             \";N$(I);

5516 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 5525

5520 PRINT TAB(5)USING"\             \";N$(I);

5521 PRINT TAB(25)CHR$(179);

5522 FOR K=1 TO Z

5523 PRINT CHR$(223);

5524 NEXT K

5525 NEXT I

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.6-ANIMAL POPULATION MOVEMENT AS POTENTIAL RISK OF DISEASE PROPAGATION"

6010 PRINT"======================================================================="

6050 PRINT TAB(3)"This subprogramme calculates animal population movement in terms of:"

6052 PRINT TAB(7)"1) combination of distance, time and velocity"

6054 PRINT TAB(7)"2) indicators related to movement extent, dispersion and convergency"

6058 INPUT"   Enter choice number:  ",S

6059 IF S=1 OR S=2 THEN GOTO 6100 ELSE 6980

6100 PRINT"INPUT DATA:"

6110 INPUT"     species, category(ies) ";ES$,CA$

6111 INPUT"     territory, period ";TER$,PE$

6116 INPUT"     place(s) of origin, of destination ";OP$,DP$

6117 INPUT"     number of animals moved between origin and destination places ";TAM

6119 PRINT"     purpose: rearing (r), fattening (f)"

6120 INPUT"                                   or slaughter (s) or natural (n) ";PAM$

6121 IF TAM=0 OR PAM$=""THEN PRINT:PRINT IDM$:GOTO 6980

6123 IF PAM$="r" THEN P$="Purpose: rearing"

6124 IF PAM$="s" THEN P$="Purpose: slaughter"

6125 IF PAM$="f" THEN P$="Purpose: fattening"

6126 IF PAM$="n" THEN P$="Purpose: natural movement"

6127 IF S=1 THEN GOTO 6128 ELSE 6169

6128 INPUT"     length measure units                                       ";UD$

6129 INPUT"     time measure units                                         ";UT$:PRINT

6130 PRINT"Do not answer (skip) the question about the indicator to be calculated;"

6131 PRINT"                            the other two numeric data must be available !":PRINT

6135 INPUT"     velocity of the movement per one time measure unit         ";V

6140 INPUT"     distance of the movement in length measure units           ";L

6150 INPUT"     time of the movement in time measure units                 ";T

6154 IF (V+L+T)=0 THEN PRINT IDM$:GOTO 6980 ELSE 6190

6169 INPUT"     distance, duration in days ";VZ$,DU

6170 IF PAM$<>"s" THEN GOTO 6171 ELSE 6173

6171 PRINT"     number of animals of the given species/category(ies)"

6172 INPUT"         existing in place(s) of destination  in the period     ";A

6173 IF PAM$<>"n" THEN GOTO 6181 ELSE 6182

6181 INPUT"     numbers of places of origin, of destination                ";PO,PD

6182 IF PAM$<>"s" THEN GOTO 6183 ELSE 6186

6183 INPUT"     surface measure units (up to 6 characters !)               ";SMU$

6184 INPUT"     size of territory of animal origin in surface units        ";SO

6185 INPUT"     size of territory of destination in surface units          ";SD

6186 INPUT"     level (regional, national, international, etc.)   ";LM$

6187 INPUT"     form of movement (transport means, on foot, etc.) ";FM$

6189 IF (A+PO+PD+SO+SD+DU)=0 THEN PRINT:PRINT IDM$:GOTO 6980

6190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6192 IF I$="m" THEN GOTO 10

6193 IF I$="c" THEN GOTO 6000

6194 IF I$=CHR$(13) THEN GOTO 6200

6200 CLS:PRINT"  ANIMAL POPULATION MOVEMENT AS POTENTIAL RISK OF DISEASE PROPAGATION"

6201 IF S=1 THEN GOTO 6202 ELSE 6380

6202 PRINT"Species: "ES$;TAB(40)"Category(ies): ";CA$

6203 PRINT TAB(20)"Moved Animals: "TAM

6204 PRINT TAB(20)P$

6205 PRINT"Territory: "TER$;TAB(50)"Period: "PE$

6206 PRINT"Origin: "OP$;TAB(40)"Destination: "DP$

6207 PRINT TAB(20)"Time Units: "UT$

6208 PRINT:PRINT

6209 IF L>0 AND T>0 AND V=0 THEN GOTO 6320 ELSE 6210

6210 IF V>0 AND T>0 AND L=0 THEN GOTO 6330 ELSE 6220

6220 IF L>0 AND V>0 AND T=0 THEN GOTO 6340 ELSE 6230

6230 IF L>0 OR T>0 AND V>0 THEN GOTO 6370 ELSE 6240

6240 IF D>0 AND L>0 GOTO 6370 ELSE 6980

6320 PRINT"      Estimated average velocity of animal movement":PRINT

6321 PRINT"                              per one time measure unit  = "USING"####.##";L/T;

6322 PRINT " "UD$:GOTO 6210

6330 PRINT:PRINT"      Estimated average distance of animal movement":PRINT

6331 PRINT"                                 during ";INT(T+.5) UT$;"        =  "INT(V*T+.5);

6332 PRINT" "UD$:GOTO 6220

6340 PRINT:PRINT"      Estimated average time needed for animal movement  ":PRINT

6341 PRINT TAB(23)"   up to the distance of";INT(L+.5) UD$;"    =  "INT(L/V+.5)    UT$:GOTO 6230

6370 PRINT:GOTO 6980

6380 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

6394 IF PAM$="s" THEN PRINT TAB(18)"Transferred animals: "TAM

6400 PRINT"Territory: "TER$;TAB(40)"Period: "PE$

6401 IF PAM$<>"s" THEN PRINT"Local animals: "A;TAB(40)"Introduced animals: "TAM

6402 PRINT"Origin: "OP$;TAB(40)"Destination: "DP$

6403 PRINT"Distance: "VZ$;TAB(40)P$

6404 IF PAM$<>"n" THEN GOTO 6405 ELSE 6406

6405 PRINT"Places of Origin: "PO;TAB(40)"Places of Destination: "PD

6406 IF PAM$<>"s" THEN PRINT"Orig. territory size: "SO SMU$;TAB(40)"Destin. territory size: "SD SMU$

6407 PRINT"Level: "LM$;TAB(40)"Form: "FM$:PRINT

6408 IF PAM$<>"s" THEN GOTO 6409 ELSE 6600

6409 IF A>0 AND TAM>0 THEN PRINT" Ratio introduced/total (introduced+local) animals           =    ";USING" #.####";A/(A+TAM):PRINT

6410 IF A>0 AND TAM>0 THEN PRINT" Ratio introduced/local animals        =  1 :";USING"####.####";A/TAM;

6411 PRINT"       =    ";USING"##.####";TAM/A

6412 IF A>0 AND TAM>0 THEN PRINT" Ratio local/introduced animals        =  1 : ";USING"##.####";TAM/A;

6413 PRINT TAB(58)"    =  ";USING"####.####";A/TAM:PRINT

6414 IF PO>0 AND PD>0 THEN PRINT" Ratio destination/origin places (dispersion)                =  ";USING"####.####";PD/PO

6415 IF PO>0 AND PD>0 THEN PRINT" Ratio origin/destination places (convergency)               =  ";USING"####.####";PO/PD:PRINT

6416 IF SO>0 AND SD>0 THEN PRINT" Ratio destination/origin territories' size                  =  ";USING"####.####";SD/SO

6417 IF SO>0 AND SD>0 THEN PRINT" Ratio origin/destination territories' size                  =  ";USING"####.####";SO/SD:PRINT

6419 IF TAM>0 AND PD>0 THEN PRINT" Average of introduced animals per one destination place     = ";USING"#####.####";TAM/PD

6425 IF TAM>0 AND DU>0 THEN PRINT" Average number of introduced animals per one day            = ";USING"#####.####";TAM/DU

6428 GOTO 6980

6600 PRINT

6601 IF PO>0 AND PD>0 THEN PRINT" Ratio destination/origin places (dispersion)                =  ";USING"#####.####";PD/PO:PRINT

6605 IF PO>0 AND PD>0 THEN PRINT" Ratio origin/destination places (convergency)               =  ";USING"#####.####";PO/PD:PRINT

6606 IF TAM>0 AND PD>0 THEN PRINT" Average of introduced animals per one destination place     =  ";USING"#####.####";TAM/PD:PRINT

6607 IF TAM>0 AND DU>0 THEN PRINT" Average number of introduced animals per one day            =  ";USING"#####.####";TAM/DU

6610 PO=0:PD=0

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.7-ANIMAL PRODUCTS TRANSFER AS POTENTIAL RISK OF DISEASE PROPAGATION"

7010 PRINT"===================================================================="

7050 PRINT"This subprogramme calculates indicators related to raw animal products "

7054 PRINT"transfer (distribution) extent, dispersion and convergency."

7100 PRINT"INPUT DATA:"

7110 INPUT"     animal product, measure units ";ES$,PMU$

7111 INPUT"     territory framework, period ";LU$,PE$

7113 INPUT"     place(s) of origin, of destination ";OP$,DP$

7114 PRINT"What is the purpose ? Further processing (f), distribution (d)"

7115 INPUT"                      consumption (c), export e) or import (i)  ";PU$

7117 PRINT"     amount of the product transferred between origin"

7118 INPUT"          and destination places in product measure units       ";TAM

7119 PRINT"     amount of the product produced locally"

7120 INPUT"                        in destination places (territory)       ";A

7128 INPUT"     distance of transfer                                       ";L$

7129 INPUT"     time measure units, duration of transfer                   ";UT$,DU

7151 INPUT"     numbers of places of origin, of destination                ";PO,PD

7153 INPUT"     surface measure units                                      ";SMU$

7154 INPUT"     size of territory of product origin in surface units       ";SO

7155 INPUT"     size of territory of product destination in surface units  ";SD

7156 INPUT"     level (regional, national, international,etc.)   ";LM$

7157 INPUT"     form of transport                                ";FM$

7160 IF PU$="f" THEN PU$="further processing"

7161 IF PU$="d" THEN PU$="distribution"

7162 IF PU$="c" THEN PU$="consumption"

7163 IF PU$="e" THEN PU$="export"

7164 IF PU$="i" THEN PU$="import"

7170 IF TAM=0 OR PO=0 OR PD=0 OR (A+DU+SO+SD)=0 THEN PRINT:PRINT IDM$:GOTO 7980 ELSE 7190

7190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7192 IF I$="m" THEN GOTO 10

7193 IF I$="c" THEN GOTO 7000

7194 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT"    ANIMAL PRODUCTS TRANSFER AS POTENTIAL RISK OF DISEASE PROPAGATION"

7202 PRINT"Product: "ES$;TAB(50)"Measure Units : ";PMU$

7203 PRINT"Territory: "LU$;TAB(50)"Period: "PE$

7204 PRINT"Amount of local product in destination place (territory): "A

7205 PRINT"Transferred Product: "TAM;TAB(40)"Purpose: "PU$

7206 PRINT"Origin: "OP$;TAB(40)"Destination: "DP$

7210 PRINT"Distance: "L$;TAB(40)"Duration: "DU UT$

7212 PRINT"Places of Origin: "PO;TAB(40)"Places of Destination: "PD

7220 PRINT"Level: "LM$;TAB(40)"Form: "FM$:PRINT

7407 IF A>0 AND TAM>0 THEN PRINT" Ratio introduced/total (introduced+local) products       =    ";USING" #.####";A/(A+TAM):PRINT

7408 IF A>0 AND TAM>0 THEN PRINT" Ratio introduced/local products       =  1 : ";USING"##.####";A/TAM;

7409 PRINT"     =    ";USING"##.####";TAM/A

7410 IF A>0 AND TAM>0 THEN PRINT" Ratio local/introduced products       =  1 : ";USING"##.####";TAM/A;

7411 PRINT TAB(58)" =    ";USING"##.####";A/TAM:PRINT

7413 IF PO>0 AND PD>0 THEN PRINT" Ratio destination/origin places (dispersion)             =  ";USING"####.####";PD/PO

7415 IF PO>0 AND PD>0 THEN PRINT" Ratio origin/destination places (convergency)            =  ";USING"####.####";PO/PD:PRINT

7416 IF SO>0 AND SD>0 THEN PRINT" Ratio destination/origin territories' size               =  ";USING"####.####";SD/SO

7417 IF SO>0 AND SD>0 THEN PRINT" Ratio origin/destination territories' size               =  ";USING"####.####";SO/SD:PRINT

7419 IF TAM>0 AND PD>0 THEN PRINT" Average of introduced product per one destination place  = ";USING"#####.####";TAM/PD;

7420 PRINT" " PMU$

7425 IF TAM>0 AND DU>0 THEN PRINT" Average of introduced product per one time unit          = ";USING"#####.####";TAM/DU;

7426 PRINT" " PMU$

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.8-CONCENTRATION OF ANIMALS AS POTENTIAL RISK OF DISEASE PROPAGATION"

8003 PRINT"===================================================================="

8010 PRINT"This subprogramme calculates simple indicators related to the concentration"

8011 PRINT"grade of animals on surface and in volume space of environment:"

8020 PRINT"      1) concentration on known surface space"

8021 PRINT"      2) concentration on unknown surface space (to be calculated)"

8024 PRINT"      3) concentration in known volume space"

8025 PRINT"      4) concentration in unknown volume space (to be calculated)"

8030 INPUT"Enter choice number: ",CH

8031 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 8032 ELSE 8980

8032 PRINT"INPUT DATA:"

8033 INPUT"     species, category(ies) ";SP$,CA$

8034 INPUT"     place, time ";PL$,TI$

8035 INPUT"     number of animals ";A

8038 IF A=0 THEN PRINT IDM$:GOTO 8980 ELSE 8039

8039 IF CH=1 OR CH=2 THEN GOTO 8040 ELSE 8042

8040 PRINT"     type of location [territory(ies), pasture(s), ranch(es),"

8041 INPUT"         farm(s), stable(s), shed(s), pen(s), box(es), etc.] ";TL$:GOTO 8045

8042 PRINT"     type of location (air space in stable, shed, box, etc. "

8043 INPUT"         or water environment in reservoir, etc.) ";TL$

8045 INPUT"     identification (name) of location(s) ";ID$

8046 IF CH=1 THEN GOTO 8050

8047 IF CH=2 THEN GOTO 8100

8048 IF CH=3 THEN GOTO 8150

8049 IF CH=4 THEN GOTO 8200

8050 INPUT"     surface space measure unit (m2, ha, km2, shed, farm, etc.)   ";SU$

8052 INPUT"     known space for all animals in surface measure units         ";KS:GOTO 8250

8100 INPUT"     surface space measure unit (up to 6 characters)            ";SU$

8101 INPUT"     length measure unit (up to 6 characters)                   ";LMU$

8102 INPUT"     length of the space surface                                ";LE

8104 INPUT"     width (span) of the space surface                          ";WI:GOTO 8250

8150 INPUT"     volume space measure units                                 ";VMU$

8152 INPUT"     known volume space for the animals                         ";KV:GOTO 8250

8200 INPUT"     volume space measure units                               ";VMU$

8201 INPUT"     length measure units                                     ";LMU$

8202 INPUT"     length, width (span) of the space                        ";LE,WI

8206 INPUT"     hight of the space                                       ";H:GOTO 8250

8250 IF CH=1 AND KS=0 OR CH=2 AND (LE+WI)=0 OR CH=3 AND KV=0 OR CH=4 AND (LE+WI+H)=0 THEN PRINT:PRINT IDM$:GOTO 8980

8300 INPUT"Do you want to compare the result with the space standard, yes(y) or no(n) ";CO$

8301 IF CO$="y" THEN GOTO 8302 ELSE 8304

8302 INPUT"     standard (norm) value in space units                     ";ST#

8303 IF ST#=0 THEN PRINT IDM$:GOTO 8980

8304 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8305 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

8306 IF I$="m" THEN GOTO 10

8307 IF I$="c" THEN GOTO 8000

8308 IF I$=CHR$(13) THEN GOTO 8310

8310 CLS:PRINT"   CONCENTRATION OF ANIMALS AS POTENTIAL RISK OF DISEASE PROPAGATION":PRINT

8311 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8312 PRINT"Place: "PL$;TAB(50)"Time: "TI$

8316 PRINT"Type of location: "TL$;TAB(40)"Identification: "ID$

8318 PRINT TAB(15)"Total number of animals: "A

8350 IF CH=1 THEN GOTO 8360

8351 IF CH=2 THEN GOTO 8380

8352 IF CH=3 THEN GOTO 8400

8353 IF CH=4 THEN GOTO 8420

8360 PRINT"Surface Unit: "SU$;TAB(40)"Total Units: "KS SU$

8361 IF ST#=0 THEN GOTO 8365 ELSE PRINT TAB(15)"Standard per animal: "ST# SU$:PRINT:PRINT

8365 PRINT:PRINT:PRINT"     Average number of animals per one surface unit     = ";USING"######.####";A/KS:PRINT

8367 PRINT"     Average surface space per one animal               = ";USING"######.####";KS/A;

8368 PRINT" "SU$:PRINT:PRINT

8370 IF ST#=0 THEN GOTO 8980 ELSE PRINT"     Ratio standard to compared space per one animal    =  1 : ";USING"####.####";(KS/A)/ST#:GOTO 8980

8380 KS=LE*WI

8386 PRINT"Surface Unit: "SU$;TAB(40)"Total Space: "KS SU$

8388 IF ST#=0 THEN GOTO 8395 ELSE PRINT TAB(15)"Standard per animal: "ST# SU$:PRINT:PRINT

8395 PRINT:PRINT:PRINT"     Average number of animals per one surface unit     = ";USING"######.####";A/KS:PRINT

8397 PRINT"     Average surface space per one animal               = ";USING"######.####";KS/A;

8398 PRINT" "SU$:PRINT:PRINT

8399 IF ST#=0 THEN GOTO 8980 ELSE PRINT"     Ratio standard to compared space per one animal    =  1 : ";USING"####.####";(KS/A)/ST#:GOTO 8980

8400 PRINT TAB(15)"Volume Space: "KV VMU$

8403 IF ST#=0 THEN GOTO 8405 ELSE PRINT TAB(15)"Standard per animal: "ST# VMU$:PRINT:PRINT

8405 PRINT:PRINT:PRINT"     Average number of animals per one ";VMU$;"               = ";USING"######.####";A/KV:PRINT

8407 PRINT"     Average volume space per one animal                = ";USING"######.####";KV/A;

8408 PRINT" "VMU$:PRINT:PRINT

8410 IF ST#=0 THEN GOTO 8980 ELSE PRINT"     Ratio standard to compared space per one animal    =  1 : ";USING"####.####";(KV/A)/ST#:GOTO 8980

8420 KV=LE*WI*H

8423 PRINT TAB(15)"Volume Space: "KV VMU$

8424 IF ST#=0 THEN GOTO 8425 ELSE PRINT TAB(15)"Standard per animal: "ST# VMU$:PRINT:PRINT

8425 PRINT:PRINT:PRINT"     Average number of animals per one ";VMU$;"               = ";USING"######.####";A/KV:PRINT

8427 PRINT"     Average volume space per one animal                = ";USING"######.####";KV/A;

8428 PRINT" "VMU$:PRINT:PRINT

8450 IF ST#=0 THEN GOTO 8980 ELSE PRINT"     Ratio standard to compared space per one animal    =  1 : ";USING"####.####";(KV/A)/ST#

8980 ST#=0:A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.9-RISK PROBABILITY ASSESSMENT OF ANIMAL DISEASE PROPAGATION"

9012 PRINT"============================================================="

9020 PRINT TAB(5)"This subprogramme calculates a rough risk probability of specific "

9021 PRINT"animal disease agents to be spread from existing foci creating new ones."

9025 PRINT TAB(5)"The input and result interpretation to be based  on theoretical knowledge"

9026 PRINT"and practical experience and must be epizootiologically meaningful."

9027 PRINT TAB(5)"A l l  questions about grades and rates (real, supposed or fictitious)"

9028 PRINT"                                  must be answered (scale between >0 and 1) !":PRINT

9050 PRINT"INPUT DATA:"

9056 PRINT:INPUT"     place, time ";PL$,TI$

9057 INPUT"     disease";DI$

9058 INPUT"     species ";SP$

9059 INPUT"     definition of focal units ";FU$

9060 INPUT"     definition of foci ";FO$

9064 'A$=INKEY$:IF A$="" THEN GOTO 9064

9065 CLS:PRINT TAB(5)"True situation in the given territory/population:":PRINT

9066 INPUT"  prevalence rate of specically diseased animals                       ";DPR

9067 INPUT"  incidence rate of specifically diseased animals                      ";IN

9068 INPUT"  prevalence rate of specific disease f o c i                          ";PR

9069 INPUT"  incidence rate of specific disease  f o c i                          ";FI:PRINT

9070 PRINT"t e n d e n c y  of specific epizootic process"

9071 INPUT"         -   stagnating (s), increasing (i) or decreasing (d)        ";EP$:PRINT

9072 IF EP$="s"OR EP$="i"OR EP$="d" THEN GOTO 9075 ELSE PRINT IDE$:GOTO 9980

9075 IF EP$="s" THEN GOTO 9080 ELSE 9076

9076 PRINT"- estimated increasing or decreasing  g r a d e  considering "

9077 PRINT"the characteristics of specific disease process (interaction "

9078 PRINT"of population-pathogens-environment, development stage), role "

9079 INPUT"of influencing factors, p r e v i o u s  propagation intensity etc.  ";GT

9080 IF EP$="s" THEN GT=0.001

9110 PRINT"- estimated grade of  i n a b i l i t y   to  r e d u c e  the number"

9111 PRINT"of foci due to the lack of effective: field reduction, elimination,"

9112 PRINT"and/or eradication measures, sanitation actions, veterinary field"

9113 INPUT"and laboratory services, etc.                                        ";GR

9127 PRINT"- estimated grade of  i n a b i l i t y   to  p r o t e c t  disease"

9128 PRINT"free part of population (n e w   f o c i)  due to lack of effective:"

9129 PRINT"protection measures against the contacts with intrafocal animals and"

9130 PRINT"their products or with other etiological agents' sources (vectors, wild"

9133 PRINT"animals-reservoirs, etc.), population specific resistance (vaccination),"

9134 INPUT"diagnostic methods, veterinary field and laboratory services, etc.   ";GP:PRINT

9150 IF (DPR+IN+PR+FI)=0 OR (GR+GP)=0 THEN PRINT IDM$:GOTO 9980 ELSE 9160

9160 IF GP=0 OR GP>1 OR GR=0 OR GR>1 OR GT=0 OR GT>1 OR DPR=0 OR DPR>1 OR IN=0 OR IN>1 OR PR=0 OR PR>1 OR FI=0 OR FI>1 THEN GOTO 9161 ELSE 9190

9161 PRINT:PRINT"E r r o r ! All data must be major than 0 and not major than 1 !":GOTO 9980

9190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9192 IF I$="m" THEN GOTO 10

9193 IF I$="c" THEN GOTO 9000

9194 IF I$=CHR$(13) THEN GOTO 9200

9200 CLS:PRINT"      RISK PROBABILITY ASSESSMENT OF ANIMAL DISEASE PROPAGATION":PRINT

9203 IF EP$="s" THEN T$="stagnating"

9205 IF EP$="i" THEN T$="increasing"

9206 IF EP$="d" THEN T$="decreasing"

9207 PRINT"Place: "PL$;TAB(50)"Time: "TI$

9208 PRINT"Disease: "DI$;TAB(40)"Species: "SP$

9209 PRINT"Focal units: "FU$;TAB(40)"Foci: "FO$:PRINT

9211 PRINT"Disease Prevalence Rate: "USING"#.####";DPR;

9212 PRINT TAB(40)"Disease Incidence Rate: "USING"#.####";IN

9213 PRINT"Focal Prevalence Rate: "USING"#.####";PR;

9214 PRINT TAB(40)"Focal incidence rate: "USING"#.####";FI

9215 PRINT TAB(15)"Tendency: "T$;

9216 IF EP$="i" OR EP$="d" THEN PRINT" -  grade "USING"#.####";GT:PRINT

9217 PRINT TAB(15)"Estimated grades of failure in:"

9218 PRINT"Reduction: ";USING"#.####";GR;

9220 PRINT TAB(40)"Protection: ";USING"#.####";GP;

9222 PRINT:PRINT

9252 A=DPR+IN+PR+4*FI

9260 Z=((A*SQR(GR)*SQR(GP)))

9265 IF EP$="i" THEN GOTO 9266 ELSE 9267

9266 W=Z+Z*GT:GOTO 9300

9267 W=Z-Z*GT/2

9300 PRINT

9310 IF W<0 THEN W=0.0000

9311 IF W>1 THEN W=1.0000

9340 IF EP$="i"THEN GOTO 9345 ELSE 9349

9345 PRINT:PRINT TAB(7)"Risk probability grade of disease propagation can be estimated":PRINT

9346 PRINT TAB(17)"to be about   "USING"#.######## ";W:PRINT

9347 PRINT TAB(40)" i.e. about  "USING"###.####  %";W*100

9348 GOTO 9980

9349 PRINT:PRINT TAB(10)"Risk probability grade of disease propagation can be estimated":PRINT

9350 PRINT TAB(17)"to be about   "USING"#.######## ";W:PRINT

9352 PRINT TAB(40)" i.e. about  "USING"###.####  %";W*100

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9986 IF R$="y" OR R$="n" THEN GOTO 9987 ELSE 9990

9987 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"5.10-PER CAPITA FOOD CONSUMPTION AS POTENTIAL RISK OF FOOD-BORN DISEASES"

10010 PRINT"========================================================================="

10050 PRINT"This subprogramme calculates average consumption per one person according to:"

10053 PRINT TAB(10)"1) food              2) place                  3) time"

10060 INPUT"    Enter choice number: ",CH

10065 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 10100 ELSE PRINT IDE$:GOTO 10980

10100 PRINT"INPUT DATA:"

10111 INPUT"     place, period ";PL$,PE$

10112 IF CH=1 THEN INPUT"     total number of persons ";IH

10113 IF CH=1 AND IH=0 THEN PRINT:PRINT IDM$:GOTO 10980 ELSE 10114

10114 IF CH=2 OR CH=3 THEN INPUT"     food ";PR$

10115 IF CH=2 OR CH=3 THEN INPUT"     food measure units ";MU$

10119 INPUT"     How many data to be processed (1 up to 11 !) ";N

10120 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 10980

10123 IF CH=1 THEN PRINT TAB(2)"List of data - names (up to 15 characters), units (up to 10 characters !),"

10124 IF CH<>1 THEN PRINT TAB(2)"List of data - names (up to 15 characters); quantity in measure units:":GOTO 10126

10125 PRINT TAB(17)"quantity in measure units (integers !):"

10126 FOR I=1 TO N

10127 PRINT I;":";

10128 IF CH=1 THEN INPUT" food, measure units, quantity ";P$(I),U$(I),Q#(I)

10132 IF CH=2 THEN INPUT" place, persons, food quantity ";IN$(I),S#(I),Q#(I)

10134 IF CH=3 THEN INPUT" subperiod, persons, food quantity ";IN$(I),S#(I),Q#(I)

10135 IF CH<>1 AND S#(I)=0 OR Q#(I)=0 THEN PRINT:PRINT IDE$:GOTO 10980

10136 NEXT I

10137 T#=0:S#=0

10138 FOR I=1 TO N

10140 T#=T#+Q#(I)

10141 S#=S#+S#(I)

10142 NEXT I

10143 IF T#=0 THEN PRINT:PRINT IDE$:GOTO 1980

10144 MAX=Q#(1)

10145 FOR I=2 TO N

10146 IF Q#(I)>MAX THEN MAX=Q#(I)

10147 NEXT I

10148 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10149 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10150 IF I$="m" THEN GOTO 10

10151 IF I$="c" THEN GOTO 10000

10152 IF I$=CHR$(13) THEN GOTO 10153

10153 CLS:PRINT"    PER CAPITA CONSUMPTION OF FOOD AS FOOD-BORN DISEASES RISK":PRINT

10154 PRINT"Place: "PL$;TAB(50)"Period: "PE$

10155 IF CH=2 OR CH=3 THEN PRINT"Food: "PR$;TAB(40)"Measure units: "MU$

10156 IF CH=1 THEN PRINT TAB(14)"Total number of persons: ";IH

10157 IF CH=1 THEN GOTO 10158 ELSE 10172

10158 PRINT

10159 PRINT TAB(6)"Food";TAB(25)"Measure";TAB(40)"Quantity";TAB(60)"Average"

10160 IF CH=1 THEN PRINT TAB(25)"Units";TAB(60)"per Capita":PRINT

10161 FOR I=1 TO N:PRINT TAB(6)USING"\              \";P$(I);

10162 PRINT TAB(25)U$(I);TAB(39)INT(Q#(I)+.5);TAB(60)USING"####.####";Q#(I)/IH:NEXT I:PRINT

10163 GOTO 10980

10172 PRINT

10173 IF CH=2 THEN D$="Place":IF CH=2 THEN Z$="Persons"

10174 IF CH=3 THEN D$="Superiod":IF CH=3 THEN Z$="Persons"

10175 PRINT TAB(2)D$;TAB(20)Z$;TAB(33)"Quantity";TAB(48)"Average";TAB(60)"Grand   T o t a l"

10176 PRINT TAB(33)"of Food";TAB(48)"per Capita";

10177 PRINT TAB(60)"Proportion";TAB(75)"%"

10178 PRINT

10188 FOR I=1 TO N

10189 PRINT TAB(2)USING"\              \";IN$(I);

10190 PRINT TAB(19)INT(S#(I));TAB(32)INT(Q#(I)+.5);TAB(48)USING"#####.####";Q#(I)/S#(I);

10191 PRINT TAB(61)USING"#.####";Q#(I)/T#;

10192 PRINT TAB(70)USING"###.####";Q#(I)/T#*100

10193 NEXT I:PRINT

10194 IF CH=2 OR CH=3 THEN GOTO 10195 ELSE 10980

10195 PRINT TAB(2)"T o t a l";TAB(19)INT(S#);TAB(32)INT(T#);TAB(48)USING"#####.####";T#/S#;

10196 PRINT TAB(61)"1.0000";TAB(70)"100.0000"

10200 A$=INKEY$:IF A$="" THEN GOTO 10200

10201 IF N=1 THEN GOTO 10982

10205 CLS:PRINT"    PER CAPITA CONSUMPTION OF FOOD AS FOOD-BORN DISEASES RISK"

10210 IF MAX>(T#/2) THEN GOTO 10212 ELSE 10240

10212 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 2 % of total "INT(T#+.5)  MU$;")":PRINT

10216 PRINT:PRINT TAB(3)D$;TAB(25)"0         20        40        60        80       100 %"

10218 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

10219 FOR I=1 TO N

10220 Z=Q#(I)/T#*50

10221 IF Z<1 THEN GOTO 10222 ELSE 10225

10222 IF Z>0 THEN GOTO 10223 ELSE 10225

10223 PRINT TAB(2)USING"\              \";IN$(I);

10224 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 10233

10225 PRINT TAB(2)USING"\              \";IN$(I);

10226 PRINT TAB(25)CHR$(179);

10227 FOR K=1 TO Q#(I)/T#*50

10228 PRINT CHR$(223);

10230 NEXT K

10233 NEXT I:GOTO 10980

10240 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(T#+.5)  MU$;")":PRINT

10246 PRINT:PRINT TAB(3)D$;TAB(25)"0         10        20        30        40        50 %"

10248 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

10249 FOR I=1 TO N

10250 Z=Q#(I)/T#*100

10251 IF Z<1 THEN GOTO 10252 ELSE 10255

10252 IF Z>0 THEN GOTO 10253 ELSE 10255

10253 PRINT TAB(2)USING"\              \";IN$(I);

10254 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 10263

10255 PRINT TAB(2)USING"\              \";IN$(I);

10256 PRINT TAB(25)CHR$(179);

10257 FOR K=1 TO Q#(I)/T#*100

10258 PRINT CHR$(223);

10260 NEXT K

10263 NEXT I

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10983 IF R$="y" OR R$="n" THEN GOTO 10984 ELSE 10990

10984 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

11002 IF Z$="y" OR Z$="n" THEN GOTO 11010 ELSE 11030

11010 IF Z$="y" THEN GOTO 11020 ELSE 11030

11020 CHAIN"EPIZ40MM.KOU"

11025 CLS:PRINT:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

11030 SYSTEM

 

 

 6-Consequences of animal population health and disease

 

5 ON ERROR GOTO 11995

6 IDM$="Input data missing !"

7 IDE$="Input data error !"

10 REM:EPIZ4006.KOU,10/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"6-CONSEQUENCES OF ANIMAL POPULATION HEALTH AND DISEASE"     

40 PRINT TAB(10)"======================================================"

100 PRINT

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(10)"1-Animal health benefit and disease losses in production"

520 PRINT TAB(10)"2-Public health consequences of diseases common to animals and man"

530 PRINT TAB(10)"3-Losses due to specific disease according to average parameters"

540 PRINT TAB(10)"4-Losses due to death and condemnation of animal carcasses"

550 PRINT TAB(10)"5-Losses due to diseased animals' utility reduction"

560 PRINT TAB(10)"6-Losses due to diseased animals' reproduction deterioration"

570 PRINT TAB(10)"7-Inputs benefit/losses in healthy/diseased animals"

580 PRINT TAB(10)"8-Summary tables of losses due to animal population diseases"

590 PRINT TAB(10)"9-Cost of population health mass actions"

600 PRINT TAB(10)"10-Economic losses due to population health/disease measures' costs"

606 PRINT TAB(10)"11-Blanc summary tables of animal population disease consequences"

610 PRINT:PRINT TAB(10)"12-E N D  of this group of subprogrammes"

630 PRINT:PRINT

640 GOTO 690

641 REM: loss multiplying index ?? correcting the cumulation impact !

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 12000

660 IF Z$="y" THEN 20 ELSE GOTO 12000

670 PRINT

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.1-ANIMAL HEALTH BENEFIT AND DISEASE LOSSES IN PRODUCTION"

1002 PRINT"=========================================================="

1050 PRINT"This programme calculates the benefit/losses in animal population production:"

1052 PRINT TAB(6)"1) using method I. (based on average numbers of production"

1053 PRINT TAB(11)"units per healthy and diseased animals and average "

1054 PRINT TAB(11)"number of healthy and diseased animals)"

1060 PRINT TAB(6)"2) using method II. (based on average number of production

1061 PRINT TAB(11)"units per animal, per healthy animal and per diseased"

1062 PRINT TAB(11)"animal and average number of all animals)"

1090 INPUT" Enter choice number: ",CH

1095 IF CH=1 OR CH=2 THEN GOTO 1100 ELSE PRINT IDE$: GOTO 1980

1100 PRINT"INPUT DATA:"

1110 INPUT"     disease(s) ";DI$

1111 INPUT"     species, category(ies) ";C$,D$

1112 INPUT"     place, period ";A$,B$

1120 INPUT"     production indicator               ";PR$

1123 INPUT"     production indicator measure units ";PRI$

1124 INPUT"     monetary units                     ";F$

1126 PRINT"(All following questions must be answered and major than 0 !):"

1127 INPUT"     average price of one production measure unit                ";G

1130 IF CH=1 THEN GOTO 1150 ELSE 1170

1150 INPUT"     average number of production units per one healthy animal   ";A

1152 INPUT"     average number of production units per one diseased animal  ";B

1154 INPUT"     average number of healthy animals                           ";C

1156 INPUT"     average number of diseased animals                          ";D:GOTO 1180

1170 INPUT"     average number of production units per one animal           ";A

1172 INPUT"     average number of production units per one diseased animal  ";B

1176 INPUT"     average number of production units per one healthy animal   ";C

1178 INPUT"     average number of animals of a given population             ";D

1180 IF CH=1 AND A<B THEN GOTO 1184 ELSE 1181

1181 IF CH=2 AND C<B THEN GOTO 1184 ELSE 1189

1184 PRINT"Error ! Number of production units per one healthy animal"

1186 PRINT"                          to be major than per one diseased animal !":GOTO 1980

1189 IF G=0 OR A=0 OR B=0 OR C=0 OR D=0 THEN PRINT IDM$:GOTO 1980 ELSE 1190

1190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1192 IF I$="m" THEN GOTO 10

1193 IF I$="c" THEN GOTO 1000

1194 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT:PRINT TAB(6)"ANIMAL  HEALTH  BENEFIT  AND  DISEASE  LOSSES  IN  PRODUCTION":PRINT

1205 PRINT TAB(6)"Disease(s): "DI$

1206 PRINT"Species: "C$;TAB(40)"Category(ies): "D$

1207 PRINT"Place: "A$;TAB(50)"Period: "B$:PRINT

1209 PRINT TAB(6)"Production indicator: "PR$

1210 PRINT"Production units: "PRI$;TAB(50)"Price: "USING"#####.##";G;

1212 PRINT" " F$:PRINT:PRINT

1215 IF CH=1 THEN GOTO 1216 ELSE 1300

1216 IF A>0 AND B>0 AND C>0 THEN GOTO 1220 ELSE 1215

1218 IF A>0 AND B>0 AND D>0 THEN GOTO 1230 ELSE 1980

1220 PRINT:PRINT"     Estimated production benefit of animal disease free status  ="

1225 PRINT,"                     =  "INT((A-B)*C);"  production units":'PR$

1226 IF G>0! THEN GOTO 1227 ELSE 1230

1227 PRINT,,"                  of value  = ";INT((A-B)*C*G);F$

1228 PRINT

1230 PRINT"     Estimated production losses due to animal disease(s)  ="

1235 PRINT,"                     =  "INT((A-B)*D);"  production units":'PR$

1236 IF G>0! THEN GOTO 1237 ELSE 1980

1237 PRINT,,"                  of value  = ";INT((A-B)*D*G);F$:GOTO 1980

1300 IF A>0 AND B>0 AND D>0 THEN GOTO 1320 ELSE 1315

1315 IF C>0 AND A>0 AND D>0 THEN GOTO 1330 ELSE 1320

1320 PRINT:PRINT"     Estimated production benefit of animal disease free status  ="

1325 PRINT,"                     =  "INT((A-B)*D);"  production units":'PR$

1326 IF G>0! THEN GOTO 1327 ELSE 1330

1327 PRINT,,"                  of value  = ";INT((A-B)*D*G);F$

1328 PRINT

1330 PRINT"     Estimated production losses due to animal disease(s)  ="

1335 PRINT,"                     =  "INT((C-A)*D);"  production units":'PR$

1336 IF G>0! THEN GOTO 1337 ELSE 1980

1337 PRINT,,"                  of value  = ";INT((C-A)*D*G);F$

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.2-PUBLIC HEALTH CONSEQUENCES OF DISEASES COMMON TO ANIMALS AND MAN"

2002 PRINT"===================================================================="

2016 PRINT"This subprogramme includes only consequences which can be quantified"

2017 PRINT"in monetary terms. Deaths, suffering, shortening of human life and production"

2018 PRINT"life, invalidity , psychological, etc. consequences cannot be included."

2019 REM:Other negative consequences, such as ecological, biological, sanitary and social

2020 REM:are not included due to the fact that there is almost impossible to quantify

2021 REM:them in monetary terms.

2050 PRINT"INPUT DATA:"

2051 INPUT"     disease(s) ";DIS$

2056 INPUT"     place, period ";L$,P$

2060 INPUT"     monetary units (up to 10 characters !) ";M$

2070 INPUT"  1. value of preventive investigations                       ";A

2072 INPUT"  2. value of diseased persons' investigations                ";B

2074 INPUT"  3. value of specific vaccinations                           ";C

2076 INPUT"  4. value of preventive treatments                           ";D

2080 INPUT"  5. value of curative treatments                             ";E

2081 INPUT"  6. value of sanitation actions                              ";F

2082 INPUT"  7. value of hospitalization (except costs mentioned above)  ";G

2083 INPUT"  8. loss due to working incapacity                           ";I

2084 INPUT"  9. cost of specific control measures                        ";J

2085 INPUT"  10. value of compensations and subsidies                    ";K

2086 INPUT"  11. cost of public health services                          ";L

2087 INPUT"  12. cost of public health extension work                    ";M

2088 INPUT"  13. cost of specific research and training                  ";N

2089 INPUT"  14. loss due to epidemiolog. limitations and prohibitions   ";O

2090 INPUT"  15. other costs related to disease(s) and epi. measures     ";P

2091 Z=A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P

2095 IF Z=0 THEN PRINT IDM$:GOTO 2980 ELSE 2096

2096 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2097 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2098 IF I$="m" THEN GOTO 10

2099 IF I$="c" THEN GOTO 2000

2100 IF I$=CHR$(13) THEN GOTO 2105

2105 CLS:PRINT"  PUBLIC  HEALTH  CONSEQUENCES  OF  DISEASES  COMMON  TO  ANIMALS  AND  MAN"

2110 PRINT TAB(6)"Disease(s): "DIS$

2112 PRINT"Place: "L$;TAB(50)"Period: "P$

2150 PRINT:PRINT TAB(3)"L o s s / C o s t   T y p e";TAB(38)M$;TAB(53)"Proportion";

2151 PRINT TAB(65)"Percentage":PRINT

2155 PRINT TAB(3)"1.Preventive investigations";TAB(37)INT(A);TAB(53)USING"#.####";A/Z;

2156 PRINT TAB(65)USING"###.####";A/Z*100

2160 PRINT TAB(3)"2.Dis.persons' investigations";TAB(37)INT(B);TAB(53)USING"#.####";B/Z;

2161 PRINT TAB(65)USING"###.####";B/Z*100

2165 PRINT TAB(3)"3.Vaccinations";TAB(37)INT(C);TAB(53)USING"#.####";C/Z;

2166 PRINT TAB(65)USING"###.####";C/Z*100

2168 PRINT TAB(3)"4.Preventive treatments";TAB(37)INT(D);TAB(53)USING"#.####";D/Z;

2169 PRINT TAB(65)USING"###.####";D/Z*100

2171 PRINT TAB(3)"5.Curative treatments";TAB(37)INT(E);TAB(53)USING"#.####";E/Z;

2172 PRINT TAB(65)USING"###.####";E/Z*100

2175 PRINT TAB(3)"6.Sanitation";TAB(37)INT(F);TAB(53)USING"#.####";F/Z;

2176 PRINT TAB(65)USING"###.####";F/Z*100

2178 PRINT TAB(3)"7.Hospitalization";TAB(37)INT(G);TAB(53)USING"#.####";G/Z;

2179 PRINT TAB(65)USING"###.####";G/Z*100

2181 PRINT TAB(3)"8.Working incapacity";TAB(37)INT(I);TAB(53)USING"#.####";I/Z;

2182 PRINT TAB(65)USING"###.####";I/Z*100

2183 PRINT TAB(3)"9.Control measures";TAB(37)INT(J);TAB(53)USING"#.####";J/Z;

2184 PRINT TAB(65)USING"###.####";J/Z*100

2185 PRINT TAB(2)"10.Compensation/subsidies";TAB(37)INT(K);TAB(53)USING"#.####";K/Z;

2186 PRINT TAB(65)USING"###.####";K/Z*100

2190 PRINT TAB(2)"11.Public health services";TAB(37)INT(L);TAB(53)USING"#.####";L/Z;

2191 PRINT TAB(65)USING"###.####";L/Z*100

2192 PRINT TAB(2)"12.Public health extension";TAB(37)INT(M);TAB(53)USING"#.####";M/Z;

2193 PRINT TAB(65)USING"###.####";M/Z*100

2194 PRINT TAB(2)"13.Research and training";TAB(37)INT(N);TAB(53)USING"#.####";N/Z;

2195 PRINT TAB(65)USING"###.####";N/Z*100

2196 PRINT TAB(2)"14.Epid.limitation/prohibition";TAB(37)INT(O);TAB(53)USING"#.####";O/Z;

2197 PRINT TAB(65)USING"###.####";O/Z*100

2198 PRINT TAB(2)"15.Others ";TAB(37)INT(P);TAB(53)USING"#.####";P/Z;

2199 PRINT TAB(65)USING"###.####";P/Z*100

2210 PRINT

2215 PRINT TAB(5)"T o t a l";TAB(37)INT(Z);TAB(53)"1.0000";TAB(65)"100.0000"

2250 A$=INKEY$:IF A$="" THEN GOTO 2250

2251 Y=0

2253 DIM Y(15)

2255 LET Y(1)=A/Z*100

2256 LET Y(2)=B/Z*100

2258 LET Y(3)=C/Z*100

2260 LET Y(4)=D/Z*100

2262 LET Y(5)=E/Z*100

2264 LET Y(6)=F/Z*100

2266 LET Y(7)=G/Z*100

2268 LET Y(8)=I/Z*100

2270 LET Y(9)=J/Z*100

2279 LET Y(10)=K/Z*100

2281 LET Y(11)=L/Z*100

2283 LET Y(12)=M/Z*100

2285 LET Y(13)=N/Z*100

2287 LET Y(14)=O/Z*100

2288 LET Y(15)=P/Z*100

2290 MAX=Y(1)

2291 FOR I=2 to 15

2292 IF Y(I)>MAX THEN MAX=Y(I)

2293 NEXT I

2295 CLS:PRINT:PRINT"  PUBLIC  HEALTH  CONSEQUENCES  OF  DISEASES  COMMON  TO  ANIMALS  AND  MAN"

2299 IF MAX>50 THEN GOTO 2400 ELSE 2300

2300 PRINT TAB(10)"(";CHR$(223);" represents 1 % of total   "INT(Z)   M$;")":PRINT

2304 PRINT TAB(2)"Loss No.";TAB(15)"0         10        20        30        40        50 %"

2306 PRINT TAB(15)CHR$(179)"---------|---------|---------|---------|---------I"

2310 FOR I=1 TO 15

2311 Z=Y(I)

2312 IF Z<1 THEN GOTO 2313 ELSE 2322

2313 IF Z>0 THEN GOTO 2314 ELSE 2322

2314 PRINT TAB(2)I;TAB(15)CHR$(179);CHR$(249):GOTO 2335

2322 PRINT TAB(2)I;TAB(15)CHR$(179);

2325 FOR K=1 TO Y(I)

2330 PRINT CHR$(223);

2333 NEXT K

2334 PRINT

2335 NEXT I:GOTO 2940

2400 PRINT TAB(10)"(";CHR$(223);" represents 2 % of total   "INT(Z)   M$;")":PRINT

2404 PRINT TAB(4)"Loss No.";TAB(15)"0         20        40        60        80        100 %"

2406 PRINT TAB(15)CHR$(179)"---------|---------|---------|---------|---------I"

2410 FOR I=1 TO 15

2411 Z=Y(I)/2

2412 IF Z<1 THEN GOTO 2413 ELSE 2422

2413 IF Z>0 THEN GOTO 2414 ELSE 2422

2414 PRINT TAB(5)I;TAB(15)CHR$(179);CHR$(249):GOTO 2435

2422 PRINT TAB(5)I;TAB(15)CHR$(179);

2425 FOR K=1 TO Y(I)/2

2430 PRINT CHR$(223);

2433 NEXT K

2434 PRINT

2435 NEXT I

2940 ERASE Y:Y=0

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 GOTO 645

2982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2983 IF R$="y" OR R$="n" THEN GOTO 2984 ELSE 2990

2984 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.3-LOSSES DUE TO SPECIFIC DISEASE ACCORDING TO AVERAGE PARAMETERS"

3005 PRINT"=================================================================="

3040 PRINT"(Included quantifiable losses only)"

3050 PRINT"INPUT DATA:"

3060 INPUT"     disease(s) ";DIS$

3061 INPUT"     species, category(ies) ";C$,D$

3062 INPUT"     place, period ";A$,B$

3069 INPUT"     lost product, product measure units ";PR$,PMU$

3072 INPUT"     monetary units ";F$

3080 PRINT"     Do you have absolute (a) or relative (r) data"

3081 INPUT"                                   on diseased animals occurrence ";U$:PRINT

3091 IF U$="a" OR U$="r" THEN GOTO 3092 ELSE PRINT IDE$:GOTO 3980

3092 IF U$="a" THEN GOTO 3095 ELSE 3100

3095 INPUT"     number of specifically diseased animals                      ";Z

3096 IF Z=0 THEN PRINT IDM$:GOTO 3980 ELSE 3110

3100 INPUT"     number of animals existing in the given period               ";A

3102 INPUT"     percentage of specifically diseased animals                  ";M

3110 PRINT"     average (estimated, standardized) percentage"

3111 INPUT"                                    of specific fatality          ";L

3112 PRINT"     average (estimated, standardized) loss in products of one"

3115 INPUT"        specifically diseased animal in product measure units     ";P

3120 PRINT"     average (estimated, standardized) loss in weight of one"

3121 INPUT"        specifically diseased animal in kg                        ";I

3122 INPUT"     average price of one animal of the same species/category     ";PA

3123 INPUT"     average price of one unit of the given product               ";PP

3124 INPUT"     average price of one kg of animal weight                     ";PI

3125 IF (A+M+L+P+I+PA+PP+PI)=0 THEN PRINT IDM$:GOTO 3980

3194 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3195 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3196 IF I$="m" THEN GOTO 10

3197 IF I$="c" THEN GOTO 3000

3198 IF I$=CHR$(13) THEN GOTO 3200

3200 CLS:PRINT"     LOSSES DUE TO SPECIFIC DISEASE ACCORDING TO AVERAGE PARAMETERS":PRINT

3205 PRINT TAB(9)"Disease(s): "DIS$

3206 PRINT"Species: "C$;TAB(40)"Category(ies): "D$

3207 PRINT"Place: "A$;TAB(50)"Period: "B$

3210 PRINT"Average prices of: animal, product unit, measure unit = ";PA",";PP",";PI;" "F$

3230 IF Z>0 THEN GOTO 3260 ELSE 3250

3250 LET Z=(M*A)/100

3260 LET Y=(Z*L)/100

3320 IF A>0 AND M>0 THEN 3420 ELSE 3321

3321 IF Z>0 THEN 3420 ELSE 3330

3330 IF Z>0 AND L>0 THEN 3430 ELSE 3340

3340 IF Z>0 AND P>0 THEN 3440 ELSE 3350

3350 IF Z>0 AND I>0 THEN 3450 ELSE 3460

3420 PRINT:PRINT TAB(9)"Number of specifically diseased animals: "INT(Z):GOTO 3330

3430 PRINT:PRINT:PRINT"        Estimated number of deaths = "INT(Y);" animals"

3431 IF PA>0 THEN GOTO 3432 ELSE 3340

3432 PRINT,"                      of value  =   ";INT(Y*PA);F$:GOTO 3340

3440 PRINT:PRINT"        Estimated loss of ";INT((Z-Y)*P);PMU$;" of "PR$

3441 IF PP>0 THEN GOTO 3442 ELSE 3350

3442 PRINT,,"        of value  =   ";INT((Z-Y)*P*PP);F$:GOTO 3350

3450 PRINT:PRINT"        Estimated loss of weight = ";INT((Z-Y)*I);" kg"

3451 IF PI>0 THEN GOTO 3452 ELSE 3455

3452 PRINT,,"        of value  =   ";INT((Z-Y)*I*PI);F$

3455 PRINT

3456 IF PA=<0 AND PP=<0 AND PI=<0 THEN GOTO 3475

3460 PRINT:PRINT TAB(18)"T o t a l  estimated loss    =   ";INT((Y*PA+(Z-Y)*P*PP+(Z-Y)*I*PI));F$

3470 PRINT

3475 Z=0:A=0:M=0:L=O:P=O:I=0:PA=0:PP=0:PI=0

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.4-LOSSES DUE TO DEATH AND CONDEMNATION OF ANIMAL CARCASSES"

4010 PRINT"============================================================"

4011 PRINT"This subprogramme calculates losses:"

4012 PRINT TAB(7)"1) in block"

4013 PRINT TAB(7)"2) according to place"

4014 PRINT TAB(7)"3) according to time"

4015 INPUT"Enter choice number: ",E

4020 IF E=1 OR E=2 OR E=3 THEN GOTO 4040 ELSE PRINT IDE$:GOTO 4980

4030 REM:due to natural death,

4031 REM:sanitarily destroyed and total condemnation after the slaughter

4032 REM:of diseased (generally or specifically) animals during a given period.

4040 PRINT:PRINT"INPUT DATA:"

4041 INPUT"     disease(s) ";DIS$

4042 INPUT"     species, category(ies) ";C$,D$

4043 INPUT"     place, period ";L$,B$

4044 INPUT"     average live weight of animals in kg        ";PE

4045 INPUT"     monetary units (up to 10 characters !)      ";F$

4046 INPUT"     average price of one kg of live weight      ";PR

4047 IF PE=0 OR PR=0 THEN GOTO 4048 ELSE 4049

4048 PRINT:PRINT"Error ! All questions about numbers must be answered !":GOTO 4980

4049 IF E=1 THEN GOTO 4050 ELSE 4060

4050 PRINT:INPUT"     number of naturally dead diseased animals               ";M

4051 INPUT"     number of destroyed diseased and suspect animals        ";S

4052 PRINT"     number of condemned carcasses"

4053 INPUT"                            of slaughtered diseased animals  ";D

4054 IF (M+S+D)=0 THEN PRINT IDM$:GOTO 4980 ELSE 4088

4060 IF E=2 THEN GOTO 4061 ELSE 4062

4061 INPUT"     number (up to 11 !) of subterritories       ";N:GOTO 4063

4062 INPUT"     number (up to 11 !) of subperiods           ";N:GOTO 4063

4063 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 4980

4070 CLS:PRINT:PRINT"  List subterritory or subperiod names (up to 15 characters), numbers of dead,"

4071 PRINT"           sanitary destroyed, condemned diseased animals' carcasses:"

4072 PRINT

4073 FOR I=1 TO N

4074 PRINT I;

4075 IF E=2 THEN GOTO 4076 ELSE 4077

4076 INPUT"subter., dead, destroyed, condemned ";PL$(I),M(I),S(I),D(I):GOTO 4079

4077 INPUT"subperiod, dead, destroyed, condemned ";PL$(I),M(I),S(I),D(I)

4079 IF PL$(I)="" OR (M(I)+S(I)+D(I))=0 THEN PRINT IDM$:GOTO 4980 ELSE 4080

4080 NEXT I

4081 MAX=M(1)+S(1)+D(1):FOR I=2 TO N:W(I)=M(I)+S(I)+D(I)

4082 IF W(I)>MAX THEN MAX=W(I):NEXT I

4088 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4089 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4090 IF I$="m" THEN GOTO 10

4091 IF I$="c" THEN GOTO 4000

4092 IF I$=CHR$(13) THEN GOTO 4100

4100 CLS:PRINT"     LOSSES  DUE  TO  DEATH  AND  CONDEMNATION  OF  ANIMAL  CARCASSES":PRINT

4110 PRINT TAB(6)"Disease(s): "DIS$

4111 PRINT"Species: "C$;TAB(40)"Category(ies): "D$

4117 PRINT"Average weight in kg: ";USING"####.##";PE;

4118 PRINT TAB(40)"Price per kg: ";USING"####.##";PR;

4119 PRINT " "F$

4120 PRINT"Place: "L$;TAB(50)"Period: "B$

4130 IF E=2 OR E=3 THEN GOTO 4200 ELSE 4300

4200 PRINT:M=0:S=0:D=0

4205 FOR I=1 TO N

4206 M=M+M(I)

4208 NEXT I

4210 FOR I=1 TO N

4212 S=S+S(I)

4214 NEXT I

4220 FOR I=1 TO N

4222 D=D+D(I)

4224 NEXT I

4230 IF E=2 THEN GOTO 4231 ELSE 4240

4231 PRINT TAB(3)"Subterritory";TAB(21)"Dead";TAB(30)"Dest-";TAB(37)"Con-";

4234 PRINT TAB(45)"Total";TAB(56)"Weight";TAB(68)"Value in"

4235 PRINT TAB(21)"Animals";TAB(30)"royed";TAB(37)"demned";TAB(45)"Number";

4236 PRINT TAB(56)"in kg";TAB(68)F$

4240 IF E=3 THEN GOTO 4241 ELSE 4245

4241 PRINT"S u b p e r i o d";TAB(21)"Dead";TAB(30)"Dest-";TAB(37)"Con-";

4242 PRINT TAB(45)"Total";TAB(56)"Weight";TAB(68)"Value in"

4243 PRINT TAB(21)"Animals";TAB(30)"royed";TAB(37)"demned";TAB(45)"Number";

4244 PRINT TAB(56)"in kg";TAB(68)F$

4245 PRINT

4246 FOR I=1 TO N

4247 PRINT TAB(3)USING"\             \";PL$(I);

4248 PRINT TAB(20)INT(M(I));TAB(29)INT(S(I));TAB(36)INT(D(I));TAB(44)INT((M(I)+S(I)+D(I)));

4249 PRINT TAB(55)INT((M(I)+S(I)+D(I))*PE);TAB(67)INT((M(I)+S(I)+D(I))*PE*PR)

4250 NEXT I

4251 PRINT

4255 PRINT TAB(3)"T o t a l";TAB(20)INT(M);TAB(29)INT(S);TAB(36)INT(D);TAB(44)INT(M+S+D);

4256 PRINT TAB(55)INT((M+S+D)*PE);TAB(67)INT((M+S+D)*PE*PR)

4260 A$=INKEY$:IF A$="" THEN GOTO 4260

4261 CLS:PRINT"     LOSSES  DUE  TO  DEATH  AND  CONDEMNATION  OF  ANIMAL CARCASSES":PRINT

     PRINT:IF E=2 THEN PRINT TAB(8)"Subterritory";

4262 IF E=3 THEN PRINT TAB(8)"S u b p e r i o d ";

4263 PRINT TAB(30)"L o s t    v a l u e s    in":PRINT TAB(30)"----------------------------"

4264 PRINT TAB(30)"Proportion";TAB(48)"Percentage"

4265 PRINT:PRINT

4266 FOR I=1 TO N

4267 PRINT TAB(8)USING"\             \";PL$(I);

4268 PRINT TAB(31)USING"#.####";((M(I)+S(I)+D(I))*PE*PR)/((M+S+D)*PE*PR);

4269 PRINT TAB(49)USING"###.####";((M(I)+S(I)+D(I))*PE*PR)/((M+S+D)*PE*PR)*100

4270 NEXT I

4271 PRINT:PRINT TAB(8)"T o t a l";TAB(31)"1.0000";TAB(49)"100.0000":PRINT

4290 GOTO 4400

4300 K=M+S+D:Q=INT(K*PE):L=INT(K*PE*PR)

4310 PRINT

4311 PRINT:PRINT TAB(5)"Loss Type";TAB(23)"Number of";TAB(36)"Weight";

4312 PRINT TAB(49)"Value in";TAB(61)"Proportion"

4314 PRINT TAB(23)"animals";TAB(36)"in kg";TAB(49)F$

4317 PRINT:PRINT

4320 PRINT TAB(5)"Naturally dead";TAB(22)INT(M);TAB(35)INT(M*PE);

4321 PRINT TAB(48)INT(M*PE*PR);TAB(62)USING"#.####";M/K

4322 PRINT

4325 PRINT TAB(5)"Destroyed";TAB(22)INT(S);TAB(35)INT(S*PE);

4326 PRINT TAB(48)INT(S*PE*PR);TAB(62)USING"#.####";S/K

4328 PRINT

4330 PRINT TAB(5)"Condemned";TAB(22)INT(D);TAB(35)INT(D*PE);

4331 PRINT TAB(48)INT(D*PE*PR);TAB(62)USING"#.####";D/K

4333 PRINT:PRINT

4340 PRINT TAB(5)"T o t a l ";TAB(22)INT(K);TAB(35)INT(Q);TAB(48)INT(L);TAB(62)"1.0000"

4341 REM:GOTO 4980

4400 A$=INKEY$:IF A$="" THEN GOTO 4400

4401 IF E=1 THEN GOTO 4981

4402 IF N=1 THEN GOTO 4981

4403 MAX=M(1)+S(1)+D(1):FOR I=2 TO N:W(I)=M(I)+S(I)+D(I)

4404 IF W(I)>MAX THEN MAX=W(I):NEXT I

4405 CLS:PRINT"     LOSSES  DUE  TO  DEATH  AND  CONDEMNATION  OF  ANIMAL CARCASSES":PRINT

4406 IF E=1 THEN GOTO 4412

4410 IF MAX>((M+S+D)/2) THEN GOTO 4412 ELSE 4430

4412 PRINT TAB(10)"(";CHR$(223);" represents 2 % of total  "(INT((M+S+D)*PE*PR)) F$;")":PRINT:PRINT

4413 IF E=1 THEN PRINT"  Loss Type";TAB(25)"0         20        40        60        80       100 %"

4414 IF E=2 THEN PRINT"  Subterritory";TAB(25)"0         20        40        60        80       100 %"

4415 IF E=3 THEN PRINT"  S u b p e r i o d";TAB(25)"0         20        40        60        80       100 %"

4416 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

4417 IF E=1 THEN GOTO 4418 ELSE 4430

4418 PRINT TAB(25)CHR$(179):PRINT"  Naturally dead";TAB(25)CHR$(179);

4419 FOR I=1 TO M*PE*PR/(INT((M+S+D)*PE*PR))*50

4420 PRINT CHR$(223);

4421 NEXT I:PRINT TAB(25)CHR$(179)

4422 PRINT"  Destroyed";TAB(25)CHR$(179);

4423 FOR I=1 TO S*PE*PR/(INT((M+S+D)*PE*PR))*50

4424 PRINT CHR$(223);

4425 NEXT I:PRINT TAB(25)CHR$(179)

4426 PRINT"  Condemned";TAB(25)CHR$(179);

4427 FOR I=1 TO D*PE*PR/(INT((M+S+D)*PE*PR))*50

4428 PRINT CHR$(223);

4429 NEXT I:PRINT:GOTO 4980

4430 IF MAX>((M+S+D)/2) THEN GOTO 4431 ELSE 4440

4431 FOR I=1 TO N:Z=((M(I)+S(I)+D(I))*PE*PR)/(INT((M+S+D)*PE*PR))*50

4432 IF Z<1 THEN GOTO 4433 ELSE 4435

4433 IF Z>0 THEN GOTO 4434 ELSE 4435

4434 PRINT TAB(2)USING"\             \";PL$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 4439

4435 PRINT TAB(2)USING"\             \";PL$(I);

     PRINT TAB(25)CHR$(179);

4436 FOR K=1 TO ((M(I)+S(I)+D(I))*PE*PR)/(INT((M+S+D)*PE*PR))*50

4437 PRINT CHR$(223);

4438 NEXT K

4439 NEXT I:GOTO 4980

4440 PRINT TAB(10)"(";CHR$(223);" represents 1 % of total  "(INT((M+S+D)*PE*PR))  F$;")":PRINT:PRINT

4442 IF E= 2 THEN PRINT"  Subterritory";TAB(25)"0         10        20        30        40        50 %"

4443 IF E= 3 THEN PRINT"  S u b p e r i o d";TAB(25)"0         10        20        30        40        50 %"

4448 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

4449 FOR I=1 TO N

4450 Z=((M(I)+S(I)+D(I))*PE*PR)/(INT((M+S+D)*PE*PR))*100

4451 IF Z<1 THEN GOTO 4452 ELSE 4454

4452 IF Z>0 THEN GOTO 4453 ELSE 4454

4453 PRINT TAB(2)USING"\             \";PL$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 4461

4454 PRINT TAB(2)USING"\             \";PL$(I);

4455 PRINT TAB(25)CHR$(179);

4456 FOR K=1 TO ((M(I)+S(I)+D(I))*PE*PR)/(INT((M+S+D)*PE*PR))*100

4458 PRINT CHR$(223);

4460 NEXT K

4461 NEXT I

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.5-LOSSES DUE TO DISEASED ANIMALS' UTILITY REDUCTION"

5002 PRINT"====================================================="

5004 PRINT"(in terms of selected quantitative or qualitative indicators)"

5020 PRINT"Indicators' examples:"

5026 PRINT"  - period for reaching production/reproduction maturity; body weight gain or"

5027 PRINT"    loss, offtake (sales, slaughter, culling), yields (meat, milk, eggs, wool,"

5028 PRINT"    honey etc.);"

5029 PRINT"  - production per animal, per monetary unit, per feed unit, per manpower "

5030 PRINT"    unit, per space unit (m2,ha,km2,etc.), per time unit, per other input unit;"

5031 PRINT"  - analogical inputs per one production unit;"

5032 PRINT"  - culled animals, weight at a given age, stage of fattening, age/duration"

5033 PRINT"    of breeding/fattening to achieve a given body weight;"

5034 PRINT"  - qualitatively classified products (biological or sanitary quality), etc.;"

5035 PRINT"  - ability to work, to provide other required performance;"

5036 PRINT"  - herd composition related to animal utility, etc."

5037 REM:consider the total to be icluded into the tables.

5050 PRINT:PRINT TAB(6)"This subprogramme calculates:"

5052 PRINT TAB(10)"1) One indicator in one place (population)"

5054 PRINT TAB(10)"2) One indicator in more than one place (population)"

5056 PRINT TAB(10)"3) More indicators in one place (population)"

5057 PRINT TAB(10)"4) One indicator in more than one subperiod":PRINT

5060 INPUT"     Enter choice number: ",CH

5070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 5100 ELSE PRINT IDE$:GOTO 5980

5100 CLS:PRINT"INPUT DATA:"

5110 INPUT"     disease(s) ";DIS$

5111 INPUT"     species, category(ies) ";C$,D$

5112 INPUT"     place, period ";A$,B$

5117 INPUT"     monetary units (up to 10 characters !) ";M$

5118 IF CH=1 OR CH=2 OR CH=4 THEN GOTO 5121 ELSE 5170

5121 INPUT"     selected animal utility indicator";I$

5125 INPUT"     selected indicator measure units                  ";U$

5128 INPUT"     price of one unit of selected indicator           ";P

5129 IF CH=2 OR CH=4 THEN GOTO 5149 ELSE 5130

5130 INPUT"     number of diseased animals                        ";N

5131 IF N=0 THEN PRINT IDM$:GOTO 5980 ELSE 5133

5133 PRINT"     average value of selected indicator"

5134 PRINT"                          in measure units"

5135 INPUT"                                  in healthy animals   ";S

5136 INPUT"                                  in diseased animals  ";E

5140 GOTO 5200

5149 INPUT"     number (2 up to 11 !) of data to be processed     ";NN

5150 IF NN=<1 OR NN>11 THEN PRINT IDE$:GOTO 5980

5153 PRINT"  List data in following sequence:

5154 IF CH=2 THEN PRINT"  subterritory (up to 12 characters !), number of diseased animals,":GOTO 5156

5155 IF CH=4 THEN PRINT"  subperiod name (up to 12 characters !), number of diseased animals,"

5156 PRINT"               average value of selected indicator (in measure units)"

5157 PRINT"                                 in healthy animals, in diseased animals:"

5158 FOR I=1 TO NN

5159 PRINT TAB(6)I;" ";

5165 INPUT PL$(I),NDA(I),H(I),D(I)

5166 IF PL$(I)="" THEN PRINT IDM$:GOTO 5980 ELSE 5167

5167 NEXT I

5169 GOTO 5200

5170 INPUT"     number of diseased animals ";NDA

5171 IF NDA=0 THEN PRINT IDM$:GOTO 5980 ELSE 5180

5180 INPUT"     number (2 up to 11 !) of indicators to be processed ";NN

5181 IF NN=<1 OR NN>11 THEN PRINT IDE$:GOTO 5980

5185 PRINT"List data in following sequence:

5186 PRINT"selected indicator (up to 12 characters !), measure units (up to 6 char. !),"

5187 PRINT"         price, average value of selected indicator in measure units"

5188 PRINT"                                 in healthy animals, in diseased animals:":PRINT

5189 FOR I=1 TO NN

5190 PRINT TAB(6)I;" ";

5192 INPUT I$(I),MU$(I),P(I),H(I),D(I)

5193 IF I$(I)="" THEN PRINT:PRINT IDM$:GOTO 5980 ELSE 5195

5195 NEXT I

5196 GOTO 5200

5200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",IN$

5202 IF IN$="m" THEN GOTO 10

5203 IF IN$="c" THEN GOTO 5000

5204 IF IN$=CHR$(13) THEN GOTO 5205

5205 CLS:PRINT"     LOSSES  DUE  TO  DISEASED  ANIMALS'  U T I L I T Y   R E D U C T I O N"

5210 'IF N<>11 THEN PRINT

5214 PRINT TAB(6)"Disease(s): "DIS$

5215 PRINT"Species: ";C$;TAB(40)"Category(ies): ";D$

5216 PRINT"Place: ";A$;TAB(50)"Period: ";B$

5218 IF CH=1 THEN GOTO 5220 ELSE 5219

5219 IF CH=2 OR CH=4 THEN GOTO 5300 ELSE 5400

5220 IF E>S THEN Z=-1 ELSE Z=+1

5221 LET D=Z*(S-E)

5230 LET T=D*N

5231 PRINT TAB(6)"Number of diseased animals: "N

5232 PRINT TAB(6)"Indicator: "I$

5234 PRINT"Measure units: ";U$;TAB(40)"Price per unit: "USING"####.##";P:PRINT

5235 PRINT:PRINT

5240 PRINT"     Difference of average values of ";I$:PRINT

5245 PRINT TAB(10)"between healthy and diseased animals  = "USING"#####.##";D;

5246 PRINT " "U$:PRINT

5250 PRINT:PRINT TAB(13)"T o t a l   estimated loss  = ";INT(T+.5) U$

5260 IF P>0 THEN GOTO 5261 ELSE 5980

5261 PRINT:PRINT,,"           of value   = ";INT((T*P)+.5) M$:GOTO 5980

5300 PRINT TAB(6)"Loss indicator: "I$

5301 PRINT"Indicator measure units: "U$;

5302 PRINT TAB(40)"Price per unit: "USING"####.##";P:PRINT

5303 IF CH=4 THEN GOTO 5306 ELSE 5304

5304 PRINT TAB(3)"Subterritory";TAB(20)"Diseased";TAB(32)"Average ";TAB(41)"Average ";

5305 PRINT TAB(53)"Total";TAB(65)"Value of":GOTO 5308

5306 PRINT TAB(3)"Subperiod";TAB(20)"Diseased";TAB(32)"Average ";TAB(41)"Average ";

5307 PRINT TAB(53)"Total";TAB(65)"Value of"

5308 PRINT TAB(20)"Animals";TAB(32)"Value in";TAB(41)"Value in";

5309 PRINT TAB(53)"Diffe-";TAB(65)"Loss in"

5310 PRINT TAB(20)"Number";TAB(32)"Healthy";TAB(41)"Diseased";TAB(53)"rence";TAB(65)M$

5311 PRINT

5320 FOR I=1 TO NN

5321 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

5322 PRINT TAB(3)PL$(I);TAB(19)INT(NDA(I));TAB(32)USING"#####.##";H(I);

5323 PRINT TAB(41)USING"#####.##";D(I);

5324 PRINT TAB(52)INT((NDA(I)*Z*(H(I)-D(I)))+.5);TAB(64)INT(((NDA(I)*Z*(H(I)-D(I))*P))+.5)

5325 NEXT I

5340 Y=0

5350 FOR I=1 TO NN

5352 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

5353 Y=Y+INT(((NDA(I)*Z*(H(I)-D(I))*P))+.5)

5355 NEXT I:PRINT

5360 PRINT TAB(5)"T o t a l  value of estimated loss = "INT(Y)  M$

5390 GOTO 5980

5400 PRINT"Number of diseased Animals: ";NDA:PRINT

5402 PRINT"Indicator";TAB(15)"Units";TAB(24)"Price";TAB(33)"I  n  d  i  c  a  t  o  r";

5403 PRINT TAB(59)"Total";TAB(69)"Value of"

5405 PRINT TAB(24)"per";TAB(35)"Average in";TAB(47)"Average in";

5406 PRINT TAB(59)"Diffe-";TAB(69)"Loss in"

5407 PRINT TAB(24)"Unit";TAB(35)"Healthy";TAB(47)"Diseased";TAB(59)"rence";TAB(69)M$

5410 PRINT

5420 FOR I=1 TO NN

5421 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

5422 LET DIF(I)=(H(I)-D(I))

5423 PRINT USING"\          \";I$(I);

5424 PRINT TAB(15)USING"\    \";MU$(I);

5425 PRINT TAB(24)USING"####.##";P(I);

5426 PRINT TAB(37)USING"####.##";H(I);

5427 PRINT TAB(49)USING"####.##";D(I);

5428 PRINT TAB(58)INT(Z*(NDA*DIF(I))+.5);TAB(68)INT((Z*(NDA*DIF(I)))*P(I)+.5)

5429 NEXT I

5430 PRINT

5440 W=0

5450 FOR I=1 TO NN

5451 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

5453 W=W+(((NDA*Z*(H(I)-D(I))*P(I))))

5455 NEXT I

5460 PRINT TAB(5)"T o t a l  value of estimated loss = "INT(W+.5)  M$

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.6-LOSSES DUE TO DISEASED ANIMALS' REPRODUCTION DETERIORATION"

6001 PRINT"==============================================================="

6002 PRINT"(in terms of selected quantitative or qualitative indicators)"

6023 PRINT"Indicators' examples:"

6025 PRINT"  number of new born animals,  new born or weaned per mother,"

6026 PRINT"                                      per a given period, per a given space;"

6027 PRINT"  number of offsprings per parturition;"

6028 PRINT"  fertility rate, pregnancy rate, birth rate, parturition rate, weaning rate;"

6029 PRINT"  non-pregnancy rate, service period, parturition interval;"

6030 PRINT"  replacement rate, age at sexual maturity, etc.":PRINT

6050 PRINT TAB(6)"This subprogramme calculates:":PRINT

6052 PRINT TAB(10)"1) One indicator in one place (population)"

6054 PRINT TAB(10)"2) One indicator in more than one place (population)"

6056 PRINT TAB(10)"3) More indicators in one place (population)"

6057 PRINT TAB(10)"4) One indicator in more than one subperiod":PRINT

6060 INPUT"     Enter choice number: ",CH

6070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 6100 ELSE PRINT IDE$:GOTO 6980

6100 CLS:PRINT"INPUT DATA:"

6110 INPUT"     disease(s) ";DIS$

6111 INPUT"     species, category(ies) ";C$,D$

6112 INPUT"     place, period ";A$,B$

6117 INPUT"     monetary units (up to 10 characters !) ";M$

6118 IF CH=1 OR CH=2 OR CH=4 THEN GOTO 6120 ELSE 6170

6120 INPUT"     selected indicator of animal reproduction    ";I$

6125 INPUT"     selected indicator measure units             ";U$

6126 INPUT"     price of one unit of selected indicator      ";P

6127 IF P=0 THEN PRINT IDM$:GOTO 6980

6129 IF CH=2 OR CH=4 THEN GOTO 6149 ELSE 6130

6130 INPUT"     number of diseased animals                   ";N

6131 IF N=0 THEN PRINT IDM$:GOTO 6980 ELSE 6133

6133 PRINT"     average value of selected indicator in"

6134 INPUT"                measure units in healthy animals  ";S

6135 INPUT"                             in diseased animals  ";E

6140 GOTO 6200

6149 INPUT"   number (up to 11 !) of data to be processed    ";NN

6150 IF NN=0 OR NN>11 THEN PRINT IDE$:GOTO 6980

6153 PRINT"  List data in following sequence:

6154 IF CH=2 THEN PRINT"  place name (up to 12 characters), number of diseased animals,":GOTO 6156

6155 IF CH=4 THEN PRINT"  subperiod name (up to 12 characters), number of diseased animals,"

6156 PRINT"               average value of selected indicator (in measure units)"

6157 PRINT"                               in healthy animals, in diseased animals:"

6158 FOR I=1 TO NN

6159 PRINT TAB(5)I;" ";

6165 INPUT PL$(I),NDA(I),H(I),D(I)

6166 IF PL$(I)="" THEN PRINT IDM$:GOTO 6980 ELSE 6167

6167 NEXT I

6168 GOTO 6200

6170 INPUT"     number of diseased animals ";NDA

6171 IF NDA=0 THEN PRINT IDM$:GOTO 6980 ELSE 6181

6181 INPUT"     number (up to 11 !) of reproduction indicators to be processed ";NN

6182 IF NN=0 OR NN>11 THEN PRINT IDE$:GOTO 6980

6185 PRINT"List data in following sequence:

6186 PRINT"  selected indicator (up to 12 characters), measure units (up to 6 char.),"

6187 PRINT"     price, average value of selected indicator (in measure units)"

6188 PRINT"                                in healthy animals, in diseased animals:":PRINT

6189 FOR I=1 TO NN

6190 PRINT TAB(5)I;" ";

6191 INPUT I$(I),MU$(I),P(I),H(I),D(I)

6192 IF I$(I)="" THEN PRINT IDM$:GOTO 6980 ELSE 6195

6195 NEXT I

6196 GOTO 6200

6200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",IN$

6202 IF IN$="m" THEN GOTO 10

6203 IF IN$="c" THEN GOTO 6000

6204 IF IN$=CHR$(13) THEN GOTO 6205

6205 CLS:PRINT TAB(6)"LOSSES  DUE  TO  DISEASED  ANIMALS'  REPRODUCTION  DETERIORATION"

6210 'IF N=<9 THEN GOTO 6211 ELSE 6212

6211 'PRINT

6212 PRINT TAB(6)"Disease(s): "DIS$

6213 PRINT"Species: ";C$;TAB(40)"Category(ies): ";D$

6215 PRINT"Place: ";A$;TAB(50)"Period: ";B$

6218 IF CH=1 THEN GOTO 6220 ELSE 6219

6219 IF CH=2 OR CH=4 THEN GOTO 6300 ELSE 6400

6220 IF E>S THEN Z=-1 ELSE Z=1

6221 LET D=Z*(S-E)

6230 LET T=D*N

6231 PRINT TAB(6)"Loss indicator: "I$

6232 PRINT"Price per one selected indicator measure unit: "USING"####.##";P;

6233 PRINT" "M$

6234 PRINT TAB(6)"Number of diseased animals: "N

6235 PRINT

6240 PRINT:PRINT"       Difference of average values of ";I$:PRINT

6245 PRINT,"    between healthy and diseased animals   = "USING"####.##";D;

6246 PRINT" " U$:PRINT

6250 PRINT TAB(17)"T o t a l  estimated  loss  = ";INT(T+.5) U$:PRINT

6260 IF P>0 THEN GOTO 6261 ELSE 6980

6261 PRINT,,"            of value = ";INT((T*P)+.5) M$:PRINT:GOTO 6980

6300 PRINT"Loss indicator: "I$;TAB(50)"Measure units: "U$;

6301 PRINT"Price per one selected indicator measure unit: "USING"####.##";P:PRINT

6302 IF CH=4 THEN GOTO 6306 ELSE 6303

6303 'PRINT TAB(31)"I n d i c a t o r"

6304 PRINT TAB(3)"Place";TAB(20)"Diseased";TAB(31)"I n d i c a t o r";

6305 PRINT TAB(52)"Total";TAB(63)"Value of":GOTO 6308

6306 PRINT TAB(3)"Subperiod";TAB(20)"Diseased";TAB(31)"I n d i c a t o r";

6307 PRINT TAB(52)"Total";TAB(63)"Value of"

6308 PRINT TAB(20)"Animals";TAB(34)"Average  in";

6309 PRINT TAB(52)"Diffe-";TAB(63)"Loss in"

6310 PRINT TAB(20)"Number";TAB(31)"Healthy";TAB(41)"Diseased";TAB(52)"rence";TAB(63)M$

6311 PRINT

6320 FOR I=1 TO NN

6321 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

6322 PRINT USING"\          \";PL$(I);

     PRINT TAB(19)INT(NDA(I));TAB(30)USING"#####.##";H(I);

6323 PRINT TAB(40)USING"#####.##";D(I);

6324 PRINT TAB(51)INT((NDA(I)*Z*(H(I)-D(I)))+.5);TAB(62)INT(((NDA(I)*Z*(H(I)-D(I))*P))+.5)

6325 NEXT I:PRINT

6340 Y=0

6350 FOR I=1 TO NN

6352 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

6353 Y=Y+INT(((NDA(I)*Z*(H(I)-D(I))*P)))

6355 NEXT I

6360 PRINT TAB(15)"T o t a l  value of estimated loss = "INT(Y+.5)  M$

6390 GOTO 6980

6400 PRINT TAB(6)"Number of Diseased Animals: ";NDA:PRINT

6402 PRINT"Indicator";TAB(15)"Units";TAB(24)"Price";TAB(33)"I  n  d  i  c  a  t  o  r";

6403 PRINT TAB(59)"Total";TAB(69)"Value of"

6405 PRINT TAB(24)"per";TAB(35)"Average in";TAB(47)"Average in";

6406 PRINT TAB(59)"Diffe-";TAB(69)"Loss in"

6407 PRINT TAB(24)"Unit";TAB(35)"Healthy";TAB(47)"Diseased";TAB(59)"rence";TAB(69)M$

6410 PRINT

6420 FOR I=1 TO NN

6421 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

6422 LET DIF(I)=(H(I)-D(I))

6423 PRINT USING"\          \";I$(I);

6424 PRINT TAB(15)USING"\    \";MU$(I);

6425 PRINT TAB(24)USING"####.##";P(I);

6426 PRINT TAB(37)USING"####.##";H(I);

6427 PRINT TAB(49)USING"####.##";D(I);

6428 PRINT TAB(58)INT(Z*(NDA*DIF(I))+.5);TAB(68)INT((Z*(NDA*DIF(I)))*P(I)+.5)

6429 NEXT I:PRINT

6440 W=0

6450 FOR I=1 TO NN

6451 IF H(I)<D(I) THEN Z=-1 ELSE Z=1

6453 W=W+(((NDA*Z*(H(I)-D(I))*P(I))))

6455 NEXT I

6460 PRINT TAB(15)"T o t a l  value of estimated loss = "INT(W+.5)  M$

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.7-INPUTS BENEFIT/LOSSES IN HEALTHY/DISEASED ANIMALS"

7005 PRINT"====================================================="

7080 PRINT TAB(2)"This programme calculates inputs' benefit/losses"

7081 PRINT TAB(5)"1) using method I. (based on average number of healthy and diseased"

7082 PRINT TAB(10)"animals and average inputs in healthy and diseased animals)"

7083 PRINT TAB(5)"2) using method II. (based on number of diseased animals"

7084 PRINT TAB(10)"and average inputs in healthy and diseased animals)"

7087 PRINT TAB(5)"3) using method III. (based on average number of all animals and

7088 PRINT TAB(100)"average inputs in all, healthy and diseased animals)"

7090 INPUT" Enter choice number: ",CH

7095 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 7100 ELSE PRINT IDE$:GOTO 7980

7100 PRINT"INPUT DATA:"

7110 INPUT"  disease(s) ";DIS$

7111 INPUT"  species, category(ies) ";C$,D$

7112 INPUT"  place, period ";A$,B$

7115 INPUT"  production input indicator ";I$

7116 INPUT"  input indicator measure units                           ";U$

7117 INPUT"  monetary units                                          ";M$

7118 INPUT"  price of one measure unit of input indicator            ";P

7119 IF P=0 THEN PRINT IDM$:GOTO 7980

7120 IF CH=1 THEN GOTO 7130 ELSE 7200

7130 PRINT"  average production input (in indicator measure units)"

7131 INPUT"                            a) per one healthy animal     ";B

7135 INPUT"                            b) per one diseased animal    ";A

7140 INPUT"  average number of healthy animals in the population     ";C

7150 INPUT"  average number of diseased animals in the population    ";D

7151 IF (B+A)=0 OR (C+D)=0 THEN PRINT:PRINT IDM$:GOTO 7980 ELSE 7152

7152 GOTO 7300

7200 IF CH=2 THEN GOTO 7201 ELSE 7250

7201 INPUT"  total number of diseased animals                        ";N

7210 PRINT"  average production input (in indicator measure units)"

7211 INPUT"                                  per one healthy animal  ";S

7220 INPUT"                                 per one diseased animal  ";E

7222 IF N=0 OR (S+E)=0 THEN PRINT IDM$:GOTO 7980 ELSE 7300

7250 PRINT"  average production input (in indicator measure units):"

7251 INPUT"                  per one animal in the given population  ";F

7252 INPUT"                                 per one diseased animal  ";A

7254 INPUT"                                  per one healthy animal  ";B

7256 INPUT"  average total number of animals of the given population ";G

7257 IF F=0 OR (A+B)=0 OR G=0 THEN PRINT IDM$:GOTO 7980 ELSE 7300

7300 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7301 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",IN$

7302 IF IN$="m" THEN GOTO 10

7303 IF IN$="c" THEN GOTO 7000

7304 IF IN$=CHR$(13) THEN GOTO 7305

7305 CLS:PRINT"     INPUTS'  BENEFIT/LOSSES  IN  HEALTHY/DISEASED  ANIMALS":PRINT

7306 PRINT TAB(6)"Disease(s): "DIS$

7310 PRINT"Species: ";C$;TAB(40)"Category(ies): ";D$

7311 PRINT"Place: ";A$;TAB(50)"Period: ";B$

7313 PRINT TAB(6)"Input indicator: ";I$

7314 PRINT"Measure unit: "U$;

7316 PRINT TAB(40)"Price of unit: "USING"####.##";P

7317 IF CH=2 THEN PRINT TAB(20)"Diseased animals: "N

7318 IF CH=3 THEN PRINT TAB(15)"Average number of animals: "G

7319 PRINT:PRINT

7320 IF CH=1 THEN GOTO 7350 ELSE 7400

7350 PRINT"      Estimated benefit due to minor inputs in" C;" healthy animals =":PRINT

7351 PRINT"       =   "INT((A-B)*C) U$;" of ";I$:PRINT

7352 PRINT,,"      of value  =  ";INT((A-B)*C*P) M$

7353 PRINT

7360 PRINT"      Estimated loss due to major inputs in" D;" diseased animals   =":PRINT

7361 PRINT"       =   "INT((A-B)*D) U$;" of ";I$:PRINT

7362 PRINT,,"      of value  =  ";INT((A-B)*D*P) M$

7365 PRINT:GOTO 7980

7400 IF CH=2 THEN GOTO 7401 ELSE 7450

7401 LET D=E-S

7402 LET T=D*N

7405 PRINT

7410 PRINT TAB(5)"Average difference of ";I$;" values":PRINT

7412 PRINT TAB(12)"between healthy and diseased animals =";

7413 PRINT USING"#######.####  ";D ;

7415 PRINT U$

7416 PRINT:PRINT TAB(48)" = ";

7420 PRINT USING"######.## ";D*P ;

7421 PRINT M$:PRINT

7422 PRINT:PRINT TAB(10)"Estimated total loss =";INT(T) U$:PRINT

7425 IF P>0 THEN GOTO 7430 ELSE 7980

7430 PRINT TAB(39)"of value  =  ";INT(T*P) M$:PRINT:GOTO 7980

7450 PRINT"   Estimated benefit due to minor inputs in production by healthy animals ="

7455 PRINT:PRINT"     =   "INT((A-F)*G) U$;" of ";I$:PRINT

7457 PRINT,,"          of value  = ";INT((A-F)*G*P) M$

7459 PRINT:PRINT

7462 PRINT"   Estimated loss due to major inputs in production by diseased animals ="

7464 PRINT:PRINT"     =   "INT((F-B)*G) U$;" of ";I$:PRINT

7466 PRINT,,"          of value  = ";INT((F-B)*G*P) M$

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.8-SUMMARY TABLES OF LOSSES DUE TO ANIMAL POPULATION DISEASES"

8010 PRINT"=============================================================="

8050 PRINT:PRINT TAB(2)"This subprogramme calculates summary tables on:"

8052 PRINT:PRINT TAB(5)"1) losses according to animal diseases"

8054 PRINT TAB(5)"2) losses according to animal species"

8055 REM:" or categories"

8056 PRINT TAB(5)"3) losses according to place"

8058 PRINT TAB(5)"4) losses according to time"

8059 PRINT TAB(5)"5) losses according to their types":PRINT

8060 INPUT" Enter choice number: ",CH

8070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 THEN GOTO 8100 ELSE PRINT IDE$:GOTO 8980

8100 CLS:PRINT:PRINT"INPUT DATA:"

8110 IF CH<>1 THEN INPUT"     disease(s) ";DI$

8111 IF CH<>2 THEN INPUT"     species, category(ies) ";SP$,CA$

8112 INPUT"     place, period ";PL$,PE$

8114 IF CH=5 THEN GOTO 8118 ELSE 8115

8115 INPUT"     type of losses ";LO$:GOTO 8119

8118 INPUT"     types of losses ";LO$

8119 INPUT"     measure units (up to 10 characters !) ";MU$

8120 INPUT"     How many data to be processed (2 up to 11 !) ";N

8121 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 8980

8124 PRINT TAB(5)" List data (names up to 20 characters), values in measure units:":PRINT

8125 FOR I=1 TO N

8126 PRINT TAB(5)I;" ";

8128 IF CH=1 THEN INPUT" disease, losses value ";D$(I),L(I)

8130 IF CH=2 THEN INPUT" species, losses value ";D$(I),L(I)

8132 IF CH=3 THEN INPUT" place, losses value ";D$(I),L(I)

8133 IF CH=4 THEN INPUT" subperiod, losses value ";D$(I),L(I)

8134 IF CH=5 THEN INPUT" loss type, loss value ";D$(I),L(I)

8135 IF D$(I)="" THEN PRINT IDM$:GOTO 8980 ELSE 8136

8136 NEXT I

8138 T=0

8139 FOR I=1 TO N

8140 T=T+L(I)

8141 NEXT I

8142 IF T=0 THEN PRINT IDM$:GOTO 8980

8144 MAX=L(1):FOR I=2 TO N

8145 IF L(I)>MAX THEN MAX=L(I):NEXT I

8146 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8147 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8148 IF I$="m" THEN GOTO 10

8149 IF I$="c" THEN GOTO 8000

8150 IF I$=CHR$(13) THEN GOTO 8151

8151 CLS:PRINT"L O S S E S   D U E  T O   A N I M A L   P O P U L A T I O N   D I S E A S E S"

8152 IF CH<>1 THEN PRINT TAB(6)"Disease(s): "DI$

8153 IF CH<>2 THEN PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8154 PRINT"Place: "PL$;TAB(50)"Period: "PE$

8155 IF CH=5 THEN GOTO 8157 ELSE 8156

8156 PRINT TAB(6)"Type of losses: "LO$

8157 PRINT

8158 IF CH=1 THEN D$="Disease(s)"

8159 IF CH=2 THEN D$="Species"

8160 IF CH=3 THEN D$="Place"

8161 IF CH=4 THEN D$="Subperiod"

8162 IF CH=5 THEN D$="Loss type"

8165 PRINT TAB(6)D$;TAB(30)"L o s s e s";TAB(45)"Proportion";TAB(58)"Percentage"

8166 PRINT TAB(31)"Value in"

8167 PRINT TAB(31)USING"\        \";MU$:PRINT

8168 FOR I=1 TO N

8169 PRINT TAB(6)USING"\                  \";D$(I);

8170 PRINT TAB(29)USING"#########.##";L(I);

8171 PRINT TAB(47)USING"#.####";L(I)/T;

8172 PRINT TAB(59)USING"###.####";L(I)/T*100

8173 NEXT I:PRINT

8174 PRINT TAB(6)"T o t a l";TAB(29)USING"#########.##";T;

8175 PRINT TAB(47)"1.0000";TAB(59)"100.0000"

8200 A$=INKEY$:IF A$="" THEN GOTO 8200

8201 IF N=1 THEN GOTO 8982

8205 CLS:PRINT:PRINT"L O S S E S   D U E  T O   A N I M A L   P O P U L A T I O N   D I S E A S E S"

8210 IF MAX>(T/2) THEN GOTO 8212 ELSE 8240

8212 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 2 % of total  "INT(T+.5)    MU$;")":PRINT

8216 PRINT:PRINT TAB(3)D$;TAB(25)"0         20        40        60        80       100 %"

8218 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8219 FOR I=1 TO N

8220 Z=L(I)/T*50

8221 IF Z<1 THEN GOTO 8222 ELSE 8224

8222 IF Z>0 THEN GOTO 8223 ELSE 8224

8223 PRINT TAB(3)USING"\                  \";D$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8233

8224 PRINT TAB(3)USING"\                  \";D$(I);

     PRINT TAB(25)CHR$(179);

8226 FOR K=1 TO L(I)/T*50

8228 PRINT CHR$(223);

8230 NEXT K

8233 NEXT I:GOTO 8980

8240 PRINT:PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(T+.5)  MU$;")":PRINT

8246 PRINT:PRINT TAB(3)D$;TAB(25)"0         10        20        30        40        50 %"

8248 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8249 FOR I=1 TO N

8250 Z=L(I)/T*100

8251 IF Z<1 THEN GOTO 8252 ELSE 8254

8252 IF Z>0 THEN GOTO 8253 ELSE 8254

8253 PRINT TAB(3)USING"\                  \";D$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8263

8254 PRINT TAB(3)USING"\                  \";D$(I);

     PRINT TAB(25)CHR$(179);

8256 FOR K=1 TO L(I)/T*100

8258 PRINT CHR$(223);

8260 NEXT K

8263 NEXT I

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8983 IF R$="y" OR R$="n" THEN GOTO 8984 ELSE 8990

8984 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.9-COST OF POPULATION HEALTH MASS ACTIONS"

9010 PRINT"=========================================="

9200 PRINT:PRINT"INPUT DATA:":PRINT

9210 INPUT"     action type(s) ";T$

9211 INPUT"     place, period ";A$,B$

9213 INPUT"     monetary units ";M$:PRINT

9214 INPUT"     material or service ";PS$

9215 INPUT"     measure units of material or service                 ";PU$

9216 PRINT

9220 INPUT"     total number of actions                              ";A

9221 IF A=0 THEN PRINT IDM$:GOTO 9790 ELSE 9222

9222 PRINT

9230 PRINT"     average dose (consumption) of the material"

9235 INPUT"                       for one action in measure units    ";D

9240 INPUT"     price of one measure unit of the material            ";P

9250 PRINT"     average time needed for one action in minutes"

9255 INPUT"                       (including preparatory activity)   ";T

9260 INPUT"     personnel average salary per one hour                ";S

9270 INPUT"     transport average cost for one action                ";R

9280 INPUT"     total other costs for the given actions              ";O

9281 IF (D+P+T+S+R+O)=0 THEN PRINT IDM$:GOTO 9790

9346 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9347 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9348 IF I$="m" THEN GOTO 10

9349 IF I$="c" THEN GOTO 9000

9350 IF I$=CHR$(13) THEN GOTO 9500

9500 CLS:PRINT:PRINT"     C O S T   OF  POPULATION  HEALTH  MASS  A C T I O N S"

9510 PRINT:PRINT TAB(6)"Action type(s): ";T$

9511 PRINT TAB(6)"Material/service: "PS$

9512 PRINT TAB(20)"Number of actions: "A:PRINT

9513 PRINT"Place: ";A$;TAB(50)"Period: ";B$

9514 PRINT:PRINT

9520 PRINT TAB(10)"Total consumption of the used material =  ";INT(A*D);TAB(65)PU$

9530 PRINT TAB(10)"Total cost of used material               =  ";INT(A*D*P);" ";M$:PRINT

9540 PRINT TAB(10)"Total time consumed                    =  ";INT(A*T/60);TAB(65)"hours"

9550 PRINT TAB(10)"Total salaries                            =  ";INT(A*T/60*S);" ";M$:PRINT

9560 PRINT TAB(10)"Total transport cost                      =  ";INT(A*R);" ";M$:PRINT

9565 PRINT TAB(10)"Other costs                               =  ";O;" ";M$

9570 PRINT

9580 PRINT:PRINT TAB(32)"T o t a l  costs    =  ";INT((A*D*P)+(A*T/60*S)+A*R+O);" ";

9591 PRINT M$

9790 A$=INKEY$:IF A$="" THEN GOTO 9790

9800 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9801 IF R$="y" OR R$="n" THEN GOTO 9810 ELSE 9990

9810 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.10-ECONOMIC LOSSES DUE TO ANIMAL POPULATION HEALTH/DISEASE MEASURES' COSTS"

10002 PRINT"============================================================================"

10050 PRINT"INPUT DATA:"

10055 INPUT"     disease(s) ";DIS$

10056 INPUT"     species, category(ies) ";S$,C$

10057 INPUT"     place, period ";L$,P$

10060 INPUT"     monetary units ";M$

10070 INPUT"     1.total value of animals naturally dead due to disease        ";A

10072 INPUT"     2.total value of condemned slaughtered animals                ";B

10074 INPUT"     3.total value of condemned products of animal origin          ";C

10076 INPUT"     4.total value of lost liveweight                              ";D

10080 INPUT"     5.total value of non-born animals                             ";E

10081 INPUT"     6.total value of non-produced animal products                 ";F

10083 INPUT"     7.total value of loss due to minor quality of animal products ";G

10085 INPUT"     8.total value of feeds non-converted in animal products       ";I

10086 INPUT"     9.total value of loss due to trade/export limitations         ";J

10087 INPUT"     10.total value of compensations and subsidies                 ";K

10088 INPUT"     11.cost of vet. services (diagnosis,treatment,control,etc.)   ";L

10089 INPUT"     12.cost of veterinary material (vaccines,drugs,equipment,etc.)";M

10090 INPUT"     13.total cost of non-veterinary manpower and services         ";N

10091 INPUT"     14.total cost of transport related to epi. measures           ";O

10092 INPUT"     15.other total costs related to disease(s) and epi. measures  ";P

10093 Z=A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P

10094 IF Z=0 THEN PRINT IDM$:GOTO 10980 ELSE 10095

10095 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10096 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10097 IF I$="m" THEN GOTO 10

10098 IF I$="c" THEN GOTO 10000

10099 IF I$=CHR$(13) THEN GOTO 10100

10100 CLS:PRINT"ECONOMIC LOSSES DUE TO ANIMAL POPULATION HEALTH/DISEASE MEASURES' COSTS":'PRINT

10110 PRINT TAB(6)"Disease(s): ";DIS$

10111 'PRINT"Species: ";S$;TAB(40)"Category(ies): ";C$

10112 PRINT"Place: ";L$;TAB(50)"Period: ";P$

10150 PRINT:PRINT TAB(3)"L o s s / C o s t   T y p e";TAB(37)M$;TAB(51)"Proportion";

10151 PRINT TAB(65)"Percentage":PRINT

10155 PRINT TAB(3)"1.Naturally dead animals";TAB(37)A;TAB(52)USING"#.####";A/Z;

10156 PRINT TAB(65)USING"###.####";A/Z*100

10160 PRINT TAB(3)"2.Condemnation of carcasses";TAB(37)B;TAB(52)USING"#.####";B/Z;

10161 PRINT TAB(65)USING"###.####";B/Z*100

10165 PRINT TAB(3)"3.Condemnation of products";TAB(37)C;TAB(52)USING"#.####";C/Z;

10166 PRINT TAB(65)USING"###.####";C/Z*100

10168 PRINT TAB(3)"4.Lost of liveweight";TAB(37)D;TAB(52)USING"#.####";D/Z;

10169 PRINT TAB(65)USING"###.####";D/Z*100

10171 PRINT TAB(3)"5.Non-born animals";TAB(37)E;TAB(52)USING"#.####";E/Z;

10172 PRINT TAB(65)USING"###.####";E/Z*100

10175 PRINT TAB(3)"6.Non-produced products";TAB(37)F;TAB(52)USING"#.####";F/Z;

10176 PRINT TAB(65)USING"###.####";F/Z*100

10178 PRINT TAB(3)"7.Reduction of products quality";TAB(37)G;TAB(52)USING"#.####";G/Z;

10179 PRINT TAB(65)USING"###.####";G/Z*100

10181 PRINT TAB(3)"8.Feeds non-converted in products";TAB(37)I;TAB(52)USING"#.####";I/Z;

10182 PRINT TAB(65)USING"###.####";I/Z*100

10183 PRINT TAB(3)"9.Trade/export limitations";TAB(37)J;TAB(52)USING"#.####";J/Z;

10184 PRINT TAB(65)USING"###.####";J/Z*100

10185 PRINT TAB(2)"10.Compensation/subsidies";TAB(37)K;TAB(52)USING"#.####";K/Z;

10186 PRINT TAB(65)USING"###.####";K/Z*100

10190 PRINT TAB(2)"11.Veterinary services";TAB(37)L;TAB(52)USING"#.####";L/Z;

10191 PRINT TAB(65)USING"###.####";L/Z*100

10192 PRINT TAB(2)"12.Veterinary material";TAB(37)M;TAB(52)USING"#.####";M/Z;

10193 PRINT TAB(65)USING"###.####";M/Z*100

10194 PRINT TAB(2)"13.Non-vet. manpower/services";TAB(37)N;TAB(52)USING"#.####";N/Z;

10195 PRINT TAB(65)USING"###.####";N/Z*100

10196 PRINT TAB(2)"14.Transport related measures";TAB(37)O;TAB(52)USING"#.####";O/Z;

10197 PRINT TAB(65)USING"###.####";O/Z*100

10198 PRINT TAB(2)"15.Others ";TAB(37)P;TAB(52)USING"#.####";P/Z;

10199 PRINT TAB(65)USING"###.####";P/Z*100

10215 PRINT:PRINT TAB(5)"T o t a l   L o s s";TAB(37)Z;TAB(52)"1.0000";TAB(65)"100.0000"

10250 A$=INKEY$:IF A$="" THEN GOTO 10250

10252 Y=0

10253 DIM Y(15)

10255 LET Y(1)=A/Z*100

10261 LET Y(2)=B/Z*100

10266 LET Y(3)=C/Z*100

10269 LET Y(4)=D/Z*100

10272 LET Y(5)=E/Z*100

10276 LET Y(6)=F/Z*100

10279 LET Y(7)=G/Z*100

10280 LET Y(8)=I/Z*100

10281 LET Y(9)=J/Z*100

10282 LET Y(10)=K/Z*100

10283 LET Y(11)=L/Z*100

10284 LET Y(12)=M/Z*100

10285 LET Y(13)=N/Z*100

10287 LET Y(14)=O/Z*100

10288 LET Y(15)=P/Z*100

10290 MAX=Y(1)

10291 FOR I=2 TO 15

10292 IF Y(I)>MAX THEN MAX=Y(I)

10293 NEXT I

10295 CLS:PRINT TAB(6)"L O S S E S  DUE TO ANIMAL POPULATION HEALTH/DISEASE  MEASURES COSTS"

10299 IF MAX<50 THEN GOTO 10300 ELSE 10400

10300 PRINT TAB(15)"(";CHR$(223);" represents 1 % of grand total "INT(Z)  M$;")":PRINT

10301 PRINT TAB(6)"Disease(s): ";DIS$

10302 'PRINT"Species: ";S$;TAB(40)"Category(ies): ";C$

10303 PRINT"Place: ";L$;TAB(50)"Period: ";P$

10304 PRINT:PRINT TAB(3)"Loss No.";TAB(18)"0         10        20        30        40        50  %"

10306 PRINT TAB(18)CHR$(179)"---------|---------|---------|---------|---------I"

10307 FOR I=1 TO 15

10308 Z=Y(I)

10309 IF Z<1 THEN GOTO 10310 ELSE 10322

10310 IF Z>0 THEN GOTO 10311 ELSE 10322

10311 PRINT TAB(5)I;TAB(18)CHR$(179);CHR$(249):GOTO 10335

10322 PRINT TAB(5)I;TAB(18)CHR$(179);

10325 FOR K=1 TO Y(I)

10330 PRINT CHR$(223);

10333 NEXT K

10334 PRINT

10335 NEXT I:GOTO 10940

10400 PRINT TAB(15)"(";CHR$(223);" represents 2 % of grand total "INT(Z)  M$;")":PRINT

10404 PRINT:PRINT TAB(3)"Loss No.";TAB(18)"0         20        40        60        80        100  %"

10406 PRINT TAB(18)CHR$(179)"---------|---------|---------|---------|---------I"

10407 FOR I=1 TO 15

10408 Z=Y(I)/2

10409 IF Z<1 THEN GOTO 10410 ELSE 10422

10410 IF Z>0 THEN GOTO 10411 ELSE 10422

10411 PRINT TAB(5)I;TAB(18)CHR$(179);CHR$(249):GOTO 10435

10422 PRINT TAB(5)I;TAB(18)CHR$(179);

10425 FOR K=1 TO Y(I)/2

10430 PRINT CHR$(223);

10433 NEXT K

10434 PRINT

10435 NEXT I

10940 ERASE Y:Y=0:MAX=0

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 GOTO 645

10982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10983 IF R$="y" OR R$="n" THEN GOTO 10984 ELSE 10990

10984 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"6.11-BLANC SUMMARY TABLES OF ANIMAL POPULATION DISEASE CONSEQUENCES"

11010 PRINT"==================================================================="

11040 PRINT TAB(6)"This subprogramme processes data on:"

11045 PRINT TAB(10)"1) total values of individual types of disease consequences"

11046 PRINT TAB(10)"2) disease individual consequences based on loss average values"

11047 INPUT"     Enter choice number: ",CH

11048 IF CH=1 OR CH=2 THEN GOTO 11050 ELSE PRINT IDE$:GOTO 11980

11050 PRINT"INPUT DATA:"

11055 INPUT"     disease(s) ";DIS$

11056 INPUT"     species, category(ies) ";S$,C$

11057 INPUT"     place, period ";L$,P$

11061 INPUT"     measure units (up to 10 characters !) ";M$

11062 INPUT"     How many data/lines (2 up to 11 !) to be processed ";N

11063 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 11980

11067 IF CH=1 THEN GOTO 11070 ELSE 11080

11070 IF N>9 THEN CLS:PRINT

11071 PRINT TAB(5)" List data - loss type (up to 15 characters !), total value:"

11072 FOR I=1 TO N

11073 PRINT TAB(10)I;" ";

11074 INPUT A$(I),A(I)

11075 IF A$(I)="" OR A(I)=0 THEN GOTO 11090 ELSE 11076

11076 NEXT I:GOTO 11093

11080 IF N>9 THEN CLS:PRINT

11081 PRINT TAB(5)" List data - loss type (up to 15 characters),"

11082 PRINT TAB(26)"units name (up to 10 characters),"

11083 PRINT TAB(30)"number of units, average value in measure units:"

11084 FOR I=1 TO N

11085 PRINT TAB(10)I;"";

11086 INPUT A$(I),U$(I),NU(I),AV(I)

11087 IF A$(I)="" OR U$(I)="" OR NU(I)=0 OR AV(I)=0 THEN GOTO 11090 ELSE 11088

11088 NEXT I:GOTO 11093

11090 PRINT IDM$:GOTO 11980

11093 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11094 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11095 IF I$="m" THEN GOTO 10

11096 IF I$="c" THEN GOTO 11000

11097 IF I$=CHR$(13) THEN GOTO 11100

11100 CLS:PRINT" A N I M A L   P O P U L A T I O N   D I S E A S E   C O N S E Q U E N C E S":PRINT

11110 PRINT TAB(6)"Disease(s): ";DIS$

11111 PRINT"Species: ";S$;TAB(40)"Category(ies): ";C$

11112 PRINT"Place: ";L$;TAB(50)"Period: ";P$

11115 'PRINT TAB(6)"Measure units: "M$

11120 REM:LET Z=INT(A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P)

11125 IF CH=1 THEN GOTO 11130 ELSE 11220

11130 Z=0

11131 FOR I=1 TO N

11132 Z=Z+A(I)

11133 NEXT I

11150 PRINT:PRINT TAB(6)"L o s s   T y p e";TAB(37)"Value in";TAB(53)"Proportion";

11151 PRINT TAB(65)"Percentage"

11152 PRINT TAB(37)M$:PRINT

11153 FOR I=1 TO N

11154 PRINT I;TAB(6)USING"\             \";A$(I);

      PRINT TAB(33)USING"#########.##";A(I);

11155 PRINT TAB(54)USING"#.####";A(I)/Z;

11156 PRINT TAB(66)USING"###.####";A(I)/Z*100

11157 NEXT I

11215 PRINT:PRINT TAB(6)"T o t a l";TAB(33)USING"#########.##";Z;

11216 PRINT TAB(54)"1.0000";TAB(66)"100.0000"

11217 GOTO 11250

11220 Z=0

11221 FOR I=1 TO N

11222 Z=Z+(NU(I)*AV(I))

11223 NEXT I

11225 PRINT:PRINT TAB(3)"Loss type";TAB(21)"Units";TAB(34)"Number";TAB(43)"One unit";TAB(55)"Total";

11226 PRINT TAB(67)"Percentage"

11227 PRINT TAB(21)"Name";TAB(34)"of";TAB(43)"Value in";TAB(55)"Loss in"

11228 PRINT TAB(34)"Units";TAB(43)M$;TAB(55)M$

11229 PRINT

11230 FOR I=1 TO N

11231 PRINT TAB(3)USING"\             \";A$(I);

      PRINT TAB(21)U$(I);TAB(33)USING"#####.##";NU(I);TAB(45)USING"###.##";AV(I);

11232 PRINT TAB(54)INT(NU(I)*AV(I)+.5);

11233 PRINT TAB(68)USING"###.####";((NU(I)*AV(I))/Z)*100

11235 NEXT I:PRINT

11238 PRINT TAB(5)"T o t a l";TAB(54)INT(Z+.5);TAB(68)"100.0000"

11250 A$=INKEY$:IF A$="" THEN GOTO 11250

11251 IF N=1 THEN GOTO 11981

11253 REM:DIM Y(15)

11299 CLS:PRINT:PRINT"  A N I M A L   P O P U L A T I O N   D I S E A S E   C O N S E Q U E N C E S":'PRINT

11300 PRINT TAB(13)"(";CHR$(223);" represents 2 % of grand total = "INT(Z)  M$;")":PRINT

11301 PRINT TAB(6)"Disease(s): ";DIS$

11302 PRINT"Place: ";L$;TAB(50)"Period: ";P$

11304 PRINT:PRINT TAB(3)"Loss type";TAB(25)"0         20        40        60        80       100 %"

11306 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11311 IF CH=1 THEN GOTO 11312 ELSE 11350

11312 FOR I=1 TO N

11313 ZA=(A(I)/Z)*50

11314 IF ZA<1 THEN GOTO 11315 ELSE 11322

11315 IF ZA>0 THEN GOTO 11316 ELSE 11322

11316 PRINT TAB(3)A$(I);TAB(25)CHR$(179);CHR$(249):GOTO 11335

11322 PRINT TAB(3)A$(I);TAB(25)CHR$(179);

11325 FOR K=1 TO (A(I)/Z)*50

11330 PRINT CHR$(223);

11333 NEXT K

11334 PRINT

11335 NEXT I:GOTO 11980

11350 FOR I=1 TO N

11351 ZA=(NU(I)*AV(I))/Z*50

11352 IF ZA<1 THEN GOTO 11353 ELSE 11355

11353 IF ZA>0 THEN GOTO 11354 ELSE 11355

11354 PRINT TAB(3)A$(I);TAB(25)CHR$(179);CHR$(249):GOTO 11365

11355 PRINT TAB(3)A$(I);TAB(25)CHR$(179);

11356 FOR K=1 TO (NU(I)*AV(I))/Z*50

11360 PRINT CHR$(223);

11363 NEXT K

11364 PRINT

11365 NEXT I

11366 REM:missing 50 % graph !

11900 REM:ERASE Y

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11982 IF R$="y" OR R$="n" THEN GOTO 11983 ELSE 11990

11983 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

11995 CLS:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

12000 CLS:INPUT"Do you want to return to the main EPIZOO menu, yes(y) or no(n) ";Z$

12002 IF Z$="y" OR Z$="n" THEN GOTO 12010 ELSE 12030

12010 IF Z$="y" THEN GOTO 12020 ELSE 12030

12020 CHAIN"EPIZ40MM.KOU"

12030 SYSTEM

 

 

         7-Investigations of animal population health situation

 

5 ON ERROR GOTO 15996

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4007.KOU":REM:20/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"7-INVESTIGATIONS OF ANIMAL POPULATION HEALTH SITUATION"

40 PRINT TAB(10)"======================================================"

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S"

510 PRINT TAB(10)"1-Evaluation of diagnostic method quality"

520 PRINT TAB(10)"2-Indicators of animal population investigation grade"

530 PRINT TAB(10)"3-Proportions of different types of diagnostic tests"

540 PRINT TAB(10)"4-Infectious disease evidence and notification grades"

550 PRINT TAB(10)"5-Positivity and negativity of test results"

560 PRINT TAB(10)"6-Agreement between test results of two investigators"

570 PRINT TAB(10)"7-Concordance grade of compared tests' results"

580 PRINT TAB(10)"8-Summary table of animal disease investigations"

590 PRINT TAB(10)"9-Summary table of animal disease investigation results"

600 PRINT TAB(10)"10-Population/sample multi-etiological investigations"

602 PRINT TAB(10)"11-Testing parasitic diseases extensity and intensity"

603 PRINT TAB(10)"12-Testing infection intensity grades in animals"

604 PRINT TAB(10)"13-Comparison of two tests acc. specificity/sensitivity"

605 PRINT TAB(10)"14-Relationship of positively and negatively tested animals"

606 PRINT TAB(10)"15-Predictive value according to Bayes' theorem"

609 PRINT

610 PRINT TAB(10)"16-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 16000

660 IF Z$="y" THEN 20 ELSE GOTO 16000

670 PRINT

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 OR CH=14 OR CH=15 OR CH=16 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000,15000,16000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.1-EVALUATION OF DIAGNOSTIC METHOD QUALITY"

1010 PRINT"==========================================="

1012 PRINT"Note: Usually requiring data based on scientific experiments.":PRINT

1020 PRINT"INPUT DATA  (All numbers to be integers and major than 0 !):"

1021 PRINT

1025 INPUT"   diagnostic method and its aim ";MD$

1026 INPUT"   species ";SP$

1027 INPUT"   category(ies) ";CA$

1028 INPUT"   place ";P$

1029 INPUT"   time ";T$:PRINT

1041 PRINT TAB(29)"T r u e       s t a t u s":PRINT

1042 PRINT TAB(29)"affected      non-affected"

1045 PRINT TAB(32)"+ ";TAB(47)"- ";TAB(60)"Totals":PRINT

1050 PRINT TAB(26)"|--------------|--------------|"

1055 PRINT TAB(18)"+ ";TAB(26)"|";TAB(41)"|";TAB(56)"|"

1060 PRINT"  Test Results";TAB(26)"|--------------|--------------|"

1065 PRINT TAB(18)"- ";TAB(26)"|";TAB(41)"|";TAB(56)"|"

1070 PRINT TAB(26)"|--------------|--------------|":PRINT

1071 PRINT TAB(18)"Totals"

1080 LOCATE 18,32:INPUT"",A

1082 LOCATE 18,47:INPUT"",B

1084 LOCATE 20,32:INPUT"",C

1086 LOCATE 20,47:INPUT"",D

1087 LOCATE 18,60:RO=A+B:PRINT RO

1088 LOCATE 23,31:CO=A+C:PRINT CO

1089 LOCATE 20,60:R1=C+D:PRINT R1:LOCATE 23,46

1090 C1=B+D:PRINT C1

1091 LOCATE 23,60:N=A+B+C+D:PRINT N

1092 IF N=0 THEN PRINT IDM$:GOTO 1980 ELSE 1093

1093 A$=INKEY$:IF A$="" THEN GOTO 1093

1195 IF A=0 OR B=0 OR C=0 OR D=0 THEN PRINT IDM$:GOTO 1980

1180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1182 IF I$="m" THEN GOTO 10

1183 IF I$="c" THEN GOTO 1000

1184 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT"     EVALUATION  OF   D I A G N O S T I C     M E T H O D    Q U A L I T Y":PRINT

1214 PRINT TAB(6)"Method: "MD$

1215 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

1216 PRINT"Place: "P$;TAB(50)"Time: "T$:PRINT

1220 PRINT:PRINT"   Diagnostic method sensitivity            =  ";USING"#.#### ";A/(A+C);

1222 PRINT TAB(65)"= "USING"###.####  %";A/(A+C)*100:PRINT

1230 PRINT"   Diagnostic method specificity            =  ";USING"#.#### ";D/(D+B);

1232 PRINT TAB(65)"= "USING"###.####  %";D/(D+B)*100:PRINT

1235 PRINT

1237 REM:PRINT"   Systematic error ((a+b)/(a+c))                    =  ";USING"######.#### ";(A+B)/(A+C)

1238 REM:PRINT TAB(65)"= "USING"###.####  %";((A+B)/(A+C))*100:PRINT

1239 PRINT

1240 PRINT"   Predictive value of true positive results         =  ";USING"#.#### ";A/(A+B);

1242 PRINT TAB(65)"= "USING"###.####  %";A/(A+B)*100

1250 PRINT"   Predictive value of true negative results         =  ";USING"#.#### ";D/(D+C);

1252 PRINT TAB(65)"= "USING"###.####  %";D/(D+C)*100

1254 PRINT"   Predictive value of false positive results        =  ";USING"#.#### ";B/(A+B);

1255 PRINT TAB(65)"= "USING"###.####  %";B/(A+B)*100

1257 PRINT"   Predictive value of false negative results        =  ";USING"#.#### ";C/(C+D);

1258 PRINT TAB(65)"= "USING"###.####  %";C/(C+D)*100:PRINT

1259 PRINT

1260 PRINT"   Diagnostic method true results rate (accuracy)    =  ";USING"#.#### ";(A+D)/(A+B+C+D);

1261 PRINT TAB(65)"= "USING"###.####  %";(A+D)/(A+B+C+D)*100

1262 PRINT"   Diagnostic method false results rate (inaccuracy) =  ";USING"#.#### ";(B+C)/(A+B+C+D);

1963 PRINT TAB(65)"= "USING"###.####  %";(B+C)/(A+B+C+D)*100:PRINT

1265 PRINT"   Diagnostic method efficiency index                =  ";USING"#.#### ";(A/(A+C))*(D/(D+B))

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.2-INDICATORS OF ANIMAL POPULATION INVESTIGATION GRADE"

2010 PRINT"======================================================="

2100 PRINT:PRINT"INPUT DATA:"

2105 INPUT"     investigation objectives ";OB$

2110 INPUT"     diagnostic test ";MD$

2112 PRINT"     v a l u e  of diagnostic method efficiency index "

2113 INPUT"            (in form of a proportion, i.e. number between >0 and 1 !)  ";D

2114 IF D=0 OR D>1 THEN PRINT IDE$:GOTO 2980 ELSE 2115

2115 INPUT"     species ";SP$

2116 INPUT"     category(ies) ";CA$

2117 INPUT"     place ";LU$

2118 INPUT"     time ";TI$

2119 PRINT

2120 INPUT"     total number of animals of the given population      ";A

2121 IF A=0 THEN PRINT IDM$:GOTO 2980 ELSE 2130

2130 INPUT"     total number of tested animals                       ";B

2140 INPUT"     total number of tests (investigations)               ";C:PRINT

2160 INPUT"     number of existing specifically diseased animals     ";E

2170 INPUT"     number of animals in specific disease foci           ";F

2175 PRINT"     number of exposed specifically healthy animals"

2177 INPUT"                                     outside of foci      ";S

2180 INPUT"     number of newly discovered cases (diseased animals)  ";N

2182 IF (B+C+E+F+S+N)=0 THEN PRINT IDM$:GOTO 2980 ELSE 2190

2190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2192 IF I$="m" THEN GOTO 10

2193 IF I$="c" THEN GOTO 2000

2194 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT"    INDICATORS OF ANIMAL POPULATION I N V E S T I G A T I O N   G R A D E"

2205 PRINT

2206 PRINT TAB(6)"Objectives: "OB$

2211 PRINT TAB(6)"Diagnostic test: "MD$

2212 PRINT TAB(6)"Diagnostic method efficiency index: "USING"#.####";D

2213 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

2215 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

2220 IF B>0 AND A>0 THEN PRINT"          Tested animals rate                              = ";USING"####.#### ";B/A

2230 IF B>0 AND A>0 THEN PRINT"          Percentage of tested animals                     = ";USING"####.#### ";(B/A)*100:PRINT

2250 IF B>0 AND E>0 THEN PRINT"          Ratio of tested/diseased animals                 = ";USING"####.#### ";B/E

2255 IF B>0 AND E>0 THEN PRINT"          Ratio of diseased/tested animals                 = ";USING"####.#### ";E/B:PRINT

2260 IF B>0 AND F>0 THEN PRINT"          Ratio of tested/intrafocal animals               = ";USING"####.#### ";B/F ELSE

2270 IF B>0 AND (S+F+E)>0 THEN PRINT"          Ratio of tested/exposed healthy animals          = ";USING"####.#### ";B/(S+F-E):PRINT

2275 IF C>0 AND A>0 THEN PRINT"          Ratio of tests/population                        = ";USING"####.#### ";C/A

2280 IF C>0 AND B>0 THEN PRINT"          Ratio of tests/investigated animals"

2281 IF C>0 AND B>0 THEN PRINT"                                       (retesting rate)    = ";USING"####.#### ";C/B

2285 IF C>0 AND N>0 THEN PRINT"          Ratio of tests/newly discovered cases            = ";USING"####.#### ";C/N

2290 IF D>0 AND B>0 AND A>0 THEN GOTO 2291 ELSE 2980

2291 PRINT:PRINT"          Animal population investigation grade            =    ";USING"#.#### ";(B/A)*D

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2983 ELSE 2990

2983 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.3-PROPORTIONS OF DIFFERENT TYPES OF DIAGNOSTIC TESTS"

3010 PRINT"======================================================"

3050 PRINT:PRINT"INPUT DATA:"

3052 INPUT"     testing object/objective ";O$

3055 INPUT"     place ";PL$

3060 INPUT"     time ";TI$:PRINT

3070 T=0

3075 INPUT"     number (2 up to 11 !) of diagnostic test types ";N

3076 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 3980

3079 PRINT:PRINT TAB(10)"  List data (name of test up to 18 characters): ":PRINT

3080 FOR I=1 TO N

3081 PRINT TAB(5)I;" ";

3082 INPUT"test, number of investigations ";M$(I),X(I)

3083 IF M$(I)="" THEN PRINT:PRINT IDM$:GOTO 3980 ELSE 3084

3084 T=T+X(I):NEXT I

3085 IF T=0 THEN PRINT IDM$:GOTO 3980

3086 MAX=X(1)

3087 FOR I=2 TO N

3088 IF X(I)>MAX THEN MAX=X(I)

3089 NEXT I

3090 IF MAX=0 THEN GOTO 3080 ELSE 3091

3091 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3092 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3093 IF I$="m" THEN GOTO 10

3094 IF I$="c" THEN GOTO 3000

3095 IF I$=CHR$(13) THEN GOTO 3100

3100 CLS:PRINT"  PROPORTIONS OF DIFFERENT  T Y P E S   OF   D I A G N O S T I C   T E S T S":PRINT

3101 PRINT TAB(3)"Object/objective: "O$:PRINT

3102 PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

3140 PRINT TAB(7)"Test";TAB(25)"Number of";TAB(40)"Proportion";TAB(55)"Percentage"

3145 PRINT TAB(25)"investigations"

3150 PRINT

3160 FOR I=1 TO N

3170 PRINT TAB(5)USING"\                \";M$(I);

3171 PRINT TAB(25)X(I);TAB(40)USING"##.####         ";X(I)/T,X(I)/T*100

3180 NEXT:PRINT

3195 PRINT TAB(5)"T o t a l";TAB(25)T;TAB(41)"1.0000";TAB(55)"100.0000"

3200 A$=INKEY$:IF A$="" THEN GOTO 3200

3205 CLS:PRINT"  PROPORTIONS OF DIFFERENT  T Y P E S  OF  D I A G N O S T I C   T E S T S"

3207 IF MAX>(T/2) THEN GOTO 3212 ELSE 3250

3212 PRINT TAB(13)"(";CHR$(223);" represents 2 % of total  "INT(T);" tests)":PRINT

3213 PRINT TAB(3)"Object/objective: "O$

3214 PRINT"Place: "PL$;TAB(50)"Time: "TI$

3216 PRINT:PRINT TAB(5)"Test";TAB(25)"0         20        40        60        80       100 %"

3217 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

3219 FOR I=1 TO N

3220 Z=X(I)/T*50

3221 IF Z<1 THEN GOTO 3222 ELSE 3224

3222 IF Z>0 THEN GOTO 3223 ELSE 3224

3223 PRINT TAB(2)USING"\                \";M$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 3233

3224 PRINT TAB(2)USING"\                \";M$(I);

3225 PRINT TAB(25)CHR$(179);

3226 FOR K=1 TO X(I)/T*50

3228 PRINT CHR$(223);

3230 NEXT K

3233 NEXT I:PRINT:GOTO 3980

3250 PRINT:PRINT TAB(13)"(";CHR$(223);" represents 1 % of total  "INT(T);" tests)":PRINT

3251 PRINT TAB(3)"Object/objective: "O$

3252 PRINT"Place: "PL$;TAB(50)"Time: "TI$

3253 PRINT:PRINT TAB(5)"Test";TAB(25)"0         10        20        30        40        50 %"

3254 PRINT TAB(2)D$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

3255 FOR I=1 TO N

3256 Z=X(I)/T*100

3257 IF Z<1 THEN GOTO 3258 ELSE 3260

3258 IF Z>0 THEN GOTO 3259 ELSE 3260

3259 PRINT TAB(2)USING"\                 \";M$(I);

     PRINT TAB(25)CHR$(179);CHR$(249):GOTO 3268

3260 PRINT TAB(2)USING"\                 \";M$(I);

3261 PRINT TAB(25)CHR$(179);

3262 FOR K=1 TO X(I)/T*100

3264 PRINT CHR$(223);

3266 NEXT K

3268 NEXT I:PRINT

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.4-INFECTIOUS DISEASE EVIDENCE AND NOTIFICATION GRADES"

4010 PRINT"======================================================="

4020 PRINT"This programme calculates evidence/notification of"

4025 PRINT TAB(6)"1) specifically infected animals"

4027 PRINT TAB(6)"2) outbreaks (foci) of specific disease"

4030 INPUT"Enter choice number: ",CH

4040 IF CH=1 OR CH=2 THEN GOTO 4050 ELSE PRINT IDE$:GOTO 4980

4050 PRINT:PRINT"INPUT DATA:"

4055 INPUT"     disease(s) ";DI$

4060 INPUT"     species, category(ies) ";SP$,CA$

4062 INPUT"     place, time ";LU$,TI$

4064 PRINT

4065 IF CH=1 THEN GOTO 4066 ELSE 4080

4066 INPUT"     total number of specifically infected animals             ";A:PRINT

4068 INPUT"     number of clinically recognized infected animals          ";B

4070 INPUT"     number of microbiologically recognized infected animals   ";C

4072 INPUT"     number of serologically recognized infected animals       ";D

4074 INPUT"     number of allergically recognized infected animals        ";E

4076 INPUT"     number of haematologically recognized infected animals    ";G

4077 INPUT"     number of pathologically recognized infected animals      ";H

4078 INPUT"     number of infected animals recognized by other method(s)  ";I:PRINT

4079 INPUT"     number of notified (reported) infected animals            ";F:PRINT:GOTO 4090

4080 INPUT"     total number of specific disease(s) outbreaks (foci)      ";A:PRINT

4082 INPUT"     number of clinically recognized outbreaks                 ";B

4083 INPUT"     number of microbiologically recognized outbreaks          ";C

4084 INPUT"     number of serologically recognized outbreaks              ";D

4085 INPUT"     number of allergically recognized outbreaks               ";E

4086 INPUT"     number of haematologically recognized outbreaks           ";G

4087 INPUT"     number of pathologically recognized outbreaks             ";H

4088 INPUT"     number of outbreaks recognized by other method(s)         ";I:PRINT

4089 INPUT"     number of notified (reported) specific outbreaks          ";F:PRINT

4090 IF A<F THEN GOTO 4091 ELSE 4094

4091 PRINT:PRINT"Error ! Number of the notified cannot be major"

4092 PRINT"                                      than the number of the existing ! ":GOTO 4980

4094 IF A=0 OR (B+C+D+E+G+H+I)=0 THEN PRINT IDM$:GOTO 4980

4095 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4096 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4097 IF I$="m" THEN GOTO 10

4098 IF I$="c" THEN GOTO 4000

4099 IF I$=CHR$(13) THEN GOTO 4102

4102 CLS:PRINT:PRINT"     INFECTIOUS  DISEASE  EVIDENCE  AND  NOTIFICATION  GRADES":PRINT

4103 PRINT TAB(6)"Disease(s): "DI$:PRINT

4104 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

4105 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

4107 IF CH=1 THEN PRINT"     Specifically infected animals evidence/notification rates:":PRINT

4108 IF CH=2 THEN PRINT"     Specific disease outbreaks evidence/notification rates:":PRINT

4110 IF A>0 AND B>0 THEN GOTO 4200 ELSE 4120

4120 IF A>0 AND C>0 THEN GOTO 4210 ELSE 4130

4130 IF A>0 AND D>0 THEN GOTO 4220 ELSE 4140

4140 IF A>0 AND E>0 THEN GOTO 4230 ELSE 4145

4145 IF A>0 AND G>0 THEN GOTO 4235 ELSE 4150

4150 IF A>0 AND H>0 THEN GOTO 4240 ELSE 4160

4160 IF A>0 AND I>0 THEN GOTO 4250 ELSE 4170

4170 IF A>0 AND F>0 THEN GOTO 4260 ELSE 4980

4200 PRINT TAB(14)"Clinical evidence rate              =    ";USING"#.####";B/A:GOTO 4120

4210 PRINT TAB(14)"Microbiological evidence rate       =    ";USING"#.####";C/A:GOTO 4130

4220 PRINT TAB(14)"Serological evidence rate           =    ";USING"#.####";D/A:GOTO 4140

4230 PRINT TAB(14)"Allergical evidence rate            =    ";USING"#.####";E/A:GOTO 4145

4235 PRINT TAB(14)"Haematological evidence rate        =    ";USING"#.####";G/A:GOTO 4150

4240 PRINT TAB(14)"Pathological evidence rate          =    ";USING"#.####";H/A:GOTO 4160

4250 PRINT TAB(14)"Other method evidence rate          =    ";USING"#.####";I/A:GOTO 4170

4260 PRINT

4261 IF CH=1 THEN GOTO 4262 ELSE 4263

4262 PRINT TAB(12)"Specific disease notification rate    =    ";USING"#.####";F/A:GOTO 4980

4263 PRINT TAB(6)"Specific disease outbreaks notification rate    =    ";USING"#.####";F/A:GOTO 4980

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.5-POSITIVITY AND NEGATIVITY OF INVESTIGATIONS RESULTS"

5010 PRINT"======================================================="

5020 PRINT"Note: indeterminate = suspect, provisional, unconfirmed."

5050 PRINT"INPUT DATA:"

5052 INPUT"     investigation test ";EX$

5053 INPUT"     species, category(ies) ";SP$,CA$

5054 INPUT"     place, time ";LU$,TI$

5060 PRINT

5100 INPUT"        number of tested animals                              ";A:PRINT

5102 INPUT"        number of tested animals with positive result         ";B

5104 INPUT"        number of tested animals with indeterminate result    ";C

5106 INPUT"        number of tested animals with negative result         ";D:PRINT

5108 INPUT"        number of tests (investigations)                      ";E:PRINT

5110 INPUT"        number of positive tests                              ";F

5112 INPUT"        number of indeterminate tests                         ";G

5114 INPUT"        number of negative tests                              ";H:PRINT

5116 INPUT"        number of animals found healthy                       ";I

5118 INPUT"        number of animals found indeterminate                 ";J

5120 INPUT"        number of animals found diseased                      ";K

5121 IF A=0 OR E=0 THEN PRINT IDM$:GOTO 5980 ELSE 5190

5190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5192 IF I$="m" THEN GOTO 10

5193 IF I$="c" THEN GOTO 5000

5194 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT:PRINT"     POSITIVITY  AND  NEGATIVITY  OF  INVESTIGATIONS  RESULTS":PRINT

5201 PRINT TAB(6)"Test (investigation): "EX$

5202 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

5203 PRINT"Tested animals: "A;TAB(40)"Investigations: "E:PRINT

5204 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

5210 PRINT

5220 IF B>0 AND A>0 THEN PRINT"          Positively tested animals rate                =  ";USING"#.####";B/A

5222 IF C>0 AND A>0 THEN PRINT"          Indeterminately tested animals rate           =  ";USING"#.####";C/A:GOTO 5224

5223 IF B>0 AND D>0 AND A>0 THEN PRINT"          Indeterminately tested animals rate           =  "USING"#.####";(A-B-D)/A

5224 IF D>0 AND A>0 THEN PRINT"          Negatively tested animals rate                =  ";USING"#.####";D/A:GOTO 5228

5226 IF B>0 AND C>0 AND A>0 THEN PRINT"          Negatively tested animals rate                =  ";USING"#.####";(A-B-C)/A

5228 PRINT

5230 IF F>0 AND E>0 THEN PRINT"          Positive tests rate                           =  ";USING"#.####";F/E

5232 IF G>0 AND E>0 THEN PRINT"          Indeterminate tests rate                      =  ";USING"#.####";G/E:GOTO 5234

5233 IF F>0 AND H>0 AND E>0 THEN PRINT"          Indeterminate tests rate                      =  "USING"#.####";(E-F-H)/E

5234 IF H>0 AND E>0 THEN PRINT"          Negative tests rate                           =  ";USING"#.####";H/E:GOTO 5238

5236 IF F>0 AND G>0 AND E>0 THEN PRINT"          Negative tests rate                           =  "USING"#.####";(E-F-G)/E

5238 PRINT

5240 IF I>0 AND A>0 THEN PRINT"          Rate of tested animals found healthy          =  ";USING"#.####";I/A:GOTO 5242

5141 IF J>0 AND K>0 AND A>0 THEN PRINT"          Rate of tested animals found healthy          =  "USING"#.####";(A-J-K)/A

5242 IF J>0 AND A>0 THEN PRINT"          Rate of tested animals found indeterminate    =  ";USING"#.####";J/A

5244 IF K>0 AND A>0 THEN PRINT"          Rate of tested animals found diseased         =  ";USING"#.####";K/A:GOTO 5980

5246 IF I>0 AND J>0 AND A>0 THEN PRINT"          Rate of tested animals found diseased         =  "USING"#.####";(A-I-J)/A

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.6-AGREEMENT BETWEEN TEST RESULTS OF TWO INVESTIGATORS"

6010 PRINT"=======================================================   (Ref.:Martin et al.)"

6020 PRINT"(comparison of results obtained in the same animals"

6022 PRINT"          or in the same samples by two investigators - A and B)"

6050 PRINT"INPUT DATA:"

6090 INPUT"     objectives of investigation ";OI$

6100 INPUT"     test type ";EX$

6102 INPUT"     animals/specimens ";AN$

6105 INPUT"     place, time ";LU$,TI$

6110 INPUT"     investigators A,B ";IA$,IB$

6120 PRINT:INPUT"       number of identical negative results by A and B          ";N11

6122 'INPUT"       number of results: dubious by A and negative by B        ";N12

6124 INPUT"       number of results: positive by A and negative by B       ";N13

6126 'PRINT:'INPUT"       number of results: negative by A and dubious by B        ";N21

6128 'INPUT"       number of identical dubious results by A and B           ";N22

6130 'INPUT"       number of results: positive by A and dubious by B        ";N23

6132 PRINT:INPUT"       number of results: negative by A and positive by B       ";N31

6134 'INPUT"       number of results: dubious y A and positive by B         ";N32

6135 INPUT"       number of identical positive results by A and by B       ";N33

6139 IF (N11+N12+N13+N21+N22+N23+N31+N32+N33)=0 THEN PRINT IDM$:GOTO 6980

6140 'A$=INKEY$:IF A$="" THEN GOTO 6140

6141 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6142 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6143 IF I$="m" THEN GOTO 10

6144 IF I$="c" THEN GOTO 6000

6145 IF I$=CHR$(13) THEN GOTO 6150

6150 LET N=N11+N12+N13+N21+N22+N23+N31+N32+N33

6151 LET PO=(N11+N22+N33)/N

6152 LET N01=N11+N21+N31

6153 LET N02=N12+N22+N32

6154 LET N03=N13+N23+N33

6155 LET N10=N11+N12+N13

6156 LET N20=N21+N22+N23

6157 LET N30=N31+N32+N33

6160 LET PC=((N10*N01)+(N20*N02)+(N30*N03))/N^2

6170 REM:N01=N11+N31

6171 REM:N03=N13+N33

6172 REM:N10=N11+N13

6173 REM:N30=N31+N33

6175 REM:PC=((N10*N01)+(N30+N03))/N^2

6200 CLS:PRINT:PRINT"     AGREEMENT  BETWEEN  TEST  RESULTS  OF  TWO  INVESTIGATORS":PRINT

6201 PRINT TAB(6)"Objectives: "OI$

6202 PRINT TAB(6)"Test type: "EX$

6203 PRINT TAB(6)"Animals/specimens: "AN$

6204 PRINT"Place: "LU$;TAB(50)"Time: "TI$

6205 PRINT"Investigator A: "IA$;TAB(40)"Investigator B: "IB$:PRINT

6206 PRINT TAB(6)"Total number of tested animals (specimens)         = ";N:PRINT

6210 PRINT TAB(6)"Grade of agreement between test results"

6212 PRINT TAB(6)"                        of the two investigators   =  ";USING"##.####";PO

6215 PRINT TAB(56)" = ";USING"###.####  %";PO*100

6230 PRINT

6240 LET K=(PO-PC)/(1-PC)

6250 PRINT TAB(6)"Intra-groupal correlation coefficient - kappa      =  ";USING"##.####";K

6251 REM: No agreement = 0; perfect agreement = 1.0.

6280 PRINT

6282 LET OPA=(N11+N33)/N

6284 LET AP1=(N33+N31)/N

6286 LET AP2=(N33+N13)/N

6288 LET CPA=(AP1*AP2)+((1-AP2)*(1-AP1))

6301 PRINT TAB(6)"Chance proportion agreement (both +)               =   ";USING"##.####";AP1*AP2

6302 PRINT TAB(6)"Chance proportion agreement (both -)               =   ";USING"##.####";(1-AP2)*(1-AP1)

6303 PRINT TAB(6)"Chance proportion agreement                        =   ";USING"##.####";CPA

6305 PRINT TAB(6)"Observed minus chance agreement                    =   ";USING"##.####";OPA-CPA

6307 PRINT TAB(6)"Maximum possible agreement beyond chance level     =   ";USING"##.####";(1-CPA)

6308 PRINT

6310 IF PO=<0 THEN PRINT TAB(15)"(The result shows an absolute disagreement.)":GOTO 6980

6311 IF PO=>1 THEN PRINT TAB(15)"(The result shows an absolute agreement.)":GOTO 6980

6320 IF PO<=0.4 THEN GOTO 6321 ELSE 6330

6321 PRINT TAB(15)"(The result shows a strong disagreement.)":GOTO 6980

6330 IF PO<=0.8 THEN GOTO 6331 ELSE 6340

6331 PRINT TAB(15)"(The result shows an elevated disagreement.)":GOTO 6980

6340 IF PO<=0.95 THEN GOTO 6341 ELSE 6350

6341 PRINT TAB(15)"(The result shows a limited disagreement.)":GOTO 6980

6350 IF PO>0.95 THEN GOTO 6360 ELSE 6980

6360 PRINT TAB(15)"(The result shows a very limited disagreement.)"

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.7-CONCORDANCE OF COMPARED TESTS RESULTS"

7010 PRINT"=========================================       (Ref.: Martin et al.)"

7025 PRINT"(comparison of results obtained in the same animals"

7026 PRINT"          or in the same samples using two different tests - A and B)":PRINT

7050 PRINT"INPUT DATA:"

7055 INPUT"     investigation type ";IN$

7060 INPUT"     animals/specimens ";SP$

7061 INPUT"     place, time ";PL$,TI$

7063 INPUT"     test A ";MA$

7064 INPUT"     test B ";MB$:PRINT

7066 INPUT"       number of identical negative results by A and B           ";N11

7068 'INPUT"       number of results:dubious by A and negative by B          ";N12

7070 INPUT"       number of results:positive by A and negative by B         ";N13

7072 'PRINT:'INPUT"       number of results:negative by A and dubious by B          ";N21

7074 'INPUT"       number of identical dubious results by A and B            ";N22

7076 'INPUT"       number of results:positive by A and dubious by B          ";N23

7078 PRINT:INPUT"       number of results:negative by A and positive by B         ";N31

7080 'INPUT"       number of results:dubious by A and positive by B          ";N32

7082 INPUT"       number of identical positive results by A and B           ";N33

7083 LET N=N11+N12+N13+N21+N22+N23+N31+N32+N33

7084 IF N=0 THEN PRINT IDM$:GOTO 7980

7090 LET C=(N11+N22+N33)

7091 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7092 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7093 IF I$="m" THEN GOTO 10

7094 IF I$="c" THEN GOTO 7000

7095 IF I$=CHR$(13) THEN GOTO 7100

7100 CLS:PRINT"     CONCORDANCE   OF   COMPARED   TESTS   RESULTS":PRINT

7101 PRINT TAB(6)"Investigation type: "IN$

7102 PRINT TAB(6)"Animals/specimens: "SP$

7104 PRINT"Place: "PL$;TAB(50)"Time: "TI$

7105 PRINT TAB(6)"Test A: "MA$

7106 PRINT TAB(6)"Test B: "MB$:PRINT

7107 PRINT TAB(6)"Total number of tested animals (specimens)           =  "N

7108 'PRINT TAB(6)"Apparent prevalence: ";USING"#.####";(N31+N33)/N:REM:dopracovat ?:PRINT

7110 PRINT TAB(6)"Concordance grade of results obtained"

7111 PRINT TAB(34)"by two different tests   =  ";USING"##.####";C/N

7115 PRINT TAB(56)"       = ";USING"###.##  %";C/N*100

7116 LET N=N11+N12+N13+N21+N22+N23+N31+N32+N33

7117 LET PO=(N11+N22+N33)/N

7118 LET N01=N11+N21+N31

7119 LET N02=N12+N22+N32

7120 LET N03=N13+N23+N33

7121 LET N10=N11+N12+N13

7122 LET N20=N21+N22+N23

7123 LET N30=N31+N32+N33

7124 LET PC=((N10*N01)+(N20*N02)+(N30*N03))/N^2

7125 PRINT

7126 LET K=(PO-PC)/(1-PC)

7127 PRINT TAB(6)"Intragroupal correlation coefficient - kappa         =  ";USING"##.####";K

7130 PRINT

7140 LET OPA=(N11+N33)/N

7142 LET AP1=(N33+N31)/N

7144 LET AP2=(N33+N13)/N

7146 LET CPA=(AP1*AP2)+((1-AP2)*(1-AP1))

7156 PRINT TAB(6)"Chance proportion agreement (both +)                 =  ";USING"##.####";AP1*AP2

7158 PRINT TAB(6)"Chance proportion agreement (both -)                 =  ";USING"##.####";(1-AP2)*(1-AP1)

7160 PRINT TAB(6)"Chance proportion agreement                          =  ";USING"##.####";CPA

7162 PRINT TAB(6)"Observed minus chance agreement                      =  ";USING"##.####";OPA-CPA

7164 PRINT TAB(6)"Maximum possible agreement beyond chance level       =  ";USING"##.####";(1-CPA)

7180 PRINT

7181 IF PO=<0 THEN GOTO 7200 ELSE 7182

7182 IF PO=>1 THEN GOTO 7201 ELSE 7183

7183 IF PO=<.4 THEN GOTO 7202 ELSE 7184

7184 IF PO=<.8 THEN GOTO 7203 ELSE 7185

7185 IF PO=<.95 THEN GOTO 7204 ELSE 7187

7187 IF PO>.95 THEN GOTO 7206 ELSE 7980

7190 PRINT

7200 PRINT TAB(15)"(The result shows an absolute disagreement.)":GOTO 7980

7201 PRINT TAB(15)"(The result shows an absolute agreement.)":GOTO 7980

7202 PRINT TAB(15)"(The result shows a strong disagreement.)":GOTO 7980

7203 PRINT TAB(15)"(The result shows an elevated disagreement.)":GOTO 7980

7204 PRINT TAB(15)"(The result shows a limited disagreement.)":GOTO 7980

7206 PRINT TAB(15)"(The result shows a very limited disagreement.)"

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.8-SUMMARY TABLES OF ANIMAL POPULATION HEALTH/DISEASE INVESTIGATIONS"

8010 PRINT"====================================================================="

8050 PRINT"This subprogramme calculates summary tables of:"

8052 PRINT TAB(10)"1) investigations according to diseases/forms"

8054 PRINT TAB(10)"2) investigations according to species/category(ies)"

8056 PRINT TAB(10)"3) investigations according to place/territory"

8058 PRINT TAB(10)"4) investigations according to time series"

8059 PRINT TAB(10)"5) investigations according to their types"

8060 INPUT"     Enter choice number: ",CH

8070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 THEN GOTO 8100 ELSE PRINT IDE$:GOTO 8980

8100 PRINT"INPUT DATA:"

8110 IF CH<>1 THEN INPUT"     disease(s)";DI$

8111 INPUT"     place, period ";PL$,PE$

8113 IF CH<>2 THEN INPUT"     species, category(ies) ";SP$,CA$

8116 IF CH<>5 THEN INPUT"     type of investigations ";LO$

8117 INPUT"     measure units ";MU$

8118 INPUT"     How many data to be processed (2 up to 11 !)    ";N

8119 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 8980

8122 IF N>5 THEN CLS:PRINT

8123 PRINT TAB(10)"List data (names up to 22 characters):"

8124 FOR I=1 TO N

8125 PRINT TAB(2)I;" ";

8126 IF CH=1 THEN INPUT"disease/form, number of investigations ";D$(I),L(I)

8128 IF CH=2 THEN INPUT"species/categ., number of investigations ";D$(I),L(I)

8130 IF CH=3 THEN INPUT"subterritory, number of investigations ";D$(I),L(I)

8132 IF CH=4 THEN INPUT"subperiod, number of investigations ";D$(I),L(I)

8134 IF CH=5 THEN INPUT"test type, number of investigations ";D$(I),L(I)

8135 IF D$(I)="" THEN PRINT IDM$:GOTO 8980 ELSE 8136

8136 NEXT I

8137 T=0

8138 FOR I=1 TO N

8139 T=T+L(I):NEXT I

8140 IF T=0 THEN PRINT IDM$:GOTO 8980 ELSE 8141

8141 MAX=L(1)

8142 FOR I=2 TO N

8143 IF L(I)>MAX THEN MAX=L(I)

8144 NEXT I

8145 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8146 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8147 IF I$="m" THEN GOTO 10

8148 IF I$="c" THEN GOTO 8000

8149 IF I$=CHR$(13) THEN GOTO 8150

8150 CLS:PRINT"     ANIMAL  POPULATION  HEALTH/DISEASE  INVESTIGATIONS":PRINT

8151 IF CH<>1 THEN PRINT TAB(6)"Disease(s): "DI$

8152 PRINT"Place: "PL$;TAB(50)"Period: "PE$

8153 IF CH=2 THEN GOTO 8156

8154 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8156 PRINT"Type of investigations: "LO$;TAB(40)"Measure units: "MU$

8157 PRINT:PRINT

8158 IF CH=1 THEN D$="Disease"

8159 IF CH=2 THEN D$="Species/category(ies)"

8160 IF CH=3 THEN D$="Subterritory"

8161 IF CH=4 THEN D$="Subperiod"

8162 IF CH=5 THEN D$="Test type"

8165 PRINT TAB(6)D$;TAB(30)"Investigations";TAB(47)"Proportion";TAB(62)"Percentage"

8167 PRINT

8168 FOR I=1 TO N

8169 PRINT I;TAB(6)USING"\                    \";D$(I);

     PRINT TAB(30)INT(L(I));TAB(49)USING"#.####";L(I)/T;

8170 PRINT TAB(63)USING"###.####";L(I)/T*100

8171 NEXT I

8174 PRINT:PRINT TAB(6)"T o t a l";TAB(30)INT(T);TAB(49)"1.0000";TAB(63)"100.0000"

8200 A$=INKEY$:IF A$="" THEN GOTO 8200

8201 IF N=1 THEN GOTO 8982

8205 CLS:PRINT:PRINT TAB(9)"ANIMAL POPULATION  HEALTH/DISEASE  I N V E S T I G A T I O N S"

8210 IF MAX>(T/2) THEN GOTO 8212 ELSE 8240

8212 PRINT:PRINT TAB(15)"(";CHR$(223);" represents 2 % of total  "INT(T)   MU$;")":PRINT

8216 PRINT:PRINT TAB(2)D$;TAB(26)"0         20        40        60        80       100 %"

8218 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

8219 FOR I=1 TO N

8220 Z=L(I)/T*50

8221 IF Z<1 THEN GOTO 8222 ELSE 8224

8222 IF Z>0 THEN GOTO 8223 ELSE 8224

8223 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 8233

8224 PRINT TAB(2)USING"\                    \";D$(I);

8225 PRINT TAB(26)CHR$(179);

8226 FOR K=1 TO L(I)/T*50

8228 PRINT CHR$(223);

8230 NEXT K

8233 NEXT I:GOTO 8980

8240 PRINT:PRINT TAB(15)"(";CHR$(223);" represents 1 % of total "INT(T)  MU$;")":PRINT

8246 PRINT:PRINT TAB(2)D$;TAB(26)"0         10        20        30        40        50 %"

8248 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

8249 FOR I=1 TO N

8250 Z=L(I)/T*100

8251 IF Z<1 THEN GOTO 8252 ELSE 8254

8252 IF Z>0 THEN GOTO 8253 ELSE 8254

8253 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 8263

8254 PRINT TAB(2)USING"\                    \";D$(I);

8255 PRINT TAB(26)CHR$(179);

8256 FOR K=1 TO L(I)/T*100

8258 PRINT CHR$(223);

8260 NEXT K

8263 NEXT I

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8983 IF R$="y" OR R$="n" THEN GOTO 8984 ELSE 8990

8984 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.9-SUMMARY TABLES OF ANIMAL DISEASE INVESTIGATION RESULTS"

9010 PRINT"=========================================================="

9050 PRINT:PRINT"This subprogramme calculates summary tables of:":PRINT

9052 PRINT TAB(10)"1) investigation results according to diseases/forms"

9054 PRINT TAB(10)"2) investigation results according to species/category(ies)"

9056 PRINT TAB(10)"3) investigation results according to space/territory"

9058 PRINT TAB(10)"4) investigation results according to time series"

9059 PRINT TAB(10)"5) investigation results according to tests used":PRINT

9060 INPUT"     Enter choice number: ",CH

9070 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 THEN GOTO 9100 ELSE PRINT IDE$:GOTO 9980

9100 PRINT:PRINT"INPUT DATA:"

9102 IF CH=1 THEN GOTO 9103 ELSE 9110

9103 INPUT"     diseases group ";DIG$:GOTO 9111

9110 INPUT"     disease(s) ";DI$

9111 INPUT"     place, period ";PL$,PE$

9113 IF CH=2 THEN GOTO 9116

9114 IF CH<>2 THEN INPUT"     species, category(ies) ";SP$,CA$

9116 IF CH=5 THEN GOTO 9119

9117 INPUT"     type of investigations ";LO$

9118 INPUT"     measure units ";MU$

9119 INPUT"     How many data to be processed (2 up to 11 !)         ";N

9120 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 9980

9123 CLS:PRINT TAB(11)"List data (names up to 22 characters):":PRINT

9124 FOR I=1 TO N

9126 PRINT TAB(6)I;" ";

9128 IF CH=1 THEN INPUT"disease/form ";D$(I)

9130 IF CH=2 THEN INPUT"species/category(ies) ";D$(I)

9131 IF CH=3 THEN INPUT"subterritory ";D$(I)

9132 IF CH=4 THEN INPUT"subperiod ";D$(I)

9133 IF CH=5 THEN INPUT"test type ";D$(I)

9134 INPUT"             number of investigations, positive results ";L(I),P(I)

9135 IF D$(I)="" OR L(I)=0 THEN PRINT IDM$:GOTO 9980 ELSE 9136

9136 IF P(I)>L(I) THEN GOTO 9137 ELSE 9138

9137 PRINT:PRINT"Error ! It cannot be more positive results than investigations ! ":GOTO 9980

9138 NEXT I

9140 T=0

9142 FOR I=1 TO N

9144 T=T+L(I)

9145 NEXT I

9146 TP=0

9147 FOR I=1 TO N

9148 TP=TP+P(I)

9149 NEXT I

9150 IF T=0 OR TP=0 THEN PRINT:PRINT IDM$:GOTO 9980

9151 MAX=P(1)

9152 FOR I=2 TO N

9153 IF P(I)>MAX THEN MAX=P(I)

9154 NEXT I

9155 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9156 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9157 IF I$="m" THEN GOTO 10

9158 IF I$="c" THEN GOTO 9000

9159 IF I$=CHR$(13) THEN GOTO 9160

9160 CLS:PRINT"     ANIMAL  POPULATION  DISEASE  INVESTIGATION  RESULTS":PRINT

9161 IF CH=1 THEN PRINT TAB(6)"Diseases Group: "DIG$:GOTO 9163

9162 PRINT TAB(6)"Disease(s): "DI$

9163 PRINT"Place: "PL$;TAB(50)"Period: "PE$

9164 IF CH=2 THEN GOTO 9166

9165 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

9166 IF CH<>5 THEN PRINT"Type of test: "LO$;TAB(50)"Measure units: "MU$

9167 PRINT

9168 IF CH=1 THEN D$="Disease"

9169 IF CH=2 THEN D$="Species/category(ies)"

9170 IF CH=3 THEN D$="Subterritory"

9171 IF CH=4 THEN D$="Subperiod"

9172 IF CH=5 THEN D$="Test type"

9173 REM:PRINT TAB(6)D$;TAB(34)"N u m b e r ";TAB(55)"P e r c e n t a g e"

9174 PRINT TAB(6)D$;TAB(30)"Investi-";TAB(42)"Positive";TAB(54)"% of Pos.";TAB(65)"% of Total"

9175 PRINT TAB(30)"gations";TAB(42)"Results";TAB(54)"Results";TAB(66)"Pos.Results"

9176 'PRINT TAB(55)"Results";TAB(66)"Results"

9177 PRINT

9178 FOR I=1 TO N

9179 PRINT I;TAB(6)USING"\                    \";D$(I);

     PRINT TAB(30)INT(L(I));TAB(42)INT(P(I));TAB(54)USING"###.####";P(I)/L(I)*100;

9180 PRINT TAB(66)USING"###.####";P(I)/TP*100

9181 NEXT I

9182 PRINT

9184 PRINT TAB(6)"T o t a l";TAB(30)INT(T);TAB(42)INT(TP);TAB(54)USING"###.####";TP/T*100;

9185 PRINT TAB(66)"100.0000":PRINT

9200 A$=INKEY$:IF A$="" THEN GOTO 9200

9201 IF N=1 THEN GOTO 9982

9202 'IF CH=1 OR CH=2 THEN GOTO 9301:REM:preskocena procenta positivity z celkoveho totalu

9203 'IF CH=1 OR CH=2 THEN GOTO 9307 ELSE 9205

9205 CLS:PRINT TAB(7)"ANIMAL   POPULATION   DISEASE   INVESTIGATIONS   R E S U L T S"

9210 IF MAX>(TP/2) THEN GOTO 9212 ELSE 9240

9212 PRINT TAB(11)"(";CHR$(223);" represents 2 % of total ";INT(TP);" positive results)"

9214 PRINT:PRINT

9216 PRINT TAB(2)D$;TAB(26)"0         20        40        60        80       100 %"

9218 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

9219 FOR I=1 TO N

9220 Z=P(I)/TP*50

9221 IF Z<1 THEN GOTO 9222 ELSE 9224

9222 IF Z>0 THEN GOTO 9223 ELSE 9224

9223 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 9233

9224 PRINT TAB(2)USING"\                    \";D$(I);

9225 PRINT TAB(26)CHR$(179);

9226 FOR K=1 TO P(I)/TP*50

9228 PRINT CHR$(223);

9230 NEXT K

9233 NEXT I:GOTO 9300

9240 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of total ";INT(TP);" positive results)"

9244 PRINT:PRINT

9246 PRINT TAB(2)D$;TAB(26)"0         10        20        30        40        50 %"

9248 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

9249 FOR I=1 TO N

9250 Z=P(I)/TP*100

9251 IF Z<1 THEN GOTO 9252 ELSE 9254

9252 IF Z>0 THEN GOTO 9253 ELSE 9254

9253 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 9263

9254 PRINT TAB(2)USING"\                    \";D$(I);

9255 PRINT TAB(26)CHR$(179);

9256 FOR K=1 TO P(I)/TP*100

9258 PRINT CHR$(223);

9260 NEXT K

9263 NEXT I

9300 A$=INKEY$:IF A$="" THEN GOTO 9300

9301 MAP=P(1)/L(1)

9302 FOR I=2 TO N

9303 IF (P(I)/L(I))>MAP THEN MAP=(P(I)/L(I))

9304 NEXT I

9307 CLS:PRINT TAB(10)"P E R C E N T A G E   OF   P O S I T I V E    R E S U L T S"

9308 IF MAP>0.5 THEN 9400 ELSE 9310

9310 PRINT:PRINT TAB(20)"(";CHR$(223);" represents 1 % of positivity)"

9344 PRINT:PRINT

9346 PRINT TAB(2)D$;TAB(26)"0         10        20        30        40        50 %"

9348 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

9349 FOR I=1 TO N

9350 Z=P(I)/L(I)*100

9351 IF Z<1 THEN GOTO 9352 ELSE 9354

9352 IF Z>0 THEN GOTO 9353 ELSE 9354

9353 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 9363

9354 PRINT TAB(2)USING"\                    \";D$(I);

9355 PRINT TAB(26)CHR$(179);

9356 FOR K=1 TO P(I)/L(I)*100

9358 PRINT CHR$(223);

9360 NEXT K

9363 NEXT I:GOTO 9980

9400 PRINT:PRINT TAB(20)"(";CHR$(223);" represents 2 % of positivity)"

9414 PRINT:PRINT

9416 PRINT TAB(2)D$;TAB(26)"0         20        40        60        80       100 %"

9418 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

9419 FOR I=1 TO N

9420 Z=P(I)/L(I)*50

9421 IF Z<1 THEN GOTO 9422 ELSE 9424

9422 IF Z>0 THEN GOTO 9423 ELSE 9424

9423 PRINT TAB(2)USING"\                    \";D$(I);

     PRINT TAB(26)CHR$(179);CHR$(249):GOTO 9433

9424 PRINT TAB(2)USING"\                    \";D$(I);

9425 PRINT TAB(26)CHR$(179);

9426 FOR K=1 TO P(I)/L(I)*50

9428 PRINT CHR$(223);

9430 NEXT K

9433 NEXT I

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9982 CLS:MAX=0:MAP=0:D$="":L=0:P=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9983 IF R$="y" OR R$="n" THEN GOTO 9984 ELSE 9990

9984 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.10-SUMMARY TABLES OF MULTI-ETIOLOGICAL INVESTIGATIONS"

10001 PRINT"     OF A GIVEN POPULATION/SAMPLE"

10010 PRINT"======================================================="

10050 PRINT:PRINT"This subprogramme calculates summary tables on:":PRINT

10052 PRINT TAB(5)"1) field investigations results of a given population (herd, flock)"

10054 PRINT TAB(5)"2) laboratory investigations results of a given set of specimens"

10056 PRINT TAB(5)"3) slaughterhouse investigations results of a given animal group":PRINT

10060 INPUT"     Enter choice number: ",CH

10070 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 10100 ELSE PRINT IDE$:GOTO 10980

10100 PRINT:PRINT"INPUT DATA:"

10101 INPUT"     place, period ";PL$,PE$

10102 IF CH=1 OR CH=3 THEN GOTO 10103 ELSE 10104

10103 INPUT"     species, category(ies) ";SP$,CA$:GOTO 10115

10104 INPUT"     specimen ";SP$

10115 INPUT"     type of investigations ";LO$

10116 INPUT"     criterium for positivity ";MU$:PRINT

10117 INPUT"     total number of investigated animals/specimens              ";NU

10118 IF NU=<0 THEN PRINT IDM$:GOTO 10980 ELSE 10119

10119 INPUT"     How many diseases - data to be processed (2 up to 11 !)     ";N

10120 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 10980

10123 CLS:PRINT:PRINT TAB(11)"List data (names up to 22 characters):":PRINT

10124 FOR I=1 TO N

10126 PRINT TAB(6)I;" ";

10134 INPUT"disease, positive results ";D$(I),P(I)

10135 IF D$(I)="" OR P(I)>NU THEN PRINT IDE$:GOTO 10980 ELSE 10136

10136 NEXT I

10139 TP=0

10140 FOR I=1 TO N

10141 TP=TP+P(I)

10142 NEXT I

10143 IF TP=0 THEN PRINT IDM$:GOTO 10980

10144 MAX=P(1)

10145 FOR I=2 TO N

10146 IF P(I)>MAX THEN MAX=P(I)

10147 NEXT I

10155 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10156 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10157 IF I$="m" THEN GOTO 10

10158 IF I$="c" THEN GOTO 10000

10159 IF I$=CHR$(13) THEN GOTO 10160

10160 CLS:PRINT TAB(6)"MULTI-ETIOLOGICAL  INVESTIGATIONS  OF  A  GIVEN  POPULATION/SAMPLE"

10161 PRINT"Place: "PL$;TAB(50)"Period: "PE$

10162 IF CH=1 OR CH=3 THEN GOTO 10163 ELSE 10164

10163 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:GOTO 10165

10164 PRINT"Specimens: "SP$

10165 PRINT TAB(5)"Total investigated: "NU

10167 PRINT"Type: "LO$;TAB(40)"Positivity: "MU$:PRINT

10168 D$="Disease(s)"

10174 PRINT TAB(10)D$;TAB(40)"Number of";TAB(56)"% of";TAB(65)"% of Total"

10175 PRINT TAB(40)"Positive";TAB(55)"Positive";TAB(66)"Positive"

10176 PRINT TAB(40)"Results";TAB(55)"Results";TAB(66)"Results"

10177 PRINT

10178 FOR I=1 TO N

10179 PRINT TAB(4)I;TAB(10)USING"\                    \";D$(I);

      PRINT TAB(40)INT(P(I));TAB(54)USING"###.####";P(I)/NU*100;

10180 PRINT TAB(66)USING"###.####";P(I)/TP*100

10181 NEXT I

10182 PRINT

10183 PRINT TAB(10)"T o t a l";TAB(40)INT(TP);

10184 'PRINT TAB(54)USING"###.####";TP/NU*100;

10185 PRINT TAB(66)"100.0000"

10200 A$=INKEY$:IF A$="" THEN GOTO 10200

10201 IF N=1 THEN GOTO 10982

10205 CLS:PRINT:PRINT TAB(6)"MULTI-ETIOLOGICAL  INVESTIGATIONS  OF  A  GIVEN  POPULATION/SAMPLE"

10210 IF MAX>(TP/2) THEN GOTO 10212 ELSE 10240

10212 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total ";TP;" positive results)"

10214 PRINT:PRINT

10216 PRINT TAB(2)D$;TAB(26)"0         20        40        60        80       100 %"

10218 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

10219 FOR I=1 TO N

10220 Z=P(I)/TP*50

10221 IF Z<1 THEN GOTO 10222 ELSE 10224

10222 IF Z>0 THEN GOTO 10223 ELSE 10224

10223 PRINT TAB(2)USING"\                    \";D$(I);

      PRINT TAB(26)CHR$(179);CHR$(249):GOTO 10233

10224 PRINT TAB(2)USING"\                    \";D$(I);

10225 PRINT TAB(26)CHR$(179);

10226 FOR K=1 TO P(I)/TP*50

10228 PRINT CHR$(223);

10230 NEXT K

10233 NEXT I:GOTO 10300

10240 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of total ";TP;" positive results)"

10244 PRINT:PRINT

10246 PRINT TAB(2)D$;TAB(26)"0         10        20        30        40        50 %"

10248 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

10249 FOR I=1 TO N

10250 Z=P(I)/TP*100

10251 IF Z<1 THEN GOTO 10252 ELSE 10254

10252 IF Z>0 THEN GOTO 10253 ELSE 10254

10253 PRINT TAB(2)USING"\                    \";D$(I);

      PRINT TAB(26)CHR$(179);CHR$(249):GOTO 10263

10254 PRINT TAB(2)USING"\                    \";D$(I);

10255 PRINT TAB(26)CHR$(179);

10256 FOR K=1 TO P(I)/TP*100

10258 PRINT CHR$(223);

10260 NEXT K

10263 NEXT I

10300 A$=INKEY$:IF A$="" THEN GOTO 10300

10301 MAP=P(1)/NU

10302 FOR I=2 TO N

10303 IF (P(I)/NU)>MAP THEN MAP=(P(I)/NU)

10304 NEXT I

10307 CLS:PRINT:PRINT TAB(10)"P E R C E N T A G E   OF   P O S I T I V E    R E S U L T S"

10308 IF MAP>0.5 THEN 10400 ELSE 10310

10310 PRINT:PRINT TAB(20)"(";CHR$(223);" represents 1 % of positivity)"

10344 PRINT:PRINT

10346 PRINT TAB(2)D$;TAB(26)"0         10        20        30        40        50 %"

10348 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

10349 FOR I=1 TO N

10350 Z=P(I)/NU*100

10351 IF Z<1 THEN GOTO 10352 ELSE 10354

10352 IF Z>0 THEN GOTO 10353 ELSE 10354

10353 PRINT TAB(2)USING"\                    \";D$(I);

      PRINT TAB(26)CHR$(179);CHR$(249):GOTO 10363

10354 PRINT TAB(2)USING"\                    \";D$(I);

10355 PRINT TAB(26)CHR$(179);

10356 FOR K=1 TO P(I)/NU*100

10358 PRINT CHR$(223);

10360 NEXT K

10363 NEXT I:GOTO 10980

10400 PRINT:PRINT TAB(20)"(";CHR$(223);" represents 2 % of positivity)"

10414 PRINT:PRINT

10416 PRINT TAB(2)D$;TAB(26)"0         20        40        60        80       100 %"

10418 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

10419 FOR I=1 TO N

10420 Z=P(I)/NU*50

10421 IF Z<1 THEN GOTO 10422 ELSE 10424

10422 IF Z>0 THEN GOTO 10423 ELSE 10424

10423 PRINT TAB(2)USING"\                    \";D$(I);

      PRINT TAB(26)CHR$(179);CHR$(249):GOTO 10433

10424 PRINT TAB(2)USING"\                    \";D$(I);

10425 PRINT TAB(26)CHR$(179);

10426 FOR K=1 TO P(I)/NU*50

10428 PRINT CHR$(223);

10430 NEXT K

10433 NEXT I

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10982 CLS:MAX=0:D$="":L=0:P=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10983 IF R$="y" OR R$="n" THEN GOTO 10984 ELSE 10990

10984 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.11-TESTING PARASITIC DISEASES EXTENSITY AND INTENSITY"

11015 PRINT"======================================================="

11020 PRINT"This subprogramme calculates the extensity (proportion of animals with specific"

11022 PRINT"parasites) and intensity (average number of parasites in affected animals)."

11050 PRINT"INPUT DATA:"

11055 INPUT"     parasitosis ";PA$

11057 INPUT"     species, category(ies) ";SP$,CA$

11058 INPUT"     place, time ";PL$,TI$

11060 INPUT"     specimen, test type ";SA$,TY$

11070 INPUT"     number (up to 11 !) of subpopulations (groups) ";N

11080 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 11981

11100 PRINT"     List data: subpopulation name (up to 12 characters),"

11106 PRINT"           number of tested, positive animals, average of parasites :"

11150 FOR I=1 TO N

11152 PRINT TAB(8)I;

11154 INPUT " ";NA$(I),IN(I),PO(I),AV(I)

11155 IF NA$(I)="" OR IN(I)=0 THEN PRINT IDM$:GOTO 11981 ELSE 11156

11156 NEXT I

11160 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11166 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11167 IF I$="m" THEN GOTO 10

11168 IF I$="c" THEN GOTO 11000

11169 IF I$=CHR$(13) THEN GOTO 11200

11200 CLS:PRINT TAB(10)"TESTING  PARASITIC  DISEASES  EXTENSITY  AND  INTENSITY"

11205 PRINT TAB(6)"Parasitosis: "PA$

11207 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

11208 PRINT "Specimen: "SA$;TAB(40)"Test: "TY$

11209 PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

11220 PRINT" Subpopu-";TAB(17)"Number of";TAB(30)"Number of";TAB(40)"EXTEN-";TAB(49)"INTENSITY";TAB(61)"Total";TAB(70)"Proportion"

11222 PRINT" lation";TAB(17)"Tested";TAB(30)"Animals";TAB(40)"SITY";TAB(49)"Average";TAB(59)"Number of";TAB(70)"of Total"

11224 PRINT TAB(17)"Animals";TAB(30)"with";TAB(40)"Propor-";TAB(49)"  of";TAB(59)"  Found";TAB(70)"Number of"

11226 PRINT TAB(30)"Parasites";TAB(40)"tion";TAB(49)"Parasites";TAB(59)"Parasites";TAB(70)"Parasites":PRINT

11230 T=0:IN=0:PO=0

11232 FOR I=1 TO N

11233 T=T+(AV(I)*PO(I))

11234 IN=IN+IN(I)

11235 PO=PO+PO(I)

11236 NEXT I

11240 FOR I=1 TO N

11241 PRINT" ";USING"\          \";NA$(I);

11242 PRINT TAB(16)INT(IN(I));TAB(29)INT(PO(I));TAB(40)USING"#.####";PO(I)/IN(I);

11243 PRINT TAB(49)USING"#####.#";AV(I);

11244 PRINT TAB(59)INT((AV(I)*PO(I))+.5);TAB(72)USING"#.####";(AV(I)*PO(I))/T

11245 NEXT I

11246 PRINT

11247 PRINT" T O T A L";TAB(16)INT(IN);TAB(29)INT(PO);TAB(40)USING"#.####";PO/IN;

11248 PRINT TAB(49)USING"#####.#";T/PO;

11249 PRINT TAB(59)INT(T+.5);TAB(72)"1.0000"

11260 MAX=(AV(1)*PO(1))

11262 FOR I=1 TO N

11263 IF (AV(I)*PO(I))>MAX THEN MAX=(AV(I)*PO(I))

11264 NEXT I

11300 A$=INKEY$:IF A$="" THEN GOTO 11300

11301 IF N=1 THEN GOTO 11982

11305 CLS:PRINT:PRINT TAB(11)"SUBPOPULATIONS  PROPORTIONS  OF  TOTAL  FOUND  PARASITES"

11310 IF MAX>(T/2) THEN GOTO 11312 ELSE 11340

11312 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total ";INT(T+.5);" found parasites)"

11314 PRINT:PRINT

11316 PRINT TAB(2)"Subpopulation";TAB(26)"0         20        40        60        80       100 %"

11318 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

11319 FOR I=1 TO N

11320 Z=((AV(I)*PO(I))/T)*50

11321 IF Z<1 THEN GOTO 11322 ELSE 11325

11322 IF Z>0 THEN GOTO 11323 ELSE 11325

11323 PRINT TAB(2)USING"\          \";NA$(I);

11324 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 11333

11325 PRINT TAB(2)USING"\          \";NA$(I);

11326 PRINT TAB(26)CHR$(179);

11327 FOR K=1 TO ((AV(I)*PO(I))/T)*50

11328 PRINT CHR$(223);

11330 NEXT K

11333 NEXT I:GOTO 11980

11340 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of total ";INT(T+.5);" found parasites)"

11344 PRINT:PRINT

11346 PRINT TAB(2)"Subpopulation";TAB(26)"0         10        20        30        40        50 %"

11348 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

11349 FOR I=1 TO N

11350 Z=((AV(I)*PO(I))/T)*100

11351 IF Z<1 THEN GOTO 11352 ELSE 11355

11352 IF Z>0 THEN GOTO 11353 ELSE 11355

11353 PRINT TAB(2)USING"\          \";NA$(I);

11354 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 11363

11355 PRINT TAB(2)USING"\          \";NA$(I);

11356 PRINT TAB(26)CHR$(179);

11357 FOR K=1 TO ((AV(I)*PO(I))/T)*100

11358 PRINT CHR$(223);

11360 NEXT K

11363 NEXT I

11980 PRINT

11981 A$=INKEY$:IF A$="" THEN GOTO 11981

11982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11983 IF R$="y" OR R$="n" THEN GOTO 11984 ELSE 11990

11984 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "V$:PRINT"7.12-TESTING INFECTION INTENSITY GRADES IN ANIMALS"

12015 PRINT"=================================================="

12020 PRINT"This subprogramme calculates infection intensity distribution in terms"

12022 PRINT"of etiological agents (quantity, quality), antibodies levels, etc."

12050 PRINT"INPUT DATA:"

12055 INPUT"     disease ";DI$

12057 INPUT"     species, category(ies) ";SP$,CA$

12058 INPUT"     place, time ";PL$,TI$

12060 INPUT"     specimen, test type ";SA$,TY$

12061 INPUT"     infection intensity grade type "IIG$

12070 INPUT"     number (up to 11 !) of infection intensity grades ";N

12080 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 12980

12100 PRINT"List grade values (up to 12 characters), number of animals:"

12150 FOR I=1 TO N

12152 PRINT TAB(8)I;

12154 INPUT" "G$(I),AN(I)

12155 IF G$(I)="" THEN PRINT IDM$:GOTO 12980 ELSE 12156

12156 NEXT I

12157 T=0:FOR I=1 TO N:T=T+AN(I):NEXT I

12158 IF T=0 THEN PRINT IDM$:GOTO 12980 ELSE 12160

12160 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12166 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12167 IF I$="m" THEN GOTO 10

12168 IF I$="c" THEN GOTO 12000

12169 IF I$=CHR$(13) THEN GOTO 12200

12200 CLS:PRINT TAB(6)"TESTING  INFECTION  INTENSITY  GRADES  IN  ANIMALS"

12205 PRINT TAB(6)"Disease: "DI$

12207 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

12210 PRINT "Specimen: "SA$;TAB(40)"Test: "TY$

12211 PRINT "Intensity type: "IIG$

12212 PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

12220 PRINT TAB(5)" Grade";TAB(27)"Affected";TAB(41)"Proportion";TAB(54)"Percentage"

12222 PRINT TAB(27)"Animals";TAB(41)"of Total";TAB(55)"of Total"

12224 PRINT

12230 AN=0

12232 FOR I=1 TO N

12233 AN=AN+AN(I)

12236 NEXT I

12240 FOR I=1 TO N

12241 PRINT I;TAB(6)USING"\          \";G$(I);

12242 PRINT TAB(26)AN(I);TAB(41)USING"#.####";AN(I)/AN;

12243 PRINT TAB(52)USING"#####.####";(AN(I)/AN)*100

12245 NEXT I

12246 PRINT

12247 PRINT"  T O T A L";TAB(26)INT(AN);TAB(41)"1.0000";TAB(54)"100.0000"

12260 MAX=AN(1)

12262 FOR I=1 TO N

12263 IF AN(I)>MAX THEN MAX=AN(I)

12264 NEXT I

12300 A$=INKEY$:IF A$="" THEN GOTO 12300

12301 IF N=1 THEN GOTO 12982

12305 CLS:PRINT:PRINT TAB(5)"I N F E C T I O N   I N T E N S I T Y   GRADES  IN  AFFECTED  ANIMALS"

12310 IF MAX>(AN/2) THEN GOTO 12312 ELSE 12340

12312 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 2 % of total ";INT(AN);" affected animals)"

12314 PRINT:PRINT

12316 PRINT TAB(6)"Grade";TAB(26)"0         20        40        60        80       100 %"

12318 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

12319 FOR I=1 TO N

12320 Z=(AN(I)/AN)*50

12321 IF Z<1 THEN GOTO 12322 ELSE 12325

12322 IF Z>0 THEN GOTO 12323 ELSE 12325

12323 PRINT TAB(4)USING"\          \";G$(I);

12324 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 12333

12325 PRINT TAB(4)USING"\          \";G$(I);

12326 PRINT TAB(26)CHR$(179);

12327 FOR K=1 TO (AN(I)/AN)*50

12328 PRINT CHR$(223);

12330 NEXT K

12333 NEXT I:GOTO 12980

12340 PRINT:PRINT TAB(11)"(";CHR$(223);" represents 1 % of total ";INT(AN);" affected animals)"

12344 PRINT:PRINT

12346 PRINT TAB(6)"Grade";TAB(26)"0         10        20        30        40        50 %"

12348 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

12349 FOR I=1 TO N

12350 Z=(AN(I)/AN)*100

12351 IF Z<1 THEN GOTO 12352 ELSE 12355

12352 IF Z>0 THEN GOTO 12353 ELSE 12355

12353 PRINT TAB(4)USING"\          \";G$(I);

12354 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 12363

12355 PRINT TAB(4)USING"\          \";G$(I);

12356 PRINT TAB(26)CHR$(179);

12357 FOR K=1 TO (AN(I)/AN)*100

12358 PRINT CHR$(223);

12360 NEXT K

12363 NEXT I

12980 PRINT

12981 A$=INKEY$:IF A$="" THEN GOTO 12981

12982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12983 IF R$="y" OR R$="n" THEN GOTO 12984 ELSE 12990

12984 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.13-COMPARISON OF TWO TESTS ACCORDING THEIR SPECIFICITY AND SENSITIVITY"

13010 PRINT"========================================================================"

13015 PRINT"(applicable for any diagnostic test of any investigated phenomena,"

13016 PRINT"e.g. healthy or diseased animals, specimens, focal units, etc.)"

13020 PRINT:PRINT"INPUT DATA: ":PRINT

13021 INPUT"     phenomenon to be detected ";DI$

13022 INPUT"     population (sample) ";PO$:PRINT

13023 INPUT"     reference test (gold standard) ";RT$

13024 INPUT"     compared test ";CT$

13025 PRINT:PRINT"All four following questions must be answered using integers major than 0 !"

13029 PRINT

13030 INPUT"     number of positive results in both tests        ";A

13032 PRINT"     number of positive results in compared test"

13033 INPUT"                      and negative in reference test ";B

13035 PRINT"     number of negative results in compared test"

13036 INPUT"                      and positive in reference test ";C

13038 INPUT"     number of negative results in both tests        ";D

13039 IF A=0 OR B=0 OR C=0 OR D=0 THEN PRINT IDM$:GOTO 13981

13040 PRINT

13041 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

13042 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

13043 IF I$="m" THEN GOTO 10

13044 IF I$="c" THEN GOTO 13000

13045 IF I$=CHR$(13) THEN GOTO 13050

13050 CLS:PRINT"     COMPARISON OF TWO TESTS ACCORDING THEIR SPECIFICITY AND SENSITIVITY":PRINT

13052 PRINT"     Phenomenon: "DI$

13054 PRINT"     Population (sample): "PO$:PRINT

13056 PRINT"     Reference test: "RT$

13058 PRINT"     Compared test:  "CT$

13060 PRINT

13062 PRINT"     Sensitivity ratio of compared test"

13063 PRINT"                          to reference test = ";USING"#.####";A/(A+C)

13065 PRINT TAB(60);" = ";USING"###.####";A/(A+C)*100;

13066 PRINT"  % ":PRINT

13068 PRINT"     Specificity ratio of compared test"

13069 PRINT"                          to reference test = ";USING"#.####";D/(B+D)

13070 PRINT TAB(60);" = ";USING"###.####";D/(B+D)*100;

13072 PRINT"  % ":PRINT

13981 A$=INKEY$:IF A$="" THEN GOTO 13981

13982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

13983 IF R$="y" OR R$="n" THEN GOTO 13984 ELSE 13990

13984 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

13995 PRINT

14000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.14-RELATIONSHIP OF POSITIVELY AND NEGATIVELY TESTED ANIMALS"

14010 PRINT"============================================================="

14050 PRINT:PRINT"INPUT DATA:"

14051 PRINT

14055 INPUT"     diagnostic method ";MD$

14056 INPUT"     species ";SP$

14057 INPUT"     category(ies) ";CA$

14058 INPUT"     place ";P$

14059 INPUT"     time ";T$:PRINT

14070 INPUT"     number of tested diseased animals with positive (true) results    ";A

14071 INPUT"     number of tested healthy animals with positive (false) results    ";B:PRINT

14072 INPUT"     number of tested diseased animals with negative (false) results   ";C

14074 INPUT"     number of tested healthy animals with negative (true) results     ";D

14075 IF A=0 OR B=0 OR C=0 OR D=0 THEN PRINT IDM$:GOTO 14980

14080 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

14081 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

14082 IF I$="m" THEN GOTO 10

14083 IF I$="c" THEN GOTO 14000

14084 IF I$=CHR$(13) THEN GOTO 14200

14200 CLS:PRINT" RELATIONSHIP OF POSITIVELY AND NEGATIVELY TESTED HEALTHY AND DISEASED ANIMALS":PRINT

14214 PRINT TAB(6)"Method: "MD$

14215 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

14216 PRINT"Place: "P$;TAB(50)"Time: "T$

14225 PRINT"Tested animals - total, diseased, healthy, positively, negatively:

14226 PRINT TAB(43)(A+B+C+D);(A+C);(B+D);(A+B);(C+D)

14230 PRINT

14231 PRINT"         Rate of true positive animals                   =   ";USING"#.####";A/(A+B)

14232 PRINT"         Rate of false positive animals                  =   ";USING"#.####";B/(A+B)

14234 PRINT"         Rate of false negative animals                  =   ";USING"#.####";C/(C+D)

14236 PRINT"         Rate of true negative animals                   =   ";USING"#.####";D/(C+D):PRINT

14238 PRINT"         Rate of positively tested diseased animals      =   ";USING"#.####";A/(A+C)

14240 PRINT"         Rate of positively tested healthy animals       =   ";USING"#.####";B/(B+D)

14241 PRINT"         Rate of negatively tested diseased animals      =   ";USING"#.####";C/(A+C)

14242 PRINT"         Rate of negatively tested healthy animals       =   ";USING"#.####";D/(B+D):PRINT

14243 PRINT"         Rate of positively tested animals               =   ";USING"#.####";(A+B)/(A+B+C+D)

14244 PRINT"         Rate of negatively tested animals               =   ";USING"#.####";(C+D)/(A+B+C+D)

14246 PRINT"         Rate of tested healthy animals                  =   ";USING"#.####";(B+D)/(A+B+C+D)

14248 PRINT"         Rate of tested diseased animals                 =   ";USING"#.####";(A+C)/(A+B+C+D)

14980 A$=INKEY$:IF A$="" THEN GOTO 14980

14981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

14982 IF R$="y" OR R$="n" THEN GOTO 14983 ELSE 14990

14983 IF R$="y" THEN GOTO 14000 ELSE 14990

14990 RETURN

15000 CLS:PRINT TAB(52)e$" "v$:PRINT"7.15-PREDICTIVE VALUE ACCORDING TO BAYES' THEOREM"

15010 PRINT"================================================="

15020 PRINT"(Ref. Toma &. al.: Dictionary of Veterinary Epidemiology, Iowa State"

15030 PRINT"                                       University Press, Ames, 1999, p. 19-20)"

15050 PRINT:PRINT"INPUT DATA (numeric data as proportions, i.e. between >0 and <1 !):"

15055 PRINT:INPUT"     diagnostic method and its aim ";MD$

15056 INPUT"     species, category(ies) ";SP$,CA$

15058 INPUT"     place, time ";P$,T$:PRINT

15070 INPUT"           prevalence rate                     ";P

15071 INPUT"           diagnostic method specificity       ";SPE

15072 INPUT"           diagnostic method sensitivity       ";SEN

15075 IF P=0 OR SPE=0 OR SEN=0 OR P=>1 OR SPE=>1 OR SEN=>1 THEN PRINT IDE$:GOTO 15980

15200 PRINT:PRINT"RESULT:":PRINT

15220 PRINT:PRINT"   Predictive value of positive results            =  ";USING"#.#### ";P*SEN/((P*SEN)+(1-P)*(1-SPE)):PRINT

15250 PRINT"   Predictive value of negative results            =  ";USING"#.#### ";(1-P)*SPE/((1-P)*SPE+P*(1-SEN))

15980 A$=INKEY$:IF A$="" THEN GOTO 15980

15981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

15982 IF R$="y" OR R$="n" THEN GOTO 15983 ELSE 15990

15983 IF R$="y" THEN GOTO 15000 ELSE 15990

15990 RETURN

15996 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

16000 CLS:INPUT"Do you want to return to the main EPIZOO menu, yes(y) or no(n) ";Z$

16002 IF Z$="y" OR Z$="n" THEN GOTO 16010 ELSE 16030

16010 IF Z$="y" THEN GOTO 16020 ELSE 16030

16020 CHAIN"EPIZ40MM.KOU"

16030 SYSTEM

 

 

 

 

         8-Methods related to sampling in population investigations

 

5 ON ERROR GOTO 12995 :REM:16/9/2002

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4008.KOU"

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(3)"8-SELECTED SAMPLING METHODS FOR POPULATION HEALTH INVESTIGATIONS"

40 PRINT TAB(3)"================================================================"

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S"

510 PRINT TAB(8)"1-Random numbers for selection of representative animals/herds"

520 PRINT TAB(8)"2-Sample size for detecting presence of a disease in a population"

530 PRINT TAB(8)"3-Sample size for estimating prevalence in large population"

540 PRINT TAB(8)"4-Sample size for estimating prevalence using confidence interval"

550 PRINT TAB(8)"5-Sample size for estimating prevalence using absolute difference"

560 PRINT TAB(8)"6-Sample size for estimating prevalence in finite population"

570 PRINT TAB(8)"7-Sample size for detecting difference between two prevalences"

580 PRINT TAB(8)"8-Sample size for estimating mean of population health phenomena - I."

590 PRINT TAB(8)"9-Sample size for estimating mean of population health phenomena - II."

600 PRINT TAB(8)"10-Sample size for detecting difference between two means"

605 PRINT TAB(8)"11-Stratified sampling for population health investigations"

606 PRINT TAB(8)"12-Estimating prevalence from simple and cluster random samples"

607 PRINT TAB(8)"13-Probability of failure to detect diseased animals"

609 'PRINT

620 PRINT TAB(8)"14-E N D  of this group of subprogrammes"

630 PRINT

631 PRINT"Note: These sampling methods do not consider the sensitivity of the tests. Its"

632 PRINT"value lower than 1 requires higher number of at random selected sampling units."

640 GOTO 670

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 14000

660 IF Z$="y" THEN 20 ELSE GOTO 14000

670 PRINT

690 INPUT"       Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 OR CH=14 THEN GOTO 700 ELSE GOTO 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.1-RANDOM NUMBERS FOR SELECTION OF REPRESENTATIVE ANIMALS/HERDS"

1010 PRINT"================================================================"

1090 PRINT"This subprogramme calculates random numbers for selection of:"

1091 PRINT TAB(5)"1) representative animals for health/disease investigations"

1092 PRINT TAB(5)"2) representative groups of animals and other units for cluster sampling"

1093 PRINT TAB(5)"   (samples of herds = cluster samples of animals, samples of areas ="

1094 PRINT TAB(5)"    = cluster samples of herds/farms, etc.)

1095 PRINT TAB(5)"3) representative units (areas, villages, ranches, farms or herds/flocks,"

1096 PRINT"          animals) for multistage sampling"

1097 INPUT"Enter choice number: ",CH

1098 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 1100 ELSE PRINT IDE$:GOTO 1980

1100 PRINT:PRINT"INPUT DATA:":PRINT

1102 IF CH=1 THEN GOTO 1120 ELSE 1130

1120 INPUT"     species, category(ies) "SP$,CA$:PRINT

1122 PRINT"     total number of sampling units to be selected"

1123 INPUT"                               using random numbers       ";N:PRINT

1126 INPUT"     range of random numbers (1-?)                        ";R

1127 IF N=0 OR R=0 THEN PRINT IDM$:GOTO 1980 ELSE 1200

1130 IF CH=2 THEN GOTO 1131 ELSE 1150

1131 INPUT"     groups of units for cluster sampling             ";H$

1133 INPUT"     sampling element measure units                   ";E$:PRINT

1135 PRINT"     number of sampling units to be selected"

1136 INPUT"                                using random numbers  ";N

1137 INPUT"     range of random numbers (1-?)                    ";R

1138 IF N=0 OR R=0 THEN PRINT IDM$:GOTO 1980 ELSE 1200

1150 IF CH=3 THEN GOTO 1151 ELSE 1200

1151 INPUT"      how many stages (up to 11 !) for multistage sampling    ";ST:PRINT

1152 IF ST=0 OR ST>11 THEN PRINT IDE$:GOTO 1980 ELSE 1155

1155 FOR I=1 TO ST

1156 PRINT" "; I;

1157 INPUT". stage sampling units                                  ";STU$(I)

1158 INPUT"           how many random numbers, range (1-?)             ";N(I),R(I)

1159 IF STU$(I)="" OR N(I)=0 OR R(I)=0 THEN GOTO 1161 ELSE 1160

1160 NEXT I:GOTO 1200

1161 PRINT IDM$:GOTO 1980

1200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1202 IF I$="m" THEN GOTO 10

1203 IF I$="c" THEN GOTO 1000

1204 IF I$=CHR$(13) THEN GOTO 1205

1205 IF CH=1 THEN GOTO 1206 ELSE 1207

1206 CLS:PRINT:PRINT"RESULT:":PRINT:PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:GOTO 1210

1207 IF CH=2 THEN GOTO 1208 ELSE 1250

1208 CLS:PRINT:PRINT"RESULT:":PRINT:PRINT"Groups of units: "H$;TAB(50)"Sample units: "E$

1210 IF CH=1 THEN PRINT:PRINT" Random numbers of sampling units:"ELSE 1211

1211 IF CH=2 THEN PRINT:PRINT" Random numbers of sampling units:"

1219 PRINT

1220 FOR X=1 TO N

1230 PRINT INT(RND(1)*R)+1;

1233 NEXT X

1241 PRINT

1249 PRINT:GOTO 1980

1250 CLS:PRINT"RESULTS:"

1255 FOR I=1 TO ST:PRINT

1256 PRINT TAB(6)I;". S T A G E:  "STU$(I)

1257 PRINT TAB(25)"Numbers of units to be selected: "N(I)

1258 PRINT TAB(25)"Range of random numbers: (1 -"R(I);")"

1259 PRINT"Random numbers:"

1260 FOR X=1 TO N(I)

1262 PRINT INT(RND(1)*R(I))+1;

1263 NEXT X

1264 PRINT

1265 NEXT I

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1982 IF R$="y" OR R$="n" THEN GOTO 1983 ELSE 1990

1983 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.2-SAMPLE SIZE FOR DETECTING THE PRESENCE OF A DISEASE IN A POPULATION"

2010 PRINT"======================================================================="

2011 PRINT"                                                             (Ref.: Cannon,Roe)"

2100 PRINT"INPUT DATA:"

2101 PRINT"(prevalence rate as a number between >0 and <1 !)"

2102 PRINT

2103 PRINT"Do you know total number of animals of the population,"

2104 INPUT"                                                   yes(y) or no(n) ";Z$

2105 IF Z$<>"y" AND Z$<>"n" THEN PRINT IDM$:GOTO 2980

2107 IF Z$="y" THEN GOTO 2110

2108 IF Z$="n" THEN GOTO 2112

2109 PRINT:GOTO 2105

2110 PRINT:INPUT"     total number of animals of the population                     ";N

2111 IF N=0 THEN PRINT IDM$:GOTO 2980 ELSE 2112

2112 PRINT:PRINT"     what is your best estimate of the prevalence rate"

2120 INPUT"                      of diseased animals in the given population  ";P

2121 IF P>1 THEN PRINT"Error ! Rate cannot be major than 1 !":GOTO 2980

2125 PRINT:PRINT"     how certain must you be that at least one case of the given"

2130 INPUT"     disease is detected - confidence level (0.9, 0.95, 0.99,etc.) ";A

2135 IF P=0 OR A=0 THEN PRINT IDM$:GOTO 2980

2140 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2141 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2142 IF I$="m" THEN GOTO 10

2143 IF I$="c" THEN GOTO 2000

2144 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT:PRINT"RESULT:":PRINT

2205 IF Z$="y" THEN GOTO 2210 ELSE 2255

2210 LET D=N*P

2220 LET Z=1/D

2230 LET X=(1-(1-A)^Z)

2240 LET Y=N-(D/2)

2250 LET T=X*Y+1:GOTO 2260

2255 LET T=LOG(1-A)/LOG(1-P)

2260 PRINT"  Minimal sample size (number of representative animals selected randomly)"

2270 PRINT:PRINT TAB(8)"required for detecting the presence of a given disease  = ";INT(T+.5)

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2983 ELSE 2990

2983 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.3-SAMPLE SIZE FOR ESTIMATING DISEASE PREVALENCE IN LARGE POPULATIONS"

3010 PRINT"======================================================================"

3015 PRINT"(binomial distribution - using standard error of estimated prevalence rate)"

3016 PRINT TAB(3)"                                                      (Ref.: Jenicek,Cleroux)"

3100 PRINT:PRINT"INPUT DATA:"

3105 PRINT"(prevalence rate as a number between >0 and <1 !):":PRINT

3109 INPUT"   have you(y) or not(n) any a priori idea about the prevalence rate ";R$

3110 IF R$<>"y" AND R$<>"n" THEN PRINT IDE$:GOTO 3980

3111 IF R$="y" THEN GOTO 3120

3112 IF R$="n" THEN GOTO 3140

3113 GOTO 3110

3120 PRINT

3130 INPUT"   what is your best estimate of the prevalence rate                 ";P

3131 IF P>1 THEN PRINT:PRINT"Error ! Rate cannot be major than 1 !":GOTO 3980

3140 PRINT:PRINT"   upper limit of standard error of estimated prevalence rate"

3141 PRINT"       (maximum difference between the true prevalence rate"

3142 INPUT"             and your sample prevalence rate that you can tolerate)  ";D

3145 PRINT

3146 IF R$="y" AND P=0 OR D=0 THEN PRINT IDM$:GOTO 3980

3147 IF R$="n" AND D=0 THEN PRINT IDM$:GOTO 3980

3150 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3151 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3152 IF I$="m" THEN GOTO 10

3153 IF I$="c" THEN GOTO 3000

3154 IF I$=CHR$(13) THEN GOTO 3200

3200 CLS:PRINT:PRINT"RESULT:":PRINT

3205 IF R$="y" THEN GOTO 3210 ELSE 3230

3210 PRINT"   Minimal sample size (number of representative animals selected randomly)"

3211 PRINT:PRINT TAB(11)"required for estimating disease prevalence rate";

3220 PRINT " =";INT((P*(1-P))/(D^2)+.5):GOTO 3980

3230 PRINT

3240 PRINT"   Minimal sample size (number of representative animals selected randomly)"

3241 PRINT:PRINT TAB(11)"required for estimating disease prevalence rate";

3250 PRINT " =";INT(1/(4*D^2)+.5)

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.4-SAMPLE SIZE FOR ESTIMATING DISEASE PREVALENCE USING CONFIDENCE INTERVAL"

4010 PRINT"==========================================================================="

4020 PRINT"(binomial distribution in an infinit population)         (Ref.: Jenicek,Cleroux)":PRINT

4030 REM:Segun Jenicek,M.,et Cleroux,R.(1982)p.138 (6.2.3.1 B)

4100 PRINT"INPUT DATA:"

4105 PRINT"(prevalence rate as a proportion, i.e. number between >0 and <1 !):":PRINT

4109 INPUT"   have you(y) or not(n) any a priori idea about the prevalence rate   ";R$

4110 IF R$<>"y" AND R$<>"n" THEN PRINT IDE$:GOTO 4980

4111 IF R$="y" THEN GOTO 4119

4112 IF R$="n" THEN GOTO 4123

4113 GOTO 4110

4119 PRINT:PRINT"   enter your best estimate of the prevalence rate"

4120 INPUT"    (supposed proportion of diseased animals in the given population) !  ",P

4121 IF P>1 THEN PRINT:PRINT"Error ! Rate cannot be major than 1 !":GOTO 4980

4123 PRINT:INPUT"   value of confidence interval for prevalence rate (proportion)       ";L

4130 PRINT:PRINT"   critical value of the confidence coefficient"

4131 INPUT"   (1.65 for 10% of error probability; 1.96 for 5%; 2.58 for 1%; etc.) ";Y

4132 IF R$="y" AND P=0 OR L=0 OR Y=0 THEN PRINT IDM$:GOTO 4980

4133 IF R$="n" AND L=0 OR Y=0 THEN PRINT IDM$:GOTO 4980

4150 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4151 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4152 IF I$="m" THEN GOTO 10

4153 IF I$="c" THEN GOTO 4000

4154 IF I$=CHR$(13) THEN GOTO 4200

4200 CLS:PRINT:PRINT"RESULT:":PRINT

4205 IF R$="y" THEN GOTO 4210 ELSE 4230

4210 PRINT TAB(6)"Minimal sample size required":PRINT

4211 PRINT TAB(6)"                    for estimating disease prevalence rate";

4220 PRINT " =";INT((4*(Y^2)*P*(1-P))/(L^2)+.5):GOTO 4980

4230 PRINT

4240 PRINT TAB(6)"Minimal sample size required":PRINT

4241 PRINT TAB(6)"                    for estimating disease prevalence rate";

4250 PRINT " =";INT((Y^2)/(L^2)+.5)

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.5-SAMPLE SIZE FOR ESTIMATING DISEASE PREVALENCE USING ABSOLUTE DIFFERENCE"

5010 PRINT"==========================================================================="

5020 PRINT"between estimated and true prevalence rate (binomial distribution)"

5025 PRINT TAB(3)"                                                       (Ref.: Jenicek,Cleroux)"

5030 REM:Segun Jenicek,M.,et Cleroux,R.(1982),p.136 (6.2.3.1 C)

5100 PRINT"INPUT DATA:"

5105 PRINT"(prevalence rate as a proportion, i.e. number between >0 and <1 !):":PRINT

5130 INPUT"   have you(y) or not(n) a priori idea about the prevalence rate      ";R$

5135 IF R$<>"y" AND R$<>"n" THEN PRINT IDE$:GOTO 5980

5140 IF R$="y" THEN GOTO 5145

5141 IF R$="n" THEN GOTO 5160

5142 GOTO 5130

5145 PRINT:PRINT"   enter your best estimate of the prevalence rate"

5150 INPUT"   (supposed proportion of diseased animals in the given population) !  ",P

5151 IF P>1 THEN PRINT:PRINT"Error ! Rate cannot be major than 1 !":GOTO 5980

5160 PRINT:PRINT"   tolerated difference between true and sample prevalence rates"

5161 INPUT"                      (level of precision required - tolerated error) ";C

5168 PRINT:PRINT"   how certain must you be that the difference between the true"

5169 PRINT"   and sample prevalence rate is <";USING"#.####";C

5170 PRINT"      i.e what is the critical value of the confidence coefficient"

5171 INPUT"   (1.65 for 10% error probability; 1.96 for 5%; 2.58 for 1%; etc.)   ";Y

5175 IF R$="y" AND P=0 OR C=0 OR Y=0 THEN PRINT IDM$:GOTO 5980

5176 IF R$="n" AND C=0 OR Y=0 THEN PRINT IDM$:GOTO 5980

5190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5192 IF I$="m" THEN GOTO 10

5193 IF I$="c" THEN GOTO 5000

5194 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT:PRINT"RESULT:":PRINT

5205 IF R$="y" THEN GOTO 5210 ELSE 5230

5210 PRINT:PRINT"     Minimal sample size required"

5211 PRINT:PRINT"                    for estimating disease prevalence rate";

5220 PRINT" =";INT(((Y^2)*P*(1-P))/(C^2)+.5):GOTO 5980

5230 REM:

5240 PRINT:PRINT"     Minimal sample size required"

5241 PRINT:PRINT"                    for estimating disease prevalence rate";

5250 PRINT" =";INT((Y^2)/(4*(C^2))+.5):PRINT

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.6-SAMPLE SIZE FOR ESTIMATING DISEASE PREVALENCE IN FINITE POPULATION"

6010 PRINT"======================================================================"

6015 PRINT"(binomial distribution)                     (Ref.: Jenicek,Cleroux; Cannon,Roe)"

6100 PRINT:PRINT"INPUT DATA:"

6102 PRINT"(prevalence rate as a proportion, i.e. number between >0 and <1 !):":PRINT

6105 INPUT"total number of animals of a given population                      ";N

6106 IF N=0 THEN PRINT IDM$:GOTO 6980 ELSE 6107

6107 PRINT

6108 INPUT"have you(y) or not(n) any a priori idea about the prevalence rate  ";R$

6110 IF R$<>"y" AND R$<>"n" THEN PRINT IDE$:GOTO 6980

6111 IF R$="y" OR R$="n" THEN GOTO 6113

6113 IF R$="y" THEN GOTO 6150 ELSE 6160

6150 PRINT:INPUT"estimated prevalence rate                                          ";P

6151 IF P=0 THEN PRINT IDM$:GOTO 6980 ELSE 6152

6152 IF P>1 THEN PRINT"Error ! Rate cannot be major than 1 !":GOTO 6980 ELSE 6160

6160 PRINT:PRINT"critical  value of the confidence coefficient"

6161 INPUT"(1.65 for 10% error probability; 1.96 for 5%; 2.58 for 1%; etc.)   ";Y

6162 PRINT

6170 PRINT"tolerated difference between estimated and true prevalence rates"

6171 INPUT"                 (level of precision required - tolerated error) ";C

6175 IF C=0 OR Y=0 THEN PRINT IDM$:GOTO 6980

6190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6192 IF I$="m" THEN GOTO 10

6193 IF I$="c" THEN GOTO 6000

6194 IF I$=CHR$(13) THEN GOTO 6200

6200 CLS:PRINT:PRINT"RESULT:":PRINT

6202 IF R$="y" THEN GOTO 6205 ELSE 6240

6205 A=((Y^2)*P*(1-P))/(C^2)

6206 B=1/A+1/N

6237 PRINT:PRINT"     Minimal sample size required ":PRINT

6238 PRINT"                         for estimating disease prevalence rate";

6239 PRINT" =";INT((1/B)+1+.5):GOTO 6980

6240 LET E=(Y^2)/(4*(C^2))

6242 LET D=1/E+1/N

6245 PRINT:PRINT"     Minimal sample size required":PRINT

6246 PRINT"                         for estimating disease prevalence rate";

6250 PRINT" =";INT((1/D)+1+.5)

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.7-SAMPLE SIZE FOR DETECTING DIFFERENCE BETWEEN TWO PREVALENCE RATES"

7010 PRINT"====================================================================="

7011 PRINT"(in large populations)                                     (Ref.: Putt et al.)"

7100 PRINT:PRINT"INPUT DATA:"

7105 PRINT"(prevalence rate as a proportion, i.e. number between >0 and <1 !):":PRINT

7110 INPUT"   estimated disease prevalence rate of the first population      ";P1

7115 INPUT"   estimated disease prevalence rate of the second population     ";P2

7120 IF P1=0 OR P2=0 THEN PRINT IDM$:GOTO 7980

7121 IF P1>1 OR P2>1 THEN PRINT"Error ! Rate cannot be major than 1 !":GOTO 7980

7122 IF P1=P2 THEN PRINT"Error ! Prevalence values must be different !":GOTO 7980

7123 PRINT

7130 PRINT"   critical value corresponding to statistical significance level"

7131 PRINT"   required ('two-sided' hypothesis: 1.65 for 10% of error"

7132 INPUT"               probability; 1.96 for 5%; 2.58 for 1%; etc.)       ";C1

7133 PRINT

7140 PRINT"   critical value corresponding to the chance we are willing"

7141 PRINT"   to accept of failing to detect a difference of this type"

7142 PRINT"   ('one-sided' hypothesis: 1.28 for 10% of error probability;"

7143 INPUT"                               1.64 for 5%; 2.33 for 1%; etc.)    ";C2

7175 IF C1=0 OR C2=0 THEN PRINT IDM$:GOTO 7980

7190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7192 IF I$="m" THEN GOTO 10

7193 IF I$="c" THEN GOTO 7000

7194 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT:PRINT"RESULT:":PRINT

7201 PRINT

7210 LET P=(P1+P2)/2

7220 LET A=2*P*(1-P)

7230 LET B=P1*(1-P1)+P2*(1-P2)

7240 LET C=(P2-P1)^2

7250 LET D=C1*SQR(A)

7260 LET E=C2*SQR(B)

7270 LET T=((D+E)^2)/C

7300 PRINT TAB(5)"For detecting the difference between two disease prevalence rates"

7301 PRINT:PRINT TAB(18)"minimal sample size of each population = "INT(T+.5);" animals"

7320 PRINT:PRINT TAB(39)"i.e. total sample = "INT(T+.5)*2;" animals":PRINT

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.8-SAMPLE SIZE FOR ESTIMATING MEAN OF EPI. PHENOMENA - I."

8010 PRINT"=========================================================="

8011 PRINT"                                                           (Ref.: Yamane Taro)"

8080 PRINT TAB(2)"This subprogramme calculates sample size in large (infinite) population using:"

8082 PRINT TAB(5)"1) standard deviation of the distribution in population, sampling error"

8083 PRINT TAB(9)" and critical value of confidence coefficient"

8084 PRINT TAB(5)"2) coefficient of variation (dispersion), tolerated deviation of sample"

8085 PRINT TAB(9)" mean and critical value of confidence coefficient":PRINT

8090 INPUT" Enter choice number: ",CH

8091 IF CH=1 OR CH=2 THEN GOTO 8100 ELSE PRINT IDE$:GOTO 8980

8100 PRINT:PRINT"INPUT DATA:":PRINT

8106 IF CH=1 THEN GOTO 8109

8107 IF CH=2 THEN GOTO 8115

8108 GOTO 8090

8109 INPUT"   estimated standard (average) deviation of the population mean     ";B

8112 PRINT:PRINT"   required precision - tolerated sampling error -"

8113 INPUT"           deviation of the sample mean in  a b s o l u t e  term    ";D:PRINT

8114 IF B=0 OR D=0 THEN PRINT IDM$:GOTO 8980 ELSE 8119

8115 INPUT"   coefficient of variation                                          ";C:PRINT

8116 IF C=0 THEN PRINT IDM$:GOTO 8980 ELSE 8117

8117 PRINT"   allowable deviation of sample mean"

8118 INPUT"                    (in terms of p r o p o r t i o n  of average)    ";D:PRINT

8119 PRINT"   reliability - critical value of confidence coefficient"

8120 INPUT"   (1.65 for 90% confidence level; 1.96 for 95%; 2.58 for 99%; etc.) ";Z

8122 IF D=0 OR Z=0 THEN PRINT IDM$:GOTO 8980 ELSE 8190

8190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8192 IF I$="m" THEN GOTO 10

8193 IF I$="c" THEN GOTO 8000

8194 IF I$=CHR$(13) THEN GOTO 8300

8300 CLS:PRINT:PRINT:PRINT"RESULT:":PRINT

8607 PRINT

8700 PRINT"     Minimal sample size required ":PRINT

8701 PRINT"                                for estimating population mean";

8702 IF CH=1 THEN GOTO 8704 ELSE 8725

8704 LET T=((Z*B)^2/D^2):PRINT" = "INT(T+.5):GOTO 8980

8725 LET T=(Z*C)^2/D^2

8730 PRINT" = "INT(T+.5)

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or not(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.9-SAMPLE SIZE FOR ESTIMATING MEAN OF EPI. PHENOMENA - II."

9005 PRINT"==========================================================="

9006 PRINT"                                                           (Ref.: Yamane Taro)"

9010 PRINT TAB(2)"This subprogramme calculates sample size using absolute difference"

9011 PRINT" between sample and true mean, confidence coefficient and sample"

9012 PRINT" standard deviation"

9013 PRINT TAB(7)"1) when population size is known"

9014 PRINT TAB(7)"2) when population size is unknown"

9016 INPUT" Enter choice number: ",CH

9017 IF CH=1 OR CH=2 THEN GOTO 9200 ELSE PRINT IDE$:GOTO 9980

9200 PRINT"INPUT DATA:":PRINT

9201 IF CH=1 THEN GOTO 9205 ELSE 9210

9205 INPUT"    total number of animals of the given population                 ";N:PRINT

9206 IF N=0 THEN PRINT IDM$:GOTO 9980 ELSE 9210

9210 PRINT"    maximal tolerated absolute difference between "

9211 INPUT"                               the sample mean and the true mean    ";C:PRINT

9213 INPUT"    maximum tolerated sample  standard deviation                    ";B:PRINT

9220 PRINT"    critical value of confidence coefficient (1.65 for 10% of error"

9221 INPUT"                       probability; 1.96 for 5%; 2.58 for 1%; etc.) ";Y

9275 IF C=0 OR B=0 OR Y=0 THEN PRINT IDM$:GOTO 9980

9290 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9291 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9292 IF I$="m" THEN GOTO 10

9293 IF I$="c" THEN GOTO 9000

9294 IF I$=CHR$(13) THEN GOTO 9300

9300 CLS:PRINT:PRINT"RESULT:":PRINT:PRINT

9310 IF CH=2 THEN GOTO 9320 ELSE 9350

9320 T=((Y^2)*(B^2))/C^2:GOTO 9370

9350 T=(N*Y^2*B^2)/(N*C^2+Y^2*B^2)

9370 PRINT"     Minimal sample size required":PRINT

9371 PRINT"                         for estimating the population mean";

9380 PRINT" = ";INT(T+.5)

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.10-SAMPLE SIZE FOR DETECTING DIFFERENCE BETWEEN TWO MEANS"

10030 PRINT"==========================================================="

10070 PRINT TAB(56)"(Ref.: Kubankova, Hendl)"

10080 REM: If N1=N2 with normal distribution of variables

10090 PRINT TAB(2)"This subprogramme calculates sample size for detecting difference between"

10091 PRINT TAB(2)"two means (if the size and variance of both populations are the same):"

10092 PRINT TAB(5)"1) between two independent samples (populations)"

10093 PRINT TAB(5)"2) between two dependent samples (populations)"

10095 INPUT" Enter choice number: ",CH

10096 IF CH=1 OR CH=2 THEN GOTO 10100 ELSE PRINT IDE$:GOTO 10980

10100 PRINT"INPUT DATA:"

10105 INPUT"  means difference - precision in relative term (>0 - 1 !)        ";D

10106 IF D>1 THEN PRINT"Error ! The value must be in relative term !":GOTO 10980 ELSE 10107

10107 PRINT"  critical value corresponding to statistical significance"

10108 PRINT"  level required:"

10109 PRINT"     ('one-sided' hypothesis: 1.28 for 10% of error probability;"

10110 PRINT"     1.64 for 5%; 2.33 for 1%; etc.)     or"

10111 PRINT"     ('two-sided' hypothesis: 1.65 for 10% of error probability;"

10112 INPUT"     1.96 for 5%; 2.58 for 1%; etc.)                               ";U1

10116 PRINT"  critical value corresponding to the chance we are willing"

10118 PRINT"     to accept of failing to detect a difference of this type"

10120 PRINT"     ('one-sided' hypothesis: 1.28 for 10% of error probability;"

10121 PRINT"     1.64 for 5%; 2.33 for 1%; etc.)     or"

10124 PRINT"     ('two-sided' hypothesis: 1.65 for 10% of error probability;"

10126 INPUT"     1.96 for 5%; 2.58 for 1%; etc.)                               ";U2

10130 INPUT"  population variance (square of standard deviation)               ";SIG

10175 IF D=0 OR U1=0 OR U2=0 OR SIG=0 THEN PRINT IDM$:GOTO 10980

10190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10192 IF I$="m" THEN GOTO 10

10193 IF I$="c" THEN GOTO 10000

10194 IF I$=CHR$(13) THEN GOTO 10200

10200 CLS:PRINT:PRINT"RESULT:":PRINT

10201 PRINT

10210 LET A=(U1+U2)^2

10211 LET B=SIG/D^2

10220 IF CH=1 THEN GOTO 10221 ELSE 10230

10221 PRINT"   For detecting the difference between two populations means":PRINT

10222 PRINT"             minimal sample size of each population = "INT(2*(A*B)+.5);" animals"

10223 PRINT

10224 PRINT"                             i.e. total sample size = "2*INT(2*(A*B)+.5);" animals"

10225 GOTO 10980

10230 PRINT"For detecting the difference between two populations means":PRINT

10232 PRINT"             minimal sample size of each population = "INT(A*B+.5);" animals"

10233 PRINT

10234 PRINT"                             i.e. total sample size = "2*INT(A*B+.5);" animals"

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";Z$

10982 IF Z$="y" OR Z$="n" THEN GOTO 10983 ELSE 10990

10983 IF Z$="y"THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.11-STRATIFIED SAMPLING FOR POPULATION HEALTH INVESTIGATIONS"

11010 PRINT"============================================================="

11100 PRINT"INPUT DATA:"

11105 INPUT"     investigation ";INV$

11106 INPUT"     place, time ";PL$,TI$

11107 PRINT"Do you know sample size in absolute  n u m b e r  of representative "

11109 INPUT"animals (a) or sample size  p e r c e n t a g e  of a given population (p) ";R$

11112 IF R$="a" THEN GOTO 11120

11113 IF R$="p" THEN GOTO 11115

11114 IF R$<>"a" OR R$<>"p" THEN PRINT IDE$:GOTO 11980

11115 INPUT"     percentage of representative animals to be investigated        ";PE

11116 IF PE=0 THEN PRINT IDM$:GOTO 11980 ELSE 11130

11117 REM:N=(NA*PE)/100

11120 PRINT"     sample size - number of animals (to be selected randomly)"

11121 INPUT"                                   representing a given population  ";N

11122 IF N=0 THEN PRINT IDM$:GOTO 11980 ELSE 11130

11130 INPUT"     number (2 up to 11 !) of subpopulations (strata)               ";S

11131 IF S>11 OR S=<1 THEN PRINT IDE$:GOTO 11980 ELSE 11135

11135 REM:DIM Y$(S),X(S)

11140 PRINT:PRINT TAB(8)"   List data (name of subpopulation up to 15 characters):"

11150 FOR I=1 TO S

11155 PRINT TAB(3)I;" subpopulation, number of animals ";

11160 INPUT Y$(I),X(I)

11165 IF Y$(I)="" OR X(I)=0 THEN PRINT IDM$:GOTO 11980 ELSE 11170

11170 NEXT I

11200 X=0

11210 FOR I=1 TO S

11220 X=X+X(I)

11230 NEXT I

11235 IF X<N AND R$="a" THEN GOTO 11236 ELSE 11240

11236 PRINT"Number of total animals must be major than the number of representative"

11237 PRINT"                                                                   animals !":GOTO 11980

11240 PRINT

11241 MAX=X(1)

11242 FOR I=2 TO S

11243 IF X(I)>MAX THEN MAX=X(I)

11244 NEXT I

11300 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11301 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11302 IF I$="m" THEN GOTO 10

11303 IF I$="c" THEN GOTO 11000

11304 IF I$=CHR$(13) THEN GOTO 11305

11305 CLS:PRINT TAB(6)"STRATIFIED  SAMPLING  IN  EPIZOOTIOLOGICAL  INVESTIGATIONS":PRINT

11306 PRINT TAB(6)"Investigation: "INV$

11307 PRINT"Place: "PL$;TAB(50)"Time: "TI$

11308 IF R$="p" THEN PRINT TAB(6)"Percentage of animals to be investigated: ";USING"###.####";PE

11310 PRINT:PRINT TAB(6)"Subpopulation";TAB(26)"Number   of   animals ";

11311 PRINT TAB(51)"Proportion";TAB(63)"Percentage"

11312 PRINT TAB(8)"(stratum)";TAB(26)"---------------------"

11320 PRINT TAB(26)"total";TAB(40)"sampled"

11330 PRINT

11335 IF R$="a" THEN GOTO 11340 ELSE 11350

11340 FOR I=1 TO S

11341 PRINT I;TAB(7)USING"\             \";Y$(I);

11342 PRINT TAB(25)X(I);TAB(40)INT((N*X(I)/X)+.5);

11343 PRINT TAB(52)USING"#.####";X(I)/X;

11344 PRINT TAB(64)USING"###.####";(X(I)/X)*100

11346 NEXT I:GOTO 11370

11350 FOR I=1 TO S

11351 PRINT I;TAB(7)USING"\             \";Y$(I);

11353 PRINT TAB(25)X(I);TAB(40)INT(((X(I)*PE)/100)+.5);

11355 PRINT TAB(52)USING"#.####";X(I)/X;

11356 PRINT TAB(64)USING"###.####";(X(I)/X)*100

11360 NEXT I

11370 PRINT

11380 IF R$="p" THEN PRINT TAB(7)"T o t a l";TAB(25)X;TAB(40)INT((X*PE/100)+.5);TAB(52)"1.0000";TAB(64)"100.0000":PRINT

11381 IF R$="a" THEN PRINT TAB(7)"T o t a l";TAB(25)X;TAB(40)INT(N+.5);TAB(52)"1.0000";TAB(64)"100.0000":PRINT

11385 D$="Stratum"

11386 IF R$="p" THEN N=INT(X*PE/100)

11390 REM:ERASE Y$,X

11400 A$=INKEY$:IF A$="" THEN GOTO 11400

11410 CLS:PRINT:PRINT TAB(9)"PERCENTAGE  S T R U C T U R E  OF  S A M P L E D   A N I M A L S"

11411 IF MAX>(X/2) THEN GOTO 11412 ELSE 11440

11412 IF R$="a" THEN PRINT:PRINT TAB(19)"(";CHR$(223);" represents 2 % of total "INT(N+.5)  MU$;")":PRINT

11414 IF R$="p" THEN PRINT:PRINT TAB(19)"(";CHR$(223);" represents 2 % of total "INT((X*PE/100)+.5)  MU$;")":PRINT

11416 PRINT:PRINT TAB(3)D$;TAB(25)"0        20        40        60        80        100 %"

11418 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11419 FOR I=1 TO S

11420 Z=X(I)/X*50

11421 IF Z<1 THEN GOTO 11422 ELSE 11425

11422 IF Z>0 THEN GOTO 11423 ELSE 11425

11423 PRINT TAB(3)USING"\             \";Y$(I);

11424 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 11433

11425 PRINT TAB(3)USING"\             \";Y$(I);

11426 PRINT TAB(25)CHR$(179);

11427 FOR K=1 TO X(I)/X*50

11428 PRINT CHR$(223);

11430 NEXT K

11433 NEXT I:GOTO 11980

11440 IF R$="a" THEN PRINT:PRINT TAB(19)"(";CHR$(223);" represents 1 % of total "INT(N+.5)  MU$;")":PRINT

11441 IF R$="p" THEN PRINT:PRINT TAB(19)"(";CHR$(223);" represents 1 % of total "INT((X*PE/100)+.5)  MU$;")":PRINT

11446 PRINT:PRINT TAB(3)D$;TAB(25)"0        10        20        30        40        50 %"

11448 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11449 FOR I=1 TO S

11450 Z=X(I)/X*100

11451 IF Z<1 THEN GOTO 11452 ELSE 11455

11452 IF Z>0 THEN GOTO 11453 ELSE 11455

11453 PRINT TAB(3)USING"\             \";Y$(I);

11454 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 11463

11455 PRINT TAB(3)USING"\             \";Y$(I);

11456 PRINT TAB(25)CHR$(179);

11457 FOR K=1 TO X(I)/X*100

11458 PRINT CHR$(223);

11460 NEXT K

11463 NEXT I

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11981 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11982 IF R$="y" OR R$="n" THEN GOTO 11983 ELSE 11990

11983 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.12-ESTIMATING DISEASE PREVALENCE FROM SIMPLE AND CLUSTER RANDOM SAMPLES"

12005 PRINT"========================================================================="

12030 PRINT"This subprogramme calculates the estimation from:           (Ref.: Putt et al.)"

12052 PRINT"     1) simple random sample    2) cluster random sample":REM:Putt - str.53-55

12055 INPUT"     Enter choice number: ",CH

12056 IF CH=1 OR CH=2 THEN GOTO 12060 ELSE PRINT IDE$:GOTO 12980

12060 IF CH=1 THEN GOTO 12090

12062 IF CH=2 THEN GOTO 12200

12063 GOTO 12055

12090 PRINT:PRINT"INPUT DATA:":PRINT

12091 INPUT"     disease/form ";D$

12092 INPUT"     species, category(ies) ";S$,C$

12093 INPUT"     type of prevalence ";TP$

12094 INPUT"     place, time ";P$,T$:PRINT

12095 INPUT"     random sample size - number  of selected animals                ";NM:PRINT

12096 PRINT"     sampling fraction in form of a proportion

12097 PRINT"           (number between >0 and 1 !)"

12098 INPUT"                of selected animals  from the total population       ";F:PRINT

12099 IF F>1 THEN PRINT"Error ! Fraction cannot be major than 1 !":GOTO 12980 ELSE 12100

12100 INPUT"     number of diseased animals in the sample                        ";E

12101 'IF E>NM THEN PRINT"Error ! Diseased animals cannot be more than all animals in the sample !:GOTO 12980 ELSE 12102

12102 IF NM=0 OR F=0 OR E=0 THEN PRINT IDM$:GOTO 12980

12109 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12110 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

12111 IF I$="m" THEN GOTO 10

12112 IF I$="c" THEN GOTO 12000

12113 IF I$=CHR$(13) THEN GOTO 12114

12114 CLS:PRINT:PRINT TAB(10)"ESTIMATING DISEASE PREVALENCE FROM SIMPLE RANDOM SAMPLE":PRINT:

12115 PRINT TAB(10)"Disease: "D$

12117 PRINT"Species: "S$;TAB(40)"Category(ies): "C$

12118 PRINT TAB(10)"Type of prevalence: "TP$

12119 PRINT"Place: "P$;TAB(50)"Time: "T$:PRINT

12120 PRINT:LET P=E/NM

12121 LET A=(1-F)*P*(1-P)/NM

12122 LET ES=SQR(A)

12123 PRINT"     Prevalence of diseased animals in the sample  =  "USING"#.####";P;

12124 PRINT"  =";USING"####.## %";P*100:PRINT

12126 PRINT"     Standard error of the sample prevalence       =  "USING"#.####";ES;

12128 PRINT"  =";USING"####.## %";ES*100

12130 PRINT

12132 PRINT:PRINT"     Estimated true prevalence in total population  at:"

12134 PRINT

12136 B=(P-1.64*ES)*100

12138 C=(P+1.64*ES)*100

12140 PRINT"     90% confidence interval lies between";USING"####.## %";B;

12142 PRINT"   and ";USING"####.## %";C

12144 REM

12146 D=(P-1.96*ES)*100

12148 G=(P+1.96*ES)*100

12150 PRINT"     95% confidence interval lies between";USING"####.## %";D;

12152 PRINT"   and ";USING"####.## %";G

12154 REM

12156 H=(P-2.58*ES)*100

12158 I=(P+2.58*ES)*100

12160 PRINT"     99% confidence interval lies between";USING"####.## %";H;

12162 PRINT"   and ";USING"####.## %";I

12170 PRINT:PRINT"     ( The 95 % confidence limit  = "USING"####.####";P*100;

12171 PRINT"   +- ";USING"####.####";(1.96*ES)*100;

12172 PRINT" % )"

12190 PRINT:GOTO 12980

12200 PRINT"INPUT DATA:"

12205 INPUT"     disease ";D$

12206 INPUT"     species, category(ies) ";S$,C$

12207 INPUT"     place, time ";P$,T$

12208 INPUT"     definition of clusters (groups, herds, flocks, farms, etc.) ";CL$

12210 INPUT"     total number of clusters   ";T

12211 IF T=0 THEN GOTO 12273 ELSE 12220

12220 INPUT"     number (from 2 up to 11 !) of clusters randomly selected       ";M

12221 IF M<2 OR M>11 THEN PRINT:PRINT IDE$:GOTO 12980

12250 FOR I=1 TO M

12260 PRINT"     number of animals: total, diseased in";

12265 PRINT" cluster ";I;" ";

12270 INPUT H(I),J(I)

12271 IF H(I)=0 OR J(I)=0 THEN GOTO 12273 ELSE 12272

12272 NEXT I:GOTO 12281

12273 PRINT:PRINT IDM$:GOTO 12980

12281 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12282 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

12283 IF I$="m" THEN GOTO 10

12284 IF I$="c" THEN GOTO 12000

12285 IF I$=CHR$(13) THEN GOTO 12290

12290 E=0:N=0

12291 FOR I=1 TO M

12292 E=E+J(I)

12293 NEXT I

12295 FOR I=1 TO M

12296 N=N+H(I)

12297 NEXT I

12300 LET P=E/N

12301 LET R=P^2

12310 LET F=M/T

12320 H=0:J=0:HC=0

12330 FOR I=1 TO M

12340 H=H+H(I)^2

12350 NEXT I

12360 FOR I=1 TO M

12370 HC=HC+(H(I)*J(I))

12380 NEXT I

12390 FOR I=1 TO M

12400 J=J+J(I)^2

12410 NEXT I

12415 Y=R*H

12416 Z=2*P*HC

12420 LET W=Y-Z+J

12421 LET S=((1-F)*W)/(M*(M-1))

12425 LET Q=SQR(S)

12426 CLS:PRINT TAB(10)"ESTIMATING DISEASE PREVALENCE FROM CLUSTER RANDOM SAMPLE":PRINT

12427 PRINT TAB(10)"Disease: "D$

12428 PRINT"Species: "S$;TAB(40)"Category(ies): "C$

12429 PRINT"Place: "P$;TAB(50)"Time: "T$

12430 PRINT TAB(10)"Clusters: "CL$

12431 PRINT TAB(10)"Total number of animals in selected clusters      = "N

12432 PRINT TAB(10)"Number of diseased animals in selected clusters   = "E:PRINT

12433 PRINT:PRINT"     Prevalence of diseased animals in the sample  = "USING"#.####";E/N;

12434 PRINT"  =";USING"####.## %";E/N*100

12436 PRINT

12438 LET ES=M/N*Q

12440 PRINT:PRINT"     Standard error of sample prevalence           = "USING"#.####";ES;

12441 PRINT"  =";USING"####.## %";ES*100

12442 PRINT

12443 PRINT:PRINT"     Estimated true prevalence in total population at:"

12444 PRINT

12446 LET B=(E/N-1.64*ES)*100

12448 LET K=(E/N+1.64*ES)*100

12450 PRINT"     90 % confidence interval lies between  ";USING"####.## %";B;

12452 PRINT"   and ";USING"####.## %";K

12454 REM

12456 LET L=(E/N-1.96*ES)*100

12458 LET O=(E/N+1.96*ES)*100

12460 PRINT"     95 % confidence interval lies between  ";USING"####.## %";L;

12462 PRINT"   and ";USING"####.## %";O

12464 REM:

12466 LET V=(E/N-2.58*ES)*100

12467 LET Z=(E/N+2.58*ES)*100

12468 PRINT"     99 % confidence interval lies between  ";USING"####.## %";V;

12469 PRINT"   and ";USING"####.## %";Z

12470 PRINT:PRINT"        ( The 95 % confidence limit  = "USING"####.####";E/N*100;

12471 PRINT"   +- ";USING"####.####";(1.96*ES)*100;

12472 PRINT" % )"

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12981 CLS:H=0:J=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12982 IF R$="y" OR R$="n" THEN GOTO 12983 ELSE 12999

12983 IF R$="y" THEN GOTO 12000 ELSE 12999

12995 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

12999 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"8.13-PROBABILITY OF FAILURE TO DETECT DISEASED ANIMALS"

13010 PRINT"==================================================== Ref.: Cannon, Roe; adapted"

13020 PRINT"This subprogramme calculates probability of failure to detect diseased animals"

13021 PRINT"from an 'i n f i n i t e' population with the specific proportion of positives."

13023 PRINT"     1) calculation"

13024 PRINT"     2) prefixed data in form of a table"

13025 INPUT"Enter choice number: ",CH

13027 IF CH=1 OR CH=2 THEN GOTO 13028 ELSE PRINT IDE$:GOTO 13980

13028 IF CH=1 THEN GOTO 13030 ELSE 13220

13030 PRINT"INPUT DATA:"

13035 INPUT"type of test ";D$

13036 INPUT"test sensitivity grade (in form of a proportion, i.e. >0<=1)        ";S

13199 INPUT"prevalence rate of positives (in form of a proportion, i.e. >0<1)   ";P

13040 INPUT"number of samples  ";N

13041 IF P=0 OR S=0 OR N=O OR P>1 OR S>1 THEN PRINT IDE$:GOTO 13980

13200 PRINT:PRINT"RESULT:":PRINT

13205 PRINT"Type of test: "D$:PRINT

13210 PRINT"     Probability of failure to detect diseased animals  ":PRINT

13211 PRINT"               a) without considering the test sensitivity    =  ";

13212 PRINT USING"#.#####";(1-P)^N:PRINT

13213 PRINT"               b) after the correction by test sensitivity    =  ";

13214 F=((1-P)^N)/S: IF F>1 THEN F=1.000

13215 PRINT USING"#.#####";F

13218 GOTO 13980

13220 CLS:PRINT:PRINT"TABLE - PROBABILITY OF FAILURE TO DETECT DISEASED ANIMALS"

13225 PRINT"(Theoretical data for test sensitivity of ideal value = 1.)"

13230 PRINT"-----------------------------------------------------------------------------"

13240 PRINT"Preva-    number   of   a n i m a l s   in   sample   t e s t e d"

13242 PRINT"lence %   5     10     25     50     75     100    200    250   500    1000"

13245 PRINT"-----------------------------------------------------------------------------"

13250 PRINT"  1     0.951  0.904  0.778  0.605  0.471  0.366  0.134  0.081  0.007  0.000"

13260 PRINT"  2     0.904  0.817  0.603  0.364  0.220  0.133  0.018  0.006  0.000"

13270 PRINT"  3     0.859  0.737  0.467  0.218  0.102  0.048  0.002  0.000"

13280 PRINT"  4     0.815  0.665  0.360  0.130  0.047  0.017  0.000"

13290 PRINT"  5     0.774  0.599  0.277  0.077  0.021  0.006  0.000"

13300 PRINT"  6     0.734  0.539  0.213  0.045  0.010  0.002  0.000"

13310 PRINT"  7     0.696  0.484  0.163  0.027  0.004  0.001  0.000"

13320 PRINT"  8     0.659  0.434  0.124  0.015  0.002  0.000"

13330 PRINT"  9     0.624  0.389  0.095  0.009  0.001  0.000"

13340 PRINT" 10     0.590  0.349  0.072  0.005  0.000"

13345 PRINT" 15     0.444  0.197  0.017  0.000"

13350 PRINT" 20     0.328  0.107  0.004  0.000"

13355 PRINT" 25     0.237  0.056  0.001  0.000"

13360 PRINT" 30     0.168  0.028  0.000"

13370 PRINT" 40     0.078  0.006  0.000"

13380 PRINT" 50     0.031  0.001  0.000"

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

13982 IF R$="y" OR R$="n" THEN GOTO 13983 ELSE 13990

13983 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

14000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

14002 IF Z$="y" OR Z$="n" THEN GOTO 14010 ELSE 14030

14010 IF Z$="y" THEN GOTO 14020 ELSE 14030

14020 RUN"EPIZ40MM.KOU"

14030 SYSTEM

 

 

         9-Selected aspects of animal population health programmes

 

5 ON ERROR GOTO 11996

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4009.KOU":REM:16/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"9-SELECTED ASPECTS OF ANIMAL POPULATION HEALTH PROGRAMMES"

40 PRINT TAB(10)"========================================================="

100 PRINT

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(10)"1-Selection of priority diseases for animal health programmes"

520 PRINT TAB(10)"2-Simple model of morbidity/nidality changes' prognosis"

530 PRINT TAB(10)"3-Planning/prognosis of morbidity reduction (in linear form)"

540 PRINT TAB(10)"4-Planning/prognosis of morbidity reduction (in curve form)"

550 PRINT TAB(10)"5-Planning/prognosis of animal population specific health recovery"

560 PRINT TAB(10)"6-Animal population health/disease mass actions (incl.vaccinations)"

570 PRINT TAB(10)"7-'Critical path' method in animal population health planning"

580 PRINT TAB(10)"8-Distribution of animal population health programme inputs"

590 PRINT TAB(10)"9-Animal population health programme/measures' coverage"

600 PRINT TAB(10)"10-Planning/prognosis of reducing nidality, mortality and losses"

605 PRINT TAB(10)"11-Planning/prognosis of expanding specific disease free territory"

609 PRINT

610 PRINT TAB(10)"12-E N D  of this group of subprogrammes"

630 PRINT:PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 12000

660 IF Z$="y" THEN 20 ELSE GOTO 12000

670 PRINT

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.1-SELECTION OF PRIORITY DISEASES FOR ANIMAL HEALTH PROGRAMMES"

1010 PRINT"==============================================================="

1020 PRINT"Assessment of eligibility according to disease importance, solution feasibility"

1021 PRINT"and inputs availability in a given territory and period after analysing"

1022 PRINT"all substantial factors influencing strategy/measures practicability"

1023 PRINT"and probability of success of time-bounded programmes."

1025 REM:Local priorities are complemented by national and international ones.

1100 PRINT"INPUT DATA:"

1121 INPUT"     place, time ";LU$,TI$

1129 N$="":B=0:G=0:Z=0:S=0:F=0:D=0

1130 DIM N$(30),B(30),G(30),Z(30),S(30),F(30),D(30)

1133 INPUT"     Number (2 up to 15 !) of diseases in consideration ";N

1134 IF N=0 OR N=1 THEN PRINT IDE$:GOTO 1970 ELSE 1136

1136 IF N>15 THEN GOTO 1137 ELSE 1138

1137 PRINT"More than 15 diseases ! New input !":GOTO 1133

1138 IF N>4 THEN PRINT:CLS

1139 PRINT"The scales consist of  g r a d e s   from >0 (major than 0) to 10 !"

1140 PRINT"All questions must be answered !"

1149 FOR I=1 TO N

1150 PRINT" disease No.";I;":";

1155 INPUT" name (up to 15 characters):      "N$(I)

1156 IF N$(I)="" THEN PRINT IDM$:GOTO 1970 ELSE 1160

1160 INPUT"grades of biological, economic, public health, social importance ";B(I),G(I),Z(I),S(I)

1170 INPUT"grades of technical (solution) feasibility, inputs availability  ";F(I),D(I)

1172 IF B(I)>10 OR G(I)>10 OR Z(I)>10 OR S(I)>10 OR F(I)>10 OR D(I)>10 THEN GOTO 1173 ELSE 1180

1173 PRINT"Error ! Grade values must be between >0 and 10 !":GOTO 1970

1180 NEXT I

1200 CLS:PRINT:PRINT"     Values of importance multiplier coefficients are fixed as follows:"

1210 PRINT:PRINT TAB(15)"biological    = 2"

1211 PRINT TAB(15)"economic      = 4"

1212 PRINT TAB(15)"public health = 6"

1213 PRINT TAB(15)"social        = 2":PRINT

1220 INPUT"     Do you accept these values (y) or you will use other ones (o)";R$

1230 IF R$="y" THEN GOTO 1250

1231 IF R$="o" THEN GOTO 1300

1232 GOTO 1250

1250 LET IGB=2:LET IGE=4:LET IGZ=4:LET IGS=2:GOTO 1400

1300 PRINT:PRINT"     Define other values (1 up to 10 !) of importance multiplier coefficients:"

1310 PRINT:INPUT"              biological    ";IGB

1311 INPUT"              economic      ";IGE

1312 INPUT"              public health ";IGZ

1313 INPUT"              social        ";IGS

1314 IF (IGB+IGE+IGZ+IGS)=0 THEN PRINT IDM$:GOTO 1970

1400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1402 IF I$="m" THEN GOTO 10

1403 IF I$="c" THEN GOTO 1000

1404 IF I$=CHR$(13) THEN GOTO 1405

1405 CLS:PRINT"      SELECTION OF PRIORITY DISEASES FOR ANIMAL HEALTH PROGRAMMES":PRINT

1410 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT

1420 PRINT TAB(2)"Disease(s)";TAB(20)"I m p o r t a n c e  Grades";TAB(50)"Grades    of";

1422 PRINT TAB(20)"---------------------------";TAB(50)"------------"

1423 PRINT TAB(20)"biol.";TAB(27)"eco.";TAB(34)"public";TAB(41)"social";

1424 PRINT TAB(50)"feasi-";TAB(57)"input";TAB(65)"T O T A L"

1425 PRINT TAB(34)"health";TAB(50)"bility";TAB(57)"avai-";TAB(65)"points"

1426 PRINT TAB(9)"--------------------------------------";TAB(57)"labi-"

1427 PRINT TAB(9)"Multiplier";TAB(20)"*"IGB;TAB(27)"*"IGE;TAB(34)"*"IGZ;TAB(41)"*"IGS;

1428 PRINT TAB(57)"lity"

1429 PRINT TAB(2)"------------------------------------------------------------------------"

1430 FOR I=1 TO N

1431 SU(I)=B(I)*IGB+G(I)*IGE+Z(I)*IGZ+S(I)*IGS

1440 RES(I)=SU(I)*F(I)*D(I)

1450 REM:PRINT TAB(3)I;TAB(10)N$(I);TAB(45)SU(I);TAB(60)RES(I)

1451 PRINT TAB(2)USING"\             \";N$(I);

1452 PRINT TAB(20)"+"INT(B(I));TAB(27)"+"INT(G(I));TAB(34)"+"INT(Z(I));TAB(41)"+"INT(S(I));

1453 PRINT TAB(50)"*"INT(F(I));TAB(57)"*"INT(D(I));TAB(65)INT(RES(I))

1460 NEXT I

1470 A$=INKEY$:IF A$="" THEN GOTO 1470

1471 T=0

1472 FOR I=1 TO N

1473 T=T+RES(I)

1474 NEXT I

1481 CLS:PRINT TAB(10)"Disease(s)";TAB(30)"Proportion";TAB(50)"Percentage"

1482 PRINT:PRINT TAB(28)"of the total";INT(T);" allocated points"

1483 PRINT:PRINT

1484 FOR I=1 TO N

1485 PRINT TAB(10)USING"\             \";N$(I);

1486 PRINT TAB(31)USING"#.####";RES(I)/T;

1487 PRINT TAB(50)USING"###.####";RES(I)/T*100

1488 NEXT I

1489 PRINT:PRINT TAB(10)"T o t a l";TAB(31)"1.0000";TAB(50)"100.0000":PRINT

1500 A$=INKEY$:IF A$="" THEN GOTO 1500

1501 CLS:PRINT TAB(10)"SELECTION OF PRIORITY DISEASES FOR ANIMAL HEALTH PROGRAMMES"

1502 PRINT

1505 PRINT TAB(13)"(";CHR$(223);" represents 2 % of total"INT(T);"allocated points)"

1506 PRINT:PRINT

1507 PRINT TAB(5)"D i s e a s e (s)";TAB(25)"0         20        40        60        80       100 %"

1508 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

1510 FOR I=1 TO N

1512 Z=(RES(I)/T)*50

1513 IF Z<1 THEN GOTO 1514 ELSE 1520

1514 IF Z>0 THEN GOTO 1515 ELSE 1520

1515 PRINT TAB(5)USING"\             \";N$(I);

1516 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 1525

1520 PRINT TAB(5)USING"\             \";N$(I);

1521 PRINT TAB(25)CHR$(179);

1522 FOR K=1 TO Z

1523 PRINT CHR$(223);

1524 NEXT K

1525 NEXT I

1970 ERASE N$,B,G,Z,S,F,D

1971 N$="":B=0:G=0:Z=0:S=0:F=0:D=0

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 GOTO 645

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.2-SIMPLE MODEL OF MORBIDITY/NIDALITY CHANGES' PROGNOSIS"

2010 PRINT"========================================================="

2050 PRINT"This programme calculates morbidity/nidality changes' prognosis based on:"

2051 PRINT TAB(2)"1) supposed absolute numbers of diseased animals or outbreaks"

2052 PRINT TAB(5)"(initial, new, extinct)"

2053 PRINT TAB(2)"2) supposed relative numbers of morbidity/nidality rates - initial prevalence,"

2054 PRINT TAB(5)"incidence, extinction rates (rates as proportions ,i.e. >0 - <1 !!!)"

2055 INPUT" Enter choice number: ",CH

2056 IF CH=1 OR CH=2 THEN GOTO 2100 ELSE PRINT IDE$:GOTO 2970

2100 SU$="":IN=0:EX=0

2104 DIM SU$(30),IN(30),EX(30)

2105 PRINT"INPUT DATA:":PRINT

2106 INPUT"Do you want to process data on diseased animals (d) or outbreaks (o) ";T$

     IF T$="d" OR T$="o" THEN GOTO 2107 ELSE PRINT IDE$:GOTO 2970

2107 IF T$="d" THEN H$="diseased animals"

2108 IF T$="o" THEN H$="outbreaks"

2110 INPUT"     disease(s) ";EN$

2111 INPUT"     place ";LU$

2112 INPUT"     period ";PE$

2113 INPUT"     species, category(ies) ";ES$,CA$:PRINT

2114 IF CH=1 THEN GOTO 2117 ELSE 2115

2115 INPUT"     initial point prevalence rate (number between >0 and <1 !!)  ";AI

2116 IF AI>1 THEN PRINT IDE$:GOTO 2970 ELSE 2119

2117 PRINT"     number of "H$;

2118 INPUT" at the beginning                 ";AI

2119 IF AI=0 THEN PRINT IDM$:GOTO 2970 ELSE 2120

2120 PRINT:PRINT:INPUT"     number (2 up 18 !) of planned subperiods                    ";N

2121 IF N=<1 OR N>18 THEN PRINT IDE$:GOTO 2970

2125 CLS

2136 PRINT TAB(6)"List data (names of subperiods up to 8 characters): "

2140 FOR I=1 TO N

2150 PRINT I;" ";

2160 INPUT"subperiod ";SU$(I)

2161 IF SU$(I)="" THEN PRINT IDM$:GOTO 2970 ELSE 2162

2162 IF CH=2 THEN INPUT"       supposed incidence, extinction rates ";IN(I),EX(I):GOTO 2166

2163 IF CH=1 THEN PRINT"           supposed new, extinct "H$;

2165 INPUT" ";IN(I),EX(I):GOTO 2170

2166 IF CH=2 AND IN(I) OR EX(I)>1 THEN PRINT IDE$:GOTO 2970 ELSE 2170

2170 NEXT I

2200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2202 IF I$="m" THEN GOTO 10

2203 IF I$="c" THEN GOTO 2000

2204 IF I$=CHR$(13) THEN GOTO 2205

2205 CLS

2206 IF T$="d" THEN GOTO 2207 ELSE 2208

2207 PRINT TAB(4)"SIMPLE MODEL OF ANIMAL SPECIFIC DISEASE MORBIDITY PROGNOSIS":GOTO 2210

2208 PRINT TAB(4)"SIMPLE MODEL OF ANIMAL SPECIFIC DISEASE NIDALITY PROGNOSIS"

2210 PRINT

2220 PRINT TAB(6)"Disease(s): "EN$

2221 PRINT"Place: "LU$;TAB(50)"Period: "PE$

2222 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

2230 IF CH=2 THEN PRINT TAB(5)"Initial point prevalence rate: "USING"#.####";AI:GOTO 2241

2240 PRINT TAB(5)"Initial number of ";H$" :";AI:GOTO 2245

2241 IF T$="d" THEN GOTO 2243 ELSE 2244

2243 PRINT:PRINT TAB(5)"Supposed   future   specific  disease   morbidity   rates":GOTO 2250

2244 PRINT:PRINT TAB(5)"Supposed   future   specific  disease   nidality  rates":GOTO 2250

2245 PRINT:PRINT TAB(5)"Supposed   future   numbers   of  ";H$

2250 PRINT TAB(5)"---------------------------------------------------------"

2275 IF CH=2 THEN PRINT TAB(5)"Subperiod";TAB(25)"Incidence ";TAB(40)"Extinction ";TAB(55)"Final"

2276 IF CH=2 THEN PRINT TAB(25)"Rate";TAB(40)"Rate";TAB(55)"Prevalence"

2277 IF CH=2 THEN PRINT TAB(55)"Rate":GOTO 2290

2280 PRINT TAB(6)"Subperiod";TAB(26)"New";TAB(41)"Extinct";TAB(56)"FINAL"

2290 PRINT:IN=0:EX=0

2300 FOR I=1 TO N

2310 IN=IN+IN(I)

2320 EX=EX+EX(I)

2350 IF CH=1 THEN PRINT I;TAB(6)SU$(I);TAB(25)INT(IN(I));TAB(40)INT(EX(I));TAB(55)INT(AI+IN-EX):GOTO 2360

2352 IF CH=2 THEN PRINT I;TAB(6)SU$(I);TAB(25)USING"#.####";IN(I);TAB(40)USING"#.####";EX(I);TAB(55)USING"#.####";(AI+IN-EX)

2360 NEXT I:'GOTO 2970

2400 A$=INKEY$:IF A$="" THEN GOTO 2400

2401 IF (AI*1.25)<(AI+IN-EX) THEN GOTO 2970

2405 CLS:PRINT TAB(8)"SIMPLE  MODEL  OF  ANIMAL  MORBIDITY/NIDALITY  PROGNOSIS"

2411 IF CH=1 THEN PRINT TAB(10)"(";CHR$(223);" represents 2 % of initial ";INT(AI);

2412 IF CH=1 THEN PRINT" ";H$;")":GOTO 2415

2413 IF CH=2 THEN PRINT TAB(5)"(";CHR$(223);" represents 2 % of initial ";USING"#.####";AI;

2414 PRINT" "H$;" prevalence rate)"

2415 PRINT

2416 PRINT TAB(1)"End of ";TAB(10)"0         20        40        60        80       100       120    %"

2418 PRINT TAB(10)CHR$(179)"---------|---------|---------|---------|---------|---------|--------

2419 PRINT TAB(2)"(Start)";TAB(10)CHR$(179);

2420 FOR P=1 TO 50:PRINT CHR$(223);

2421 NEXT P

2422 LET U=0

2423 FOR I=1 TO N

2424 U=U+(IN(I)-EX(I))

2425 Z=((AI+U)/AI)*50

2427 IF Z<1 THEN GOTO 2428 ELSE 2432

2428 IF Z>0 THEN GOTO 2429 ELSE 2432

2429 PRINT TAB(1)USING"\      \";SU$(I);

2430 PRINT TAB(10)CHR$(179);CHR$(249):GOTO 2460

2432 PRINT TAB(1)USING"\      \";SU$(I);

2433 PRINT TAB(10)CHR$(179);

2434 FOR K=1 TO Z

2435 PRINT CHR$(223);

2450 NEXT K

2460 NEXT I

2970 ERASE SU$,IN,EX

2971 SU$="":IN=0:EX=0

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 GOTO 645

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.3-PLANNING/PROGNOSIS OF MORBIDITY REDUCTION (IN LINEAR FORM)"

3010 PRINT"=============================================================="

3100 PRINT:PRINT"INPUT DATA:":PRINT

3111 INPUT"     disease(s) ";EN$

3112 INPUT"     place, period ";LU$,PE$

3114 INPUT"     species, category(ies) ";ES$,CA$

3116 INPUT"     time measure unit ";UT$:PRINT

3120 INPUT"     number of diseased animals at the beginning of the programme ";IA

3130 PRINT"     r e d u c e d   number of diseased animals"

3131 INPUT"                       planned for the end of the programme       ";F

3140 PRINT:INPUT"     duration of the programme in time measure units (up to 18)   ";T

3145 IF IA=0 OR T=0 THEN PRINT IDM$:GOTO 3980 ELSE 3150

3150 IF T>18 THEN GOTO 3151 ELSE 3200:REM:???

3151 PRINT"More than 18 lines - the table and graph will be out of one screen !"

3152 INPUT"                            Do you want to reconsider, yes(y) or no(n) ";R$

3153 IF R$="y" THEN GOTO 3140 ELSE 3200

3200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3202 IF I$="m" THEN GOTO 10

3203 IF I$="c" THEN GOTO 3000

3204 IF I$=CHR$(13) THEN GOTO 3205

3205 CLS:PRINT"     PLANNING/PROGNOSIS  OF  MORBIDITY  REDUCTION  (IN  LINEAR  FORM)"

3210 PRINT

3211 PRINT TAB(6)"Disease(s): "EN$

3212 PRINT"Place: "LU$;TAB(50)"Period: "PE$

3213 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

3214 PRINT"Diseased animals initial number: "IA;

3215 PRINT TAB(50)"Final number: "F

3216 PRINT"Time measure unit: "UT$;TAB(40)"Duration: "T UT$:PRINT

3220 PRINT:PRINT"     Difference between initial and final number":PRINT

3221 PRINT"                                          of diseased animals  = "IA-F

3225 LET R=(IA-F)/T:PRINT

3230 PRINT"     Average number of diseased to be reduced during one " UT$"

3231 PRINT TAB(62)"  = ";INT(R+.5)

3235 PRINT:PRINT"        i.e."

3236 PRINT TAB(15)"average percentage of initial number             = ";USING"##.#### %";R/IA*100

3237 PRINT:PRINT TAB(15)"average percentage of the difference between "

3238 PRINT TAB(34)"initial and final numbers     = "USING"##.#### %";R/(IA-F)*100

3239 A$=INKEY$:IF A$="" THEN GOTO 3239

3241 CLS:INPUT"Do you want to calculate partial data, yes(y) or no(n) ";R$

3242 IF R$="y" THEN GOTO 3245 ELSE 3351

3245 PRINT:PRINT"  Do you want the number of diseased animals after a given period (p)"

3246 INPUT"              or the time with a given number of diseased animals (a) ";U$

3247 IF U$="p" THEN GOTO 3255 ELSE 3320

3255 PRINT:INPUT"     number of time measure units of a given partial period      ";P:PRINT

3300 IF P>T THEN GOTO 3301 ELSE 3310

3301 PRINT:PRINT TAB(6)"Error! Partial number of time units cannot be major"

3302 PRINT"                                   than the total planned period !":GOTO 3980

3310 PRINT:PRINT"     Number of diseased animals reduced during"

3311 PRINT"                         the first"USING"####.##";P;

3312 PRINT" time units = ";INT(P*R+.5):PRINT

3313 PRINT"     i.e. there should be still a rest of circa ";INT(IA-P*R+.5);"diseased animals.":GOTO 3350

3320 PRINT:INPUT"     partially reduced number of diseased animals                ";N:PRINT

3321 IF N<F OR N>IA THEN GOTO 3322 ELSE 3329

3322 PRINT TAB(6)"Error! The partially reduced number of diseased animals"

3323 PRINT"                      must be between the initial and final value !":GOTO 3980

3329 A=((IA-N)/(IA-F))*T

3330 PRINT:PRINT"Number of time units for the reduction to";N;"diseased animals = ";USING"####.##";A:PRINT

3332 PRINT"   i.e. there is still a rest of ";USING"####.##";T-A;

3333 PRINT"                                         time units for achieving the goal."

3350 A$=INKEY$:IF A$="" THEN GOTO 3350

3351 CLS:PRINT:PRINT TAB(8)"ANIMAL  M O R B I D I T Y   R E D U C T I O N  (IN  LINEAR  FORM)"

3355 PRINT TAB(15)"Initial number of diseased animals:  "IA

3357 PRINT:PRINT TAB(15)"End of";TAB(36)"Supposed";TAB(55)"Percentage"

3361 PRINT TAB(15)UT$;TAB(36)"Number of";TAB(55)"of Initial"

3362 PRINT TAB(36)"Diseased";TAB(55)"Total"

3363 PRINT TAB(36)"Animals";TAB(55)"Number":PRINT

3365 S=0

3366 FOR I= 1 TO T

3367 S=S+R

3368 LET W=(IA-S):IF W<0 THEN W=0

3369 PRINT TAB(15)I;TAB(36)INT(W);TAB(55)USING"###.####";(W/IA)*100

3370 NEXT I

3400 A$=INKEY$:IF A$="" THEN GOTO 3400

3410 CLS:PRINT TAB(8)"ANIMAL  M O R B I D I T Y   R E D U C T I O N   (IN  LINEAR  FORM)"

3412 PRINT TAB(9)"(";CHR$(223);" represents 2 % of initial total "INT(IA);

3413 PRINT" diseased animals)":PRINT

3416 PRINT TAB(10)"End of";TAB(25)"0         20        40        60        80       100 %"

3418 PRINT TAB(10)UT$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

3419 PRINT TAB(17)"(Start)";TAB(25)CHR$(179);

3420 FOR P=1 TO 50:PRINT CHR$(223);

3421 NEXT P

3423 LET S=0

3424 FOR I=1 TO T

3425 S=S+R

3426 Z=((IA-S)/IA)*50

3427 IF Z<1 THEN GOTO 3428 ELSE 3432

3428 IF Z>0 THEN GOTO 3429 ELSE 3432

3429 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 3460

3432 PRINT TAB(10)I;TAB(25)CHR$(179);

3433 FOR K=1 TO Z

3434 PRINT CHR$(223);

3445 NEXT K

3460 NEXT I

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.4-PLANNING/PROGNOSIS OF MORBIDITY REDUCTION (IN CURVE FORM)"

4011 PRINT"============================================================="

4020 PRINT"(decrease of diseased animals number in regular curve form)"

4100 PRINT"INPUT DATA:"

4111 INPUT"     disease(s) ";EN$

4112 INPUT"     species, category(ies) ";ES$,CA$

4113 INPUT"     place ";LU$

4114 INPUT"     period ";PE$

4116 INPUT"     time measure unit (up to 8 characters !) ";UT$:PRINT

4120 PRINT"     number of diseased animals"

4121 INPUT"                           at the beginning of the programme      ";MAX

4130 PRINT:PRINT"     r e d u c e d  number of diseased animals"

4131 INPUT"                        planned for the end of the programme      ";MIN

4133 PRINT:PRINT"     planned  p e r i o d  for objective achievement"

4134 INPUT"                             in time measure units (up to 18 !)   ";MM

4122 IF MAX=0 OR MM=0 THEN PRINT IDM$:GOTO 4980

4140 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4141 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4142 IF I$="m" THEN GOTO 10

4143 IF I$="c" THEN GOTO 4000

4104 IF I$=CHR$(13) THEN GOTO 4150

4150 LET A=(MAX-MIN)/2

4160 D=57.2958:REM:coefficient for de conversion de radianos en los grados

4170 LET V=2*MM

4180 B=360/V:S=1:GOTO 4200

4185 PRINT:PRINT"     average duration of intervals (subperiods)"

4186 INPUT"        for partial data calculation (in time measure units)      ";S

4190 IF S=0 THEN S=1

4192 IF MM/S=>18 THEN GOTO 4193 ELSE 4200

4193 PRINT:PRINT"Please, reconsider this last input! It is too small"

4194 PRINT"      - a part of displayed result will be out of one screen !"

4195 INPUT"                      Do you want to correct it, yes(y) or no(n) ";U$

4196 IF U$="y" OR U$="n" THEN GOTO 4197 ELSE 4200

4197 IF U$="n" THEN GOTO 4200 ELSE 4185

4200 CLS:PRINT TAB(6)"PLANNING/PROGNOSIS  OF  MORBIDITY  REDUCTION  (IN  CURVE  FORM)"

4205 PRINT TAB(6)"Disease(s): "EN$

4206 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

4207 PRINT"Place: "LU$;TAB(50)"Period: "PE$

4209 PRINT"Diseased animals' initial number: "MAX;

4210 PRINT"  Final number: "MIN:PRINT

4211 PRINT TAB(10)"Time"TAB(25)"Supposed Number of";TAB(50)"% of Initial"

4212 PRINT TAB(6)"End of "UT$;TAB(25)"Diseased Animals";TAB(50)"Value"

4213 PRINT

4214 IF S=0 THEN S=1

4220 FOR I=1 TO MM STEP S

4230 PRINT TAB(10)I;TAB(28)INT(A*SIN((I*B+90)/D)+A+MIN);

4232 PRINT TAB(50)USING"###.####";(A*SIN((I*B+90)/D)+A+MIN)/MAX*100

4240 NEXT I

4400 A$=INKEY$:IF A$="" THEN GOTO 4400

4410 CLS:PRINT TAB(9)"ANIMAL  M O R B I D I T Y   R E D U C T I O N   (IN  CURVE  FORM)"

4412 PRINT TAB(11)"(";CHR$(223);" represents 2 % of initial "INT(MAX);

4413 PRINT" diseased animals)":PRINT

4416 PRINT TAB(9)"End of"TAB(25)"0         20        40        60        80       100 %"

4418 PRINT TAB(9)UT$;TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

4419 PRINT TAB(17)"(Start)";TAB(25)CHR$(179);

4420 FOR P=1 TO 50:PRINT CHR$(223);

4421 NEXT P

4422 IF MIN=0 THEN GOTO 4464 ELSE 4424

4424 FOR I=1 TO MM STEP S

4426 Z=((A*SIN((I*B+90)/D)+A+MIN)/MAX)*50

4427 IF Z<1 THEN GOTO 4428 ELSE 4432

4428 IF Z>0 THEN GOTO 4429 ELSE 4432

4429 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 4460

4432 PRINT TAB(10)I;TAB(25)CHR$(179);

4433 FOR K=1 TO ((A*SIN((I*B+90)/D)+A+MIN)/MAX)*50

4434 PRINT CHR$(223);

4450 NEXT K

4460 NEXT I:GOTO 4980

4464 FOR I=1 TO (MM-1) STEP S

4466 Z=((A*SIN((I*B+90)/D)+A+MIN)/MAX)*50

4467 IF Z<1 THEN GOTO 4468 ELSE 4472

4468 IF Z>0 THEN GOTO 4469 ELSE 4472

4469 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 4480

4472 PRINT TAB(10)I;TAB(25)CHR$(179);

4473 FOR K=1 TO ((A*SIN((I*B+90)/D)+A+MIN)/MAX)*50

4474 PRINT CHR$(223);

4475 NEXT K

4480 NEXT I

4482 PRINT TAB(10)MM;TAB(25)CHR$(179)

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.5-PLANNING/PROGNOSIS OF ANIMAL POPULATION SPECIFIC HEALTH RECOVERY"

5005 PRINT"===================================================================="

5010 PRINT"(number increase of healthy animals)"

5050 PRINT TAB(6)"This programme calculates the plans for health recovery - objectives"

5051 PRINT TAB(6)"in terms of numbers of specific disease(s) free animals"

5052 PRINT TAB(10)"1) in linear form"

5053 PRINT TAB(10)"2) in curve form"

5055 INPUT"     Enter choice number: ",CH

5056 IF CH=1 OR CH=2 THEN GOTO 5100 ELSE 5980

5100 PRINT"INPUT DATA:"

5111 INPUT"     specific health ";SE$

5112 INPUT"     species, category(ies) ";ES$,CA$

5113 INPUT"     place, period ";LU$,PE$

5116 INPUT"     time measure unit (up to 10 characters !) ";UT$:PRINT

5120 PRINT"     number of healthy animals"

5121 INPUT"                          at the beginning of the programme   ";MIN:PRINT

5130 PRINT"     i n c r e a s e d   number of healthy animals"

5131 INPUT"                       planned for the end of the programme   ";MAX:PRINT

5132 IF MIN>MAX THEN GOTO 5133 ELSE 5135

5133 PRINT"Error ! Number at the end cannot be minor than the initial one !":GOTO 5980

5135 PRINT"     planned   p e r i o d   for objective achievement"

5138 INPUT"                         in time measure units (up to 18 !)   ";MM

5139 IF MAX=0 OR MM=0 THEN PRINT IDE$:GOTO 5980

5140 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5141 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5142 IF I$="m" THEN GOTO 10

5143 IF I$="c" THEN GOTO 5000

5144 IF I$=CHR$(13) THEN GOTO 5150

5150 LET A=(MAX-MIN)/2

5160 D=57.2958:REM:coeficiente de conversion de radianos en los grados

5170 LET V=2*MM

5180 B=360/V:S=1:GOTO 5200

5189 PRINT:PRINT"     average duration of intervals (subperiods)"

5190 INPUT"       for partial data calculation (in time measure units)   ";S

5191 IF S=0 THEN S=1

5192 IF MM/S=>18 THEN GOTO 5193 ELSE 5200

5193 PRINT:PRINT"Please, reconsider this last input ! It is too small"

5194 PRINT"          - a part of displayed result will be out of one screen !"

5195 INPUT"                       Do you want to correct it, yes(y) or no(n) ";U$

5196 IF U$="y" OR U$="n" THEN GOTO 5197 ELSE 5195

5197 IF U$="n" THEN GOTO 5200 ELSE 5189

5200 CLS:PRINT TAB(6)"PLANNING/PROGNOSIS  OF  ANIMAL  POPULATION  SPECIFIC  HEALTH  RECOVERY":PRINT

5203 PRINT TAB(6)"Specific health: "SE$

5204 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

5205 PRINT"Place: "LU$;TAB(50)"Period: "PE$

5206 PRINT"Healthy animals' initial number: "MIN;

5207 PRINT"   Final number: "MAX:PRINT

5210 PRINT TAB(10)"Time"TAB(25)"Supposed Number of";TAB(50)"Percentage"

5211 PRINT TAB(5)"End of "UT$;TAB(25)"Healthy Animals";TAB(50)"of Final Number":PRINT

5215 IF CH=1 THEN GOTO 5300 ELSE 5400

5300 U=0

5310 FOR I=1 TO MM STEP S

5325 U=U+(MAX-MIN)/(MM/S)

5330 PRINT TAB(10)I;TAB(26)INT(MIN+U);TAB(50)USING"###.####";((MIN+U)/MAX)*100

5331 NEXT I

5332 GOTO 5449

5400 REM:choice 2

5420 FOR I=1 TO MM STEP S

5430 PRINT TAB(10)I;TAB(27)INT((A*SIN((I*B-90)/D)+A+MIN)+0.5);

5431 PRINT TAB(50)USING"###.####";((A*SIN((I*B-90)/D)+A+MIN)/MAX)*100

5440 NEXT I

5449 A$=INKEY$:IF A$="" THEN GOTO 5449

5452 CLS:PRINT TAB(10)"ANIMAL  POPULATION  SPECIFIC  H E A L T H   R E C O V E R Y"

5453 PRINT TAB(10)"(";CHR$(223);" represents 2 % of final  "INT(MAX);

5454 PRINT" healthy animals)":PRINT

5455 PRINT TAB(6)"End of "UT$;TAB(25)"0         20        40        60        80       100 %"

5456 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

5457 PRINT TAB(15)"(Start)";TAB(25)CHR$(179);

5458 FOR Z=1 TO (MIN/MAX)*50:PRINT CHR$(223);

5459 NEXT Z

5460 IF CH=1 THEN GOTO 5461 ELSE 5500

5461 U=0

5462 FOR I=1 TO MM STEP S

5463 U=U+(MAX-MIN)/(MM/S)

5466 Z=((MIN+U)/MAX)*50

5467 IF Z<1 THEN GOTO 5468 ELSE 5472

5468 IF Z>0.1 THEN GOTO 5469 ELSE 5472

5469 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 5480

5472 PRINT TAB(10)I;TAB(25)CHR$(179);

5473 FOR K=1 TO Z

5474 PRINT CHR$(223);

5475 NEXT K

5480 NEXT I

5490 GOTO 5980

5500 FOR I=1 TO MM STEP S

5526 Z1=((A*SIN((I*B-90)/D)+A+MIN)/MAX)*50

5527 IF Z1<1 THEN GOTO 5528 ELSE 5532

5528 IF Z1>0.1 THEN GOTO 5529 ELSE 5532

5529 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 5560

5532 PRINT TAB(10)I;TAB(25)CHR$(179);

5533 FOR K=1 TO Z1

5534 PRINT CHR$(223);

5550 NEXT K

5560 NEXT I

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.6-ANIMAL POPULATION HEALTH/DISEASE MASS ACTIONS (INCL.VACCINATIONS)"

6005 PRINT"====================================================================="

6010 D$="":L=0

6050 PRINT"This subprogramme calculates:

6051 PRINT"   summary tables of:"

6052 PRINT TAB(15)"1) actions according to diseases"

6053 PRINT TAB(15)"2) actions according to species"

6054 PRINT TAB(15)"3) actions according to space/territory"

6055 PRINT TAB(15)"4) actions according to time series"

6056 PRINT TAB(15)"5) actions according to their types"

6057 PRINT"   relative indicators' values related to:"

6058 PRINT TAB(15)"6) mass vaccinations"

6059 PRINT TAB(15)"7) mass treatments":PRINT

6060 INPUT"      Enter choice number: ",H

6061 IF H=1 OR H=2 OR H=3 OR H=4 OR H=5 OR H=6 OR H=7 THEN GOTO 6062 ELSE 6600

6062 IF H=1 OR H=2 OR H=3 OR H=4 OR H=5 THEN GOTO 6399

6066 IF H=6 THEN GOTO 6300

6067 IF H=7 THEN GOTO 6070

6070 CLS:PRINT"INPUT DATA:":PRINT

6072 INPUT"     specific animal health actions ";AP$

6073 INPUT"     species, category(ies) ";ES$,CA$

6074 INPUT"     place, period ";LU$,PE$

6078 PRINT

6080 INPUT"     number of animals of the given population         ";A

6081 IF A=0 THEN PRINT IDM$:GOTO 6600 ELSE 6082

6082 PRINT:INPUT"     number of specifically diseased animals           ";B

6084 INPUT"     number of animals in specific foci                ";C

6086 INPUT"     number of animals in threatened zones             ";D

6088 PRINT:INPUT"     number of treated animals                         ";E

6089 INPUT"     number of treatment actions in a given period     ";F:PRINT

6090 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6091 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6092 IF I$="m" THEN GOTO 10

6093 IF I$="c" THEN GOTO 6000

6094 IF I$=CHR$(13) THEN GOTO 6100

6100 CLS:PRINT TAB(6)"ANIMAL  POPULATION  HEALTH  MASS  SPECIFIC  ACTIONS":PRINT

6105 PRINT TAB(6)"Animal health actions: "AP$

6106 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

6107 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

6110 IF E>0 AND A>0 THEN GOTO 6210

6120 IF E>0 AND B>0 THEN GOTO 6220 ELSE 6130

6130 IF E>0 AND C>0 THEN GOTO 6230 ELSE 6140

6140 IF E>0 AND D>0 THEN GOTO 6240 ELSE 6150

6150 IF E>0 AND C>0 AND D>0 THEN GOTO 6250 ELSE 6160

6160 IF F>0 AND E>0 THEN GOTO 6260 ELSE 6600

6210 PRINT"     Proportion of treated animals                             =";USING"####.####";E/A

6211 PRINT"                        i.e. in percentage                     =";USING"####.####";E/A*100:PRINT

6220 PRINT"     Ratio of treated/diseased animals                         = ";USING"###.####";E/B:GOTO 6130

6230 PRINT"     Ratio of treated/intrafocal animals                       = ";USING"###.####";E/C:GOTO 6140

6240 PRINT"     Ratio of treated/threatened zones animals                 = ";USING"###.####";E/D:GOTO 6150

6250 PRINT"     Ratio of treated/intrafocal+threat. zones animals         = ";USING"###.####";E/(C+D):GOTO 6160

6260 PRINT:PRINT"     Grade of treatment repetitions during the given period    = ";USING"###.####";F/E:GOTO 6980

6300 CLS:REM: Vaccination and immunity part

6301 PRINT:PRINT"INPUT DATA:":PRINT

6302 INPUT"     type of specific vaccination ";AP$

6303 INPUT"     species, category(ies) ";ES$,CA$

6304 INPUT"     place, period ";LU$,PE$

6308 PRINT

6310 INPUT"     number of animals of the given population          ";A

6311 IF A=0 THEN PRINT IDM$:GOTO 6600 ELSE 6312

6312 PRINT:INPUT"     number of specifically diseased animals            ";B

6314 INPUT"     number of animals in specific foci                 ";C

6316 INPUT"     number of animals in threatened zones              ";D

6318 PRINT:INPUT"     number of vaccinated animals                       ";E

6320 INPUT"     number of vaccinations in the given period         ";F:PRINT

6321 INPUT"     grade of vaccine immunization effect (>0 - 1)      ";VV

6322 IF VV=<0 OR VV>1 THEN PRINT IDE$:GOTO 6600

6323 CLS:PRINT:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6324 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6325 IF I$="m" THEN GOTO 10

6326 IF I$="c" THEN GOTO 6000

6327 IF I$=CHR$(13) THEN GOTO 6330

6330 CLS:PRINT TAB(6)"ANIMAL  POPULATION  HEALTH  MASS  SPECIFIC  ACTIONS":PRINT

6331 PRINT TAB(6)"Type of vaccination: "AP$

6332 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

6333 PRINT"Place: "LU$;TAB(50)"Period: "PE$:PRINT

6340 IF E>0 AND A>0 THEN PRINT"     Proportion of vaccinated animals in the given population    =";USING"####.####";E/A

6341 PRINT"                                           i.e. in percentage    =";USING"####.####";E/A*100:PRINT

6342 IF E>0 AND B>0 THEN PRINT"     Ratio of vaccinated/diseased animals                     = ";USING"###.####";E/B

6344 IF E>0 AND C>0 THEN PRINT"     Ratio of vaccinated/intrafocal animals                   = ";USING"###.####";E/C

6346 IF E>0 AND D>0 THEN PRINT"     Ratio of vaccinated/threatened zones animals             = ";USING"###.####";E/D

6348 IF E>0 AND C>0 AND D>0 THEN PRINT"     Ratio of vaccinated/intrafocal+threat. zones animals     = ";USING"###.####";E/(C+D)

6350 PRINT

6351 IF F>0 AND E>0 THEN PRINT"     Grade of vaccination repetitions in the given period        = ";USING"###.####";F/E

6352 PRINT

6355 IF A>0 AND VV>0.0000 AND E>0 THEN GOTO 6356 ELSE 6600

6356 PRINT"     Grade of supposed population postvaccination immunity       =   ";

6357 PRINT USING"#.####";E/A*VV

6358 A$=INKEY$:IF A$="" THEN GOTO 6358

6359 CLS:PRINT"  Do you want to estimate the grade of population immunity after certain time"

6360 INPUT"        in relation to regular population replacement, yes(y) or no(n) ";RE$

6361 IF RE$="y" THEN GOTO 6362 ELSE 6600

6362 PRINT:PRINT"INPUT DATA:":PRINT

6363 PRINT"     number of vaccinated animals at the beginning"

6364 INPUT"                                   of the evaluated period      ";AEP

6365 PRINT:INPUT"     regular continuing replacement period in days              ";RRP

6366 PRINT:PRINT"     period between the initial and evaluation moments in days"

6367 INPUT"        (must be shorter than the regular replacement period !) ";PEV

6368 IF PEV=>RRP THEN PRINT IDE$:GOTO 6600

6369 LET R=AEP*(1-(PEV/RRP))

6371 PRINT:PRINT"RESULT:"

6372 PRINT:PRINT"  At the moment of evaluation about";INT(R);"animals still remain"

6373 PRINT"          from the initial number of" AEP "vaccinated animals.":PRINT

6374 IF VV>0.0000 THEN GOTO 6375 ELSE 6600

6375 PRINT"  If we take into consideration ";

6376 PRINT USING"#.####";VV;

6377 PRINT" grade of supposed postvaccination"

6378 PRINT"    immunity, then we could estimate"INT(R*VV+.5);"specifically immune animals"

6379 PRINT"           representing about ";

6380 PRINT USING"###.## %";((R*VV)/AEP)*100;

6381 PRINT" of initially vaccinated animals."

6382 A$=INKEY$:IF A$="" THEN GOTO 6382

6385 GOTO 6981

6399 D$="":L=0

6400 DIM D$(40),L(40)

6420 PRINT"INPUT DATA:"

6421 IF H=1 THEN GOTO 6423

6422 INPUT"     disease(s) ";DI$

6423 INPUT"     place (territory), period ";PL$,PE$

6424 IF H=2 THEN GOTO 6428

6426 INPUT"     species, category(ies) ";SP$,CA$

6427 IF H=5 THEN GOTO 6429

6428 INPUT"     type of animal health actions ";LO$

6429 INPUT"     measure units ";MU$

6430 INPUT"     How many data (up to 18 !) to be processed ";N

6431 IF N=0 THEN PRINT IDM$:GOTO 6600

6432 IF N>18 THEN PRINT"More than 18 data ! New input !":GOTO 6430

6433 CLS:PRINT:PRINT TAB(10)"List data (names up to 20 characters):":PRINT

6434 FOR I=1 TO N

6435 PRINT TAB(5)I;" ";

6436 IF H=1 THEN INPUT"  disease, number of actions ";D$(I),L(I)

6437 IF H=2 THEN INPUT"  species, number of actions ";D$(I),L(I)

6438 IF H=3 THEN INPUT"  subterritory, number of actions ";D$(I),L(I)

6439 IF H=4 THEN INPUT"  subperiod, number of actions ";D$(I),L(I)

6440 IF H=5 THEN INPUT"  action type, number of actions ";D$(I),L(I)

6441 NEXT I:T=0

6442 FOR I=1 TO N

6443 T=T+L(I)

6444 NEXT I:MAX=L(1)

6445 FOR I=2 TO N:IF L(I)>MAX THEN MAX=L(I):NEXT I

6446 IF T=0 THEN PRINT:PRINT IDE$:GOTO 6600

6447 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6448 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6449 IF I$="m" THEN GOTO 10

6450 IF I$="c" THEN GOTO 6000

6451 IF I$=CHR$(13) THEN GOTO 6452

6452 CLS:PRINT"RESULT:":PRINT:IF H=1 THEN GOTO 6454

6453 PRINT TAB(6)"Disease(s): "DI$

6454 PRINT"Place: "PL$;TAB(50)"Period: "PE$

6455 IF H=2 THEN GOTO 6457

6456 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$:IF H=5 THEN GOTO 6458

6457 PRINT"Type of actions: "LO$

6458 PRINT TAB(6)"Measure units: "MU$:PRINT

6459 IF H=1 THEN D$="Disease"

6460 IF H=2 THEN D$="Species"

6461 IF H=3 THEN D$="Subterritory"

6462 IF H=4 THEN D$="Subperiod"

6463 IF H=5 THEN D$="Action type"

6465 PRINT TAB(6)D$;TAB(30)"Number of";TAB(47)"Proportion";TAB(63)"Percentage"

6466 PRINT TAB(30)"Actions";TAB(47)"of total number of actions":PRINT"

6467 FOR I=1 TO N

6468 PRINT I;TAB(6)USING"\                  \";D$(I);

6469 PRINT TAB(29)L(I);TAB(49)USING"#.####";L(I)/T;

6470 PRINT TAB(64)USING"###.####";L(I)/T*100

6471 NEXT I

6472 PRINT

6474 PRINT TAB(6)"T o t a l";TAB(29)T;TAB(49)"1.0000";TAB(64)"100.0000"

6479 A$=INKEY$:IF A$="" THEN GOTO 6479

6480 IF N=1 THEN GOTO 6600

6482 CLS:PRINT TAB(10)" A N I M A L    H E A L T H    M A S S    A C T I O N S"

6483 IF MAX>(T/2) THEN GOTO 6484 ELSE 6500

6484 PRINT TAB(17)"(";CHR$(223);" represents 2 % of total "INT(T)  MU$;")":PRINT

6485 PRINT TAB(3)D$;TAB(25)"0         20        40        60        80       100 %"

6486 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

6488 FOR I=1 TO N

6489 Z=L(I)/T*50

6490 IF Z<1 THEN GOTO 6492 ELSE 6494

6491 IF Z>0 THEN GOTO 6493 ELSE 6494

6492 PRINT TAB(3)USING"\                  \";D$(I);

6493 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 6499

6494 PRINT TAB(3)USING"\                  \";D$(I);

6495 PRINT TAB(25)CHR$(179);

6496 FOR K=1 TO Z

6497 PRINT CHR$(223);

6498 NEXT K

6499 NEXT I:GOTO 6600

6500 PRINT TAB(17)"(";CHR$(223);" represents 1 % of total  "INT(T)  MU$;")":PRINT

6501 PRINT TAB(3)D$;TAB(25)"0         10        20        30        40        50 %"

6502 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

6504 FOR I=1 TO N

6505 Z1=L(I)/T*100

6590 IF Z1<1 THEN GOTO 6591 ELSE 6594

6591 IF Z1>0 THEN GOTO 6592 ELSE 6594

6592 PRINT TAB(3)USING"\                  \";D$(I);

6593 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 6599

6594 PRINT TAB(3)USING"\                  \";D$(I);

6595 PRINT TAB(25)CHR$(179);

6596 FOR K=1 TO Z1

6597 PRINT CHR$(223);

6598 NEXT K

6599 NEXT I

6600 ERASE D$,L

6601 D$="":L=0

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 D$="":L=0:MAX=0:GOTO 645

6982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6983 IF R$="y" OR R$="n" THEN GOTO 6984 ELSE 6990

6984 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.7-'CRITICAL PATH' METHOD IN ANIMAL POPULATION HEALTH PLANNING"

7005 PRINT"==============================================================="

7010 PRINT"                                                     (Ref.: Lon Poole, adapted)"

7080 A=0:E=0:A(I,2)=0:E(I,2)=0

7090 DIM A(100,2),E(100,2)

7100 PRINT"INPUT DATA:"

7102 INPUT"     programme ";PR$

7103 INPUT"     place ";LU$

7104 INPUT"     period ";PE$

7105 INPUT"     time measure units ";UT$

7106 INPUT"     monetary units (up to 8 characters !) ";UM$:PRINT

7107 REM:DEF FNR(Z1)=INT(Z1*1000+.5)/1000

7108 PRINT"     how many activities (3 up to 50 !) does the network"

7109 INPUT"                                     (or plannig table) contain ";N

7110 IF N<3 OR N>50 THEN PRINT IDE$:GOTO 7755 ELSE 7111

7111 CLS

7112 PRINT"Key data (commas between them) in following order for each activity:":PRINT

7113 PRINT"   initial node number, end node number (must be major than initial - previous"

7114 PRINT"   node number !), duration (in time units), cost"

7115 PRINT

7125 FOR I=1 TO N

7126 PRINT TAB(10)"activity No";I  ;

7127 INPUT A(I,1),A(I,2),E(I,1),E(I,2)

7128 IF (A(I,1)+A(I,2))=0 THEN PRINT IDM$:GOTO 7755 ELSE 7138

7138 IF A(I,1)>A(I,2) THEN PRINT"Error! Start again!":GOTO 7755

7220 S(I)=0

7230 F(I)=0

7240 NEXT I

7250 REM:ciclo para determinar el inicio de la red

7260 FOR I=1 TO N

7270 IF S(A(I,2))>=S(A(I,1))+E(I,1) THEN 7290

7280 S(A(I,2))=S(A(I,1))+E(I,1)

7290 NEXT I

7300 F(A(N,2))=S(A(N,2))

7310 REM:ciclo para calcular el tiempo final de la red

7320 FOR I=N TO 1 STEP -1

7330 IF F(A(I,1))=0 THEN 7360

7340 IF F(A(I,1))>F(A(I,2))-E(I,1) THEN 7360

7350 GOTO 7370

7360 F(A(I,1))=F(A(I,2))-E(I,1)

7370 NEXT I

7380 C(1)=0

7385 L=0

7390 IF A$="y" THEN GOTO 7400

7391 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7392 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7393 IF I$="m" THEN GOTO 10

7394 IF I$="c" THEN GOTO 7000

7395 IF I$=CHR$(13) THEN GOTO 7400

7400 CLS:PRINT TAB(6)"'CRITICAL PATH' METHOD IN ANIMAL POPULATION HEALTH PLANNING":PRINT

7405 PRINT TAB(6)"Programme: "PR$

7406 PRINT"Place: "LU$;TAB(50)"Period: "PE$

7407 PRINT

7410 REM:calculo de tiempo supuesto en S1

7420 PRINT"Activi-";TAB(9)"N   o   d   e";TAB(27)"T i m e unit ";TAB(42)"Duration";TAB(53)"Path";TAB(62)"Costs"

7430 PRINT"ty";TAB(9)"Initial";TAB(17)"End";TAB(27)"Start";TAB(35)"End";TAB(42) UT$;TAB(62) UM$

7435 PRINT

7436 C1=0

7440 FOR I=1 TO N

7450 PRINT TAB(2);I;TAB(9);A(I,1);TAB(17);A(I,2);TAB(27);S(A(I,1));TAB(35);F(A(I,2));TAB(42);E(I,1);TAB(51);

7470 S1=F(A(I,2))-S(A(I,1))-E(I,1)

7480 IF S1>0 THEN 7520

7490 PRINT"critical";

7500 L=L+E(I,1)

7510 GOTO 7540

7520 PRINT S1;"res";

7530 GOTO 7540

7540 PRINT TAB(61);E(I,2)

7550 C1=C1+E(I,2)

7560 NEXT I

7570 PRINT

7580 PRINT"          Duration of critical path  = ";L UT$

7590 PRINT"          Total costs                = ";C1 UM$

7600 PRINT:PRINT"   Note: 'res' means time reserve.":'GOTO 7755

7601 REM: Korekce je zatim vyrazena !!??

7605 A$=INKEY$:IF A$="" THEN GOTO 7605

7610 CLS:PRINT:PRINT"   Do you want to correct"

7611 INPUT"         the duration or the costs of any activity, yes (y) or no (n) ";A$

7630 IF A$="n" THEN 7755

7640 IF A$="y" THEN 7660

7641 IF A$<>"n" THEN IF A$<>"y" THEN GOTO 7981

7650 REM:

7660 PRINT:PRINT"         which activity ";

7670 INPUT I

7680 IF I<1 THEN 7650

7690 IF I>N THEN 7650

7700 PRINT"               replace data on duration = ";E(I,1);"and costs = ";E(I,2)

7705 PRINT"               by new data: duration, costs ";

7710 INPUT E(I,1),E(I,2)

7720 PRINT

7725 FOR I=1 TO N

7730 S(I)=0

7735 F(I)=0

7740 NEXT I

7750 GOTO 7250

7755 ERASE A,E

7756 A=0:E=0:A(I,2)=0:E(I,2)=0

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 GOTO 645

7982 CLS:INPUT"Do you want to repeate this subprogramme, yes(y) or no(n) ";R$

7983 IF R$="y" OR R$="n" THEN GOTO 7984 ELSE 7990

7984 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.8-DISTRIBUTION OF ANIMAL POPULATION HEALTH PROGRAMME INPUTS"

8005 PRINT"============================================================="

8006 PRINT"Input: staff, material (equipment, vaccines, drugs, DDD means, etc), money, etc."

8009 NA$="":W=0:W(I)=0

8010 DIM NA$(40),W(40)

8100 PRINT"INPUT DATA:"

8105 INPUT"     programme ";PR$

8106 INPUT"     place, time ";LU$,TI$

8107 INPUT"     input type, input measure units ";IN$,MU$

8108 INPUT"     criterion for input distribution ";CID$

8120 INPUT"     total quantity of the input units for distribution ";S2

8121 IF S2=0 THEN PRINT IDM$:GOTO 8890 ELSE 8130

8130 INPUT"     number (2 up to 18 !) of parts among which the input to be divided ";N

8131 IF N=<1 OR N>18 THEN PRINT IDE$:GOTO 8890

8135 IF N>11 THEN CLS

8140 PRINT"  List data (names up to 20 characters):

8148 S1=0

8150 FOR I=1 TO N

8160 PRINT TAB(6)"part ";I;": ";

8165 PRINT"name, number of animals ";

8170 INPUT NA$(I),W(I)

8171 IF NA$(I)="" THEN PRINT IDM$:GOTO 8890 ELSE 8180

8180 S1=S1+W(I)

8181 NEXT I

8182 IF S1=0 THEN PRINT IDM$:GOTO 8890

8185 MAX=W(1)

8186 FOR I=2 TO N

8188 IF W(I)>MAX THEN MAX=W(I)

8189 NEXT I

8191 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8192 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8193 IF I$="m" THEN GOTO 10

8194 IF I$="c" THEN GOTO 8000

8195 IF I$=CHR$(13) THEN GOTO 8200

8200 CLS:PRINT TAB(6)"DISTRIBUTION  OF  ANIMAL  POPULATION  HEALTH  PROGRAMME  INPUTS"

8203 PRINT TAB(6)"Programme: "PR$

8204 PRINT"Place: "LU$;TAB(50)"Time: "TI$

8205 PRINT"Input type: "IN$

8206 PRINT"Criterion for distribution: "CID$

8207 PRINT"Input measure units: "MU$;TAB(50)"Total quantity: "INT(S2):'PRINT

8208 PRINT TAB(41)"D i s t r i b u t i o n   shares"

8210 PRINT TAB(5)" Part",,"Number of","Percentage","Absolute value"

8215 PRINT TAB(5),,"animals","of total","in input units"

8220 PRINT

8225 P1=0:S3=0

8230 FOR I=1 TO N-1

8240 P=((10000*W(I)/S1)/100)

8250 P1=P1+P

8260 R=INT((S2*W(I)/S1)*10^(R1)+.5)/10^(R1)

8270 S3=S3+R

8280 PRINT I;TAB(6)USING"\                  \";NA$(I);

8281 PRINT TAB(29)INT(W(I));TAB(44)USING"###.##";P;

8282 PRINT TAB(60)INT(R)

8290 NEXT I

8295 S4=S2-S3

8300 PRINT N;TAB(6)NA$(N);TAB(29)INT(W(N));TAB(44)USING"###.##";100-P1;

8301 PRINT TAB(60)INT(S4)

8310 PRINT

8320 PRINT TAB(6)"T o t a l";TAB(29)INT(S1);TAB(44)"100.00";

8321 PRINT TAB(60)INT(S2)

8330 REM:PRINT

8340 REM:La ultima cuota es un poco adaptada para obtener 100.00

8400 A$=INKEY$:IF A$="" THEN GOTO 8400

8401 CLS:PRINT TAB(5)"DISTRIBUTION  SHARES  OF  ANIMAL  POPULATION  HEALTH  PROGRAMME  INPUTS"

8402 IF MAX>(S1/2) THEN GOTO 8403 ELSE 8500

8403 PRINT TAB(17)"(";CHR$(223);" represents 2 % of total "INT(S2)  MU$;")":PRINT

8405 PRINT TAB(3)"P a r t";TAB(25)"0         20        40        60        80       100 %"

8406 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8408 FOR I=1 TO N

8410 Z=W(I)/S1*50

8411 IF Z<1 THEN GOTO 8412 ELSE 8415

8412 IF Z>0 THEN GOTO 8413 ELSE 8415

8413 PRINT TAB(3)USING"\                  \";NA$(I);

8414 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8420

8415 PRINT TAB(3)USING"\                  \";NA$(I);

8416 PRINT TAB(25)CHR$(179);

8417 FOR K=1 TO Z

8418 PRINT CHR$(223);

8419 NEXT K

8420 NEXT I:GOTO 8890

8500 PRINT TAB(17)"(";CHR$(223);" represents 1 % of total  "INT(S2)  MU$;")":PRINT

8501 PRINT TAB(3)"P a r t";TAB(25)"0         10        20        30        40        50 %"

8502 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

8504 FOR I=1 TO N

8505 Z1=W(I)/S1*100

8510 IF Z1<1 THEN GOTO 8511 ELSE 8514

8511 IF Z1>0 THEN GOTO 8512 ELSE 8514

8512 PRINT TAB(3)USING"\                  \";NA$(I);

8513 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 8519

8514 PRINT TAB(3)USING"\                  \";NA$(I);

8515 PRINT TAB(25)CHR$(179);

8516 FOR K=1 TO Z1

8517 PRINT CHR$(223);

8518 NEXT K

8519 NEXT I

8890 ERASE NA$,W:NA$="":W=0:W(I)=0

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 GOTO 645

8982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8983 IF R$="y" OR R$="n" THEN GOTO 8984 ELSE 8990

8984 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.9-ANIMAL POPULATION HEALTH PROGRAMME/MEASURES' COVERAGE"

9005 PRINT"========================================================="

9050 PRINT"This subprogramme calculates the programme/measures' coverage"

9051 PRINT TAB(8)"      (control, investigation, vaccination, treatment, etc.) of:"

9052 PRINT TAB(6)"1) animal population   2) herds/farms   3) territory   4) time"

9058 INPUT"Enter choice number: ",CH

9060 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 9100 ELSE 9980

9100 PRINT"INPUT DATA:"

9101 INPUT"     programme ";PR$

9102 INPUT"     epi. risk (disease) ";ER$

9103 INPUT"     epi. measures ";ME$

9104 INPUT"     species, category(ies) ";SP$,CA$

9105 INPUT"     place, period ";LU$,TI$:PRINT

9110 IF CH=1 THEN GOTO 9120

9111 IF CH=2 THEN GOTO 9130

9112 IF CH=3 THEN GOTO 9140

9113 IF CH=4 THEN GOTO 9146

9120 INPUT"     total number of animals                                 ";A

9121 IF A=0 THEN PRINT IDM$:GOTO 9980 ELSE 9122

9122 INPUT"     number of animals at epi. risk                          ";AR

9123 INPUT"     number of animals under epi. measures                   ";E

9124 INPUT"     number of animals in specific disease foci              ";J:PRINT

9125 INPUT"     number of treated animals                               ";B

9126 INPUT"     number of diseased animals                              ";C

9127 INPUT"     number of treated diseased animals                      ";D

9129 PRINT:GOTO 9200

9130 INPUT"     total number of herds (farms)                           ";H

9131 IF H=0 THEN PRINT IDM$:GOTO 9980 ELSE 9132

9132 INPUT"     number of herds (farms) at epi. risk                    ";HR

9133 INPUT"     number of herds (farms) under epi. measures             ";I

9139 PRINT:GOTO 9200

9140 INPUT"     surface measure units                                   ";SMU$:PRINT

9141 INPUT"     total evaluated territory (in surface units)            ";F

9142 IF F=0 THEN PRINT IDM$:GOTO 9980 ELSE 9143

9143 INPUT"     territory at epi. risk (in surface units)               ";FR

9144 INPUT"     territory under epi. measures (in surface units)        ";G:GOTO 9200

9146 INPUT"     time measure units ";TMU$

9147 INPUT"     total evaluated period (in time units)                  ";TP:PRINT

9148 INPUT"     duration of epi. measures (in time units)               ";EP

9149 IF TP=0 OR EP=0 THEN PRINT IDM$:GOTO 9980 ELSE 9200

9200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9202 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9203 IF I$="m" THEN GOTO 10

9204 IF I$="c" THEN GOTO 9000

9205 IF I$=CHR$(13) THEN GOTO 9206

9206 CLS:PRINT TAB(6)"ANIMAL  POPULATION  HEALTH  PROGRAMME/MEASURES'  COVERAGE":PRINT

9207 PRINT TAB(6)"Programme: "PR$

9210 PRINT TAB(6)"Epi. risk: "ER$

9211 PRINT TAB(6)"Epi. measures: "ME$

9212 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

9213 PRINT"Place: "LU$;TAB(50)"Period: "TI$

9214 IF CH=4 THEN PRINT TAB(6)"Time measure units: "TMU$ ELSE GOTO 9215

9215 PRINT

9216 IF CH=1 THEN GOTO 9400

9217 IF CH=2 THEN GOTO 9420

9218 IF CH=3 THEN GOTO 9440

9220 IF CH=4 THEN GOTO 9500 ELSE 9980

9400 IF AR>0 AND E>0 THEN PRINT"        Proportion of animals at epi. risk                    =   ";USING"#.####";AR/A:PRINT

9402 IF A>0 AND E>0 THEN PRINT"        Proportion of animals under epi. measures             =   ";USING"#.####";E/A:PRINT

9404 IF AR>0 AND E>0 THEN PRINT"        Ratio of animals at epi. risk / under measures        = ";USING"###.####";AR/E

9405 IF AR>0 AND E>0 THEN PRINT"        Ratio of animals under epi. measures / at risk        = ";USING"###.####";E/AR:PRINT

9406 IF B>0 AND A>0 THEN PRINT"        Proportion of treated animals                         =   ";USING"#.####";B/A

9407 IF D>0 AND C>0 THEN PRINT"        Proportion of treated from diseased animals           =   ";USING"#.####";D/C:PRINT

9409 IF J>0 AND E>0 THEN PRINT"        Ratio of animals under measures / intrafocal          = ";USING"###.####";E/J

9410 IF J>0 AND E>0 THEN PRINT"        Ratio of animals intrafocal / under measures          = ";USING"###.####";J/E

9419 GOTO 9980

9420 IF HR>0 AND H>0 THEN PRINT"        Proportion of herds at epi. risk                    =   "USING"#.####";HR/H:PRINT

9422 IF I>0 AND H>0 THEN PRINT"        Proportion of herds under epi. measures             =   "USING"#.####";I/H

9423 PRINT:PRINT

9424 IF HR>0 AND I>0 THEN PRINT"        Ratio of herds at epi. risk / under measures        = "USING"###.####";HR/I:PRINT

9425 IF HR>0 AND I>0 THEN PRINT"        Ratio of herds under epi. measures / at risk        = "USING"###.####";I/HR:PRINT

9439 GOTO 9980

9440 IF FR>0 AND F>0 THEN PRINT"        Proportion of territory at epi. risk            =   "USING"#.####";FR/F:PRINT

9442 IF G>0 AND F>0 THEN PRINT"        Proportion of territory under epi. measures     =   "USING"#.####";G/F

9443 PRINT:PRINT

9444 IF FR>0 AND G>0 THEN PRINT"        Ratio territory at epi. risk / under measures   = "USING"###.####";FR/G:PRINT

9445 IF FR>0 AND G>0 THEN PRINT"        Ratio territory under epi. measures / at risk   = "USING"###.####";G/FR:PRINT:GOTO 9980

9500 IF TP>0 AND EP>0 THEN PRINT"        Proportion of time period under epi. measures   =  "USING"###.####";EP/TP:PRINT

9550 PRINT"        Ratio time period with/without epi. measures    =  "USING"###.####";EP/(TP-EP):PRINT

9551 PRINT"        Ratio time period without/with epi. measures    =  "USING"###.####";(TP-EP)/EP

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.10-PLANNING/PROGNOSIS OF REDUCING NIDALITY, MORTALITY AND LOSSES"

10005 PRINT"=================================================================="

10010 PRINT"This programme calculates plans eventually prognosis for reduction of specific"

10012 PRINT"disease nidality (foci number), mortality and losses due to diseases"

10052 PRINT TAB(10)"1) in  linear form"

10053 PRINT TAB(10)"2) in  curve form"

10055 INPUT"Enter choice number: ",CH

10056 IF CH=1 OR CH=2 THEN GOTO 10100 ELSE 10980

10100 PRINT"INPUT DATA:"

10101 INPUT"     disease(s) ";DI$

10102 INPUT"     species, category(ies) ";ES$,CA$

10103 INPUT"     place, period ";LU$,PE$

10104 PRINT"     Do you want to plan the reduction of nidality (f),"

10105 INPUT"                                           mortality (m) or losses (l) ";T$

10106 IF T$="f" OR T$="m" OR T$="l" THEN GOTO 10108 ELSE PRINT IDE$:GOTO 10980

10108 IF T$="f" THEN INPUT"     type of nidality (foci)  ";TF$

10109 IF T$="m" THEN INPUT"     type of mortality  ";TM$

10110 IF T$="l" THEN INPUT"     type of losses  ";TL$

10116 IF T$="f" THEN H$="foci "

10117 IF T$="m" THEN H$="deaths"

10118 IF T$="l" THEN H$="losses"

10119 IF T$="l" THEN INPUT"     losses measure units (up to 10 characters !)             ";LMU$

10123 INPUT"     time measure unit (up to 10 characters !)                ";UT$

10124 IF T$="f" THEN L$="N I D A L I T Y" ELSE GOTO 10125

10125 IF T$="m" THEN L$="M O R T A L I T Y" ELSE GOTO 10126

10126 IF T$="l" THEN L$="L O S S E S"

10127 IF T$="l" THEN PRINT"     number of losses in "LMU$:GOTO 10129

10128 PRINT:PRINT"     number of ";H$

10129 INPUT"                            at the beginning of the programme ";MAX

10130 IF T$="l" THEN PRINT"     r e d u c e d   losses in "LMU$:GOTO 10132

10131 PRINT"     r e d u c e d   number of ";H$

10132 INPUT"                       planned for the end of the programme   ";MIN

10133 PRINT"     planned period for objective achievement"

10134 INPUT"                         in time measure units (up to 18 !)   ";MM

10135 IF MAX=0 OR MM=0 THEN PRINT IDE$:GOTO 10980 ELSE 10136

10136 IF MIN>=MAX THEN GOTO 10137 ELSE 10140

10137 PRINT:PRINT"Error ! The number at the end must be minor than at the beginning !":GOTO 10980

10140 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10141 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10142 IF I$="m" THEN GOTO 10

10143 IF I$="c" THEN GOTO 10000

10144 IF I$=CHR$(13) THEN GOTO 10150

10150 LET A=(MAX-MIN)/2

10160 D=57.2958:REM:coeficiente de conversion de radianos en los grados

10170 LET V=2*MM

10180 B=360/V:S=1:GOTO 10200

10185 REM:10189-10197 je vyrazeno - zbytecna komplikace !!

10189 PRINT:PRINT"     average duration of intervals (subperiods)"

10190 INPUT"       for partial data calculation (in time measure units)   ";S

10191 IF S=0 THEN S=1

10192 IF MM/S=>18 THEN GOTO 10193 ELSE 10200:REM: jumping over !

10193 PRINT:PRINT"Please, reconsider this last input ! It is too small"

10194 PRINT"        - a part of displayed result will be out of one screen !"

10195 INPUT"                        Do wou want to correct it, yes(y) or no(n) ";U$

10196 IF U$="y" OR U$="n" THEN GOTO 10197 ELSE 10200

10197 IF U$="n" THEN GOTO 10200 ELSE 10189

10200 CLS:PRINT TAB(7)"PLAN/PROGNOSIS  OF  "L$;"   R E D U C T I O N ":PRINT

10201 PRINT TAB(10)"Disease(s): "DI$

10202 PRINT"Species: "ES$;TAB(40)"Category(ies): "CA$

10203 PRINT"Place: "LU$;TAB(50)"Period: "PE$

10204 IF T$="f" THEN PRINT"Type of foci: "TF$

10205 IF T$="m" THEN PRINT"Type of mortality: "TM$

10206 IF T$="l" THEN PRINT"Type of losses: "TL$;TAB(40)"Losses units: "LMU$

10207 IF T$="l" THEN H$=LMU$

10208 PRINT"Initial number: "MAX H$;TAB(40)"Final number: "MIN H$:PRINT

10210 PRINT TAB(10)"Time"TAB(25)"Supposed Number";TAB(50)"Percentage"

10211 PRINT" End of";TAB(10)USING"\        \";UT$;

10212 PRINT TAB(25)"of "H$;

10213 PRINT TAB(50)"of Initial Number":PRINT

10214 PRINT TAB(11)"(start)";TAB(27)INT(MAX+.5);TAB(52)"100.0000":REM:USING"###.####";(MIN/MAX)*100

10215 IF CH=1 THEN GOTO 10300 ELSE 10400

10300 U=0

10310 FOR I=1 TO MM STEP S

10325 U=U+(MAX-MIN)/(MM/S)

10329 PRINT TAB(5)I;

10331 PRINT TAB(27)INT((MAX-U)+.5);TAB(52)USING"###.####";((MAX-U)/MAX)*100

10332 NEXT I

10333 GOTO 10449

10400 REM:choice 2

10420 FOR I=1 TO MM STEP S

10428 PRINT TAB(5)I;

10431 PRINT TAB(27)INT((A*SIN((I*B+90)/D)+A+MIN)+0.5);

10432 PRINT TAB(52)USING"###.####";((A*SIN((I*B+90)/D)+A+MIN)/MAX)*100

10440 NEXT I

10449 A$=INKEY$:IF A$="" THEN GOTO 10449

10451 CLS:PRINT TAB(10)"PLAN/PROGNOSIS  OF   "L$;"   R E D U C T I O N"

10452 PRINT TAB(11)"(";CHR$(223);" represents 2 % of initial  "INT(MAX);

10453 PRINT"  ";H$;" )":PRINT

10454 PRINT TAB(3)"End of ";USING"\        \";UT$;

10455 PRINT TAB(25)"0         20        40        60        80       100 %"

10456 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

10457 PRINT TAB(11)"(Start)";TAB(25)CHR$(179);

10458 FOR Z=1 TO 50:PRINT CHR$(223);

10459 NEXT Z

10460 IF CH=1 THEN GOTO 10461 ELSE 10523

10461 U=0

10462 FOR I=1 TO MM STEP S

10463 U=U+(MAX-MIN)/(MM/S)

10466 Z= ((MAX-U)/MAX)*50

10467 IF Z<1 THEN GOTO 10468 ELSE 10472

10468 IF Z>0.1 THEN GOTO 10469 ELSE 10472

10469 PRINT TAB(5)I;TAB(25)CHR$(179);CHR$(249):GOTO 10480

10472 PRINT TAB(5)I;TAB(25)CHR$(179);

10473 FOR K=1 TO Z

10474 PRINT CHR$(223);

10475 NEXT K

10480 NEXT I

10490 GOTO 10980

10523 LET U=0

10524 FOR I=1 TO MM STEP S

10526 Z1=((A*SIN((I*B+90)/D)+A+MIN)/MAX)*50

10527 IF Z1<1 THEN GOTO 10528 ELSE 10532

10528 IF Z1>0.1 THEN GOTO 10529 ELSE 10532

10529 PRINT TAB(5)I;TAB(25)CHR$(179);CHR$(249):GOTO 10560

10532 PRINT TAB(5)I;TAB(25)CHR$(179);

10533 FOR K=1 TO Z1

10534 PRINT CHR$(223);

10550 NEXT K

10560 NEXT I

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10982 IF R$="y" OR R$="n" THEN GOTO 10983 ELSE 10990

10983 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"9.11-PLANNING/PROGNOSIS OF EXPANDING SPECIFIC DISEASE FREE TERRITORY"

11005 PRINT"===================================================================="

11010 PRINT"This programme calculates the plans or prognoses for specific disease free"

11012 PRINT"territory expanding (in territory surface units, herds, farms, ranches, etc.)"

11052 PRINT TAB(10)"1) in  linear form"

11053 PRINT TAB(10)"2) in  curve form"

11055 INPUT"Enter choice number: ",CH

11056 IF CH=1 OR CH=2 THEN GOTO 11100 ELSE 11980

11100 PRINT"INPUT DATA:"

11101 INPUT"     specific health ";SE$

11102 INPUT"     species ";ES$

11103 INPUT"     place, period ";LU$,PE$

11104 PRINT"     Do you want to plan in terms of territory surface (t), herds (h),"

11105 INPUT"     farms (f), ranches (r), districts (d), regions (g) or zones (z)  ";T$

11106 IF T$="t" OR T$="h" OR T$="f" OR T$="r" OR T$="d" OR T$="g" OR T$="z" THEN GOTO 11108 ELSE PRINT IDE$:GOTO 11980

11108 IF T$="t" THEN INPUT"     type of territory ";TM$

11109 IF T$="h" THEN INPUT"     type of herds     ";TH$

11110 IF T$="f" THEN INPUT"     type of farms     ";TF$

11111 IF T$="r" THEN INPUT"     type of ranches   ";TR$

11112 IF T$="d" THEN INPUT"     type of districts  ";TR$

11113 IF T$="g" THEN INPUT"     type of regions   ";TR$

11114 IF T$="z" THEN INPUT"     type of zones   ";TR$

11115 IF T$="t" THEN INPUT"     territory surface measure units "TMU$

11116 IF T$="t" THEN H$=TMU$

11117 IF T$="h" THEN H$="herds"

11118 IF T$="f" THEN H$="farms"

11119 IF T$="r" THEN H$="ranches"

11120 IF T$="d" THEN H$="districts"

11121 IF T$="g" THEN H$="regions"

11122 IF T$="z" THEN H$="zones"

11123 INPUT"     time measure unit (up to 10 characters) ";UT$:PRINT

11125 PRINT"     number of disease free ";H$

11126 INPUT"                          at the beginning of the programme     ";MIN

11127 PRINT"     i n c r e a s e d   number of disease free ";H$

11128 INPUT"                         planned for the end of the programme   ";MAX

11129 PRINT"     planned period for objective achievement"

11130 INPUT"                           in time measure units (up to 18 !)   ";MM

11131 IF MAX=0 OR MM=0 THEN PRINT IDE$:GOTO 11980 ELSE 11132

11132 IF MIN>MAX THEN GOTO 11133 ELSE 11140

11133 PRINT:PRINT"Error ! The number at the end must be major than at the beginning !":GOTO 11980

11140 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11141 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11142 IF I$="m" THEN GOTO 10

11143 IF I$="c" THEN GOTO 11000

11144 IF I$=CHR$(13) THEN GOTO 11150

11150 LET A=(MAX-MIN)/2

11160 D=57.2958:REM:coeficiente de conversion de radianos en los grados

11170 LET V=2*MM

11180 B=360/V:S=1:GOTO 11200:REM:jumping over!

11189 PRINT:PRINT"     average duration of intervals (subperiods)"

11190 INPUT"       for partial data calculation (in time measure units)   ";S

11191 IF S=0 THEN S=1

11192 IF MM/S=>18 THEN GOTO 11193 ELSE 11200

11193 PRINT:PRINT"Please, reconsider this last input! It is too small"

11194 PRINT"           - a part of displayed result will be out of one screen!"

11195 INPUT"                        Do you want to correct it, yes(y) or no(n) ";U$

11196 IF U$="y" OR U$="n" THEN GOTO 11197 ELSE 11200

11197 IF U$="n" THEN GOTO 11200 ELSE 11189

11200 CLS:PRINT TAB(5)"PLAN/PROGNOSIS  OF  EXPANDING  SPECIFIC  DISEASE  FREE  TERRITORY"

11201 PRINT "Specific health: "SE$;TAB(55)"Species: "ES$

11202 PRINT"Place: "LU$;TAB(50)"Period: "PE$

11205 PRINT"Disease free "; H$;":";

11207 PRINT TAB(27)"Initial number:"MIN;

11208 PRINT TAB(55)"Final number:"MAX:PRINT

11210 PRINT TAB(10)"Time"TAB(25)"Supposed Number";TAB(50)"Percentage"

11211 PRINT TAB(5)"End of "USING"\        \";UT$;

11212 PRINT TAB(25)"of Disease Free";TAB(50)"of Final Number"

11213 PRINT TAB(25) H$:PRINT

11214 PRINT TAB(6)"(start)";TAB(27)INT(MIN+.5);TAB(50)USING"###.####";(MIN/MAX)*100

11215 IF CH=1 THEN GOTO 11300 ELSE 11400

11300 U=0

11310 FOR I=1 TO MM STEP S

11325 U=U+(MAX-MIN)/(MM/S)

11330 PRINT TAB(5)I;

11331 PRINT TAB(27)INT((MIN+U)+.5);TAB(50)USING"###.####";((MIN+U)/MAX)*100

11332 NEXT I

11333 GOTO 11448

11400 REM:choice 2

11420 FOR I=1 TO MM STEP S

11430 PRINT TAB(5)I;

11431 PRINT TAB(27)INT((A*SIN((I*B-90)/D)+A+MIN)+0.5);

11432 PRINT TAB(50)USING"###.####";((A*SIN((I*B-90)/D)+A+MIN)/MAX)*100

11440 NEXT I

11448 A$=INKEY$:IF A$="" THEN GOTO 11448

11449 'IF S<1 AND S<>0.5 THEN GOTO 11981 ELSE 11450

11450 CLS:PRINT TAB(5)"PLAN/PROGNOSIS  OF  EXPANDING  SPECIFIC  DISEASE  FREE  TERRITORY"

11451 PRINT TAB(5)"(";CHR$(223);" represents 2 % of final planned disease free "INT(MAX);

11452 PRINT H$;" )":PRINT

11453 PRINT TAB(6)"End of "USING"\        \";UT$;

11454 PRINT TAB(25)"0         20        40        60        80       100 %"

11456 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11457 PRINT TAB(6)"(start)";TAB(25)CHR$(179);

11458 FOR Z=1 TO (MIN/MAX)*50:PRINT CHR$(223);

11459 NEXT Z

11460 IF CH=1 THEN GOTO 11461 ELSE 11523

11461 U=0

11462 FOR I=1 TO MM STEP S

11463 U=U+(MAX-MIN)/(MM/S)

11466 Z= ((MIN+U)/MAX)*50

11467 IF Z<1 THEN GOTO 11468 ELSE 11472

11468 IF Z>0.1 THEN GOTO 11469 ELSE 11472

11469 PRINT TAB(5)I;TAB(25)CHR$(179);CHR$(249):GOTO 11480

11472 PRINT TAB(5)I;TAB(25)CHR$(179);

11473 FOR K=1 TO Z

11474 PRINT CHR$(223);

11475 NEXT K

11480 NEXT I

11490 GOTO 11980

11523 LET U=0

11524 FOR I=1 TO MM STEP S

11525 REM:U=U+R

11526 Z1=((A*SIN((I*B-90)/D)+A+MIN)/MAX)*50

11527 IF Z1<1 THEN GOTO 11528 ELSE 11532

11528 IF Z1>0.1 THEN GOTO 11529 ELSE 11532

11529 PRINT TAB(5)I;TAB(25)CHR$(179);CHR$(249):GOTO 11560

11532 PRINT TAB(5)I;TAB(25)CHR$(179);

11533 FOR K=1 TO Z1

11534 PRINT CHR$(223);

11550 NEXT K

11560 NEXT I

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11982 IF R$="y" OR R$="n" THEN GOTO 11983 ELSE 11990

11983 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

11996 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

12000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

12002 IF Z$="y" OR Z$="n" THEN GOTO 12010 ELSE 12030

12010 IF Z$="y" THEN GOTO 12020 ELSE 12030

12020 CHAIN"EPIZ40MM.KOU"

12030 SYSTEM

 

 

10-Cost and efficiency of animal population health programmes

 

5 ON ERROR GOTO 14995

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4010.KOU":REM:16/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"10-COST AND EFFICIENCY OF ANIMAL POPULATION HEALTH PROGRAMMES"

40 PRINT TAB(10)"============================================================="

500 PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S"

510 PRINT TAB(10)"1-Simple indicators of economic benefit/cost analysis"

520 PRINT TAB(10)"2-Simple absolute economic benefit of animal health programme"

530 PRINT TAB(10)"3-Biological cost/effectiveness of animal health programme"

540 PRINT TAB(10)"4-Public health cost/effectiveness of animal health programme"

550 PRINT TAB(10)"5-Production cost/effectiveness of animal health programme"

560 PRINT TAB(10)"6-Effectiveness of prophylactic measures and recovery rates"

570 PRINT TAB(10)"7-Final situation in populations with and without programme"

580 PRINT TAB(10)"8-Consumption and cost of vaccines, drugs and other substances"

590 PRINT TAB(10)"9-Programme benefit/cost ratio in discounted monetary values"

600 PRINT TAB(10)"10-Programme benefit/cost ratio in cumulative monetary values"

603 PRINT TAB(10)"11-Economic effect after specific animal disease eradication"

604 PRINT TAB(10)"12-Public health effect of specific zoonosis eradication"

605 PRINT TAB(10)"13-Biological effect of specific animal disease eradication"

607 PRINT TAB(10)"14-Implementation of animal population health programme":PRINT

610 PRINT TAB(10)"15-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue with this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 15000

660 IF Z$="y" THEN GOTO 20 ELSE GOTO 15000

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 OR CH=14 OR CH=15 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000,15000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.1-SIMPLE INDICATORS OF ECONOMIC BENEFIT/COST ANALYSIS"

1001 PRINT"     OF ANIMAL POPULATION HEALTH PROGRAMME"

1010 PRINT"========================================================"

1100 PRINT"INPUT DATA:"

1101 INPUT"     programme ";PE$

1102 INPUT"     place, period ";LU$,TI$

1103 INPUT"     monetary units ";MO$

1104 INPUT"     number of data in pairs (up to 11 !) - cost/benefit ";N

1105 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 1980

1119 PRINT:PRINT TAB(6)"List data (numbers as integers !):"

1120 FOR I=1 TO N

1121 PRINT TAB(3)I;" ";

1122 INPUT"pair name, total cost, total benefit ";NA$(I),A#(I),B#(I)

1123 IF NA$(I)="" THEN PRINT IDM$:GOTO 1980 ELSE 1126

1126 NEXT I

1130 B#=0:A#=0

1131 FOR I=1 TO N

1132 B#=B#+B#(I)

1133 NEXT I

1134 FOR I=1 TO N

1135 A#=A#+A#(I)

1136 NEXT I

1140 IF B#=0 OR A#=0 THEN PRINT IDM$:GOTO 1980

1190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1192 IF I$="m" THEN GOTO 10

1193 IF I$="c" THEN GOTO 1000

1194 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT"  ECONOMIC BENEFIT/COST ANALYSIS OF ANIMAL POPULATION HEALTH PROGRAMMES":PRINT

1210 PRINT"Programme: "PE$:PRINT

1215 PRINT"Place: "LU$;TAB(50)"Period: "TI$

1220 PRINT"Total cost: "INT(A#) MO$;TAB(40)"Total benefit: "INT(B#) MO$:PRINT

1230 PRINT:PRINT"     Simple absolute efficiency (benefit)          = "TAB(56)B#-A#  MO$

1235 PRINT:PRINT

1240 PRINT"     Benefit/cost ratio (relative efficiency)       = "TAB(56)USING"###.####";B#/A#

1245 PRINT:PRINT TAB(52)" =  1 :";USING"###.####";A#/B#

1248 PRINT

1250 PRINT"     Cost/benefit ratio                             = "TAB(56)USING"###.####";A#/B#

1260 PRINT:PRINT TAB(52)" =  1 :";USING"###.####";B#/A#

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1982 CLS:NA$="":A=0:B=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1983 IF R$="y" OR R$="n" THEN GOTO 1984 ELSE 1990

1984 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.2-SIMPLE ABSOLUTE ECONOMIC BENEFIT OF ANIMAL HEALTH PROGRAMME"

2010 PRINT"================================================================"

2050 PRINT"Applicable only when the situation has been improved !! As the phenomena can be"

2051 PRINT"beside animal health/disease indicators, also relevant public health, economic,"

2052 PRINT"biological, ecological and social indicators relevant to animal health."

2100 PRINT:PRINT"INPUT DATA:":PRINT

2105 INPUT"     programme ";PE$

2106 INPUT"     place, period ";LU$,TI$

2107 INPUT"     number of subperiods ";N

2108 IF N=0 THEN PRINT IDM$:GOTO 2980

2109 INPUT"     phenomenon ";IN$

2110 INPUT"     measure units ";UM$

2111 PRINT

2112 PRINT"     The calculation, is it based on health benefit (positive) data (p)"

2113 INPUT"                                       or on losses (negative) data (n) ";C$:PRINT

2119 IF C$="n" GOTO 2122

2120 IF C$="p" GOTO 2140

2121 IF C$<>"p" AND C$<>"n" THEN PRINT IDE$:GOTO 2980

2122 PRINT"     values of losses caused by morbidity in pair :":PRINT

2123 INPUT"                                         initial (m a j o r) ";D:PRINT

2124 INPUT"                                         final (m i n o r)   ";C

2130 GOTO 2180

2140 PRINT"     values of benefit of population health in pair :":PRINT

2141 INPUT"                                         initial (m i n o r) ";C:PRINT

2142 INPUT"                                         final (m a j o r)   ";D

2180 IF C+D=0 THEN PRINT IDM$:GOTO 2980 ELSE 2181

2181 IF C$="n" AND D<C OR C$="p" AND C>D THEN PRINT:PRINT IDE$:GOTO 2980 ELSE 2190

2190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2192 IF I$="m" THEN GOTO 10

2193 IF I$="c" THEN GOTO 2000

2194 IF I$=CHR$(13) THEN GOTO 2200

2200 CLS:PRINT TAB(10)"E C O N O M I C   B E N E F I T  OF ANIMAL HEALTH PROGRAMME":PRINT

2201 PRINT"Programme: "PE$

2202 PRINT:PRINT"Place: "LU$;TAB(50)"Period: "TI$

2203 PRINT"Phenomenon: "IN$;TAB(45)"Subperiods: "N

2204 PRINT:PRINT

2205 PRINT

2210 IF C$="n" THEN GOTO 2230 ELSE 2220

2220 IF C$="p" THEN GOTO 2240 ELSE 2980

2230 PRINT TAB(6)"Disease losses reduction benefit ":PRINT

2231 'PRINT"          due to the programme = "A-B;

2232 PRINT"          due to the programme = "D-C;

2233 PRINT""UM$

2234 'PRINT:PRINT"                    i.e. average per subperiod = "INT(((A-B)/N)+.5);

2235 PRINT:PRINT"                    i.e. average per subperiod = "INT(((D-C)/N)+.5);

2236 PRINT""UM$:PRINT

2237 PRINT"                              i.e. total decrease by  =  ";USING"###.#### %";((D-C)/D)*100

2239 GOTO 2300

2240 PRINT TAB(6)"Health increase benefit":PRINT

2241 PRINT"          due to the programme  = ";D-C;

2250 PRINT""UM$

2251 PRINT:PRINT"                        i.e. average per subperiod = "INT(((D-C)/N)+.5);

2252 PRINT""UM$:PRINT

2260 PRINT"                              i.e. total increase by  =  ";USING"###.#### %";((D-C)/D)*100

2300 A$=INKEY$:IF A$="" THEN GOTO 2300

2301 CLS

2302 IF C$="p" THEN PRINT TAB(8)"E C O N O M I C   B E N E F I T  OF ANIMAL HEALTH PROGRAMME"

2303 IF C$="n" THEN PRINT TAB(7)"ECONOMIC BENEFIT OF ANIMAL HEALTH PROGRAMME DUE TO LOSSES REDUCTION"

2352 IF C$="n" THEN GOTO 2353 ELSE 2355

2353 PRINT TAB(10)"Values:"

2354 PRINT TAB(19)"Initial: "C UM$;TAB(50)"Final: "D UM$:GOTO 2357

2355 PRINT TAB(10)"Values:"

2356 PRINT TAB(20)"Initial: "C UM$;TAB(50)"Final: "D UM$

2357 PRINT:PRINT TAB(15)"Subperiod";TAB(36)"Supposed";TAB(55)"Percentage"

2361 PRINT TAB(36)"Value";TAB(55)"of Maximum"

2362 PRINT TAB(36)UM$;TAB(55)"Value":PRINT

2363 GOTO 2380:'IF C$="n" THEN GOTO 2364 ELSE 2380

2364 PRINT TAB(24)"(start)";TAB(35)INT(A);TAB(55)"100.0000"

2365 S=0

2366 FOR I= 1 TO N

2367 S=S+(A-B)/N

2368 PRINT TAB(17)I;TAB(35)INT(A-S);TAB(55)USING"###.####";(A-S)/A*100

2379 NEXT I:GOTO 2400

2380 PRINT TAB(18)"(start)";TAB(35)INT(C);TAB(55)USING"###.####";(C/D)*100

2390 S=0

2391 FOR I=1 TO N

2392 S=S+(D-C)/N

2393 PRINT TAB(17)I;TAB(35)INT((D-(D-S)+C));TAB(55)USING"###.####";((D-(D-S))+C)/D*100

2394 NEXT I

2400 A$=INKEY$:IF A$="" THEN GOTO 2400

2402 CLS:PRINT TAB(9)"E C O N O M I C   B E N E F I T  OF ANIMAL HEALTH  P R O G R A M M E"

2403 PRINT TAB(10)"(";CHR$(223);" represents 2 % of maximum value of";

2404 PRINT INT(D) UM$;" gained)"

2414 PRINT

2415 PRINT TAB(10)"Subperiod";TAB(25)"0         20        40        60        80       100 %"

2416 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

2417 GOTO 2423:'IF C$="n" THEN GOTO 2418 ELSE 2423

2418 'PRINT TAB(7)"(start)";TAB(25)CHR$(179);

2419 'FOR P=1 TO 50:PRINT CHR$(223);

2420 'NEXT P:GOTO 2440

2423 PRINT TAB(11)"(start)";TAB(25)CHR$(179);

2424 FOR P=1 TO C/(D/50):PRINT CHR$(223);

2425 NEXT P

2440 LET S=0

2480 S=0

2481 FOR I=1 TO N

2487 S=S+(D-C)/N

2489 Z=((D-(D-S))+C)/D*50

2490 IF Z<1 THEN GOTO 2491 ELSE 2494

2491 IF Z>0 THEN GOTO 2492 ELSE 2494

2492 PRINT TAB(10)I;TAB(25)CHR$(179);CHR$(249):GOTO 2498

2494 PRINT TAB(10)I;TAB(25)CHR$(179);

2495 FOR K=1 TO Z

2496 PRINT CHR$(223);

2497 NEXT K

2498 NEXT I

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2983 ELSE 2990

2983 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.3-BIOLOGICAL COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME"

3010 PRINT"============================================================="

3020 PRINT"Desirable changes in: animal population size/structure, health, morbidity,"

3021 PRINT"mortality, nidality, vectors/reservoirs occurrence, other disease sources,"

3022 PRINT"etiological agents and their transmission, ecological conditions, territorial"

3023 PRINT"distribution, population/territory at risk, etc."

3024 PRINT"Applicable only when the  s i t u a t i o n   h a s  b e e n   i m p r o v e d !"

3100 PRINT"INPUT DATA:"

3105 INPUT"     programme ";EP$

3106 INPUT"     place, period ";A$,B$

3110 INPUT"     biological phenomenon ";F$

3140 INPUT"     biological phenomenon measure units ";U$

3150 INPUT"     input (cost) measure units          ";M$

3160 INPUT"                          total cost (input) of the programme ";C

3161 IF C=0 THEN PRINT IDM$:GOTO 3980 ELSE 3201

3201 'PRINT

3202 PRINT"     Is the biological phenomenon desirable - positive (p),"

3203 PRINT"         i.e. with  m a j o r (!!) final value "

3205 PRINT"                       or     not desirable - negative (n),"

3206 INPUT"         i.e. with  m i n o r (!!) final value                ";R$:PRINT

3207 IF R$="p" OR R$="n" THEN GOTO 3210 ELSE PRINT IDE$:GOTO 3980

3210 PRINT"     number of biological phenomenon measure units"

3212 INPUT"                                 at the programme beginning   ";VI

3220 INPUT"                                 at the programme end         ";VF

3221 IF R$="n" AND VF>VI OR R$="p" AND VF<VI THEN PRINT IDE$:GOTO 3980

3222 IF (VI+VF)=0 THEN PRINT IDM$:GOTO 3980

3290 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3291 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3292 IF I$="m" THEN GOTO 10

3293 IF I$="c" THEN GOTO 3000

3294 IF I$=CHR$(13) THEN GOTO 3300

3300 CLS:PRINT TAB(6)"BIOLOGICAL COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME":PRINT

3310 PRINT"Programme: "EP$

3315 PRINT"Biological phenomenon: "F$

3320 PRINT"Place: "A$;TAB(50)"Period: "B$

3330 PRINT"Biological units: "U$

3331 PRINT"Input units: "M$;TAB(40)"Total cost (input): "INT(C)

3340 PRINT:PRINT

3350 IF R$="p" THEN GOTO 3360 ELSE 3380

3360 D=VF-VI:GOTO 3400

3380 D=VF-VI

3400 PRINT"     Difference between the initial and final values"

3401 PRINT TAB(15)"of the biological phenomenon = "INT(D) U$

3410 PRINT

3415 M=C/D:IF R$="n" THEN M=-M

3420 PRINT"     Change of biological phenomenon total value by every biological unit"

3421 PRINT TAB(15)"costs in average ";USING"########.####";M;

3422 PRINT"  "M$

3430 PRINT

3431 N=D/C

3440 PRINT"     Theoretically, for every input unit the total value"

3441 PRINT TAB(10)"of the biological phenomenon can be changed in average"

4442 PRINT"                                    by ";USING"###.########";N;

3443 PRINT"  "U$

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.4-PUBLIC HEALTH COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME"

4010 PRINT"================================================================"

4015 PRINT"Desirable changes in human population in terms: of zoonoses' risk grade,"

4016 PRINT"zoonoses incidence, prevalence, nidality, mortality, invalidity, territorial"

4017 PRINT"distribution, cost of treatment, etc."

4018 PRINT"Applicable only when the  s i t u a t i o n   h a s  b e e n   i m p r o v e d !"

4100 PRINT"INPUT DATA:"

4105 INPUT"     programme ";EP$

4107 INPUT"     place, period ";A$,B$

4110 INPUT"     public health phenomenon ";F$

4120 INPUT"     public health phenomenon measure units ";U$

4122 INPUT"     input (cost) units                     ";M$

4123 INPUT"                total input (cost) of the programme    ";C

4124 IF C=0 THEN PRINT IDM$:GOTO 4980 ELSE 4145

4145 PRINT"     Is the public health phenomenon desirable - positive (p),"

4153 PRINT"          i.e. with  m a j o r  (!!)  final value "

4155 PRINT"                            or   not desirable - negative (n),"

4156 INPUT"          i.e. with  m i n o r  (!!) final value                    ";R$:PRINT

4167 IF R$="p" OR R$="n" THEN GOTO 4170 ELSE PRINT IDE$:GOTO 4980

4170 PRINT"     number of public health phenomenon measure units":PRINT

4172 INPUT"                                    at the programme beginning ";VI

4180 INPUT"                                    at the programme end       ";VF

4181 IF R$="n" AND VF>VI THEN PRINT IDE$:GOTO 4980 ELSE 4182

4182 IF R$="p" AND VF<VI THEN PRINT IDE$:GOTO 4980 ELSE 4183

4183 IF (VI+VF)=0 THEN PRINT IDM$:GOTO 4980

4190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4192 IF I$="m" THEN GOTO 10

4193 IF I$="c" THEN GOTO 4000

4194 IF I$=CHR$(13) THEN GOTO 4200

4200 CLS:PRINT TAB(6)"PUBLIC HEALTH COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME":PRINT

4210 PRINT"Programme: "EP$

4212 PRINT"Place: "A$;TAB(50)"Period: "B$

4215 PRINT"Public health phenomenon: "F$

4230 PRINT TAB(6)"Public health units: "U$

4231 PRINT"Input units: "M$;TAB(40)"Total input (cost): "INT(C)

4240 PRINT:PRINT

4250 IF R$="p"THEN GOTO 4255 ELSE 4260

4255 D=VF-VI:GOTO 4300

4260 D=VF-VI

4270 PRINT

4300 PRINT"   Difference between the initial and final values";

4301 PRINT TAB(15)"of the public health phenomenon = "

4305 PRINT TAB(25)"=  ";INT(D) U$:PRINT

4306 M=C/D:IF R$="n" THEN M=-M

4310 PRINT"   Change of public health phenomenon total value by every public health unit "

4320 PRINT TAB(15)"costs in average ";USING"########.####";M;

4322 PRINT" "M$

4325 PRINT

4326 N=D/C

4330 PRINT"   Theoretically, for every input (cost) unit the total value"

4331 PRINT"        of the public health phenomenon can be changed in average"

4335 PRINT TAB(15)"by  ";USING"####.########";N;

4341 PRINT TAB(35)"public health units"

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.5-PRODUCTION COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME"

5010 PRINT"============================================================="

5011 PRINT"Applicable  o n l y  when the situation has been improved, i.e. for total value"

5012 PRINT"i n c r e a s e  of animal products (live animals, meat, milk, eggs, etc.)."

5020 PRINT

5100 PRINT"INPUT DATA:"

5105 INPUT"     programme ";EP$

5107 INPUT"     place, period ";A$,B$

5110 INPUT"     animal product                ";F$

5120 INPUT"     animal product measure units  ";U$

5122 INPUT"     monetary units (abbreviation) ";M$:PRINT

5123 INPUT"     total cost of the programme in monetary units    ";C#

5124 IF C#=0 THEN PRINT IDM$:GOTO 5980 ELSE 5160

5160 PRINT:PRINT"     quantity of animal product measure units"

5172 INPUT"                                    at the programme beginning ";VI

5175 INPUT"                                    at the programme end       ";VF

5176 PRINT:PRINT"     quality as  p r i c e  (adjusted for inflation)"

5177 PRINT"                             of one animal product measure unit"

5178 INPUT"                                    at the programme beginning ";QI

5180 INPUT"                                    at the programme end       ";QF

5182 IF (VI+VF)=0 OR (QI+QF)=0 OR (VI*QI)>=(VF*QF) THEN PRINT IDE$:GOTO 5980

5190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5192 IF I$="m" THEN GOTO 10

5193 IF I$="c" THEN GOTO 5000

5194 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT TAB(6)"PRODUCTION COST/EFFECTIVENESS OF ANIMAL HEALTH PROGRAMME":PRINT

5210 PRINT"Programme: "EP$

5212 PRINT"Place: "A$;TAB(50)"Period: "B$

5215 PRINT"Animal product: "F$

5230 'PRINT TAB(6)"Product measure units: "U$

5231 PRINT TAB(15)"Total input (cost): "INT(C#) M$:PRINT

5240 PRINT

5260 D=VF-VI

5270 'PRINT

5300 PRINT"     Difference between the initial and final quantity of";

5301 PRINT TAB(30)F$;" = ";

5305 PRINT INT(D) U$:IF D=<0 THEN GOTO 5351 ELSE 5306

5306 M=C#/D

5310 PRINT"     Increase of the quantity of  "F$;" by one ";U$

5320 PRINT TAB(30)"costs in average   ";

5321 PRINT USING"######.####";M;

5322 PRINT" ";M$

5323 'PRINT TAB(55)"of the input"

5325 'PRINT

5326 N=D/C#

5330 PRINT"     For every one ";M$;" input the quantity"

5331 PRINT TAB(30)"of ";F$;" increases in average"

5335 PRINT TAB(40)"by  ";USING"######.########";N;

5341 PRINT" ";U$

5351 DP=QF-QI

5360 DV=VF*QF-VI*QI

5406 PRINT:PRINT"     Difference between the initial and final monetary value of";

5407 PRINT TAB(30)F$;" =    ";

5408 PRINT INT(DV) M$

5410 M=C#/DV

5415 PRINT"     Increase of the monetary value of "F$;" by one ";M$

5420 PRINT TAB(30)"costs in average   ";

5421 PRINT USING"######.####";M;

5422 PRINT" ";M$

5423 'PRINT TAB(55)" of the input"

5425 'PRINT

5426 N=DV/C#

5430 PRINT"     For every one ";M$;" input the monetary value"

5431 PRINT TAB(30)"of ";F$;" increases in average"

5435 PRINT TAB(40)"by  ";USING"######.######";N;

5441 PRINT" ";M$

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.6-EFFECTIVENESS OF PROPHYLACTIC MEASURES AND RECOVERY RATES"

6010 PRINT"=============================================================="

6015 REM:dopracovat absolutni u 1 a relativni hodnoty u 2.

6020 PRINT"This subprogramme calculates:"

6021 PRINT TAB(2)"1) effectiveness of prophylactic measures"

6022 PRINT"         (vaccination, preventive treatment, other preventive measures)"

6025 PRINT TAB(2)"2) disease recovery rates in treated and non-treated animals"

6053 INPUT"Enter choice number: ",CH

6055 IF CH=1 OR CH=2 THEN GOTO 6090 ELSE PRINT IDE$:GOTO 6980

6090 PRINT"INPUT DATA:":' (numbers to be major than 0) :"

6091 IF CH=1 THEN GOTO 6095 ELSE 6098

6095 INPUT"     prophylactic measures ";TT$:GOTO 6099

6098 INPUT"     recovery measures ";RM$

6099 INPUT"     place, time ";LU$,TI$

6100 INPUT"     species, category(ies) ";SP$,CA$

6101 IF CH=1 THEN GOTO 6102 ELSE 6480

6102 ER$="Partial numbers and their sum cannot be greater than total number!"

6103 INPUT"     Do you have absolute (a) or relative (r) data              ";A$

6104 IF A$="a" OR A$="r" THEN GOTO 6105 ELSE PRINT IDE$:GOTO 6980

6105 IF A$="a"THEN GOTO 6106 ELSE 6130

6106 PRINT:PRINT"     All following questions must be answered ! Input data >0 !"

6107 PRINT:INPUT"     number of animals at risk prophylactically treated         ";AR

6108 INPUT"     number of animals at risk prophylactically non-treated     ";APN

6109 PRINT:PRINT"     number of diseased among prophylactically treated "

6110 INPUT"                                             animals at risk    ";TR

6111 PRINT"     number of diseased among prophylactically non-treated "

6112 INPUT"                                             animals at risk    ";NTR

6120 IF AR=0 OR APN=0 OR TR=0 OR NTR=0 THEN PRINT IDM$:GOTO 6980

6125 IF TR>AR OR NTR>APN THEN PRINT IDE$:GOTO 6980

6129 GOTO 6190

6130 REM:

6134 PRINT"     incidence rate among prophylactically "

6135 INPUT"                  treated animals at specific risk (in %)       ";T

6136 PRINT"     incidence rate among prophylactically "

6137 INPUT"                    treated animals at direct risk (in %)       ";TD

6138 PRINT"     incidence rate among prophylactically "

6139 INPUT"                  treated animals at indirect risk (in %)       ";TI

6140 PRINT"     incidence rate among prophylactically "

6141 INPUT"              non-treated animals at specific risk (in %)       ";NT

6143 PRINT"     incidence rate among prophylactically "

6144 INPUT"                non-treated animals at direct risk (in %)       ";NTD

6146 PRINT"     incidence rate among prophylactically "

6147 INPUT"              non-treated animals at indirect risk (in %)       ";NTI

6148 IF T=0 OR (TD+TI+NT+NTD+NTI)=0 THEN PRINT IDM$:GOTO 6980 ELSE 6190

6190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6192 IF I$="m" THEN GOTO 10

6193 IF I$="c" THEN GOTO 6000

6194 IF I$=CHR$(13) THEN GOTO 6200

6200 CLS:PRINT"RESULT:":PRINT

6201 PRINT"Prophylactic measures: "TT$:PRINT

6202 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

6210 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT:'GOTO 6400

6220 PRINT:IF A$="a" THEN GOTO 6300 ELSE 6400

6300 T=TR/AR

6303 NT=NTR/APN

6305 PRINT:PRINT"     Prophylactic measures effectiveness":PRINT

6306 PRINT"                              among animals at risk       = ";

6308 PRINT USING"####.#### %";((NT-T)/NT)*100:GOTO 6980

6400 IF NT>0 AND T>0 THEN GOTO 6401 ELSE 6410

6401 PRINT:PRINT"     Prophylactic measures effectiveness"

6402 PRINT"                          among animals at risk           = ";

6403 PRINT USING"###.#### %";((NT-T)/NT)*100:PRINT

6410 IF NTD>0 AND TD>0 THEN GOTO 6411 ELSE 6420

6411 PRINT"     Prophylactic measures effectiveness"

6412 PRINT"                   among animals at direct risk           = ";

6413 PRINT USING"###.#### %";(NTD-TD)/NTD*100

6420 IF NTI>0 AND TI>0 THEN GOTO 6421 ELSE 6980

6421 PRINT:PRINT"     Prophylactic measures effectiveness"

6422 PRINT"                 among animals at indirect risk           = ";

6423 PRINT USING"###.#### %";(NTI-TI)/NTI*100

6425 GOTO 6980

6480 PRINT"Recovery rates calculation is applicable when positive difference"

6481 PRINT"           between treated and non-treated  animals is expected"

6482 PRINT"                  and all numeric input data (major than >0) are available !"

6490 PRINT:INPUT"     number of specifically diseased animals              ";SDA:PRINT

6491 PRINT"     number of specifically diseased animals"

6501 INPUT"                             under recovery measures      ";RM:PRINT

6502 INPUT"     number of  a l l  recovered animals from a disease   ";RA:PRINT

6503 INPUT"     number of treated animals recovered from a disease   ";RTA

6504 IF SDA=0 OR (RM+RA+RTA)=0 THEN PRINT:PRINT IDM$:GOTO 6980 ELSE 6505

6505 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6506 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6507 IF I$="m" THEN GOTO 10

6508 IF I$="c" THEN GOTO 6000

6509 IF I$=CHR$(13) THEN GOTO 6510

6510 CLS:PRINT"RESULT:":PRINT

6511 PRINT"Recovery measures: "RM$

6512 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

6513 PRINT TAB(6)"Number of specifically diseased animals: "SDA:PRINT

6514 PRINT"Place: "LU$;TAB(50)"Time: "TI$:PRINT:PRINT

6515 IF SDA>0 AND RM>0 THEN GOTO 6516 ELSE 6520

6516 PRINT"     Proportion of treated diseased animals              =     "USING"#.####";RM/SDA

6520 PRINT:IF SDA>0 AND RA>0 THEN GOTO 6521 ELSE 6530

6521 PRINT"     Rate of all recovered diseased animals              =     "USING"#.####";RA/SDA

6530 PRINT:IF RM>0 AND RTA>0 THEN GOTO 6531 ELSE 6536

6531 PRINT"     Recovery rate of treated diseased animals           =     "USING"#.####";RTA/RM

6536 IF (RA-RTA=0) OR (SDA-RM)=0 THEN GOTO 6980

6541 PRINT"     Recovery rate of non-treated diseased animal        =     "USING"#.####";(RA-RTA)/(SDA-RM)

6550 IF (RA-RTA)=0 OR RTA=0 THEN GOTO 6980:' ELSE 6551

6551 PRINT:PRINT

6552 PRINT"     Ratio of treated/non treated animals' recovery rates = "USING"#####.##";(RTA/RM)/((RA-RTA)/(SDA-RM));

6553 PRINT"   :  1"

6560 PRINT"     Ratio of non treated/treated animals' recovery rates = "USING"#####.##";((RA-RTA)/(SDA-RM))/(RTA/RM);

6563 PRINT"   :  1"

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.7-COMPARISON OF FINAL SITUATION IN POPULATIONS WITH AND WITHOUT PROGRAMME"

7010 PRINT"============================================================================"

7020 PRINT"Programme of  reduction of disease(s) morbidity, mortality or nidality if"

7021 PRINT"o t h e r   c o n d i t i o n s   are the  s a m e  ! Applicable only for""

7022 PRINT"cases when the programme  i m p r o v e s  the situation in comparison with"

7023 PRINT"w o r s e n i n g  situation without programme (due to disease spreading) !"

7100 PRINT"INPUT DATA:"

7105 INPUT"     programme ";PR$

7115 INPUT"     species, category(ies) ";SPE$,CA$

7116 INPUT"     place, period";L$,T$:PRINT

7117 INPUT"     epi. phenomenon (disease indicator) ";EPI$

7120 INPUT"     phenomenon measure units ";U$

7135 INPUT"     monetary units ";M$:PRINT

7145 INPUT"     value of average loss by one unit of the phenomenon       ";CU

7150 PRINT"     i n i t i a l  number of epi. phenomenon units"

7151 INPUT"           in the compared populations (the  s a m e  in both) ";VI

7155 PRINT"  f i n a l  (reduced) number of epi. phenomenon units in population"

7156 INPUT"                                    w i t h  programme         ";VFP

7160 PRINT"  f i n a l  (increased) number of epi. phenomenon units in population"

7165 INPUT"                                    w i t h o u t  programme   ";VFS

7170 INPUT"     total cost of the programme                               ";C

7172 IF C=0 OR CU=0 OR VI=0 OR VFP=>VFS THEN PRINT IDE$:GOTO 7980

7180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7182 IF I$="m" THEN GOTO 10

7183 IF I$="c" THEN GOTO 7000

7184 IF I$=CHR$(13) THEN GOTO 7200

7200 CLS:PRINT"RESULT:"

7205 PRINT"Programme: "PR$

7210 PRINT"Epi.phenomenon: "EPI$;TAB(40)"Measure units: "U$

7220 PRINT"Place: "L$;TAB(50)"Period: "T$

7230 PRINT"Average loss: "CU M$;TAB(40)"Programme cost: "C M$

7240 PRINT:PRINT"  Reduction of ";EPI$;

7250 LET DP=VI-VFP:LET DS=VFS-VI

7260 PRINT"   in population  w i t h  the programme = "

7265 PRINT"       = "INT(DP) U$;" i.e. benefit =";INT(DP*CU) M$;","

7270 PRINT"  while in the population   w i t h o u t  programme";

7271 IF VFS>VIS THEN GOTO 7272 ELSE 7273

7272 PRINT"       the epi. situation becomes worse by    ";INT(DS) U$:GOTO 7280

7273 DS=VIS-VFS:PRINT"  the situation has been improved only by ";INT(DS) U$

7280 PRINT TAB(40)"  of value of ";INT(DS*CU) M$;"."

7300 PRINT:PRINT"  Programme benefit/cost ratio        = ";

7301 PRINT USING"####.####";DP*CU/C;

7302 PRINT"    or";

7303 PRINT "   1  : "USING"####.####";1/(DP*CU/C);

7305 PRINT"  Programme cost/benefit ratio        = ";

7306 PRINT USING"####.####";C/(DP*CU);

7307 PRINT"    or   1  :  ";

7308 PRINT USING"###.####";1/(C/(DP*CU))

7310 PRINT:PRINT"  The reduction of the losses by one phenomenon measure unit"

7320 PRINT TAB(40)"  costs in average ";INT(C/DP) M$;".":PRINT

7330 PRINT"  Theoretically, if this average is applied on the population (of the same"

7335 PRINT"  size and situation) w i t h o u t  programme to reach a similar result "

7336 PRINT"  in the future under the same or similar conditions, the late programme "

7350 PRINT"  may cost about";INT(((VFS-VFP)*(C/DP)))  M$;" (not considering inflation or discount),"

7352 PRINT TAB(38)"i.e. ";INT(((VFS-VFP)*(C/DP)))-C  M$;" more."

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.8-CONSUMPTION AND COST OF VACCINES, DRUGS AND OTHER SUBSTANCES"

8001 PRINT"================================================================="

8110 PRINT"This subprogramme calculates:"

8111 PRINT TAB(7)"- consumption and cost according to the coverage (quantity) need of:"

8112 PRINT TAB(15)"1) vaccines or drugs"

8113 PRINT TAB(15)"2) solutions for disinfection or disinfestation"

8114 PRINT TAB(7)"- quantity according to available financial input for:"

8115 PRINT TAB(15)"3) vaccines or drugs"

8116 PRINT TAB(15)"4) solutions for disinfection or disinfestation"

8117 INPUT"Enter choice number: ",CH

8118 IF CH=1 OR CH=2 OR CH=3 OR CH=4 THEN GOTO 8120 ELSE PRINT IDE$:GOTO 8980

8120 PRINT:PRINT"INPUT DATA: "

8121 INPUT"     purpose (programme) ";PU$

8122 INPUT"     place, time ";PL$,TI$

8123 IF CH=1 OR CH=3 THEN INPUT"     species, category(ies) ";SP$,CA$

8124 INPUT"     name of substance ";NA$

8125 INPUT"     substance measure units                                ";U$

8126 INPUT"     monetary units                                         ";MU$

8127 INPUT"     price of one substance unit                            ";SU

8128 IF SU=0 THEN PRINT IDM$:GOTO 8980 ELSE 8129

8129 IF CH=1 OR CH=3 THEN GOTO 8130 ELSE 8135

8130 INPUT"     average dosis in substance measure units               ";D

8131 IF D=0 THEN PRINT IDM$:GOTO 8980 ELSE 8132

8132 IF CH=1 THEN INPUT"     number of individual aplications                       ";N

8133 IF CH=3 THEN GOTO 8141 ELSE 8145

8135 INPUT"     average substance concentration (%) in the solution    ";AC

8136 INPUT"     surface measure units                                  ";SMU$

8137 INPUT"     average of the solution per one surface unit in liters ";AAS

8140 IF CH=2 THEN INPUT"     total surface for the application of the solution      ";TSA:GOTO 8145

8141 IF CH=3 OR CH=4 THEN INPUT"     available financial input                              ";FI

8142 IF FI=0 THEN PRINT IDM$:GOTO 8980

8145 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8146 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8147 IF I$="m" THEN GOTO 10

8148 IF I$="c" THEN GOTO 8000

8149 IF I$=CHR$(13) THEN GOTO 8250

8250 CLS:PRINT"RESULT:":PRINT:PRINT"Purpose (programme): "PU$:IF CH=3 OR CH=4 THEN PRINT TAB(10)"Available financial input: "INT(FI) MU$

8251 PRINT"Place: "PL$;TAB(50)"Time: "TI$

8252 IF CH=1 OR CH=3 THEN PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8253 PRINT TAB(10)"Substance: "NA$

8254 PRINT"Measure units: "U$;TAB(40)"Price of one unit: "USING"#####.##";SU;

8255 PRINT"  "MU$

8256 IF CH=1 OR CH=3 THEN GOTO 8257 ELSE 8270

8257 PRINT TAB(10)"Average dosis: "USING"####.##";D;

8258 IF CH=1 THEN PRINT TAB(40)"Number of applications: "N:PRINT:PRINT

8259 PRINT:PRINT:PRINT TAB(5)"Average dosis price";TAB(44)"= "USING"######.##";D*SU;

8260 PRINT TAB(65)MU$:PRINT

8261 IF CH=1 THEN PRINT TAB(5)"Total consumption of  "NA$

8262 IF CH=1 THEN PRINT TAB(44)"=     "INT(N*D+.5);TAB(65)U$

8263 IF CH=1 THEN PRINT:PRINT TAB(5)"Total cost       ";TAB(44)"=     "INT((N*D)*SU+.5);TAB(65)MU$:GOTO 8980

8264 IF CH=3 THEN GOTO 8300 ELSE 8980

8270 PRINT"Average concentration % :"USING"###.##";AC;

8271 PRINT TAB(40)"Surface units: "SMU$

8272 PRINT TAB(10)"Liters per surface unit :"USING"###.##";AAS;

8273 IF CH=2 THEN PRINT TAB(40)"Total surface :"INT(TSA) SMU$:PRINT

8274 NE=AAS*AC/100:IF CH=4 GOTO 8400:

8275 PRINT:PRINT TAB(5)"Consumption of "NA$

8276 PRINT TAB(20)"per one surface unit";TAB(44)"=      "USING"####.####";NE;

8277 PRINT TAB(65)U$

8278 TN=NE*TSA

8279 PRINT:PRINT TAB(5)"Total consumption of "NA$;TAB(44)"=        "INT(TN+.5);TAB(65)U$:PRINT

8280 PRINT:PRINT TAB(5)"Cost per one surface unit";

8281 PRINT TAB(44)"=     "USING"#####.####";NE*SU;

8282 PRINT TAB(65)MU$

8284 PRINT:PRINT TAB(5)"Total cost";TAB(44)"=        "INT(TN*SU+.5);

8285 PRINT TAB(65)MU$:GOTO 8980

8300 PRINT:PRINT TAB(16)"Available financial input is for "INT((FI/(D*SU))+.5);" doses.":PRINT

8320 GOTO 8980

8400 PRINT:PRINT

8402 PRINT:PRINT TAB(10)"Available financial input is for "INT((FI/(NE*SU))+.5) SMU$;" ."

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";C$

8982 IF C$="y" OR C$="n" THEN GOTO 8983 ELSE 8990

8983 IF C$="y"THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.9-PROGRAMME BENEFIT/COST RATIO IN DISCOUNTED MONETARY VALUES"

9010 PRINT"===============================================================";

9020 PRINT TAB(61)"(Ref.: Putt et al.)"

9030 PRINT"For phenomena measured in monetary units. Discounted = present value."

9035 B=0:C=0

9041 DIM B(20),C(20)

9100 PRINT"INPUT DATA:"

9110 INPUT"     programme ";EP$

9120 INPUT"     place, period  ";LU$,TI$

9121 INPUT"     duration of subperiod (year, month, etc.)          ";SP$

9140 INPUT"     number of subperiods (up to 18 !) to be evaluated  ";N

9141 IF N=0 OR N>18 THEN PRINT IDE$:GOTO 9980

9145 INPUT"     monetary units (up to 11 characters !)             ";UM$

9150 INPUT"     discount rate (in decimal fraction, i.e. >0-<1)    ";DE

9155 IF DE=0 OR DE=>1 THEN PRINT IDE$:GOTO 9980

9161 PRINT:IF N>11 THEN GOTO 9162 ELSE 9178

9162 CLS:PRINT

9178 PRINT"     Key in pairs monetary values (adjusted for inflation) of benefit, cost:"

9180 FOR I=1 TO N

9181 PRINT TAB(6)"subperiod";

9185 PRINT TAB(16)I ": ";

9190 INPUT"   ";B(I),C(I)

9191 IF (B(I)+C(I))=0 THEN GOTO 9194 ELSE 9193

9193 NEXT I:GOTO 9195

9194 PRINT IDM$:GOTO 9980

9195 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9196 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9197 IF I$="m" THEN GOTO 10

9198 IF I$="c" THEN GOTO 9000

9199 IF I$=CHR$(13) THEN GOTO 9200

9200 CLS:PRINT"PROGRAMME BENEFIT/COST RATIO IN DISCOUNTED MONETARY VALUES"

9201 PRINT"Programme: "EP$

9202 PRINT"Place: "LU$;TAB(50)"Period: "TI$

9204 PRINT TAB(20)"Discount rate:"USING"##.####";DE

9210 PRINT:PRINT SP$;TAB(10)"Benefit";TAB(23)"Cost";TAB(35)"Discount";TAB(46)"  D  i  s  c  o  u  n  t  e  d"

9220 PRINT TAB(10)UM$;TAB(23)UM$;TAB(35)"factor";TAB(45)"benefit";TAB(59)"cost";TAB(69)"ben.- cost"

9225 IF N<18 THEN GOTO 9230 ELSE 9231

9230 PRINT

9231 U=(1/(1+DE)):V=1/((1+DE)^I)

9235 PRINT" 1";TAB(9)INT(B(1));TAB(22)INT(C(1));TAB(32)USING"####.####";U;TAB(43)USING"#########";(B(1)/(1+DE));TAB(54)INT((C(1)/(1+DE))+.5);

9237 PRINT TAB(69)INT(((B(1)/(1+DE))-(C(1)/(1+DE)))+.5)

9240 FOR I=2 TO N

9250 PRINT I;TAB(9)INT(B(I));TAB(22)INT(C(I));TAB(32)USING"####.####";1/((1+DE)^I);TAB(43)USING"#########";(B(I)/(1+DE)^I);TAB(54)INT((C(I)/(1+DE)^I)+.5);

9252 PRINT TAB(69)INT(((B(I)/(1+DE)^I))-(C(I)/(1+DE)^I)+.5)

9260 NEXT I

9300 S=0:T=0:BE=0:CO=0

9310 FOR I=1 TO N

9311 BE=BE+B(I)

9312 CO=CO+C(I)

9320 S=S+B(I)/(1+DE)^I

9330 T=T+C(I)/(1+DE)^I

9340 NEXT I

9350 PRINT"Total";TAB(9)INT((BE)+.5);TAB(22)INT((CO)+.5);TAB(43)USING"#########";S;

9351 PRINT TAB(54)USING"#########";T;

9352 PRINT TAB(69);INT((S-T)+.5)

9355 A$=INKEY$:IF A$="" THEN GOTO 9355

9370 CLS::PRINT"PROGRAMME BENEFIT/COST RATIO IN DISCOUNTED MONETARY VALUES":PRINT

9371 PRINT TAB(3)"Ratio of total benefit / total cost             = ";USING"####.####";BE/CO

9372 PRINT TAB(59)"   =  1 :";USING"####.####";CO/BE:PRINT

9373 PRINT TAB(3)"Ratio of total cost / total benefit             = ";USING"####.####";CO/BE

9374 PRINT TAB(59)"   =  1 :";USING"####.####";BE/CO:PRINT

9375 PRINT TAB(3)"Difference between total benefit and total cost = ";INT((BE-CO)+.5) UM$:PRINT:PRINT

9380 PRINT:PRINT TAB(3)"Ratio of total discounted benefit / total discounted cost  = ";USING"##.####";S/T

9382 PRINT TAB(59)"   =  1 :";USING"####.####";T/S

9390 PRINT:PRINT TAB(3)"Ratio of total discounted cost / total discounted benefit  = ";USING"##.####";T/S

9391 PRINT TAB(59)"   =  1 :";USING"####.####";S/T:PRINT

9393 PRINT TAB(3)"Difference between total discounted benefit"

9394 PRINT"                          and total discounted cost  =  "INT((S-T)+.5) UM$

9396 'PRINT TAB(5)"                                                = ";

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 ERASE B,C:B=0:C=0:GOTO 645

9982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9983 IF R$="y" OR R$="n" THEN GOTO 9984 ELSE 9990

9984 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.10-PROGRAMME BENEFIT/COST RATIO IN CUMULATIVE MONETARY VALUES"

10010 PRINT"================================================================";

10030 PRINT"Applicable for the phenomena measurable in monetary units. B e n e f i t  "

10031 PRINT"of a specific disease eradication  c o n t i n u e s  after the end "

10032 PRINT"of the programme and inputs, thanks also to reproduction process, avoiding"

10033 PRINT"previous negative consequences during the next periods and generations."

10035 B=0:C=0

10041 DIM B(20),C(20)

10100 PRINT"INPUT DATA:"

10110 INPUT"     programme ";EP$

10113 INPUT"     place ";LU$

10114 INPUT"     eradication period ";TI$

10116 INPUT"     post-eradication period ";PP$

10121 INPUT"     subperiod duration (year, month, etc.)              ";SP$

10140 INPUT"     number of subperiods (up to 18 !) to be evaluated   ";N

10141 IF N=0 OR N>18 THEN PRINT IDE$:GOTO 10980

10145 INPUT"     monetary units                                      ";UM$

10162 CLS:PRINT

10178 PRINT"Key in pairs the values (integers, adjusted for inflation) of benefit, cost:"

10180 PRINT

10181 FOR I=1 TO N

10182 PRINT TAB(6)"subperiod";TAB(18)I ": ";

10183 INPUT"   ";B(I),C(I)

10191 IF (B(I)+C(I))=0 THEN GOTO 10194 ELSE 10193

10193 NEXT I:GOTO 10195

10194 PRINT IDE$:GOTO 10980

10195 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10196 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10197 IF I$="m" THEN GOTO 10

10198 IF I$="c" THEN GOTO 10000

10199 IF I$=CHR$(13) THEN GOTO 10200

10200 CLS:PRINT"PROGRAMME CUMULATIVE  BENEFIT/COST  RATIO  IN  MONETARY  VALUES"

10201 PRINT"Programme: "EP$

10202 PRINT"Place: "LU$;TAB(50)"Monetary units: "UM$

10203 PRINT"Eradication period: "TI$;TAB(40)"Post-eradication period: "PP$

10204 IF N<18 THEN PRINT

10210 PRINT SP$;TAB(12)"Benefit";TAB(24)"Cost";TAB(34)"Ben/Cost";

10211 PRINT TAB(46)"Cumul.Ben.";TAB(59)"Cumul.Cost";Tab(72)"Cum.B/C"

10225 PRINT:BE=0:CO=0

10231 FOR I=1 TO N

10232 BE=BE+B(I)

10233 CO=CO+C(I)

10235 PRINT I;TAB(11)INT(B(I));TAB(23)INT(C(I));

10236 IF C(I)=0 THEN GOTO 10246 ELSE 10237

10237 PRINT TAB(33)USING"###.####";B(I)/C(I);

10246 PRINT TAB(45)INT(BE);TAB(58)INT(CO);TAB(71)USING"###.####";BE/CO

10260 NEXT I

10355 A$=INKEY$:IF A$="" THEN GOTO 10355

10370 CLS:PRINT"PROGRAMME CUMULATIVE  BENEFIT/COST  RATIO  IN  MONETARY  VALUES":PRINT

10371 PRINT:PRINT TAB(3)"Ratio of total cumulative benefit / total cumulative cost  = ";USING"##.####";BE/CO

10380 PRINT TAB(59)"   =  1 :";USING"####.####";CO/BE

10390 PRINT:PRINT TAB(3)"Ratio of total cumulative cost / total cumulative benefit  = ";USING"##.####";CO/BE

10391 PRINT TAB(59)"   =  1 :";USING"####.####";BE/CO:PRINT

10395 PRINT:PRINT TAB(3)"Difference between total cumulative benefit"

10396 PRINT TAB(26)" and total cumulative cost =  ";INT((BE-CO)+.5)  UM$

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 ERASE B,C:B=0:C=0:GOTO 645

10982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10983 IF R$="y" OR R$="n" THEN GOTO 10984 ELSE 10990

10984 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.11-ECONOMIC EFFECT  A F T E R  SPECIFIC ANIMAL DISEASE ERADICATION"

11005 PRINT"====================================================================="

11010 PRINT"This subprogramme calculates the estimation of economic effect  a f t e r"

11011 PRINT"the eradication of a disease when the inputs stop, while the  b e n e f i t "

11012 PRINT"of disease free status c o n t i n u e s (avoiding the initial losses) during"

11013 PRINT"next periods thanks to health 'reproduction' in following animal generations,"

11014 PRINT"i.e. to  m u l t i p l y i n g   e f f e c t. After-eradication saved value ="

11015 PRINT"loss at programme beginning multiplied by specific-disease free time."

11020 'PRINT"(For final evaluation the pre-eradication benefit is to be added to the result.)"  

11100 PRINT:PRINT"INPUT DATA:"

11110 INPUT"     programme ";EP$

11115 INPUT"     place ";LU$

11120 INPUT"     period of eradication programme                ";PP$

11121 INPUT"     post-eradication period                        ";TI$

11122 INPUT"     subperiod duration (year, month, etc.)         ";SP$

11145 INPUT"     monetary units (up to 10 characters)           ";UM$:PRINT

11150 INPUT"     loss due to disease at programme beginning     ";LO

11153 INPUT"     total cost of the programme                    ";TC

11154 IF LO=0 OR TC=0 THEN PRINT IDM$:GOTO 11980

11156 INPUT"     number of post-eradication subperiods to be evaluated (up to 11) ";N

11158 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 11980

11161 'INPUT"     corrective index of post-eradication benefit (>0-1)  ";CI#

11162 CI#=1

11163 REM:doresit korekting index !!!

11170 'IF CI#=0 OR CI#>1 THEN GOTO 11161 ELSE 11171

11171 INPUT"     discount rate (>0-<1) of programme  cost       ";DR#

11172 IF DR#=>1 THEN PRINT IDE$:GOTO 11980 ELSE 11195

11195 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11196 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11197 IF I$="m" THEN GOTO 10

11198 IF I$="c" THEN GOTO 11000

11199 IF I$=CHR$(13) THEN GOTO 11200

11200 CLS:PRINT"ECONOMIC EFFECT  A F T E R  SPECIFIC ANIMAL DISEASE ERADICATION"

11201 PRINT"Programme: "EP$

11202 PRINT"Place: "LU$

11203 PRINT"Period of the programme: "PP$;TAB(40)"Post-eradication period: "TI$

11204 PRINT"Initial loss: "LO UM$;TAB(40)"Programme cost : "TC UM$

11205 'PRINT"Corrective index: ";USING"#.####";CI#;

11206 PRINT"Discount rate of programme cost: ";USING"#.##";DR#:PRINT

11210 PRINT"P o s t -";TAB(16)"Benefit -";TAB(32)"Cumulative ";TAB(51)"Ratio";TAB(67)"Ratio cumul."

11212 PRINT"eradication";TAB(16)"value saved"TAB(32)"benefit -";TAB(51)"cumulative";TAB(67)"benefit/""

11213 PRINT TAB(17)"in";TAB(32)"value saved in";TAB(51)"benefit/";TAB(67)"/discounted"

11214 PRINT TAB(3)SP$;TAB(16)UM$;TAB(32)UM$;TAB(51)"/total cost";TAB(67)"total cost":PRINT

11216 ME=0

11220 FOR I=1 TO N

11222 ME(I)=ME+LO:REM: i.e LO

11225 PRINT"   ";I;TAB(16)ME(I);TAB(32)LO*I;TAB(49)USING"#####.####";((LO*I)/TC)*CI#;

11228 PRINT TAB(65)USING"#####.####";((LO*I)/((TC/(1+DR#)^(I))*CI#))

11230 NEXT I

11280 A$=INKEY$:IF A$="" THEN GOTO 11280

11300 CLS:PRINT"Do you want to calculate total cumulative benefit including eradication"

11302 INPUT"programme period and post-eradication period, yes(y) or no(n) ";CB$

11303 IF CB$="y" OR CB$="n" THEN GOTO 11305 ELSE 11980

11305 IF CB$="y" THEN GOTO 11310 ELSE 11980

11310 PRINT:INPUT"     cumulative benefit value at eradication programme end ";CV:PRINT

11400 A$=INKEY$:IF A$="" THEN GOTO 11400

11405 CLS:PRINT"ECONOMIC EFFECT OF SPECIFIC ANIMAL DISEASE ERADICATION"

11404 PRINT"(including eradication programme and post-eradication periods)":PRINT

11410 PRINT"   Cumulative benefit value at eradication programme end: "INT(CV) UM$:PRINT

11421 PRINT"P o s t -";TAB(14)"Value saved";TAB(29)"Total cumulative";TAB(51)"Ratio";TAB(68)"Ratio cumul."

11412 PRINT"eradication";TAB(29)"value saved from";TAB(51)"cumulative";TAB(68)"benefit/"

11413 PRINT TAB(16)"in"TAB(29)"programme beginning";TAB(51)"benefit/";TAB(68)"/discounted"

11414 PRINT TAB(3)SP$;TAB(14)UM$;TAB(29)"in "UM$;TAB(51)"/total cost";TAB(68)"total cost":PRINT

11416 ME=0

11420 FOR I=1 TO N

11422 ME(I)=ME+LO

11425 PRINT"   ";I;TAB(15)ME(I);TAB(33)(LO*I)+CV;TAB(48)USING"#####.####";(((LO*I)+CV)/TC)*CI#;

11428 PRINT TAB(65)USING"#####.####";(((LO*I)+CV)/((TC/(1+DR#)^(I))*CI#))

11430 NEXT I

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11983 IF R$="y" OR R$="n" THEN GOTO 11984 ELSE 11990

11984 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.12-PUBLIC HEALTH EFFECT OF SPECIFIC ZOONOSIS ERADICATION"

12005 PRINT"==========================================================="

12010 PRINT"This subprogramme calculates public health effect of eradication in animal"

12011 PRINT"population of a specific infectious disease transmissible to man. 'S a v e d'"

12012 PRINT"p e r s o n s  from the specific zoonosis  =   r e d u c e d  new cases in"

12013 PRINT"comparison with initial incidence thanks to reduced risk during the programme"

12014 PRINT"and post-eradication zero risk (continuing specific disease free status)."

12100 PRINT"INPUT DATA:"

12110 INPUT"     programme ";EP$

12115 INPUT"     place ";LU$

12117 INPUT"     period of the programme ";PP$

12118 'INPUT"     post-eradication period to be evaluated ";TI$

12121 INPUT"     number of years of the programme (up to 11)                  ";YP

12122 IF YP=0 OR YP>11 THEN PRINT IDE$:GOTO 12980

12123 INPUT"     number of post-eradication years to be evaluated (up to 11)  ";N

12124 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 12980

12170 FOR I=1 TO YP

12171 PRINT TAB(6)"year ";I;":";

12173 INPUT"  number of new specifically diseased persons ";DP(I)

12175 NEXT I

12176 IF DP(1)=0 THEN PRINT"Number of new cases during initial year must be major than 0 !":GOTO 12980

12180 CLS:PRINT:PRINT"New cases in human population after eradication programme end:":PRINT

12186 FOR I=(YP+1) TO (N+YP)

12188 PRINT TAB(6)"year ";I;" from programme beginning:";

12189 INPUT"  number of diseased persons ";DP(I)

12190 NEXT I

12195 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12196 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12197 IF I$="m" THEN GOTO 10

12198 IF I$="c" THEN GOTO 12000

12199 IF I$=CHR$(13) THEN GOTO 12200

12200 CLS:PRINT"PUBLIC HEALTH EFFECT  D U R I N G  SPECIFIC ZOONOSIS ERADICATION PROGRAMME"

12201 PRINT"Programme: "EP$

12202 PRINT"Place: "LU$

12203 PRINT"Eradication programme period: "PP$

12207 PRINT"Number of new diseased persons during programme first year: "DP(1):PRINT

12210 PRINT"Programme";TAB(13)"Number of";TAB(25)"Cumulative";TAB(41)"Number of";TAB(54)"Cumulative";TAB(67)"Ratio of"

12211 PRINT"  year ";TAB(13)"new ";TAB(25)"number of ";TAB(41)"of 'saved'";TAB(54)"number";TAB(67)"new cases/"

12212 PRINT TAB(13)"diseased";TAB(25)"new diseased";TAB(41)"persons";TAB(54)"of 'saved'";TAB(67)"/initial year"

12213 PRINT TAB(13)"persons";TAB(25)"persons";TAB(54)"persons";TAB(67)"cases"

12214 PRINT

12215 PY=0:CD=0

12220 FOR I=1 TO YP

12222 PY=PY+DP(I)

12223 CD=CD+(DP(1)-DP(I))

12225 PRINT"  ";I;TAB(12)DP(I);TAB(25)PY;TAB(40)DP(1)-DP(I);TAB(53)CD;TAB(68)USING"##.####";DP(I)/DP(1)

12230 NEXT I

12280 A$=INKEY$:IF A$="" THEN GOTO 12280

12401 CLS:PRINT"PUBLIC HEALTH EFFECT  A F T E R  SPECIFIC ZOONOSIS ERADICATION PROGRAMME"

12402 PRINT"Programme: "EP$

12403 PRINT"Place : "LU$

12404 PRINT"Number of new diseased persons during programme first year: "DP(1)

12405 'PRINT"Post-eradication period: "TI$

12406 PRINT

12410 PRINT"Year";TAB(13)"Number of";TAB(25)"Cumul. number";TAB(41)"Number of";TAB(53)"Cumul. number";TAB(67)"Ratio of"

12411 PRINT"from ";TAB(13)"new ";TAB(25)"of new ";TAB(41)"of 'saved'";TAB(53)"of 'saved'";TAB(67)"new cases/"

12412 PRINT"programme";TAB(13)"diseased";TAB(25)"diseased from";TAB(41)"persons";TAB(53)"from ";TAB(67)"/initial year"

12413 PRINT"beginning";TAB(13)"persons";TAB(25)"programme";TAB(53)"programme";TAB(67)"cases"

12414 PRINT TAB(25)"beginning";TAB(53)"beginning"

12415 PRINT

12516 EM=0:E=0

12520 FOR I=(YP+1) TO (N+YP)

12521 E=E+(DP(1)-DP(I))

12522 EM=EM+DP(I)

12525 PRINT" ";I;TAB(12)DP(I);TAB(25)PY+EM;TAB(40)DP(1)-DP(I);TAB(53)E+CD;TAB(68)USING"##.####";DP(I)/DP(1)

12530 NEXT I

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12983 IF R$="y" OR R$="n" THEN GOTO 12984 ELSE 12990

12984 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.13-BIOLOGICAL EFFECT OF SPECIFIC ANIMAL DISEASE ERADICATION"

13005 PRINT"=============================================================="

13011 PRINT"Number of animals or herds or territory units 's a v e d'  from the specific"

13012 PRINT"infectious disease = reduced number of new cases in comparison with initial"

13013 PRINT"incidence, thanks to reduced risk during the programme and post-eradication"

13014 PRINT"zero risk due to  c o n t i n u i n g  specific disease free status."

13100 PRINT"INPUT DATA:"

13110 INPUT"     programme ";EP$

13115 INPUT"     place ";LU$

13117 INPUT"     period of the programme ";PP$

13121 INPUT"     number of years of the programme (up to 11)                       ";YP

13122 IF YP=0 OR YP>11 THEN PRINT IDE$:GOTO 13980

13123 INPUT"     number of post-eradication years to be evaluated (up to 11)       ";N

13124 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 13980

13151 INPUT"Evaluation in affected animals (a) or herds (h) or territory units (t) ";ANH$

13155 IF ANH$="a" OR ANH$="h" OR ANH$="t" THEN GOTO 13160 ELSE PRINT IDE$:GOTO 13980

13160 IF ANH$="a" THEN ANH$="animals"

13161 IF ANH$="h" THEN ANH$="herds"

13162 IF ANH$="t" THEN ANH$="ter.units"

13170 FOR I=1 TO YP

13171 PRINT TAB(3)"year ";I;":";

13173 PRINT"  number of new specifically affected "; ANH$;

13174 INPUT" ";DP(I)

13175 NEXT I

13176 IF DP(1)=0 THEN PRINT"Number of new cases during initial year must be major than 0 !":GOTO 13980

13180 CLS:PRINT:PRINT"New cases after eradication programme end:":PRINT

13186 FOR I=(YP+1) TO (N+YP)

13188 PRINT TAB(3)"year";I;" from programme beginning:";

13189 PRINT" number of new affected " ;ANH$;

13190 INPUT" ";DP(I)

13191 NEXT I

13195 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

13196 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

13197 IF I$="m" THEN GOTO 10

13198 IF I$="c" THEN GOTO 13000

13199 IF I$=CHR$(13) THEN GOTO 13200

13200 CLS:PRINT"BIOLOGICAL EFFECT  D U R I N G  SPECIFIC ANIMAL DISEASE ERADICATION PROGRAMME"

13201 PRINT"Programme: "EP$

13202 PRINT"Place: "LU$

13203 PRINT"Eradication programme period: "PP$

13207 PRINT"Number of new affected ";ANH$;" during programme first year: "DP(1):PRINT

13210 PRINT"Programme";TAB(13)"Number of";TAB(25)"Cumulative";TAB(41)"Number of";TAB(54)"Cumulative";TAB(67)"Ratio of"

13211 PRINT"  year ";TAB(13)"new ";TAB(25)"number of";TAB(41)"of 'saved'";TAB(54)"number";TAB(67)"new cases/"

13212 PRINT TAB(13)"affected";TAB(25)"affected";TAB(41)ANH$;TAB(54)"of 'saved'";TAB(67)"/initial year"

13213 PRINT TAB(13)ANH$;TAB(25)ANH$;TAB(54)ANH$;TAB(67)"cases"

13214 PRINT

13215 PY=0:CD=0

13220 FOR I=1 TO YP

13222 PY=PY+DP(I)

13223 CD=CD+(DP(1)-DP(I))

13225 PRINT"  ";I;TAB(12)DP(I);TAB(25)PY;TAB(40)DP(1)-DP(I);TAB(53)CD;TAB(68)USING"##.####";DP(I)/DP(1)

13230 NEXT I

13280 A$=INKEY$:IF A$="" THEN GOTO 13280

13402 CLS:PRINT"BIOLOGICAL EFFECT  A F T E R  SPECIFIC ANIMAL DISEASE ERADICATION PROGRAMME"

13403 PRINT"Programme: "EP$

13404 PRINT"Place : "LU$

13405 'PRINT"Post-eradication period: "TI$

13406 PRINT"Number of new affected ";ANH$;" during programme first year: "DP(1)

13407 PRINT

13410 PRINT"Year";TAB(13)"Number of";TAB(25)"Cumul. Number";TAB(41)"Number";TAB(53)"Cumul.Number";TAB(67)"Ratio of"

13411 PRINT"from ";TAB(13)"new ";TAB(25)"of new ";TAB(41)"of 'saved'";TAB(53)"of 'saved'";TAB(67)"new cases/"

13412 PRINT"programme";TAB(13)"affected";TAB(25)"affected from";TAB(41)ANH$;TAB(53)"from";TAB(67)"/initial year"

13413 PRINT"beginning";TAB(13)ANH$;TAB(25)"programme";TAB(53)"programme";TAB(67)"cases"

13414 PRINT TAB(25)"beginning";TAB(53)"beginning"

13415 PRINT

13516 EM=0:E=0

13520 FOR I=(YP+1) TO (N+YP)

13521 E=E+(DP(1)-DP(I))

13522 EM=EM+DP(I)

13525 PRINT"  ";I;TAB(12)DP(I);TAB(25)PY+EM;TAB(40)DP(1)-DP(I);TAB(53)E+CD;TAB(68)USING"##.####";DP(I)/DP(1)

13530 NEXT I

13600 REM:Note= without animals protected !!

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

13983 IF R$="y" OR R$="n" THEN GOTO 13984 ELSE 13990

13984 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

14000 CLS:PRINT TAB(52)e$" "v$:PRINT"10.14-IMPLEMENTATION OF ANIMAL POPULATION HEALTH PROGRAMME"

14010 PRINT"=========================================================="

14050 PRINT TAB(2)"This subprogramme calculates: "

14051 PRINT TAB(10)"1) implementation of individual programmes"

14052 PRINT TAB(35)"(in terms of indicators or activities)":PRINT

14053 PRINT TAB(5)"summary table of one implementation indicator  according to"

14054 PRINT TAB(10)"2) space (territory)"

14055 PRINT TAB(10)"3) time series"

14060 INPUT"Enter choice number: ",CH

14070 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 14090 ELSE PRINT IDE$:GOTO 14900

14090 IN$="":P=0:V=0

14091 ERASE IN$,P,V

14092 DIM IN$(20),P(20),V(20)

14100 PRINT"INPUT DATA:"

14102 INPUT"     programme ";PR$

14103 IF CH=2 OR CH=3 THEN INPUT"     indicator ";IND$

14104 INPUT"     place, period ";LU$,PE$

14106 INPUT"     measure units ";MU$:PRINT

14112 PRINT"In case of programme for partial reduction of number of diseased animals or"

14114 PRINT"foci or for partial increase of number of healthy animals or disease free"

14115 PRINT"herds/zones use as - planned value:  the planned  d i f f e r e n c e"

14116 PRINT"                   - real value:     the real  d i f f e r e n c e":PRINT

14117 PRINT"                                        between initial and final situation !!.":PRINT

14118 INPUT"     number (up to 18 !) of pairs of planned and real values ";N

14119 IF N=0 OR N>18 THEN PRINT IDE$:GOTO 14900

14121 PRINT

14123 CLS:PRINT TAB(10)"List data (names up to 15 characters):":PRINT

14130 FOR I=1 TO N

14140 PRINT I;"";

14145 IF CH=1 THEN INPUT"indicator/activity, planned, real values ";IN$(I),P(I),V(I)

14146 IF CH=2 THEN INPUT"subterritory, planned, real values ";IN$(I),P(I),V(I)

14147 IF CH=3 THEN INPUT"subperiod, planned, real values ";IN$(I),P(I),V(I)

14160 IF P(I)=0 THEN PRINT:PRINT IDM$:GOTO 14900 ELSE 14170

14170 NEXT I

14200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

14202 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

14203 IF I$="m" THEN GOTO 10

14204 IF I$="c" THEN GOTO 14000

14205 IF I$=CHR$(13) THEN GOTO 14206

14206 CLS:PRINT TAB(6)"IMPLEMENTATION  OF  ANIMAL  POPULATION  HEALTH  PROGRAMMES"

14210 PRINT

14211 PRINT TAB(6)"Programme: "PR$

14212 PRINT"Place: "LU$;TAB(50)"Period: "PE$

14213 IF CH=2 OR CH=3 THEN GOTO 14300

14214 PRINT TAB(6)"Measure units: "MU$:PRINT

14220 PRINT TAB(5)"Indicator";TAB(21)"V a l u e s";TAB(42)"D i f f e r e n c e";TAB(63)"IMPLEMENTATION"

14230 PRINT TAB(19)"planned";TAB(31)"real";TAB(42)"absolute";TAB(53)"relative";TAB(63)"of programme"

14235 PRINT TAB(57)"%";TAB(70)"%"

14240 PRINT

14260 FOR I=1 TO N

14270 Z(I)=((V(I)-P(I))/P(I))*100

14280 PRINT TAB(2)USING"\             \";IN$(I);

14281 PRINT TAB(18)INT(P(I));TAB(30)INT(V(I));TAB(41)INT(V(I)-P(I));TAB(54)USING "####.##     ";Z(I);TAB(67)Z(I)+100

14290 NEXT I:GOTO 14900

14300 PRINT"Indicator: "IND$;TAB(40)"Measure units: "MU$:PRINT

14301 T=0

14303 FOR I=1 TO N

14305 T=T+P(I)

14307 NEXT I

14310 S=0

14311 FOR I=1 TO N

14313 S=S+V(I)

14315 NEXT I

14323 PRINT TAB(21)"V a l u e s";TAB(41)"D i f f e r e n c e";TAB(63)"IMPLEMENTATION"

14325 IF CH=2 THEN PRINT TAB(3)"Subterritory";

14326 IF CH=3 THEN PRINT TAB(3)"Subperiod";

14327 PRINT TAB(19)"planned";TAB(30)"real";TAB(40)"absolute";TAB(54)"relative";TAB(64)"of programme"

14329 REM:PRINT TAB(56)"%";TAB(69)"%"

14330 PRINT

14331 FOR I=1 TO N

14333 Z(I)=((V(I)-P(I))/P(I))*100

14335 PRINT TAB(2)USING"\             \";IN$(I);

14336 PRINT TAB(18)INT(P(I));TAB(29)INT(V(I));TAB(41)INT(V(I)-P(I));TAB(51)USING "######.## %";Z(I);TAB(64)Z(I)+100

14337 NEXT I

14340 PRINT

14344 PRINT TAB(3)"T o t a l";TAB(18)INT(T);TAB(29)INT(S);TAB(41)INT(S-T);TAB(51)USING"######.## %";(S-T)/T*100;

14345 PRINT TAB(66)USING"####.## %";S/T*100

14900 ERASE P,V,IN$:P=0:V=0:IN$=""

14980 A$=INKEY$:IF A$="" THEN GOTO 14980

14981 GOTO 645

14982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

14983 IF R$="y" OR R$="n" THEN GOTO 14984 ELSE 14990

14984 IF R$="y" THEN GOTO 14000 ELSE 14990

14990 RETURN

14995 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

15000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

15002 IF Z$="y" OR Z$="n" THEN GOTO 15010 ELSE 15030

15010 IF Z$="y" THEN GOTO 15020 ELSE 15030

15020 CHAIN"EPIZ40MM.KOU"

15030 SYSTEM

 

 

         11-Complementary subprogrammes - I

 

5 ON ERROR GOTO 13025

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 REM:PRINT"EPIZ4011.KOU":REM:26/2/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver.4.0";TAB(70)v$

30 PRINT:PRINT TAB(8)"11-COMPLEMENTARY SUBPROGRAMMES - I"

50 PRINT TAB(8)"=================================="

500 PRINT:PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(8)"1-Disease introduction risk assessment applying user-defined criteria"

520 PRINT TAB(8)"2-Risk probability of test negative results in infected animals"

530 PRINT TAB(8)"3-Risk probability that at least one animal import unit is infected"

540 PRINT TAB(8)"4-Survival of diseased and vaccinated animals acc. to replacement"

550 PRINT TAB(8)"5-Table of number changes of foci, intrafocal and diseased animals"

560 PRINT TAB(8)"6-Point prevalence of foci and intrafocal diseased/exposed animals"

570 PRINT TAB(8)"7-Table of foci and diseased animals incidence/extinction"

580 PRINT TAB(8)"8-Table of slaughtered animals and disease findings"

590 PRINT TAB(8)"9-Prevalence based on outbreaks, herd size and infection duration"

600 PRINT TAB(8)"10-Relations between prevalence of population and of affected herds"

603 PRINT TAB(8)"11-Animals/livestock units per territory/inhabitant/veterinarian"

605 PRINT TAB(8)"12-Rates of spread of animal disease outbreaks"

609 PRINT

610 PRINT TAB(8)"13-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue with this group of subprogrammes, yes(y) or no(n) ";W$

651 IF W$="y" OR W$="n" THEN GOTO 660 ELSE 13000

660 IF W$="y" THEN GOTO 20 ELSE GOTO 13000

670 PRINT

690 INPUT"       Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.1-DISEASE INTRODUCTION RISK ASSESSMENT APPLYING USER-DEFINED CRITERIA"

1002 PRINT"========================================================================"

1008 PRINT"This subprogramme calculates risk probability of specific infectious"

1009 PRINT"disease agents' introduction into a territory (country, region, ranch, etc.)"

1010 PRINT"from abroad applying non-predefined criteria and their probability grades."

1011 PRINT"    The criteria of this 'b l a n c   m o d e l' to be selected and formulated"

1012 PRINT"by the  u s e r   h i m s e l f  according to particular situation and needs."

1013 PRINT"    The criteria selection, sequence, grading and the interpretation "

1014 PRINT"of the result must respect the logic, theoretical knowledge and practical "

1015 PRINT"experience and must make epizootiological sense."

1016 PRINT:PRINT"      Do you want, evaluating exporting territory situation, "

1017 PRINT"                          to process probability grades of the criteria which:":PRINT

1018 PRINT"   i n c r e a s e    d i s e a s e   a g e n t s   i n t r o d u c t i o n"

1019 PRINT"   r i s k (transmissibility, susceptibility of exposed animals, inability "

1020 PRINT"   to discover all diseased animals/herds,  inability to avoid disease agents "

1021 PRINT"   spread, ineffectiveness of pre-export 'filter', etc.)  - (i)"

1022 PRINT"                             or "

1023 PRINT"   d e c r e a s e    d i s e a s e   a g e n t s   i n t r o d u c t i o n"

1024 PRINT"   r i s k (resistance of exposed animals, ability to discover all diseased"

1025 PRINT"   animals/herds, ability to avoid disease agents spread, effectiveness"

1026 INPUT"   of pre-export 'filter', etc.)                          - (d) ";IR$

1030 IF IR$="i" OR IR$="d" THEN GOTO 1034 ELSE PRINT IDE$:GOTO 1981

1034 'A$=INKEY$:IF A$="" THEN GOTO 1034

1050 CLS:PRINT"INPUT DATA:":PRINT

1051 PRINT"  Grades of selected criteria probability  must be major than 0 but not major"

1052 PRINT"  than 1, i.e. expressed as proportions (numbers between >0 and 1) !"

1056 PRINT:INPUT"     disease ";DI$

1057 PRINT"     commodity to be introduced (imported) - animals            (a)"

1058 INPUT"                                         or animal raw products (p) ";P$

1059 IF P$="a" OR P$="p" THEN GOTO 1060 ELSE PRINT IDE$:GOTO 1981

1060 IF P$="a" THEN GOTO 1062 ELSE 1065

1062 INPUT"     species/category                      ";SP$

1063 INPUT"     number of animals to be imported      ";NA

1064 IF NA=0 THEN PRINT IDM$:GOTO 1981 ELSE 1070

1065 INPUT"     type of animal product                ";TP$

1066 INPUT"     measure units (up to 10 characters !) ";MU$

1067 INPUT"     quantity of product to be imported    ";QP

1068 IF QP=0 THEN PRINT IDM$:GOTO 1981 ELSE 1070

1070 INPUT"     name of importing unit/territory      ";IC$

1071 INPUT"     name of exporting unit/territory      ";EU$

1076 PRINT:PRINT

1085 PRINT:PRINT"   WARNING regarding the number of criteria !"

1086 PRINT"      Disproportionate increasing the number of criteria = "

1087 PRINT"      = disproportionate (artificial) decreasing calculated risk value"

1088 PRINT"                                     (in spite of the same situation) !"

1089 A$=INKEY$:IF A$="" THEN GOTO 1089

1090 CLS:PRINT TAB(5)"Situation in original  e x p o r t i n g  territory/population/unit:":PRINT

1091 INPUT"     specific disease true occurrence grade (>0 - 1)      ";PR:PRINT

1092 IF PR=0 OR PR>1 THEN PRINT IDE$:GOTO 1981 ELSE 1093

1093 INPUT"     How many other criteria to be processed              ";CR:PRINT

1094 IF CR=>10 THEN PRINT"Too many criteria !":GOTO 1981 ELSE 1095

1095 IF CR=0 THEN PRINT IDE$:GOTO 1981 ELSE 1096

1096 IF IR$="i" THEN PRINT" Key risk increasing criteria (up to 50 characters), grade (>0-1 !):":PRINT

1097 IF IR$="d" THEN PRINT" Key risk decreasing criteria (up to 50 characters), grade (>0-1 !):":PRINT

1098 FOR I=1 TO CR

1099 PRINT I;"";

1100 INPUT" criterion, grade ";CR$(I),G(I)

1101 IF G(I)=0 OR G(I)>1 THEN GOTO 1151 ELSE 1102

1102 NEXT I:GOTO 1190

1151 PRINT:PRINT"E r r o r ! Grades must be major than 0 and not major than 1 !":GOTO 1981

1190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1192 IF I$="m" THEN GOTO 10

1193 IF I$="c" THEN GOTO 1000

1194 IF I$=CHR$(13) THEN GOTO 1200

1200 CLS:PRINT"     D I S E A S E   A G E N T S  I N T R O D U C T I O N   R I S K ":PRINT

1206 IF P$="a" THEN H$=SP$

1207 IF P$="p" THEN H$=TP$

1210 PRINT"Importing commodity: "H$

1212 IF P$="a" THEN PRINT TAB(10)"Number of animals: "NA:GOTO 1214

1213 IF P$="p" THEN PRINT"Measure units: "MU$;TAB(40)"Quantity: "QP

1214 PRINT"Origin: "EU$;TAB(40)"Destination: "IC$

1215 PRINT TAB(10)"Exporting territory/population/unit situation: "

1216 PRINT"Disease: "DI$;

1217 PRINT TAB(40)"Occurrence Grade: ";USING"#.#####";PR:PRINT

1223 PRINT TAB(2)"Order";TAB(10)"C r i t e r i o n ";TAB(65)"G r a d e":PRINT

1224 FOR I=1 TO CR

1225 PRINT I;"      ";CR$(I);TAB(65)USING"#.#####";G(I)

1226 NEXT I

1230 G=1

1231 IF IR$="i" THEN GOTO 1241 ELSE 1245

1241 FOR I=1 TO CR

1242 G=G*G(I)

1243 NEXT I:P=G*PR:GOTO 1252

1245 FOR I=1 TO CR

1246 G=G*(1-G(I))

1247 NEXT I:P=G*PR

1252 IF P$="a" THEN GOTO 1253 ELSE 1254

1253 Q=1-P:INF=SQR((P*Q)/NA):GOTO 1355

1254 Q=1-P:INF=SQR((P*Q)/QP)

1355 PRINT:PRINT" Risk probability grade of disease agents introduction  =  "

1356 PRINT TAB(42)USING" =  #.########";P;

1357 PRINT " +- ";USING"#.########";1.96*INF

1358 IF P$="a" THEN GOTO 1360 ELSE 1380

1360 PRINT:PRINT TAB(10)"Estimated number of infected animals "

1361 IF (NA*P)=>1 THEN GOTO 1362 ELSE 1363

1362 PRINT"                to be probably introduced is about   "INT(NA*P+.5):GOTO 1981

1363 PRINT"                to be probably introduced is about   "USING"####.######";NA*P;

1365 GOTO 1981

1380 PRINT:PRINT TAB(10)"Estimated quantity of infected or contaminated products"

1381 IF (QP*P)=>1 THEN GOTO 1382 ELSE 1383

1382 PRINT"                to be probably imported is about   "INT(QP*P+.5) MU$:GOTO 1981

1383 PRINT"                to be probably imported is about   "USING"####.##########";(QP*P);

1384 PRINT" "MU$

1981 A$=INKEY$:IF A$="" THEN GOTO 1981

1985 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1986 IF R$="y" OR R$="n" THEN GOTO 1987 ELSE 1990

1987 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.2-RISK PROBABILITY OF TEST NEGATIVE RESULTS IN INFECTED ANIMALS"

2007 PRINT"=============================================================(Ref.: MacDiarmid)"

2010 PRINT"1) Probability that an animal which gives negative results in disease"

2011 PRINT"   testing is actually infected with the disease agent"

2012 PRINT"2) Probability that an animal which gives negative results in disease"

2013 PRINT"   testing and is actually infected will be included in export group"

2015 PRINT"3) Probability of a given test failing to detect at least"

2016 PRINT"                        one test-positive animal in an infected group"

2019 INPUT"  Enter choice number: ",CN

2020 IF CN=1 OR CN=2 OR CN=3 THEN GOTO 2025 ELSE PRINT IDE$:GOTO 2900

2025 PRINT"INPUT DATA:"

2026 INPUT"     disease   ";D$

2027 INPUT"     species   ";S$

2028 INPUT"     place     ";P$

2029 INPUT"     time      ";T$:PRINT

2030 INPUT"     true prevalence rate (number between >0 and <1)             ";P#

2031 IF P#>0 AND P#<1 THEN GOTO 2040 ELSE PRINT IDE$:GOTO 2900

2040 PRINT

2041 INPUT"     test sensitivity (number between >0 and 1)                  ";S#

2042 IF S#>0 AND S#<=1 THEN GOTO 2043 ELSE PRINT IDE$:GOTO 2900

2043 IF CN=1 OR CN=2 THEN INPUT"     test specificity (number between >0 and 1)                  ";E#

2045 IF E#>0 AND E#<=1 THEN GOTO 2046 ELSE PRINT IDE$:GOTO 2900

2046 IF CN=1 THEN GOTO 2080 ELSE 2050

2050 IF CN=2 OR CN=3 THEN INPUT"     number of animals in the group                              ";N

2060 IF CN=3 THEN INPUT"     number of animals from the group which are tested           ";T:GOTO 2067

2066 IF CN=2 AND E#=0 OR N=0 THEN GOTO 2070 ELSE 2080

2067 IF CN=3 AND N=0 OR T=0 OR T>N THEN GOTO 2070 ELSE 2080

2070 PRINT IDE$:GOTO 2900

2080 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2081 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2082 IF I$="m" THEN GOTO 10

2083 IF I$="c" THEN GOTO 2000

2084 IF I$=CHR$(13) THEN GOTO 2100

2100 CLS:PRINT TAB(7)"RISK PROBABILITY OF TEST NEGATIVE RESULTS IN INFECTED ANIMALS":PRINT

2101 PRINT TAB(10)"Disease: "D$

2102 PRINT TAB(10)"Species: "S$

2103 PRINT"Place: "P$;TAB(50)"Time: "T$

2104 IF CN=3 THEN GOTO 2105 ELSE 2106

2105 PRINT TAB(10)"Test sensitivity: "USING"#.####";S#:GOTO 2108

2106 PRINT"Test specificity: "USING"#.####";E#;

2107 PRINT TAB(40)"Test sensitivity: "USING"#.####";S#

2108 PRINT TAB(15)"True prevalence rate: "USING"###.####";P#

2110 IF CN=2 OR CN=3 THEN GOTO 2111 ELSE 2113

2111 PRINT TAB(20)"Number of animals: "N

2112 IF CN=3 THEN PRINT TAB(20)"Tested animals: "T

2113 PRINT:PRINT

2114 'PRINT"According to the method described by McDiarmid":PRINT

2115 IF CN=1 THEN GOTO 2120 ELSE 2116

2116 IF CN=2 THEN GOTO 2200 ELSE 2300

2120 PRINT"     Probability that an animal which gives negative results in disease":PRINT

2128 PRINT TAB(6)"testing is actually infected with the disease agent = ";

2158 PIN = P#*(1-S#)/(P#*(1-S#)+(1-P#)*E#)

2159 PRINT USING"#.############";PIN:GOTO 2900

2200 PRINT" Probability that an animal which gives negative results in disease testing":PRINT

2243 PRINT" and is actually infected with the disease agent will be included":PRINT

2244 PRINT"                                  in the group for export = ";

2245 PRINT USING"#.############";1-(((1-P#)*E#)/((1-P#)*E#+P#*(1-S#)))^N:GOTO 2900

2300 PRINT" Probability of a given test failing to detect at least":PRINT

2335 PRINT"         one test-positive animal in an infected group  = ";

2336 X=P#*N

2337 PRINT USING"#.############";(1-((T*S#)/N))^X

2900 A$=INKEY$:IF A$="" THEN GOTO 2900

2981 CLS:P=0:E=0:S=0:N=0:T=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2982 IF R$="y" OR R$="n" THEN GOTO 2983 ELSE 2990

2983 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.3-RISK PROBABILITY THAT AT LEAST ONE ANIMAL IMPORT UNIT IS INFECTED"

3003 PRINT"======================================================================"

3004 PRINT TAB(65)"(Ref.: Morley)"

3010 PRINT"Note: Animal import unit = life animal or measure unit"

3011 PRINT"      of raw product of animal origin (e.g. specified weight of the product)."

3021 PRINT"INPUT DATA:"

3022 INPUT"  disease ";D$

3023 INPUT"  animal import units (commodity) ";S$

3024 INPUT"  place ";P$

3025 INPUT"  time ";T$:PRINT

3030 PRINT"  disease true occurrence proportion in exporting territory"

3031 INPUT"                                      (number between >0 and <1) ";CF1#

3032 IF CF1#>0 AND CF1#<1 THEN GOTO 3033 ELSE PRINT IDE$:GOTO 3980

3033 PRINT"  probability rate of the pathogen being present at import time"

3034 INPUT"                                      (number between >0 and 1)  ";CF2#

3035 PRINT:INPUT"  number of animal import units (up to 10000)                    ";N

3036 IF N=0 OR CF2#=0 OR CF2#>1 THEN PRINT IDE$:GOTO 3980

3038 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3039 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3040 IF I$="m" THEN GOTO 10

3041 IF I$="c" THEN GOTO 3000

3042 IF I$=CHR$(13) THEN GOTO 3043

3043 CLS:PRINT"RESULT:":PRINT

3044 PRINT TAB(10)"Disease: "D$:PRINT TAB(10)"Commodity: "S$

3045 PRINT"Place: "P$;TAB(50)"Time: "T$

3046 PRINT"Disease Occurrence: "USING"#.########";CF1#

3047 PRINT TAB(15)"Number of Animal Import Units: "N

3048 PRINT TAB(40)"Probability of Pathogen: "USING"#.####";CF2#:PRINT

3050 A=(1-(CF1#*CF2#))^N

3051 B=1-A

3055 PRINT:PRINT"     Probability that at least one animal import unit"

3056 PRINT TAB(18)"of the commodity importation is infected = ";USING"#.############";B:PRINT

3060 PRINT"     Probability that no animal import units are infected = ";

3062 PRINT USING"#.############";A

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:CF1=0:CF2=0:N=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.4-SURVIVAL OF CHRONICALLY DISEASED AND VACCINATED ANIMALS"

4001 PRINT"     ACCORDING TO POPULATION REPLACEMENT CYCLE"

4002 PRINT"============================================================"

4010 PRINT"This subprogramme is applicable on groups of animals of a particular"

4011 PRINT"   epizootiological category such as chronically diseased, vaccinated, etc."

4012 PRINT"   under the conditions that these animals are not prematurely removed"

4013 PRINT"   and in absence of migration."

4026 PRINT"Duration of regular replacement cycle (generation or breeding or production"

4027 PRINT"   cycles) must be longer than evaluated period !":PRINT

4062 PRINT"INPUT DATA:"

4063 INPUT"     species, category(ies) ";SP$,CA$

4064 INPUT"     epizootiological category ";DI$

4065 INPUT"     place, period ";PL$,TI$:PRINT

4079 PRINT"     total number of animals of the given epizootiological "

4080 INPUT"                      category  at the beginning of the period   ";AB

4090 INPUT"     duration (in days) of one regular replacement cycle         ";RC

4092 PRINT"     duration (in days) between the initial and evaluated "

4093 INPUT"                             days within the replacement cycle   ";PX

4094 IF AB=0 OR RC=0 OR PX=0 THEN PRINT IDM$:GOTO 4980

4100 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4101 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4102 IF I$="m" THEN GOTO 10

4103 IF I$="c" THEN GOTO 4000

4104 IF I$=CHR$(13) THEN GOTO 4105

4105 CLS:PRINT"RESULT:":PRINT

4106 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

4107 PRINT TAB(6)"Epi.Category: "DI$

4108 PRINT TAB(6)"Initial number: "AB

4109 PRINT"Place: "PL$;TAB(50)"Period: "TI$:PRINT

4210 PRINT:PRINT"     Estimated number of animals of the given epizootiological category":PRINT

4211 PRINT"         existing at the beginning of the regular replacement cycle":PRINT

4212 PRINT"             and still remaining */ at the evaluated day  = ";

4214 PRINT INT(AB*(1-PX/RC)):PRINT

4260 PRINT:PRINT:PRINT"     */ Note: If not eliminated prematurely and in absence of migration."

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 CLS:AB=0:RC=0:PX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.5-TABLE OF CHANGES IN NUMBERS OF FOCI, INTRAFOCAL AND DISEASED ANIMALS"

5010 PRINT"========================================================================="

5015 PRINT"This subprogrammes creates tables of changes considering the  n u m b e r s"

5016 PRINT"at the beginning, new cases, extinct cases and at the end of subperiods of:"

5020 PRINT"     1) foci      2) intrafocal animals     3) diseased animals ":PRINT:GOTO 5025

5021 PRINT:PRINT"  Error in input data! The values at the end should be equal"

5022 PRINT"        to the initial number corrected by the difference between  new"

5023 PRINT"        and extinct cases (new minus extinct) !":GOTO 5980

5024 GOTO 5037

5025 INPUT"Enter choice number: ",CH

5026 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 5030 ELSE PRINT IDE$:GOTO 5980

5030 PRINT"INPUT DATA: "

5031 PRINT"title (in capital letters - up to 75 characters; without commas !!!)"

5032 INPUT" ";NA$

5033 INPUT"     disease, species ";DI$,SP$

5034 INPUT"     place (territory), period ";PL$,TI$

5035 INPUT"     measure units ";MU$

5036 INPUT"     data source (without commas !) ";DS$:PRINT

5037 INPUT"Data according to individual places (p) or subperiods (s) ";TR$

5038 IF TR$="p" OR TR$="s" THEN GOTO 5039 ELSE PRINT IDE$:GOTO 5980

5039 IF TR$="s" THEN GOTO 5040 ELSE 5047

5040 PRINT:PRINT"Do you have data (real, estimated or fictitious) on numbers at the beginning,"

5041 PRINT"             new cases, extinct cases and at the end of subperiods  (a)"

5042 INPUT"or only on initial number and  new and extinct cases in subperiods  (b) ";VA$

5043 IF VA$="a" OR VA$="b" THEN GOTO 5047 ELSE PRINT IDE$:GOTO 5980

5047 INPUT"                number of rows (up to 11 !)  ";N

5050 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 5980

5052 IF TR$="s" AND VA$="b" THEN GOTO 5053 ELSE 5060

5053 INPUT"     value at the beginning of the first row ";B1

5054 IF B1=0 THEN PRINT IDM$:GOTO 5980 ELSE 5060

5060 CLS:PRINT:PRINT"Respecting the sequence order"

5061 PRINT"          and providing  a l l  data required (real, estimated or fictitious),":PRINT

5062 IF TR$="s" AND VA$="b" THEN GOTO 5065 ELSE 5063

5063 PRINT"  key row names (up to 10 characters !), values (separated by commas !) "

5064 PRINT"  at the beginning, new cases, extinct cases, at the end :":GOTO 5066

5065 PRINT"  key row names (up to 10 characters), number of new cases, of extinct cases"

5066 IF TR$="p" OR VA$="a" THEN GOTO 5067 ELSE 5075

5067 PRINT:FOR I= 1 TO N

5068 PRINT TAB(5)I;"row: ";

5069 INPUT "";CO$(I),C(I),D(I),E(I),F(I)

5070 IF CO$(I)="" THEN PRINT IDM$:GOTO 5980 ELSE 5072

5072 IF F(I)<>(C(I)+D(I)-E(I)) THEN GOTO 5021 ELSE 5074

5074 NEXT I:GOTO 5190

5075 PRINT:FOR I= 1 TO N

5076 PRINT TAB(5)I;"row: ";

5077 INPUT "";CO$(I),D(I),E(I)

5078 IF CO$(I)="" THEN PRINT IDM$:GOTO 5980 ELSE 5080

5080 NEXT I

5190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5192 IF I$="m" THEN GOTO 10

5193 IF I$="c" THEN GOTO 5000

5194 IF I$=CHR$(13) THEN GOTO 5200

5200 CLS:PRINT TAB(3)NA$

5201 IF N<8 THEN PRINT

5206 PRINT"Disease: "DI$;TAB(50)"Species: "SP$

5210 PRINT"Place: "PL$;TAB(50)"Period: "TI$

5211 PRINT TAB(15)"Measure units: "MU$;

5213 PRINT:PRINT

5214 IF TR$="p" THEN PRINT"Subterritory";

5215 IF TR$="s" THEN PRINT"Subperiod";

5221 PRINT TAB(20)"At beginning";TAB(37)"New";TAB(52)"Extinct";TAB(65)"At the end"

5222 PRINT

5300 C=0:D=0:E=0:F=0

5310 FOR I=1 TO N

5312 C=C+C(I)

5314 D=D+D(I)

5316 E=E+E(I)

5318 F=F+F(I)

5322 NEXT I

5330 IF TR$="s" AND VA$="b" THEN GOTO 5501 ELSE 5450

5450 FOR I=1 TO N

5458 PRINT USING"\        \";CO$(I);

5459 PRINT TAB(21)INT(C(I));TAB(36)INT(D(I));TAB(51)INT(E(I));TAB(66)INT(F(I))

5462 NEXT I

5471 PRINT

5472 IF TR$="p" THEN GOTO 5474 ELSE 5477

5474 PRINT"T o t a l";TAB(21)INT(C);TAB(36)INT(D);TAB(51)INT(E);TAB(66)INT(F)

5475 IF TR$="p" AND F<>(C+D-E) THEN GOTO 5021 ELSE 5650

5477 S=C(1)+D-E

5482 IF TR$<>"s" THEN PRINT"T o t a l";TAB(21)INT(C(1));TAB(36)INT(D);TAB(51)INT(E);TAB(66)INT(S)

5483 IF TR$="s" AND VA$="a" AND S<0 THEN GOTO 5021 ELSE 5650

5501 PRINT TAB(21)B1:D=0:E=0

5603 FOR I=1 TO N

5604 D=D+D(I)

5605 E=E+E(I)

5606 PRINT USING"\        \";CO$(I);

5607 PRINT TAB(36)INT(D(I));TAB(51)INT(E(I));TAB(66)INT((B1+D-E))

5610 NEXT I

5611 T=(B1+D-E)

5618 PRINT

5620 PRINT"T o t a l";TAB(21)INT(B1);TAB(36)INT(D);TAB(51)INT(E);TAB(66)INT(T)

5625 IF T<0 THEN GOTO 5021 ELSE 5650

5650 IF DS$="" THEN GOTO 5980 ELSE PRINT:PRINT"Source: "DS$

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

5982 IF R$="y" OR R$="n" THEN GOTO 5983 ELSE 5990

5983 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.6-POINT PREVALENCE OF FOCI AND INTRAFOCAL DISEASED/EXPOSED ANIMALS"

6015 PRINT"====================================================================="

6016 PRINT"This subprogramme summarizes in a simple table the above mentioned data"

6020 PRINT"     1) related to a selected disease according to different places"

6022 PRINT"     2) related to a selected disease according to different moments"

6024 PRINT"     3) related to different diseases in the same territory and moment":PRINT

6030 INPUT"Enter choice number : ",CN

6031 IF CN=1 OR CN=2 OR CN=3 THEN GOTO 6040 ELSE 6980

6040 PRINT:PRINT"INPUT DATA:":PRINT

6041 IF CN=1 THEN NA$="    POINT PREVALENCE OF FOCI AND INTRAFOCAL ANIMALS IN DIFFERENT PLACES"

6042 IF CN=2 THEN NA$="    POINT PREVALENCE OF FOCI AND INTRAFOCAL ANIMALS IN DIFFERENT MOMENTS"

6043 IF CN=3 THEN NA$="  PREVALENCE OF FOCI AND INTRAFOCAL ANIMALS ACCORDING TO DIFFERENT  DISEASES"

6046 IF CN=1 THEN RO$="P l a c e"

6047 IF CN=2 THEN RO$="M o m e n t"

6048 IF CN=3 THEN RO$="Disease"

6049 IF CN=1 OR CN=2 THEN INPUT"     disease, form(s) ";DI$,FO$

6050 INPUT"     species, category(ies) ";SP$,CA$

6051 INPUT"     territory ";TE$

6052 IF CN=1 OR CN=3 THEN INPUT"     time (moment) ";MO$

6053 IF CN=2 THEN INPUT"     period ";PE$

6054 IF CN=1 THEN INPUT"     number of places (2 up to 11 !) ";N:GOTO 6061

6056 IF CN=2 THEN INPUT"     number of moments (2 up to 11 !) ";N:GOTO 6061

6057 IF CN=3 THEN INPUT"     number of diseases (2 up to 11 !) ";N

6061 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 6980

6062 IF N<8 OR CN=3 THEN INPUT"     data source ";DS$

6100 CLS:PRINT:PRINT"Respecting the sequence order"

6101 PRINT"             and providing  a l l  data required (real or estimated),":PRINT:GOTO 6106

6102 PRINT"Error ! Diseased animals cannot be more than intrafocal animals !":GOTO 6980

6106 PRINT"key ";RO$;"  name (up to 12 characters),"

6110 PRINT TAB(15)"number of foci, intrafocal animals, diseased animals:"

6173 PRINT:FOR I= 1 TO N

6174 PRINT TAB(5)I;" row: ";

6175 INPUT "";CO$(I),C(I),D(I),E(I)

6176 IF E(I)>D(I) THEN GOTO 6102

6177 IF CO$(I)="" THEN PRINT IDM$:GOTO 6980

6180 NEXT I

6200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6222 IF I$="m" THEN GOTO 10

6223 IF I$="c" THEN GOTO 6000

6224 IF I$=CHR$(13) THEN GOTO 6300

6300 CLS

6304 PRINT NA$

6305 IF N<8 OR CN=3 THEN PRINT

6306 IF CN=1 OR CN=2 THEN PRINT"Disease: "DI$;TAB(45)"Form(s): "FO$

6307 PRINT"Species: "SP$;TAB(45)"Category(ies): "CA$

6308 IF CN=1 OR CN=3 THEN PRINT"Territory: "TE$;TAB(50)"Time (moment): "MO$

6309 IF CN=2 THEN PRINT"Territory: "TE$;TAB(50)"Period: "PE$

6314 PRINT

6320 PRINT RO$;TAB(15)"F o c i";TAB(25)"I n t r a f o c a l     a n i m a l s";TAB(65)"Intraf.Diseased"

6322 PRINT TAB(25)"T o t a l";TAB(40)"Diseased";TAB(55)"Exposed";TAB(65)"Prevalence Rate"

6400 C=0:D=0:E=0:F=0:G=0:H=0

6410 FOR I=1 TO N

6412 C=C+C(I)

6414 D=D+D(I)

6416 E=E+E(I)

6418 F=F+F(I)

6420 G=G+G(I)

6421 H=H+H(I)

6422 NEXT I

6423 PRINT

6500 FOR I=1 TO N

6505 PRINT USING"\          \";CO$(I);

6506 PRINT TAB(15)INT(C(I));TAB(25)INT(D(I));TAB(40)INT(E(I));TAB(55)INT((D(I)-E(I)));

6507 IF D(I)=0 THEN PRINT TAB(70)"0.0000" ELSE PRINT TAB(70)USING"#.####";E(I)/D(I)

6562 NEXT I

6563 PRINT:IF CN=2 OR CN=3 THEN GOTO 6598 ELSE 6564

6564 PRINT"T o t a l";TAB(15)INT(C);TAB(25)INT(D);TAB(40)INT(E);TAB(55)INT((D-E));

6566 IF D=0 THEN PRINT TAB(70)"0.0000" ELSE PRINT TAB(70)USING"#.####";E/D

6568 PRINT

6570 PRINT"Average per focus";TAB(25)INT((D/C)+.5);TAB(40)INT((E/C)+.5);TAB(55)INT((((D-E)/C))+.5);

6571 PRINT TAB(70)USING"#.####";E/D

6598 IF DS$="" THEN GOTO 6980 ELSE PRINT:PRINT"Data source: "DS$

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6982 IF R$="y" OR R$="n" THEN GOTO 6983 ELSE 6990

6983 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.7-TABLE OF FOCI AND DISEASED ANIMALS INCIDENCE/EXTINCTION"

7015 PRINT"============================================================"

7016 PRINT"This subprogramme summarizes in a table the above mentioned data"

7020 PRINT"     1) related to a selected disease according to different places"

7022 PRINT"     2) related to a selected disease according to different subperiods"

7024 PRINT"     3) related to different diseases in the same territory and period":PRINT

7030 INPUT"Enter choice number : ",CN

7031 IF CN=1 OR CN=2 OR CN=3 THEN GOTO 7040 ELSE PRINT IDE$:GOTO 7980

7040 PRINT:PRINT"INPUT DATA:":PRINT

7041 IF CN=1 THEN NA$="     INCIDENCE/EXTINCTION OF FOCI AND DISEASED ANIMALS IN DIFFERENT PLACES"

7042 IF CN=2 THEN NA$="     INCIDENCE/EXTINCTION OF FOCI AND DISEASED ANIMALS IN DIFFERENT PERIODS"

7043 IF CN=3 THEN NA$="       INCIDENCE/EXTINCTION OF SPECIFIC DISEASES FOCI AND AFFECTED ANIMALS"

7046 IF CN=1 THEN RO$="P l a c e"

7047 IF CN=2 THEN RO$="Subperiod"

7048 IF CN=3 THEN RO$="Disease"

7049 IF CN=1 OR CN=2 THEN INPUT"     disease, form(s) ";DI$,FO$

7050 INPUT"     species, category(ies) ";SP$,CA$

7051 INPUT"     territory ";TE$

7052 IF CN=1 OR CN=3 THEN INPUT"     total period ";MO$

7053 IF CN=2 THEN INPUT"     total period ";PE$

7054 IF CN=1 THEN INPUT"     number of places (2 up to 11 !) ";N:GOTO 7061

7056 IF CN=2 THEN INPUT"     number of subperiods (2 up to 11 !) ";N:GOTO 7061

7057 IF CN=3 THEN INPUT"     number of diseases (2 up to 11 !) ";N

7061 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 7980

7062 IF N<10 THEN INPUT"     data source (without commas !) ";DS$

7100 CLS:PRINT:PRINT"Respecting the sequence order"

7101 PRINT"       and providing  a l l  data required (real or estimated, integers !),":PRINT:GOTO 7105

7105 PRINT"key ";RO$;" name (up to 12 characters),"

7110 PRINT TAB(10)"number of new foci, extinct foci, newly diseased animals,"

7111 PRINT TAB(15)"dead+killed diseased animals, slaughtered diseased animals,"

7112 PRINT TAB(20)"slaughtered suspect animals (data separated by commas !):"

7173 PRINT:FOR I= 1 TO N

7174 PRINT TAB(5)"  row ";I;": ";

7175 INPUT CO$(I),C(I),D(I),E(I),F(I),G(I),H(I)

7176 IF CO$(I)="" THEN PRINT IDM$:GOTO 7980

7177 NEXT I

7200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7222 IF I$="m" THEN GOTO 10

7223 IF I$="c" THEN GOTO 7000

7224 IF I$=CHR$(13) THEN GOTO 7300

7300 CLS:PRINT NA$

7301 IF N<8 THEN PRINT

7305 IF CN=1 OR CN=2 THEN PRINT"Disease: "DI$;TAB(45)"Form(s): "FO$

7306 PRINT"Species: "SP$;TAB(45)"Category(ies): "CA$

7308 IF CN=1 OR CN=3 THEN PRINT"Territory: "TE$;TAB(50)"Period: "MO$

7309 IF CN=2 THEN PRINT"Territory: "TE$;TAB(50)"Period: "PE$

7314 PRINT

7320 PRINT RO$;TAB(15)"F   o   c   i";TAB(34)"D i s e a s e d  A n i m a l s";TAB(67)"Suspect An."

7322 PRINT TAB(15)"New";TAB(22)"Extinct";TAB(35)"New";TAB(45)"Dead+Kil.";TAB(55)"Slaught.";

7323 PRINT TAB(67)"Slaughtered"

7400 C=0:D=0:E=0:F=0:G=0:H=0

7410 FOR I=1 TO N

7412 C=C+C(I)

7414 D=D+D(I)

7416 E=E+E(I)

7418 F=F+F(I)

7420 G=G+G(I)

7421 H=H+H(I)

7422 NEXT I

7423 PRINT

7500 FOR I=1 TO N

7506 PRINT USING"\          \";CO$(I);

     PRINT TAB(15)INT(C(I));TAB(22)INT(D(I));TAB(35)INT(E(I));TAB(45)INT(F(I));

7507 PRINT TAB(55)INT(G(I));TAB(68)INT(H(I))

7562 NEXT I:PRINT

7564 PRINT"T o t a l";TAB(15)INT(C);TAB(22)INT(D);TAB(35)INT(E);TAB(45)INT(F);

7565 PRINT TAB(55)INT(G);TAB(68)INT(H)

7566 PRINT

7570 PRINT"Animals per one new focus";TAB(35)INT((E/C)+.5);TAB(45)INT((F/C)+.5);TAB(55)INT((G/C)+.5);

7571 PRINT TAB(68)INT((H/C)+.5)

7970 IF DS$="" THEN GOTO 7980 ELSE PRINT:PRINT"Data source: "DS$

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.8-TABLE OF SLAUGHTERED ANIMALS AND DISEASE FINDINGS"

8015 PRINT"======================================================"

8016 PRINT"This subprogramme summarizes data on the findings during the inspection"

8017 PRINT"of slaughtered animals and meat in abattoirs:"

8020 PRINT"     1) Total slaughtered animals, edible, conditionally edible"

8022 PRINT"     2) Sanitary (emergency) slaughtered animals"

8024 PRINT"     3) Disease findings during inspection of slaughtered animals and meat"

8026 PRINT"     4) Confiscation of internal organs of slaughtered animals"

8027 PRINT"     5) Causes of premature slaughter":PRINT

8030 INPUT"Enter choice number : ",CN

8031 IF CN=1 OR CN=2 OR CN=3 OR CN=4 OR CN=5 THEN GOTO 8032 ELSE PRINT IDE$:GOTO 8980

8032 IF CN=3 OR CN=5 THEN GOTO 8040 ELSE 8033

8033 INPUT"Do you want to process data according to places (p) or subperiods (t) ";T$

8038 IF T$="p" OR T$="t" THEN GOTO 8040 ELSE PRINT IDE$:GOTO 8980

8040 PRINT:PRINT"INPUT DATA":PRINT

8041 IF CN=1 THEN NA$="       VETERINARY  INSPECTION  DECISION  ON  SLAUGHTERED  ANIMALS"

8042 IF CN=2 THEN NA$="      NUMBER OF TOTAL AND  S A N I T A R Y  SLAUGHTERED ANIMALS"

8043 IF CN=3 THEN NA$="  SLAUGHTERED ANIMALS AND MEAT INSPECTION  D I S E A S E S'   F I N D I N G S"

8044 IF CN=4 THEN NA$="     C O N F I S C A T I O N  OF SLAUGHTERED ANIMALS INTERNAL ORGANS"

8045 IF CN=5 THEN NA$="    C A U S E S    OF   P R E M A T U R E   S L A U G H T E R  OF ANIMALS"

8046 IF T$="p" THEN RO$="P l a c e"

8047 IF T$="t" THEN RO$="Subperiod"

8048 INPUT"     species, category(ies) ";SP$,CA$

8050 INPUT"     territory, period ";PL$,TI$

8051 IF CN=3 OR CN=5 THEN GOTO 8056 ELSE 8052

8052 IF T$="p" THEN INPUT"     number of places (2 up to 11 !) ";N:GOTO 8061

8054 IF T$="t" THEN INPUT"     number of subperiods (2 up to 11 !) ";N:GOTO 8061

8056 INPUT"     number of slaughtered animals ";T

8057 IF T=0 THEN PRINT IDE$:GOTO 8980 ELSE 8060

8060 INPUT"     number of selected diseases - causes (2 up to 11 !)          ";N

8061 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 8980

8062 IF N<9 THEN INPUT"     data source (without commas !) ";DS$

8100 CLS:PRINT:PRINT"Respecting the sequence order"

8101 PRINT"     and providing  a l l  data required (real or estimated; integers !!),":PRINT

8105 IF CN=3 OR CN=5 THEN GOTO 8125 ELSE 8110

8110 PRINT"     key "RO$;" names (up to 12 characters) and continue "

8111 PRINT"                    with columns values (separated by commas) of":PRINT

8113 IF CN=1 THEN GOTO 8115 ELSE 8120

8115 PRINT"     total slaughtered, edible, conditionally edible after sterilization,"

8116 PRINT"                                 conditionally edible after other treatment: ":GOTO 8150

8120 IF CN=2 THEN GOTO 8121 ELSE 8125

8121 PRINT"     total slaughtered, sanitary slaughtered: ":GOTO 8173

8125 IF CN=3 THEN GOTO 8126 ELSE 8128

8126 PRINT"key specific disease name (up to 12 characters !), number of disease findings: ":GOTO 8173

8128 IF CN=4 then PRINT"                     confiscated lungs, hearts, livers, spleens, kidneys"

8150 IF CN=5 THEN PRINT"     key disease -  causes names (up to 12 characters !), number of cases :"

8173 PRINT:FOR I= 1 TO N

8174 PRINT TAB(5)I;"row: ";

8175 INPUT "";CO$(I),C(I),D(I),E(I),F(I),G(I),H(I)

8176 IF CO$(I)="" THEN PRINT IDE$:GOTO 8980

8177 IF CN=1 AND C(I)<(D(I)+E(I)+F(I)+G(I)+H(I)) THEN PRINT IDE$:GOTO 8980 ELSE 8178

8178 IF CN=2 AND C(I)<D(I) THEN PRINT IDE$:GOTO 8980 ELSE 8179

8179 IF CN=3 AND C(I)>T THEN PRINT IDE$:GOTO 8980 ELSE 8180

8180 IF CN=4 THEN GOTO 8181

8181 IF CN=5 AND C(I)>T THEN PRINT IDE$:GOTO 8980 ELSE 8190

8190 NEXT I

8200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8201 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8222 IF I$="m" THEN GOTO 10

8223 IF I$="c" THEN GOTO 8000

8224 IF I$=CHR$(13) THEN GOTO 8300

8300 CLS

8305 PRINT NA$:PRINT

8306 PRINT"Species: "SP$;TAB(40)"Category(ies): "CA$

8307 IF CN=3 OR CN=5 THEN GOTO 8310 ELSE 8308

8308 IF T$="p" THEN PRINT "Territory: "PL$;TAB(50)"Period: "TI$

8309 IF T$="t" THEN PRINT "Territory: "PL$;TAB(50)"Period: "TI$

8310 IF CN=3 OR CN=5 THEN PRINT"Territory: "PL$;TAB(50)"Period: "TI$

8311 IF CN=3 OR CN=5 THEN PRINT TAB(15)"Total slaughtered animals: "T

8314 PRINT

8315 IF CN=1 THEN GOTO 8320 ELSE 8325

8320 PRINT RO$;TAB(15)"T o t a l";TAB(31)"Edible";TAB(42)"Conditionally edible";TAB(66)"Non edible"

8322 PRINT TAB(15)"slaughtered";TAB(42)"steriliz.";TAB(53)"oth. treat.":GOTO 8400

8325 IF CN=2 THEN GOTO 8326 ELSE 8330

8326 PRINT RO$;TAB(15)"T o t a l";TAB(31)"Sanitary";TAB(46)"Proportion";TAB(59)"Percentage"

8327 PRINT TAB(15)"slaughtered";TAB(31)"slaughtered":GOTO 8400

8328 IF CN=3 THEN GOTO 8330 ELSE 8333

8330 IF CN=3 THEN PRINT "D i s e a s e";TAB(17)"Number of";TAB(28)"Proportion";TAB(41)" %";TAB(55)"Proportion";TAB(67)"  %"

8332 IF CN=3 THEN PRINT TAB(17)"findings";TAB(28)"of  total  findings";TAB(55)"of total slaughtered":GOTO 8400

8333 IF CN=4 THEN GOTO 8334 ELSE 8336

8334 PRINT RO$;TAB(14)"Lungs";TAB(26)"Hearts";TAB(38)"Livers";TAB(50)"Spleens";TAB(62)"Kidneys":GOTO 8400

8336 IF CN=5 THEN PRINT "C a u s e s ";TAB(17)"Number of";TAB(28)"Proportion";TAB(41)"%";TAB(55)"Proportion";TAB(67)"  %"

8337 PRINT TAB(17)"cases";TAB(28)"of total cases";TAB(55)"of total slaughtered":GOTO 8400

8400 C=0:D=0:E=0:F=0:G=0:H=0

8410 FOR I=1 TO N

8412 C=C+C(I)

8414 D=D+D(I)

8416 E=E+E(I)

8418 F=F+F(I)

8420 G=G+G(I)

8421 H=H+H(I)

8422 NEXT I

8423 PRINT

8500 FOR I=1 TO N

8506 IF CN=1 THEN PRINT CO$(I);TAB(15)C(I);TAB(31)D(I);TAB(42)E(I);TAB(53)F(I);TAB(66)C(I)-(D(I)+E(I)+F(I)):GOTO 8562

8554 IF CN=2 THEN PRINT CO$(I);TAB(15)C(I);TAB(31)D(I);TAB(47)USING"#.####";D(I)/C(I);TAB(59)USING"###.####";(D(I)/C(I))*100:GOTO 8562

8555 IF CN=3 OR CN=5 THEN PRINT CO$(I);TAB(17)C(I);TAB(29)USING"#.####";C(I)/C;TAB(38)USING"###.####";(C(I)/C)*100;

8556 IF CN=3 OR CN=5 THEN PRINT TAB(56)USING"#.####";C(I)/T;TAB(65)USING"###.####";(C(I)/T)*100:GOTO 8562

8559 IF CN=4 THEN PRINT CO$(I);TAB(14)C(I);TAB(26)D(I);TAB(38)E(I);TAB(50)F(I);TAB(62)G(I):GOTO 8562

8560 'IF CN=5 THEN PRINT CO$(I);TAB(26)C(I);TAB(47)USING"#.####";C(I)/C;TAB(60)USING"###.####";(C(I)/C)*100

8562 NEXT I

8563 PRINT

8568 IF CN=1 THEN PRINT"T o t a l";TAB(15)C;TAB(31)D;TAB(42)E;TAB(53)F;TAB(66)C-(D+E+F):PRINT

8569 IF CN=1 THEN PRINT"Proportion"TAB(16)"1.0000";TAB(32)USING"#.####";D/C;TAB(43)E/C;TAB(54)F/C;

8570 IF CN=1 THEN PRINT TAB(67)USING"#.####";(C-(D+E+F))/C

8582 IF CN=2 THEN PRINT"T o t a l";TAB(15)C;TAB(31)D;TAB(47)USING"#.####";D/C;TAB(59)USING"###.####";(D/C)*100:GOTO 8598

8583 IF CN=3 OR CN=5 THEN PRINT"T o t a l";TAB(17)C;TAB(29)"1.0000";TAB(38)"100.0000";

8584 IF CN=3 OR CN=5 THEN PRINT TAB(56)USING"#.####";C/T;TAB(65)USING"###.####";(C/T)*100:GOTO 8598

8589 IF CN=4 THEN PRINT"T o t a l";TAB(14)C;TAB(26)D;TAB(38)E;TAB(50)F;TAB(62)G:GOTO 8598

8598 IF DS$="" THEN GOTO 8980 ELSE PRINT:PRINT"Data source: "DS$

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.9-PREVALENCE OF INTRAFOCAL ANIMALS BASED ON THE NUMBER"

9001 PRINT"     OF OUTBREAKS, AVERAGE HERD SIZE AND INFECTION DURATION"

9005 PRINT"==========================================================="

9008 PRINT "INPUT DATA:";TAB(55)"(Ref.: Morley - adapted)"

9022 INPUT"     disease, species ";D$,S$

9024 INPUT"     place, a n n u a l  period ";P$,T$

9030 INPUT"     number of animals in the population                        ";A

9031 INPUT"     number of outbreaks in previous 12 months                  ";O

9032 INPUT"     average herd size                                          ";HS

9033 IF A=0 OR O=0 OR HS=0 THEN PRINT IDM$:GOTO 9980 ELSE 9034

9034 IF (HS*O)>A THEN GOTO 9035 ELSE 9045

9035 PRINT"Error ! Multiple of outbreaks and average herd size cannot be major than"

9036 PRINT"          the total number of animals in the population !":GOTO 9980

9045 INPUT"     average duration of infection outbreaks in days            ";DID

9049 DI=DID/365

9181 'CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9182 'PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

9183 'IF I$="m" THEN GOTO 10

9184 'IF I$="c" THEN GOTO 9000

9185 'IF I$=CHR$(13) THEN GOTO 9200

9200 PRINT:PRINT"RESULT:":PRINT

9241 'PRINT TAB(10)"Disease: "D$

9242 'PRINT TAB(10)"Species: "S$

9243 'PRINT"Place: "P$;TAB(50)"Period: "T$:PRINT

9244 PRINT"    Estimated":PRINT

9245 PRINT"    annual period prevalence rate of intrafocal animals ":PRINT

9246 PRINT"       based on the number of the outbreaks, average herd size":PRINT

9247 PRINT"                                   and outbreak average duration = "

9248 PRINT:PRINT TAB(66)"= ";USING"#.######";(O*HS*DI)/A

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.10-RELATIONS BETWEEN POPULATION PREVALENCE AND AFFECTED HERDS PREVALENCE"

10012 PRINT"==========================================================================="

10015 PRINT"Relations between the values of disease morbidity and nidality;"

10016 PRINT"applicable if affected herds' composition and size are relatively homogenous."

10017 'PRINT

10019 PRINT"INPUT DATA:"

10020 INPUT"     disease     ";DI$

10021 INPUT"     species     ";SP$

10022 INPUT"     place       ";PL$

10023 INPUT"     time        ";TI$

10024 PRINT"Answer only  t w o  questions about rates (>0 - <1) to calculate the value"

10025 PRINT"                                                           of the third one !":PRINT

10026 INPUT"  population prevalence rate of diseased animals                    ";PPR

10027 INPUT"  average prevalence rate of diseased animals in affected herds     ";AHP

10028 INPUT"  prevalence rate of affected herds                                 ";PRO

10029 IF (PPR+AHP)=0 OR (AHP+PRO)=0 OR (PRO+PPR)=0 THEN PRINT IDM$:GOTO 10980 ELSE 10030

10030 IF PPR>1 OR AHP>1 OR PRO>1 THEN GOTO 10031 ELSE 10032

10031 PRINT:PRINT"Error ! Value of rates cannot be major than 1 !":GOTO 10980

10032 IF PPR>0 AND AHP>0 AND PRO>0 THEN GOTO 10033 ELSE 10035

10033 PRINT:PRINT"Error ! Answer only  t w o  questions !":GOTO 10980

10035 'CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10036 'PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$:PRINT

10037 'IF I$="m" THEN GOTO 10

10038 'IF I$="c" THEN GOTO 10000

10039 'IF I$=CHR$(13) THEN GOTO 10040

10040 PRINT:PRINT"RESULT:":'PRINT

10042 'PRINT TAB(10)"Disease: "DI$

10043 'PRINT TAB(10)"Species: "SP$

10044 'PRINT"Place: "PL$;TAB(50)"Time: "TI$:PRINT

10045 PRINT:PRINT

10050 IF PPR=0 THEN GOTO 10052 ELSE 10060

10052 PRINT"   Estimated population prevalence rate"

10053 PRINT:PRINT"                                     of diseased animals  = ";USING"###.####";PRO*AHP:GOTO 10980

10060 IF AHP=0 THEN GOTO 10062 ELSE 10070

10062 PRINT"   Estimated average prevalence rate"

10063 PRINT:PRINT"                of diseased animals in affected herds  = ";

10066 PRINT USING"###.####";PPR/PRO:GOTO 10980

10070 IF PRO=0 THEN GOTO 10072 ELSE 10980

10072 PRINT"   Estimated prevalence rate"

10073 PRINT:PRINT"                                  of affected herds  = ";USING"###.####";PPR/AHP

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10982 IF R$="y" OR R$="n" THEN GOTO 10983 ELSE 10990

10983 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.11-ANIMALS AND LIVESTOCK UNITS PER TERRITORY UNIT, INHABITANT"

11001 PRINT"      AND VETERINARIAN"

11002 PRINT"================================================================"

11010 PRINT"This subprogramme calculates  following indicators:":PRINT

11013 PRINT TAB(5)"1) average number of animals per territory unit"

11014 PRINT TAB(5)"2) average number of animals per inhabitant"

11015 PRINT TAB(5)"3) average number of animals per veterinarian"

11017 PRINT TAB(5)"4) total number of livestock units"

11019 PRINT TAB(5)"5) average number of livestock units per territory unit"

11021 PRINT TAB(5)"6) average number of livestock units per inhabitant"

11023 PRINT TAB(5)"7) average number of livestock units per veterinarian"

11025 PRINT TAB(5)"8) average number of territory units per veterinarian"

11026 PRINT TAB(5)"9) average number of inhabitants per veterinarian":PRINT

11030 INPUT"Enter choice number: ",CH

11035 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 THEN GOTO 11040 ELSE PRINT IDE$:GOTO 11980

11040 P$="A l l  following  t h r e e   q u e s t i o n s   must be answered (integers !);"

11041 PRINT"Unknown data to be replaced by estimates or by fictitious ones !"

11050 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 11051 ELSE 11101

11051 PRINT:PRINT"Pre-defined list of animal species: cattle, dairy cows, buffaloes, horses,"

11052 PRINT"mules/asses, camels, sheep, goats, pigs, chickens and other poultry. If number"

11053 PRINT"of 'dairy cows' is available then this value to be substracted from 'cattle',"

11054 PRINT"if not then instead of missing number of 'dairy cows' key a comma only."

11055 INPUT"   Do you want to add  o n e  other species, yes(y) or no(n) ";O$

11056 IF O$="y" THEN GOTO 11060 ELSE 11101

11060 INPUT"    name (in plural) of the additional species               ";A$

11101 CLS:PRINT"INPUT DATA: ":PRINT

11110 INPUT"territory, time ";T$,D$:PRINT

11140 IF CH=8 OR CH=9 THEN GOTO 11180 ELSE 11150

11150 PRINT:INPUT"number of cattle total, dairy cows, buffaloes ";A,B,C

11160 INPUT"number of horses, mules/asses, camels         ";D,E,F

11165 INPUT"number of sheep, goats, pigs                  ";G,H,I

11166 INPUT"number of chickens,  other poultry            ";J,K

11170 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 11172 ELSE 11177

11172 IF O$="y" THEN GOTO 11173 ELSE 11177

11173 PRINT"number of "A$;

11174 PRINT TAB(46)"";

11175 INPUT" ";L:PRINT

11177 IF (A+B+C+D+E+F+G+H+I+J+K+L)=0 THEN GOTO 11900

11180 IF CH=3 OR CH=7 OR CH=8 OR CH=9 THEN GOTO 11181 ELSE 11193

11181 PRINT:PRINT P$:PRINT:INPUT"     total veterinarians                           ";V1

11182 INPUT"     government veterinarians                      ";V2

11183 INPUT"     private veterinarians                         ";V3

11184 IF V1=0 OR V2=0 OR V3=0 THEN GOTO 11900 ELSE 11193

11193 IF CH=2 OR CH=6 OR CH=9 THEN GOTO 11194 ELSE 11198

11194 PRINT:PRINT P$:PRINT:INPUT"     total number of inhabitants                     ";P1

11195 INPUT"     inhabitants in rural areas                      ";P2

11196 INPUT"     inhabitants in urban areas                      ";P3

11197 IF P1=0 OR P2=0 OR P3=0 THEN GOTO 11900 ELSE 11198

11198 IF CH=1 OR CH=5 OR CH=8 THEN GOTO 11199 ELSE 11204

11199 PRINT:INPUT"     territory measure units                   ";TMU$

11200 PRINT:PRINT P$:PRINT:INPUT"     land area total                             ";T1

11201 INPUT"     arable land                                 ";T2

11202 INPUT"     pastures                                    ";T3

11203 IF T1=0 OR T2=0 OR T3=0 THEN GOTO 11900 ELSE 11204

11204 CLS:IF CH=4 OR CH=5 OR CH=6 OR CH=7 THEN GOTO 11210 ELSE 11300

11210 PRINT:PRINT TAB(10)"Selection of livestock units rates:"

11220 PRINT:PRINT"  a) Conversion rates 'a':"

11222 PRINT"Cattle (without dairy cows) = 0.5; dairy cows = 1; buffaloes = 0.5;"

11224 PRINT"horses = 1; mules/asses = 0.5; camels = 1; sheep = 0.1; goats = 0.1;"

11226 PRINT"pigs = 0.2; chicken = 0.01; other poultry = 0.01."

11230 PRINT:PRINT"  b) Conversion rates 'b':"

11232 PRINT"Cattle = 0.7; buffaloes = 1; horses = 1; mules/asses = 0.8; camels = 1.1;"

11234 PRINT"sheep = 0.1; goats = 0.1; pigs = 0.25; chicken = 0.01; other poultry = 0.01."

11235 PRINT

11240 INPUT"Which conversion rates do you wish ? Rates 'a' or 'b' or other ones 'o' ";Z$

11242 IF Z$="a" OR Z$="b" OR Z$="o" THEN GOTO 11250 ELSE PRINT IDE$:GOTO 11980

11250 IF Z$="o" THEN GOTO 11251 ELSE 11300

11251 PRINT:PRINT"Enter other conversion rates numbers in following table:"

11255 INPUT"     conversion rates for  cattle total,dairy cows,buffaloes ";CA,CB,CC

11257 INPUT"     conversion rates for horses,mules+asses,camels          ";CD,CE,CF

11259 INPUT"     conversion rates for sheep,goats,pigs                   ";CG,CCH,CI

11261 INPUT"     conversion rates for chickens, other poultry            ";CJ,CK:GOTO 11300

11300 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11301 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ", I$

11302 IF I$="m" THEN GOTO 10

11303 IF I$="c" THEN GOTO 11000

11304 IF I$=CHR$(13) THEN GOTO 11305

11305 CLS:PRINT "RESULTS:":PRINT

11306 LU1=A*.5+B*1+C*.5+D*1+E*.5+F*1+G*.1+H*.1+I*.2+J*.01+K*.01

11307 LU2=A*.7+C*1+D*1+E*.8+F*1.1+G*.1+H*.1+I*.25+J*.01+K*.015

11308 LU3=A*CA+B*CB+C*CC+D*CD+E*CE+F*CF+G*CG+H*CCH+I*CI+J*CJ+K*CK

11311 PRINT"Territory: "T$;TAB(50)"Time: "D$

11315 IF CH=1 THEN GOTO 11316 ELSE 11335

11316 PRINT TAB(20)"Territory measure unit: "TMU$

11317 PRINT:PRINT TAB(20)"Average number of animals per ";TMU$

11318 PRINT TAB(20)"-------------------------------------"

11319 PRINT TAB(10)"Species";TAB(32)"Total";TAB(45)"Arable";TAB(60)"Pastures"

11320 PRINT TAB(32)"Land";TAB(45)"Land":PRINT

11321 PRINT TAB(10)"cattle",USING"####.####";A/T1;TAB(42)A/T2;TAB(57)A/T3:IF B=0 THEN GOTO 11323

11322 PRINT TAB(10)"dairy cows",USING"####.####";B/T1;TAB(42)B/T2;TAB(57)B/T3

11323 PRINT TAB(10)"buffaloes",USING"####.####";C/T1;TAB(42)C/T2;TAB(57)C/T3

11324 PRINT TAB(10)"horses",USING"####.####";D/T1;TAB(42)D/T2;TAB(57)D/T3

11325 PRINT TAB(10)"mules/asses",USING"####.####";E/T1;TAB(42)E/T2;TAB(57)E/T3

11326 PRINT TAB(10)"camels",USING"####.####";F/T1;TAB(42)F/T2;TAB(57)F/T3

11327 PRINT TAB(10)"sheep",USING"####.####";G/T1;TAB(42)G/T2;TAB(57)G/T3

11328 PRINT TAB(10)"goats",USING"####.####";H/T1;TAB(42)H/T2;TAB(57)H/T3

11329 PRINT TAB(10)"pigs";TAB(29)USING"####.####";I/T1;TAB(42)I/T2;TAB(57)I/T3

11330 PRINT TAB(10)"chickens",USING"####.####";J/T1;TAB(42)J/T2;TAB(57)J/T3

11331 PRINT TAB(10)"other poultry",USING"####.####";K/T1;TAB(42)K/T2;TAB(57)K/T3

11332 IF O$="y" THEN PRINT TAB(10)A$;TAB(29)USING"####.####";L/T1;TAB(42)L/T2;TAB(57)L/T3:GOTO 11980

11335 IF CH=2 THEN GOTO 11336 ELSE 11354

11336 PRINT:PRINT TAB(15)"Average number of animals per inhabitant"

11337 PRINT TAB(15)"----------------------------------------"

11338 PRINT TAB(10)"Species";TAB(30)"Inhabitant";TAB(44)"Inhabitant";TAB(58)"Inhabitant"

11339 PRINT TAB(44)"in rural";TAB(58)"in urban"

11340 PRINT TAB(44)"areas";TAB(58)"areas":PRINT

11341 PRINT TAB(10)"cattle",USING"####.####";A/P1;TAB(42)A/P2;TAB(57)A/P3:IF B=0 THEN GOTO 11343

11342 PRINT TAB(10)"dairy cows",USING"####.####";B/P1;TAB(42)B/P2;TAB(57)B/P3

11343 PRINT TAB(10)"buffaloes",USING"####.####";C/P1;TAB(42)C/P2;TAB(57)C/P3

11344 PRINT TAB(10)"horses",USING"####.####";D/P1;TAB(42)D/P2;TAB(57)D/P3

11345 PRINT TAB(10)"mules/asses",USING"####.####";E/P1;TAB(42)E/P2;TAB(57)E/P3

11346 PRINT TAB(10)"camels",USING"####.####";F/P1;TAB(42)F/P2;TAB(57)F/P3

11347 PRINT TAB(10)"sheep",USING"####.####";G/P1;TAB(42)G/P2;TAB(57)G/P3

11348 PRINT TAB(10)"goats",USING"####.####";H/P1;TAB(42)H/P2;TAB(57)H/P3

11349 PRINT TAB(10)"pigs";TAB(29)USING"####.####";I/P1;TAB(42)I/P2;TAB(57)I/P3

11350 PRINT TAB(10)"chickens";TAB(29)USING"####.####";J/P1;TAB(42)J/P2;TAB(57)J/P3

11351 PRINT TAB(10)"other poultry";TAB(29)USING"####.####";K/P1;TAB(42)K/P2;TAB(57)K/P3

11352 IF O$="y" THEN PRINT TAB(10)A$;TAB(29)USING"####.####";L/P1;TAB(42)L/P2;TAB(57)L/P3:GOTO 11980

11354 IF CH=3 THEN GOTO 11355 ELSE 11373

11355 PRINT:PRINT TAB(10)"Average number of animals per veterinarian "

11356 PRINT TAB(10)"------------------------------------------"

11357 PRINT TAB(10)"Species";TAB(30)"Veterinarian";TAB(44)"Government";TAB(58)"Private"

11358 PRINT TAB(44)"Veterinarian";TAB(58)"Veterinarian":PRINT

11360 PRINT TAB(10)"cattle";,INT((A/V1)+.5),INT((A/V2)+.5),INT((A/V3)+.5):IF B=0 THEN GOTO 11362

11361 PRINT TAB(10)"dairy cows";,INT((B/V1)+.5),INT((B/V2)+.5),INT((B/V3)+.5)

11362 PRINT TAB(10)"buffaloes";,INT((C/V1)+.5),INT((C/V2)+.5),INT((C/V3)+.5)

11363 PRINT TAB(10)"horses";,INT((D/V1)+.5),INT((D/V2)+.5),INT((D/V3)+.5)

11364 PRINT TAB(10)"mules/asses";,INT((E/V1)+.5),INT((E/V2)+.5),INT((E/V3)+.5)

11365 PRINT TAB(10)"camels";,INT((F/V1)+.5),INT((F/V2)+.5),INT((F/V3)+.5)

11366 PRINT TAB(10)"sheep";,INT((G/V1)+.5),INT((G/V2)+.5),INT((G/V3)+.5)

11367 PRINT TAB(10)"goats";,INT((H/V1)+.5),INT((H/V2)+.5),INT((H/V3)+.5)

11368 PRINT TAB(10)"pigs";TAB(29)INT((I/V1)+.5),INT((I/V2)+.5),INT((I/V3)+.5)

11369 PRINT TAB(10)"chickens";,INT((J/V1)+.5),INT((J/V2)+.5),INT((J/V3)+.5)

11370 PRINT TAB(10)"other poultry";,INT((K/V1)+.5),INT((K/V2)+.5),INT((K/V3)+.5)

11371 IF O$="y" THEN PRINT TAB(10)A$;TAB(29)INT((L/V1)+.5),INT((L/V2)+.5),INT((L/V3)+.5):GOTO 11980

11373 IF CH=4 THEN GOTO 11380 ELSE 11400

11380 IF CH=4 AND Z$="a" THEN GOTO 11386 ELSE 11387

11386 PRINT:PRINT:PRINT TAB(10)"Total number of livestock units   =  "INT(LU1):PRINT:GOTO 11980

11387 IF CH=4 AND Z$="b" THEN GOTO 11388 ELSE 11390

11388 PRINT:PRINT:PRINT TAB(10)"Total number of livestock units  =  "INT(LU2):PRINT:GOTO 11980

11390 IF CH=4 AND Z$="o" THEN GOTO 11391 ELSE 11980

11391 PRINT:PRINT:PRINT TAB(10)"Total number of livestock units  =  "INT(LU3):PRINT:GOTO 11980

11400 IF CH=5 THEN GOTO 11401 ELSE 11420

11401 PRINT

11402 IF CH=5 AND Z$="a" THEN PRINT TAB(15)"Total livestock units = "INT(LU1)

11403 IF CH=5 AND Z$="b" THEN PRINT TAB(15)"Total livestock units = "INT(LU2)

11404 IF CH=5 AND Z$="o" THEN PRINT TAB(15)"Total livestock units = "INT(LU3)

11405 PRINT

11406 PRINT"Total land area          = "INT(T1) TMU$

11407 PRINT"Arable land area         = "INT(T2) TMU$

11408 PRINT"Pastures                 = "INT(T3) TMU$:PRINT

11409 PRINT:PRINT TAB(10)"Average number of livestock units per territory unit"

11410 PRINT TAB(10)"----------------------------------------------------"

11411 PRINT:PRINT TAB(32)"Total";TAB(46)"Arable";TAB(60)"Pastures"

11412 PRINT TAB(32)"Land";TAB(46)"Land":PRINT:PRINT

11413 IF Z$="a" THEN PRINT"Livestock units per "TMU$;TAB(30)USING"#####.##";(LU1/T1);TAB(44)USING"#####.##";(LU1/T2);TAB(58)USING"#####.##";(LU1/T3)

11414 IF Z$="b" THEN PRINT"Livestock units per "TMU$;TAB(30)USING"#####.##";(LU2/T1);TAB(44)USING"#####.##";(LU2/T2);TAB(58)USING"#####.##";(LU2/T3)

11415 IF Z$="o" THEN PRINT"Livestock units per "TMU$;TAB(30)USING"#####.##";(LU3/T1);TAB(44)USING"#####.##";(LU3/T2);TAB(58)USING"#####.##";(LU3/T3)

11418 PRINT:PRINT:GOTO 11980

11420 IF CH=6 THEN GOTO 11421 ELSE 11450

11421 PRINT

11423 IF CH=6 AND Z$="a" THEN PRINT TAB(15)"Total livestock units = "INT(LU1)

11424 IF CH=6 AND Z$="b" THEN PRINT TAB(15)"Total livestock units = "INT(LU2)

11425 IF CH=6 AND Z$="o" THEN PRINT TAB(15)"Total livestock units = "INT(LU3)

11426 PRINT

11430 PRINT"Total inhabitants                   = "INT(P1)

11431 PRINT"Inhabitants in rural areas          = "INT(P2)

11432 PRINT"Inhabitants in urban areas          = "INT(P3):PRINT

11433 PRINT:PRINT TAB(10)"Average number of livestock units per inhabitant"

11434 PRINT TAB(10)"------------------------------------------------"

11440 PRINT:PRINT TAB(30)"Inhabitant";TAB(44)"Inhabitant";TAB(58)"Inhabitant"

11441 PRINT TAB(44)"in rural";TAB(58)"in urban"

11442 PRINT TAB(44)"areas"TAB(58)"areas":PRINT:PRINT

11443 IF Z$="a" THEN PRINT"Livestock units";TAB(30)USING"###.####";(LU1/P1);TAB(44)(LU1/P2);TAB(58)(LU1/P3):GOTO 11448

11444 IF Z$="b" THEN PRINT"Livestock units";TAB(30)USING"###.####";(LU2/P1);TAB(44)(LU2/P2);TAB(58)(LU2/P3):GOTO 11448

11446 IF Z$="o" THEN PRINT"Livestock units";TAB(30)USING"###.####";(LU3/P1);TAB(44)(LU3/P2);TAB(58)(LU3/P3):GOTO 11448

11448 PRINT:PRINT:GOTO 11980

11450 IF CH=7 THEN GOTO 11451 ELSE 11470

11451 PRINT

11452 IF CH=7 AND Z$="a" THEN PRINT TAB(15)"Total livestock units = "INT(LU1)

11453 IF CH=7 AND Z$="b" THEN PRINT TAB(15)"Total livestock units = "INT(LU2)

11454 IF CH=7 AND Z$="o" THEN PRINT TAB(15)"Total livestock units = "INT(LU3)

11455 PRINT:PRINT"Total veterinarians         = "INT(V1)

11456 PRINT"Governmental veterinarians  = "INT(V2)

11457 PRINT"Private veterinarians       = "INT(V3):PRINT

11458 PRINT:PRINT TAB(10)"Average number of livestock units per veterinarian"

11459 PRINT TAB(10)"--------------------------------------------------"

11460 PRINT:PRINT TAB(30)"Veterinarian";TAB(44)"Government";TAB(58)"Private"

11461 PRINT TAB(44)"Veterinarian";TAB(58)"Veterinarian"

11465 PRINT:PRINT

11466 IF Z$="a" THEN PRINT"Livestock units";TAB(30)INT((LU1/V1)+.5);TAB(44)INT((LU1/V2)+.5);TAB(58)INT((LU1/V3)+.5):GOTO 11469

11467 IF Z$="b" THEN PRINT"Livestock units";TAB(30)INT((LU2/V1)+.5);TAB(44)INT((LU2/V2)+.5);TAB(58)INT((LU2/V3)+.5):GOTO 11469

11468 IF Z$="o" THEN PRINT"Livestock units";TAB(30)INT((LU3/V1)+.5);TAB(44)INT((LU3/V2)+.5);TAB(58)INT((LU3/V3)+.5):GOTO 11469

11469 PRINT:PRINT:GOTO 11980

11470 IF CH=8 THEN GOTO 11471 ELSE 11500

11471 PRINT:PRINT"Total land area        = "INT(T1);TAB(40)"Measure unit: "TMU$

11472 PRINT"Arable land            = "INT(T2)

11473 PRINT"Pastures               = "INT(T3):PRINT

11475 PRINT TAB(40)"Total veterinarians   = "INT(V1)

11476 PRINT TAB(40)"Govern. veterinarians = "INT(V2)

11477 PRINT Tab(40)"Private veterinarians = "INT(V3):PRINT

11480 PRINT TAB(5)"Average number of territory measure units per veterinarian"

11481 PRINT TAB(5)"----------------------------------------------------------"

11482 PRINT

11485 PRINT TAB(10)"Territory";TAB(30)"Veterinarian";TAB(44)"Government";TAB(58)"Private"

11486 PRINT TAB(44)"Veterinarian";TAB(58)"Veterinarian":PRINT

11488 PRINT"total land";TAB(29)USING"#####.##";T1/V1;TAB(43)T1/V2;TAB(57)T1/V3

11490 PRINT"arable land";TAB(29)USING"#####.##";T2/V1;TAB(43)T2/V2;TAB(57)T2/V3

11492 PRINT"pastures";TAB(29)USING"#####.##";T3/V1;TAB(43)T3/V2;TAB(57)T3/V3:GOTO 11980

11500 IF CH=9 THEN GOTO 11501 ELSE 11980

11501 PRINT:PRINT"Total inhabitants                      = "INT(P1)

11502 PRINT"Inhabitants in rural areas             = "INT(P2)

11503 PRINT"            in urban areas             = "INT(P3):PRINT

11505 PRINT TAB(40)"Total veterinarians   = "INT(V1)

11506 PRINT TAB(40)"Govern. veterinarians = "INT(V2)

11507 PRINT Tab(40)"Private veterinarians = "INT(V3):PRINT

11510 PRINT TAB(10)"Average number of inhabitants per veterinarian"

11511 PRINT TAB(10)"----------------------------------------------"

11512 PRINT

11520 PRINT TAB(10)"Inhabitants";TAB(30)"Veterinarian";TAB(44)"Government";TAB(58)"Private"

11521 PRINT TAB(44)"Veterinarian";TAB(58)"Veterinarian":PRINT

11525 PRINT"Total inhabitants";TAB(30)INT((P1/V1)+.5),INT((P1/V2)+.5),INT((P1/V3)+.5)

11527 PRINT"Inhabitants in rural areas";TAB(30)INT((P2/V1)+.5),INT((P2/V2)+.5),INT((P2/V3)+.5)

11529 PRINT"            in urban areas";TAB(30)INT((P3/V1)+.5),INT((P3/V2)+.5),INT((P3/V3)+.5):GOTO 11980

11900 PRINT IDE$

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or not(n) ";R$

11982 IF R$="y" OR R$="n" THEN GOTO 11983 ELSE 11990

11983 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"11.12-RATES OF SPREAD OF ANIMAL DISEASES' OUTBREAKS"

12015 PRINT"==================================================="

12020 PRINT"INPUT DATA:"

12021 INPUT"     disease, type of outbreaks ";DI$,OT$

12023 INPUT"     territory, period ";PL$,TI$

12024 INPUT"Do you have data according to subterritories (t) or subperiods (p) ";D$

12025 IF D$="t" OR D$="p" THEN GOTO 12034 ELSE PRINT IDE$:GOTO 12980

12034 INPUT"     number of rows (up to 11 !)  ";N

12035 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 12980

12037 INPUT"     data source (not to use commas !) ";DS$

12070 PRINT"Key row names (up to 13 characters), number of primary outbreaks,"

12071 PRINT"                                                   secondary outbreaks "

12073 FOR I= 1 TO N

12074 PRINT TAB(5)I;"row: ";

12075 INPUT "";CO$(I),C(I),D(I)

12076 IF CO$(I)="" OR C(I)=0 THEN PRINT IDM$:GOTO 12980 ELSE 12077

12077 NEXT I

12180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12182 IF I$="m" THEN GOTO 10

12183 IF I$="c" THEN GOTO 12000

12184 IF I$=CHR$(13) THEN GOTO 12200

12200 CLS

12201 IF D$="t" THEN RN$="Subterritory"

12202 IF D$="p" THEN RN$="Subperiod"

12205 PRINT TAB(5)"RATES  AND  RATIOS  OF  PRIMARY  AND  SECONDARY  DISEASE  OUTBREAKS":PRINT

12206 PRINT"Disease: "DI$;TAB(40)"Outbreaks type: "OT$

12210 PRINT"Territory: "PL$;TAB(50)"Period: "TI$

12212 PRINT

12215 PRINT RN$;

12223 PRINT TAB(15)"Outbreaks";TAB(26)" P r i m a r y";TAB(45)"S e c o n d a r y";TAB(66)"Prim/Sec."

12224 PRINT TAB(15)"T o t a l";TAB(27)"Total";TAB(36)"Rate ";TAB(46)"Total";TAB(56)"Rate ";TAB(66)"R a t i o "

12225 PRINT TAB(65)" 1 :  "

12302 C=0:D=0:T=0

12310 FOR I=1 TO N

12312 C=C+C(I)

12314 D=D+D(I)

12315 T=T+C(I)+D(I)

12322 NEXT I

12400 FOR I=1 TO N

12402 T(I)=C(I)+D(I)

12410 PRINT USING"\           \";CO$(I);

12411 PRINT TAB(15)T(I);TAB(26)C(I);TAB(35)USING"#.####";C(I)/T(I);

12412 PRINT TAB(45)D(I);TAB(55)USING"#.####";D(I)/T(I);

12413 PRINT TAB(65)USING"####.####";D(I)/C(I)

12420 NEXT I

12471 PRINT

12488 PRINT"T o t a l";TAB(15)T;TAB(26)C;TAB(35)USING"#.####";C/T;

12489 PRINT TAB(45)D;TAB(55)USING"#.####";D/T;

12490 PRINT TAB(65)USING"####.####";D/C

12498 IF DS$="" THEN GOTO 12980 ELSE PRINT:PRINT"Source: "DS$

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

12982 IF R$="y" OR R$="n" THEN GOTO 12983 ELSE 12990

12983 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

13002 IF Z$="y" OR Z$="n" THEN GOTO 13010 ELSE 13030

13010 IF Z$="y" THEN GOTO 13020 ELSE 13030

13020 CHAIN"EPIZ40MM.KOU"

13025 CLS:PRINT TAB(5)"E R R O R !  Start again! Next input error may terminate the programme!":PRINT:GOTO 500

13030 SYSTEM

 

 

         12-Complementary subprogrammes - II

 

5 ON ERROR GOTO 7995

6 IDE$="Input data error !"

7 IDM$="Imput data missing !"

10 PRINT"EPIZ4012.KOU":'10/9/2002

15 e$="EPIZOO, ver. 4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver. 4.0";TAB(70)v$:PRINT

30 PRINT TAB(8)"12-COMPLEMENTARY SUBPROGRAMMES - II"

40 PRINT TAB(8)"==================================="

500 PRINT:PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(8)"1-Health rates' adjustment based on category structure standards"

520 PRINT TAB(8)"2-Morbidity/mortality adjustment based on category rates' standards"

530 PRINT TAB(8)"3-Two populations rates' adjustment based on standard proportions"

540 PRINT TAB(8)"4-Two populations rates' adjustment based on category standards"

542 PRINT TAB(8)"5-Selection of methods for specific disease control programme"

543 PRINT TAB(8)"6-Survey response rate"

545 PRINT TAB(8)"7-Dilution of solution for disinfection, disinfestation, etc."

550 PRINT TAB(8)"8-Summary value of animal products per one veterinarian"

551 PRINT TAB(8)"9-Values of individual animal products per one veterinarian"

552 PRINT TAB(8)"10-Animal commodity export/import size per one veterinarian"

556 PRINT TAB(8)"11-Per capita production of food of animal origin"

558 PRINT TAB(8)"12-Selection of priority diseases for control programme"

600 PRINT TAB(8)"13-True prevalence estimation based on diag. method detectability"

610 PRINT:PRINT TAB(8)"14-E N D  of this group of subprogrammes"

630 PRINT:PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 645

660 IF Z$="y" THEN 20 ELSE GOTO 14000

670 PRINT

690 INPUT"       Enter choice number : ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 OR CH=14 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.1-POPULATION HEALTH RATES' ADJUSTMENT BASED ON CATEGORY STRUCTURE STANDARDS"

1010 PRINT"=============================================================================="

1011 PRINT TAB(60)"(Ref.: Rose, Barker)"

1015 DEFDBL A-Z

1020 PRINT TAB(2)"This subprogramme calculates the comparison adjustment of stratified morbidity"

1021 PRINT TAB(2)"(incidence, prevalence) rates, mortality rates, etc. using  d i r e c t "

1022 PRINT TAB(2)"standardization based on known standard category structure of the reference "

1023 PRINT TAB(2)"population."

1025 REM:- includes a weighted average of the stratum - specific rates with weights

1026 REM:equal to the proportion of animals in each stratum group in a convenient

1027 REM:reference population.

1031 PRINT:GOTO 1050

1040 PRINT IDM$:GOTO 1981

1050 PRINT"INPUT DATA:":PRINT"(proportions and rates in form of numbers between >0 and 1 !)":PRINT

1051 INPUT"    place, time              ";PL$,TI$

1052 INPUT"    species                  ";SP$

1053 INPUT"    category(ies)            ";CA$

1054 INPUT"    disease(s)/form          ";DI$

1055 INPUT"    indicator/rate           ";RA$

1058 INPUT"    number of stratum groups - subcategories (2 up to 11 !) ";N

1059 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 1981

1099 PRINT

1100 CLS:PRINT

1101 PRINT"  Do you have relative - proportions (r) or absolute data (a)"

1102 INPUT"                                      on standard category structure  ";D$:PRINT

1103 IF D$="r" OR D$="a" THEN GOTO 1104 ELSE PRINT IDE$:GOTO 1981

1104 IF D$="r" THEN GOTO 1105 ELSE 1129

1105 PRINT TAB(5)"List data - subcategory names (up to 15 characters !), "

1106 PRINT TAB(10)"proportions of reference population (sum = 1.0 !), rates:":PRINT

1107 FOR I=1 TO N

1108 PRINT TAB(5)I;": ";

1109 INPUT"subcategory, proportion, rate ";CN$(I),P(I),R(I)

1110 IF CN$(I)="" OR P(I)=0 OR R(I)=0 THEN GOTO 1040 ELSE 1111

1111 IF R(I)>1 OR P(I)>1 THEN PRINT"Rate or proportion cannot be major than 1 !":GOTO 1981 ELSE 1112

1112 NEXT I

1116 R=0:PO=0

1117 FOR I=1 TO N

1118 R=R+R(I)

1119 PO=PO+P(I)

1120 NEXT I

1122 IF PO<>1.0 THEN GOTO 1123 ELSE 1148

1123 PRINT:PRINT"Error! Sum of proportions must be 1.0 ! New input!":GOTO 1058

1129 PRINT:PRINT TAB(5)"List data - subcategory names (up to 15 characters !),"

1130 PRINT TAB(15)"numbers of reference population, rates:":PRINT

1131 FOR I=1 TO N:PRINT I;": ";

1132 INPUT"subcategory, number, rate ";CN$(I),SN(I),R(I)

1133 IF CN$(I)="" OR SN(I)=0 OR R(I)=0 THEN GOTO 1040 ELSE 1134

1134 IF R(I)>1 THEN PRINT"Rate cannot be major than 1 !":GOTO 1981 ELSE 1135

1135 NEXT I

1136 R=0:S=0

1137 FOR I=1 TO N

1138 R=R+R(I)

1139 S=SN+SN(I)

1140 NEXT I

1141 FOR I=1 TO N

1142 P(I)=SN(I)/S

1143 NEXT I:PO=0

1144 FOR I=1 TO N

1145 PO=PO+P(I)

1146 NEXT I

1148 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1149 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

1150 IF I$="m" THEN GOTO 10

1151 IF I$="c" THEN GOTO 1000

1152 IF I$=CHR$(13) THEN GOTO 1154

1154 CLS:PRINT TAB(8)"T A B L E  OF  D I R E C T   S T A N D A R D I Z A T I O N":PRINT

1155 'PRINT TAB(6)"Disease(s): "DI$:REM:TAB(40)"Type of rates: "RA$

1156 'PRINT"Place: "PL$;TAB(50)"Time :"TI$

1157 'PRINT"Species: "SP$;TAB(40)"Category: "CA$:PRINT

1163 PRINT TAB(5)"Subcategory";;TAB(25)"Subcategory";TAB(46)"Subcategory";TAB(60)"Standardized"

1165 PRINT TAB(5)"(Stratum Group)";TAB(25)"Proportion";TAB(47)"Specific";TAB(64)"Rate"

1166 PRINT TAB(25)"of Reference";TAB(46)RA$

1167 PRINT TAB(5)CA$;TAB(25)"Population";TAB(48)"rate"

1168 PRINT

1170 'IF D$="r" THEN GOTO 172 ELSE 180

1172 FOR I=1 TO N

1173 PRINT TAB(5)USING"\             \";CN$(I);

1174 PRINT TAB(25)USING"#.#####";P(I)/PO;

1175 PRINT TAB(45)USING"#.#####";R(I);

1176 PRINT TAB(60)USING"####.#####";(R(I)*(P(I)/PO))

1177 NEXT I:'GOTO

1180 'FOR I=1 TO N

1183 'PRINT TAB(5)CN$(I);TAB(25)USING"#.####";SN(I)/SN;

1184 'PRINT TAB(45)R(I);

1185 'PRINT TAB(60)USING"#####.####";(R(I)*(SN(I)/SN))

1186 'NEXT I:'GOTO

1188 ST=0

1189 FOR I=1 TO N

1190 ST=ST+(R(I)*(P(I)/PO))

1192 NEXT I

1193 PRINT:PRINT TAB(5)"T o t a l";;TAB(25)"1.0000";TAB(60)USING"####.#####";ST:PRINT

1194 PRINT TAB(5)"Direct adjusted (standardized) "RA$;"  rate"

1195 PRINT TAB(38)"of the population  = ";USING"#####.#####";ST

1981 A$=INKEY$:IF A$="" THEN GOTO 1981

1983 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

1984 IF R$="y" OR R$="n" THEN GOTO 1985 ELSE 1990

1985 IF R$="y" THEN GOTO 1000 ELSE 1990

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.2-MORBIDITY/MORTALITY ADJUSTMENT BASED ON CATEGORY  RATES' STANDARDS"

2010 PRINT"======================================================================="

2011 PRINT TAB(60)"(Ref.: Rose, Barker)"

2012 'acc. Rose G.,Baker D.J.P.:Epidemiology for the uninitiated,"

2013 'articles from the British Medical Journal,1986,Latimer Trend & Cp.Ltd.

2014 'Plymouth

2015 DEFDBL A-Z

2020 PRINT"This subprogramme calculates the comparison adjustment of the stratified"

2021 PRINT"morbidity (incidence, prevalence) rates, mortality rates, etc. using"

2022 PRINT"i n d i r e c t  standardization based on known standard stratum-specific"

2023 PRINT"rates of the reference population."

2031 PRINT:GOTO 2050

2040 PRINT IDM$:GOTO 2590

2050 PRINT"INPUT DATA:"

2051 INPUT"    place, time               ";PL$,TI$

2052 INPUT"    species                   ";SP$

2053 INPUT"    category(ies)             ";CA$

2054 INPUT"    disease(s)/form           ";DI$

2055 INPUT"    indicator/rate            ";RA$

2056 INPUT"    observed cases            ";OC

2057 IF OC=0 THEN GOTO 2040 ELSE 2058

2058 INPUT"    number of stratum-specific groups - subcategories (2 up to 11 !) ";N

2059 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 2590

2200 CLS:PRINT:PRINT TAB(5)"List data - subcategory names (up to 15 characters !), number in study,"

2201 PRINT TAB(5)"standard rate in reference group (number between >0 and 1 !):":PRINT

2202 FOR I=1 TO N:PRINT I;"";

2203 INPUT"subcategory, number in study, standard rate ";CN$(I),R(I),P(I)

2204 IF CN$(I)="" OR R(I)=0 OR P(I)=0 THEN GOTO 2040 ELSE 2205

2205 IF P(I)>1 THEN PRINT:PRINT"Rate cannot be major than 1 !":GOTO 2590 ELSE 2206

2206 NEXT I:PRINT

2207 INPUT"   enter total reference population standard rate, if available: ",TPS

2210 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2211 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

2212 IF I$="m" THEN GOTO 10

2213 IF I$="c" THEN GOTO 2000

2214 IF I$=CHR$(13) THEN GOTO 2215

2215 CLS:PRINT TAB(7)"T A B L E   OF   I N D I R E C T   S T A N D A R D I Z A T I O N":PRINT

2216 'PRINT TAB(6)"Disease(s): "DI$:REM:TAB(40)"Type of rates: "RA$

2217 'PRINT"Place: "PL$;TAB(50)"Time :"TI$

2218 'PRINT"Species: "SP$;TAB(40)"Category: "CA$:PRINT

2222 PRINT TAB(5)"Subcategory";TAB(25)"Number";TAB(40)"Standard";TAB(58)"Expected "

2223 PRINT TAB(5)"(Stratum)";TAB(25)"in Study";TAB(40)RA$;TAB(58)"Cases"

2224 PRINT TAB(5)CA$;TAB(42)"rate":PRINT

2226 FOR I=1 TO N

2227 PRINT TAB(5)USING"\             \";CN$(I);

2228 PRINT TAB(25)R(I);TAB(40)USING"#.####";P(I);

2229 PRINT TAB(58)INT((R(I)*P(I))+.5):NEXT I

2230 R=0:ST=0

2231 FOR I=1 TO N

2232 R=R+R(I)

2233 ST=ST+(R(I)*P(I))

2234 NEXT I

2239 PRINT:PRINT TAB(5)"T o t a l";TAB(25)R;

2240 IF TPS>0 THEN PRINT TAB(40)USING"#.####";TPS;

2241 PRINT TAB(58)INT(ST+.5):PRINT

2242 IF N>5 THEN GOTO 2243 ELSE 2245

2243 A$=INKEY$:IF A$=""THEN GOTO 2243

2244 CLS:PRINT:PRINT:PRINT

2245 IF TPS>0 THEN GOTO 2251 ELSE 2255

2251 PRINT TAB(20)"Indexed rate          = "USING"##.####";ST/R

2252 IF TPS>0 THEN GOTO 2253 ELSE 2257

2253 PRINT TAB(20)"Standardizing factor  = "USING"##.####";TPS/(ST/R)

2255 IF OC>0 AND TPS>0 THEN GOTO 2256 ELSE 2257

2256 PRINT TAB(20)"Standardized rate     = "USING"##.####";(TPS/(ST/R))*(OC/R):PRINT

2257 IF OC>0 THEN GOTO 2258 ELSE 2590

2258 PRINT TAB(5)"Adjusted relative risk (standardized "RA$;" ratio) = "

2259 PRINT TAB(14)"=  observed cases/expected cases = "OC;"/";INT(ST+.5);" = ";

2260 PRINT USING"######.#### %";(OC/ST)*100:PRINT

2590 A$=INKEY$:IF A$="" THEN GOTO 2590

2600 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

2601 IF R$="y" OR R$="n" THEN GOTO 2610 ELSE 2990

2610 IF R$="y" THEN GOTO 2000 ELSE 2990

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.3-TWO POPULATIONS RATES' COMPARISON ADJUSTMENT BASED ON STANDARD PROPORTIONS"

3011 PRINT"==============================================================================="

3013 PRINT"(direct standardization based on two populations' category structure)"

3014 PRINT TAB(43)"(Ref.: Jenicek et al., Martin et al.)"

3015 PRINT"This subprogramme calculates the comparison adjustment of morbidity or"

3016 PRINT"mortality rates (investigation results) in two populations (herds, flocks,"

3017 PRINT"groups, etc.) with the same categories (according to sex, age, breed, etc.)"

3018 PRINT"but in different proportions influencing the comparison result."

3020 PRINT"The adjusted rate gives the expected rate if the observed stratum-specific"

3021 PRINT"rates are applied in a standard population."

3030 PRINT:PRINT"INPUT DATA:":PRINT

3041 INPUT"     place, time ";PL$,TI$

3042 INPUT"     species, disease(s) ";SP$,DI$

3044 INPUT"     indicator/rate      ";IN$

3045 INPUT"     category(ies)       ";CA$

3047 INPUT"     population A, population B ";P1,P2

3050 INPUT"     number of subcategories (2 up to 11 !) ";N

3051 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 3980

3058 CLS:PRINT

3059 PRINT"List data - subcategory names (up to 10 characters !), number in study,"

3060 PRINT"               observed cases:"

3061 PRINT"population A:"

3062 FOR I=1 TO N

3064 PRINT I;". ";

3065 INPUT"subcategory, number in study, cases ";SC$(I),A1(I),D1(I)

3066 IF SC$(I)="" OR A1(I)=0 OR D1(I)=0 THEN GOTO 3075 ELSE 3067

3067 NEXT I

3068 PRINT:PRINT"population B (do  n o t   r e p e a t  the name of the subcategory !):"

3070 FOR I=1 TO N

3071 PRINT I;". ";

3072 INPUT"subcategory:   number of in study, cases ";A2(I),D2(I)

3073 IF A2(I)=0 OR D2(I)=0 THEN GOTO 3075 ELSE 3074

3074 NEXT I:GOTO 3076

3075 PRINT IDE$:GOTO 3980

3076 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3077 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

3078 IF I$="m" THEN GOTO 10

3079 IF I$="c" THEN GOTO 3000

3080 IF I$=CHR$(13) THEN GOTO 3090

3090 'A$=INKEY$:IF A$=""THEN GOTO 3090

3095 CLS:PRINT:PRINT TAB(6)"S U M M A R Y   T A B L E   OF  B A S I C   I N P U T    D A T A ":PRINT

3096 'PRINT TAB(6)"Disease(s): "DI$:REM:TAB(40)"Type of rates: "RA$

3097 'PRINT"Place: "PL$;TAB(50)"Time :"TI$

3098 'PRINT"Species: "SP$;TAB(40)"Category: "CA$:PRINT

3101 PRINT TAB(15)"P o p u l a t i o n      A";TAB(47)"P o p u l a t i o n      B"

3102 PRINT TAB(15)"--------------------------";TAB(47)"--------------------------"

3103 PRINT" Subcategory";TAB(15)"Number  in   Study";TAB(36)"Rate";

3104 PRINT TAB(47)"Number   in   Study";TAB(68)"Rate"

3105 PRINT TAB(15)"-------------------";TAB(47)"-------------------"

3108 PRINT TAB(15)"Total";TAB(27)"Cases"TAB(47)"Total";TAB(59)"Cases"

3109 PRINT

3110 FOR I=1 TO N

3111 PRINT USING" \        \";SC$(I);

3112 PRINT TAB(15)A1(I);TAB(26)D1(I);TAB(35)USING"#.####";D1(I)/A1(I);

3113 PRINT TAB(47)A2(I);TAB(58)D2(I);TAB(67)USING"#.####";D2(I)/A2(I)

3120 NEXT I

3125 TPI=0:TPII=0:TDI=0:TDII=0

3130 FOR I=1 TO N

3131 TPI=TPI+A1(I)

3132 TPII=TPII+A2(I)

3133 TDI=TDI+D1(I)

3134 TDII=TDII+D2(I)

3139 NEXT

3140 PRINT

3141 PRINT" T o t a l";TAB(15)TPI;TAB(26)TDI;TAB(35)USING"#.####";TDI/TPI;

3142 PRINT TAB(47)TPII;TAB(58)TDII;TAB(67)USING"#.####";TDII/TPII;

3145 PRINT:PRINT:PRINT

3146 PRINT"   "IN$;" rate in subcategory 1 of both populations  = ";USING"#.####";((D1(1)+D2(1))/(A1(1)+A2(1))):PRINT

3147 PRINT"   "IN$;" rate in subcategory 2 of both populations  = ";USING"#.####";((D1(2)+D2(2))/(A1(2)+A2(2)))

3190 A$=INKEY$:IF A$=""THEN GOTO 3190

3195 CLS:PRINT:PRINT TAB(3)"D I R E C T L Y   A D J U S T E D  ( S T A N D A R D I Z E D )  R A T E S":PRINT

3196 'PRINT TAB(6)"Disease(s): "DI$:REM:TAB(40)"Type of rates: "RA$

3197 'PRINT"Place: "PL$;TAB(50)"Time :"TI$

3198 'PRINT"Species: "SP$;TAB(40)"Category: "CA$:PRINT

3201 PRINT" Subcategory";TAB(15)"Total Number";TAB(35)"Population        A";TAB(58)"Population        B"

3202 PRINT TAB(15)"of both";TAB(35)"-------------------";TAB(58)"-------------------"

3203 PRINT TAB(15)"Populations";TAB(35)"Rate";TAB(45)"Number of";TAB(58)"Rate";TAB(68)"Number of"

3204 PRINT TAB(45)"Cases";TAB(68)"Cases"

3205 PRINT

3210 FOR I=1 TO N

3211 PRINT USING" \        \";SC$(I);

3212 PRINT TAB(15)A1(I)+A2(I);TAB(35)USING"#.####";D1(I)/A1(I);

3213 PRINT TAB(45)INT((A1(I)+A2(I))*(D1(I)/A1(I))+.5);

3214 PRINT TAB(58)USING"#.####";D2(I)/A2(I);

3215 PRINT TAB(68)INT((A1(I)+A2(I))*(D2(I)/A2(I))+.5)

3220 NEXT I

3225 TP=0:TD1=0:TD2=0

3230 FOR I=1 TO N

3231 TP=TP+(A1(I)+A2(I))

3232 TD1=TD1+(A1(I)+A2(I))*(D1(I)/A1(I))

3233 TD2=TD2+(A1(I)+A2(I))*(D2(I)/A2(I))

3235 NEXT

3240 PRINT

3241 PRINT" T o t a l";TAB(15)TP;TAB(35)USING"#.####";TD1/TP;

3242 PRINT TAB(45)INT(TD1+.5);TAB(58)USING"#.####";TD2/TP;

3243 PRINT TAB(68)INT(TD2+.5):PRINT

3244 PRINT"  D i r e c t l y   a d j u s t e d   rate of the first population    = ";USING"#.####";TD1/TP

3245 PRINT"  D i r e c t l y   a d j u s t e d   rate of the second population   = ";USING"#.####";TD2/TP

3246 IF (TD1/TP)>(TD2/TP) THEN GOTO 3251 ELSE 3260

3251 PRINT:PRINT TAB(5)"Comparative index    =  ";

3252 PRINT USING"#.####";TD1/TP;

3253 PRINT" / ";USING"#.####";TD2/TP;

3254 PRINT"  = ";USING" #####.####";((TD1/TP)/(TD2/TP))

3255 PRINT:PRINT TAB(5)"The adjusted "IN$;" rate of the population A is superior"

3257 PRINT"                         over the population B adjusted rate by ";USING"###.####  %";((TD1/TP)/(TD2/TP))*100-100:GOTO 3980

3260 PRINT:PRINT TAB(5)"Comparative index    =  ";

3262 PRINT USING"#.####";TD2/TP;

3263 PRINT" / ";USING"#.####";TD1/TP;

3264 PRINT"  = ";USING" #####.####";((TD2/TP)/(TD1/TP))

3269 PRINT:PRINT TAB(5)"The adjusted "IN$;" rate of the population B is superior"

3270 PRINT"                         over the population A adjusted rate by ";USING"###.####  %";((TD2/TP)/(TD1/TP))*100-100

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) o no(n) ";R$

3982 IF R$="y" OR R$="n" THEN GOTO 3983 ELSE 3990

3983 IF R$="y" THEN GOTO 3000 ELSE 3990

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.4-TWO POPULATIONS RATES' COMPARISON ADJUSTMENT BASED ON CATEGORY STANDARDS"

4011 PRINT"============================================================================="

4013 PRINT"(indirect standardization based on standard category specific rates)"

4014 PRINT TAB(59)"(Ref.: Martin et al.)"

4015 PRINT"This subprogramme calculates the comparison adjustment of stratum-specific"

4016 PRINT"rates (investigation results)  in two populations (herds, flocks, groups,"

4017 PRINT"etc.) with the same categories (according to sex, age, breed, etc.) but"

4018 PRINT"in different proportions influencing the comparison result.":GOTO 4030

4020 PRINT IDM$:GOTO 4390

4030 PRINT:PRINT"INPUT DATA:"

4031 PRINT"(all rates in form of proportion, i.e. number between >0 and 1 !)":PRINT

4032 INPUT"     place, time ";PL$,TI$

4033 INPUT"     species, disease(s) ";SP$,DI$

4034 INPUT"     indicator/rate      ";IN$

4035 INPUT"     average rate for standard population ";AR

4036 IF AR=0 THEN GOTO 4020 ELSE 4037

4037 IF AR>1 THEN PRINT"Error ! The rate cannot be major than 1 !":GOTO 4035 ELSE 4046

4046 INPUT"     category(ies)       ";CA$

4047 INPUT"     population A, population B ";A$,B$

4048 INPUT"     number of observed cases in population A, in population B ";CA,CB

4049 IF CA=0 OR CB=0 THEN GOTO 4020 ELSE 4050

4050 INPUT"     number of subcategories (2 up to 11 !) ";N

4051 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 4390

4055 CLS:PRINT

4056 PRINT"List data - subcategory names (up to 10 characters !),

4057 PRINT"                      size of population A, population B,"

4060 PRINT"                                  standard population rates :":PRINT

4062 FOR I=1 TO N

4064 PRINT I;" ";

4065 INPUT"subcategory, pop. A, pop. B, standard rate ";SC$(I),A(I),B(I),S(I)

4066 IF SC$(I)="" OR A(I)=0 OR B(I)=0 OR S(I)=0 THEN GOTO 4020 ELSE 4067

4067 NEXT I:PRINT

4070 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4071 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

4072 IF I$="m" THEN GOTO 10

4073 IF I$="c" THEN GOTO 4000

4074 IF I$=CHR$(13) THEN GOTO 4090

4090 'A$=INKEY$:IF A$=""THEN GOTO 4090

4095 CLS:PRINT:PRINT TAB(13)"SUMMARY  TABLE  OF   B A S I C    I N P U T    D A T A ":PRINT

4096 'PRINT TAB(6)"Disease(s): "DI$:REM:TAB(40)"Type of rates: "RA$

4097 'PRINT"Place: "PL$;TAB(50)"Time :"TI$

4098 'PRINT"Species: "SP$;TAB(40)"Category: "CA$:PRINT

4101 PRINT TAB(15)"P o p u l a t i o n  A";TAB(43)"P o p u l a t i o n  B"

4102 PRINT TAB(15)"----------------------";TAB(43)"----------------------"

4103 PRINT" Subcategory";TAB(15)"Number in";TAB(27)"Proportion";

4104 PRINT TAB(43)"Number in";TAB(55)"Proportion";TAB(68)"Standard"

4105 PRINT" ";CA$;TAB(15)"Study";TAB(43)"Study";

4106 PRINT TAB(68)"Population"

4107 PRINT TAB(68)"Rates":PRINT

4108 SA=0:SB=0

4109 FOR I=1 TO N

4110 SA=SA+A(I)

4111 SB=SB+B(I)

4112 NEXT I

4113 FOR I=1 TO N

4114 PRINT USING" \        \";SC$(I);

4115 PRINT TAB(15)A(I);TAB(29)USING"#.####";A(I)/SA;

4116 PRINT TAB(43)B(I);

4117 PRINT TAB(55)USING"#.####";B(I)/SB;TAB(68)S(I)

4120 NEXT I

4140 PRINT

4141 PRINT" T o t a l";TAB(15)SA;TAB(29)"1.0000";TAB(43)SB;TAB(55)"1.0000"

4145 PRINT

4150 PRINT" C a s e s";TAB(15)CA;TAB(43)CB

4155 PRINT" Crude rate";TAB(16)USING"#.####";CA/SA;

4156 PRINT TAB(44)USING"#.####";CB/SB;TAB(68)AR

4160 A1=(A(1)/SA)*S(1)

4161 A2=(A(2)/SA)*S(2)

4163 A3=(A(3)/SA)*S(3)

4164 A4=(A(4)/SA)*S(4)

4165 A5=(A(5)/SA)*S(5)

4166 SUA=A1+A2+A3+A4+A5:PRINT

4167 A$=INKEY$:IF A$=""THEN GOTO 4167

4168 CLS:PRINT:PRINT"The rate expected if the standard rates applied in population A = ";USING"#.####";SUA

4169 PRINT"This leads to standardized cases ratio = ";USING"####.#### %";((CA/SA)/SUA)*100

4171 B1=(B(1)/SB)*S(1)

4172 B2=(B(2)/SB)*S(2)

4173 B3=(B(3)/SB)*S(3)

4174 B4=(B(4)/SB)*S(4)

4175 B5=(B(5)/SB)*S(5)

4176 SU2=B1+B2+B3+B4+B5:PRINT

4179 PRINT"The rate expected if the standard rates applied in population B = ";USING"#.####";SU2

4180 PRINT"This leads to standardized cases ratio = ";USING"####.#### %";((CB/SB)/SU2)*100

4181 PRINT

4190 PRINT TAB(5)"Indirect adjusted rate for the total population A = ";USING"#.####";((CA/SA)/SUA)*AR

4191 PRINT

4192 PRINT TAB(5)"Indirect adjusted rate for the total population B = ";USING"#.####";((CB/SB)/SU2)*AR

4193 PRINT

4251 PRINT:PRINT TAB(5)"Comparative index A/B   =  ";

4252 PRINT USING"#.####";((CA/SA)/SUA)*AR;

4253 PRINT" / ";USING"#.####";((CB/SB)/SU2)*AR;

4254 PRINT"  = ";USING" #####.####";(((CA/SA)/SUA)*AR)/(((CB/SB)/SU2)*AR)*100

4255 PRINT:PRINT TAB(5)"Comparative index B/A   =  ";

4256 PRINT USING"#.####";((CB/SB)/SU2)*AR;

4257 PRINT" / ";USING"#.####";((CA/SA)/SUA)*AR;

4258 PRINT"  = ";USING" #####.####";(((CB/SB)/SU2)*AR)/(((CA/SA)/SUA)*AR)*100

4260 IF (CA/SA)/SUA>(CB/SB)/SU2 THEN GOTO 4261 ELSE 4270

4261 PRINT:PRINT TAB(5)"The adjusted "IN$;" rate of the population A is superior"

4262 PRINT"                        over the population B adjusted rate by ";USING"###.####  %";((CA/SA)/SUA)/((CB/SB)/SU2)*100-100:GOTO 4390

4270 PRINT:PRINT TAB(5)"The adjusted "IN$;" rate of the population B is superior"

4271 PRINT"                        over the population A adjusted rate by ";USING"###.####  %";((CB/SB)/SU2)/((CA/SA)/SUA)*100-100

4390 A$=INKEY$:IF A$="" THEN GOTO 4390

4980 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

4982 IF R$="y" OR R$="n" THEN GOTO 4983 ELSE 4990

4983 IF R$="y" THEN GOTO 4000 ELSE 4990

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.5-SELECTION OF METHODS FOR SPECIFIC DISEASE CONTROL PROGRAMME"

5010 PRINT"================================================================"

5020 PRINT"Assessment of eligibility according to method impact ability - effectivity,"

5021 PRINT"inputs availability in a given place/territory and period after analysing"

5022 PRINT"all substantial factors influencing  strategy/measures practicability and"

5023 PRINT"probability of success of time-bounded programmes, using grading scales."

5030 PRINT

5032 PRINT"Programme  o b j e c t i v e s : disease eradication, elimination, reduction"

5034 PRINT"   or containment; losses reduction; disease free population increase, etc.":PRINT

5036 PRINT"L e g i s l a t i o n : law, regulations, instructions, standards, etc."

5038 PRINT"D i a g n o s i s : ability of etiological diagnosis, laboratory capacities,"

5040 PRINT"   ability to detect all outbreaks, to confirm disease free status, etc."

5042 PRINT"A n a l y s i s : obligatory reporting, data processing, active screening, "

5044 PRINT"   monitoring, surveillance, disease situation analyses in place and time, etc."

5046 PRINT"M e a s u r e s : application of preventive and health restoration measures "

5048 PRINT"   at field and management levels, logistic, extention, support, etc.":PRINT

5054 PRINT"I n p u t   a v a i l a b i l i t y: manpower, funds, equipment, transport,"

5056 PRINT"   premises, services, training, etc."

5057 PRINT"P r o b a b i l i t y : probability to achieve the objectives through"

5058 PRINT"   the given method considering given conditions and the weakest components.":

5060 A$=INKEY$:IF A$="" THEN GOTO 5060

5100 CLS:PRINT"INPUT DATA:"

5105 INPUT"disease ";D$

5110 INPUT"programme objectives ";DI$

5121 INPUT"place, period ";LU$,TI$

5133 INPUT"Number (2 up to 11 !) of methods (incl. combinations) in consideration ";N

5134 IF N=0 OR N=1 THEN PRINT IDE$:GOTO 5980 ELSE 5136

5136 IF N>11 THEN GOTO 5137 ELSE 5138

5137 PRINT"More than 11 methods !":GOTO 5980

5138 IF N>3 THEN PRINT:CLS

5139 PRINT"Scales consist of  g r a d e s  (0 to 10 !). All questions must be answered !":PRINT

5149 FOR I=1 TO N

5150 PRINT" method No.";I;":";

5155 INPUT" method name (up to 15 characters): "N$(I)

5156 IF N$(I)="" THEN PRINT IDE$:GOTO 5980 ELSE 5160

5160 PRINT TAB(8)"grades of availability (considering programme objectives):"

5162 INPUT"            legislation, diagnosis, analysis, measures            ";B(I),G(I),Z(I),S(I)

5170 INPUT"       grades of inputs availability, success probability         ";F(I),D(I)

5172 IF B(I)>10 OR G(I)>10 OR Z(I)>10 OR S(I)>10 OR F(I)>10 OR D(I)>10 THEN GOTO 5173 ELSE 5180

5173 PRINT:PRINT"Error ! Grade values must be between 0 and 10 !":GOTO 5980

5180 NEXT I

5200 CLS:PRINT"Importance multiplier coefficients are prefixed:"

5210 PRINT TAB(15)"legislation                            = 5"

5211 PRINT TAB(15)"diagnosis                              = 7"

5212 PRINT TAB(15)"analysis                               = 5"

5213 PRINT TAB(15)"measures                               = 9":PRINT

5220 INPUT"Do you accept these values (y) or you will use other ones (o)";R$

5222 'IF R$="y" OR R$="o" THEN GOTO 5230 ELSE PRINT IDE$:GOTO 5980

5230 IF R$="y" THEN GOTO 5250

5231 IF R$="o" THEN GOTO 5300

5232 'GOTO 5220:REM:????

5250 LET IGB=5:LET IGE=7:LET IGZ=5:LET IGS=9:GOTO 5400

5300 PRINT:PRINT"Define values (1 up to 10 !) of importance multiplier coefficients"

5301 PRINT"fitting better to the given programme objectives, specific disease"

5302 PRINT"characteristics, situation and trend as well as  to the conditions"

5303 PRINT"influencing the disease and programme implementation:"

5310 PRINT:INPUT"                    legislation      ";IGB

5311 INPUT"                    diagnosis        ";IGE

5312 INPUT"                    analysis         ";IGZ

5313 INPUT"                    measures         ";IGS

5314 IF (IGB+IGE+IGZ+IGS)=0 THEN PRINT IDM$:GOTO 5980

5400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5402 IF I$="m" THEN GOTO 10

5403 IF I$="c" THEN GOTO 5000

5404 IF I$=CHR$(13) THEN GOTO 5405

5405 CLS:PRINT"  SELECTION OF PRIORITY METHODS FOR SPECIFIC DISEASE CONTROL PROGRAMME":PRINT

5406 PRINT"Disease: "D$

5407 PRINT"Programme: "DI$

5410 PRINT"Place: "LU$;TAB(50)"Period: "TI$:PRINT

5420 PRINT TAB(2)"Method(s)";TAB(20)"Grades   of   Availability";TAB(50)"Grades    of";

5422 PRINT TAB(20)"----------------------------";TAB(50)"------------"

5423 PRINT TAB(20)"legis-";TAB(27)"diag-";TAB(34)"analy-";TAB(41)"mea-";

5424 PRINT TAB(50)"input";TAB(57)"proba-";TAB(65)"T O T A L"

5425 PRINT TAB(20)"lation";TAB(27)"nosis";TAB(34)" sis";TAB(41)"sures";TAB(50)"avai-";TAB(57)"bility";TAB(65)"points"

5426 PRINT TAB(9)"---------------------------------------";TAB(50)"labi-";TAB(57)"of"

5427 PRINT TAB(9)"Multiplier";TAB(20)"*"IGB;TAB(27)"*"IGE;TAB(34)"*"IGZ;TAB(41)"*"IGS;

5428 PRINT TAB(50)"lity";TAB(57)"success"

5429 PRINT TAB(2)"------------------------------------------------------------------------"

5430 FOR I=1 TO N

5431 SU(I)=B(I)*IGB+G(I)*IGE+Z(I)*IGZ+S(I)*IGS

5440 RES(I)=SU(I)*F(I)*D(I)

5450 REM:PRINT TAB(3)I;TAB(10)N$(I);TAB(45)SU(I);TAB(60)RES(I)

5451 PRINT TAB(2)USING"\             \";N$(I);

5452 PRINT TAB(20)"+"INT(B(I));TAB(27)"+"INT(G(I));TAB(34)"+"INT(Z(I));TAB(41)"+"INT(S(I));

5453 PRINT TAB(50)"*"INT(F(I));TAB(57)"*"INT(D(I));TAB(65)INT(RES(I))

5460 NEXT I

5471 T=0

5472 FOR I=1 TO N

5473 T=T+RES(I)

5474 NEXT I

5480 A$=INKEY$:IF A$="" THEN GOTO 5480

5481 CLS:PRINT TAB(5)"SELECTION OF PRIORITY METHODS FOR SPECIFIC DISEASE CONTROL PROGRAMME"

     PRINT:PRINT TAB(10)"Method(s)";TAB(30)"Proportion";TAB(50)"Percentage"

5482 PRINT:PRINT TAB(28)"of the total";INT(T);" allocated points"

5483 PRINT:PRINT

5484 FOR I=1 TO N

5485 PRINT TAB(10)USING"\             \";N$(I);

5486 PRINT TAB(31)USING"#.####";RES(I)/T;

5487 PRINT TAB(50)USING"###.####";RES(I)/T*100

5488 NEXT I

5489 PRINT:PRINT TAB(10)"T o t a l";TAB(31)"1.0000";TAB(50)"100.0000":PRINT

5500 A$=INKEY$:IF A$="" THEN GOTO 5500

5501 CLS:PRINT TAB(5)"SELECTION OF PRIORITY METHODS FOR SPECIFIC DISEASE CONTROL PROGRAMME"

5502 PRINT

5505 PRINT TAB(13)"(";CHR$(223);" represents 2 % of total"INT(T);"allocated points)"

5506 PRINT:PRINT

5507 PRINT TAB(5)"M e t h o d (s)";TAB(25)"0         20        40        60        80       100 %"

5508 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

5510 FOR I=1 TO N

5512 Z=(RES(I)/T)*50

5513 IF Z<1 THEN GOTO 5514 ELSE 5520

5514 IF Z>0 THEN GOTO 5515 ELSE 5520

5515 PRINT TAB(5)USING"\             \";N$(I);

5516 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 5525

5520 PRINT TAB(5)USING"\             \";N$(I);

5521 PRINT TAB(25)CHR$(179);

5522 FOR K=1 TO Z

5523 PRINT CHR$(223);

5524 NEXT K

5525 NEXT I

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) o no(n) ";R$

5983 IF R$="y" OR R$="n" THEN GOTO 5984 ELSE 5990

5984 IF R$="y" THEN GOTO 5000 ELSE 5990

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.6-SURVEY RESPONSE RATE"

6010 PRINT"========================="

6020 PRINT TAB(60)"(Ref.: Toma et al.)":PRINT

6050 PRINT"INPUT DATA:":PRINT

6100 INPUT"  purpose of survey      ";PS$

6105 INPUT"  place, time            ";PL$,TI$:PRINT

6110 PRINT"survey conducted by: face-to-face inquiry (f), postal service (m),"

6112 INPUT"   questionnaire (q), phone (p), postal service (m) or electronic mail (e) ";TS$

6113 PRINT

6200 PRINT"  number of individuals (units) who would have been surveyed if all"

6220 INPUT"                                  had participated (survey sample) ";NI

6240 INPUT"  number of individuals (units) who was reached for the survey     ";IR

6250 PRINT"  number of completed or returned survey instrument (questionnaire,"

6260 INPUT"                                                interview, etc.)   ";CS

6265 IF IR>NI OR CS>IR THEN PRINT IDE$:GOTO 6980

6270 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6272 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6274 IF I$="m" THEN GOTO 10

6276 IF I$="c" THEN GOTO 6000

6280 IF I$=CHR$(13) THEN GOTO 6300

6300 CLS:PRINT:PRINT"RESULT:":PRINT

6305 IF TS$="f" THEN TS$="face-to-face inquiry"

6306 IF TS$="q" THEN TS$="self-completed questionnaire"

6307 IF TS$="p" THEN TS$="phone"

6308 IF TS$="m" THEN TS$="postal service"

6309 IF TS$="e" THEN TS$="electronic mail"

6310 PRINT"Purpose of survey: "PS$:PRINT

6315 PRINT"Place: "PL$;TAB(65)"Time: "TI$:PRINT

6320 PRINT TAB(10)"Survey conducted by: "TS$:PRINT:PRINT

6325 IF IR>0 AND NI>0 THEN PRINT TAB(20)"Survey sample rate              =  ";USING"#.####";IR/NI:PRINT

6330 IF CS>0 AND NI>0 THEN PRINT TAB(20)"Response rate of survey sample  =  ";USING"#.####";CS/NI:PRINT

6332 IF IR>0 AND CS>0 THEN PRINT TAB(20)"Response rate of surveyed       =  ";USING"#.####";CS/IR

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

6983 IF R$="y" OR R$="n" THEN GOTO 6984 ELSE 6990

6984 IF R$="y" THEN GOTO 6000 ELSE 6990

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.7-DILUTION OF SOLUTION FOR DISINFECTION, DISINFESTATION, ETC."

7004 PRINT"================================================================"

7010 REM:Ref.: Manual of Veterinary Investigation Laboratory Techniques

7011 REM:      Ministry of Agriculture, Fisheries and Food, U.K., 1978, p.34

7014 PRINT"Subprogramme calculates required volume of certain concentration"

7015 PRINT"of the solutions for disinfection, disinfestation, treatment, etc."

7020 PRINT"INPUT DATA:"

7021 INPUT"solution               ";SO$

7022 INPUT"purpose                ";PU$

7023 INPUT"place, time            ";PL$,TI$

7025 INPUT"required concentration in %                 ";R

7026 INPUT"volumen measure units                       ";MU$

7030 INPUT"total volume of solution required           ";V

7035 PRINT"original concentration in %"

7036 INPUT"       (major than required concentration)  ";O

7040 IF SO$="" OR MU$="" OR R=0 OR V=0 OR O=0 THEN PRINT IDM$:GOTO 7980

7100 PRINT:PRINT"RESULT:":PRINT

7102 'PRINT"Solution: "SO$

7103 'PRINT"Purpose: "PU$

7104 'PRINT"Place: "PL$;TAB(40)"Time: "TI$:PRINT

7120 'PRINT"Volumen of original solution to be diluted with diluent"

7122 'PRINT"to the final volume required = "R*V MU$

7125 'PRINT

7130 PRINT USING"######.##";R*V/O;

7131 PRINT" ";MU$" of ";

7132 PRINT USING"####.##";O ;

7133 PRINT" % original solution"

7134 PRINT"       must be deluted with ";USING"######.##";V-(R*V/O);

7135 PRINT" ";MU$" of diluent"

7136 PRINT"             to obtain required ";USING"######.##";V;

7137 PRINT" ";MU$"  of ";USING"####.##";R;

7138 PRINT"  % solution":PRINT:PRINT

7150 PRINT"(See also subprogramme 10.8)"

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7982 IF R$="y" OR R$="n" THEN GOTO 7983 ELSE 7990

7983 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

7995 CLS:PRINT TAB(5)"E R R O R !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.8-SUMMARY VALUE OF ANIMAL PRODUCTS PER ONE VETERINARIAN"

8012 PRINT"=========================================================="

8020 PRINT"This subprogramme calculates average summary value of products (produced,"

8021 PRINT"traded or consumed) of animal origin per one veterinarian."

8030 'PRINT

8040 INPUT"place, time ";PL$,TI$

8045 INPUT"produced (p) or traded (t) or consumed (c)";R$

8050 INPUT"measure units ";MU$:'PRINT

8051 T=0

8052 INPUT"How many types of animal products (up to 10) ";N

8053 IF N=0 OR N>10 THEN PRINT IDE$:GOTO 8980 ELSE 8055

8055 PRINT"List:  products, value in measure units:":'PRINT

8057 FOR I=1 TO N

8058 PRINT TAB(5)I;" ";

8060 INPUT"product, value "; AP$(I),X(I)

8062 T=T+X(I)

8065 NEXT I

8066 IF N<6 THEN PRINT

8100 INPUT"total number of veterinarians:      ";TV

8102 INPUT"number of government veterinarians  ";QV

8105 INPUT"number of private veterinarians     ";PV

8108 INPUT"number of accredited veterinarians  ";AV

8109 IF (TV+QV+PV+AV)=0 THEN PRINT IDM$:GOTO 8980

8200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8202 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

8204 IF I$="m" THEN GOTO 10

8206 IF I$="c" THEN GOTO 8000

8208 IF I$=CHR$(13) THEN GOTO 8300

8250 'A$=INKEY$:IF A$=""THEN GOTO 8250

8300 CLS:PRINT"RESULTS:":'PRINT

8305 PRINT"Place: "PL$;TAB(60)"Time :"TI$:'PRINT

8306 IF R$="p" then PRINT" Produced";

8307 IF R$="t" THEN PRINT" Traded";

8308 IF R$="c" THEN PRINT" Consumed";

8310 PRINT" product(s) : ";TAB(50)"Quantity: "

8315 FOR I=1 TO N

8320 PRINT TAB(5)I;TAB(10)AP$(I); TAB(57)X(I) MU$

8325 NEXT I

8330 PRINT TAB(50)"Total: ";T MU$:PRINT

8340 'PRINT"Veterinarians:"

8343 'PRINT"Total: "TV;TAB(20)"Government: "QV;TAB(40)"Private: "PV;

8345 'PRINT TAB(60)"Accredited: "AV

8349 'PRINT

8350 IF TV=>1 THEN GOTO 8351 ELSE 8370

8351 PRINT"Average value per one veterinarian               =";

8360 PRINT USING"########.####";T/TV;

8361 PRINT " ";MU$:PRINT

8370 IF QV=>1 THEN GOTO 8400 ELSE 8500

8400 PRINT"Average value per one government veterinarian    =";

8410 PRINT USING"########.####";T/QV;

8420 PRINT " ";MU$:PRINT

8500 IF PV=>1 THEN GOTO 8602 ELSE 8630

8602 PRINT"Average value per one private veterinarian       =";

8610 PRINT USING"########.####";T/PV;

8620 PRINT " ";MU$:PRINT

8630 IF AV=>1 THEN GOTO 8632 ELSE 8980

8632 PRINT"Average value per one accredited veterinarian    =";

8634 PRINT USING"########.####";T/AV;

8660 PRINT " ";MU$:

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

8982 IF R$="y" OR R$="n" THEN GOTO 8983 ELSE 8990

8983 IF R$="y" THEN GOTO 8000 ELSE 8990

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.9-VALUES OF INDIVIDUAL ANIMAL PRODUCTS PER ONE VETERINARIAN"

9012 PRINT"=============================================================="

9020 PRINT"This subprogramme calculates average individual values of products (produced,"

9021 PRINT"traded, exported, imported or consumed) of animal origin per one veterinarian."

9040 INPUT"place, time ";PL$,TI$

9045 INPUT"produced (p) or traded (t) or exported (e) or imported (i) or consumed (c) ";R$

9048 IF R$="" THEN PRINT IDE$:GOTO 9980

9050 INPUT"measure units ";MU$

9051 T=0

9052 INPUT"How many types of animal products (up to 10) ";N

9053 IF N=0 OR N>10 THEN PRINT IDE$:GOTO 9980 ELSE 9055

9055 PRINT"List:  product, value in measure units:"

9057 FOR I=1 TO N

9058 PRINT TAB(5)I;" ";

9060 INPUT"product, value "; AP$(I),X(I)

9062 T=T+X(I)

9065 NEXT I

9066 IF N<6 THEN PRINT

9068 PRINT:PRINT"Veterinarians:"

9070 INPUT"total (v) or government (g) or private (r) or accredited (a) ";V$

9080 IF T=0 OR V$="" THEN PRINT IDM$:GOTO 9980

9100 INPUT"                                                      number ";TV

9200 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9202 PRINT TAB(18)"to go back to menu then key 'm'":PRINT:INPUT"                 else ENTER to continue ! ",I$

9204 IF I$="m" THEN GOTO 10

9206 IF I$="c" THEN GOTO 9000

9208 IF I$=CHR$(13) THEN GOTO 9300

9250 'A$=INKEY$:IF A$=""THEN GOTO 9250

9300 CLS:PRINT"RESULTS:":PRINT

9301 PRINT"Place: "PL$;TAB(60)"Time: "TI$:PRINT

9302 IF V$="v" THEN PRINT"Veterinarians (total)";

9303 IF V$="g" THEN PRINT"Government veterinarians";

9304 IF V$="r" THEN PRINT"Private veterinarians";

9305 IF V$="a" THEN PRINT"Accredited veterinarians";

9306 PRINT" number:  "TV:PRINT

9307 IF R$="p" THEN PRINT"  Produced";

9308 IF R$="t" THEN PRINT"  Traded";

9309 IF R$="e" THEN PRINT"  Exported";

9310 IF R$="i" THEN PRINT"  Imported";

9311 IF R$="c" THEN PRINT"  Consumed":PRINT

9312 PRINT" product(s): ";TAB(31)"Quantity: ";TAB(53)"Average value per"

9313 PRINT TAB(53)"one veterinarian:":PRINT

9315 FOR I=1 TO N

9320 PRINT TAB(2)I;TAB(6)AP$(I); TAB(30)X(I) MU$;

9321 PRINT TAB(50)USING"##########.####";((X(I)/TV));

9322 PRINT " " MU$

9325 NEXT I

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9982 IF R$="y" OR R$="n" THEN GOTO 9983 ELSE 9990

9983 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.10-ANIMAL COMMODITY EXPORT/IMPORT SIZE PER ONE VETERINARIAN"

10012 PRINT"=============================================================="

10020 PRINT"This subprogramme calculates average summary size of exported or imported"

10022 PRINT"animal commodities per one veterinarian."

10030 'PRINT

10040 INPUT"place, time ";PL$,TI$

10042 INPUT"measure units ";MU$

10043 INPUT"export (e) or import (i) ";EI$

10044 IF EI$<>"e" AND EI$<>"i" THEN PRINT IDE$:GOTO 10980

10047 IF EI$="e" THEN EI$="export"

10048 IF EI$="i" THEN EI$="import"

10051 T=0

10052 INPUT"How many types of animal commodities (up to 10) ";N

10053 IF N=0 OR N>10 THEN PRINT IDE$:GOTO 10980 ELSE 10055

10055 'PRINT:PRINT"List:  commodity, quantity in measure units:"

10057 FOR I=1 TO N

10058 PRINT TAB(5)I;" ";

10060 INPUT"commodity, quantity (in measure units)"; AP$(I),X(I)

10062 T=T+X(I)

10065 NEXT I:

10066 IF N<6 THEN PRINT

10100 INPUT"total number of veterinarians      ";TV

10102 INPUT"number of government veterinarians ";QV

10103 INPUT"number of private veterinarians    ";PV

10104 INPUT"number of accredited veterinarians ";AV

10105 IF (TV+QV+PV+AV)=0 THEN PRINT IDM$:GOTO 10980

10300 CLS:PRINT"RESULTS:"

10305 PRINT"Place: "PL$;TAB(60)"Time:"TI$

10306 PRINT"Trade type: "EI$

10310 PRINT"Commodity: ";TAB(49)"Quantity: "

10315 FOR I=1 TO N

10320 PRINT TAB(5)I;TAB(10)AP$(I);TAB(56)X(I) MU$

10325 NEXT I

10330 PRINT TAB(49)"Total: ";T MU$

10340 'PRINT"Veterinarians:"

10343 'PRINT"Total: "TV;TAB(20)"Government: "QV;TAB(40)"Accredited: "AV;

10345 'PRINT TAB(60)"Private: "PV:PRINT

10349 PRINT:'PRINT

10350 IF TV=>1 THEN GOTO 10351 ELSE 10370

10351 PRINT"Average value per one veterinarian              =  ";

10360 PRINT USING"########.######";T/TV;

10361 PRINT " ";MU$:PRINT

10370 IF QV=>1 THEN GOTO 10400 ELSE 10500

10400 PRINT"Average value per one government veterinarian   =  ";

10410 PRINT USING"########.######";T/QV;

10420 PRINT " ";MU$:PRINT

10500 IF PV=>1 THEN GOTO 10502 ELSE 10600

10502 PRINT"Average value per one private veterinarian      =  ";

10510 PRINT USING"########.######";T/PV;

10520 PRINT " ";MU$:PRINT

10600 IF AV=>1 THEN GOTO 10602 ELSE 10980

10602 PRINT"Average value per one accredited veterinarian   =  ";

10610 PRINT USING"########.######";T/AV;

10620 PRINT " ";MU$

10980 A$=INKEY$:IF A$="" THEN GOTO 10980

10981 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

10982 IF R$="y" OR R$="n" THEN GOTO 10983 ELSE 10990

10983 IF R$="y" THEN GOTO 10000 ELSE 10990

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.11-PER CAPITA PRODUCTION OF FOOD OF ANIMAL ORIGIN"

11010 PRINT"===================================================="

11050 PRINT"This subprogramme calculates average production of food (event. of other"

11051 PRINT"products) of animal origin per one person according to:"

11053 PRINT TAB(10)"1) product              2) place                  3) time"

11060 INPUT"    Enter choice number: ",CH

11065 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 11100 ELSE PRINT IDE$:GOTO 11980

11100 PRINT"INPUT DATA:"

11111 INPUT"     place, period ";PL$,PE$

11112 IF CH=1 THEN INPUT"     total number of persons ";IH

11113 IF CH=1 AND IH=0 THEN PRINT IDM$:GOTO 11980 ELSE 11114

11114 IF CH=2 OR CH=3 THEN INPUT"     product ";PR$

11115 IF CH=2 OR CH=3 THEN INPUT"     product measure units ";MU$

11119 INPUT"     How many data to be processed (1 up to 11 !) ";N

11120 IF N=0 OR N>11 THEN PRINT IDE$:GOTO 11980

11123 IF CH=1 THEN PRINT TAB(2)"List data - names (up to 15 characters !), units (up to 10 characters !),"

11124 IF CH<>1 THEN PRINT TAB(2)"List data - names (up to 15 characters !); quantity in measure units:":GOTO 11126

11125 PRINT TAB(17)"quantity in measure units (integers !):"

11126 FOR I=1 TO N

11127 PRINT I;":";

11128 IF CH=1 THEN INPUT" product, measure units, quantity ";P$(I),U$(I),Q#(I)

11132 IF CH=2 THEN INPUT" place, persons, product quantity ";IN$(I),S#(I),Q#(I)

11134 IF CH=3 THEN INPUT" subperiod, persons, product quantity ";IN$(I),S#(I),Q#(I)

11135 IF CH<>1 AND S#(I)=0 OR Q#(I)=0 THEN PRINT IDE$:GOTO 11980

11136 NEXT I

11137 T#=0:S#=0

11138 FOR I=1 TO N

11140 T#=T#+Q#(I)

11141 S#=S#+S#(I)

11142 NEXT I

11143 IF T#=0 THEN PRINT IDM$:GOTO 11980

11144 MAX=Q#(1)

11145 FOR I=2 TO N

11146 IF Q#(I)>MAX THEN MAX=Q#(I)

11147 NEXT I

11148 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

11149 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

11150 IF I$="m" THEN GOTO 10

11151 IF I$="c" THEN GOTO 11000

11152 IF I$=CHR$(13) THEN GOTO 11153

11153 CLS:PRINT"     PER  CAPITA  PRODUCTION  OF  FOOD  OF  ANIMAL  ORIGIN":PRINT

11154 PRINT"Place: "PL$;TAB(50)"Period: "PE$

11155 IF CH=2 OR CH=3 THEN PRINT"Product: "PR$;TAB(40)"Measure units: "MU$

11156 IF CH=1 THEN PRINT TAB(14)"Total number of persons: ";IH

11157 IF CH=1 THEN GOTO 11158 ELSE 11172

11158 PRINT

11159 PRINT TAB(6)"Product";TAB(25)"Measure";TAB(40)"Quantity";TAB(60)"Average"

11160 IF CH=1 THEN PRINT TAB(25)"Units";TAB(60)"per Capita":PRINT

11161 FOR I=1 TO N:PRINT TAB(6)USING"\              \";P$(I);

11162 PRINT TAB(25)U$(I);TAB(39)INT(Q#(I)+.5);TAB(60)USING"####.####";Q#(I)/IH:NEXT I:PRINT

11163 GOTO 11980

11172 PRINT

11173 IF CH=2 THEN D$="Place":IF CH=2 THEN Z$="Persons"

11174 IF CH=3 THEN D$="Superiod":IF CH=3 THEN Z$="Persons"

11175 PRINT TAB(2)D$;TAB(20)Z$;TAB(33)"Quantity";TAB(48)"Average";TAB(60)"Grand   T o t a l"

11176 PRINT TAB(33)"of Product";TAB(48)"per Capita";

11177 PRINT TAB(60)"Proportion";TAB(75)"%"

11178 PRINT

11188 FOR I=1 TO N

11189 PRINT TAB(2)USING"\              \";IN$(I);

11190 PRINT TAB(19)INT(S#(I));TAB(32)INT(Q#(I)+.5);TAB(48)USING"#####.####";Q#(I)/S#(I);

11191 PRINT TAB(61)USING"#.####";Q#(I)/T#;

11192 PRINT TAB(70)USING"###.####";Q#(I)/T#*100

11193 NEXT I:PRINT

11194 IF CH=2 OR CH=3 THEN GOTO 11195 ELSE 11980

11195 PRINT TAB(2)"T o t a l";TAB(19)INT(S#);TAB(32)INT(T#);TAB(48)USING"#####.####";T#/S#;

11196 PRINT TAB(61)"1.0000";TAB(70)"100.0000"

11200 A$=INKEY$:IF A$="" THEN GOTO 11200

11201 IF N=1 THEN GOTO 11982

11205 CLS:PRINT"     PER  CAPITA  PRODUCTION  OF  FOOD  OF  ANIMAL  ORIGIN":PRINT

11210 IF MAX>(T#/2) THEN GOTO 11212 ELSE 11240

11212 PRINT TAB(14)"(";CHR$(223);" represents 2 % of total "INT(T#+.5)  MU$;")":PRINT

11216 PRINT:PRINT TAB(3)D$;TAB(25)"0         20        40        60        80       100 %"

11218 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11219 FOR I=1 TO N

11220 Z=Q#(I)/T#*50

11221 IF Z<1 THEN GOTO 11222 ELSE 11225

11222 IF Z>0 THEN GOTO 11223 ELSE 11225

11223 PRINT TAB(2)USING"\              \";IN$(I);

11224 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 11233

11225 PRINT TAB(2)USING"\              \";IN$(I);

11226 PRINT TAB(25)CHR$(179);

11227 FOR K=1 TO Q#(I)/T#*50

11228 PRINT CHR$(223);

11230 NEXT K

11233 NEXT I:GOTO 11980

11240 PRINT TAB(14)"(";CHR$(223);" represents 1 % of total "INT(T#+.5)  MU$;")":PRINT

11246 PRINT:PRINT TAB(3)D$;TAB(25)"0         10        20        30        40        50 %"

11248 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

11249 FOR I=1 TO N

11250 Z=Q#(I)/T#*100

11251 IF Z<1 THEN GOTO 11252 ELSE 11255

11252 IF Z>0 THEN GOTO 11253 ELSE 11255

11253 PRINT TAB(2)USING"\              \";IN$(I);

11254 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 11263

11255 PRINT TAB(2)USING"\              \";IN$(I);

11256 PRINT TAB(25)CHR$(179);

11257 FOR K=1 TO Q#(I)/T#*100

11258 PRINT CHR$(223);

11260 NEXT K

11263 NEXT I

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11982 CLS:MAX=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11983 IF R$="y" OR R$="n" THEN GOTO 11984 ELSE 11990

11984 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.12-SELECTION OF PRIORITY DISEASES FOR CONTROL PROGRAMME"

12010 PRINT"=========================================================="

12020 PRINT"Rough priority selection of the most important diseases  for the control"

12021 PRINT"programmes considering all substantial factors influencing  strategy/measures"

12023 PRINT"practicability, inputs availability and probability of success."

12022 'PRINT" of time-bounded programmes in a given place/territory and period."

12030 PRINT

12033 PRINT"Explanatory notes:":PRINT

12032 PRINT"I m p o r t a n c e: economic, public health, social, ecological, etc.":PRINT

12038 PRINT"D i a g n o s i s : ability of etiological diagnosis, laboratory capacities,"

12040 PRINT"   ability to detect all outbreaks, to confirm disease free status, etc."

12042 PRINT"A n a l y s i s : obligatory reporting, data processing, active screening, "

12044 PRINT"   monitoring, surveillance, disease situation analyses in place and time, etc."

12046 PRINT"M e a s u r e s : application of preventive and health restoration measures "

12048 PRINT"   at field and management levels, logistic, extention, legislation support"

12049 PRINT"   (law, regulations, instructions, standards), public support, etc.":PRINT

12054 PRINT"I n p u t   a v a i l a b i l i t y: manpower, funds, equipment, transport,"

12056 PRINT"   premises, services, training, etc."

12057 PRINT"P r o b a b i l i t y : probability to achieve the objectives through"

12058 PRINT"   selected method(s) considering given conditions and the weakest components."

12060 A$=INKEY$:IF A$="" THEN GOTO 12060

12100 CLS:PRINT"INPUT DATA:"

12105 'INPUT"disease ";D$

12110 'INPUT"programme objectives ";DI$

12121 INPUT"place, period ";LU$,TI$

12133 INPUT"Number (2 up to 11 !) of diseases in consideration ";N

12134 IF N=0 OR N=1 THEN PRINT IDE$:GOTO 12980 ELSE 12136

12136 IF N>11 THEN GOTO 12137 ELSE 12138

12137 PRINT"More than 11 diseases ! New input !":GOTO 12133

12138 IF N>3 THEN PRINT:CLS

12139 PRINT"Scales consist of  g r a d e s  (0 to 10 !). All questions (considering"

12140 PRINT"                                   programmes objectives) must be answered !":PRINT

12149 FOR I=1 TO N

12150 PRINT" disease No.";I;":";

12155 INPUT" name (up to 15 characters !): "N$(I)

12156 IF N$(I)="" THEN PRINT IDE$:GOTO 12980 ELSE 12160

12160 PRINT TAB(8)"importance grade, grades of availability of necessary"

12162 INPUT"                                 diagnosis, analysis, measures    ";B(I),G(I),Z(I),S(I)

12170 INPUT"       grades of inputs availability, success probability         ";F(I),D(I)

12172 IF B(I)>10 OR G(I)>10 OR Z(I)>10 OR S(I)>10 OR F(I)>10 OR D(I)>10 THEN GOTO 12173 ELSE 12180

12173 PRINT:PRINT"Error ! Grade values must be between 0 and 10 !":GOTO 12980

12180 NEXT I

12200 CLS:PRINT"Importance multiplier coefficients are prefixed:"

12210 PRINT TAB(15)"importance                             = 5"

12211 PRINT TAB(15)"diagnosis                              = 8"

12212 PRINT TAB(15)"analysis                               = 5"

12213 PRINT TAB(15)"measures                               = 9":PRINT

12220 INPUT"Do you accept these values (y) or you will use other ones (o)";R$

12225 IF R$<>"y" AND R$<>"o" THEN GOTO 12250

12230 IF R$="y" THEN GOTO 12250

12231 IF R$="o" THEN GOTO 12300

12232 GOTO 12220

12250 LET IGB=5:LET IGE=7:LET IGZ=5:LET IGS=9:GOTO 12400

12300 PRINT:PRINT"Define values (1 up to 10 !) of importance multiplier coefficients"

12301 PRINT"fitting better to the given programme objectives, specific disease"

12302 PRINT"characteristics, situation and trend as well as  to the conditions"

12303 PRINT"influencing the disease and programme implementation:"

12310 PRINT:INPUT"                    importance       ";IGB

12311 INPUT"                    diagnosis        ";IGE

12312 INPUT"                    analysis         ";IGZ

12313 INPUT"                    measures         ";IGS

12314 IF (IGB+IGE+IGZ+IGS)=0 THEN PRINT IDM$:GOTO 12980

12400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12402 IF I$="m" THEN GOTO 10

12403 IF I$="c" THEN GOTO 12133

12404 IF I$=CHR$(13) THEN GOTO 12405

12405 CLS:PRINT"      SELECTION  OF  PRIORITY  DISEASES  FOR  CONTROL  PROGRAMME":PRINT

12406 'PRINT"Disease: "D$

12407 'PRINT"Programme: "DI$

12410 PRINT"Place: "LU$;TAB(50)"Period: "TI$:PRINT

12420 PRINT TAB(2)"Disease";TAB(20)"Impor-";TAB(27)"Grades of Availability";TAB(52)"Grades    of";

12422 PRINT TAB(20)"tance";TAB(27)"----------------------";TAB(52)"------------"

12423 PRINT TAB(20)"grade";TAB(27)"diag-";TAB(34)"analy-";TAB(41)"mea-";

12424 PRINT TAB(52)"input";TAB(59)"proba-";TAB(67)"T O T A L"

12425 PRINT TAB(27)"nosis";TAB(34)" sis";TAB(41)"sures";TAB(52)"avai-";TAB(59)"bility";TAB(67)"points"

12426 PRINT TAB(9)"----------------------------------------";TAB(52)"labi-";TAB(59)"of"

12427 PRINT TAB(9)"Multiplier";TAB(20)"*"IGB;TAB(27)"*"IGE;TAB(34)"*"IGZ;TAB(41)"*"IGS;

12428 PRINT TAB(52)"lity";TAB(59)"success"

12429 PRINT TAB(2)"------------------------------------------------------------------------"

12430 FOR I=1 TO N

12431 SU(I)=B(I)*IGB+G(I)*IGE+Z(I)*IGZ+S(I)*IGS

12440 RES(I)=SU(I)*F(I)*D(I)

12450 REM:PRINT TAB(3)I;TAB(10)N$(I);TAB(45)SU(I);TAB(62)RES(I)

12451 PRINT TAB(2)USING"\             \";N$(I);

12452 PRINT TAB(20)"+"INT(B(I));TAB(27)"+"INT(G(I));TAB(34)"+"INT(Z(I));TAB(41)"+"INT(S(I));

12453 PRINT TAB(52)"*"INT(F(I));TAB(59)"*"INT(D(I));TAB(67)INT(RES(I))

12460 NEXT I

12471 T=0

12472 FOR I=1 TO N

12473 T=T+RES(I)

12474 NEXT I

12480 A$=INKEY$:IF A$="" THEN GOTO 12480

12481 CLS:PRINT"      SELECTION  OF  PRIORITY  DISEASES  FOR  CONTROL  PROGRAMME":PRINT

      PRINT:PRINT TAB(10)"Disease";TAB(30)"Proportion";TAB(50)"Percentage"

12482 PRINT:PRINT TAB(28)"of the total";INT(T);" allocated points"

12483 PRINT:PRINT

12484 FOR I=1 TO N

12485 PRINT TAB(10)USING"\             \";N$(I);

12486 PRINT TAB(31)USING"#.####";RES(I)/T;

12487 PRINT TAB(50)USING"###.####";RES(I)/T*100

12488 NEXT I

12489 PRINT:PRINT TAB(10)"T o t a l";TAB(31)"1.0000";TAB(50)"100.0000":PRINT

12500 A$=INKEY$:IF A$="" THEN GOTO 12500

12501 CLS:PRINT TAB(7)"SELECTION  OF  PRIORITY  DISEASES  FOR  CONTROL  PROGRAMME"

12502 PRINT

12505 PRINT TAB(13)"(";CHR$(223);" represents 2 % of total"INT(T);"allocated points)"

12506 PRINT:PRINT

12507 PRINT TAB(5)"D i s e a s e";TAB(25)"0         20        40        60        80       100 %"

12508 PRINT TAB(25)CHR$(179)"---------|---------|---------|---------|---------I"

12510 FOR I=1 TO N

12512 Z=(RES(I)/T)*50

12513 IF Z<1 THEN GOTO 12514 ELSE 12520

12514 IF Z>0 THEN GOTO 12515 ELSE 12520

12515 PRINT TAB(5)USING"\             \";N$(I);

12516 PRINT TAB(25)CHR$(179);CHR$(249):GOTO 12525

12520 PRINT TAB(5)USING"\             \";N$(I);

12521 PRINT TAB(25)CHR$(179);

12522 FOR K=1 TO Z

12523 PRINT CHR$(223);

12524 NEXT K

12525 NEXT I

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12981 'GOTO 645

12982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) o no(n) ";R$

12983 IF R$="y" OR R$="n" THEN GOTO 12984 ELSE 12990

12984 IF R$="y" THEN GOTO 12000 ELSE 12990

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"12.13-TRUE PREVALENCE ESTIMATION BASED ON DIAGNOSTIC METHOD DETECTABILITY"

13010 PRINT"========================================================================="

13020 PRINT"This subprogramme evaluates the results of animal population investigation"

13030 PRINT"applying diagnostic method detectability value for the estimation of true"

13040 PRINT"prevalence rate from apparent prevalence, i.e. based on positive results."

13200 PRINT:PRINT"INPUT DATA:"

13201 INPUT"species, disease  "SP$,DI$

13202 INPUT"place,time        "PL$,TI$

13204 INPUT"test              "TE$:PRINT

13205 APR=0:DE=0

13210 PRINT"     apparent prevalence -"

13211 INPUT"        proportion of animals with positive test (number >0 and 1) ";APR:PRINT

13220 INPUT"     test detectability rate (number between >0 and 1)             ";DE

13240 IF (APR+DE)=0 OR APR>1 OR DE>1 THEN PRINT IDE$:GOTO 13970

13300 PRINT:PRINT"RESULT:":PRINT

13304 'PRINT"Species: "SP$;TAB(40)"Disease: "DI$

13306 'PRINT"Place: "PL$;TAB(60)"Time: "TI$

13308 'PRINT"Test: "TE$

13310 PRINT

13320 PRINT"     Estimated true prevalence rate among tested animals  =   ";

13321 PRINT USING"#.######";APR/DE:PRINT

13330 PRINT TAB(59)"= "USING"###.#### %";(APR/DE)*100

13970 APR=0:DE=0

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13981 'GOTO 645

13982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) o no(n) ";R$

13983 IF R$="y" OR R$="n" THEN GOTO 13984 ELSE 13990

13984 IF R$="y" THEN GOTO 13000 ELSE 13990

13990 RETURN

14000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

14002 IF Z$="y" OR Z$="n" THEN GOTO 14010 ELSE 14030

14010 IF Z$="y" THEN GOTO 14020 ELSE 14030

14020 CHAIN"EPIZ40MM.KOU"

14030 SYSTEM

 

 

         13-Annex I - Selected basic statistical methods

 

5 ON ERROR GOTO 11995

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4013.KOU":REM:5/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver. 4.0";TAB(70)v$:PRINT

30 PRINT TAB(10)"13-ANNEX I - SELECTED BASIC STATISTICAL METHODS"

40 PRINT TAB(10)"==============================================="

500 PRINT:PRINT TAB(15)"M E N U   O F   S U B P R O G R A M M E S":PRINT

510 PRINT TAB(10)"1-Arithmetic mean and measures of dispersion"

520 PRINT TAB(10)"2-Arithmetic mean from grouped data and measures of dispersion"

530 PRINT TAB(10)"3-Calculation of proportion and its standard error"

540 PRINT TAB(10)"4-Conversion between percentage/proportion and absolute data"

550 PRINT TAB(10)"5-Distribution of cumulative frequencies"

560 PRINT TAB(10)"6-Chi-square test and contingency tables"

570 PRINT TAB(10)"7-McNemar's test - paired chi-square test"

580 PRINT TAB(10)"8-Linear regression and correlation coefficient"

590 PRINT TAB(10)"9-Fisher's test for small frequencies' comparison"

600 PRINT TAB(10)"10-Moving averages - smoothing of time series"

602 PRINT TAB(10)"11-Simple arithmetic operations"

609 PRINT

610 PRINT TAB(10)"12-E N D  of this group of subprogrammes"

630 PRINT

635 PRINT TAB(18)"(Note: Data corrections only on current input line !)":PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue in this group of subprogrammes, yes(y) or no(n) ";Z$

651 IF Z$="y" OR Z$="n" THEN GOTO 660 ELSE 12000

660 IF Z$="y" THEN 20 ELSE GOTO 12000

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.1-ARITHMETIC MEAN AND MEASURES OF DISPERSION"

1005 PRINT"===============================================                (Ref.: Spiegel)"

1050 PRINT"This subprogramme calculates:"

1051 PRINT TAB(6)"1) arithmetic and geometric mean"

1052 PRINT TAB(6)"2) weighted arithmetic mean"

1053 PRINT TAB(6)"3) arithmetic mean and measures of dispersion"

1060 INPUT"Enter choice number: ",CH

1065 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 1070 ELSE PRINT IDE$:GOTO 1980

1070 IF CH=1 THEN GOTO 1100

1072 IF CH=2 THEN GOTO 1200

1074 IF CH=3 THEN GOTO 1300

1075 GOTO 1060

1100 PRINT"INPUT DATA:"

1101 INPUT"     number (2 up to 50 !) of observations (size of sample) ";N

1102 IF N<2 OR N>50 THEN PRINT IDE$:GOTO 1980

1105 IF N>14 THEN GOTO 1106 ELSE 1107

1106 CLS:PRINT

1107 PRINT"     List data:"

1108 Z=0:V2=0:MA=0:MG=0

1109 DIM Z(50)

1110 FOR I=1 TO N

1111 PRINT TAB(10)I;":   ";

1112 INPUT" variable value ";Z(I)

1113 NEXT I

1114 V1=0

1115 FOR I=1 TO N

1116 V1=V1+Z(I)

1117 NEXT I

1118 IF V1=0 THEN PRINT IDM$:GOTO 1152 ELSE 1125

1125 CLS:PRINT:PRINT"RESULT:":PRINT

1126 'V1=0

1127 'FOR I=1 TO N

1128 'V1=V1+Z(I)

1130 'NEXT I

1131 PRINT TAB(10)"Sum of variable values   = ";USING"#######.####";V1:PRINT

1132 MA=V1/N

1134 PRINT TAB(10)"Arithmetic mean          = ";USING"#######.####";MA

1136 PRINT

1140 V2=1

1142 FOR I=1 TO N

1144 V2=V2*Z(I)

1146 NEXT I

1148 MG=V2^(1/N)

1150 PRINT TAB(10)"Geometric mean           = ";USING"#######.####";MG:PRINT

1152 ERASE Z:Z=0:N=0

1154 GOTO 1980

1200 PRINT"INPUT DATA:"

1201 INPUT"     number (2 up to 50 !) of observations (size of sample) ";N

1202 IF N<2 OR N>50 THEN PRINT IDE$:GOTO 1980

1205 IF N>14 THEN GOTO 1206 ELSE 1217

1206 CLS:PRINT

1217 PRINT"     List data:"

1218 A=0:B=0

1220 DIM A(50),B(50)

1221 FOR I=1 TO N

1222 PRINT TAB(7)I;":  ";

1223 INPUT"variable, weighted (importance) factor ";A(I),B(I)

1224 NEXT I

1225 LET V1=0

1226 LET V2=0

1227 FOR I=1 TO N

1228 V1=V1+(A(I)*B(I))

1229 V2=V2+A(I)

1230 NEXT I

1231 IF V1=0 OR V2=0 THEN PRINT:PRINT IDM$:GOTO 1251 ELSE 1232

1232 CLS:PRINT:PRINT"RESULT:":PRINT

1241 PRINT:PRINT TAB(10)"Sum of variables                       = ";USING"#######.####";V2

1242 PRINT:PRINT TAB(10)"Sum of variables x weighted factors    = ";USING"#######.####";V1:PRINT

1250 PRINT:PRINT TAB(10)"Weighted arithmetic mean               = ";USING"#######.####";V1/V2

1251 ERASE A,B:A=0:B=0:N=0

1260 GOTO 1980

1300 PRINT"INITIAL DATA"

1301 INPUT"     number (2 up to 50 !) of observations (size of sample) ";N

1302 IF N<2 OR N>50 THEN PRINT IDE$:GOTO 1980

1304 IF N>14 THEN GOTO 1305 ELSE 1306

1305 CLS:PRINT

1306 PRINT"     List data:":W=0

1307 DIM DYNAMIC W(50)

1308 FOR I=1 TO N

1309 PRINT TAB(15)I;":   ";

1310 INPUT"variable value ";W(I)

1311 NEXT I

1320 A=0:FOR I=1 TO N

1321 A=A+W(I)

1322 NEXT I

1325 IF A=0 THEN PRINT:PRINT IDM$:GOTO 1448 ELSE 1390

1390 MAX=W(1)

1391 FOR I=2 TO N

1392 IF W(I)>MAX THEN MAX=W(I)

1393 NEXT I

1394 MIN=W(1)

1395 FOR I=2 TO N

1396 IF W(I)<MIN THEN MIN=W(I)

1397 NEXT I

1410 CLS:PRINT"RESULT:":PRINT:PRINT

1411 XM=0

1412 X2=0

1413 FOR I=1 TO N

1414 XM=XM+W(I)

1415 NEXT I:PRINT TAB(8)"Sum of variable values                         =  ";USING"#######.####";XM:PRINT

1416 XM=XM/N

1417 PRINT TAB(8)"Arithmetic mean                                =  ";USING"#######.####";XM:PRINT

1418 FOR I=1 TO N

1419 IF W(I)<XM THEN LET Z=-1 ELSE Z=+1

1420 X2=X2+Z*(W(I)-XM)

1421 NEXT I:PRINT

1422 PRINT TAB(8)"Mean deviation (average deviation)             = +-";USING"######.####";X2/N:PRINT

1423 V3=0

1424 FOR I=1 TO N

1426 V3=V3+(W(I)-XM)^2

1428 NEXT I:PRINT

1430 V=V3/N

1432 PRINT TAB(8)"Variance (square of the standard deviation)    =   ";USING"######.###";V:PRINT

1434 D=SQR(V)

1436 PRINT TAB(8)"Standard deviation"

1438 PRINT TAB(8)"(root mean square of deviation from the mean)  = +-";USING"######.###";D:PRINT

1440 C=D/XM*100

1441 PRINT TAB(8)"Coefficient of variation "

1442 PRINT"              (coefficient of dispersion;"

1443 PRINT TAB(8)"               standard deviation/mean)        =   ";USING"######.## %";C

1444 PRINT

1445 PRINT TAB(8)"Range  (from ";INT(MIN);

1446 PRINT "  to ";INT(MAX);

1447 PRINT " )";TAB(55)"=      ";INT(MAX-MIN)

1448 MAX=0:MIN=0:N=0

1450 ERASE W:W=0

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1981 GOTO 645

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.2-ARITHMETIC MEAN FROM GROUPED DATA AND MEASURES OF DISPERSION"

2010 PRINT"================================================================="

2050 PRINT"This subprogramme calculates:                                  (Ref.: Spiegel)"

2052 PRINT TAB(6)"1) simple arithmetic mean from grouped data"

2054 PRINT TAB(6)"2) arithmetic mean from grouped data and measures of dispersion"

2056 INPUT"Enter choice number: ",CH

2058 IF CH=1 OR CH=2 THEN GOTO 2060 ELSE PRINT IDE$:GOTO 2980

2060 IF CH=1 THEN GOTO 2100

2070 IF CH=2 THEN GOTO 2300

2071 GOTO 2056

2100 PRINT"INPUT DATA:"

2110 INPUT"     number (2 up to 50 !) of grouped data ";N

2111 IF N<2 OR N>50 THEN PRINT IDE$:GOTO 2980

2114 IF N>14 THEN GOTO 2115 ELSE 2116

2115 CLS:PRINT

2116 PRINT"     List data:"

2119 D=0:F=0

2120 DIM D(50),F(50)

2130 FOR I=1 TO N

2140 PRINT TAB(15)I;": ";

2150 INPUT"variable value, frequency ";D(I),F(I)

2160 NEXT I

2161 V0=0

2162 FOR I=1 TO N

2163 V0=V0+D(I)

2164 NEXT I

2165 IF V0=0 THEN PRINT IDM$:GOTO 2280 ELSE 2170

2170 V1=0

2180 FOR I=1 TO N

2190 V1=V1+D(I)*F(I)

2200 NEXT I

2210 V2=0

2220 FOR I=1 TO N

2230 V2=V2+F(I)

2240 NEXT I

2250 V3=V1/V2

2260 CLS:PRINT:PRINT"RESULT:":PRINT:PRINT

2261 PRINT TAB(10)"Sum of variable values            = ";USING"#######.####";V0:PRINT

2262 PRINT TAB(10)"Sum of frequencies                = ";USING"#######.####";V2:PRINT

2263 PRINT TAB(10)"Sum of variables x frequencies    = ";USING"#######.####";V1:PRINT

2264 PRINT

2270 PRINT TAB(10)"Arithmetic mean from grouped data = ";USING"#######.####";V3

2280 ERASE D,F:D=0:F=0:N=0

2281 GOTO 2980

2300 PRINT"INPUT DATA:"

2301 INPUT"     number (2 up to 50 !) of groups ";N

2302 IF N<2 OR N>50 THEN PRINT IDE$:GOTO 2980

2305 IF N>14 THEN GOTO 2306 ELSE 2307

2306 CLS:PRINT

2307 PRINT"     List data:":X=0:F=0

2308 DIM X(50),F(50)

2310 FOR I=1 TO N

2311 PRINT TAB(15)I;":  ";

2313 INPUT"variable value, frequency ";X(I),F(I)

2314 NEXT I

2316 V1=0

2320 FOR I=1 TO N

2321 V1=V1+X(I)*F(I)

2322 NEXT I

2323 V2=0

2324 FOR I=1 TO N

2325 V2=V2+F(I)

2326 NEXT I

2328 IF V2=0 THEN PRINT:PRINT IDM$:GOTO 2380 ELSE 2331

2331 XM=V1/V2

2332 X2=0

2333 FOR I=1 TO N

2335 IF X(I)<XM THEN LET Z=-1 ELSE Z=+1

2337 X2=X2+(Z*(X(I)-XM)*F(I))

2340 NEXT I

2341 MD=X2/V2

2342 PRINT

2350 CLS:PRINT"RESULT:":PRINT:PRINT

2351 PRINT TAB(8)"Arithmetic mean                               =  ";USING"#######.###";XM:PRINT

2354 PRINT TAB(8)"Mean deviation (average deviation)            = +-";USING"######.###";MD:PRINT

2356 X3=0

2358 FOR I=1 TO N

2360 X3=X3+(X(I)-XM)^2*F(I)

2362 NEXT I

2364 V=X3/V2

2366 PRINT TAB(8)"Variance (square of the standard deviation)   =  ";USING"#######.###";V:PRINT

2368 D=SQR(V)

2370 PRINT TAB(8)"Standard deviation"

2371 PRINT"       (root mean square of deviation from the mean) = +-";USING"######.###";D:PRINT

2372 C=D/XM*100

2373 PRINT TAB(8)"Coefficient of variation"

2374 PRINT"              (coefficient of dispersion;"

2375 PRINT"                       standard deviation/mean)      =      ";USING"###.## %";C:PRINT

2380 ERASE X,F:X=0:F=0:N=0

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2981 GOTO 645

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.3-CALCULATIONS OF PROPORTION AND ITS STANDARD ERROR"

3010 PRINT"======================================================"

3050 PRINT"This subprogramme calculates:                               (Ref.: Putt et al.)"

3052 PRINT TAB(6)"1) simple proportion"

3055 PRINT TAB(6)"2) proportion standard error of a sample"

3058 INPUT"Enter choice number: ",CH

3059 IF CH=1 OR CH=2 THEN GOTO 3060 ELSE PRINT IDE$:GOTO 3980

3060 IF CH=1 THEN GOTO 3100

3070 IF CH=2 THEN GOTO 3300

3071 GOTO 3058

3100 PRINT"INPUT DATA:"

3110 PRINT"   Do you want to calculate data of individual variables"

3111 PRINT"                    with and without a given characteristic  (i)"

3112 PRINT"   or simple relation between total number of observations"

3114 INPUT"     and  the number of variables of a given characteristic  (r)   ";R$

3115 IF R$="i" OR R$="r" THEN GOTO 3116 ELSE PRINT IDE$:GOTO 3980

3116 IF R$="i" THEN GOTO 3120 ELSE 3200

3120 INPUT"   total number (up to 50 !) of observations                       ";N

3121 IF N<1 OR N>50 THEN PRINT IDE$:GOTO 3980

3125 IF N>14 THEN GOTO 3126 ELSE 3130

3126 CLS:PRINT

3130 PRINT"     List data:":X=0

3131 DIM X(50)

3135 FOR I=1 TO N

3136 PRINT TAB(3)I" ";

3138 INPUT"variable with (1) or without (2) evaluated characteristic ";X(I)

3139 IF X(I)<1 OR X(I)>2 THEN PRINT IDE$:GOTO 3482

3140 IF X(I)>1 THEN X(I)=0

3141 NEXT I

3143 X1=0

3145 FOR I=1 TO N

3147 X1=X1+X(I)

3149 NEXT I

3150 IF X1=0 THEN PRINT IDE$:GOTO 3158 ELSE 3151

3151 CLS:PRINT:PRINT:PRINT"RESULT:":PRINT:PRINT

3152 PRINT TAB(10)"Sum of variables                               = "N:PRINT

3153 PRINT TAB(10)"Sum of variables with evaluated characteristic = "X1:PRINT

3154 PRINT

3155 PRINT:PRINT TAB(15)"Proportion    =   ";USING "#.####";X1/N:PRINT

3156 PRINT TAB(15)"                               = ";USING "###.####";(X1/N)*100;

3157 PRINT" %"

3158 ERASE X:X=0:N=0

3160 GOTO 3980

3200 PRINT

3201 INPUT"     total number of observations                                  ";N

3203 PRINT

3210 INPUT"     number of variables with a given evaluated characteristic     ";X1

3220 IF N<1 OR X1<1 THEN PRINT IDE$:GOTO 3980

3250 PRINT:PRINT"RESULT:":PRINT

3260 PRINT:PRINT TAB(15)"Proportion    =   ";USING "#.####";X1/N:PRINT

3261 PRINT TAB(15)"                               = ";USING "###.####";(X1/N)*100;

3262 PRINT" %":N=0

3270 GOTO 3980

3300 PRINT"INPUT DATA:"

3301 INPUT"     number of representative observations (random sample size) ";N

3302 IF N<1 THEN PRINT IDE$:GOTO 3980

3303 PRINT:PRINT"     Do you want to calculate the standard error "

3304 PRINT"                                             of  proportion (s)"

3305 INPUT"                                           or of percentage (p) ";R$

3309 IF R$="s" OR R$="p" THEN GOTO 3310 ELSE PRINT IDE$:GOTO 3980

3310 IF R$="s" THEN GOTO 3320 ELSE 3430

3320 PRINT:INPUT"     proportion of variables of a given characteristic          ";P

3321 IF P>1 THEN PRINT"Error! It must be proportions, i.e. numbers between >0 and 1 ! New input !":GOTO 3300

3330 LET Q=1-P

3332 LET Z=(P*Q)/N

3334 REM:Z2=LOG(Z)/2

3336 REM:Z2=EXP(Z2)

3337 Z2=SQR(Z)

3338 PRINT

3400 PRINT:PRINT"RESULT:":PRINT

3410 PRINT:PRINT TAB(10)"Standard error of proportion  =  +- "USING"#.####";Z2

3420 GOTO 3980

3430 PRINT:INPUT"     percentage of variables of a given characteristic          ";P

3440 LET Q=100-P

3450 R=SQR(P*Q/N)

3460 PRINT

3470 PRINT:PRINT"RESULT:":PRINT

3480 PRINT:PRINT TAB(10)"Standard error of percentage =  +- ";USING"##.####";R;

3481 PRINT"  %"

3482 N=0:X1=0

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3981 GOTO 645

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.4-CONVERSION BETWEEN PERCENTAGE/PROPORTION AND ABSOLUTE DATA"

4010 PRINT"==============================================================="

4015 PRINT"This subprogramme calculates:"

4052 PRINT TAB(6)"1) percentage and proportion from absolute data"

4054 PRINT TAB(6)"2) absolute data from percentage or proportion"

4056 INPUT"Enter choice number: ",CH

4058 IF CH=1 OR CH=2 THEN GOTO 4060 ELSE PRINT IDE$:GOTO 4980

4060 IF CH=1 THEN GOTO 4100

4062 IF CH=2 THEN GOTO 4300

4063 GOTO 4056

4100 PRINT"INPUT DATA:"

4110 INPUT"     total number of basic units (observations) - sample size ";N

4120 PRINT"     number (up to 40 !) of partial absolute data (integers)"

4121 INPUT"                 for conversion into percentage or proportion ";P

4122 IF N=0 OR P=0 OR P=>40 THEN PRINT IDE$:GOTO 4980

4125 IF P>13 THEN GOTO 4126 ELSE 4127

4126 CLS:PRINT

4127 PRINT TAB(6)"List data:":X=0

4128 DIM X(50)

4129 FOR I=1 TO P

4130 PRINT TAB(20)I;":   ";

4131 INPUT"X = ";X(I)

4132 NEXT I

4133 CLS:PRINT:PRINT"RESULT:":PRINT

4134 PRINT TAB(10)"Sample size: "N:PRINT

4135 PRINT TAB(6)"Order";TAB(20)"Partial";TAB(42)"Proportion";TAB(56)"Percentage"

4136 PRINT TAB(20)"number (X)":PRINT

4137 R=0

4138 IF P<17 THEN GOTO 4139 ELSE 4143

4139 FOR I=1 TO P

4140 PRINT TAB(6)I;TAB(19)X(I);TAB(40)USING"#####.####";R+(X(I)/N);

4141 PRINT TAB(55)USING"#####.####";R+(X(I)/N)*100

4142 NEXT I:GOTO 4166

4143 IF P>16 THEN GOTO 4144 ELSE 4166

4144 FOR I=1 TO 17

4145 PRINT TAB(6)I;TAB(19)X(I);TAB(38)USING"#####.####";R+(X(I)/N);

4146 PRINT TAB(53)USING"#####.####";R+(X(I)/N)*100

4147 NEXT I

4148 A$=INKEY$:IF A$="" THEN GOTO 4148

4149 CLS:FOR I=18 TO P

4150 PRINT TAB(6)I;TAB(19)X(I);TAB(38)USING"#####.####";R+(X(I)/N);

4151 PRINT TAB(53)USING"#####.####";R+(X(I)/N)*100

4152 NEXT I

4166 ERASE X,N,P:X=0:N=0:P=0

4170 GOTO 4980

4300 PRINT"INPUT DATA:"

4301 INPUT"     total number of basic units (observations) - sample size   ";N

4302 PRINT"     number (up to 40 !) of data on percentage or proportion "

4303 INPUT"                            for conversion into absolute values ";P

4304 IF N=0 OR P=0 OR P>40 THEN PRINT IDE$:GOTO 4980

4305 IF P>7 THEN CLS:PRINT

4306 PRINT"     Do you want the conversion from percentages (p)"

4307 INPUT"                             or from proportions (r)            ";R$

4308 IF R$="r" OR R$="p" THEN GOTO 4309 ELSE PRINT IDE$:GOTO 4980

4309 PRINT:IF R$="r" THEN GOTO 4310 ELSE 4400

4310 PRINT TAB(6)"List data:":X=0

4311 DIM X(50)

4313 FOR I=1 TO P

4315 PRINT TAB(20)I;":  ";

4317 INPUT"X = ";X(I)

4318 NEXT I

4320 CLS:PRINT"RESULT:":PRINT

4321 PRINT TAB(10)"Sample size :"N

4322 PRINT:PRINT ,"Order";TAB(27)"Proportion (X)";TAB(46)"Absolute Value":PRINT

4323 IF P<17 THEN GOTO 4324 ELSE 4328

4324 FOR I=1 TO P

4325 PRINT,I;TAB(25)USING"#########.####";X(I);

4326 PRINT TAB(40)USING"##############.####";X(I)*N

4327 NEXT I:GOTO 4350

4328 IF P>16 THEN GOTO 4329 ELSE 4350

4329 FOR I=1 TO 17

4330 PRINT,I;TAB(25)USING"#########.####";X(I);

4331 PRINT TAB(40)USING"##############.####";X(I)*N

4332 NEXT I

4333 A$=INKEY$:IF A$="" THEN GOTO 4333

4334 CLS:FOR I=18 TO P

4335 PRINT,I;TAB(25)USING"#########.####";X(I);

4336 PRINT TAB(40)USING"##############.####";X(I)*N

4337 NEXT I

4350 ERASE X:X=0:P=0:N=0

4360 GOTO 4980

4400 PRINT TAB(6)"List data (in %):":X=0

4402 DIM X(50)

4403 FOR I=1 TO P

4404 PRINT TAB(20)I;":  ";

4405 INPUT"X = ";X(I)

4406 NEXT I

4410 CLS:PRINT"RESULTS:":PRINT

4411 PRINT TAB(10)"Sample size :";N:PRINT

4412 PRINT,"Order";TAB(27)"Percentage (X)";TAB(46)"Absolute Value":PRINT

4413 IF P<17 THEN GOTO 4414 ELSE 4423

4414 FOR I=1 TO P

4415 PRINT,I;TAB(25)USING"#########.####";X(I);

4416 PRINT TAB(40)USING"##############.####";X(I)*N/100

4417 NEXT I:GOTO 4446

4423 IF P>16 THEN GOTO 4424 ELSE 4446

4424 FOR I=1 TO 17

4426 PRINT,I;TAB(25)USING"#########.####";X(I);

4427 PRINT TAB(40)USING"##############.####";X(I)*N/100

4428 NEXT I

4430 A$=INKEY$:IF A$="" THEN GOTO 4430

4431 CLS:FOR I=18 TO P

4432 PRINT,I;TAB(25)USING"#########.####";X(I);

4433 PRINT TAB(40)USING"##############.####";X(I)*N/100

4434 NEXT I

4446 ERASE X:X=0:N=0:P=0

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4981 GOTO 645

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.5-DISTRIBUTION OF CUMULATIVE FREQUENCIES"

5010 PRINT"===========================================  "

5100 PRINT"INPUT DATA:"

5105 INPUT"     data type ";T$

5110 INPUT"     number (2 up to 18 !) of data ";N

5111 IF N<2 OR N>18 THEN PRINT IDE$:GOTO 5980

5120 PRINT TAB(2)"List data ":'(names up to 15 characters, frequency in integers !):"

5129 VA$="":E=0

5130 DIM VA$(50),E(50)

5140 FOR I=1 TO N

5150 PRINT TAB(10)I;": ";

5151 INPUT"class/category, frequency ";VA$(I),E(I)

5160 NEXT I

5161 T=0

5162 FOR I=1 TO N

5163 T=T+E(I)

5164 NEXT I

5170 IF T=0 THEN PRINT IDM$:GOTO 5900

5200 CLS:PRINT"RESULT:":PRINT

5201 PRINT TAB(5)"Data Type: "T$

5220 PRINT

5230 PRINT"Order";TAB(8)"Class/category";TAB(29)"Frequency";TAB(45)"Cumulative";TAB(63)"Percentage"

5240 PRINT TAB(45)"Frequency";TAB(59)"of Total Cumululative"

5250 PRINT TAB(63)"Frequency"

5260 PRINT

5270 C=0

5280 FOR I=1 TO N

5281 C=C+E(I)

5282 PRINT" ";I;TAB(8)USING"\             \";VA$(I);

5290 PRINT TAB(27)USING"#########.##";E(I);TAB(43)C;TAB(60)C/T*100

5300 NEXT I

5400 A$=INKEY$:IF A$="" THEN GOTO 5400

5452 CLS:PRINT:PRINT TAB(9)"DISTRIBUTION OF  C U M U L A T I V E    F R E Q U E N C I E S"

5453 PRINT TAB(13)"(";CHR$(223);" represents 2 % of the total ";USING"###########.##";T;

5454 PRINT")":PRINT

5455 PRINT TAB(9)"Class/category";TAB(26)"0         20        40        60        80       100 %"

5456 PRINT TAB(26)CHR$(179)"---------|---------|---------|---------|---------I"

5470 C=0

5480 FOR I=1 TO N

5481 C=C+E(I)

5558 Z=(C/T)*50

5559 IF Z<1 THEN GOTO 5560 ELSE 5566

5560 IF Z>0 THEN GOTO 5561 ELSE 5566

5561 PRINT TAB(2)I;TAB(9)USING"\             \";VA$(I);

5562 PRINT TAB(26)CHR$(179);CHR$(249):GOTO 5572

5566 PRINT TAB(2)I;TAB(9)USING"\             \";VA$(I);

5567 PRINT TAB(26)CHR$(179);

5568 FOR K=1 TO (C/T)*50

5569 PRINT CHR$(223);

5570 NEXT K

5571 PRINT

5572 NEXT I

5900 ERASE VA$,E:VA$="":E=0:N=0

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5981 GOTO 645

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.6-CHI-SQUARE TEST AND CONTINGENCY TABLES"

6010 PRINT"===========================================                 (Ref.: Spiegel)"

6015 REM:Lon Poole,p.157 procedure

6050 PRINT"This subprogramme calculates :                               "

6052 PRINT TAB(6)"1) chi-square test"

6054 PRINT TAB(6)"2) frequency test - contingency table 2x2"

6056 PRINT TAB(6)"3) frequency test - contingency table 2x3"

6058 PRINT TAB(6)"4) frequency test - contingency table 2xN"

6059 PRINT TAB(6)"5) table of chi-square critical values"

6060 INPUT"Enter choice number: ",CH

6065 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 THEN GOTO 6070 ELSE PRINT IDE$:GOTO 6980

6070 IF CH=1 THEN GOTO 6100

6071 IF CH=2 THEN GOTO 6200

6072 IF CH=3 THEN GOTO 6300

6073 IF CH=4 THEN GOTO 6400

6075 IF CH=5 THEN GOTO 6500

6100 PRINT"INPUT DATA:"

6102 INPUT"     number (2 up to 11 !) of data (pairs) to be processed    ";N

6103 IF N<2 OR N>11 THEN PRINT IDE$:GOTO 6980 ELSE 6104

6104 INPUT"     is the expected frequency constant, yes(y) or no(n)      ";R$

6105 'IF R$<>"y" OR R$<>"n" THEN PRINT IDE$:GOTO 6980

6107 IF R$="n" THEN GOTO 6120

6108 IF R$="y" THEN GOTO 6109 ELSE PRINT IDE$:GOTO 6980

6109 INPUT"     constant expected frequency                              ";L

6110 IF L=0 THEN PRINT IDM$:GOTO 6980

6111 PRINT"     Key observed frequency (integers >0), one by one:"

6112 FOR I=1 TO N:PRINT TAB(15)I;":  ";

6113 INPUT K(I)

6114 IF K(I)=0 THEN PRINT IDM$:GOTO 6980 ELSE 6115

6115 NEXT I:S=0:T=0

6116 FOR I=1 TO N

6117 S=S+(ABS(K(I)-L)^2)/L

6118 T=T+((ABS(K(I)-L)-.5)^2)/L

6119 NEXT I:GOTO 6131

6120 PRINT"     Key pairs of observed values, expected values:"

6121 FOR I=1 TO N:PRINT TAB(15)I;":  ";

6122 INPUT K(I),L(I)

6123 IF K(I)=0 OR L(I)=0 THEN PRINT IDM$:GOTO 6980 ELSE 6124

6124 NEXT I

6125 S=0:T=0

6126 FOR I=1 TO N

6127 S=S+(ABS(K(I)-L(I))^2/L(I))

6128 T=T+(ABS(K(I)-L(I))-.5)^2/L(I)

6129 NEXT I

6131 CLS:PRINT:PRINT"RESULT:":PRINT

6132 PRINT:PRINT"     Chi-square                                     = ";USING"####.####";S

6133 PRINT:PRINT TAB(47)"with";N-1;"degrees of freedom":PRINT

6134 PRINT"     Chi-square after Yates' correction             = ";USING"####.####";T

6135 REM:Calculo de los valores criticos - Lon Poole

6136 IF N>101 THEN GOTO 6165

6137 IF N=101 THEN GOTO 6162

6138 IF N>31 THEN GOTO 6156

6140 RESTORE

6145 FOR I=1 TO N-1

6146 READ C

6147 NEXT I

6148 FOR I=N TO N+29

6150 READ D

6152 NEXT I

6154 GOTO 6167

6156 C=(N-1)*(1-2/(9*(N-1))+1.6449*SQR(2/(9*(N-1)))^3)

6158 D=(N-1)*(1-2/(9*(N-1))-1.6449*SQR(2/(9*(N-1)))^3)

6160 GOTO 6167

6162 C=124.342

6163 D=77.9295

6164 GOTO 6167

6165 C=.5*(1.6649+SQR(2*(N-1)-1))^2

6166 D=.5*(SQR(2/(9*(N-1))-1.6449)^2)

6167 PRINT:PRINT"     Critical value at the 0.05 significance level  = ";

6168 PRINT USING"####.####";C

6169 IF T>C THEN 6175

6170 IF S>C THEN 6177

6171 IF S<D THEN 6182

6172 IF T<D THEN 6182

6173 PRINT:PRINT"     The hypothesis zero is not rejected at 0.05 significance level."

6174 GOTO 6198

6175 PRINT:PRINT"     The hypothesis zero is rejected at 0.05 significance level."

6176 GOTO 6198

6177 PRINT:PRINT"     The value of chi-square is not convincing and therefore "

6178 PRINT"     the sample size to be increased  "

6179 PRINT"     or the methods of multinomial distribution to be used."

6180 GOTO 6198

6182 PRINT:PRINT"     The agreement is too good and should be critically evaluated."

6183 PRINT"     Chi-square is inferior to 95% of critical value."

6184 DATA 3.8415,5.9915,7.8147,9.4877,11.071,12.592

6185 DATA 14.067,15.507,16.919,18.307,19.675,21.026

6186 DATA 22.362,23.685,24.996,26.296,27.587,28.896

6187 DATA 30.140,31.410,32.671,33.924,35.173,36.415

6188 DATA 37.653,38.885,40.113,41.337,42.557,43.773

6189 DATA .003932,.10259,.35185,.71072,1.1455

6190 DATA 1.635,2.167,2.733,3.325,3.940

6191 DATA 4.575,5.226,5.892,6.571,7.261

6192 DATA 7.962,8.672,9.390,10.117,10.851

6193 DATA 11.591,12.338,13.091,13.848,14.611

6194 DATA 15.379,16.151,16.928,17.708,18.493

6198 PRINT:REM:ERASE K,L

6199 GOTO 6980

6200 PRINT:PRINT"INPUT DATA (integers >0):":PRINT

6201 INPUT"          value of first group of first class    - a ";A

6202 INPUT"          value of first group of second class   - b ";B:PRINT

6203 INPUT"          value of second group of first class   - c ";C

6204 INPUT"          value of second group of second class  - d ";D

6206 LET N=A+B+C+D

6207 IF N=0 OR A=0 OR B=0 OR C=0 OR D=0 THEN PRINT IDM$:GOTO 6980 ELSE 6208

6208 LET NUM=((A*D)-(B*C))^2

6210 LET DEN=(A+B)*(C+D)*(A+C)*(B+D)

6211 LET YAT=A*D-B*C-(N/2)

6220 CLS:PRINT:PRINT"RESULT:":PRINT

6224 X2=NUM*N/DEN

6230 PRINT:PRINT"    Chi-square                              = "USING"####.####";X2:PRINT

6231 PRINT"                            with degree of freedom = 1"

6232 GOTO 6240

6233 REM:X2=N*(YAT^2)/DEN

6235 REM:PRINT:PRINT"    Chi-square value  = "USING"####.####";X2:PRINT

6236 REM:PRINT"                            with degree of freedom = 1"

6240 IF N<200 OR A<5 OR B<5 OR C<5 OR D<5 THEN GOTO 6241 ELSE 6246

6241 A1=((A+B)*(A+C))/N:B1=((A+B)*(B+D))/N:C1=((A+C)*(C+D))/N:D1=((C+D)*(B+D))/N

6242 IF A>A1 THEN E=((A-A1)-0.5)^2 ELSE E=((A1-A)-0.5)^2

6243 X7=E/A1+E/B1+E/C1+E/D1

6244 PRINT:PRINT"    Chi-square after Yates' correction      = "USING"####.####";X7

6245 GOTO 6252

6246 LET NUMY=((A*D)-(B*C)-(N/2))^2:REM:=line 6211 ^2

6247 LET X6=N*NUMY/DEN

6249 PRINT:PRINT"    Chi-square after Yates' correction      = "USING"####.####";X6

6252 X6=X2:X7=X2:X3=X2/(X2+N)

6253 COR=SQR(X3)

6254 PRINT:PRINT"    Coefficient of contingency              =    ";USING"#.####";COR:PRINT

6256 IF X2=>6.63 THEN GOTO 6262

6258 IF X2=>3.84 AND X2<6.63 THEN GOTO 6264

6260 IF X2=>2.71 AND X2<3.84 THEN GOTO 6268 ELSE 6272

6262 PRINT:PRINT"    Difference is of statistical significance "

6263 PRINT:PRINT"                                 at 1% level (error probability).":GOTO 6980

6264 PRINT:PRINT"    Difference is of statistical significance "

6266 PRINT:PRINT"                                 at 5% level (error probability).":GOTO 6980

6268 PRINT:PRINT"    Difference is of statistical significance only"

6270 PRINT:PRINT"                                 at 10 % level (error probability).":GOTO 6980

6272 PRINT:PRINT"    Difference is not of statistical significance."

6273 PRINT

6274 GOTO 6980

6300 PRINT:PRINT"INPUT DATA:":PRINT

6305 PRINT TAB(5)"(Individual values to be major than 5 !)":PRINT

6310 INPUT"          value of first group of first class    - a1 ";A1

6311 INPUT"          value of first group of second class   - a2 ";A2

6312 INPUT"          value of first group of third class    - a3 ";A3:PRINT

6313 INPUT"          value of second group of first class   - b1 ";B1

6314 INPUT"          value of second group of second class  - b2 ";B2

6315 INPUT"          value of second group of third class   - b3 ";B3

6316 NA=A1+A2+A3

6317 NB=B1+B2+B3

6318 IF NA=0 OR NB=0 THEN PRINT:PRINT IDM$:GOTO 6980 ELSE 6322

6322 N1=A1+B1

6323 N2=A2+B2

6324 N3=A3+B3

6325 N=NA+NB

6330 A=(A1^2/N1)+(A2^2/N2)+(A3^2/N3)

6331 B=(B1^2/N1)+(B2^2/N2)+(B3^2/N3)

6332 CLS:PRINT:PRINT"RESULT:":PRINT

6333 LET X2=(N/NA*A)+(N/NB*B)-N

6334 PRINT:PRINT"     Chi-square value  = ";USING"####.####";X2:PRINT

6335 PRINT"                             with degrees of freedom  =  2":PRINT

6340 IF X2=>9.21 THEN GOTO 6345

6342 IF X2=>5.99 AND X2<9.21 THEN GOTO 6347

6343 IF X2=>4.61 AND X2<5.99 THEN GOTO 6350 ELSE 6352

6345 PRINT:PRINT"    Difference is of statistical significance "

6346 PRINT:PRINT"                               at 1% level (error probability).":PRINT:GOTO 6980

6347 PRINT:PRINT"    Difference is of statistical significance "

6348 PRINT:PRINT"                               at 5% level (error probability).":PRINT:GOTO 6980

6350 PRINT:PRINT"    Difference is of statistical significance"

6351 PRINT:PRINT"                               at 10% level (error probability) only.":PRINT:GOTO 6980

6352 PRINT:PRINT"    Difference is not statistically significant."

6356 PRINT

6360 GOTO 6980

6400 PRINT"INPUT DATA:"

6405 PRINT"     How many pairs (3 up to 25 !) of observed and expected values"

6406 INPUT"     (under the null hypothesis = without differences) to be processed ";N

6407 IF N>25 OR N<3 THEN PRINT IDE$:GOTO 6980

6409 IF N>10 THEN CLS:PRINT

6414 'DIM O(50),E(50)

6415 'ERASE O,E:O=0:E=0

6416 DIM O(50),E(50)

6417 PRINT"     Key pairs (in integers >0) of observed values, expected values: "

6418 FOR I=1 TO N

6420 PRINT TAB(15)I;"pair:  ";

6421 INPUT O(I),E(I)

6422 IF O(I)=0 OR E(I)=0 THEN PRINT IDE$:GOTO 6490

6423 NEXT I

6424 A=0:B=0

6426 FOR I=1 TO N

6430 IF O(I)<E(I) THEN GOTO 6431 ELSE 6432

6431 C=E(I)-O(I):GOTO 6440

6432 C=O(I)-E(I)

6440 A=A+(C)^2/E(I)

6451 B=B+(C-.5)^2/E(I)

6455 NEXT I

6456 REM:S=0

6457 REM:FOR I=1 TO N

6458 REM:S=S+O(I)+E(I)

6459 REM:NEXT I

6460 CLS:PRINT:PRINT"RESULT:":PRINT

6461 PRINT TAB(8)"Chi-square value                          = ";USING"####.####";A:PRINT

6462 PRINT TAB(8)"Chi-square value after Yates' correcture  = ";USING"####.####";B

6463 PRINT:PRINT"       Degrees of freedom  = "N-1:PRINT:PRINT

6490 ERASE O,E:O=0:E=0:N=0

6492 PRINT:PRINT"Statistical significance level of the difference between observed"

6493 PRINT"      and expected distribution see in following chi-square table:    (Enter !)"

6495 A$=INKEY$:IF A$="" THEN GOTO 6495

6500 CLS:PRINT

6502 PRINT"         TABLE OF CRITICAL VALUES FOR CHI-SQUARE DISTRIBUTION":PRINT

6503 PRINT TAB(10)"Degree of";TAB(26)"Critical  Values  of  chi-square"

6504 PRINT TAB(10)"Freedom","     at    Level     of ":PRINT

6505 PRINT TAB(25)"10%";TAB(40)"5%";TAB(55)"1%"

6507 PRINT TAB(10)"-----------------------------------------------------"

6510 PRINT TAB(15)"1";TAB(25)"2.71";TAB(40)"3.84";TAB(55)"6.63"

6511 PRINT TAB(15)"2";TAB(25)"4.61";TAB(40)"5.99";TAB(55)"9.21"

6513 PRINT TAB(15)"3";TAB(25)"6.25";TAB(40)"7.81";TAB(55)"11.3"

6515 PRINT TAB(15)"4";TAB(25)"7.78";TAB(40)"9.49";TAB(55)"13.3"

6517 PRINT TAB(15)"5";TAB(25)"9.24";TAB(40)"11.1";TAB(55)"15.1"

6519 PRINT TAB(15)"6";TAB(25)"10.6";TAB(40)"12.6";TAB(55)"16.8"

6520 PRINT TAB(15)"7";TAB(25)"12.0";TAB(40)"14.1";TAB(55)"18.5"

6522 PRINT TAB(15)"8";TAB(25)"13.4";TAB(40)"15.5";TAB(55)"20.1"

6524 PRINT TAB(15)"9";TAB(25)"14.7";TAB(40)"16.9";TAB(55)"21.7"

6526 PRINT TAB(14)"10";TAB(25)"16.0";TAB(40)"18.3";TAB(55)"23.2"

6528 PRINT TAB(14)"15";TAB(25)"22.3";TAB(40)"25.0";TAB(55)"30.6"

6530 PRINT TAB(14)"20";TAB(25)"28.4";TAB(40)"31.4";TAB(55)"37.6"

6532 PRINT TAB(14)"30";TAB(25)"40.3";TAB(40)"43.8";TAB(55)"50.9"

6534 PRINT TAB(14)"40";TAB(25)"51.8";TAB(40)"55.8";TAB(55)"63.7"

6535 PRINT TAB(14)"60";TAB(25)"74.4";TAB(40)"79.1";TAB(55)"88.4"

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6982 GOTO 645

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.7-McNEMAR'S TEST - PAIRED CHI-SQUARE TEST"

7010 PRINT"============================================                    (Ref.: Navarro)"

7015 PRINT"INPUT DATA: "

7016 INPUT"     problem ";PR$

7017 INPUT"     cases, controls ";CA$,CO$

7020 INPUT"     factor to be tested (name up to 10 characters !) ";F$:PRINT

7030 PRINT"     enter the number of pairs in each category:":PRINT

7035 PRINT

7040 PRINT:PRINT TAB(37)"CONTROLS"

7045 PRINT TAB(30)"+ ";F$;TAB(44)"- ";F$:PRINT

7050 PRINT TAB(26)"|--------------|--------------|"

7055 PRINT TAB(13)"+ ";F$;TAB(26)"|";TAB(41)"|";TAB(56)"|"

7060 PRINT "CASES";TAB(26)"|--------------|--------------|"

7065 PRINT TAB(13)"- ";F$;TAB(26)"|";TAB(41)"|";TAB(56)"|"

7070 PRINT TAB(26)"|--------------|--------------|

7080 LOCATE 17,32:INPUT"",A

7082 LOCATE 17,47:INPUT"",B

7084 LOCATE 19,32:INPUT"",C

7086 LOCATE 19,47:INPUT"",D

7180 LOCATE 17,60:RO=A+B:PRINT RO

7210 LOCATE 22,31:CO=A+C:PRINT CO

7250 LOCATE 19,60:R1=C+D:PRINT R1:LOCATE 22,46

7260 C1=B+D:PRINT C1

7270 LOCATE 22,60:N=A+B+C+D:PRINT N

7271 IF N=0 THEN PRINT IDM$:GOTO 7982 ELSE 7280

7280 A$=INKEY$:IF A$="" THEN GOTO 7280

7285 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7186 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7187 IF I$="m" THEN GOTO 10

7188 IF I$="c" THEN GOTO 7000

7189 IF I$=CHR$(13) THEN GOTO 7300

7300 CLS:PRINT:PRINT"RESULT:":PRINT

7310 PRINT TAB(5)"Problem: "PR$:PRINT

7312 PRINT "Cases: "CA$;TAB(40)"Controls: "CO$:PRINT

7360 PRINT:'McNemar's Test

7390 M=(ABS(B-C)-1)^2/(B+C)

7530 PRINT:PRINT TAB(12)"McNemar's test value = ";

7550 PRINT USING"######.######";M:PRINT

7560 SIG$="<":SIGNI=0.05:IF M>6.635 THEN SIGNI=.01

7570 NIV$="The difference is statistically significant.":PRINT:PRINT

7580 IF M>6.635 THEN NIV$="The difference is statistically highly significant."

7590 IF M<3.841 THEN NIV$="The difference is statistically not significant."

7600 IF M<3.841 THEN SIG$=">"

7610 PRINT SPC(11);"(P "SIG$;" ";:PRINT USING "#.##!";SIGNI; ")"

7620 PRINT:PRINT SPC(11);NIV$

7982 A$=INKEY$:IF A$="" THEN GOTO 7982

7983 CLS:MV=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

7984 IF R$="y" OR R$="n" THEN GOTO 7985 ELSE 7990

7985 IF R$="y" THEN GOTO 7000 ELSE 7990

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.8-LINEAR REGRESSION  AND  CORRELATION COEFFICIENT"

8010 PRINT"====================================================           (Ref.: Spiegel)"

8020 PRINT"(testing relationship between two variables - independent/dependent)"

8050 PRINT"This subprogramme calculates:"

8052 PRINT TAB(6)"1) linear regression incl. correlation coefficient"

8053 PRINT TAB(6)"                                (using least squares regression line)"

8054 PRINT TAB(6)"2) simple linear correlation coefficient"

8055 PRINT TAB(6)"3) coefficient of rank correlation"

8056 PRINT TAB(6)"   Note: Rank correlation can be used instead of using precise values "

8057 PRINT TAB(6)"         of the variables, or when such precision is unavailable."

8060 INPUT"Enter choice number: ",CH

8065 IF CH=1 OR CH=2 OR CH=3 THEN GOTO 8066 ELSE 8981

8066 X=0:Y=0:N=0

8067 DIM X(50),Y(50)

8070 IF CH=1 THEN GOTO 8200

8072 IF CH=2 THEN GOTO 8400

8074 IF CH=3 THEN GOTO 8500

8200 PRINT"INPUT DATA:"

8210 INPUT"     Number (3 up to 50 !) of points (pairs) >0 to be processed ";N

8211 IF N>50 OR N<3 THEN PRINT IDE$:GOTO 8980 ELSE 8213

8213 IF N>11 THEN CLS:PRINT

8220 LET P1=0:LET P2=0:LET P3=0:LET P4=0:LET P5=0

8230 FOR I=1 TO N

8240 PRINT TAB(10)I;"pair:  ";

8250 INPUT"X (independent), Y (dependent)  ";X(I),Y(I)

8251 IF X(I)=0 OR Y(I)=0 THEN PRINT IDE$:GOTO 8980 ELSE 8260

8260 LET P1=P1+X(I)

8270 LET P2=P2+Y(I)

8280 LET P3=P3+X(I)*Y(I)

8290 LET P4=P4+(X(I))^2

8295 LET P5=P5+(Y(I))^2

8300 NEXT I

8310 LET B=CSNG((P3-P1*P2/N)/(P4-P1^2/N))

8320 LET A=CSNG((P2-P1*B)/N)

8324 LET C=CSNG(P3-(P1*P2/N))

8325 LET D=CSNG(P4-(P1^2/N))

8326 LET E=CSNG(P5-(P2^2/N))

8327 LET F=CSNG((P3-P2*P1/N)/(P5-P2^2/N))

8328 LET G=CSNG((P1-P2*F)/N)

8330 IF B<0 THEN LET Z$=" " ELSE LET Z$="+"

8331 IF F<0 THEN LET S$=" " ELSE LET S$="+"

8335 CLS:PRINT:PRINT"RESULT:":PRINT

8336 PRINT"     The equation of the regression line of Y on X:":PRINT

8340 PRINT TAB(40)"Y = "USING"######.##  ";A;

8341 PRINT Z$;USING"######.##   X";B

8342 PRINT:PRINT"     Correlation coefficient  r          =  ";USING"##.####";C/SQR(D*E):PRINT

8343 PRINT"     Determination coefficient  r^2      =  ";USING"##.####";(C/SQR(D*E))^2:PRINT

8345 PRINT:PRINT"     The equation of the regression line of X on Y:":PRINT

8346 PRINT TAB(40)"X = "USING"######.##  ";G;

8347 PRINT S$;USING"######.##   Y";F

8349 PRINT

8350 PRINT:PRINT"     Do you want to calculate (interpolate) individual values"

8351 INPUT"     of the regression line Y=A+BX, yes(y) or no(n) ";R$

8360 IF R$="y" THEN GOTO 8365 ELSE 8980

8365 CLS

8370 PRINT:PRINT"     Do you want to calculate the value of 'X'(x) for a given 'Y'"

8371 INPUT"                 or viceversa the value of 'Y'(y) for a given 'X' ";T$

8380 IF T$="x" OR T$="X" THEN GOTO 8393 ELSE 8381

8381 IF T$="y" OR T$="Y" THEN GOTO 8390 ELSE 8399

8390 PRINT TAB(54)"Key value X  ";

8391 INPUT X1

8392 PRINT TAB(30)"Y = ";USING"#######.##";A+B*X1:GOTO 8396

8393 PRINT TAB(54)"Key value Y  ";

8394 INPUT Y1

8395 PRINT TAB(30)"X = ";USING"#######.##";Y1/B-A/B:GOTO 8396

8396 PRINT:PRINT"     Do you want to calculate (interpolate) other individual values"

8397 INPUT"     of the regression line Y=A+BX, yes(y) or no(n) ";R$

8398 IF R$="y" THEN GOTO 8370 ELSE 8980

8399 GOTO 8980

8400 PRINT"INPUT DATA:":

8401 INPUT"     Number (3 up to 50 !) of points (pairs) to be processed ";N

8402 IF N<3 OR N>50 THEN PRINT IDE$:GOTO 8980 ELSE 8405

8403 'IF N>50 THEN GOTO 8404 ELSE 8405

8404 'PRINT"More than 50 points (pairs) ! New input !":GOTO 8401

8405 IF N>11 THEN CLS:PRINT

8406 LET P1=0:LET P2=0

8407 FOR I=1 TO N

8408 PRINT,I;"pair:  ";

8409 INPUT "   X (independent), Y (dependent)  ";X(I),Y(I)

8410 IF X(I)=0 OR Y(I)=0 THEN PRINT IDE$:GOTO 8980 ELSE 8411

8411 NEXT I

8412 FOR I=1 TO N

8414 LET P1=P1+X(I)

8416 LET P2=P2+Y(I)

8418 NEXT I

8420 LET MX=P1/N

8422 LET MY=P2/N

8423 LET P3=0:LET P4=0:LET P5=0

8424 FOR I=1 TO N

8426 P3=P3+X(I)*Y(I)

8428 P4=P4+(X(I))^2

8430 P5=P5+(Y(I))^2

8432 NEXT I

8434 LET A=P3-(P1*P2/N)

8436 LET B=P4-(P1^2/N)

8438 LET C=P5-(P2^2/N)

8440 CLS:PRINT:PRINT"RESULT:":PRINT:PRINT

8442 PRINT:LCC=A/SQR(B*C)

8444 PRINT"       Linear correlation coefficient - r      =   ";USING"##.####";LCC

8450 PRINT

8451 PRINT"       Determination coefficient      - r^2    =   ";USING"##.####";LCC^2

8453 GOTO 8980

8500 PRINT

8501 PRINT"INPUT DATA:"

8502 INPUT"        number (3 up to 50) of rank pairs of variable X and Y     ";N

8503 IF N<3 OR N>50 THEN PRINT IDE$:GOTO 8980 ELSE 8505

8505 IF N>8 THEN GOTO 8506 ELSE 8521

8506 CLS:PRINT

8521 PRINT"Data must be ranked in order of size, importance, etc. !"

8527 FOR I=1 TO N

8530 PRINT"    ";I;"pair: ";

8532 INPUT"rank number of variables X,Y ";X(I),Y(I)

8533 IF (X(I)=0 OR Y(I))=0 THEN PRINT IDM$:GOTO 8980 ELSE 8535

8535 NEXT I

8540 IF N>20 THEN GOTO 8541 ELSE 8550

8541 CLS

8550 PRINT:PRINT"RESULT:":PRINT

8552 D=0

8555 FOR I=1 TO N

8556 D(I)=((X(I)-Y(I))^2)

8557 D=D+D(I)

8559 NEXT I

8560 A=6*D:B=N*(N^2-1)

8565 PRINT TAB(10)"   Coefficient of rank correlation =  "USING"##.####";1-A/B

8980 ERASE X,Y:X=0:Y=0:N=0:P1=0:P2=0:P3=0:P4=0:P5=0

8981 A$=INKEY$:IF A$="" THEN GOTO 8981

8982 GOTO 645

8990 RETURN

9000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.9-FISHER'S TEST FOR SMALL FREQUENCIES' COMPARISON"

9005 PRINT"====================================================        (Ref.: Navarro)"

9020 PRINT"This subprogramme calculates the comparison test when some values"

9021 PRINT"are minor than 5 and number of total cases is minor than 60 !"

9025 PRINT"INPUT DATA:"

9026 INPUT"     problem ";PR$

9027 INPUT"     variable 'X' ";VX$

9028 INPUT"     variable 'Y' ";VY$

9035 PRINT

9040 PRINT:PRINT TAB(37)"Variable 'Y'":PRINT

9045 PRINT TAB(32)"+ ";TAB(47)"- ":PRINT

9050 PRINT TAB(26)"|--------------|--------------|"

9055 PRINT TAB(18)"+ ";TAB(26)"|";TAB(41)"|";TAB(56)"|"

9060 PRINT "  Variable 'X'";TAB(26)"|--------------|--------------|"

9065 PRINT TAB(18)"- ";TAB(26)"|";TAB(41)"|";TAB(56)"|"

9070 PRINT TAB(26)"|--------------|--------------|

9080 LOCATE 17,32:INPUT"",A

9082 LOCATE 17,47:INPUT"",B

9084 LOCATE 19,32:INPUT"",C

9086 LOCATE 19,47:INPUT"",D

9180 LOCATE 17,60:RO=A+B:PRINT RO

9210 LOCATE 22,31:CO=A+C:PRINT CO

9250 LOCATE 19,60:R1=C+D:PRINT R1:LOCATE 22,46

9260 C1=B+D:PRINT C1

9270 LOCATE 22,60:N=A+B+C+D:PRINT N

9271 IF N=0 THEN PRINT IDM$:GOTO 9982 ELSE 9273

9273 A$=INKEY$:IF A$="" THEN GOTO 9273

9274 IF N>60 THEN GOTO 9275 ELSE 9285

9275 PRINT"Error! Total cannot be major then 60! New input! Key ENTER!"

9276 X$=INPUT$(1):IF X$=CHR$(13) THEN GOTO 9000

9285 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

9286 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

9287 IF I$="m" THEN GOTO 10

9288 IF I$="c" THEN GOTO 9000

9289 IF I$=CHR$(13) THEN GOTO 9300

9300 CLS

9330 PRINT:PRINT"RESULT:":PRINT

9360 'Exact test of Fischer.

9370 PRINT TAB(5)"Problem: "PR$:PRINT

9372 PRINT"Variable 'X': "VX$;TAB(40)"Variable 'Y': "VY$:PRINT

9374 PRINT

9390 DIM FAC#(100)

9400 FAC#(0)=1:FAC#(1)=1:FAC#(2)=2

9410 FOR I=3 TO N

9420 FAC#(I)=I*FAC#(I-1)

9430 NEXT I

9440 E#=FAC#(RO)*FAC#(R1)*FAC#(CO)*FAC#(C1)

9450 DE#=FAC#(A)*FAC#(B)*FAC#(D)*FAC#(C)*FAC#(N)

9460 FI#=E#/DE#

9470 Z=1:IF B<A THEN Z=-1

9480 IF (A*B*C*D)=0 THEN GOTO 9530

9490 A=A-Z:B=B+Z:C=C+Z:D=D-Z

9500 DE#=FAC#(A)*FAC#(B)*FAC#(C)*FAC#(D)*FAC#(N)

9510 FI#=FI#+E#/DE#

9520 GOTO 9480

9530 PRINT TAB(12)"Fisher's test value = ";

9550 PRINT USING"#.######";FI#

9555 REM:PRINT TAB(15)"The difference is statistically"

9560 SIG$="<":SIGNI=0.05:IF FI#<.01 THEN SIGNI=.01

9570 NIV$="The difference is statistically significant.":PRINT:PRINT

9580 IF FI#<.01 THEN NIV$="The difference is statistically highly significant."

9590 IF FI#>.05 THEN NIV$="The difference is statistically not significant."

9600 IF FI#>.05 THEN SIG$=">"

9610 PRINT SPC(11);"(P "SIG$;" ";:PRINT USING "#.##!";SIGNI; ")"

9620 PRINT:PRINT SPC(11);NIV$

9982 A$=INKEY$:IF A$="" THEN GOTO 9982

9983 CLS:MV=0:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

9984 IF R$="y" OR R$="n" THEN GOTO 9985 ELSE 9990

9985 IF R$="y" THEN GOTO 9000 ELSE 9990

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.10-MOVING AVERAGES - SMOOTHING OF TIME SERIES"

10020 PRINT"================================================               (Ref.: Spiegel)"

10030 PRINT"This subprogramme calculates moving averages of order 3 reducing"

10031 PRINT"unwanted fluctuation and extreme values - smoothing of time series."

10099 T$="":V=0

10100 DIM T$(50),V(50)

10110 PRINT"INPUT DATA:"

10120 INPUT"     total period ";TP$

10130 INPUT"     variables ";TV$

10140 REM:INPUT"     number of time subperiods for one partial moving average ";T

10150 INPUT"     number (3 up to 20 !) of variables ";N

10151 IF N<3 OR N>20 THEN PRINT IDE$:GOTO 10980

10152 'IF N>20 THEN GOTO 10153 ELSE 10154

10153 'PRINT"More than 20 variables ! New input !":GOTO 10150

10154 IF N>13 THEN CLS:PRINT

10200 PRINT TAB(2)" List data - name (up to 12 characters !) of time/period, variable value: "

10210 FOR I=1 TO N

10211 PRINT TAB(15)"  ";I;": ";

10212 INPUT T$(I),V(I)

10213 IF T$(I)="" THEN PRINT IDM$:GOTO 10980 ELSE 10215

10215 NEXT I

10220 CLS:PRINT"RESULTS:"

10221 PRINT"     Total period: "TP$

10222 PRINT"     Type of variables: "TV$

10223 PRINT

10225 PRINT TAB(15)"T A B L E    OF  M O V I N G   A V E R A G E S":PRINT

10230 PRINT TAB(12)"Order";TAB(21)"Time/";TAB(36)"Variable"; TAB(51)"Moving average"

10231 PRINT TAB(21)"period";TAB(36)"value":PRINT

10240 FOR I=1 TO N

10241 IF I=1 OR I=N THEN GOTO 10243 ELSE 10244

10243 PRINT TAB(12)I;TAB(21)T$(I);TAB(35)V(I):GOTO 10250

10244 IF I>1 OR I<N THEN PRINT TAB(12)I;TAB(21)T$(I);TAB(35)V(I);

10245 PRINT TAB(51)USING"#######.##";((V(I-1)+V(I)+V(I+1))/3):GOTO 10250

10250 NEXT I

10980 ERASE T$,V:T$="":V=0:N=0

10981 A$=INKEY$:IF A$="" THEN GOTO 10981

10982 GOTO 645

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"13.11-SIMPLE ARITHMETIC OPERATIONS"

11012 PRINT"=================================="

11015 PRINT"This subprogramme carries out simple arithmetic operations"

11016 PRINT"within very limited range of data:"

11020 PRINT TAB(10)" 1) Additions";TAB(40)" 2) Subtraction"

11023 PRINT TAB(10)" 3) Multiplication";TAB(40)" 4) Division"

11027 PRINT TAB(10)" 5) Exponentiation";TAB(40)" 6) Extraction of roots"

11030 INPUT"Enter choice number: ",CN

11032 IF CN=0 OR CN>6 THEN PRINT IDE$:GOTO 11900 ELSE 11040

11040 IF CN=1 THEN GOTO 11100

11042 IF CN=2 THEN GOTO 11200

11044 IF CN=3 THEN GOTO 11300

11045 IF CN=4 THEN GOTO 11400

11047 IF CN=5 THEN GOTO 11500

11048 IF CN=6 THEN GOTO 11600

11100 PRINT"INPUT DATA:"

11121 INPUT"     How many numbers to be summarized  (up to 50) ";N

11122 IF N>50 THEN PRINT IDE$:GOTO 11900

11124 PRINT"     Key individual numbers:"

11125 FOR I=1 TO N

11126 PRINT TAB(10)I ;

11127 INPUT". number:  ";  C#(I)

11129 NEXT I

11150 CLS:PRINT:PRINT"RESULT:":PRINT

11170 FOR I=1 TO N

11171 PRINT TAB(10)I;". number ";TAB(25)"+ "C#(I)

11173 NEXT I

11174 C#=0

11175 FOR I=1 TO N:C#=C#+C#(I):NEXT I

11176 PRINT:PRINT TAB(11)"S u m      = ";TAB(27)C#:GOTO 11900

11200 PRINT"INPUT DATA:"

11203 INPUT"     basic number                                   ";BN#

11221 INPUT"     How many numbers to be subtracted (up to 50)   ";N

11222 IF N>50 THEN PRINT IDE$:GOTO 11900

11224 PRINT"     Key individual numbers:"

11225 FOR I=1 TO N

11226 PRINT TAB(10)I ;

11227 INPUT". number:  ";C#(I)

11228 NEXT I

11250 CLS:PRINT:PRINT"RESULT:":PRINT

11260 PRINT"       Basic number:      "BN#:PRINT

11270 FOR I=1 TO N

11271 PRINT TAB(10)I;". number ";TAB(25)"- "C#(I)

11273 NEXT I

11274 C#=0

11275 FOR I=1 TO N:C#=C#+C#(I):NEXT I

11276 PRINT:PRINT TAB(11)"R e s t       =";TAB(27)BN#-C#:GOTO 11900

11300 PRINT"INPUT DATA:"

11320 INPUT"     basic multiplier number                       ";BN#

11321 INPUT"     How many numbers to be processed (up to 50)   ";N

11322 IF N>50 THEN PRINT IDE$:GOTO 11900

11324 PRINT"     Key individual numbers to be multiplied:"

11325 FOR I=1 TO N

11326 PRINT TAB(10)I ;

11327 INPUT". number:   ";C#(I)

11328 NEXT I

11350 CLS:PRINT:PRINT"RESULT:":PRINT

11352 PRINT TAB(10)"Basic multiplier number "BN#:PRINT

11370 FOR I=1 TO N

11371 PRINT TAB(10)I;". number  ";TAB(30)C#(I);" x "BN#;TAB(55)" = "BN#*C#(I)

11373 NEXT I:GOTO 11900

11400 PRINT"INPUT DATA:"

11420 INPUT"     basic dividing number                       ";BN#

11421 INPUT"     How many numbers to be processed (up to 50) ";N

11422 IF N>50 THEN PRINT IDE$:GOTO 11900

11424 PRINT"     Key individual numbers:"

11425 FOR I=1 TO N

11426 PRINT TAB(10)I ;

11427 INPUT". number:   ";C#(I)

11428 NEXT I

11450 CLS:PRINT:PRINT"RESULT:":PRINT

11452 PRINT TAB(10)"Basic dividing number "BN#:PRINT

11470 FOR I=1 TO N

11471 PRINT TAB(2)I;". number  ";TAB(22)C#(I);" / "BN#;TAB(50)" = ";

11472 PRINT USING"##########.##########";(C#(I)/BN#)

11475 NEXT I:GOTO 11900

11500 PRINT"INPUT DATA:"

11520 INPUT"     exponent number                                    ";BN#

11521 INPUT"     How many base numbers to be processed (up to 50)   ";N

11522 IF N>50 THEN PRINT IDE$:GOTO 11900

11524 PRINT"     Key individual numbers:"

11525 FOR I=1 TO N

11526 PRINT TAB(10)I ;

11527 INPUT". number:   ";C#(I)

11528 NEXT I

11550 CLS:PRINT:PRINT"RESULT:":PRINT

11552 PRINT TAB(10)"Exponent number: "BN#:PRINT

11570 FOR I=1 TO N

11571 PRINT TAB(10)I;". number   ";TAB(30)C#(I);" ^ "BN#;TAB(50)" = "(C#(I))^BN#

11573 NEXT I:GOTO 11900

11600 PRINT"INPUT DATA:"

11619 'INPUT"     square root number                              ";BN#

11621 INPUT"     How many base numbers to be processed (up to 50) ";N

11622 IF N>50 THEN PRINT IDE$:GOTO 11900

11624 PRINT"     Key individual numbers:"

11625 FOR I=1 TO N

11626 PRINT TAB(10)I ;

11627 INPUT". number:   ";C#(I)

11628 NEXT I

11650 CLS:PRINT:PRINT"RESULT:":PRINT

11652 'PRINT"square root number: 2":';BN#:PRINT

11670 PRINT:FOR I=1 TO N

11671 PRINT TAB(10)I;". number ";TAB(25)C#(I);TAB(35)"square root value  = "USING"######.######";SQR(C#(I))

11673 NEXT I:GOTO 11900

11900 A$=INKEY$:IF A$="" THEN GOTO 11900

11901 N=0:C#=0:BN=0:

11982 CLS:INPUT"Do you want to repeat this subprogramme, yes(y) or no(n) ";R$

11983 IF R$="y" OR R$="n" THEN GOTO 11984 ELSE 11990

11984 IF R$="y" THEN GOTO 11000 ELSE 11990

11990 RETURN

11995 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

12000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

12002 IF Z$="y" OR Z$="n" THEN GOTO 12010 ELSE 12030

12010 IF Z$="y" THEN GOTO 12020 ELSE 12030

12020 RUN"EPIZ40MM.KOU"

12030 SYSTEM

 

       14-Annex II - Other selected statistical and economic methods

 

 

5 ON ERROR GOTO 16995

7 IDM$="Input data missing !"

8 IDE$="Input data error !"

10 PRINT"EPIZ4014.KOU":REM:6/9/2002

15 e$="EPIZOO, ver.4.0,":v$=DATE$

20 CLS:PRINT"EPIZOO, ver. 4.0";TAB(70)v$

30 PRINT TAB(10)"14-ANNEX II - OTHER SELECTED STATISTICAL AND ECONOMIC METHODS"

50 PRINT TAB(10)"============================================================="

500 PRINT TAB(12)"M E N U   O F   SU B P R O G R A M M E S"

510 PRINT TAB(10)"1-Test of the difference between two proportions"

520 PRINT TAB(10)"2-Test of the difference between two arithmetic means"

530 PRINT TAB(10)"3-Test of the difference in means of two small-sized samples"

540 PRINT TAB(10)"4-Test of matched comparison between different values in pairs"

550 PRINT TAB(10)"5-Confidence intervals estimates for population mean"

560 PRINT TAB(10)"6-Confidence intervals estimates for population proportion"

570 PRINT TAB(10)"7-Confidence intervals for the difference between means"

580 PRINT TAB(10)"8-Confidence intervals for the difference between proportions"

590 PRINT TAB(10)"9-Table of Student's 't' critical values"

600 PRINT TAB(10)"10-Veterinary service cost and animal population/production values"

601 PRINT TAB(10)"11-Conversion between metric and Anglo-Saxon measures"

602 PRINT TAB(10)"12-Analysis of critical point of production economic efficiency"

603 PRINT TAB(10)"13-Application of interest, discount and inflation rate"

604 PRINT TAB(10)"14-Conversion between national currencies' values"

605 PRINT TAB(10)"15-Model of budget for animal health programme - I"

606 PRINT TAB(10)"16-Model of budget for animal health programme - II":PRINT

610 PRINT TAB(10)"17-E N D  of this group of subprogrammes"

630 PRINT

640 GOTO 690

644 A$=INKEY$:IF A$="" THEN GOTO 644

645 CLS

650 INPUT"Do you want to continue with this group of subprogrammes, yes(y) or no(n) ";W$

651 IF W$="y" OR W$="n" THEN GOTO 660 ELSE 17000

660 IF W$="y" THEN GOTO 20 ELSE GOTO 17000

670 PRINT

690 INPUT"         Enter choice number: ",CH

695 IF CH=1 OR CH=2 OR CH=3 OR CH=4 OR CH=5 OR CH=6 OR CH=7 OR CH=8 OR CH=9 OR CH=10 OR CH=11 OR CH=12 OR CH=13 OR CH=14 OR CH=15 OR CH=16 OR CH=17 THEN GOTO 700 ELSE 650

700 ON CH GOSUB 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000,13000,14000,15000,16000,17000

800 GOTO 645

1000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.1-TEST OF THE DIFFERENCE BETWEEN TWO PROPORTIONS"

1005 PRINT"==================================================="

1010 PRINT TAB(6)"(sample proportions obtained in large samples)             (Ref.: Spiegel)"

1200 PRINT:PRINT"INPUT DATA:":PRINT

1201 INPUT"  Do you know which population has major proportion, yes(y) or no(n) ";R$

1202 IF R$="y" OR R$="n" THEN GOTO 1203 ELSE PRINT IDE$:GOTO 1980

1203 IF R$="y" THEN 1210 ELSE 1220

1210 PRINT:INPUT"  number of animals of the population with  m a j o r  proportion ";N1

1215 INPUT"  number of animals of the population with  m i n o r  proportion ";N2

1216 IF N1=0 OR N2=0 THEN PRINT IDM$:GOTO 1980 ELSE 1223

1220 PRINT:INPUT"  number of animals of the first population   ";N1

1221 INPUT"  number of animals of the second population  ";N2

1222 IF N1=0 OR N2=0 THEN PRINT IDM$:GOTO 1980 ELSE 1223

1223 PRINT

1224 PRINT"  absolute (a) or relative - proportion( r) or percentage (p)"

1225 INPUT"                                               numbers to be used ";U$

1226 IF U$="a" OR U$="r" OR U$="p" THEN GOTO 1228 ELSE PRINT IDE$:GOTO 1980

1228 PRINT

1229 IF U$="a" THEN GOTO 1235 ELSE 1230

1230 IF U$="r" THEN GOTO 1250 ELSE 1232

1232 IF U$="p" THEN GOTO 1280

1235 INPUT"  first population: number of animals of a given characteristic   ";P1

1240 INPUT"  second population: number of animals of a given characteristic  ";P2:PRINT

1241 IF P1=0 OR P2=0 THEN PRINT IDM$:GOTO 1980 ELSE 1300

1250 INPUT"  first population: proportion of animals of a given characteristic  ";R1

1251 INPUT"  second population: proportion of animals of a given characteristic ";R2:PRINT

1252 IF R1=0 OR R2=0 THEN PRINT IDM$:GOTO 1980 ELSE 1255

1255 P1=R1*N1:P2=R2*N2:GOTO 1300

1280 INPUT"  first population: % of animals of a given characteristic        ";O1

1281 INPUT"  second population: % of animals of a given characteristic       ";O2:PRINT

1282 IF O1=0 OR O2=0 THEN PRINT IDM$:GOTO 1980 ELSE 1285

1285 P1=O1*N1/100:P2=O2*N2/100:GOTO 1300

1300 IF R$="y" AND P1<P2 THEN GOTO 1301 ELSE 1305

1301 PRINT:PRINT"Error !"

1302 PRINT" The proportion of the first population must be major than the second one !":GOTO 1200

1305 LET D=(P1/N1-P2/N2)

1306 LET PR=(P1+P2)/(N1+N2)

1307 LET F=(PR*(1-PR)*(1/N1+1/N2))

1308 LET G=SQR(F)

1310 LET Z=D/G

1400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

1401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

1403 IF I$="m" THEN GOTO 10

1404 IF I$="c" THEN GOTO 1000

1406 IF I$=CHR$(13) THEN GOTO 1500

1500 CLS:PRINT:PRINT"RESULT:":PRINT

1510 PRINT:PRINT TAB(6)"Difference between proportions of two populations = ";USING"####.####";D

1512 PRINT

1515 PRINT TAB(6)"Value of statistical test 'z' =";USING"###.####";Z:PRINT

1520 IF R$="y" THEN GOTO 1600 ELSE 1630

1600 IF Z=<1.28 OR Z<-1.28 THEN GOTO 1690 ELSE 1605

1603 'IF Z=>1.28 OR Z>-1.28 THEN GOTO 1605

1605 IF Z=<1.64 OR Z<-1.64 THEN GOTO 1700 ELSE 1615

1615 IF Z<2.33 OR Z<-2.33 THEN GOTO 1710 ELSE 1620

1620 IF Z=>2.33 OR Z>-2.33 THEN GOTO 1720

1621 REM:

1630 IF Z=<1.64 OR Z<-1.64 THEN GOTO 1690 ELSE 1640

1640 IF Z=<1.96 OR Z<-1.96 THEN GOTO 1700 ELSE 1660

1650 'IF Z=>1.96 OR Z>-1.96 THEN GOTO 1660

1660 IF Z=<2.58 OR Z<-2.58 THEN GOTO 1710 ELSE 1670

1670 IF Z=>2.58 OR Z>-2.58 THEN GOTO 1720 ELSE 1980

1690 PRINT:PRINT TAB(6)"The difference has not statistical significance.":GOTO 1980

1700 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.1 level of significance only,"

1701 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.1 probability"

1702 PRINT TAB(6)"of being wrong.":GOTO 1980

1710 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.05 level of significance,"

1711 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.05 probability"

1712 PRINT TAB(6)"of being wrong."::GOTO 1980

1720 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.01 level of significance,"

1721 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.01 probability"

1722 PRINT TAB(6)"of being wrong.

1980 A$=INKEY$:IF A$="" THEN GOTO 1980

1990 RETURN

2000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.2-TEST OF THE DIFFERENCE BETWEEN TWO ARITHMETIC MEANS"

2010 PRINT"========================================================"

2011 PRINT"(sample means obtained in large samples)                        (Ref.: Spiegel)"

2200 PRINT:PRINT"INPUT DATA:":PRINT

2230 INPUT"number of variables of population with  m a j o r  arithmetic mean ";XT

2240 INPUT"number of variables of population with  m i n o r  arithmetic mean ";AN:PRINT

2250 INPUT"        arithmetic mean of the first population         ";M1

2255 INPUT"        arithmetic mean of the second population        ";M2:PRINT

2260 IF XT=0 OR AN=0 OR M1=0 OR M2=0 THEN PRINT IDM$:GOTO 2980 ELSE 2261

2261 IF M1<M2 THEN GOTO 2262 ELSE 2270

2262 PRINT:PRINT"Error ! The first population must have major mean ! New input !":PRINT:GOTO 2230

2270 INPUT"              standard deviation of the first population      ";S1

2280 INPUT"              standard deviation of the second population     ";S2

2285 IF S1=0 OR S2=0 THEN PRINT IDM$:GOTO 2980

2286 'PRINT:PRINT IDM$:GOTO 2980

2290 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

2291 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

2292 IF I$="m" THEN GOTO 10

2293 IF I$="c" THEN GOTO 2000

2294 IF I$=CHR$(13) THEN GOTO 2300

2300 LET A=(XT-1)*S1^2

2310 LET B=(AN-1)*S2^2

2320 LET C=XT+AN-2

2330 LET D=1/XT+1/AN

2340 LET E=(A+B)/C*D

2350 LET F=SQR(E)

2360 LET G=M1-M2

2370 LET Z=G/F

2500 CLS:PRINT:PRINT"RESULT:":PRINT

2510 PRINT:PRINT TAB(8)"Difference between two arithmetic means       =  ";USING"###.####";G:PRINT

2520 PRINT TAB(8)"Standard deviation of the difference in means =  ";USING"###.####";F:PRINT

2530 PRINT TAB(8)"Statistical test 'z'                          =  ";USING"###.####";Z:PRINT

2535 PRINT

2540 PRINT"     Do you want to demonstrate if one mean is major than another"

2551 PRINT"                                                 (one-sided test) - (o) or"

2552 PRINT"     if one mean is major or minor than the other one"

2553 INPUT"                                                 (two-sided test) - (t)   ";Q$:PRINT

2554 IF Q$="o" OR Q$="t" THEN GOTO 2555 ELSE PRINT IDE$:GOTO 2980

2555 IF Q$="o" THEN GOTO 2600 ELSE 2625

2600 IF Z=>2.33 OR Z=<-2.33 THEN GOTO 2720 ELSE 2610

2610 IF Z=>1.64 OR Z=<-1.64 THEN GOTO 2710 ELSE 2620

2620 IF Z=>1.28 OR Z=<-1.28 THEN GOTO 2700 ELSE 2630

2625 IF Z=>2.58 OR Z=<-2.58 THEN GOTO 2720 ELSE 2626

2626 IF Z=>1.96 OR Z=<-1.96 THEN GOTO 2710 ELSE 2627

2627 IF Z=>1.64 OR Z=<-1.64 THEN GOTO 2700 ELSE 2630

2630 PRINT:PRINT"       The difference has not statistical significance.":GOTO 2980

2700 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.1 level of significance only,"

2701 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.1 probability"

2702 PRINT TAB(6)"of being wrong.":GOTO 2980

2710 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.05 level of significance,"

2711 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.05 probability"

2712 PRINT TAB(6)"of being wrong."::GOTO 2980

2720 PRINT:PRINT TAB(6)"We can reject null hypothesis at the 0.01 level of significance,"

2721 PRINT TAB(6)"i.e. we can conclude that the difference is with a 0.01 probability"

2722 PRINT TAB(6)"of being wrong.

2980 A$=INKEY$:IF A$="" THEN GOTO 2980

2990 RETURN

3000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.3-TEST OF THE DIFFERENCE IN MEANS OF TWO SMALL-SIZED SAMPLES"

3010 PRINT"==============================================================="

3025 PRINT"                                                            (Ref.: Putt et al.)":PRINT

3030 PRINT"(There must be at least five cases in both samples for the test to be valid !)"

3200 PRINT:PRINT"INPUT DATA:":PRINT

3230 INPUT"number of animals of the first sample with  m a j o r  mean  ";N1

3240 INPUT"number of animals of the second sample with  m i n o r  mean ";N2:PRINT

3250 INPUT"             arithmetic mean of the first sample  ";MA1

3260 INPUT"             arithmetic mean of the second sample ";MA2:PRINT

3261 IF MA1<MA2 THEN GOTO 3262 ELSE 3270

3262 PRINT:PRINT"Error ! The first population must have major mean ! ":PRINT:GOTO 3980

3270 INPUT"                     standard deviation of the first sample ";DS1

3280 INPUT"                     standar deviation of the second sample ";DS2

3281 IF N1=0 OR N2=0 OR MA1=0 OR MA2=0 OR DS1=0 OR DS2=0 THEN PRINT IDM$:GOTO 3980 ELSE 3400

3400 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

3401 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

3402 IF I$="m" THEN GOTO 10

3403 IF I$="c" THEN GOTO 3000

3404 IF I$=CHR$(13) THEN GOTO 3500

3500 CLS:PRINT:PRINT"RESULT:":PRINT

3510 DMA=MA1-MA2

3520 A=(N1-1)*DS1^2+(N2-1)*DS2^2

3530 B=1/N1+1/N2

3540 C=N1+N2-2

3550 D=A*B/C

3560 E=SQR(D)

3570 Z=DMA/E

3600 PRINT:PRINT"   Difference in two means                              = ";USING"######.####";DMA

3601 PRINT

3610 PRINT"   Standard deviation of the difference in the means      = ";USING"######.####";E

3615 PRINT

3620 PRINT"   Statistical test 't' of the difference                 =    ";USING"###.####";Z:PRINT

3630 PRINT"                        Degrees of freedom                =    "C:PRINT

3640 PRINT

3660 PRINT:PRINT"   See the level of statistical significance":PRINT

3661 INPUT"         in the table of critical values of Student's 't'!      Key ENTER !",Q

3670 ON Q GOTO 3671

3671 GOTO 9000

3980 A$=INKEY$:IF A$="" THEN GOTO 3980

3990 RETURN

4000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.4-TEST OF MATCHED COMPARISON BETWEEN DIFFERENT VALUES IN PAIRS"

4010 PRINT"================================================================="

4015 PRINT TAB(61)"(Ref.: Putt et al.)"

4200 PRINT:PRINT"INPUT DATA:":PRINT

4210 INPUT"total number of matched pairs of  d i f f e r e n t  values (2 up to 11 !) ";N

4211 IF N=<1 OR N>11 THEN PRINT IDE$:GOTO 4980

4220 PRINT:PRINT TAB(10)"Listf data - variables X,Y (must be major than 0) :":PRINT

4240 FOR I=1 TO N

4250 PRINT TAB(15)I;"pair: ";

4251 INPUT X(I),Y(I)

4270 IF X(I)=0 OR Y(I)=0 THEN GOTO 4290 ELSE 4280

4280 NEXT I:GOTO 4300

4290 PRINT IDM$:GOTO 4980

4300 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

4301 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

4302 IF I$="m" THEN GOTO 10

4303 IF I$="c" THEN GOTO 4000

4304 IF I$=CHR$(13) THEN GOTO 4500

4500 CLS:PRINT:PRINT"RESULT:":PRINT

4510 D=0

4520 FOR I=1 TO N

4530 D=D+X(I)-Y(I)

4540 NEXT I

4547 MA=D/N

4548 IF MA<0 THEN MA=-MA

4550 PRINT"     Sample mean of the differences              = ";USING"######.####";MA

4555 V1=0

4560 FOR I=1 TO N

4565 D(I)=X(I)-Y(I)

4566 IF D(I)<MA THEN LET Z=-1 ELSE Z=+1

4570 V1=V1+(Z*(D(I)-MA))^2

4580 NEXT I

4585 V=V1/N

4586 DE=SQR(V)

4587 REM:IF MA<0 THEN LET W=-1 ELSE W=+1

4588 PRINT

4591 PRINT"     Sample standard deviation of the diferences = ";USING"######.####";DE:PRINT

4592 IF D=N THEN N=N+1

4593 IF MA<0 THEN LET W=-1 ELSE W=+1

4595 S=SQR(N)

4596 T=MA*W/(DE/S)

4610 PRINT:PRINT"     Statistical test `t`                        =      ";USING"#.##";T

4620 PRINT:PRINT"                 Degrees of freedom              =     "N-1

4625 ERASE X,Y

4626 X=0:Y=0

4630 PRINT:PRINT

4635 PRINT"     See the level of statistical significance":PRINT

4636 INPUT"        in the table of critical values of Student's 't'!    Key ENTER !",Q

4637 ON Q GOTO 4638

4638 GOTO 9000

4980 A$=INKEY$:IF A$="" THEN GOTO 4980

4990 RETURN

5000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.5-CONFIDENCE INTERVALS ESTIMATES FOR POPULATION MEAN"

5010 PRINT"======================================================="

5110 PRINT"                                                                (Ref.: Spiegel)"

5200 PRINT"INPUT DATA:":PRINT

5210 INPUT"     s a m p l e   size                                  ";N:PRINT

5220 INPUT"     estimate of the true population mean                ";MA:PRINT

5230 INPUT"     estimate of the true standard deviation             ";DE:PRINT

5231 IF N=0 OR MA=0 OR DE=0 THEN PRINT IDM$:GOTO 5980

5300 PRINT"     Is the sample of a population whith known"

5310 INPUT"               total number of animals, yes(y) or no(n) ";P$:PRINT

5311 IF P$="y"OR P$="n" THEN GOTO 5320 ELSE PRINT IDE$:GOTO 5980

5320 IF P$="y" THEN GOTO 5325 ELSE 5331

5325 INPUT"     t o t a l   size  of the animal population         ";NP

5326 IF NP=0 THEN PRINT IDM$:GOTO 5980 ELSE 5331

5331 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

5332 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

5333 IF I$="m" THEN GOTO 10

5334 IF I$="c" THEN GOTO 5000

5335 IF I$=CHR$(13) THEN GOTO 5339

5339 IF P$="n" THEN GOTO 5400 ELSE 5340

5340 LET K=(NP-N)/(NP-1)

5350 LET L=SQR(K)

5360 LET INF=L*DE/SQR(N)

5370 GOTO 5410

5400 LET INF=DE/SQR(N)

5410 LET A=MA-1.645*INF

5420 LET B=MA+1.645*INF

5430 LET C=MA-1.96*INF

5440 LET D=MA+1.96*INF

5450 LET E=MA-2.58*INF

5460 LET F=MA+2.58*INF

5500 CLS:PRINT:PRINT"RESULT:":PRINT

5510 PRINT:PRINT"   Estimates of the confidence intervals for population mean lie at:":PRINT

5520 REM:PRINT"the population mean of";USING"######.####";MA;

5521 REM:PRINT TAB(30)"with standard deviation of";USING"######.####";DE;

5530 REM:PRINT" lies:"

5531 PRINT

5540 PRINT TAB(10)" 90 %  confidence between     ";USING"######.####";A;

5542 PRINT"   and";USING"######.####";B

5544 PRINT

5550 PRINT TAB(10)" 95 %  confidence between     ";USING"######.####";C;

5552 PRINT"   and";USING"######.####";D

5554 PRINT

5560 PRINT TAB(10)" 99 %  confidence between     ";USING"######.####";E;

5562 PRINT"   and";USING"######.####";F:PRINT

5570 PRINT:PRINT:PRINT"          ( The 95% confidence limits = "USING"#####.####";MA;

5571 PRINT"  +- "USING"#####.####";1.96*INF;

5572 PRINT" )"

5980 A$=INKEY$:IF A$="" THEN GOTO 5980

5990 RETURN

6000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.6-CONFIDENCE INTERVALS ESTIMATES FOR POPULATION PROPORTIONS"

6010 PRINT"=============================================================="

6100 PRINT"                                                                (Ref.: Spiegel)"

6200 PRINT:PRINT"INPUT DATA:":PRINT

6210 INPUT"     s a m p l e   size                                            ";N:PRINT

6220 PRINT"     estimate of the true population  p r o p o r t i o n"

6221 INPUT"                         (i.e. a number between >0 and <1 !!)      ";P:PRINT

6222 IF P=>1 THEN PRINT"Input error ! Proportion means a value minor than 1 !":GOTO 6980 ELSE 6228

6228 IF N=0 OR P=0 THEN PRINT IDM$:GOTO 6980

6230 PRINT"     Is the sample of a population with known"

6240 INPUT"                          total number of animals, yes(y) or no(n) ";P$:PRINT

6251 IF P$="y"OR P$="n" THEN GOTO 6252 ELSE PRINT IDE$:GOTO 6980

6252 IF P$="y" THEN GOTO 6260 ELSE 6270

6260 INPUT"     t o t a l  size of the animal population                      ";NP

6261 IF NP=0 THEN PRINT IDM$:GOTO 6980 ELSE 6270

6270 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

6271 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

6272 IF I$="m" THEN GOTO 10

6273 IF I$="c" THEN GOTO 6000

6274 IF I$=CHR$(13) THEN GOTO 6330

6330 IF P$="n" THEN GOTO 6400

6340 LET K=(NP-N)/(NP-1)

6350 LET L=SQR(K)

6360 LET INF=(P*(1-P)/N)*L

6370 GOTO 6420

6400 LET Q=1-P:LET O=(P*Q)/N

6410 LET INF=SQR(O)

6420 LET A=P-1.645*INF

6430 LET B=P+1.645*INF

6440 LET C=P-1.96*INF

6450 LET D=P+1.96*INF

6460 LET E=P-2.58*INF

6470 LET F=P+2.58*INF

6500 CLS:PRINT:PRINT"RESULT:":PRINT

6510 PRINT:PRINT"  Estimates of the confidence intervals for true proportion lie at:":PRINT

6520 REM:PRINT"the true proportion =";USING"###.####";P;

6521 REM:PRINT" and the sample size =";USING"#######";N;

6530 REM:PRINT" lies at:"

6540 PRINT:PRINT TAB(10)" 90 % confidence between";

6542 PRINT TAB(40)USING"######.####";A;

6543 PRINT"   and";USING"######.####";B

6544 PRINT

6550 PRINT TAB(10)" 95 % confidence between";

6552 PRINT TAB(40)USING"######.####";C;

6553 PRINT"   and";USING"######.####";D

6554 PRINT

6560 PRINT TAB(10)" 99 % confidence between";

6562 PRINT TAB(40)USING"######.####";E;

6563 PRINT"   and";USING"######.####";F:PRINT

6570 PRINT:PRINT:PRINT"          ( The 95% confidence limits = "USING"#####.####";P;

6571 PRINT"  +- "USING"#####.####";1.96*INF;

6572 PRINT" )"

6980 A$=INKEY$:IF A$="" THEN GOTO 6980

6990 RETURN

7000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.7-CONFIDENCE INTERVALS FOR THE DIFFERENCE BETWEEN TWO POPULATION MEANS"

7010 PRINT"========================================================================="

7200 PRINT"                                                                (Ref.: Spiegel)":PRINT

7201 PRINT:PRINT"INPUT DATA:":PRINT

7210 INPUT"     size of the first sample (with  m a j o r  mean !)       ";N1

7220 INPUT"     size of the second sample (with  m i n o r  mean !)      ";N2:PRINT

7230 INPUT"               arithmetic mean of the first sample            ";MA1

7240 INPUT"               arithmetic mean of the second sample           ";MA2:PRINT

7241 IF MA1<MA2 THEN GOTO 7242 ELSE 7250

7242 PRINT:PRINT"Error ! The first population must have major mean ! New input !":GOTO 7210

7250 INPUT"                      standard deviation of the first sample  ";DE1

7260 INPUT"                      standard deviation of the second sample ";DE2

7265 IF N1=0 OR N2=0 OR MA1=0 OR MA2=0 OR DE1=0 OR DE2=0 THEN PRINT IDM$:GOTO 7980

7270 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

7271 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

7272 IF I$="m" THEN GOTO 10

7273 IF I$="c" THEN GOTO 7000

7274 IF I$=CHR$(13) THEN GOTO 7300

7300 LET C1=DE1^2/N1

7310 LET C2=DE2^2/N2

7320 LET K=C1+C2

7330 LET L=SQR(K)

7400 LET A=MA1-MA2-1.645*L

7410 LET B=MA1-MA2+1.645*L

7420 LET C=MA1-MA2-1.96*L

7430 LET D=MA1-MA2+1.96*L

7440 LET E=MA1-MA2-2.58*L

7450 LET F=MA1-MA2+2.58*L

7500 CLS:PRINT:PRINT"RESULT:":PRINT

7505 PRINT:PRINT"  Difference between means = ";USING"######.####";MA1-MA2:PRINT

7510 PRINT:PRINT"  Estimates of the confidence intervals for"

7520 PRINT"        the true difference between two population means lie at:":PRINT

7530 PRINT

7540 PRINT TAB(10)" 90 %  confidence between";

7542 PRINT TAB(40)USING"######.####";A;

7543 PRINT"   and";USING"######.####";B

7544 PRINT

7550 PRINT TAB(10)" 95 %  confidence between";

7552 PRINT TAB(40)USING"######.####";C;

7553 PRINT"   and";USING"######.####";D

7554 PRINT

7560 PRINT TAB(10)" 99 %  confidence between";

7562 PRINT TAB(40)USING"######.####";E;

7563 PRINT"   and";USING"######.####";F:PRINT

7570 PRINT:PRINT"          ( The 95% confidence limits = "USING"#####.####";MA1-MA2;

7571 PRINT"  +- "USING"#####.####";1.96*L;

7572 PRINT" )"

7980 A$=INKEY$:IF A$="" THEN GOTO 7980

7990 RETURN

8000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.8-CONFIDENCE INTERVALS FOR THE DIFFERENCE BETWEEN PROPORTIONS"

8010 PRINT"================================================================     "

8200 PRINT"                                                                (Ref.: Spiegel)"

8205 PRINT"INPUT DATA:"

8210 PRINT:INPUT" size of the first sample (with proportion of  m a j o r  value !)  ";N1

8220 INPUT" size of the second sample (with proportion of  m i n o r  value !) ";N2:PRINT

8230 PRINT:PRINT" proportions (number between >0 and 1 !!)":PRINT

8235 INPUT"                          in the first sample (population)          ";P1

8240 INPUT"                          in the second sample (population)         ";P2:PRINT

8242 IF N1=0 OR N2=0 OR P1=0 OR P2=0 OR P1>1 OR P2>1 THEN PRINT IDE$:GOTO 8980

8245 IF P2>P1 THEN GOTO 8246 ELSE 8270

8246 PRINT"Error ! First sample must be of major proportion ! ":GOTO 8980

8270 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

8271 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

8272 IF I$="m" THEN GOTO 10

8273 IF I$="c" THEN GOTO 8000

8274 IF I$=CHR$(13) THEN GOTO 8300

8300 LET C1=P1*(1-P1)/N1

8310 LET C2=P2*(1-P2)/N2

8320 LET K=C1+C2

8330 LET L=SQR(K)

8400 LET A=P1-P2-1.645*L

8410 LET B=P1-P2+1.645*L

8420 LET C=P1-P2-1.96*L

8430 LET D=P1-P2+1.96*L

8440 LET E=P1-P2-2.58*L

8450 LET F=P1-P2+2.58*L

8500 CLS:PRINT:PRINT"RESULT:":PRINT

8505 PRINT:PRINT"    Difference between the proportions = ";USING"##.####";P1-P2:PRINT

8510 PRINT:PRINT"    Estimates of the confidence intervals for"

8520 PRINT"        true difference between two population proportions lie at:"

8530 PRINT:PRINT

8540 PRINT TAB(10)" 90 %  confidence between ";

8542 PRINT TAB(40)USING"##.####";A;

8543 PRINT"   and ";USING"##.####";B

8544 PRINT

8550 PRINT TAB(10)" 95 % confidence between ";

8552 PRINT TAB(40)USING"##.####";C;

8553 PRINT"   and ";USING"##.####";D

8554 PRINT

8560 PRINT TAB(10)" 99 % confidence between ";

8562 PRINT TAB(40)USING"##.####";E;

8563 PRINT"   and ";USING"##.####";F:PRINT

8570 PRINT:PRINT"        ( The 95% confidence limits  = "USING"#####.####";P1-P2;

8571 PRINT"  +-"USING"#####.####";1.96*L;

8572 PRINT" )"

8980 A$=INKEY$:IF A$="" THEN GOTO 8980

8990 RETURN

9000 CLS:PRINT"     14.9-TABLE OF CRITICAL VALUES FOR  S T U D E N T'S  't'  DISTRIBUTION"

9305 PRINT"     ====================================================================="

9306 REM:Ref. Putt, p.62

9310 PRINT TAB(6)"Degree of";TAB(22)"One-sided      Test";TAB(52)"Two-sided     Test"

9320 PRINT TAB(6)"Freedom";TAB(20)"------------------------";TAB(50)"------------------------"

9330 PRINT TAB(20)"5%";TAB(30)"1%";TAB(40)"0.1%";TAB(50)"5%";TAB(60)"1%";TAB(70)"0.1%"

9340 PRINT TAB(6)"----------------------------------------------------------------------"

9350 PRINT TAB(7)"1";TAB(20)"6.31";TAB(30)"31.8";TAB(40)"318";TAB(50)"12.7";TAB(60)"63.7";TAB(70)"637"

9351 PRINT TAB(7)"2";TAB(20)"2.92";TAB(30)"6.96";TAB(40)"22.3";TAB(50)"4.30";TAB(60)"9.92";TAB(70)"31.61"

9352 PRINT TAB(7)"3";TAB(20)"2.35";TAB(30)"4.54";TAB(40)"10.2";TAB(50)"3.18";TAB(60)"5.84";TAB(70)"12.88"

9354 PRINT TAB(7)"4";TAB(20)"2.13";TAB(30)"3.75";TAB(40)"7.17";TAB(50)"2.78";TAB(60)"4.60";TAB(70)"8.61"

9355 PRINT TAB(7)"5";TAB(20)"2.02";TAB(30)"3.36";TAB(40)"5.89";TAB(50)"2.57";TAB(60)"4.03";TAB(70)"6.87"

9356 PRINT TAB(7)"6";TAB(20)"1.94";TAB(30)"3.14";TAB(40)"5.21";TAB(50)"2.45";TAB(60)"3.71";TAB(70)"5.96"

9357 PRINT TAB(7)"7";TAB(20)"1.89";TAB(30)"3.00";TAB(40)"4.79";TAB(50)"2.36";TAB(60)"3.50";TAB(70)"5.41"

9358 PRINT TAB(7)"8";TAB(20)"1.86";TAB(30)"2.90";TAB(40)"4.50";TAB(50)"2.31";TAB(60)"3.36";TAB(70)"5.04"

9359 PRINT TAB(7)"9";TAB(20)"1.83";TAB(30)"2.81";TAB(40)"4.30";TAB(50)"2.26";TAB(60)"3.25";TAB(70)"4.78"

9360 PRINT TAB(7)"10";TAB(20)"1.81";TAB(30)"2.76";TAB(40)"4.14";TAB(50)"2.23";TAB(60)"3.17";TAB(70)"4.59"

9365 PRINT TAB(7)"15";TAB(20)"1.75";TAB(30)"2.60";TAB(40)"3.73";TAB(50)"2.13";TAB(60)"2.95";TAB(70)"4.07"

9370 PRINT TAB(7)"20";TAB(20)"1.72";TAB(30)"2.53";TAB(40)"3.55";TAB(50)"2.09";TAB(60)"2.85";TAB(70)"3.85"

9380 PRINT TAB(7)"30";TAB(20)"1.70";TAB(30)"2.46";TAB(40)"3.39";TAB(50)"2.04";TAB(60)"2.75";TAB(70)"3.65"

9390 PRINT TAB(7)"40";TAB(20)"1.68";TAB(30)"2.42";TAB(40)"3.31";TAB(50)"2.02";TAB(60)"2.70";TAB(70)"3.55"

9410 PRINT TAB(7)"60";TAB(20)"1.67";TAB(30)"2.39";TAB(40)"  ";TAB(50)"2.00";TAB(60)"2.66";TAB(70)""

9470 PRINT TAB(7)"120";TAB(20)"1.66";TAB(30)"2.36";TAB(40)"";TAB(50)"1.98";TAB(60)"2.62";TAB(70)""

9475 PRINT TAB(7)">120";TAB(20)"1.65";TAB(30)"2.33";TAB(40)""TAB(50)"1.96";TAB(60)"2.58";TAB(70)""

9980 A$=INKEY$:IF A$="" THEN GOTO 9980

9990 RETURN

10000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.10-VETERINARY SERVICE COST AND ANIMAL POPULATION/PRODUCTION VALUES"

10010 PRINT"====================================================================="

10020 PRINT"This subprogramme calculates the ratios of veterinary service cost to"

10022 PRINT"values of animal populations and their production which health"

10023 PRINT"protection and wholesomeness the service is corresponsible for."

10024 PRINT"Both data on the cost must be provided - real, estimated or fictitious !"

10025 PRINT:PRINT"INPUT DATA:":PRINT

10030 INPUT"place/territory           ";TE$

10031 INPUT"period                    ";PE$

10035 INPUT"veterinary service (type) ";VS$

10040 INPUT"monetary units            ";MU$:PRINT

10208 INPUT"veterinary service total cost                      ";A

10210 INPUT"veterinary service net cost (total minus income)   ";B:PRINT

10211 IF (A+B)=0 THEN PRINT IDM$:GOTO 10980 ELSE 10215

10215 INPUT"value of domestic animal populations               ";C

10220 INPUT"value of animal production                         ";D

10225 INPUT"market value of animal production                  ";E

10226 IF (C+D+E)=0 THEN PRINT IDM$:GOTO 10980 ELSE 10227

10227 'A$=INKEY$:IF A$="" THEN GOTO 10227

10290 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

10291 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

10292 IF I$="m" THEN GOTO 10

10293 IF I$="c" THEN GOTO 10000

10294 IF I$=CHR$(13) THEN GOTO 10295

10295 CLS:PRINT"       VETERINARY SERVICE COST AND ANIMAL POPULATION/PRODUCTION VALUES"

10296 PRINT"Place: "TE$;TAB(50)"Period: "PE$

10297 PRINT"Veterinary Service: "VS$;TAB(50)"Monetary Units: "MU$

10298 PRINT"Service Cost: "INT(A+.5);TAB(50)"Service Net cost: "INT(B+.5)

10299 PRINT"Population Value: "C;TAB(50)"Production value: "INT(D+.5)

10300 PRINT"Market Value of animal production: "INT(E+.5):PRINT:PRINT

10390 IF A>0 AND C>0 THEN GOTO 10400 ELSE 10410

10400 PRINT TAB(7)"Ratio service cost/population value              =   "USING"##.######";A/C:PRINT

10405 PRINT"                                                  =  1 : "USING"####.######";C/A:PRINT

10410 IF A>0 AND D>0 THEN GOTO 10411 ELSE 10420

10411 PRINT TAB(7)"Ratio service cost/production value              =   "USING"##.######";A/D:PRINT

10415 PRINT"                                                  =  1 : "USING"####.######";D/A:PRINT

10420 IF A>0 AND E>0 THEN GOTO 10421 ELSE 10430

10421 PRINT TAB(7)"Ratio service cost/production market value       =   "USING"##.######";A/E:PRINT

10425 PRINT"                                                  =  1 : "USING"####.######";E/A:PRINT

10430 IF A>0 AND D>0 AND C>0 THEN GOTO 10431 ELSE 10436

10431 PRINT TAB(7)"Ratio service cost/production+population values  =   "USING"##.######";A/(D+C):PRINT

10435 PRINT"                                                  =  1 : "USING"####.######";(D+C)/A:GOTO 10436

10436 A$=INKEY$:IF A$="" THEN GOTO 10436

10437 CLS:PRINT:PRINT

10438 IF B>0 AND C>0 THEN GOTO 10439 ELSE 10442

10439 PRINT TAB(7)"Ratio service net cost/population value          =   "USING"##.######";B/C:PRINT

10440 PRINT"                                                  =  1 : "USING"####.######";C/B:PRINT

10442 IF B>0 AND D>0 THEN GOTO 10443 ELSE 10450

10443 PRINT TAB(7)"Ratio service net cost/production value          =   "USING"##.######";B/D:PRINT

10445 PRINT"                                                  =  1 : "USING"####.######";D/B:PRINT

10450 IF B>0 AND E>0 THEN GOTO 10451 ELSE 10460

10451 PRINT TAB(7)"Ratio service net cost/production market value   =   "USING"##.######";B/E:PRINT

10455 PRINT"                                                  =  1 : "USING"####.######";E/B:PRINT

10460 IF B>0 AND D>0 AND C>0 THEN GOTO 10461 ELSE 10980

10461 PRINT TAB(7)"Ratio service net cost/production+population values =   "USING"##.######";B/(D+C):PRINT

10615 PRINT"                                                  =  1 : "USING"####.######";(D+C)/B

10980 'A$=INKEY$:IF A$="" THEN GOTO 10980

10990 RETURN

11000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.11-CONVERSION BETWEEN METRIC AND ANGLO-SAXON MEASURES"

11010 PRINT"========================================================"

11020 PRINT

11050 PRINT TAB(6)"MENU:"

11051 PRINT TAB(6)"(for reverse conversion key the number in negative form,"

11054 PRINT TAB(6)"i.e. with the sign of minus: '- ' )."

11056 PRINT

11100 PRINT TAB(15)"1-inches in centimetres"

11102 PRINT TAB(15)"2-feet in metres"

11104 PRINT TAB(15)"3-yards in metres"

11106 PRINT TAB(15)"4-miles in kilometres"

11110 PRINT TAB(15)"5-British pints in litres"

11112 PRINT TAB(15)"6-British gallons in litres"

11115 PRINT TAB(15)"7-American gallons in litres"

11120 PRINT TAB(15)"8-American bushels in litres"

11122 PRINT TAB(15)"9-ounces in grammes"

11125 PRINT TAB(15)"10-pounds in kilogrammes"

11130 PRINT TAB(15)"11-Fahrenheit grades in Celsius grades"

11135 PRINT

11200 INPUT"     Select menu number of the measure to be converted: ",M

11205 PRINT

11210 INPUT"     Value (X) of the measure to be converted           ";V

11220 IF M=0 OR V=0 THEN PRINT IDM$:GOTO 11980

11300 ON M GOTO 11400,11420,11440,11460,11480,11500,11520,11540,11560,11580,11600

11310 ON -M GOTO 11410,11430,11450,11470,11490,11510,11530,11550,11570,11590,11610

11400 X = 2.54*V:GOTO 11620

11410 X = .3937*V:GOTO 11620

11420 X = .304785*V:GOTO 11620

11430 X = 3.281*V:GOTO 11620

11440 X = .914438*V:GOTO 11620

11450 X = 1.0935368*V:GOTO 11620

11460 X = 1.6093*V:GOTO 11620

11470 X = .6214*V:GOTO 11620

11480 X = .568*V:GOTO 11620

11490 X = 1.76056*V:GOTO 11620

11500 X = 4.546*V:GOTO 11620

11510 X = .219974*V:GOTO 11620

11520 X = 3.785*V:GOTO 11620

11530 X = .2642*V:GOTO 11620

11540 X = 35.2383*V:GOTO 11620

11550 X = .0283782*V:GOTO 11620

11560 X = 28.349*V:GOTO 11620

11570 X = .0352746*V:GOTO 11620

11580 X = .45392*V:GOTO 11620

11590 X = 2.20463*V:GOTO 11620

11600 X = .555556*(V-32):GOTO 11620

11610 X = (1.8*V)+32

11620 PRINT

11622 CLS:PRINT:PRINT TAB(5)"RESULT:":PRINT

11624 PRINT TAB(8)USING"#######.####";V;

11625 IF M=1 THEN PRINT"  inches";

11626 IF M=-1 THEN PRINT"  centimetres";

11627 IF M=2 THEN PRINT"  feet";

11628 IF M=-2 THEN PRINT"  metres";

11629 IF M=3 THEN PRINT"  yards";

11630 IF M=-3 THEN PRINT"  metres";

11631 IF M=4 THEN PRINT"  miles";

11632 IF M=-4 THEN PRINT"  kilometres";

11633 IF M=5 THEN PRINT"  British pints";

11634 IF M=-5 THEN PRINT"  litres";

11635 IF M=6 THEN PRINT"  British gallons";

11636 IF M=-6 THEN PRINT"  litres";

11637 IF M=7 THEN PRINT"  American gallons";

11638 IF M=-7 THEN PRINT"  litres";

11639 IF M=8 THEN PRINT"  American bushels";

11640 IF M=-8 THEN PRINT"  litres";

11641 IF M=9 THEN PRINT"  ounces";

11642 IF M=-9 THEN PRINT"  grammes";

11643 IF M=10 THEN PRINT"  pounds";

11644 IF M=-10 THEN PRINT"  kilogrammes";

11645 IF M=11 THEN PRINT"  Fahrenheit grades";

11646 IF M=-11 THEN PRINT"  Celsius grades";

11649 PRINT TAB(40)"= ";USING"#######.####";X;

11650 IF M=1 THEN PRINT"  centimetres"

11651 IF M=-1 THEN PRINT"  inches"

11654 IF M=2 THEN PRINT"  metres"

11655 IF M=-2 THEN PRINT"  feet"

11658 IF M=3 THEN PRINT"  metres"

11659 IF M=-3 THEN PRINT"  yards"

11660 IF M=4 THEN PRINT"  kilometres"

11661 IF M=-4 THEN PRINT"  miles"

11664 IF M=5 THEN PRINT"  litres"

11668 IF M=-5 THEN PRINT"  British pints"

11669 IF M=6 THEN PRINT"  litres"

11672 IF M=-6 THEN PRINT"  British gallons"

11673 IF M=7 THEN PRINT"  litres"

11676 IF M=-7 THEN PRINT"  American gallons"

11677 IF M=8 THEN PRINT"  litres"

11678 IF M=-8 THEN PRINT"  American bushels"

11681 IF M=9 THEN PRINT"  grammes"

11684 IF M=-9 THEN PRINT"  ounces"

11685 IF M=10 THEN PRINT"  kilogrammes"

11688 IF M=-10 THEN PRINT"  pounds"

11689 IF M=11 THEN PRINT"  Celsius grades"

11690 IF M=-11 THEN PRINT"  Fahrenheit grades"

11980 A$=INKEY$:IF A$="" THEN GOTO 11980

11990 RETURN

12000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.12-ANALYSIS OF CRITICAL POINT OF PRODUCTION ECONOMIC EFFICIENCY"

12010 PRINT"==================================================================="

12020 PRINT"(break-even analysis; applicable also for service economic efficiency)"

12021 PRINT"     Given  f o u r  of the following variables:"

12022 PRINT"        fixed costs, sale price per unit, variable cost per unit,"

12023 PRINT"        number of units sold and gross profit,"

12024 PRINT"                       this subprogramme evaluates the remaining variable."

12025 PRINT"     To calculate the  b r e a k - e v e n  values,"

12026 PRINT"                                      let the gross profit equal zero (= 0)."

12027 PRINT

12100 PRINT"INPUT DATA:":PRINT

12101 INPUT"     production unit ";PH$

12102 INPUT"     monetary units "U$:PRINT

12110 PRINT"     S k i p  indicator to be calculated;"

12111 PRINT"                           the other four data must be available !"

12120 PRINT

12130 INPUT"          gross profit (benefit)     ";GP

12140 INPUT"          number of units sold       ";U

12150 INPUT"          price of unit              ";P

12160 INPUT"          total fixed costs          ";F

12170 INPUT"          variable cost per unit     ";V

12171 IF (GP+U+P+F+V)=0 THEN PRINT IDM$:GOTO 12980 ELSE 12180

12180 IF P>0 AND P=<V THEN GOTO 12181 ELSE 12190

12181 PRINT:PRINT" Error ! Price  should be major than variable cost per unit !":GOTO 12980

12190 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

12191 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

12192 IF I$="m" THEN GOTO 10

12193 IF I$="c" THEN GOTO 12000

12194 IF I$=CHR$(13) THEN GOTO 12200

12200 CLS:PRINT"RESULT:":PRINT

12201 PRINT"     Calculation of selected variable for"

12202 PRINT TAB(15)"the analysis of critical point of economic efficiency:":PRINT

12203 PRINT:PRINT"Production unit: "PH$;TAB(45)"Monetary units: "U$:PRINT

12250 IF P>0 AND U>0 AND V>0 AND F>0 THEN GOTO 12340

12252 IF GP=0 THEN GP=.0001

12254 IF GP>0 AND U>0 AND P>0 AND F>0 THEN GOTO 12300

12256 IF GP>0 AND U>0 AND P>0 AND V>0 THEN GOTO 12310

12258 IF GP>0 AND U>0 AND V>0 AND F>0 THEN GOTO 12320

12260 IF GP>0 AND P>0 AND V>0 AND F>0 THEN GOTO 12330

12300 PRINT"Gross profit: "INT(GP+.5);TAB(40)"Number of units sold: "INT(U+.5)

12301 PRINT"Price of unit: "USING"#####.##";P;

12302 PRINT TAB(40)"Total fixed costs: "INT(F+.5):PRINT

12305 PRINT:PRINT TAB(10)"Variable cost per unit    = ";USING"####.##";P-(GP+F)/U

12306 GOTO 12980

12310 PRINT"Gross profit: "INT(GP+.5);TAB(40)"Number of units sold: "INT(U+.5)

12311 PRINT"Price of unit: "USING"#####.##";P;

12312 PRINT TAB(40)"Variable cost per unit: "USING"#####.##";V:PRINT

12315 PRINT:PRINT TAB(10)"Total fixed costs    = "USING"##########";(U*(P-V))-GP:GOTO 12980

12320 PRINT"Gross profit: "INT(GP+.5);TAB(40)"Number of units sold: "INT(U+.5)

12321 PRINT"Total fixed costs: "USING"##########";F;

12322 PRINT TAB(40)"Variable cost per unit: "USING"#####.##";V:PRINT

12325 PRINT:PRINT TAB(10)"Price of unit    = ";USING"######.##";((GP+F)/U)+V:GOTO 12980

12330 PRINT"Gross profit: "INT(GP+.5);TAB(40)"Price of unit: "USING"#####.##";P

12331 PRINT"Total fixed costs: "INT(F+.5);TAB(40)"Variable cost per unit: "USING"#####.##";V:PRINT

12335 PRINT:PRINT TAB(10)"Number of units to be sold    = ";USING"#########";(GP+F)/(P-V):GOTO 12980

12340 PRINT"Number of units sold: "U;TAB(40)"Price of unit: "P

12342 PRINT"Total fixed costs: "INT(F+.5);TAB(40)"Variable cost per unit: "USING"#####.##";V:PRINT

12345 PRINT:PRINT TAB(10)"Gross profit (benefit)    = ";USING"#########";(U*(P-V))-F:GOTO 12980

12980 A$=INKEY$:IF A$="" THEN GOTO 12980

12990 RETURN

13000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.13-APPLICATION OF INTEREST, DISCOUNT AND INFLATION RATE"

13010 PRINT"=========================================================="

13011 PRINT TAB(61)"(Ref.: Putt et al.)"

13021 REM: Attention on antagonistic effect between the interest and inflation rates.

13050 PRINT"This subprogramme calculates:"

13052 PRINT TAB(10)"1) Changed values applying compound annual interest rate"

13054 PRINT TAB(10)"2) Changed values applying annual discount rate"

13056 PRINT TAB(10)"3) Annual interest rate"

13058 PRINT TAB(10)"4) Number of years to reach a given value"

13060 PRINT TAB(10)"5) Inflation index"

13070 PRINT TAB(10)"6) Changed values applying annual inflation rate"

13075 INPUT"     Enter choice number: ",H

13080 IF H=1 OR H=2 OR H=3 OR H=4 OR H=5 OR H=6 THEN GOTO 13081 ELSE PRINT IDE$:GOTO 13980

13081 IF H=1 THEN GOTO 13400

13082 IF H=2 THEN GOTO 13500

13083 IF H=3 THEN GOTO 13600

13084 IF H=4 THEN GOTO 13700

13086 IF H=5 THEN GOTO 13100

13087 IF H=6 THEN GOTO 13800

13090 GOTO 13080

13100 PRINT"INPUT DATA:"

13111 INPUT"     product (service), measure units, quantity ";S$,U$,Q

13112 INPUT"     monetary units   ";M$

13113 INPUT"     base year        ";AB

13114 INPUT"     determinate year ";AN

13115 PRINT" S k i p  indicator to be calculated! All other three data must be available:"

13117 INPUT"          average price in the base year                      ";PO

13118 INPUT"          average price in the determinate year               ";PN

13120 PRINT"          cost of a given quantity of product(service)"

13121 INPUT"                                         in the base year     ";CO

13122 PRINT"          cost of the same quantity of the product(service)"

13123 INPUT"                                 in the determinate year      ";CN

13130 CLS:PRINT"RESULT:":PRINT

13131 PRINT TAB(6)"Calculation of inflation index":REM:Price index ???

13132 PRINT TAB(6)"------------------------------":PRINT

13133 PRINT"Product(service): "S$;TAB(40)"Quantity: "Q

13134 PRINT TAB(6)"Measure units: "U$

13135 PRINT"Base year: "AB;TAB(40)"Determinate year: "AN:PRINT

13140 PRINT:PRINT

13200 IF PO>0 AND PN>0 AND CN>0 THEN GOTO 13310 ELSE 13210

13210 IF PO>0 AND PN>0 AND CO>0 THEN GOTO 13320 ELSE 13220

13220 IF PN>0 AND CO>0 AND CN>0 THEN GOTO 13330 ELSE 13300

13300 IF PO>0 AND CO>0 AND CN>0 THEN GOTO 13340 ELSE 13980

13310 PRINT"     Cost in the base year           =";USING"#########";CN*PO/PN;

13311 PRINT"  "M$:GOTO 13350

13320 PRINT"     Cost in the determinate year    =";USING"#########";CO/(PO/PN);

13321 PRINT"  "M$:GOTO 13350

13330 PRINT"     Price in the base year          =";USING"######.##";CO*(PN/CN);

13331 PRINT"  "M$:GOTO 13350

13340 PRINT"     Price in the determinate year   =";USING"######.##";PO/(CO/CN);

13341 PRINT"  "M$:GOTO 13350

13350 PRINT

13352 PRINT"     Inflation index between the year";AB;"and the year";AN;" = ";

13354 IF PO>0 AND PN>0 THEN GOTO 13356 ELSE 13360

13356 PRINT USING"####.####";((PN/PO)*100)-100:PRINT

13358 PRINT"              i.e. average annual change to base year value   =  ";USING"###.#### %";(((PN/PO)*100)-100)/(AN-AB)

13360 IF CO>0 AND CN>0 THEN GOTO 13362 ELSE 13980

13362 PRINT USING"####.####";((CN/CO)*100)-100

13364 PRINT:PRINT"        i.e. average annual change to base year value   =  ";USING"###.#### %";(((CN/CO)*100)-100)/(AN-AB)

13390 PRINT:GOTO 13980

13400 PRINT:PRINT"INPUT DATA:":PRINT

13405 INPUT"          monetary units                                ";MU$

13410 INPUT"          initial value (of present - base year 0)      ";VP

13420 INPUT"          value of annual interest rate (>0-<1 !)       ";IA

13430 INPUT"          number of years                               ";N

13435 IF VP=0 OR IA=0 OR N=0 OR IA>1 THEN PRINT IDE$:GOTO 13980

13440 CLS:PRINT"RESULT:":PRINT

13441 PRINT TAB(6)"Changed values applying annual compound interest rate"

13442 PRINT TAB(6)"-----------------------------------------------------":PRINT

13443 PRINT TAB(10)"Monetary units: "MU$

13445 PRINT TAB(10)"Initial value (of present - base year 0):"USING"##########.##";VP

13446 PRINT TAB(10)"Value of the annual interest rate:               "USING"##.####";IA:PRINT

13450 PRINT TAB(10)"F u t u r e      V a l u e s":PRINT

13455 PRINT TAB(10)"End of year";TAB(32)"Amount":PRINT

13460 FOR I=1 TO N

13470 PRINT TAB(13)I;TAB(25)USING"##########.##";VP*(1+IA)^(I)

13480 NEXT I

13490 GOTO 13980

13500 PRINT:PRINT"INPUT DATA":PRINT

13505 INPUT"          monetary units                            ";MU$

13510 INPUT"          value to be discounted                    ";VD

13520 INPUT"          value of annual discount rate (>0-<1 !)   ";DA

13530 INPUT"          number of years                           ";N

13535 IF VD=0 OR DA=0 OR N=0 OR DA>1 THEN PRINT IDE$:GOTO 13980

13540 CLS:PRINT"RESULT:":PRINT

13541 PRINT TAB(6)"Changed values applying annual discount rate"

13542 PRINT TAB(6)"--------------------------------------------":PRINT

13543 PRINT TAB(10)"Monetary units: "MU$

13545 PRINT TAB(10)"Value to be discounted (of the year 0):";USING"##########.##";VD

13546 PRINT TAB(10)"Value of the annual discount rate:              "USING"#.####";DA:PRINT

13550 PRINT TAB(10)"D i s c o u n t e d    v a l u e s "

13551 PRINT

13555 PRINT TAB(10)"End of year";TAB(30)"Discount";TAB(52)"Amount"

13556 PRINT TAB(30)"factor":PRINT

13560 FOR I=1 TO N

13570 PRINT TAB(13)I;TAB(30)USING"##.####";1/(1+DA)^(I);TAB(45)USING"##########.##";VD/(1+DA)^(I)

13580 NEXT I

13590 GOTO 13980

13600 PRINT:PRINT"INPUT DATA:":PRINT

13605 INPUT"          monetary units                            ";MU$

13610 INPUT"          initial value (of present - base year 0)  ";VP

13620 PRINT"          value of the future year (value must be"

13625 INPUT"              major than that of the present year)  ";VF

13630 PRINT"          number of years between the present"

13631 INPUT"                               and future values    ";N

13632 IF VP=0 OR VF=0 OR N=0 THEN PRINT:PRINT IDM$:GOTO 13980

13650 CLS:PRINT"RESULT:":PRINT

13651 PRINT TAB(6)"Calculation of annual interest rate"

13652 PRINT TAB(6)"-----------------------------------":PRINT

13653 LET L=(LOG(VF)-LOG(VP))/N

13655 PRINT:PRINT"     To achieve from the initial value of"USING"##########.##";VP;

13656 PRINT "  "MU$

13657 PRINT:PRINT TAB(15)" during";N;"years"

13658 PRINT:PRINT TAB(25)"the future value of"USING"##########.##";VF;

13659 PRINT "  "MU$:PRINT

13660 PRINT"             there is a need for annual interest rate of  "USING"#.####";EXP(L)-1

13690 GOTO 13980

13700 PRINT:PRINT"INPUT DATA:":PRINT

13706 INPUT"          monetary units                            ";MU$

13710 INPUT"          initial value (of present - base year 0)  ";VI

13720 INPUT"          final value (of a given future year)      ";VF

13730 INPUT"          value of annual interest rate  (>0-<1 !)  ";IA

13731 IF VI=0 OR VF=0 OR IA>1 THEN PRINT IDE$:GOTO 13980

13750 CLS:PRINT"RESULT:":PRINT

13755 PRINT TAB(6)"Calculation of the number of years to reach a given value"

13756 PRINT TAB(6)"---------------------------------------------------------":PRINT:PRINT

13760 PRINT:PRINT"     To reach from the initial (present) value of"USING"##########.##";VI;

13761 PRINT"  "MU$:PRINT

13765 PRINT TAB(18)"the future value of"USING"##########.##";VF;

13766 PRINT"  "MU$:PRINT

13770 PRINT TAB(25)"when applying annual interest rate of";USING"##.###";IA

13775 LET D=LOG(VF/VI)/LOG(1+IA)

13780 PRINT:PRINT TAB(34)"then necessary number of years = ";USING"##.##";D:GOTO 13980

13800 PRINT:PRINT"INPUT DATA:":PRINT

13806 INPUT"          monetary units                                 ";MU$

13810 INPUT"          initial value (of base year 0)                 ";VP

13830 INPUT"          value of annual inflation  r a t e  (>0-<1 !)  ";IN

13840 INPUT"          number of years                                ";N

13845 IF VP=0 OR IN=0 OR N=0 OR IN>1 THEN PRINT IDE$:GOTO 13980

13850 CLS:PRINT"RESULT:":PRINT

13855 PRINT TAB(8)"Changed values applying  annual inflation rate"

13856 PRINT TAB(8)"----------------------------------------------"

13857 PRINT TAB(8)"Initial value: "VP MU$;TAB(50)"Inflation rate: ";USING"#.####";IN:PRINT

13860 PRINT TAB(8)"End of";TAB(19)"Amount = Initial";TAB(40)"Reduced Future"

13861 PRINT TAB(9)"Year";TAB(23)"Value";TAB(44)"Values":PRINT

13863 FOR I=1 TO N

13864 PRINT TAB(10)I;TAB(16)USING"###########.##";VP*((1+IN)^(I));TAB(37)VP/((1+IN)^(I))

13865 NEXT I

13980 A$=INKEY$:IF A$="" THEN GOTO 13980

13990 RETURN

14000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.14-CONVERSION BETWEEN NATIONAL CURRENCIES' VALUES"

14010 PRINT"===================================================="

14100 PRINT"INPUT DATA:":PRINT

14110 INPUT"          currency A  ";A$

14115 INPUT"          currency B  ";B$

14120 IF A$="" OR B$="" THEN PRINT IDM$:GOTO 14980

14121 PRINT:PRINT"  Answer only one question of the four (skip other three questions):":PRINT

14125 INPUT"     value of one unit of A currency in B currency   ";C

14126 INPUT"     value of one unit of B currency in A currency   ";D

14130 PRINT"     values of a given product (service)"

14131 INPUT"               in A currency, in B currency          ";G,H

14150 PRINT"     prices of a unit of a given product (service)"

14151 INPUT"               in A currency, in B currency          ";E,F

14152 IF (C+D+G+H+E+F)=0 THEN PRINT IDM$:GOTO 14980

14200 PRINT:PRINT"RESULT:":PRINT

14250 IF C>0 THEN GOTO 14332 ELSE 14260

14260 IF D>0 THEN GOTO 14333 ELSE 14270

14270 IF E>0 AND F>0 THEN GOTO 14340 ELSE 14296

14296 IF G>0 AND H>0 THEN GOTO 14360

14332 V=(1/C):PRINT"     Rate   "B$; " to "A$"   =   1  :";USING"######.####";V:GOTO 14400

14333 Z=(1/D):PRINT"     Rate   "A$; " to "B$"   =   1  :";USING"######.####";Z:GOTO 14400

14335 PRINT"     If the price of the same thing has the price"

14336 PRINT"     in "A$ " = "E;"and in "B$ " = "F

14337 PRINT"     following results are obtained:":PRINT

14340 PRINT"     Rate   "A$; " to "B$"   =  1  :";USING"######.####";F/E:PRINT

14350 PRINT"     Rate   "B$  " to "A$"   =  1  :";USING"######.####";E/F:GOTO 14400

14360 PRINT"     Rate   "A$; " to "B$"   =  1  :";USING"######.####";H/G:PRINT

14370 PRINT"     Rate   "B$; " to "A$"   =  1  :";USING"######.####";G/H

14400 I$=INKEY$:IF I$="" THEN GOTO 14400

14401 CLS:PRINT

14402 PRINT"Do you want to convert a commodity or service value given in one currency"

14404 INPUT"                        into the value in other currency, yes(y) or no(n) ";V$

14405 IF V$="y" THEN GOTO 14410 ELSE 14980

14410 PRINT:PRINT"     Answer only  o n e  of following questions !":PRINT

14424 INPUT"     value in currency A ";VA

14426 INPUT"     value in currency B ";VB

14430 IF C>0 THEN A=1/V

14431 IF C>0 THEN B=V

14433 IF D>0 THEN A=Z

14434 IF D>0 THEN B=1/Z

14435 IF E>0 AND F>0 THEN A=F/E

14436 IF E>0 AND F>0 THEN B=E/F

14437 IF G>0 AND H>0 THEN A=H/G

14438 IF G>0 AND H>0 THEN B=G/H

14450 PRINT:PRINT"RESULT:":PRINT

14452 IF VA>0 THEN GOTO 14460 ELSE 14454

14454 IF VB>0 THEN GOTO 14464 ELSE PRINT IDM$:GOTO 14980

14460 PRINT TAB(5)USING"##########.##";VA;

14461 PRINT"  ";A$;"        =";

14462 PRINT TAB(35)USING"##########.##";VA*A;

14463 PRINT"  ";B$:GOTO 14980

14464 PRINT TAB(5)USING"##########.##";VB;

14465 PRINT"  ";B$;"        =";

14466 PRINT TAB(35)USING"##########.##";VB*B;

14468 PRINT"  ";A$

14980 A$=INKEY$:IF A$="" THEN GOTO 14980

14990 RETURN

15000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.15-MODEL OF BUDGET FOR ANIMAL HEALTH PROGRAMME - I"

15015 PRINT"====================================================="

15020 PRINT"This subprogramme calculates the budget up to 5 years' period providing that"

15021 PRINT"the basic costs for individual components as well as the   i n f l a t i o n"

15023 PRINT"rate are  t h e   s a m e  in each year."

15050 PRINT"INPUT DATA"

15051 INPUT"     programme ";NA$

15052 INPUT"     place, period ";PL$,TI$

15053 INPUT"     duration of the programme in years (up to 5 !)              ";Y

15054 IF Y=0 OR Y>5 THEN PRINT IDE$:GOTO 15980

15057 INPUT"     monetary units                                              ";MU$

15058 INPUT"     calculation with inflation, yes (y) or no (n)               ";R$

15059 IF R$="y" or R$="n" THEN GOTO 15060 ELSE PRINT IDE$:GOTO 15980

15060 IF R$="y" THEN GOTO 15061 ELSE 15070

15061 INPUT"     inflation  r a t e  (number between >0 and <1 !)            ";IN

15062 IF IN=<0 OR IN=>1 THEN PRINT IDE$:GOTO 15980 ELSE 15070

15070 PRINT"A n n u a l   c o s t  of individual components:"

15081 INPUT"     1. personnel                      ";C(1)

15082 INPUT"     2. administrative support         ";C(2)

15083 INPUT"     3. duty travel                    ";C(3)

15084 INPUT"     4. subcontracts                   ";C(4)

15085 INPUT"     5. training                       ";C(5)

15086 INPUT"     6. expendable equipment           ";C(6)

15087 INPUT"     7. non-expendable equipment       ";C(7)

15088 INPUT"     8. premises                       ";C(8)

15089 INPUT"     9. operation and maintenance      ";C(9)

15091 INPUT"     10. other expenditure             ";C(10)

15101 A$(1)="Personnel"

15102 A$(2)="Admin.support"

15103 A$(3)="Duty travel"

15104 A$(4)="Subcontracts"

15105 A$(5)="Training"

15106 A$(6)="Expend.equip."

15107 A$(7)="Non-exp.eqip."

15108 A$(8)="Premises"

15109 A$(9)="Operat./maint."

15110 A$(10)="Other"

15180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

15181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

15182 IF I$="m" THEN GOTO 10

15183 IF I$="c" THEN GOTO 15000

15184 IF I$=CHR$(13) THEN GOTO 15200

15200 CLS:PRINT TAB(6)"B U D G E T   FOR   ANIMAL   HEALTH   PROGRAMME":PRINT

15205 PRINT"Programme: "NA$

15210 PRINT"Place: "PL$;TAB(50)"Period: "TI$

15211 PRINT"Monetary units: "MU$;

15212 IF R$="y" THEN GOTO 15213 ELSE 15214

15213 PRINT TAB(40)"Inflation: "USING"#.####";IN

15214 PRINT:PRINT

15215 PRINT" Budget component";TAB(20)"T o t a l";TAB(33)"1. year";

15221 IF Y=2 THEN PRINT TAB(43)"2. year"

15222 IF Y=3 THEN PRINT TAB(43)"2. year";TAB(53)"3. year"

15223 IF Y=4 THEN PRINT TAB(43)"2. year";TAB(53)"3. year";TAB(63)"4. year"

15224 IF Y=5 THEN PRINT TAB(43)"2. year";TAB(53)"3. year";TAB(63)"4. year";TAB(73)"5.year"

15225 PRINT

15226 IF R$="y" THEN GOTO 15230 ELSE 15300

15230 FOR I=1 TO 10

15235 IF Y=1 THEN SC(I)=INT(C(I)+.5)

15236 IF Y=2 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)

15237 IF Y=3 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)

15238 IF Y=4 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)+INT((C(I)*(1+IN)^3)+.5)

15239 IF Y=5 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)+INT((C(I)*(1+IN)^3)+.5)+INT((C(I)*(1+IN)^4)+.5)

15245 IF Y=1 THEN PRINT I;"";A$(I);TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5)

15246 IF Y=2 THEN PRINT I;"";A$(I);TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5)

15247 IF Y=3 THEN PRINT I;"";A$(I);TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5)

15248 IF Y=4 THEN PRINT I;"";A$(I);TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5);TAB(62)INT(C(I)*(1+IN)^3+.5)

15249 IF Y=5 THEN PRINT I;"";A$(I);TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5);TAB(62)INT(C(I)*(1+IN)^3+.5);TAB(72)INT(C(I)*(1+IN)^4+.5)

15250 NEXT I

15251 Y1=0:Y2=0:Y3=0:Y4=0:Y5=0

15252 FOR I=1 TO 10

15253 Y1=Y1+C(I)

15254 NEXT I

15255 FOR I=1 TO 10

15256 Y2=Y2+C(I)*(1+IN)

15257 NEXT I

15260 FOR I=1 TO 10

15261 Y3=Y3+C(I)*(1+IN)^2

15262 NEXT I

15265 FOR I=1 TO 10

15266 Y4=Y4+C(I)*(1+IN)^3

15267 NEXT I

15270 FOR I=1 TO 10

15271 Y5=Y5+C(I)*(1+IN)^4

15272 NEXT I

15275 IF Y=1 THEN GT1=Y1

15276 IF Y=2 THEN GT1=Y1+Y2

15277 IF Y=3 THEN GT1=Y1+Y2+Y3

15278 IF Y=4 THEN GT1=Y1+Y2+Y3+Y4

15279 IF Y=5 THEN GT1=Y1+Y2+Y3+Y4+Y5

15280 PRINT:

15281 IF Y=1 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5)

15282 IF Y=2 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5)

15283 IF Y=3 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5)

15284 IF Y=4 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5);TAB(62)INT(Y4+.5)

15285 IF Y=5 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5);TAB(62)INT(Y4+.5);TAB(72)INT(Y5+.5)

15299 GOTO 15980

15300 FOR I=1 TO 10

15302 IF Y=1 THEN PRINT I;"";A$(I);TAB(19)INT(C(I)+.5);TAB(32)INT(C(I)+.5)

15303 IF Y=2 THEN PRINT I;"";A$(I);TAB(19)INT(2*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5)

15304 IF Y=3 THEN PRINT I;"";A$(I);TAB(19)INT(3*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5)

15306 IF Y=4 THEN PRINT I;"";A$(I);TAB(19)INT(4*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5);TAB(62)INT(C(I)+.5)

15308 IF Y=5 THEN PRINT I;"";A$(I);TAB(19)INT(5*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5);TAB(62)INT(C(I)+.5);TAB(72)INT(C(I)+.5)

15310 NEXT I

15311 PRINT

15312 TC=0

15315 FOR I=1 TO 10

15316 TC=TC+C(I)

15317 TCY=TC*Y

15318 NEXT I

15380 IF Y=1 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5)

15381 IF Y=2 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5)

15382 IF Y=3 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5)

15383 IF Y=4 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5);TAB(62)INT(TC+.5)

15384 IF Y=5 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5);TAB(62)INT(TC+.5);TAB(72)INT(TC+.5)

15980 A$=INKEY$:IF A$="" THEN GOTO 15980

15990 RETURN

16000 CLS:PRINT TAB(52)e$" "v$:PRINT"14.16-MODEL OF BUDGET FOR ANIMAL HEALTH PROGRAMME - II"

16015 PRINT"======================================================"

16020 PRINT"This subprogramme calculates the budget up to 5 years' period for up to"

16021 PRINT"10 components to be  d e f i n e d  by the  u s e r , providing that"

16023 PRINT"the basic costs for individual components as well as the eventual"

16024 PRINT"inflation rate are the same in each year."

16050 PRINT"INPUT DATA"

16051 INPUT"     programme ";NA$

16052 INPUT"     place, period ";PL$,TI$

16053 INPUT"     duration of the programme in years (up to 5)                ";Y

16054 IF Y=0 OR Y>5 THEN PRINT IDE$:GOTO 16980

16057 INPUT"     monetary units ";MU$

16058 INPUT"     calculation with inflation, yes (y) or no (n)               ";R$

16059 IF R$="y" or R$="n" THEN GOTO 16060 ELSE PRINT IDE$:GOTO 16980

16060 IF R$="y" THEN GOTO 16061 ELSE 16064

16061 INPUT"     inflation  r a t e  (number between >0 and <1 !)            ";IN

16062 IF IN=0 OR IN=>1 THEN PRINT:PRINT IDE$:GOTO 16980 ELSE 16064

16064 INPUT"     how many budget components (up to 10)                       ";N

16065 IF N=0 THEN PRINT IDM$:GOTO 16980

16070 PRINT"A n n u a l   c o s t s "

16071 PRINT"            of individual components (names up to 12 characters !!!):"

16075 FOR I= 1 TO N

16076 PRINT I;

16077 INPUT"   component name, cost    ";CO$(I),C(I)

16078 IF CO$(I)="" THEN PRINT IDM$:GOTO 16980 ELSE 16079

16079 NEXT I

16180 CLS:PRINT TAB(6)"If you want to correct input data then key 'c',":PRINT

16181 PRINT TAB(18)"to go back to menu then key 'm',":PRINT:INPUT"                 else ENTER to continue ! ",I$

16182 IF I$="m" THEN GOTO 10

16183 IF I$="c" THEN GOTO 16000

16184 IF I$=CHR$(13) THEN GOTO 16200

16200 CLS:PRINT TAB(6)"B U D G E T   FOR   ANIMAL   HEALTH   PROGRAMME":PRINT

16205 PRINT"Programme: "NA$

16210 PRINT"Place: "PL$;TAB(50)"Period: "TI$

16211 PRINT TAB(6)"Monetary units: "MU$;

16212 IF R$="y" THEN GOTO 16213 ELSE 16214

16213 PRINT TAB(40)"Inflation rate: "USING"#.####";IN

16214 PRINT:PRINT

16215 PRINT" Budget component";TAB(20)"T o t a l";TAB(33)"1. year";

16221 IF Y=2 THEN PRINT TAB(43)"2. year"

16222 IF Y=3 THEN PRINT TAB(43)"2. year";TAB(53)"3. year"

16223 IF Y=4 THEN PRINT TAB(43)"2. year";TAB(53)"3. year";TAB(63)"4. year"

16224 IF Y=5 THEN PRINT TAB(43)"2. year";TAB(53)"3. year";TAB(63)"4. year";TAB(73)"5.year"

16225 PRINT

16226 IF R$="y" THEN GOTO 16230 ELSE 16300

16230 FOR I=1 TO N

16235 IF Y=1 THEN SC(I)=INT(C(I)+.5)

16236 IF Y=2 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)

16237 IF Y=3 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)

16238 IF Y=4 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)+INT((C(I)*(1+IN)^3)+.5)

16239 IF Y=5 THEN SC(I)=INT(C(I)+.5)+INT((C(I)*(1+IN)^1)+.5)+INT((C(I)*(1+IN)^2)+.5)+INT((C(I)*(1+IN)^3)+.5)+INT((C(I)*(1+IN)^4)+.5)

16240 PRINT I;"";USING"\            \";CO$(I);

16242 IF Y=1 THEN PRINT TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5)

16246 IF Y=2 THEN PRINT TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5)

16247 IF Y=3 THEN PRINT TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5)

16248 IF Y=4 THEN PRINT TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5);TAB(62)INT(C(I)*(1+IN)^3+.5)

16249 IF Y=5 THEN PRINT TAB(19)INT(SC(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)*(1+IN)^1+.5);TAB(52)INT(C(I)*(1+IN)^2+.5);TAB(62)INT(C(I)*(1+IN)^3+.5);TAB(72)INT(C(I)*(1+IN)^4+.5)

16250 NEXT I

16251 Y1=0:Y2=0:Y3=0:Y4=0:Y5=0

16252 FOR I=1 TO N

16253 Y1=Y1+C(I)

16254 NEXT I

16255 FOR I=1 TO N

16256 Y2=Y2+C(I)*(1+IN)

16257 NEXT I

16260 FOR I=1 TO N

16261 Y3=Y3+C(I)*(1+IN)^2

16262 NEXT I

16265 FOR I=1 TO N

16266 Y4=Y4+C(I)*(1+IN)^3

16267 NEXT I

16270 FOR I=1 TO N

16271 Y5=Y5+C(I)*(1+IN)^4

16272 NEXT I

16275 IF Y=1 THEN GT1=Y1

16276 IF Y=2 THEN GT1=Y1+Y2

16277 IF Y=3 THEN GT1=Y1+Y2+Y3

16278 IF Y=4 THEN GT1=Y1+Y2+Y3+Y4

16279 IF Y=5 THEN GT1=Y1+Y2+Y3+Y4+Y5

16280 PRINT:

16281 IF Y=1 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5)

16282 IF Y=2 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5)

16283 IF Y=3 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5)

16284 IF Y=4 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5);TAB(62)INT(Y4+.5)

16285 IF Y=5 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(GT1+.5);TAB(32)INT(Y1+.5);TAB(42)INT(Y2+.5);TAB(52)INT(Y3+.5);TAB(62)INT(Y4+.5);TAB(72)INT(Y5+.5)

16299 GOTO 16980

16300 FOR I=1 TO N

16302 IF Y=1 THEN PRINT I;"";CO$(I);TAB(19)INT(C(I)+.5);TAB(33)INT(C(I)+.5)

16303 IF Y=2 THEN PRINT I;"";CO$(I);TAB(19)INT(2*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5)

16304 IF Y=3 THEN PRINT I;"";CO$(I);TAB(19)INT(3*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5)

16306 IF Y=4 THEN PRINT I;"";CO$(I);TAB(19)INT(4*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5);TAB(62)INT(C(I)+.5)

16308 IF Y=5 THEN PRINT I;"";CO$(I);TAB(19)INT(5*C(I)+.5);TAB(32)INT(C(I)+.5);TAB(42)INT(C(I)+.5);TAB(52)INT(C(I)+.5);TAB(62)INT(C(I)+.5);TAB(72)INT(C(I)+.5)

16310 NEXT I

16311 PRINT

16312 TC=0

16315 FOR I=1 TO N

16316 TC=TC+C(I)

16317 TCY=TC*Y

16318 NEXT I

16380 IF Y=1 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5)

16381 IF Y=2 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5)

16382 IF Y=3 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5)

16383 IF Y=4 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5);TAB(62)INT(TC+.5)

16384 IF Y=5 THEN PRINT TAB(3)"T o t a l";TAB(19)INT(TCY+.5);TAB(32)INT(TC+.5);TAB(42)INT(TC+.5);TAB(52)INT(TC+.5);TAB(62)INT(TC+.5);TAB(72)INT(TC+.5)

16980 A$=INKEY$:IF A$="" THEN GOTO 16980

16990 RETURN

16995 CLS:PRINT TAB(5)"E R R O R  !  Start again ! Next input error may terminate the programme!":PRINT:GOTO 500

17000 CLS:INPUT"Do you want to return to the main menu of EPIZOO, yes(y) or no(n) ";Z$

17002 IF Z$="y" OR Z$="n" THEN GOTO 17010 ELSE 17030

17010 IF Z$="y" THEN GOTO 17020 ELSE 17030

17020 CHAIN"EPIZ40MM.KOU"

17030 SYSTEM