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

ONCP2P1.m

Go to the documentation of this file.
ONCP2P1 ;Hines OIFO/GWB - 1998 Prostate Cancer Study ;05/30/00
 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
 ;Table I
 K TABLE,HTABLE
 S TABLE("1. INSTITUTION ID NUMBER")="IIN"
 S TABLE("2. ACCESSION NUMBER")="ACC"
 S TABLE("3. SEQUENCE NUMBER")="SEQ"
 S TABLE("4. POSTAL CODE AT DIAGNOSIS")="PCAD"
 S TABLE("5. DATE OF BIRTH")="DOB"
 S TABLE("6. RACE")="RACE"
 S TABLE("7. SPANISH ORIGIN")="SO"
 S TABLE("8. PRIMARY PAYER AT DIAGNOSIS")="PPAD"
 S TABLE("9. FAMILY HISTORY OF PROSTATE CANCER")="FHOPC"
 S HTABLE(1)=" 1. INSTITUTION ID NUMBER"
 S HTABLE(2)=" 2. ACCESSION NUMBER"
 S HTABLE(3)=" 3. SEQUENCE NUMBER"
 S HTABLE(4)=" 4. POSTAL CODE AT DIAGNOSIS"
 S HTABLE(5)=" 5. DATE OF BIRTH"
 S HTABLE(6)=" 6. RACE"
 S HTABLE(7)=" 7. SPANISH ORIGIN"
 S HTABLE(8)=" 8. PRIMARY PAYER AT DIAGNOSIS"
 S HTABLE(9)=" 9. FAMILY HISTORY OF PROSTATE CANCER"
 S CHOICES=9
 K DIQ S DIC="^ONCO(165.5,",DR=".05;.06",DA=ONCONUM,DIQ="ONC" D EN^DIQ1
 S D0=ONCOPA D DOB1^ONCOES S Y=X D DATEOT^ONCOPCE S DOB=Y
 W @IOF D HEAD^ONCP2P0
IIN W !," 1. INSTITUTION ID NUMBER............: H6",$$IIN^ONCFUNC
 W !!," TABLE I - GENERAL INFORMATION"
 W !," -----------------------------"
ACC W !," 2. ACCESSION NUMBER.................: ",ONC(165.5,ONCONUM,.05)
SEQ W !," 3. SEQUENCE NUMBER..................: ",ONC(165.5,ONCONUM,.06)
PCAD S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="9 4. POSTAL CODE AT DIAGNOSIS........." D ^DIE G:$D(Y) JUMP
DOB W !," 5. DATE OF BIRTH....................: ",DOB
RACE S DIE="^ONCO(160,",DA=ONCOPA
 S DR="8 6. RACE............................." D ^DIE G:$D(Y) JUMP
SO S DIE="^ONCO(160,",DA=ONCOPA
 S DR="9 7. SPANISH ORIGIN..................." D ^DIE G:$D(Y) JUMP
PPAD S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="18 8. PRIMARY PAYER AT DIAGNOSIS......." D ^DIE G:$D(Y) JUMP
FHOPC S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="657 9. FAMILY HISTORY OF PROSTATE CANCER" D ^DIE G:$D(Y) JUMP
 W ! K DIR S DIR(0)="E" D ^DIR S:$D(DIRUT) OUT="Y"
 G EXIT
JUMP ;Jump to prompts
 S XX="" R !!," GO TO ITEM NUMBER: ",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:X?1.2N X=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 TABLE,HTABLE,CHOICES,ONC
 K DIQ,DIC,DR,DA,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,XX,X,Y
 K DOB,OSP,IIN
 Q