Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ONCBPC1

ONCBPC1.m

Go to the documentation of this file.
ONCBPC1 ;Hines OIFO/GWB - PCE Study of Cancers of the Urinary Bladder ;5/30/00
 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
 ;Table I
 K TABLE,HTABLE
 S TABLE("ACCESSION/SEQUENCE NUMBER")="ACC"
 S TABLE("CLASS OF CASE")="CLA"
 S TABLE("REFERRED FOR TREATMENT TO")="PATR"
 S TABLE("ZIP AT DIAGNOSIS")="ZIP"
 S TABLE("DATE OF BIRTH")="DAT"
 S TABLE("RACE")="RAC"
 S TABLE("SPANISH ORIGIN")="SPA"
 S TABLE("SEX")="SEX"
 S TABLE("PRIMARY PAYER AT DIAGNOSIS")="PRI"
 S TABLE("LENGTH OF STAY")="LEN"
 S TABLE("PATIENT HISTORY OF OTHER CANCER")="PATH"
 S TABLE("FAMILY HISTORY OF CANCER")="FAM"
 S TABLE("SMOKING HISTORY")="SMO"
 S TABLE("DURATION OF SMOKING HISTORY")="DOSH"
 S TABLE("DURATION OF SMOKE-FREE HISTORY")="DOSFH"
 S HTABLE(1)="ACCESSION/SEQUENCE NUMBER"
 S HTABLE(2)="CLASS OF CASE"
 S HTABLE(3)="REFERRED FOR TREATMENT TO"
 S HTABLE(4)="ZIP AT DIAGNOSIS"
 S HTABLE(5)="DATE OF BIRTH"
 S HTABLE(6)="RACE"
 S HTABLE(7)="SPANISH ORIGIN"
 S HTABLE(8)="SEX"
 S HTABLE(9)="PRIMARY PAYER AT DIAGNOSIS"
 S HTABLE(10)="LENGTH OF STAY"
 S HTABLE(11)="PATIENT HISTORY OF OTHER CANCER"
 S HTABLE(12)="FAMILY HISTORY OF CANCER"
 S HTABLE(13)="SMOKING HISTORY"
 S HTABLE(14)="DURATION OF SMOKING HISTORY"
 S HTABLE(15)="DURATION OF SMOKE-FREE HISTORY"
 S CHOICES=15
 S PRINODE0=^ONCO(165.5,ONCONUM,0)
 S ACCSEQ=$P(PRINODE0,U,5)_"/"_$P(PRINODE0,U,6)
 S COCIN=$P(PRINODE0,U,4),Y=COCIN,C=$P(^DD(165.5,.04,0),U,2) D Y^DIQ
 S COCEX=Y
 S D0=ONCOPA D DOB1^ONCOES S Y=X D DATEOT^ONCOPCE S DOB=Y
 W @IOF D HEAD^ONCBPC0 W !?25,"TABLE I - GENERAL INFORMATION",!
ACC W !,"ACCESSION/SEQUENCE NUMBER.....: ",ACCSEQ
CLA W !,"CLASS OF CASE.................: ",COCEX
PATR S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="300REFERRED FOR TREATMENT TO....." D ^DIE G:$D(Y) JUMP
ZIP S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="9ZIP AT DIAGNOSIS.............." D ^DIE G:$D(Y) JUMP
DAT W !,"DATE OF BIRTH.................: ",DOB
RAC S DIE="^ONCO(160,",DA=ONCOPA
 S DR="8RACE.........................." D ^DIE G:$D(Y) JUMP
SPA S DIE="^ONCO(160,",DA=ONCOPA
 S DR="9SPANISH ORIGIN................" D ^DIE G:$D(Y) JUMP
SEX S DIE="^ONCO(160,",DA=ONCOPA
 S DR="10SEX..........................." D ^DIE G:$D(Y) JUMP
PRI S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="18PRIMARY PAYER AT DIAGNOSIS...." D ^DIE G:$D(Y) JUMP
LEN S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="301LENGTH OF STAY................" D ^DIE G:$D(Y) JUMP
PATH W !!,"PATIENT HISTORY OF OTHER CANCER:",!
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="302  CERVIX......................" D ^DIE G:$D(Y) JUMP
 S DR="303  COLON......................." D ^DIE G:$D(Y) JUMP
 S DR="304  BLADDER....................." D ^DIE G:$D(Y) JUMP
 S DR="305  HEAD AND NECK..............." D ^DIE G:$D(Y) JUMP
 S DR="306  KIDNEY......................" D ^DIE G:$D(Y) JUMP
 S DR="307  PROSTATE...................." D ^DIE G:$D(Y) JUMP
 S DR="308  OTHER......................." D ^DIE G:$D(Y) JUMP
FAM W !!,"FAMILY HISTORY OF CANCER:",!
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="309  BLADDER....................." D ^DIE G:$D(Y) JUMP
 S DR="310  COLON......................." D ^DIE G:$D(Y) JUMP
 S DR="311  LUNG........................" D ^DIE G:$D(Y) JUMP
 S DR="312  PROSTATE...................." D ^DIE G:$D(Y) JUMP
 S DR="313  OTHER......................." D ^DIE G:$D(Y) JUMP
 W !
SMO S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="314SMOKING HISTORY (PACKS/DAY)..." D ^DIE G:$D(Y) JUMP
DOSH S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="315DURATION OF SMOKING HISTORY..." D ^DIE G:$D(Y) JUMP
DOSFH S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="316DURATION OF SMOKE-FREE HISTORY" D ^DIE G:$D(Y) JUMP
 W ! K DIR S DIR(0)="E" D ^DIR
 G EXIT
JUMP ;Jump to prompts
 S XX="" R !!,"GO TO: ",X:DTIME I (X="")!(X[U) S OUT="Y" G EXIT
 I X["?" D  G JUMP
 .W !,"CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I)
 I '$D(TABLE(X)) S XX=X,X=$O(TABLE(X)) I ($P(X,XX,1)'="")!(X="") W *7,"??" D  G JUMP
 .W !,"CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I)
 S X=TABLE(X)
 G @X
EXIT K HTABLE,TABLE,CHOICES
 K ACCSEQ,COCIN,COCEX,C,DOB,PRINODE0
 K DA,DR,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,XX,Y
 Q