'|-----------------------------------------------| '|------------ 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$ = "" titleEnd$ = "" body$ = "" bodyEnd$ = "" Href$ = "" imageheight$ = "230" imagewidth$ = "290" imgsrc1$ = " "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$ = "Pick Answer" FOR DxA% = 1 TO MaxArray% IF RTRIM$(ADx$(DxA%)) = sd$ THEN PRINT #4, "" + ADx$(DxA%) + "
" ELSE PRINT #4, "" + ADx$(DxA%) + "
" END IF NEXT DxA% 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$ = "
" + 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, "
Wrong " 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 ' 'Wrong 'Correct OPEN Yfileout$ FOR OUTPUT AS #5 PRINT "Writing Y File" PRINT #5, "
" PRINT #5, "
Correct!" 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, "" PRINT #3, "" PRINT #3, "" PRINT #3, "" PRINT #3, "" PRINT #3, "" PRINT #3, "" PRINT #3, "" CLOSE #3 '&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ' 'Opening Individual HTML Files and Writing code ' 'OPEN "JUNK.jnk" FOR OUTPUT AS #2 'PRINT fileout$ 'INPUT o$ ' ' This is SHOW ME Screen ' OPEN fileout$ FOR OUTPUT AS #2 PRINT "Writing S File" OPEN Ifileout$ FOR OUTPUT AS #4 ' 'Start writing html page ' PRINT #2, html$ ' ' Translate pathological process for meta key words ' process$ = LTRIM$(process$) process$ = RTRIM$(process$) 'PRINT "Process is "; process$ ' sreen out for debugging IF process$ = "Con" THEN pro$ = "Congenital Abnormalities" IF process$ = "Trauma" THEN pro$ = "Trauma" IF process$ = "Normal" THEN pro$ = "Normal" IF process$ = "Benign" THEN pro$ = "Benign Tumor" IF process$ = "Malign" THEN pro$ = "Malignant Tumor" IF process$ = "Inf" THEN pro$ = "Inflammation & Fibrosis" IF process$ = "Degen" THEN pro$ = "Necrosis & Degeneration" IF process$ = "Growth" THEN pro$ = "Growth Abnormalities" IF process$ = "Vasc" THEN pro$ = "Vascular Abnormalities" IF process$ = "Mech" THEN pro$ = "Mechanical Abnormalities" 'PRINT "Pro is "; pro$ 'screen out for debugging ' ' Write out Comments & Metas ' PRINT #2, cr1$ PRINT #2, cr2$ PRINT #2, cr3$ PRINT #2, cr4$ PRINT #2, cr5$ PRINT #2, cr6$ PRINT #2, cr7$ PRINT #2, cr8$ PRINT #2, cr9$ PRINT #2, cr10$ PRINT #2, cr11$ PRINT #2, cr12$ PRINT #2, PRINT #2, head$ PRINT #2, metad1$ + metad2$ PRINT #2, meta$ + metaE$ PRINT #2, metaSite$ + metaE$ ' 'Title ' PRINT #2, title$; sd$; " of the "; organ$; quote$; titleEnd$ PRINT #2, "" PRINT #2, body$ ' ' Nav Bar Generation ' 'PRINT #2, "" 'PRINT #2, "
" 'PRINT #2, "" 'PRINT #2, "
[Search Frames]" 'PRINT #2, "[Search No frames]" 'PRINT #2, "[PathWeb Home]" 'PRINT #2, "[©]" 'PRINT #2, "[Feed Back]" 'PRINT #2, "[About]" 'PRINT #2, "[" + tcode$ + mcode$ + "]" 'PRINT #2, "
" 'PRINT #2, "
" 'PRINT #2, "
" ' ' Nav Bar Done ' '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ' ' Nav Bar Above is Finished ' PRINT #2, "
" PRINT #2, "" PRINT #2, "" PRINT #2, "" PRINT #2, "" PRINT #2, "
" ' 'Copy from ' PRINT #2, "" + imgsrc$ + "" PRINT #4, "
" PRINT #4, "" PRINT #2, "
" PRINT #2, "" PRINT #2, "
" + sd$ + ", " + organ$ + "" PRINT #2, "
" + ic$ PRINT #2, "
" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '' ' Write out Long Description ' IF LEN(LongD$(0)) > 1 THEN PRINT #2, LongD$(0) 'PRINT LongD$(0) END IF IF u > 0 THEN w = u u = 0 FOR I = 1 TO w u = u + 1 Flet$ = LEFT$(LongD$(u), 1) 'PRINT Flet$; "------>"; ASC(Flet$) IF ASC(Flet$) = 149 THEN LongD$(u) = "
" + LongD$(u) IF LongD$(u) <> "|" THEN PRINT #2, LongD$(u) ' IF LongD$(u) <> "|" THEN PRINT "Writing Now "; LongD$(u) NEXT I ' INPUT o$ 'CLS END IF ' ' End writing out long description ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' PRINT #2, "
Contrib. by:" + iby$ + " " + ibyh$ PRINT #2, "
" PRINT #2, "" PRINT #2, "" PRINT #2, "" PRINT #2, "
Etiology, Pathogenesis, Clinical, and More Info " PRINT #2, "
" PRINT #2, "
" PRINT #2, "" PRINT #2, "" '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ CLOSE #2 CLOSE #4 PRINT "One HTML File Generation Completed" PRINT "|" PRINT "\" 888 PRINT "Looping" LOOP UNTIL EOF(1) CLOSE #1 END 999 PRINT "Skip not "; ssSelect$ GOTO 888 END