SPREADSHEET ORDER-LOGIC
FOR ANATOMIC PATHOLOGY.

http://www.netautopsy.org/apep04ss.htm
Long Version: http://www.netautopsy.org/ordrlogc.htm
Short Version: http://www.netautopsy.org/apsp04ss.htm
Perl Script: http://www.netautopsy.org/ordrlogc.txt
Visual Basic Script: http://www.netautopsy.org/ordrlogc.xls
Execution: http://www.netautopsy.org/cgi-bin/ordrlogc.cgi
G. William Moore, MD, PhD [1,3,4].
Lawrence A. Brown, MD [1,3].
Robert H. Burger, MD, MPA [1,2].
Grace F. Kao, MD [1,5].
Grover M. Hutchins, MD [4].
Robert E. Miller, MD [4].



From: Pathology and Laboratory Medicine Service, Baltimore VA Maryland Health Care System, Baltimore, MD [1].
Urology Division, Surgery Service, Baltimore VA Maryland Health Care System, Baltimore, MD [2].
Department of Pathology, University of Maryland School of Medicine, Baltimore, MD [3].
Department of Pathology, The Johns Hopkins Medical Institutions, Baltimore, MD [4].
Department of Dermatology, George Washington University School of Medicine, Washington, DC [5].

U. S. Government Work, uncopyrighted, accepted for publication as an eposter at APIII'2004, at URL:
http://apiii.upmc.edu
Arch Pathol Lab Med. 2005;: in press.


1. PUBLISHED ABSTRACT.



CONTENT. Core doctrines in human pathology, as reflected in consensus conference proceedings, review texts, tumor staging manuals, and pathology reporting protocols, may be organized as hierarchical lists, and transferred to commercial spreadsheet programs, where they are displayed as rectangular tables and analyzed with statistical tests. This report presents a mathematical model and computer script for calculating the logical consistency of such lists.

TECHNOLOGY. Zermelo-Frankel Set Theory and a commercial spreadsheet application with an embedded programming language.

DESIGN. A spreadsheet is a collection of sheets, or folios. Each folio is a rectangular table, with rows, columns, and cells. The present model has a patient-folio and a disease-folio. The patient-folio contains observed and inferred statements for each patient. In the disease-folio, the topmost-leftmost cell contains the origin, and every filled-in cell is either a parent, a child, or both in the disease-hierarchy. Every parent has one-or-more children, placed right and below the parent.

RESULTS. Proofs of consistency, completeness, and computability are given. Classical logic theorems are enriched. Sample spreadsheets are presented in the areas of dermatopathology, genitourinary pathology, and embryology.

CONCLUSIONS. This report proposes a concept-management formalism, in which statements are listed in descending order of importance on spreadsheet software. The formalism retains the syllogistic quality of reasoning in anatomic pathology, but allows some statements to have greater weight than others. The formalism supports previously-developed theories of ethical data collection and contingency table analysis. Mathematical theories can organize medical knowledge and patient data, and enhance clinicopathologic data collection and surveillance.

COMMENT. The commercial spreadsheet used in this investigation is Microsoft® Excel®.

2. EPOSTER OUTLINE.



1. BACKGROUND.
1.1. Core doctrines in human pathology, reflected in:
1.1.1. Consensus conference proceedings (Kao, 2004; Epstein, 1998).
1.1.2. Review texts. (Sinard; Haber, 2000).
1.1.3. Specialty Texts (Bostwick; Miettinnen).
1.1.4. Tumor staging manuals (AJCC).
1.1.5. Tumor classifications (Berman, 2004).
1.1.6. Pathology reporting protocols. (CAP; ADASP).
1.1.7. Continuing Medical Education (Checkpath).
1.2. Organized as hierarchical lists.
1.3. Transferred to commercial spreadsheet programs (Excel VBA).
1.4. Displayed as rectangular tables. Analyzed with statistical tests.
1.5. Mathematical model and computer script (Excel VBA).
1.6. Nandset computing method: finds all solutions (mathematical completeness).
1.7. Determines the logical consistency of lists.
1.8. Computability in polynomial computing resources.
1.9. Modal logic theory of ethical data collection (Moore, 2003).
1.10. Classical logic has no ordering concept: a statement is either true or false or unknown.
1.11. Bayesian logic has too much ordering: exact probability numbers are required, and subject to arithmetic operations.
1.12. Order logic is ordinal only.


2. TECHNOLOGY.
2.1 Zermelo-Frankel Set Theory. (Kleene; Suppes).
C = is a member of.
{} = Ø = empty set.
U = set-union.
/\ =set-intersection.
- = set-subtraction.
c = subset.

2.2 Commercial spreadsheet application. Microsoft® Excel®. (Visual Basic for Applications, Excel 2000).
2.3 Embedded programming language. Microsoft® Visual Basic® for Applications. (Visual Basic for Applications, Excel 2000).
2.4 Perl programming language. (Perl).


3. DESIGN.
3.1. Spreadsheet, Ш: collection of sheets, or folios. Each folio: rectangular table; rows, columns, cells.
3.2. Patient-folio, П: individual patient data.
3.3. Disease-folio, Д: logic of disease.
3.4. Combined-folio, Ш = (П U Д).


4. DEFINITION OF SPREADSHEET.
4.1. Patient-folio, П:
4.1.1. Observed and inferred statements for each patient.
4.1.2. Quantitative, interval, ranked, categorical, and binary data allowed.
4.1.3. All data expressed as true, false, or missing-value statements.

4.1.4. Example:
Пİ
Mary +♀~♂
Bill ~♀+♂
Pat +♀.
4.1.5. That is: Mary -> İ; Mary -> ♀; Mary -> ~♂; Bill -> İ, etc.
4.2. Disease-folio, Д:
4.2.1. Topmost-leftmost cell: origin, İ[0], true for all patients.
4.2.2. Every filled-in cell: parent-concept, child-concept, or both.
4.2.3. Every parent-concept has one-or-more children-concepts.
4.2.4. First child-concept, one-step-down-one-step-right from its parent-concept.
4.2.4. Subsequent children of same parent, same column as siblings.
4.2.5. Each parent-cell and its parent-cells implies the inclusive-or of its children-cells.

4.2.6. Example:
Д012
1 ..
2. +♀.
3.. ~♂
4. +♂.
5. .~♀

4.2.7. That is: İ -> (♀ | ♂); İ & ♀ -> ~♂; İ & ♂ -> ~♀.

4.3. Combined-folio, Ш:


4.3.1. Example:
Ш0123
1Mary...
2...
3..+♀.
4... ~♂
5Bill...
6...
7..+♂.
8... ~♀
9Pat...
10...
11..+♀.
12...
13.+♀..
14..~♂ .
15.+♂..
16..~♀ .


5. ISOMORPHIC REPRESENTATIONS OF SPREADSHEET.
5.1. SPREADSHEET-REPRESENTATION. Rectangular tables constructed according to the above rules:

Advantage: Easy-to-read.

Examples:
Пİ
Mary +♀~♂
Bill ~♀+♂
Pat +♀.

Д012
1 ..
2. +♀.
3.. ~♂
4. +♂.
5. .~♀


5.2. SYMBOLIC-LOGIC-REPRESENTATION. Set of statements of the form: it is true that X; or X implies Y; or X and Y; or X inclusive-or Y; or not-x; where x and y are true-false statements.

Advantage: Traditional logic notation.

Examples:
Mary -> İ.
Mary -> ♀.
Mary -> ~♂.
Bill -> İ.
Bill -> ♂.
Bill -> ~♀.
Pat -> İ.
Pat -> ♀.
İ -> (♀ | ♂).
İ & ♀ -> ~♂.
İ & ♂ -> ~♀.


5.3. NANDSET-REPRESENTATION. Collection of sets of the form: {X, Y, Z,...}, where not all of X, Y, Z,... are true at once.

Advantage: Transparent calculations, i.e., X [+] Y = Z, nandset addition, where X={a, b, ...}, Y={~a, c, ,,,}, and Z={b, c, ...}. Nandset addition, performed exhaustively, completely and consistently defines the system, and may be performed exhaustively after polynomial steps in a suitably constrained system (i.e., not an exponential number of logic expressions). For nandset, X, that belongs to either П or Д and anonymous completely described patient, A, then X is NOT a subset of A.
See: http://www.netautopsy.org/modlthry.htm

Examples:
1. {Mary, ~İ}.
2. {Mary, ~♀}.
3. {Mary, +♂}.
4. {Bill, ~İ}.
5. {Bill, ~♂}.
6. {Bill, +♀}.
7. {Pat, ~İ}.
8. {Pat, ~♀}.
9. {İ, ~♀, ~♂}.
10. {İ, +♀, +♂}.
11. {İ, +♂, +♀}.
Note that nandsets 10 and 11 are redundant (i.e., Zermelo-Frankel sets are order-insensitive).

Sample calculation:
{Pat, ~İ} [+] {İ, +♀, +♂} = {Pat, +♀, +♂}.
{Pat, ~♀} [+] {Pat, +♀, +♂} = {Pat, +♂}

Therefore, one concludes that Pat is not-male.


6. SEMANTIC MODEL: ANONYMOUS COMPLETELY-DESCRIBED PATIENTS.
6.1. ATOMSET of distinct statements (atoms, A), each with definite true-false status.

6.2. Each atom, a C A, is either a unique PATIENT-IDENTIFIER, a DATUM, or a MEDICAL-ENTITY, i.e., A = (P U D U E), (P /\ D) = Ø, (P /\ E) = Ø, (D /\ E) = Ø.

6.3. No self-reference paradoxes, e.g., no patient can be named, "I am not a patient".

6.4. Special medical-entity: İMPORTANCE, İ[0]. Every patient is important.

6.5. A patient-atom has no negation.

6.6. Each non-patient atom, a C (A-P), has an EXACT NEGATION, ~a C (A-P).

6.7. Set of anonymous completely-described patients, Ю. For every U C Ю:
6.7.1. U c (A-P).

6.7.2. For every U C Ю and uk C U, ~uk ~C U.

6.7.3. For every u=(u1,...,uЛ) C U, there exists a unique INFLECTION POINT, I, at which:
6.7.3.1. For 0< j < I, uj/uЛ = -1; and

6.7.3.2. For I < k < Л, uk/uI = +1.


6.8. Example. Two-level division of female/male, Л = 2, T -> (♂1 | ♀2).

Ю T01 21 2Description
1~++ ~~Usual female non-teamster.
2~+~ ~+Weak female non-teamster.
3~~~ ++Usual male non-teamster.
4~~+ +~Weak male teamster.
5+++ ~~Usual female non-teamster.
6++~ ~+Weak female teamster.
7+~~ ++Usual male teamster.
8+~+ +~Weak male teamster.


6.9. Example. Three-level division of female/male, Л = 3, T -> (♂1 | ♀3).

Ю T01 23 12 3Description
1~+++ ~~~ Usual female non-teamster.
2~++ ~~~+ Weaker female non-teamster.
3~+~ ~~++ Weakest female non-teamster.
4~~~ ~+++ Usual male non-teamster.
5~~~ +++~ Weaker male non-teamster.
6~~+ ++~~ Weakest male non-teamster.
7++++ ~~~ Usual female teamster.
8+++ ~~~+ Weaker female teamster.
9++~ ~~++ Weakest female teamster.
10+~~ ~+++ Usual male teamster.
11+~~ +++~ Weaker male teamster.
12+~+ ++~~ Weakest male teamster.


6.10. Example. Three-level division of active colitis.


Ю T01 23 12 3Description
1~+++ ~~~.
2~+++ ~~~.
3~+++ ~~~.

Ю T01 23 12 3Description
1~+++ ~~~.
2~+++ ~~~.
3~+++ ~~~.
Ю T01 23 12 3Description
1~+++ ~~~.
2~+++ ~~~.
3~+++ ~~~.


7. EXAMPLE: SEXES.
7.1. NOTATION: {X[i]} = {xi}. {X[i} = {xi, xi+1, ..., xЛ}. {Xi]} = {x0, x1, ..., xi}.

7.2. Classical-logic:

Every (important) patient, İ, is either a female, ♀, or a male, ♂. If a patient is female, then the patient is not-male. If a patient is male, then the patient is not-female.
Д012
1[0] ..
2. +♀[0].
3.. ~♂[0]
4. +♂[0].
5. .~♀[0]

7.3. Order-logic:
Every patient, İ, is either a teamster, T or else not-a-teamster, ~T. Among teamsters, males are more frequent than females.
Д012
1[0] ..
2. ~T[0].
3.. [1
4.. [2
5. T[0].
6.. [1
7.. [2
The nandsets are:
{+i0, +t0, ~t0}.
{+i0, ~t0, ~♀1, ~♂2}.
{+i0, ~t0, ~♀2, ~♂2}
(vacuous).
{+i0, +t0, ~♂1, ~♀2}.
{+i0, +t0, ~♂2, ~♀2}
(vacuous).

That is, a patient is either a teamster or not; among non-teamsters, females are more frequent than males; and among teamsters, males are more frequent than females.


7.4. Subset table of anonymous completely-described patients, teamsters only, Л=2, T -> (♂1 | ♀2).

Ю T01 21 2DescriptionStatus
1+++ ~~Usual female teamster.OK
2++~ ~+Weak female teamster.Excluded
3+~~ ++Usual male teamster.OK
4+~+ +~Weak male teamster.OK
In this table, all males but only usual females take a job as a teamster, i.e., male teamsters (lines 2,3) are more frequent than female teamsters (line 1).

7.5. Subset table of anonymous completely-described patients, teamsters only, Л=3, T -> (♂1 | ♀3):

Ю T01 23 12 3Description
1++++ ~~~ Usual female teamster.
2+++ ~~~+ Weaker female teamster.
3++~ ~~++ Weakest female teamster.
4+~~ ~+++ Usual male teamster.
5+~~ +++~ Weaker male teamster.
6+~+ ++~~ Weakest male teamster.
In this table, all males but only usual females take a job as a teamster, i.e., male teamsters (lines 4,5,6) are much more frequent than female teamsters (line 1).

8. THEOREMS.
8.1. THEOREM 1. Classical-logic inclusive-or.
The spreadsheet:
Д01
1[0] .
2. +A[0]
3. ~A[0]
is vacuous.
Proof. The only nandset is: {i0, ~a0, +a0}, which is vacuous, since it excludes no anonymous completely-decribed patient.

8.2. THEOREM 2. Classical-logic and.
The spreadsheet:
Д012
1[0] ..
2. +A[0].
3.. ~A[0]
is contradictory.
Proof. The nandsets are: {i0, ~a0} [+] {i0, +a0, +a0} = Ø, which is contradictory, since it excludes all anonymous completely-decribed patients.



8.3. THEOREM 3. Order-logic inclusive-or.
The spreadsheet:
Д01
1[0] .
2. +A[1
3. ~A[2
is NOT vacuous.
Proof. The nandsets are: {+i0, ~a1, +a2} and {+i0, ~a2, +a2}. The first nandset is not vacuous, since it excludes the anonymous completely-decribed patient, {+i0, ~a0, ~a1, +a2}



8.4. THEOREM 4. Order-logic and.
The spreadsheet:
Д012
1[0] ..
2. +A[1.
3.. ~A[2
is contradictory.
Proof. The nandsets are: {+i0, ~a1}; {+i0, ~a2}; {+i0, +a1, +a2}; and {+i0, +a2, +a2} = {+i0, +a2}. Then {+i0, ~a2} [+] {+i0, +a2} = Ø, which is contradictory.


9. PROSTATE CARCINOMA.

Simple model for prostate cancer diagnosis.

Legend:
PBX=prostate-biopsy.
PSA=serum-prostate-specific-antigen.
PRC=prostate-carcinoma.
USX=urinary-symptoms.
PFX=pathologic-fracture.
□=necessarily.
2=necessarily necessarily.
k=necessarilyk.
#=it is requested that.

Д01234
00 ....
1.0 ...
2.. ..
3... ~♀.
4.. ..
5... ~♂.
6... .4~PRC
7.0 ...
8.. ~□kX..
9.. kX..
10... k-1X.
11.0 ...
12.. ~♂..
13.. ..
14... ~>60Y.
15... >60Y.
16... .2+PRC
17.. ..
18... ~USX.
19... +USX.
20... .2+PRC
21.. ..
22... ~PFX.
23... +PFX.
24... .4+PRC
25.. ..
26... ~□2+PRC.
27... 2+PRC.
28... .#PSA.
29... 3+PRC.
30... .#PBX.


10. ACTIVE COLITIS.

Simple model for active colitis.

Д012
0..
1.~colitis.
2.+colitis.
3..+infectious colitis.
4..+pseudomembranous colitis.
5.. +radiation colitis.
6.. +ischemic colitis.
7.. +microscopic colitis.
8.. +diversion colitis.
9.. +self-limited colitis.
10..+focal active colitis.
11..+inflammatory bowel disease.


11. DERMATOPATHOLOGY.

Simple model for skin biopsy diagnosis.

Д012 34
0. ...
1 . ~skin. . . .
2 . +skin. . . .
3 . . non-neoplastic dermatoses. . .
4 . . . inflammatory dermatoses. .
5 . . . . acute inflammatory dermatoses.
6 . . . . chronic inflammatory dermatoses.
7 . . . . granulomatous inflammatory dermatoses.
8 . . . . infectious dermatoses.
9 . . . vesiculobullous dermatoses. .
10 . . . follicular dermatoses. .
11 . . . atrophic dermatoses. .
12 . . . connective-tissue dermatoses. .
13 . . . reactive dermatoses. .
14 . . neoplastic dermatoses. . .
15 . . . keratinocytic neoplastic dermatoses. .
16 . . . appendageal neoplastic dermatoses. .
17 . . . fibroblastic neoplastic dermatoses. .
18 . . . melanocytic neoplastic dermatoses. .


12. EMBRYOLOGY.

Simple model for embryonic microanatomy, third week.

Д012 34
0. ...
1.<Three weeks. . . .
2.+Three weeks. .. .
3..+Amnionic cavity. . .
4..+Ectoderm. ..
5...+Lateral ectoderm. .
6...+Neuro-ectoderm. .
7..+Mesoderm.. .
7... +Paraxial mesoderm..
8...+Somite. .
9...+Intermediate mesoderm..
10...+Lateral plate mesoderm..
11... .+Somatic mesoderm.
12... . +Splanchnic mesoderm.
13..+Entoderm. ..
14..+Intra-embryonic Coelom. ..
1.>Three weeks. ...


From Dr. Berman's Cancer Classification, based upon the embryologic origin of tumor stem cells.
embryonic
    primitive
        primitive_differentiating
           totipotent_or_multipotent_differentiating
           limited_differentiating
        germ cell
        primitive_non_differentiating
    non_primitive
        endoderm_or_ectoderm
            endoderm_or_ectoderm_surface
            endoderm_or_ectoderm_endocrine
            endoderm_or_ectoderm_parenchymal
            odontogenic_epithelium
        mesoderm
            mesenchyme
                connective_tissue
                    muscle
                    fibrous_tissue
                    vascular
                    adipose_tissue
                    bone_cartilage
                heme_lymphoid
            non_mesenchymal_mesoderm
                coelomic
                    coelomic_ductal
                    coelomic_cavities
                    coelomic_gonadal
                sub_coelomic
                    sub_coelomic_gonadal
                    sub_coelomic_endocrine
                    sub_coelomic_nephric
        neuroectoderm_neural_plate
            neural_tube
               neural_tube_parenchyma
               neural_tube_lining
            neural_crest
               peripheral_nervous_system
               neural_crest_endocrine
               neural_crest_melanocytic

Ю0 123456
0... ...
1 . +Embryonic. . . . . .
2 . . +Primitive
embryonic.
. . . .
3 . . . +Primitive
differentiating
embryonic.
. . .
4 . . . . +Totipotent
or_multipotent
primitive
differentiating
embryonic.
. .
5 . . . . +Limited
primitive
differentiating
embryonic.
. .
6 . . . +Germ_cell
embryonic.
. . .
7 . . . +Primitive
non_differentiating
embryonic.
. . .
8 . . +Non-primitive
embryonic.
. . . .
9 . . . +Endoderm
or_ectoderm.
. . .
10 . . . . +Endoderm
or_ectoderm
surface.
. .
11 . . . . +Endoderm
or_ectoderm
endocrine.
. .
12 . . . . +Endoderm
or_ectoderm
parenchymal.
. .
13 . . . . +Odontogenic
epithelium.
. .
14 . . . +Mesoderm. . . .
15 . . . . +Mesenchyme. . .
16 . . . . . +Connective
tissue.
.
17 . . . . . . +Muscle.
18 . . . . . . +Fibrous_tissue.
19 . . . . . . +Vascular.
20 . . . . . . +Adipose_tissue.
21 . . . . . . +Bone_cartilage.
22 . . . . +Non-mesenchymal
mesoderm.
. .
23.... .+Coelomic
mesoderm.
.
24.... ..+Coelomic
ductal
mesoderm.
25.... ..+Coelomic
cavity
mesoderm.
26.... ..+Coelomic
gonadal
mesoderm.
27.... .+Subcoelomic
mesoderm.
.
28.... ..+Subcoelomic
gonadal
mesoderm.
29.... ..+Subcoelomic
endocrine
mesoderm.
30.... ..+Subcoelomic
nephric
mesoderm.


Berman JJ.
http://www.biomedcentral.com/1471-2407/4/10

Willis RA.
The borderland of embryology and pathology.



13. LINKAGE TO MODAL LOGIC THEORY:
ETHICAL DATA COLLECTION.
13.0. M = highest level of certainty. H = last interval in time.
ÇШ = all true logical consequences of spreadsheet Ш.
çШ = all computed consequences of spreadsheet Ш.
Theorem: çШ = ÇШ.

13.1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.
13.1.1. For every +a C A, -a C A, -a ~= a, ++a = +a, and --a = +a.
13.1.2. For every +a C A, $ka = $ka; #a=#-a; !a=!-a..
13.2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.
13.2.1. ($ka->$k-1a)@Д0.
13.2.2. Nandset definition: {+$ka,-$k-1a} C Д0 for every k, 1 < k < M-1 and a C A.
13.3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty.
13.3.1. ($d->$Md)@Д0.
13.3.2. Nandset definition: {$d,-$Md} C Д0, for every d C D.
13.4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).
13.4.1. (-#d->-!d)@Д0.
13.4.2. Nandset definition: {-#d,+!d} C Д0, for d C D.
13.5. Conative rule. Necessary data should be collected if the patient consents (conative).
13.5.1. ((-$d&#d)->!d)@Д0.
13.5.2. Nandset definition: {-$d,+#d,-!d} C Д0, for d C D.
13.6. Vexative rule. Data or demanded in order of medical need.
13.6.1. keð..d-vexative: (□ke&□kð, ...,&-$d)->(#d| □k+1-e) @ Д0.
13.6.2. Nandset definition: {+$ke,e,+$kð,ð,..,-$d,-#d, -$k+1e} C Д0, for 1 < k < M-2, ðC D, and e C E.
13.7. Ontology rule. Necessary data increase one's certainty of medical entities.
13.7.1. (□kð..)-> (□ke|□k+1-e) @ Д0, 1<k<M-2.
What is M-e?
Or, more interestingly, what is -e?
13.7.2. Nandset definition: {+$kð,ð,..,-e,-$k+1e} C Д0, for 1 < k < M-2, d C D, ð c (D - {+d,-d}).
13.8. Ethical data collection rule. All ethical data are either positive, negative, failed-attempt, or not-attempted.
13.8.0. If d is d-Hippocratic, then there exists at most one I, 1 < I < H, such that:
13.8.1. (POS-DATA): +$d, +d, +!d true for ДI, xor
13.8.2. (NEG-DATA): +$d, -d, +!d true for ДI, xor
13.8.3. (FAIL-DATA): -$d, +!d true for ДI, xor
13.8.4. (NOTRY-DATA): -$d, +$d, -#d, +#d, -!d, +!d not true for ДI.
13.9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.
13.9.1. It is true that -$ka @ CI if and only if it is not true that $ka @ ÇДI
13.9.2. Nandset definition: {$ka} C CI if and only if {-$ka} ~ C ÇДI, for 1 < I < H, 1 < k < M, and a C A.


14. CONTINGENCY TABLE ANALYSIS.
Evidence-based statistical measures for order-logic.

14.1. A 2×2 CONTINGENCY TABLE is a rectangular table in which one binary factor (example: sex, vs. ) is compared to a second binary factor (example: teamster, ~T vs. T):
Д.
~Tabv
+Tcdw
.xyz


14.2. Now suppose that 250 female employees and 250 male employees from a particular shipping company are surveyed, and the OBSERVED VALUES for totals, are as follows:
Д.
~T245205450
+T54550
.250250500
Is the result statistically significant? That is, are there disproportionately more male-teamsters than female-teamsters?

14.3. The raw-data values, 245=a, 205=b, 5=c, 45=d, are the cell-totals. The row-sum values, 245+205=450=v and 5+45=50=w are the row-totals. The column-sum values, 245+5=250=x and 205+45=250=y are the column-totals. The sum of all cell-totals, which equals the the sum of the row-totals, as well as the sum of the column-totals, is the grand-total, a+b+c+d=v+w=x+y=z.

14.4. The usual statistical analysis procedures are: the X2 test and the Fisher exact test. In these tests, we obtain EXPECTED VALUES for totals, as follows:
Д.
~TABV
+TCDW
.XYZ
where V=v; W=w; X=x; Y=y; and Z=z (i.e., marginal and grand totals are equal to observed); and A=(V×X)/Z; B=(V×Y)/Z; C=(W×X)/Z; and D=(W×Y)/Z. For the example: A=225, B=225, C=25, D=25, V=450, U=50, W=50, Z=500.

14.5. In the TOKEN SWAP TEST, one starts with the expected value of, say, the upper left cell, A, and adds (or subtracts) tokens from A, one by one, until A -> A=1 -> A+2 -> -> a, in a manner that the marginal totals remain constant. That is, if A -> A+1, then B -> B-1, C -> C-1, D -> D+1, so that V = (A+1)+(B-1) = v, W = (C-1)+(D+1) = w, X = (A+1)+(C-1) = x, and Y = (B-1)+(D+1) = y, Thus, in general, if A -> -> A+q, then B -> B-q, C -> C-q, and D -> D+q.

14.6. When A+q -> A+q+1, then there are B-q tokens that may be drawn from the upper right cell and D-q tokens that may be drawn from the lower left cell. But when A+q -> A+q-1, B-q+1 tokens that may be drawn from the upper right cell and D-q+1 tokens that may be drawn from the lower left cell. Thus there are ... swaps that increase A+q to A+q+1, and ... swaps that decrease A+q to A+q-1. This generates a token swap distribution.....

14.7. The superiority of the token swap test over traditional contingency table analysis is that one can initialized the expected values at A+Q, ... , based upon your medical experience, where max(-A,-D) < Q < min(B,C). For example, if one expects that male teamsters would be twice as numerous as female teamsters, then one could force 2×C = D, and solve for Q. In traditional analyses, Q is required to be zero.



14.8. In this report, we suggest that the token swap test is a more appropriate analysis, since the expected values of the cell-totals are not preset by statistical theory, but can be manipulated according to medical experience.


15. DISCUSSION.
15.1. Two intellectual pillars of anatomic pathology informatics: image-recognition; concept-management.
15.2. Concepts in in descending order of importance on spreadsheet.
15.3. Syllogistic quality of reasoning in anatomic pathology.
15.4. Some statements with greater weight than others.
15.5. Formalism is ordinal, not cardinal,
15.6. Stepwise character of medical intentions and therapies.
15.7. Reduces to classical symbolic logic if all superscripts are zero.
15.8. Supports theories of ethical data collection and contingency table analysis.
15.9. Mathematical theories can organize medical knowledge and patient data.
15.10. Can enhance clinicopathologic data collection and surveillance.


3. EXTENDED ABSTRACT.



BACKGROUND. Core doctrines in human pathology, as reflected in consensus conference proceedings, review texts, specialty texts, tumor staging manuals, pathology reporting protocols, and multiple-choice examinations, are often organized in the form of hierarchical tables and lists. These lists may be transferred to commercial spreadsheet programs, where they are displayed as rectangular tables, bar graphs, pie diagrams, scattergrams, etc., and analyzed with statistical estimators and hypothesis tests. This report presents a mathematical model and accompanying computer script for calculating the logical consequences of such lists.

TECHNOLOGY. Zermelo-Frankel Set Theory and a commercial spreadsheet application with an embedded programming language.

DESIGN. A spreadsheet is a collection of sheets, or folios. Each folio is a rectangular table, with rows, columns, and cells, where each cell is the intersection of one row and one column. We consider a patient-folio and a disease-folio. In the patient-folio, there are observed and inferred statements for each patient. Quantitative, interval, ranked, and categorical data are all expressed as true-false or missing-value statements. In the disease-folio, the topmost-leftmost cell contains the origin, and every filled-in cell is either a parent-concept, a child-concept, or both. Every parent-concept has one-or-more children-concepts. The first child-concept is placed one-step-down-one-step-right from its parent-concept. Subsequent children of the same parent are placed in the same column as their siblings. Each parent-cell implies the inclusive-or of its children-cells.

RESULTS. Proofs of consistency, completeness, and computability are presented. Classical symbolic logic theorems are enriched: an inconsistent spreadsheet in classical symbolic logic is likewise inconsistent in order-logic; but a vacuous spreadsheet in classical symbolic logic is not necessarily vacuous in order-logic. Sample spreadsheets are presented in the areas of dermatopathology, genitourinary pathology, and embryology.

4. TABLE OF CONTENTS.


1. TITLE PAGE.
2. PUBLISHED ABSTRACT.
3. EXTENDED ABSTRACT.
4. TABLE OF CONTENTS.
5. BACKGROUND.
6. TECHNOLOGY.
7. DESIGN.
8. DEFINITION OF SPREADSHEET.
9. ISOMORPHIC REPRESENTATIONS OF SPREADSHEET.
10. SEMANTIC MODEL: ANONYMOUS COMPLETELY DESCRIBED PATIENTS.
11. EXAMPLE: SEXES.
12. DESCRIPTION OF ORDER SYMBOLIC LOGIC FOR DISEASE-FOLIO.
13. ORDER-LOGIC FOR DISEASE FOLIO.
14. RESULTS: PROSTATE CARCINOMA.
15. RESULTS: ACTIVE COLITIS.
16. RESULTS: DERMATOPATHOLOGY.
17. RESULTS: GENITOURINARY PATHOLOGY.
18. RESULTS: EMBRYOLOGY.
19. RESULTS: PROOFS.
20. RESULTS: DESIGN OF COMPUTER SCRIPTS.
21. RESULTS: PERL SCRIPT.
22. RESULTS: VISUAL BASIC SCRIPT.
23. LINKAGE TO MODAL LOGIC THEORY.
24. CONTINGENCY TABLE ANALYSIS.
25. CONCLUSIONS.
26. REFERENCES.
27. APPENDIX: COMPUTER SOURCE CODE.
28. APPENDIX: PREQUELS, SEQUELS.

5. BACKGROUND.



Core doctrines in human pathology, as published in consensus conference proceedings (Kao, Epstein), review texts (Sinard, Haber), specialty texts (Bostwick, Miettinnen), tumor staging manuals (TNM), pathology reporting protocols (ADASP), on-line tumor classifications (Berman), multiple-choice pathology continuing-education examinations (CheckPath), and lecture notes (), are often organized in the form of hierarchical tables and lists. These lists are readily transferred to commercial spreadsheet software, where they may be displayed as rectangular tables, bar graphs, pie diagrams, scattergrams, etc., and analyzed with statistical estimators and hypothesis tests. In this report, we propose a consistent mathematical model, and an accompanying computer script, for calculating the logical consequences of such lists, in order of importance.

6. TECHNOLOGY.



Zermelo-Frankel Set Theory [Suppes; Kleene]; and a commercial spreadsheet application with an embedded programming/scripting language [Microsoft® Excel® with Visual Basic®; Excel VBA 2000].

7. DESIGN.



This report introduces a formalism for managing spreadsheet information in pathology, and demonstrates that the formalism is mathematically consistent and computable with polynomial resources. Twenty elementary theorems are proved, and elementary examples, in the areas of dermatopathology, genitourinary pathology, and embryology, are discussed [Haber; Sinard; Kao; Bostwick].

8. DEFINITION OF SPREADSHEET.



A SPREADSHEET, Ш, is a collection of rectangular tables, called SHEETS or FOLIOS, Ф. Each folio, Ф, is a rectangular table consisting of nrow ROWS, and ncol COLUMNS. The intersection of a particular row and particular column is a CELL. There are nrow×ncol cells. A given spreadsheet-cell may be empty, or may contain a character-string that names a medical-object and a truth-status. MEDICAL-OBJECTS may include: patients, each with a unique identifier; observations/data, including historical information, physical signs, radiographic findings, laboratory tests, and histologic image-descriptions; and abstract medical entities, such as diseases and pathologic processes, e.g., neoplasia, inflammation, trauma, and ischemia. It is assumed that all medical-objects can be translated into a collection, possibly very large, of true-false statements. By convention/fiat, every patient is TRUE and every patient is İMPORTANT. Following Hippocrates, the present model consists of a PATIENT-FOLIO, П c Ш, and a DISEASE-FOLIO, Д c Ш.[Hippocrates, 1923].

9. ISOMORPHIC REPRESENTATIONS OF SPREADSHEET.



9A. In this report, there are three, ISOMORPHIC REPRESENTATIONS for a folio: SPREADSHEET-REPRESENTATION; SYMBOLIC-LOGIC-REPRESENTATION; and NANDSET-REPRESENTATION. The spreadsheet-representation for a folio is a rectangular table constructed according to the following, stated rules/conventions. The symbolic-logic-representation for a folio is a set of statements of the form: IT IS TRUE THAT X or X IMPLIES Y or X AND Y or X INCLUSIVE-OR Y or NOT-X, where X and Y are true-false statements. The nandset-representation for a folio is a collection of sets of the form: {X, Y, Z,...}, where not all of X, Y, Z,... are true at once. By these conventions, the assertion that Bill is male is represented as:
П..
.Bill
in spreadsheet notation; as Bill -> ♂ in symbolic logic notation; and as {Bill, ~♂} in nandset notation, i.e., Bill and ~♂ are not all true at once.

9B. In the PATIENT-FOLIO, П, rows in the patient-folio correspond to individual patients, and columns correspond to observations/data and medical-entities. The zeroth column in the patient-folio is the list of unique identifiers for each patient. Column 1 in the patient-folio is a hypothetical entity, denoted İ, called İMPORTANCE. By fiat, every patient is important, so that the value of each cell in column 1 is TRUE. All other patient-folio-cells may assume the values TRUE(+), FALSE (~), or MISSING-VALUE (=empty-cell). These patient-folio-columns contain the true/false/missing-value status of DATA (complaints, medical history, physical findings, laboratory values, statements of consent, etc.); or MEDICAL-ENTITIES (body-site, cancer, inflammation, necrosis, etc.), as applied to that patient. Quantitative, interval, ranked, and categorical data are reformulated as true-false statements. Initially, only data-cells (but not necessarily ALL the data-cells) are FILLED-IN as true or false for a particular patient. Each initial element of the patient-folio assumes ORDER ZERO. For example:
П0123
1Mary +♀~♂
2Bill ~♀+♂
3Pat +♀~♂
4Leslie ~♀+♂
In this patient-folio, Mary and Pat are female-not-male; and Bill and Leslie are male-not-female. Note that Pat and Leslie are ambiguous given-names.

9C. In the disease-folio, the topmost-leftmost cell contains the İMPORTANCE-ORIGIN, İ0. The topmost row and leftmost column are otherwise empty. Every filled-in cell is either a parent or a child or both. Every parent has one-or-more children. The first child is placed one-step-down-one-step-right from its parent. Subsequent children of the same parent are placed in the same column as their siblings, in consecutive rows, unless they have their own children. Each row has one-and-only-one filled-in cell, up through the final row. Each column has at least one filled-in cell, up through the final column. Every child has exactly one parent. For the first child in a sibship, the parent appears one-step-up-one-step-left from that child. For subsequent children in the sibship, their parent appears one-step-left and the first filled-in-cell-up. There are nrow rows, and each row contains exactly one filled-in cell. At each parent in the disease-folio, the classical symbolic logic expression for this parent-cell is: (İ & ... great-grandparent & grandparent & parent) implies (child1 or child2 or child3 or ...). For example, the following disease-folio asserts that female implies not-male and male implies not-female:
Д012
1 ..
2. +♀.
3.. ~♂
4. +♂.
5. .~♀
In this disease-folio, there are three parents: the filled-in-cells in rows 1, 2, and 4. There are four children: the filled-in-cells in rows 2, 3, 4, and 5. There are three firstborns: the filled-in-cells in rows 2, 3, and 5. The parent of row-2 is row-1; the parent of row-3 is row-2; and the parent of row-5 is row-2. There are three implications in classical symbolic logic asserted by this disease-folio, as follows:
İ implies +♀ or +♂.
İ and +♀ implies ~♂.
İ and +♂ implies ~♀.
The three firstborns in this disease-folio, correspond to rows 2, 3, and 5. Each of the implications in the disease-folio corresponds to a unique firstborn:
Row 2: İ implies +♀ or +♂.
Row 3: İ and +♀ implies ~♂.
Row 5: İ and +♂ implies ~♀.


10. SEMANTIC MODEL: ANONYMOUS COMPLETELY DESCRIBED PATIENTS.

10A. The SEMANTIC MODEL for this spreadsheet is the universe, Ю, of ANONYMOUS, COMPLETELY-DESCRIBED PATIENTS (ACDPs), where each row is an ACDP, and each column is a datum/entity. In classical symbolic logic, Ю is the TRUTH TABLE. Each row may have an ORDER-NUMBER for that datum/entity, where order ranges from 1 to Л. If all order-numbers are zero, then the semantic model satisfies the axioms of classical symbolic logic.
Ю123
1 +♀+♂
2 +♀~♂
3 ~♀+♂
4 ~♀~♂
5 +♀+♂
6 +♀~♂
7 ~♀+♂
8 ~♀~♂


10B. The set theory model employs an ATOMSET of distinct, statements (atoms, A), each of which has a definite true-false status (no self-reference paradoxes). Each atom is either a unique PATIENT-IDENTIFIER, a DATUM, or a MEDICAL-ENTITY, with a special medical-entity, called İMPORTANCE-ORIGIN, İ0. A patient-atom has no negation. Each non-patient atom, a C (A-P), has an EXACT NEGATION, ~a C (A-P), that is also an atom. There is a ORDERATOMSET, Q, where for each a C (A-P), there exists an ai C Q, 0 < i < Л. Each member of an ACDP, ю C Ю, has the property that: if ai C ю, then ~ai ~C ю; Furthermore, this ю C Ю has an ultimate element, aЛ C ю c Q, and an INFLECTION POINT, I, 0 < I < Л, such that ~aj C ю, where 0 < j < I, and +ak C ю, where I < k < Л. That is, aj/aЛ = -1 for 0 < j < I, and ak/aЛ = +1 for I < k < Л.

10C. To each classical symbolic logic expression, there corresponds exactly one NANDSET, i.e., a set of conditions that cannot all be true at once. It is demonstrated in this report that if X is a nandset for the spreadsheet, and X c Y, then Y is a nandset for the spreadsheet. The universal operation for nandsets is: NANDSET ADDITION, [+]. It is demonstrated that if X, Y are nandsets for the spreadsheet, then X [+] Y is a nandset for the spreadsheet. Furthermore, an exhaustive operation of nandset-additions is possible in polynomial time, and suffices to find all logical consequences of the initial spreadsheet.

11. EXAMPLE: SEXES.



11A. For the sake of discussion, let us assert that there are exactly two sexes, male and female, and that every patient has at least one sex.

7. EXAMPLE: SEXES.
Classical-logic:

Every (important) patient, İ, is either a female, ♀, or a male, ♂. If a patient is female, then the patient is not-male. If a patient is male, then the patient is not-female.
Д012
1[0] ..
2. +♀[0].
3.. ~♂[0]
4. +♂[0].
5. .~♀[0]

Order-logic:
Every patient, İ, is either a teamster, T or else not-a-teamster, ~T. Among teamsters, males are more frequent than females.
Д012
1[0] ..
2. ~T[0].
3.. [1
4.. [2
5. T[0].
6.. [1
7.. [2
The nandsets are:
{+i0, +t0, ~t0}.
{+i0, ~t0, ~♀1, ~♂2}.
{+i0, ~t0, ~♀2, ~♂2}
(vacuous).
{+i0, +t0, ~♂1, ~♀2}.
{+i0, +t0, ~♂2, ~♀2}
(vacuous).

That is, a patient is either a teamster or not; among non-teamsters, females are more frequent than males; and among teamsters, males are more frequent than females.

Subset table of anonymous completely-described patients, teamsters only:
Ю T01 21 2DescriptionStatus
1+++ ~~Usual female.OK
2++~ ~+Weak female.Excluded
3+~~ ++Usual male.OK
4+~+ +~Weak male.OK
In this table, all males but only usual females take a job as a teamster.


11B. In the DISEASE-FOLIO, Д c Ш, of the spreadsheet-representation, Ш, rows are listed in order of the İMPORTANCE, İ, of a particular datum/entity. Each filled-in cell in Д is either a DATUM, D, or an ENTITY, E. Every filled-in cell is either a PARENT or a CHILD, or both. The upper-left-cell, or ultimate parent, or İMPORTANCE-ORIGIN, contains İ0, and the topmost row and leftmost column are otherwise empty. Every occurrence of İ in a disease-folio (or in a patient-folio) is İ0. Every parent has one-or-more children. The first child is placed one-step-down-one-step-right from its parent. Subsequent children of the same parent are placed in the same column as their siblings, in consecutive rows, unless they have their own children. Each row has one-and-only-one filled-in cell, up through the final row, denoted row ДR. Each column has at least one filled-in cell, up through the final column, denoted column ДC. Every child has exactly one parent. For the first child in a sibship, the parent appears one-step-up-one-step-left from that child. For subsequent children in the sibship, their parent appears one-step-left and the first filled-in-cell-up.

In a simple spreadsheet example, Д, we assert that every patient is either male or female, with no other possibilities:
Д 0 1
0 .
1 . +♀
2 . +♂


It is convenient to label the medical-descriptors by the row in which they occur, namely:
Д 0 1
00 .
1 . +♀1
2 . +♂2


11C. Now let us consider the row-numbers as negative powers-of-two, in a PROBABILISTIC/BAYES INTERPRETATION. Worldwide, females are slightly more numerous than males. We may consider two minor occupational groups: teamsters and nurses. (I am guessing:) Teamsters are more numerous than nurses. Among teamsters, males are considerably more numerous than females. Among nurses, females are considerably more numerous than males. Therefore, if Bill's sex were unknown, but one knows that (i.e., has data that) Bill is a teamster, then it is reasonable (but not absolute) to conclude that Bill is a male. Likewise, if Mary's sex were unknown, but one knows that Mary is a nurse, then it is reasonable (but not absolute) to conclude that Mary is a female. This vignette is summarized as:
Д012
0[0]. .
1.~teamster, ~nurse[0].
2..+♀[1
3..+♂[2
4.+teamster[0] .
5..+♂[1
6..+♀[2
7.+nurse.7.
8..+♀[1
9..+♂[2

The default-order for each element is the row-number. However, we hold in reserve the right to change any of the orders of any of the elements in the disease-folio, except for İ0. By fiat, every occurrence of İ in a disease-folio is İ0; and every occurrence of in a disease-folio is 0;

11D. Finally, we might wish to include the information that every male is not a female, and every female is not a male, as follows:
Д0123
00.. .
1 . 0..
2 . .non-teamster
non-nurse2.
.
3 . ..+♀3
4 . ..+♂4
5 . .teamster5. .
6 . ..+♂6
7 . ..+♀7
8 . .nurse.8.
9 . ..+♀9
10 . ..+♂10
11 . 0..
12 . .+♀1 .
13 . .. ~♂1
14 . .+♂1 .
15 . .. ~♀1
In this example, Д, but not Д, may be used to fill in the missing data in П1, so that П1 becomes П0.

12. DESCRIPTION OF ORDER SYMBOLIC LOGIC FOR DISEASE-FOLIO.

12A. The hierarchical architecture of the disease-folio can be expressed in the notation of classical symbolic logic. Every parent, P, in the disease-folio, Д, has one-or-more children, C1, C2, C3, C4, .... The first child C1, is placed one-step-down-one-step-right from its parent, P. Subsequent children of the same parent C2, C3, C4,..., are placed in the same column as their siblings. In classical symbolic logic, we say: P -> (C1 | C2 | C3 | C4 | ...), where | denotes inclusive-or. The NANDSET for this expression is: {+P, ~C1, ~C2, ~C3, ~C4, ...}, where ~ denotes NOT, i.e., not all of +P, ~C1, ~C2, ~C3, ~C4, ..., can be true at once. Furthermore, if C1 has one-or-more children, i.e., grandchildren of P, namely, G1, G2, G3, G4, ..., then in classical symbolic logic, we say: (P & C1) -> (G1 | G2 | G3 | G4 | ...), where & denotes logical-and. The nandset for this classical logic expression is: {+P, +C1, ~G1, ~G2, ~G3, ~G4, ...}.
Д 0 1 2 3
0 . . .
1 . +P . .
2 . . +C1 .
3 . . . +G1
4 . . . +G2
5 . . . +G3
6 . . . +G4
7 . . +C2 .
8 . . +C3 .
9 . . +C4 .


12B. The ZERMELO-FRANKEL SET THEORY REPRESENTATION FOR SPREADSHEET ORDER-LOGIC consists of the ATOMSET, A, that is comprised of atoms, a, ~a, b, ~b, c, ~c, ....., i.e., A = {+a, ~a, +b, ~b, +c, ~c, .....}, Each atom, a, has one-and-only-one negation, denoted ~a, i.e, for every {a} c A, there exists a unique {~a} c A, where a ~= ~a. Each atom has Л DIMENSIONS, where {..., a,...} = {..., a1,...} = {..., 1a,...}, {..., 2a,...}, {..., 3a,...}, ..., {..., Лa,...}; {..., a2,...} = {..., 2a,...}, {..., 3a,...}, ..., {..., Лa,...}; and {..., aЛ,...} = {..., Лa,...}. Counter Л corresponds to the number of lines/rows in the disease-folio, RД. The zeroth and negative rows are undefined, i.e., ai is undefined for non-positive rows.

12C. For both the PATIENT-FOLIO, П, and the DISEASE-FOLIO, Д, it is convenient to perform calculations on NANDSETS. A NANDSET, X = {a, b, c, ...}, is a set of conditions that cannot all be true at once. Advantage of the nandset: order-neutral, unlike ->. By definition, there exists no nandset, X, and no {ai}, {~aj} c A, such that {ai, ~aj} c X. Such a nandset is called VACUOUS. Also, by definition of dimension, if i < j and {ai} c X, then {aj} c X, but not necessarily vice-versa. Finally, if nandsets {ai}, {~aj} c X, then set X is INCONSISTENT.

15. RESULTS: ACTIVE COLITIS.



15A. In a simple example, let us assert that active colitis, AC2, can only have three causes: ulcerative colitis, UC3; Crohn's disease, CD4; and infectious colitis, IC5, in that order. Then the corresponding nandset is: {AC2, ~UC3, ~CD4, ~IC5}. We say that: {AC2, ~UC3, ~CD4, ~IC5} C Д. That is, if the patient has AC2, then the patient cannot also lack UC3, CD4, and IC5. In the COMMENT SECTION of the surgical pathology report, the pathologist might write: the differential diagnosis includes: UC3, CD4, or IC5. Furthermore, the pathologist's report may RANK the differential diagnosis frequency, diagnostic certainty, therapeutic susceptibility, etc.

15B. For the patient, Smith, with AC2, the patient-folio-nandset is: {Smith, ~AC2} C П. We may COMBINE two nandsets, with NANDSET ADDITION, ⊕, as described below. In this example, {Smith, ~AC2} ⊕ {AC2, ~UC3, ~CD4, ~IC5} -> {Smith, ~UC3, ~CD4, ~IC5}; read: Smith has either UC3, CD4, or IC5, in that order.
Д 0 1 2
0 . .
1 . ~AC .
2 . +AC .
3 . . +UC
4 . . +CD
5 . . +IC


19. In a SPREADSHEET example:
Д 0 1 2 3
0 . . .
1 . ~colitis . .
2 . +colitis . .
3 . . +infectious colitis. .
4 . . +pseudomembranous colitis. .
5 . . +radiation colitis. .
6 . . +ischemic colitis. .
7 . . +microscopic colitis. .
8 . .. +lymphocytic colitis.
9 . .. +collagenous colitis.
10 . . +diversion colitis..
11 . . +self-limited colitis..
12 . . +focal active colitis..
13 . . +inflammatory bowel disease..
14 . .. +ulcerative colitis.
15 . .. +Crohn's disease.
...............

20. In a still more complete example:

 İ
     ~colitis
     +colitis.
        +infectious colitis.
        +pseudomembranous colitis.
        +radiation colitis.
        +ischemic colitis.
        +microscopic colitis.
           +lymphocytic colitis.
           +collagenous colitis.
        +diversion colitis.
        +self-limited colitis.
        +focal active colitis.
        +inflammatory bowel disease.
           +ulcerative colitis.
           +Crohn's colitis.
     +colitis.
        infectious colitis.
           acute onset.
           short duration.
           fever.
           diarrhea.
           crypt abscesses.
           goblet cell depletion.
           amebic colitis.
              amebic colitis.
                 trophozooites.
                 Entamoeba histolytica.
                 typical organisms: 40µm, abundant pink cytoplasm.
                    ingested erythrocytes.
              amebic colitis.
                 focal ulceration.
                 patchy ulcers.
                    cecum.
                    appendix.
                    rectosigmoid.
        pseudomembranous colitis.
           recent antibiotic administration.
           diarrhea.
           abdominal pain.
           pseudomembranes on endoscopy.
        radiation colitis.
           > 45,000 rads to colon.
           acute or chronic inflammation.
           diarrhea.
           abdominal pain.
           dusky mucosa endoscopically.
           edema endoscopically.
           loss of superficial vascularity endoscopically.
           acute phase radiation colitis.
              edema.
              vascular dilatation.
              acute cryptitis.
              superficial ulceration.
           chronic phase radiation colitis.
              stromal fibrosis.
              atypical fibroblasts.
              thickened subepithelial collagen.
              glandular atrophy.
              glandular distortion.
              vascular fibrosis.
              vascular intimal thickening.
              enlarged endothelial cells.
        ischemic colitis.
           elderly patient.
           acute onset.
           diarrhea.
           abdominal pain.
           nausea.
           vomiting.
           hematochezia.
           mild ischemic colitis.
              superficial hemorrhage.
              patchy mucosal necrosis.
              dilated vasculature.
              regenerating crypts.
           severe ischemic colitis.
              crypt dropout.
              acute inflammation.
              acute cryptitis.
              coagulative necrosis.
           late ischemic colitis.
              granulation tissue.
              scarring.
        microscopic colitis.
           microscopic colitis.
              watery diarrhea.
                 normal colonoscopy.
              usually ♀.
           microscopic colitis.
              lymphocytic colitis.
                 increased chronic inflammation in lamina propria.
                    >20 intraepithelial lymphocytes per 100 enterocytes.
              collagenous colitis.
                 thickened subepithelial collagen.
                 feathery strands of collogen between glands.
                 Paneth cell metaplasia.
                 mixed inflammation, lamina propria.
                 patchy denuded epithelium.
                 naked lamina propria.
        diversion colitis.
           colon excluded from fecal stream.
           prominent lymphoid aggregates.
           neutrophils, rare crypt abscess.
           normal crypt architecture.
        self-limited colitis.
           self-limited colitis.
              self-limited, short-lived clinical course.
              sudden onset, diarrhea, abdominal pain.
           self-limited colitis.
              acute phase self-limited colitis.
                 lamina propria hemorrhage, congestion.
                 detached, necrotic surface epithelium.
                 prominent acute inflammation, > chronic inflammation.
                 no crypt distortion.
              chronic phase self-limited colitis.
                 lamina propria fibrosis.
                 crypt distortion.
        focal active colitis.
           patchy neutrophilic infiltrates.
           without glandular distortion.
           without crypt abscesses.
        inflammatory bowel disease.
           inflammatory bowel disease.
              mixed inflammation of lamina propria.
              plasma cells reaching to muscularis mucosae.
              glandular mucus depletion.
              occasional Paneth cell metaplasia.
           inflammatory bowel disease.
              ulcerative colitis.
                 dense lymphoplasmacytic and neutrophilic infiltrate.
                 typically infiltrate limited to mucosa.
                 typically involves rectum, without skip lesions.
                 may involve entire colon = pancolitis.
                 may spill into ileum = backwash ileitis.
                 irregular areas of ulceration.
                 surrounding islands of preserved mucosa = pseudopolyps.
                 normal serosa.
              Crohn's colitis.
                 fissuring.
                    penetrate muscularis propria.
                    serosal involvement.
                 acute inflammation.
                 granulomas.
                 patchy transmural chronic inflammation.
                 intervening normal areas = skip lesions.


14. RESULTS: PROSTATE CARCINOMA.



14A. Another example: PROSTATE CANCER, where the variables are:
♂ = male.
♀ = female.
prc = prostate-cancer.
psa = prostate-specific-antigen.
pfx = pathologic-fracture positive for prostate-cancer.
pbx = prostate-biopsy.
>30 = >30 years old.
>60 = >60 years old.
usx = urinary tract symptoms.
□ = necessarily; □2 = necessarily-necessarily,....
# = intentionally.
Note that if a statement about a patient is necessarily2 true, then the statement is necessarily true; if a statement about a patient is necessarily3 true, then the statement is necessarily2 true; ....

14B. NARRATIVE: Every patient is important. Every important patient is either: male () or female (), not both and not neither. For every condition X, necessarilyi+1X implies necessarilyiX.
Every (important) male necessarily1 has prostate cancer, at the lowest level (□+prc). Every female necessarily4 does not have prostate cancer. If a male is >60 years old, or has urinary tract symptoms, then he necessarily2 has prostate cancer. If a male has a pathologic fracture positive for prostate cancer, then he necessarily4 has prostate cancer.
If a male necessarily2 has prostate cancer, then his physician intends to obtain a prostatic-specific-antigen test. If the male has a positive a prostatic-specific-antigen test, then he necessarily3 has prostate cancer. If a male necessarily3 has prostate cancer, then his physician intends to perform a prostate biopsy.
If a male either presents with a pathologic-fracture containing prostate cancer, or has a positive prostate-biopsy, then he necessarily4 has prostate cancer, and should receive therapy.

14C. Prostate cancer. SPREADSHEET.
Д01234 5
00 .....
1 . 0 . . . .
2 . . . . .
3 . . . ~♀ . .
4 . . . . .
5 . . . ~♂ . .
6 . . . . 4~prostate-cancer .
7 . 0 . . . .
8 . . ~□kX . . .
9 . . kX . . .
10 . . . k-1X . .
11 . 0 . . . .
12 . . ~♂ . . .
13 . . . . .
14 . . . ~>60 . .
15 . . . >60 . .
16 . . . . 2+prostate-cancer .
17 . . . . .
18 . . . ~urinary symptoms . .
19 . . . urinary symptoms . .
20 . . . . 2+prostate-cancer .
21 . . . . .
22 . . . ~pathologic fracture. . .
23 . . . pathologic fracture. . .
24 . . . . 4+prostate-cancer .
25 . . . . .
26 . . . ~□2+prostate-cancer . .
27 . . . 2+prostate-cancer. . .
28 . . . . request serum PSA. .
29 . . . 3+prostate-cancer. . .
30 . . . . request prostate biopsy. .


18. RESULTS: EMBRYOLOGY.



23. Another example: Approach to the Embryo. NARRATIVE.

23a. Approach to the Embryo. SPREADSHEET.


 +Carnegie Embryologic Developmental Horizons/Staging
      +Stage 1.
          +Zygote.
      +Stage 2.
      +Stage 3.
      +Stage 4.
      +Stage 5.
      +Stage 6.
      +Stage 7.
      +Stage 8.
      +Stage 9.
      +Stage 10.
      +Stage 11.
      +Stage 12.
      +Stage 13.
      +Stage 14.
      +Stage 15.
      +Stage 16.
      +Stage 17.
      +Stage 18.
      +Stage 19.
      +Stage 20.
      +Stage 21.
      +Stage 22.
      +Stage 23.


23b. Approach to the Embryo. SPREADSHEET.

 ~Three weeks.
 +Three weeks.
     +Amnionic cavity.
     +Ectoderm.
         +Lateral ectoderm.
         +neuro-ectoderm.
     +Mesoderm: dorsal-to-ventral.
         +Paraxial mesoderm.
         +somite.
         +Intermediate mesoderm.
              +cervical intermediate mesoderm.
              +thoracic-lumbar intermediate mesoderm.
                   +nephrogenic cord.
                        +excretory urinary system.
                             +nephrotomes.
                                  +nephric tubular epithelium.
                                  +nephric tubular lumen.
                                  +opening into intra-embryonic coelom.
         +lateral plate mesoderm.
              +somatic mesoderm.
              +Splanchnic mesoderm.
     +Entoderm.
     +Intra-embryonic coelom.


16. RESULTS: DERMATOPATHOLOGY.



24. Another example: Approach to the Skin. NARRATIVE.

24a. Approach to the Skin. SPREADSHEET.
Д012 34
0. ...
1 . ~skin. . . .
2 . +skin. . . .
3 . . non-neoplastic dermatoses. . .
4 . . . inflammatory dermatoses. .
5 . . . . acute inflammatory dermatoses.
6 . . . . chronic inflammatory dermatoses.
7 . . . . granulomatous inflammatory dermatoses.
8 . . . . infectious dermatoses.
9 . . . vesiculobullous dermatoses. .
10 . . . follicular dermatoses. .
11 . . . atrophic dermatoses. .
12 . . . connective-tissue dermatoses. .
13 . . . reactive dermatoses. .
14 . . neoplastic dermatoses. . .
15 . . . keratinocytic neoplastic dermatoses. .
16 . . . appendageal neoplastic dermatoses. .
17 . . . fibroblastic neoplastic dermatoses. .
18 . . . melanocytic neoplastic dermatoses. .


25. Another example: PSORIASIFORM DERMATITIS. NARRATIVE.

26. PSORIASIFORM DERMATITIS. SPREADSHEET.
Д012 34
0. ...
1 . ~skin. . . .
2 . +skin. . . .
3 . . ~PSORIASIFORM DERMATITIS. . .
4 . . +PSORIASIFORM DERMATITIS. . .
5 . . . Psoriasis .
6 ... . Munro microabscess.
7 . . . Healed psoriasis. .
8 . . . Prurigo nodularis. .


27. Another example: LICHENOID INTERFACE DERMATITIS. NARRATIVE.

28. LICHENOID INTERFACE DERMATITIS. SPREADSHEET.
Д012 34
0. ...
1 . ~skin. . . .
2 . +skin. . . .
3 . . ~LICHENOID INTERFACE DERMATITIS. . .
4 . . +Lichenoid interface dermatitis. . .
5 ... Connective Tissue Disease,
e.g., Lupus erythematosus.
.
6 ... Lichen planus..
7 ... Photodermatitis..
8... Drug reaction..
9 . . . Lichen sclerosus
et atrophicus.
.
10 . . . Poikiloderma
atrophicans vasculare.
.
11 . . . Graft-vs-host disease. .
12 . . . Lichen nitidus. .
13 . . . Lichenoid
actinic keratosis.
.
14 . . . Secondary syphilis. .
15 . . . . superficial dermal
plasma cell proliferation.
16 . . . Arthropod
bite reaction.
.
17 . . . Lichenoid
benign keratosis.
.
18 . . . Parapsoriasis. .
19 . . . Chronic progressive
pigmented purpura.
.
20... Mycosis fungoides, patch stage..
21.. .. Pautrier microabscess.
22.. ..Spongiform pustule of Kogoj.


29. Another example: ERYTHRODERMA. NARRATIVE.

30. ERYTHRODERMA. SPREADSHEET.
Д012 34
0. ...
1 . ~skin. . . .
2 . +skin. . . .
3 . . ~ERYTHRODERMA. . .
4 . . +ERYTHRODERMA. . .
5 . . . Sezary syndrome. .
6 . . . Seborrheic dermatitis. .
7 . . . Psoriasis. .
8 . . . Drug reaction. .
9 . . . Toxic epidermal necrolysis. .
10 . . . Sunburn.
Radiation burn.
First degree burn.
.
11 . . . Visceral malignancies
with erythema.
.
12 . . . Pityriasis
rubra pilaris.
.


31. Another example: Vesicular dermatitis. NARRATIVE.

32. Vesicular dermatitis. SPREADSHEET.
Д012 34
0. . . .
1 . ~dermatitis. . . .
2 . +dermatitis. . . .
3 . . ~vesicular dermatitis. . .
4 . . +vesicular dermatitis. . .
5 . . . +subcorneal pustule. .
6 . . . . +subcorneal pustular dermatosis.
7 . . . . dermatophytosis.
8 . . . . bullous impetigo.
9 . . . +intraepidermal acantholytic
vesicular dermatitis.
.
10 . . . . pemphigus vulgaris.
11 . . . . Darier's disease.
12 . . . . Hailey-Hailey disease.
13 . . . . Grover's disease.
14 . . . . Herpesvirus infection.
15 . . . . Staphylococcal
scalded skin syndrome.
16 . . . +subepidermal
vesicular dermatitis.
.
17 . . . . epidermolysis
bullosa acquisita.
18 . . . . porphyria
cutanea tarda.
19 . . . . bullous pemphigoid.
20 . . . . herpes gestationis.
21 . . . . dermatitis herpetiformis.
22 . . . . linear IgA dermatosis.
23 . . . . subacute cutaneous
lupus erythematosus.


33. Vesicular dermatitis. FLOW CHART.

 İ
     ~dermatitis.
     +dermatitis.
        ~vesicular dermatitis.
        +vesicular dermatitis.
           subcorneal pustule.
           intraepidermal acantholytic vesicular dermatitis.
           subepidermal vesicular dermatitis.
        +vesicular dermatitis.
           +subcorneal pustule.
              subcorneal pustular dermatosis.
                 subcorneal pustular dermatosis.
                    Sneddon-Wilkinson disease.
                 subcorneal pustular dermatosis.
                    subcorneal neutrophils, rare eosinophils.
                    mild epidermal spongiosis.
                    superficial perivascular neutrophilic infiltrate.
              dermatophytosis.
                 positive PAS/GMS stain for dermatophytosis.
              bullous impetigo.
                 subcorneal neutrophils, rare eosinophils.
                 mild epidermal spongiosis.
                 superficial perivascular neutrophilic infiltrate.
           +intraepidermal acantholytic vesicular dermatitis.
              pemphigus vulgaris.
                 widespread acantholysis.
                 middle-aged or older.
                 fragile, flaccid bullae.
                 intra-epidermal acantholytic vesicular dermatosis.
                 suprabasal clefts and blisters
                 acantholysis extends to follicles.
                 epidermal spongiosis and eosinophils.
                 ~corps ronds and grains.
              Darier's disease.
                 Darier's disease.
                    keratosis follicularis.
                 Darier's disease.
                    autosomal dominant.
                    slowly progressive, hyperkeratotic papules.
                       follicular distribution.
                    suprabasal acantholysis.
                    clefts or lacunae.
                    corps ronds and grains.
              Hailey-Hailey disease.
                  Hailey-Hailey disease.
                     benign familial pemphigus.
                  Hailey-Hailey disease.
                     autosomal dominant.
                     acantholysis, epidermal hyperplasia.
                     full-thickness acantholysis.
                     no hair-follicle involvement.
              Grover's disease.
                  Grover's disease.
                     transient acantholytic dermatosis.
                  Grover's disease.
                     spongiosis.
                     small, focal acantholysis.
              Herpesvirus infection.
                  acantholysis.
                  multinucleated cells.
                  typical Herpes cytopathic changes.
              Staphylococcal scalded skin syndrome.
                  focal acantholysis.
                  cleavage plane in granular layer.
            +subepidermal vesicular dermatitis.
               sparse infiltrate.
                  epidermolysis bullosa acquisita.
                  porphyria cutanea tarda.
               eosinophilic infiltrate.
                  bullous pemphigoid.
                  herpes gestationis.
                     pregnant ♀ patient.
               neutrophilic infiltrate.
                  dermatitis herpetiformis.
                  linear IgA dermatosis.
                  subacute cutaneous lupus erythematosus.


34. Another example: Fibrosing dermatosis. NARRATIVE.

35. Fibrosing dermatosis. FLOW CHART.

 İ
     ~dermatosis.
     +dermatosis.
         ~fibrosing-dermatosis.
         +fibrosing-dermatosis.
            +hypertrophic scar.
            +keloid.
            +lichen sclerosus.
            +radiation sclerosis.
            +morphea/scleroderma.
         +fibrosing-dermatosis.
            +hypertrophic scar.
               horizontally oriented fibroblasts and collagen bundles.
               perpendicularly oriented blood vessels.
            +keloid.
               haphazard arrangement, irregularly thickened collagen bundles.
            +lichen sclerosus.
                edema.
                hyalinization of papillary dermis.
                inflammatory cell band-like infiltrate.
            +radiation sclerosis.
                hyalinization of blood vessels.
                history of irradiation.
            +morphea/scleroderma.
               sclerosis involving:
                  reticular dermis.
                  sututaneous fat.
                  plasma-cell infiltrate.


36. Another example: Skin cysts. NARRATIVE.

37. Skin cysts. FLOW CHART.

 İ
     ~skin.
     +skin.
         ~skin cyst.
         +skin cyst.
            +epidermal inclusion cyst.
            +trichilemmal cyst.
            +hidrocystoma.
            +dermoid cyst.
            +steatocystoma.
         +skin cyst.
            +epidermal inclusion cyst.
                lining epithelium: similar to surface epidermis.
                granular cell layer present.
                cyst contents: laminated keratin.
            +trichilemmal cyst=pilar cyst.
                lining epithelium: similar to follicular isthmus.
                granular cell layer absent.
                cyst contents: compact keratin, areas of calcification.
            +hidrocystoma.
                lining epithelium:
                   tall columnar epithelium.
                   outer myoepithelial layer.
                cyst contents:
                   decapitation secretion.
            +dermoid cyst.
                lining epithelium:
                   squamous epithelium.
                   mature adnexal structure in wall.
                cyst contents:
                   hair-shafts in lumen.
            +steatocystoma.
                lining epithelium:
                   squamous epithelium.
                   corrugated keratin.
                   sebaceous lobules in wall.
                cyst contents: laminated keratin.


38. Another example: Dysplastic/neoplastic proliferations of skin. NARRATIVE.

39. Dysplastic/neoplastic proliferations of skin. FLOW CHART.

 İ
     ~skin.
     +skin.
         ~dysplastic/neoplastic proliferations of skin.
         +dysplastic/neoplastic proliferations of skin.
             +epithelial dysplastic/neoplastic proliferations.
                 +epidermal dysplastic/neoplastic proliferations.
                 +adnexal dysplastic/neoplastic proliferations.
                     +follicular.
                     +eccrine.
                     +apocrine.
                     +sebaceous.
             +melanocytic dysplastic/neoplastic proliferations.
                 +nevus.
                 +melanoma.
             +mesenchymal dysplastic/neoplastic proliferations.
                 +vascular.
                 +fibroblastic.
                 +smooth-muscle.
                 +neural.
            +lymphoproliferative dysplastic/neoplastic proliferations.
                +lymphoma.
                +histiocytosis X.
         +dysplastic/neoplastic proliferations.
             +epithelial dysplastic/neoplastic proliferations.
                 +epidermal dysplastic/neoplastic proliferations.
                     seborrheic keratosis.
                     clear cell acanthoma.
                     verruca vulgaris.
                     actinic keratosis.
                     squamous cell carcinoma.
                     keratoacanthoma.
                 +adnexal dysplastic/neoplastic proliferations.
                     +follicular.
                         trichoepithelioma.
                         pilomatricoma.
                         trichilemmoma.
                         basal cell carcinoma.
                     +eccrine.
                         syringoma.
                         poroma.
                         spiradenoma.
                         porocarcinoma.
                     +apocrine.
                         cylindroma.
                         clear cell hidradenoma.
                         syringocystoma papilliferum.
                         hidradenoma papilliferum.
                         microcystic adnexal carcinoma.
                     +sebaceous.
                         nevus sebaceus.
                         sebaceous hyperplasia.
                         sebaceous adenoma.
                         sebaceous epithelioma.
                         sebaceous carcinoma.


17. RESULTS: GENITOURINARY PATHOLOGY.



40. Another example: OVARIAN NEOPLASMS. NARRATIVE.

41. OVARIAN NEOPLASMS. FLOW CHART.

 İ
     ~ovary
     +ovary
         ~ovarian neoplasm.
         +ovarian neoplasm.
             +epithelial ovarian neoplasm.
                 +epithelial cystic ovarian neoplasm.
                 +epithelial solid ovarian neoplasm.
             +ovarian sex cord stromal tumor.
             +ovarian germ cell tumor.
             +other ovarian neoplasm.
         +ovarian neoplasm.
             +epithelial ovarian neoplasm.
                 +epithelial cystic ovarian neoplasm.
                     benign serous tumor.
                     borderline atypically proliferating serous tumor.
                     serous adenocarcinoma.
                     benign mucinous tumor.
                     borderline atypically proliferating mucinous tumor.
                     mucinous adenocarcinoma.
                 +epithelial solid ovarian neoplasm.
                     endometrioid adenocarcinoma.
                     clear cell tumor.
                     Brenner tumor.
                     atypically proliferating Brenner tumor.
                     malignant Brenner tumor.
                     transitional cell carcinoma of ovary.
                     small cell carcinoma of ovary.
             +ovarian sex cord stromal tumor.
                 granulosa cell tumor.
                    granulosa cell tumor adult type.
                    granulosa cell tumor juvenile type.
                 Sertoli cell tumor.
                 Sertoli-Leydig cell tumor.
                 gynandroblastoma.
             +ovarian germ cell tumor.
                 mature teratoma.
                 dermoid cyst.
                 dysgerminoma.
                 yolk sac tumor.
                    Schiller-Duval bodies.
                    small cystic spaces.
                 mixed germ cell tumor.
                 embryonal carcinoma.
                 polyembryoma.
             +other ovarian neoplasm.
                 struma ovarii.
                     mature thyroid tissue.
                 struma carcinoid.
                     neuroendocrine nests.
                        small blue cell tumor.
                        associated with teratoma.
                 metastatic tumor.
                     malignant cells in cortex and hilum.
                     primary tumor usually gastrointestinal.
                 gonadoblastoma.
                     germ cells.
                     calcifications.
                     amorphous eosinophilic material.
                 carcinosarcoma.
                     malignant stromal elements.
                        malignant epithelial elements.


42. Another example: ADULT RENAL MASS. NARRATIVE.

43. ADULT RENAL MASS. FLOW CHART.

 İ
     ~adult.
     +adult.
         ~renal mass.
         +renal mass.
             +multicystic renal mass.
             +solid renal mass.
         +renal mass.
             +multicystic renal mass.
                 acquired renal cystic disease.
                    renal cortical cysts.
                 medullary sponge kidney disease.
                    renal medullary cysts.
                 adult polycystic kidney disease.
                    renal cortical and medullary cysts.
             +solid renal mass.
                 predominantly inflammatory.
                    xanthogranulomatous pyelonephritis.
                 predominantly cystic.
                    renal cell carcinoma.
                    cystic nephroma.
                 predominantly vascular.
                    renal cell carcinoma.
                    hemangioma.
                    angiomyolipoma.
                    juxtaglomerular cell tumor.
                 predominantly tubular.
                    renal cell adenoma.
                    oncocytoma.
                    metanephric adenoma.
                    metastatic adenocarcinoma.
                 predominantly spindle cells.
                    sarcomatoid renal cell carcinoma.
                 small blue cell tumor.
                    lymphoma.
                 clear cell tumor.
                    renal cell carcinoma.
                 papillary differentiation.
                    renal cell carcinoma.
                    metanephric adenoma.


44. In CLASSICAL SYMBOLIC LOGIC, there are two RULES OF INFERENCE: SUBSTITUTION OF EQUALS; and MODUS PONENS. In Substitution of Equals, if a pair of numbers, x and y, are equal, then in any mathematical expression containing x, y may be freely substituted. In Modus Ponens, if x is true and x implies y, then y is true.
1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.

2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.

3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty;

4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).

5. Conative rule. Necessary data should be collected if the patient consents (conative).

6. Vexative rule. Data or demanded in order of medical need;

7. Ontology rule. Necessary data increase one's certainty of medical entities.

8. Ethical data collection rule. All data are either positive, negative, failed-attempt, or not-attempted.

9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.


45. In Spreadsheet Order Logic (SSOL), modus ponens is generalized as NANDSET ADDITION, [+], as follows: if x, y are nandsets and there exists a unique wi C x such that ~wj C y, then z = (x [+] y) = (x ∪ y) - {+w0}.

46. In the ZFST model, the ATOMSET, A, consists of three, mutually exclusive sets: PATIENTS, P, DATA, D, and ENTITIES, E, where İ C E. That is, A = (P ∪ D ∪ E), (P ∩ D) = Ø, (P ∩ E) = Ø, and (D ∩ E) = Ø.

47. Every datum and every entity has exactly one, distinct negation, but no patient has a negation. That is:
(a) For every p C P and a C A, a ~= p;
(b) For every d C D, there exists a unique ~d C (D-(P∪E)); and
(c) and for every e C E, there exists a unique ~e C (E-(P∪D)).


48. In SSOL, we use the operation, NANDSET ADDITION, [+], where (x [+] y) = z, if and only if there exists a unique wi C x, ~wj C y, and z = (x ∪ y) - {w0}.

All nandsets of the DISEASE-FOLIO, Д, are consequence-nandsets. For every x C ÇД, and x c y, it is true that y C ÇД. If x, y are consequential-nandsets of Д, and (x [+] y) = z, then z is a consequential-nandset of Д.

RESULTS.

DEFINITION 1. Set of anonymous completely-described patients, Ю. For every U C Ю:
1. U c (A-P).

2. For every U C Ю and u C U, ~u ~C U.

3. For every u C U, there exists a unique INFLECTION POINT, I, at which:
3a. For 0 < j < I, uj/uЛ = -1; and

3b. For I < k < Л, uk/uI = +1.


DEFINITION 2. CONSEQUENCES OF Ш, denoted ÇШ. Nandset X C ÇШ if and only if for every U C Ю such that X c U, there exists a Y C ÇШ such that Y c U.

DEFINITION 3. COMPUTED CONSEQUENCES OF Ш, denoted çШ. X C ÇШ if and only if for every........... THEOREM 1. Classical-logic inclusive-or.
The spreadsheet:
Д01
1[0] .
2. +A[0]
3. ~A[0]
is vacuous.
Proof. The only nandset is: {i0, ~a0, +a0}, which is vacuous, since it excludes no anonymous completely-decribed patient.

THEOREM 2. Classical-logic and.
The spreadsheet:
Д012
1[0] ..
2. +A[0].
3.. ~A[0]
is contradictory.
Proof. The nandsets are: {i0, ~a0} [+] {i0, +a0, +a0} = Ø, which is contradictory, since it excludes all anonymous completely-decribed patients.



THEOREM 3. Order-logic inclusive-or.
The spreadsheet:
Д01
1[0] .
2. +A[1
3. ~A[2
is NOT vacuous.
Proof. The nandsets are: {+i0, ~a1, +a2} and {+i0, ~a2, +a2}. The first nandset is not vacuous, since it excludes the anonymous completely-decribed patient, {+i0, ~a0, ~a1, +a2}



THEOREM 4. Order-logic and.
The spreadsheet:
Д012
1[0] ..
2. +A[1.
3.. ~A[2
is contradictory.
Proof. The nandsets are: {+i0, ~a1}; {+i0, ~a2}; {+i0, +a1, +a2}; and {+i0, +a2, +a2} = {+i0, +a2}.
Then {+i0, ~a2} [+] {+i0, +a2} = Ø, which is contradictory.

THEOREM 5. çШ = ÇШ, i.e., the computed consequences of Ш equals the consequences of Ш.
Proof. See:
http://www.netautopsy.org/modlthry.htm

DEFINITION 3. CONSISTENCY. Ш. is consistent if and only if there exists a U C Ю such that for every .............

DEFINITION 4. CONSISTENCY.

DEFINITION 5. Nandset, X, is VACUOUS if and only if for every U C Ю, X ~c U.

FIAT. Every patient exists, i.e., there exists no patient, p C P, for which {p} C ÇП.

FIAT. İMPORTANCE0 belongs to every disease-folio, i.e., {~İ} C Д. Therefore, if the system is consistent, then {+İ} ~C Д.

FIAT. Every patient is important, i.e., there exists no patient, p C P, for which {p, ~İ} C ÇП.

THEOREM 6. No patient is unimportant.
Proof. Suppose that there exists an unimportant patient, p C P. Then {p,+İ} C ÇП, and {p,+İ} ⊕ {p,+İ} = {p} C ÇП. Contradiction of fiat, i.e., {p} ~C ÇП.

THEOREM 7. Nandset dimension subset. For every 0 < i < j < Л, {..., aj,...} c {..., ai,...}.
Proof. Consider any {..., ka,...} from {..., aj,...} By definition, 0 < i < j < k < Л. By definition, {..., ka,...} is from {..., ai,...}.

THEOREM 8. Nandset subset. If x C Д, and x c y, then y C Д.
Proof. Consider any anonymous completely-described patient, p, such that y c p . Then by elementary set theory, x c y c p . By definition, y C Д.

THEOREM 9. NANDSET ADDITION, [+]. If x, y are nandsets for the spreadsheet, and x ⊕ y = z, then z is a nandset for the spreadsheet. That is, nandset-modus-ponens.
Proof. Let w be the flip-flop element of x,y, as defined. Either Лw C x or ~Лw C x. Without loss of generality, suppose that Лw C x . Now consider any completely-described patient, p, such that z c p. By definition of completely-described patient, either Лw C p or ~Лw C p If Лw C p , then x c (z ∪ Лw) c p . Alternatively, ~Лw C p , and y c (z ∪ ~Лw) c p . Therefore, z is a nandset for the spreadsheet.

THEOREM 10. Nandset vacuity. Any nandset that contains a term and its negation is vacuous.
Proof. Consider any nandset x, such that y, ~y C x. Consider any completely-described patient, p C Ю. By definition 1 of anonoymous completely-described patient, y C p or ~y C p, but not both. Without loss of generality, let y C p. By elementary set theory, since ~y ~C p, therefore, x ~c p. Since this is true for all completely-described patients, x is vacuous.

THEOREM 11. Nandset inconsistency. If {x}, {~x} are nandsets for the spreadsheet, then the spreadsheet is inconsistent.
Proof. {x} [+] {~x} = Ø c Ш, which is inconsistent. ..................

The following theorems examine properties of the formalism. Row-numbers are indicated in the leftmost column. Column-numbers are indicated in the topmost row.

THEOREM 12. Inconsistent folio.
Д01
0[0] .
1.[0]
is inconsistent.
Proof. The only nandset defined for the folio is: {+i0, +i0} = {+i0}, which is inconsistent.

THEOREM 13. Inconsistent folio.
Д01 2
00. .
1.+A0 .
2.. 0
is inconsistent.
Proof. The nandsets defined for the folio are: {+i0, ~a0}, and {+i0, +a0, +i0} = {+i0, +a0}. These nandsets are inconsistent because: {+i0, ~a0} [+] {+i0, +a0} = Ø.

THEOREM 14. Vacuous folio.
Д01
00 .
1.0
is vacuous.
Proof. The only nandset defined for the folio is: {+i0, ~i0}, which is vacuous.

THEOREM 15.
Д012
00..
1.+A1.
2..0
IS CONGRUENT TO:
Д 0 1 2
0 0 . .
1 . +A1 .
2 . . .

Proof. The nandsets defined for the upper folio are: {+i0, ~a1}; {+i0, ~a2}; and {+i0,+a1, ~i0}, and {+i0,+a2, ~i0}, which are vacuous.
The nandset defined for the lower folio is: {+i0, ~a1} and {+i0, ~a2}.
Therefore, the non-vacuous upper and lower folios are equal.

THEOREM 16. Non-Vacuous folio.
Д01
00 .
1.+A1
2.~A2
is non-vacuous.
Proof. The nandsets defined for the folio is: {+i0, ~a1, +a2}, which is non-vacuous; and {+i0, ~a2, +a2}, which is vacuous. We assert that {+i0, ~a1, +a2} is non-vacuous, because by Definition 1, consider any U C Ю such that U c {+i0, ~a1, +a2}.

THEOREM 17. Vacuous folio.
Д01
00.
1.+A0
2.~A0
is vacuous.
Proof. The only nandset defined for the folio is: {+i0, ~a0, +a0}, which is vacuous.

THEOREM 18. Vacuous folio.
Д012
00..
1.+A0.
2..+B0
3..~B0
4.~A0.
5..+B0
6.. ~B0
is vacuous.
Proof. The nandsets defined for the folio are: {+i0, ~a1, +a1}, {+i0, +a1, ~b1, +b1}, and {+i0, ~a1, ~b1 +b1}, which are all vacuous.

THEOREM 19.
Д012
00. .
1.+A[1 .
2.. +A[2
IS CONGRUENT TO:
Д012
0 0 ..
1.+A[1 .

Proof. The nandsets for the upper folio are: {+i1, ~a2} and {+i1, +a2, ~a3}. However, {+i1, +a2, ~a3} is a vacuous nandset. The nandset for the lower folio is: {+i1, ~a2}. Therefore, the two folios have the same non-vacuous nandsets.

THEOREM 20.
Д01
00.
1.+A1
2.+B2
if and only if İ1 implies (A1 or B2).
Proof. The nandset for 0 implies (+A1 or +B2) is {+i0, ~a1, ~b2}. The nandset for the folio is likewise {+i0, ~a1, ~b2}.

THEOREM 21.
Д01
00 .
1.+A1
2.+B2
3.+C3
if and only if İ0 implies (A1 or B2 or C3).
Proof. The nandset for 0 implies (A1 or B2 or C3) is {+i0, ~a1, ~b2, ~c3}. The nandset for the folio is likewise {+i0, ~a1, ~b2, ~c3}.

THEOREM 22.
Д012
00..
1.+A1.
2..+B2
if and only if İ0 implies (A1 and B2).
Proof. The nandset for 0 implies (A1 and B2) is {+i0, ~a1}, {+i0, ~a2}, and {+i0, ~b2}. The nandset for the folio is likewise {+i0, ~a1}, {+i0, ~a2}, and {+i0, ~b2}.

RESULTS: CONSISTENCY.
CONSISTENCY is the mathematical property that every well-formed (i.e., syntactically correct) statement is either true or false, but not both. In this report, consistency takes the form that there exists no ш C ÇД such that C ÇД.

RESULTS: COMPLETENESS.
COMPLETENESS is the mathematical property that every well-formed (i.e., syntactically correct) statement is either true and provable; or else false and a counterexample may be constructed. G¨del proved that in mathematical systems as complex as ordinary arithmetic and ordinary geometry, there are some true statements that are not provable. In this report, we demonstrate that, in the finite system of patients, all true statements about each patient are findable by the nandset-addition algorithm. See: http://www.netautopsy.org/modlthry.htm

RESULTS: POLYNOMIAL-COMPUTABILITY.
COMPUTABILITY is the mathematical question of how many steps/computer-resources it resolves to solve a problem of size n using a particular computer algorithm. The classes of computability are:
1. ≈ log2n steps, logarithmic (sorted fetch).
2. ≈ n steps, linear (unsorted fetch).
3. ≈ n log2n steps, log-linear (sorting).
4. ≈ nk steps, polynomial (inefficient sorting).
5. ≈ non-polynomial-complete: at least polynomial (tree problems).
6. ≈ 2n steps, exponential.
7. ≈ greater than 2n steps, exponential (Pressburger algebra).
8. infinite, (Gödel statements).
For all intents and purposes, a computer algorithm that requires more than polynomial steps is incomputable for interesting size n, i.e., more than a dozen or so, with today's computing machinery. Therefore, it is important to prove that a given algorithm is polynomial. See: http://www.netautopsy.org/modlthry.htm

RESULTS: QUINE NOTATION.
The late Harvard professor of philosophy, Willard van Ormand QUINE, who was one of the participants in the August, 1939, conference of the famed Vienna Circle (Wiener Kreis) of Exact Logic, promoted the concept of NULLITY, herein called NANDSET, namely, a combination of mathematical statements that cannot all be true. One of the interesting properties of the binary nandset operation is that all operators of classical logic can be constructed from binary nandsets, originally known as Scheffer δ.

RESULTS: MODAL LOGIC THEORY.
MODAL LOGIC THEORY is the theory that medical entities have LEVELS OF CERTAINTY, and that there are ethical constraints upon the collection of medical data, namely, the restriction on collecting data that are medically unnecessary; and the mandate to collect data, subject to the patient's permission, that are medically necessary. Operations such as: it is certain that, it is medically necessary that, the patient refuses permission to collect, are called MODAL OPERATORS. See:
http://www.netautopsy.org/modlthry.htm
The modal logic theory previously developed in our laboratory recognizes true-false atomic-statements, A, comprised of data, D, and medical-entities, E; modal operators for certainty ($), intention (#), and patient-harm (!); and the following constraints/rules:
1. Double-negative rule. The double-negative of each atomic-statement equals the positive of that atomic-statement.

2. Progressive certainty rule. A more-certain atomic-statement implies a less-certain atomic-statement.

3. Data-absolute rule. An observed-datum is equally true or false or missing-value at all levels of certainty;

4. Hippocratic rule. Data should be not collected unless needed (Hippocratic).

5. Conative rule. Necessary data should be collected if the patient consents (conative).

6. Vexative rule. Data or demanded in order of medical need;

7. Ontology rule. Necessary data increase one's certainty of medical entities.

8. Ethical data collection rule. All data are either positive, negative, failed-attempt, or not-attempted.

9. Cover Rule. Entities are re-calculated at each moment in time, based upon available evidence at the time; Data, once collected, are never changed or forgotten.


RESULTS: FUZZY/MULTI-VALUED LOGIC.
MULTI-VALUED LOGIC or FUZZY LOGIC are forms of logic in which a statement can be true, false, or in-between. First invented by Prof. Ŀukasiewicz in 1903, the inventor of "Polish logic", for English-speakers who cannot pronounce his name. Much-developed and popularized by Prof. Lofti A. Zadeh in the 1960s-1980s.

RESULTS: EXPERT SYSTEM.
An EXPERT SYSTEM is a system that mimics the behavior of an expert, such as an anatomic pathologist. At this moment in history, an expert system for anatomic pathology is impossible, because computerized image recognition is in such a primitive state. Therefore, even the basic data of anatomic pathology cannot be entered into the system.

RESULTS: SPREADSHEET.
A SPREADSHEET is a collection of rectangular tables, called sheets. I prefer the more colorful Italian term, FOLIOS. Each rectangular table consists of rows and columns. The intersection of a particular row and particular column is a cell. In this report, a spreadsheet-cell may be empty, or may contain a character-string that names a medical-object. Medical objects include: patient-identifiers, observations/data, and medical entities, such as diseases. Each filled-in spreadsheet-cell is either true (+) or false (~). In this report, we use Microsoft® Excel®.

RESULTS: VISUAL BASIC® PROGRAMMING/SCRIPTING.
VISUAL BASIC® is the programming/scripting language attached to many Microsoft® products. VB allows the user to program sophisticated operations that are not in the usual repertoire of a particular software application. In this report, VB is attached to Microsoft® Excel®, and we have written a program/script that tests a given spreadsheet for consistency; and calculates the conclusions for a particular patient.

RESULTS: SEMANTIC MODEL.
All true mathematicians are Platonists. That is, they agree that there is a world of ideal forms, and we mortals attempt to describe these forms with our imperfect words and mathematical devices. In particular, a mathematical theory of a real-world process presumes that such a process is actually happening. In this report, the real-world process, or SEMANTIC MODEL is the WORLD OF POSSIBLE PATIENTS. That is, there is a collection of possible patients, not all of which are observable; and any particular patient is non-observable in complete detail. However, some patients are IMPOSSIBLE PATIENTS, such as a patient with a serum potassium of 100 mEq/dL.

24. CONTINGENCY TABLE ANALYSIS.



A Contingency Table is a rectangular table, with rows and columns. The simplest contingency table is the 2×2 Contingency Table (2×2CT), with two rows and two columns. Typically a 2×2CT is a contest between a new test for a particular disease or condition, versus an established test or gold standard, as follows:
.New
Test->
NoYesTotal
GoldNoa bv
StandardYesc dw
.Totalx yz
In this 2×2 Contingency Table, the CELL TOTALS are a, b, c, d. That is, the number of patients with Gold Standard=No, Test=No is cell total a. The number of patients with Gold Standard=No, Test=Yes is cell total b. The number of patients with Gold Standard=Yes, Test=No is cell total c. The number of patients with Gold Standard=Yes, Test=Yes is cell total d. Cell totals a, d represent patients with a correct outcome, that is, the new test matches matches the gold standard. Cell total b represents a false positive, false alarm, or Type I Error, where the gold standard is no but the new test is yes. Cell total c represents a false negative, unintended miss, or Type II Error, where the gold standard is yes but the new test is no. Row marginal totals u, v, represent the sum of both cells for a particular row. That is, u = a + b, v = c + d. Column marginal totals x, y, represent the sum of both cells for a particular column. That is, x = a + c, y = b + d. The grand total, z, is the sum of all four cell totals. That is, z = a + b + c + d = u + v = x + y.

The CHISQUARE TEST, χ2. χ2 = ∑((o-e)2)/e, where o=observed, e=expected.

FISHER EXACT TEST. F = [n!/(k!×(n-k)!)] × [pk×(1-p)(n-k)], where n is the grand total, and k is a given cell total.

20. DESIGN OF COMPUTER SCRIPTS.



1. A spreadsheet is a collection of rectangular tables, called SHEETS or FOLIOS. Each rectangular table consists of nrow ROWS and ncol COLUMNS. The intersection of a particular row and a particular column is a CELL. A given spreadsheet-cell may be empty, or may contain a character-string that names a medical-object, including: patients, each with a unique identifier; observations/data, including historical information, physical signs, radiographic findings, laboratory tests, and histologic image-descriptions; and abstract medical entities, such as diseases and pathologic processes, e.g., neoplasia, inflammation, trauma, ischemia, ...... It is assumed that all observations/data and all medical-objects can be reduced to a collection, possibly very large, of true-false statements. The present model consists of a PATIENT-FOLIO and a DISEASE-FOLIO.

2. The (top) disease-folio is labeled DISEASE. There are nrow filled-in ROWS, ncol COLUMNS, and a Visual Basic for Applications (VBA) computer-script, residing in the MODULES of the *.xls file. Results are deposited in a RESULT FOLIO.

3. The limit of nrow is arbitrarily set at nrow<50. The number of columns is ncol<nrow<50. The ORIGIN, I, is placed in the topmost-leftmost row, irow=1, icol=1, and no other filled-in cells occupy the topmost row or leftmost column.

4. Each PARENT has one-or-more filled-in CHILDREN/DAUGHTERS. The next-lower-next-right child is the FIRSTBORN.

5. All SIBLINGS/SISTERS of the firstborn are in the same column as the firstborn. No row is empty. All filled-in-cells in the same column as the firstborn are siblings, until interrupted by an AUNT in a prior column, or a blank row.

6. The Visual Basic for Applications (VBA) script has three steps, as follows:
1. Harvesting the contents of the disease-folio, csv(icsv,icol).
2. Converting the disease-folio into the nandset, nand(inand,kname).
3. Solving the nandset, soln(isoln).


7. Harvesting the disease-folio, csv(icsv,icol), where icsv<50 and icol<ncol<50. Each row, irow, in array csv is SPLIT BY COMMAS. The SPLIT ARRAY is CSVSPL. There should be exactly one filled-in cell in every row, up to the final row, numbered nrow<50. The first row after row nrow is blank. The disease-folio can always be SAVEd AS a *.csv file

8. At every filled-in-cell for a given row, the first character is either + or -, the SIGN of that filled-in-cell. The subsequent character of that filled-in-cell comprise the NAMESTRing for that row. A filled-in-cell assumes the value Cells(irow,jcol).Value , with length(Cells(irow,jcol).Value)<50.

9. The NAME-COUNTER nname<nrow<50, counts the number of distinct elements of the NAME-ARRAY, name(iname). Two names are equal iff and only if their NAMESTRings match. By definition/fiat, name(1)=I.

10. The array of NANDSETS/NULLITIES corresponds to the set of non-vacuous, consistent firstborns. That is, every non-vacuous, consistent firstborn corresponds to exactly one nandset.

11. A filled-in-cell is a firstborn if and only if it has a parent located one-up-one-left.

12. A filled-in-cell is a sibling/sister if and only if it is the same column below its firstborn, and not interrupted by an intervening aunt in a previous column.

13. Each nandset takes the form, {p0, p1, ..., pq, -s0, -s1, ..., -sr}, where p0, p1, ..., pq, are parents, s0 is the firstborn, and s1, ..., sr are siblings/sisters.

14. By fiat/definition, {-İ} is a solution. The software searches through nandsets with cardinality less than or equal 2. A nandset of cardinality zero signals an INCONSISTENCY. A nandset of cardinality one is a SOLUTION. If x is a nandset of cardinality 2, and y is a solution, then w = x [+] y is a solution. Calculate to exhaustion.

15. Given two nandsets, x, y, where there exists a unique z C x such that -z C y, calculate w = x [+] y = (x ∪ y) - {z,-z} to exhaustion.

16. Post the solution in the RESULT FOLIO.

17. The Perl program, ordrlogc.cgi, at URL:
http://www.netautopsy.org/ordrlogc.txt
converts a *.csv-file, downloaded from a *.xls-file, prepared according to the rules of order-logic, described at: http://www.netautopsy.org/ordrlogc.htm The general form is:
                 1,+i,,,,,,
                 2,,+u,,,,,
                 3,,,+w,,,,
                 4,,,-x,,,,
                 5,,-v,,,,,
                 6,,,+y,,,,
                 7,,,-z,,,,
In the software, the *.csv-array is loaded as:
      $csvar[1]="1,+i,,,,,,";
      $csvar[2]="2,,+u,,,,,";
      $csvar[3]="3,,,+w,,,,";
      $csvar[4]="4,,,-x,,,,";
      $csvar[5]="5,,-v,,,,,";
      $csvar[6]="6,,,+y,,,,";
      $csvar[7]="7,,,-z,,,,";
The topmost-leftmost filled-in cell is named +i. Each file has consecutive ROWs, numbered 1,...,$nrow, and NAMes, numbered 1,...,$nnam. In the above *.csv file, the rows are numbered 1,...,7, and the names are: i, u, v, w, x, y, z. Each row has exactly one filled-in cell. Therefore, each row, $irow, has a unique designated column-number, $rwcl[$irow], a unique designated name, $rwnm[$irow], and a unique designated sign, $rwsg[$irow]. Some rows contain a firstborn, FSB, i.e., a filled-in cell whose immediate-left-immediate-above-cell is filled-in. All other rows are either the ultimate-parent, i, or else a sibling, SBL. To each firstborn, there corresponds at most one non-vacuous nandset, NDS. The software constructs the set of firstborn-nonvacuous nandsets, and solves them. The example-file is as follows:
           1,+i,,,,,,
           2,,+i,,,,,
           3,,,+female,,,,
           4,,,,-male,,,
           5,,,+male,,,,
           6,,,,-female,,,
           7,,+i,,,,,
           8,,,+male,,,,
The rows are numbered 1,...,8, and the names are: i, female, male. This file states that every patient is male or female; every male is a female; every female is a male; and the current patient is a male. From this information, the program concludes that the patient is not a female.

26. REFERENCES.



1. Kao GF.
in World Health Organization Consensus Conference on skin diseases. 2005.

2. Epstein JI.
in World Health Organization Consensus Conference on urological tumors.

3. Sinard J.
Outlines in Pathology.

4. Haber
Differential diagnosis in Surgical Pathology.

5. Bostwick D.
Urological Surgical Pathology.

6. Miettinnen.
Soft Tissue Pathology.

22. Berman JJ.
http://www.biomedcentral.com/1471-2407/4/10


8.

9. CAP protocols.

10. ADASP protocols.

11. Checkpath.

12. Visual Basic for Applications.

13. Moore GW,
http://www.netautopsy.org/modlthry.htm

14. Suppes P.
Axiomatic Set Theory.

15. Kleene SC.
Symbolic Logic.

16. Perl in 21 days.

21. Hippocrates.
Hippocrates. Volume I.
Jones WHS, transl. Loeb Classical Library. Cambridge, MA: Harvard University Press. 1923.
ISBN 0-674-99162-1, 361 pages.
Includes Hippocrates' Oath, with explanatory notes.

23. Wilson EO.
Consilience: The Unity of Knowledge
New York: Vintage Books USA. 1999 Apr 1;.
ISBN: 067976867X, 408 pages.

24. U. S. Government. Veterans Affairs Central Office.
Public access to VistA® software.
www.hardhats.org

25. Moyers B.
Healing and the Mind.
New York: Doubleday, 1993;:.

26. Reis MAM, Ortega NRS, Silveira PSP.
Fuzzy expert system in the prediction of neonatal resuscitation.
Brazil J Med Biol Res. 2004;37(5):755-764.
ISSN 0100-879X.

27. Massad E, Burattini MN, Ortega NRS.
Fuzzy logic and measles vaccination: designing a control strategy.
Int J Epidemiol. 1999;28-550-557.

28. Ortega NRS, Sallum PC, Massad E.
Fuzzy dynamical systems in epidemic modelling.
Kybernetik. 2000; 29:201-218.

29. Boegl K, Adlassnig KP, Hayashi Y, Rothenfluh TE, Leitich H.
Knowledge acquisition in the fuzzy knowledge representation framework of medical consultation systems.
Artif Intell Med. 2004;30:1-26.

30. Teodorescu HN, Kandel A, Jain LC.
Fuzzy and Neuro-fuzzy Systems in Medicine.
Boca Raton, FL, USA: CRC Press. 1999;:.

31. Velasevic DM, Saletic DZ, Saletic SZ.
A fuzzy set theory application in determining the severity of respiratory failure.
Int J Med Informatics. 2001; 63:101-107.

32. Zadeh LA.
Fuzzy Sets.
Information and Control. 1965; 8:338-353.

33. Klir GJ, Folger TA.
Fuzzy Sets: Uncertainty and Information.
Englewood Cliffs, NJ, USA: Prentice Hall. 1988;:.

34. Pedrycz W, Gomide F.
An Introduction to Fuzzy Sets: Analysis and Design.
London, UK: MIT Press. 1998;:.

35. Mahfouf M, Abbod MB, Linkens DA.
A survey of fuzzy logic monitoring and control utilization in medicine.
Artif Intell Med. 2001;21:27-42.

36. Barry J, Brown A, Ensor V, Lakhani U, Petts D, Warren C, Winstanley T.
Comparative evaluation of the VITEK 2 Advanced Expert System (AES) in five UK hospitals.
J Antimicrob Chemoth 2003;51:1191-1202.

37. Berner ES, Webster GD, Shugerman AA, Jackson JJ, Algina J, Baker AL, Ball EV, Cobbs CG, Dennis VW, Frenkel EP, Hudson LD, Muncall EL, Rackley CE, Taunton OD.
Performance of four computer-based diagnostic systems.
NEJM. 1994 Jun 23; 330(25):1792-1796.

38. Evans RS, Pestotnik SL, Classen DC, Clemmer TP, Weaver LK, Orme JF, Lloyd JF, Burke JP.
A computer-assisted management program for antibiotics and other antiinfective agents. Special Article.
NEJM. 1990 Jan 22; 232-238.

39. Parfrey NA, Moore GW, Hutchins GM.
Is pain crisis a cause of death in sickle cell disease?
Am J Clin Pathol. 1985 Aug;84(2):209-212.
PMID: 4025226.

40. Moore GW, Hutchins GM, Miller RE.
Token swap test of significance for serial medical data bases.
Am J Med. 1986 Feb;80(2):182-190.
PMID: 3511687.

41. Moore GW, Hutchins GM, Miller RE.
A new paradigm for hypothesis testing in medicine, with examination of the Neyman Pearson condition.
Theor Med. 1986 Oct;7(3):269-282.
PMID: 3798393.

42. Heckering PS.
Token swap test revisited.
Comput Methods Programs Biomed. 2003 Mar;70(3):265-269.
PMID: 12581559.
Heckerling PS. Department of Medicine (M/C 787), University of Illinois, 840 South Wood Street, Chicago, IL 60612, USA. pshecker@uic.edu
"The token swap test measures the association between row and column variables of a 2 x 2 table in sample misclassification space, and makes no assumptions about repeated, random sampling from a source population."

27. APPENDIX: COMPUTER SOURCE CODE.

Perl SOURCE CODE.
#!/usr/bin/perl
print "Content-type: text/html\n\n";
### ordrlogc.cgi: PERL script to perform ORDER LOGIC.
### U. S. Government work, uncopyrighted, submitted for publication.
### See details at bottom of page.
### Last modified: 8/19/2004, G. William Moore, MD, PhD.
### 
### PRINT HEADER.
 print qq|<html><head><title> ORDER LOGIC CALCULATOR. </title></head><body>|;
 print qq|\n<!-- Last modified: 8/19/2004, G. William Moore, MD, PhD.-->|;
 print qq|\n<h2><center> ORDER LOGIC CALCULATOR. |;
 print qq|\n<br><a href="http://www.netautopsy.org/ordrlogc.htm"> |;
 print qq|\n http://www.netautopsy.org/ordrlogc.htm </a> |;
 print qq|\n<br> U. S. Government work, uncopyrighted,|;
 print qq|\n<br> submitted for publication. |;
 print qq|\n<br> DRAFT COPY ONLY: DEMONSTRATION. |;
 print qq|\n<br> Sample problem: the calculator should conclude |;
 print qq|\n<br> that the patient is +male and -female. </center></h2> |;
### 
### LOAD INPUT DATA: Microsoft(R) Excel(R) *.csv file.
### See:  http://www.netautopsy.org/ordrlogc.htm
 $csvar[0]="0,1,2,3,4,5,6,7,8" ; $csvar[1]="1,+i,,,,,,," ;
 $csvar[2]="2,,+i,,,,,," ; $csvar[3]="3,,,+female,,,,," ;
 $csvar[4]="4,,,,-male,,,," ; $csvar[5]="5,,,+male,,,,," ;
 $csvar[6]="6,,,,-female,,,," ; $csvar[7]="7,,+i,,,,,," ;
 $csvar[8]="8,,,+male,,,,," ;
### SAMPLE PROBLEM:  THE CALCULATOR CONCLUDES THAT
### THE PATIENT IS MALE, NOT FEMALE.
### FIRST PASS THROUGH THE $csvspl ARRAY, SPLIT ON COMMAS.
 $nrow=0; $irow=0; $nnomen=0; $nnam=0;
 while($irow<299){$irow++; $csvlin=$csvar[$irow]; $csvlng=length($csvlin);
   if($csvlng<6){$irow=1000;};
   if($irow<299){$nrow++; @csvspl=split(/,/,$csvlin);
     $ncsvspl=@csvspl; $icsvspl=0;
### VALUE OF SPLIT-ELEMENT=$vspl.
     while($icsvspl<$ncsvspl){$icsvspl++; $vspl=$csvspl[$icsvspl];
### ROW-SIGN OF $vspl=$sgspl. LENGTH OF $vspl=$lspl.
       if($vspl ne ""){$sgspl=substr($vspl,0,1); $lspl=length($vspl);
### NAME OF $vspl=$nmspl.
         if($lspl>1){$nmspl=substr($vspl,1,$lspl-1); $mnam=0;
           if($nmspl ne ""){$nemi=$nemon{$nmspl}-0;
### IF $nmspl ALREADY KNOWN, THEN NUMBER=$nemon{$nmspl};
             if($nemi>0){$mnam=$nemi;};
### IF $nmspl NOT KNOWN, THEN INCREMENT NUMBER $nnomen.
             if($nemi<1){$nnomen++; $mnam=$nnomen; $nemon{$nmspl}=$mnam;
 print qq|\n<br> mnam $mnam $nmspl |;
               $prprt[$nnomen]=$nmspl; $nomen[$nnomen]=$nemi;};
### ASSIGN COLUMN-NUMBER, $icsvspl, TO $rwcl[$nrow].
             $rwcl[$nrow]=$icsvspl;
### ASSIGN ROW-NAME, $mnam, TO $rwnm[$nrow].
             $rwnm[$nrow]=$mnam; $rwsg[$nrow]=0;
### ASSIGN ROW-SIGN, $sgspl, TO $rwsg[$nrow].
             if($sgspl eq "+"){$rwsg[$nrow]=1;}
             if($sgspl eq "-"){$rwsg[$nrow]=-1;};};};};};};};
   $irow=0;
   print qq|\n<br> Raw data matrix: $nrow rows. |;
   while($irow<$nrow){$irow++; $rwln=$csvar[$irow];
     print qq|\n<br> $rwln |;};
### CONSTRUCT NULLITIES/NANDSETS.
 $nnand=0; $ncol=1; $irow=1;
 while($irow<$nrow){$irow++;
   $clnri=$rwcl[$irow]; $clnrh=$rwcl[$irow-1]+1;
### TEST FOR FIRSTBORN.
   if($clnri==$clnrh){$rwsgf=$rwsg[$irow];
     $rwngf=-$rwsgf; $rwnmf=$rwnm[$irow]; $rwprf=$prprt[$rwnmf];
### ZERO THE TEMPORARY NANDSET.
     $krow=1; $tempn[1]=1; while($krow<$nnomen){$krow++; $tempn[$krow]=0;};
### CALCULATE PARENT TERM.
     $rwsgp=$rwsg[$irow-1]; $rwngp=-$rwsgp;
     $rwnmp=$rwnm[$irow-1]; $rwprp=$prprt[$rwnmp];
### COMPARE PARENT TERM TO FIRSTBORN TERM.
     $jrow=$irow;
     if($rwnmf==$rwnmp){
### VACUOUS NULLITY: WARNING
       if($rwsgf==$rwsgp){$jrow=2*$nrow;
     print qq|\n<br> Warning: vacuous nullity at row $irow: $rwnmf $rwprf |;};
### SQUAWK NULLITY: INCONSISTENCY.
       if($rwngf==$rwsgp){$jrow=2*$nrow;
  print qq|\n<br> SQUAWK!! Inconsistent nullity at row $irow: $rwnmf $rwprf |;
         print qq|\n<br><hr> Last modified: 8/19/2004, |;
         print qq| G. William Moore, MD, PhD. |;
         print qq|\n <br></body></html>\n\n |; exit;};};
### IF PARENT TERM IS DISTINCT FROM FIRSTBORN TERM.
     if($jrow<=$nrow){$tempn[$rwnmp]=$rwsgp; $tempn[$rwnmf]=$rwngf;
### WHILE-LOOP: TEST FOR SIBLINGS.
       while($jrow<$nrow){$jrow++; $clnrj=$rwcl[$jrow];
         if($clnrj==$clnri){$rwsgs=$rwsg[$jrow]; $rwngs=-$rwsgs;
           $rwnms=$rwnm[$jrow]; $tempn[$rwnms]=$rwngs;};
### NO MORE SIBLINGS REMAINING: END THE WHILE-LOOP.
         if($clnrj<$clnri){$jrow=2*$nrow;};};
### INCREMENT THE NANDSET MATRIX.
     $nnand++; $knom=1; $nandc[$nnand]=0; $nand[$nnand][1]=0;
     while($knom<$nnomen){$knom++; $tpn=$tempn[$knom];
       if($tpn>0){$nandc[$nnand]++;}; if($tpn<0){$nandc[$nnand]++;};
       $nand[$nnand][$knom]=$tpn;};};};};
### PRINT NANDSETS.
 print "\n<br> Nandsets: ";
 $knand=0;
 while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
   print "\n<br> nand $knand,$tpn: ";
   while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
### ZERO INITIAL SOLUTIONS.
   $soln[1]=-1; $knom=1; while($knom<$nnomen){$knom++; $soln[$knom]=0;};
### FIND INITIAL SOLUTIONS.
 $knand=0;
 while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
   if($tpn<2){$nandc[$knand]=0; $knom=1;
     while($knom<$nnomen){$knom++; $slv=$nand[$knand][$knom];
        if(($slv>0)||($slv<0)){$soln[$knom]=$slv; $hnom=0;
          while($hnom<$nnomen){$hnom++; $nand[$knand][$hnom]=0;};};};};};
### PRINT INITIAL SOLUTIONS.
 print "\n<br> Initial Solutions: "; $knom=0;
 while($knom<$nnomen){$knom++; $slv=$soln[$knom]; $nem=$prprt[$knom];
   $done[$knom]=0;
   if($slv>0){print "\n<br> $knom $slv -$nem";};
   if($slv<0){print "\n<br> $knom $slv +$nem";};};
### PRINT NANDSETS AGAIN.
 print "\n<br> Nandsets: "; $knand=0;
 while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
   print "\n<br> nand $knand,$tpn: ";
   while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
### ITERATIVE SOLUTION.
 $isolve=0; $ksolve=0; $nsolve=$nnomen;
 while($ksolve<$nsolve){$ksolve++; $done[$ksolve]=0;};
 while($isolve<3){$isolve++;
### PERFORM NANDSET ARITHMETIC.
   $isoln=1;
   while($isoln<$nnomen){$isoln++; $slv=$soln[$isoln]; $ngslv=-$slv;
     $don=$done[$isoln];
     if($don<1){if(($slv>0)||($slv<0)){$knand=0;
       if($slv>0){print "\n<br> isoln $isoln $slv -$prprt[$isoln]";};
       if($slv<0){print "\n<br> isoln $isoln $slv +$prprt[$isoln]";};
       while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
         if($tpn>0){$kkk=$nand[$knand][$isoln];
           if(($kkk>0)||($kkk<0)){$done[$isoln]=1;
             if($kkk==$slv){$nandc[$knand]=$tpn-1;
               $hnom=0; $nandc[$knand]=0;
               while($hnom<$nnomen){$hnom++;$nand[$knand][$hnom]=0;};};
             if($kkk==$ngslv){$nandc[$knand]=$tpn-1;
               $nand[$knand][$isoln]=0;};};};};};};};
### FIND NEW SOLUTIONS.
 $knand=0; $istop=0;
 while($knand<$nnand){$knand++; $tpn=$nandc[$knand];
    if($tpn>1){$istop++;};
    if($tpn<2){$nandc[$knand]=0; $knom=1;
      while($knom<$nnomen){$knom++; $slv=$nand[$knand][$knom];
         if(($slv>0)||($slv<0)){$soln[$knom]=$slv; $hnom=0;
       if($slv>0){print "\n<br> isoln $knom $slv -$prprt[$knom]";};
       if($slv<0){print "\n<br> isoln $knom $slv +$prprt[$knom]";};
           while($hnom<$nnomen){$hnom++; $nand[$knand][$hnom]=0;};};};};};
### PRINT NANDSETS AGAIN.
   print "\n<br> Nandsets: $isolve ";
   $knand=0; $istop=0;
   while($knand<$nnand){$knand++; $knom=0; $tpn=$nandc[$knand];
     if($tpn>1){$istop++;};
     print "\n<br> nand $knand,$tpn: ";
     while($knom<$nnomen){$knom++; print " $nand[$knand][$knom]";};};
 if($istop<1){$isolve=999;};};
### END JOB.
 print qq|\n<br><hr> Last modified: 8/19/2004, G. William Moore, MD, PhD. |;
 print qq|\n <br></body></html>\n\n |; exit;
VISUAL BASIC SOURCE CODE.
Sub ordrlogc()
Dim nrow, irow, jrow, krow, nnam, inam, jnam, knam, hnam, knand As Integer
Dim isoln, isolve, ksolve, nsolve, ksoln, nsoln As Integer
Dim rwsav, nmsav, ndsav, rowsw, namsw, thsnam, nnand, tpk, don, slv, ngslv As Integer
Dim arr(20, 20), rwcl(20), rwsg(20), rwnm(20), tempn(20), soln(20), done(20) As Integer
Dim nandc(20), nand(20, 20) As Integer
Dim rwvij, rwvsg, rwvcl, rwvnm, namk As String
Dim rwcli, rwclj, rwclp, rwclf, rwcls As Integer
Dim rwsgi, rwsgj, rwsgp, rwsgf, rwsgs As Integer
Dim rwngi, rwngj, rwngp, rwngf, rwngs As Integer
Dim rwnmi, rwnmj, rwnmp, rwnmf, rwnms As Integer
Dim prprt(20), rwpri, rwprj, rwprp, rwprf, rwprs, prk As String
irow = 0
nrow = 0
krow = 0
rwsav = 0
nmsav = 0
ndsav = 0
rowsw = 0
nnand = 0
'Enter disease-folio from Excel Spreadsheet, by rows.
Do
  irow = irow + 1
  rowsw = 0
  If (irow > 10) Then Exit Do
  jrow = 0
'Examine the row for the unique, filled-in cell.
  Do
    jrow = jrow + 1
    If (jrow > 10) Then Exit Do
    rwvij = Cells(irow, jrow).Value
    lrwvij = Len(rwvij)
    If (lrwvij > 1) Then
      rowsw = 1
'Row-column, rwcl(irow)
      rwcl(irow) = jrow
'Row-sign, rwsg(irow)
      rwvsg = Mid(rwvij, 1, 1)
      If (rwvsg = "+") Then rwsg(irow) = 1
      If (rwvsg = "-") Then rwsg(irow) = -1
      rwvnm = Mid(rwvij, 2, lrwvij)
      knam = 0
      thsnam = 0
'Look for existing row-name.
      Do
        knam = knam + 1
        If (knam > nmsav) Then Exit Do
        namk = prprt(knam)
        If (namk = rwvnm) Then
          thsnam = knam
          rwnm(irow) = knam
        End If
      Loop
'Increment the name-counter, nmsav.
      If (thsnam = 0) Then
        nmsav = nmsav + 1
        prprt(nmsav) = rwvnm
        thsnam = nmsav
        rwnm(irow) = thsnam
      End If
    End If
  Loop
  If (rowsw > 0) Then nrow = nrow + 1
  Cells(12, 2) = "name"
  Cells(12, 3) = "sign"
  Cells(12, 4) = "col"
  Cells(irow + 12, 2) = rwnm(irow)
  Cells(irow + 12, 3) = rwsg(irow)
  Cells(irow + 12, 4) = rwcl(irow)
Loop
'CONSTRUCT NULLITIES/NANDSETS.
nnand = 0
ncol = 1
irow = 1
Do
  irow = irow + 1
  If (irow > nrow) Then Exit Do
'Test for firstborn status.
  rwcli = rwcl(irow) - 1
  rwclh = rwcl(irow - 1)
'Row irow is firstborn.
  jrow = irow
  If (rwcli = rwclh) Then
    rwsgf = rwsg(irow)
    rwngf = -rwsgf
    rwnmf = rwnm(irow)
    rwclf = rwcl(irow)
    rwprf = prprt(rwnmf)
'Zero the temporary nandset.
    krow = 1
    tempn(1) = 1
    Do
      krow = krow + 1
      If (krow > nmsav) Then Exit Do
      tempn(krow) = 0
    Loop
'Calculate the parent term.
    rwsgp = rwsg(irow - 1)
    rwngp = -rwsgp
    rwnmp = rwnm(irow - 1)
    rwclp = rwcl(irow - 1)
    rwprp = prprt(rwnmp)
    Cells(12, 7) = "name"
    Cells(12, 8) = "sign"
    Cells(12, 9) = "col"
    Cells(12, 10) = "name"
    Cells(12, 11) = "sign"
    Cells(12, 12) = "col"
    Cells(irow + 12, 7) = rwnmp
    Cells(irow + 12, 8) = rwsgp
    Cells(irow + 12, 9) = rwclp
    Cells(irow + 12, 10) = rwnmf
    Cells(irow + 12, 11) = rwsgf
    Cells(irow + 12, 12) = rwclf
    If (rwnmf = rwnmp) Then
'Vacuous nullity warning.
      If (rwsgf = rwsgp) Then
        Cells(22, 1) = "Warning: Vacuous nandset at " + prprt(rwnmp)
        jrow = 2 * nrow
      End If
'Inconsistent nullity warning.
      If (rwngf = rwsgp) Then
        Cells(22, 1) = "Warning: inconsisent nandset at " + prprt(rwnmp)
        jrow = 2 * nrow
      End If
    End If
'If parent term distinct from firstborn term.
    If (jrow <= nrow) Then
      tempn(rwnmp) = rwsgp
      tempn(rwnmf) = rwngf
      Do
        jrow = jrow + 1
        If (jrow > nrow) Then Exit Do
        rwclj = rwcl(jrow)
        rwsgj = rwsg(jrow)
        rwngj = -rwsgj
        rwnmj = rwnm(jrow)
'Test for siblings.
        If (rwclj = rwclf) Then
          rwcls = rwclj
          rwsgs = rwsgj
          rwngs = -rwsgs
          rwnms = rwnmj
          tempn(rwnms) = rwngs
        End If
'No more siblings left
        If (rwclj < rwclf) Then
          jrow = 2 * nrow
        End If
      Loop
    End If
'Increment the nandset matrix.
    nnand = nnand + 1
    knam = 1
    nandc(nnand) = 0
    nand(nnand, 1) = 0
    Do
      knam = knam + 1
      If (knam > nmsav) Then Exit Do
      tpk = tempn(knam)
      nand(nnand, knam) = tpk
      If (tpk > 0) Then
        nandc(nnand) = nandc(nnand) + 1
      End If
      If (tpk < 0) Then
        nandc(nnand) = nandc(nnand) + 1
      End If
    Loop
  End If
Loop
'Print nandsets.
knand = 0
Do
  knand = knand + 1
  If (knand > nnand) Then Exit Do
  knam = 1
  tpk = nandc(knand)
  Cells(knand + 24, 1) = tpk
  Do
    knam = knam + 1
    If (knam > nmsav) Then Exit Do
    Cells(knand + 24, knam) = nand(knand, knam)
  Loop
Loop
'Zero initial solutions.
soln(1) = -1
knam = 1
Do
  knam = knam + 1
  If (knam > nmsav) Then Exit Do
  soln(knam) = 0
Loop
' Find initial solutions.
knand = 0
Do
  knand = knand + 1
  If (knand > nnand) Then Exit Do
  tpk = nandc(knand)
  If (tpk < 2) Then
    nandc(knand) = 0
    knam = 1
    Do
      knam = knam + 1
      If (knam > nmsav) Then Exit Do
      slv = nand(knand, knam)
      If (slv > 0) Then
        soln(knam) = slv
        hnam = 0
        Do
         hnam = hnam + 1
         If (hnam > nmsav) Then Exit Do
         nand(knand, hnam) = 0
        Loop
      End If
      If (slv < 0) Then
        soln(knam) = slv
        hnam = 0
        Do
         hnam = hnam + 1
         If (hnam > nmsav) Then Exit Do
         nand(knand, hnam) = 0
        Loop
      End If
    Loop
  End If
Loop
' Print initial solutions.
knam = 0
knand = 0
Do
  knand = knand + 1
  If (knand > nnand) Then Exit Do
  knam = 0
  Do
    knam = knam + 1
    If (knam > nmsav) Then Exit Do
      slv = soln(knam)
      If (slv > 0) Then
        Cells(34 + knam, 1) = knam
        Cells(34 + knam, 2) = slv
      End If
      If (slv < 0) Then
        Cells(34 + knam, 1) = knam
        Cells(34 + knam, 2) = slv
      End If
  Loop
Loop
'Iterative solution for nandsets.
isolve = 0
ksolve = 0
nsolve = nmsav
Do
  ksolve = ksolve + 1
  If (ksolve > nsolve) Then Exit Do
  done(ksolve) = 0
  Loop
Do
  isolve = isolve + 1
  If (isolve > nsolve) Then Exit Do
'Perform nandset arithmetic.
  isoln = 1
  Do
    isoln = isoln + 1
    If (isoln > nsolve) Then Exit Do
    slv = soln(isoln)
    ngslv = -slv
    don = done(isoln)
    If (slv > 0) Then
    End If
  Loop
Loop




Last Updated: October 9, 2004, by G. William Moore, MD, PhD.