'|-----------------------------------------------|
'|------------ Organ System Unknowns -----------|
'|---- Copyright 1997 by Richard R. Lindquist ---|
'|-----------------------------------------------|
'|--------This is Current Ver 1.0 Build 42-------|
'|-----S F I DONE--------------------------------|
'
' Assign these vars
'
ssSelect$ = "GU"
RNfile$ = "RNgu.dat"
maxRN% = 243
maxF% = maxRN% + 1
maxRN$ = STR$(maxF%)
maxRN$ = LTRIM$(maxRN$)
MaxArray% = 79
'
' Assigned Vars Done
'
DIM ADx$(MaxArray%)
'
' Add Dx Array Here
'
'
ADx$(1) = "Abscess"
ADx$(2) = "Acquired_cystic_disease"
ADx$(3) = "Acute_orchitis"
ADx$(4) = "Acute_pyelonephritis"
ADx$(5) = "Acute_vasomotor_nephropathy"
ADx$(6) = "Adenocarcinoma"
ADx$(7) = "Adult_polycystic_kidney_disease"
ADx$(8) = "Anti-GBM_nephritis"
ADx$(9) = "Atheroembolic_renal_disease"
ADx$(10) = "Bergers_glomerulonephritis"
ADx$(11) = "Bladder calculi"
ADx$(12) = "Chronic cystitis"
ADx$(13) = "Chronic_cystitis"
ADx$(14) = "Chronic_pyelonephritis"
ADx$(15) = "Cloaca"
ADx$(16) = "Congenital_hydronephrosis"
ADx$(17) = "Congenital_mesoblastic_nephroma"
ADx$(18) = "Cystic_renal_dysplasia"
ADx$(19) = "Diabetic_nephropathy"
ADx$(20) = "Drug_Induced_Interstitial_Nephritis"
ADx$(21) = "Embryonal_carcinoma"
ADx$(22) = "End_stage_kidney"
ADx$(23) = "Endodermal_sinus_tumor"
ADx$(24) = "Focal_segmental_glomerulosclerosis"
ADx$(25) = "Granulomatous cystitis/BCG"
ADx$(26) = "Granulomatous Orchitis"
ADx$(27) = "Hemorrhage"
ADx$(28) = "Hemorrhagic_infarct"
ADx$(29) = "Hydronephrosis"
ADx$(30) = "Hyperplasia"
ADx$(31) = "Hypospadias"
ADx$(32) = "Idiopathic_RPGN"
ADx$(33) = "Infantile_polycystic_kidney"
ADx$(34) = "Infarct"
ADx$(35) = "Kidney_transplant_rejection"
ADx$(36) = "Leiomyosarcoma"
ADx$(37) = "Liposarcoma"
ADx$(38) = "Lupus_nephritis"
ADx$(39) = "Malignant_rhabdoid_tumor"
ADx$(40) = "Membranoproliferative_glomerulonephritis_type_I"
ADx$(41) = "Membranoproliferative_glomerulonephritis_type_II"
ADx$(42) = "Membranous_glomerulonephritis"
ADx$(43) = "Metastatic colonic adenocarcinoma"
ADx$(44) = "Minimal_change_disease"
ADx$(45) = "Multicystic_renal_dysplasia"
ADx$(46) = "Nephrolithiasis"
ADx$(47) = "Nephrosclerosis"
ADx$(48) = "Neuroblastoma"
ADx$(49) = "Normal bladder"
ADx$(50) = "Normal Epididymis"
ADx$(51) = "Normal_glomerulus"
ADx$(52) = "Normal_kidney"
ADx$(53) = "Normal_prostate"
ADx$(54) = "Normal_renal_papilla"
ADx$(55) = "Normal_Spermatic_Cord"
ADx$(56) = "Normal_testis"
ADx$(57) = "Normal_ureter"
ADx$(58) = "Papillary_necrosis"
ADx$(59) = "Penile_duplication"
ADx$(60) = "Postinfectious_glomerulonephritis"
ADx$(61) = "Prostatic_squamous_metaplasia"
ADx$(62) = "Renal_amyloidosis"
ADx$(63) = "Renal_cell_adenocarcinoma"
ADx$(64) = "Renal_infarct"
ADx$(65) = "Renal_papillary_carcinoma"
ADx$(66) = "Retention_Cyst"
ADx$(67) = "Scrotal_hemorrhage"
ADx$(68) = "Seminoma"
ADx$(69) = "Squamous metaplasia"
ADx$(70) = "Transitional_cell_carcinoma"
ADx$(71) = "Tuberculous Epididymitis"
ADx$(72) = "Tubular Epithelial Hyaline Droplets"
ADx$(73) = "Tubular_epithelial_vacuolar_change"
ADx$(74) = "Ureteral_duplication"
ADx$(75) = "Uric_acid_deposition"
ADx$(76) = "Wegeners"
ADx$(77) = "Wilms_tumor"
ADx$(78) = "Xanthogranulomatous_pyelonephritis"
' HTLM variables
'
' comma is CHR$(44)
' / is (47)
' = is (61)
' quote is (34)
' single quote is (39)
'
imageurl$ = "ImageURL"
system$ = "System"
'
' Image Source
'
'pathweb$ = "http://155.37.1.60/Images/"
pathweb$ = "/eAtlas/Images/"
html$ = ""
htmlEnd$ = ""
title$ = "
"
tableCenter$ = ""
tr$ = ""
trEnd$ = "
"
td$ = ""
tdEnd$ = " | "
slash$ = "/"
comma$ = ","
closeBracket$ = ">"
'
' Vars Finished
'
'
'
'
' LDWORK.BAS ---- Working on Long Description
' Add WebGen
'
'
'CLS
OPEN "WEBGEN.DAT" FOR INPUT AS #1
OPEN RNfile$ FOR INPUT AS #11
10 DO
'uid$ = ""
'ss$ = ""
'url$ = ""
'organ$ = ""
'ic$ = ""
'sd$ = ""
'process$ = ""
'tcode$ = ""
'mcode$ = ""
'gorm$ = ""
'iby$ = ""
'ibyh$ = ""
'longd$ = ""
LINE INPUT #1, rec$
rec$ = LTRIM$(rec$)
rec$ = RTRIM$(rec$)
caserec$ = rec$
IF LEFT$(caserec$, 1) <> "z" THEN caserec$ = "zzz"
'DO
SELECT CASE LEFT$(caserec$, 3)
CASE IS = "zx1"
' PRINT "1"; rec$
x = LEN(rec$)
x = x - 3
uid$ = MID$(rec$, 4, x)
PRINT "Working on uid# "; uid$
' uid$ = RIGHT$(rec$, 4)
'uid$ = rec$
GOTO 10 'Need to read in all fields before wrinting file
CASE IS = "zx2"
'PRINT "2"; rec$
x = LEN(rec$)
x = x - 3
ss$ = MID$(rec$, 4, x)
'ss$ = rec$
GOTO 10
CASE IS = "zx3"
'PRINT "3"; rec$
x = LEN(rec$)
x = x - 3
url$ = MID$(rec$, 4, x)
'url$ = RIGHT$(rec$, 4)
'url$ = rec$
GOTO 10
CASE IS = "zx4"
'PRINT "4"; rec$
x = LEN(rec$)
x = x - 3
organ$ = MID$(rec$, 4, x)
'Organ$ = RIGHT$(rec$, 4)
'Organ$ = rec$
GOTO 10
CASE IS = "zx5"
'PRINT "5"; rec$
x = LEN(rec$)
x = x - 3
ic$ = MID$(rec$, 4, x)
'IC$ = RIGHT$(rec$, 4)
'IC$ = rec$
GOTO 10
CASE IS = "zx6"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
sd$ = MID$(rec$, 4, x)
'SD$ = RIGHT$(rec$, 4)
'sd$ = rec$
GOTO 10
CASE IS = "zx7"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
process$ = MID$(rec$, 4, x)
'SD$ = RIGHT$(rec$, 4)
'sd$ = rec$
GOTO 10
CASE IS = "zx8"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
tcode$ = MID$(rec$, 4, x)
'CLS
'PRINT "before: "; tcode$
tcode$ = RTRIM$(tcode$)
tcode$ = LTRIM$(tcode$)
tcode$ = MID$(tcode$, 2, 3)
GOTO 10
CASE IS = "zx9"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
mcode$ = MID$(rec$, 4, x)
'PRINT "before: "; mcode$
mcode$ = RTRIM$(mcode$)
mcode$ = LTRIM$(mcode$)
mcode$ = MID$(mcode$, 2, 5)
'PRINT tcode$
'PRINT mcode$
'INPUT o$
GOTO 10
CASE IS = "zx0"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
gorm$ = MID$(rec$, 4, x)
'SD$ = RIGHT$(rec$, 4)
'sd$ = rec$
GOTO 10
CASE IS = "zy1"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
iby$ = MID$(rec$, 4, x)
'SD$ = RIGHT$(rec$, 4)
'sd$ = rec$
IF LEN(rec$) < 4 THEN iby$ = " "
GOTO 10
CASE IS = "zy2"
'PRINT "6"; rec$
x = LEN(rec$)
x = x - 3
ibyh$ = MID$(rec$, 4, x)
'SD$ = RIGHT$(rec$, 4)
'sd$ = rec$
GOTO 10
'LOOP UNTIL rec$ = "zzz"
CASE IS = "zzz" ' zzz is sentinal for Long Image Description
DIM LongD$(125) ' set up string array for all the lines in Long D
LongD$(0) = rec$
PRINT LongD$(0)
u = 0
DO UNTIL rec$ = "|" 'keep reading Long D lines until end of field |
LINE INPUT #1, rec$
IF LEN(rec$) > 1 THEN ' Do not process blank lines or | line
u = u + 1
LongD$(u) = rec$
' PRINT u, LongD$(u) ' screen out to see progress
END IF
LOOP
'INPUT k$
END SELECT
'
' All Vars Set
' Ready to Write *.htm file
'
'
' Clean out leading & trailing blanks
'
uid$ = RTRIM$(uid$)
uid$ = LTRIM$(uid$)
url$ = RTRIM$(url$)
organ$ = RTRIM$(organ$)
sd$ = RTRIM$(sd$)
ss$ = RTRIM$(ss$)
ic$ = RTRIM$(ic$)
url$ = LTRIM$(url$)
organ$ = LTRIM$(organ$)
sd$ = LTRIM$(sd$)
ss$ = LTRIM$(ss$)
ic$ = LTRIM$(ic$)
tcode$ = LTRIM$(tcode$)
mcode$ = LTRIM$(mcode$)
gorm$ = LTRIM$(gorm$)
iby$ = LTRIM$(iby$)
ibyh$ = LTRIM$(ibyh$)
tcode$ = RTRIM$(tcode$)
mcode$ = RTRIM$(mcode$)
gorm$ = RTRIM$(gorm$)
iby$ = RTRIM$(iby$)
ibyh$ = RTRIM$(ibyh$)
'
' Sreen Out for debugging
'
'PRINT "Uid="; uid$
'PRINT "Url="; url$
'PRINT "Organ="; organ$
'PRINT "SD="; sd$
'PRINT "Ss="; ss$
'PRINT "ic="; ic$
'PRINT "Process = "; process$
'PRINT "Tcode= "; tcode$
'PRINT "Mcode= "; mcode$
'PRINT "GorM = "; gorm$
'PRINT "By = "; iby$
'PRINT "Hosp= "; ibyh$
'PRINT "LongD="; longd$
'
' Name the generated html page by uid
ss$ = LTRIM$(ss$)
ss$ = RTRIM$(ss$)
Lss% = LEN(ss$)
IF Lss% < 1 THEN GOTO 888
IF ss$ <> ssSelect$ GOTO 999
'
'
'
' Assign Variables for Comments & Metas
'
cr1$ = ""
cr2$ = ""
cr3$ = ""
cr4$ = ""
cr5$ = ""
cr6$ = ""
cr7$ = ""
cr8$ = ""
cr9$ = ""
cr10$ = ""
cr11$ = ""
cr12$ = ""
meta$ = ""
metaEnd$ = ">"
metaSite$ = ""
headEnd$ = ""
'
' Metas Finished
'
'
' Dx Array Dx Array
'
'
' A File Write Out
'
Afileout$ = quote$ + "A\A" + uid$ + ".htm" + quote$
OPEN Afileout$ FOR OUTPUT AS #4
PRINT "Writing A File"
PRINT #4, ""
CLOSE #4
'
'End Dx Array End Dx Array
'
fileout$ = quote$ + "S\S" + uid$ + ".htm" + quote$
Ifileout$ = quote$ + "I\I" + uid$ + ".htm" + quote$
Nfileout$ = quote$ + "N\N" + uid$ + ".htm" + quote$
Yfileout$ = quote$ + "Y\Y" + uid$ + ".htm" + quote$
Wfileout$ = quote$ + "W\W" + uid$ + ".htm" + quote$
imgsrc$ = " + pathweb$ + ss$ + CHR$(47) + url$ + )
| " + organ$ + ""
PRINT #5, " | [©]"
PRINT #5, " | Help"
PRINT #5, " | Show Answer"
PRINT #5, " | << "
PRINT #5, " | < "
PRINT #5, " | > "
PRINT #5, " | >> "
PRINT #5, " | Home"
PRINT #5, " |
"
CLOSE #5
'
' Wrinting N File Out
'
OPEN Nfileout$ FOR OUTPUT AS #5
PRINT "Writing N File"
PRINT #5, ""
PRINT #5, "| "
PRINT #5, " | Help"
PRINT #5, " | Show Answer"
PRINT #5, " | << "
PRINT #5, " | < "
PRINT #5, " | > "
PRINT #5, " | >> "
PRINT #5, " | Home"
PRINT #5, " |
"
CLOSE #5
'
' Yes File Write Out
'
'
' |
OPEN Yfileout$ FOR OUTPUT AS #5
PRINT "Writing Y File"
PRINT #5, ""
PRINT #5, "| "
PRINT #5, " | Help"
PRINT #5, " | Show Answer"
PRINT #5, " | << "
PRINT #5, " | < "
PRINT #5, " | > "
PRINT #5, " | >> "
PRINT #5, " | Home"
PRINT #5, " | "
CLOSE #5
'
' F File Write Out
'
'
'CLS
OPEN frameF$ FOR OUTPUT AS #3
PRINT "Writing F File"
'
' Write out Comments & Metas
'
PRINT #3, cr1$
PRINT #3, cr2$
PRINT #3, cr3$
PRINT #3, cr4$
PRINT #3, cr5$
PRINT #3, cr6$
PRINT #3, cr7$
PRINT #3, cr8$
PRINT #3, cr9$
PRINT #3, cr10$
PRINT #3, cr11$
PRINT #3, cr12$
PRINT #3,
PRINT #3, head$
PRINT #3, metad3$ + metad4$
PRINT #3, meta$ + metaE$
PRINT #3, metaSite$ + metaE$
'
'Title
'
PRINT #3, title$; "eAtlas Unknown Quiz"; titleEnd$
PRINT #3, ""
PRINT #3, " |