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

ONCNPC1.m

Go to the documentation of this file.
ONCNPC1 ;Hines OIFO/GWB - PCE Study of Non-Hodgkin's Lymphoma ;05/30/00
 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
 ;Table I
 K TABLE,HTABLE
 S TABLE("ACCESSION NUMBER")="AN"
 S TABLE("SEQUENCE NUMBER")="SN"
 S TABLE("POSTAL CODE AT DIAGNOSIS")="PCAD"
 S TABLE("DATE OF BIRTH")="DOB"
 S TABLE("AGE AT DIAGNOSIS")="AAD"
 S TABLE("RACE")="R"
 S TABLE("SPANISH ORIGIN")="SO"
 S TABLE("SEX")="S"
 S TABLE("PRIMARY PAYER AT DIAGNOSIS")="PPAD"
 S TABLE("FAMILY HISTORY OF CANCER")="FHOC"
 S TABLE("PERSONAL HISTORY OF ANY CANCER")="PHOAC"
 S TABLE("PRE-EXISTING CONDITIONS")="PC"
 S TABLE("PREVIOUS CHEMOTHERAPY/RADIATION THERAPY")="PCRT"
 S TABLE("AIDS RISK CATEGORY")="ARC"
 S HTABLE(1)="ACCESSION NUMBER"
 S HTABLE(2)="SEQUENCE NUMBER"
 S HTABLE(3)="POSTAL CODE AT DIAGNOSIS"
 S HTABLE(4)="DATE OF BIRTH"
 S HTABLE(5)="AGE AT DIAGNOSIS"
 S HTABLE(6)="RACE"
 S HTABLE(7)="SPANISH ORIGIN"
 S HTABLE(8)="SEX"
 S HTABLE(9)="PRIMARY PAYER AT DIAGNOSIS"
 S HTABLE(10)="FAMILY HISTORY OF CANCER"
 S HTABLE(11)="PERSONAL HISTORY OF ANY CANCER"
 S HTABLE(12)="PRE-EXISTING CONDITIONS"
 S HTABLE(13)="PREVIOUS CHEMOTHERAPY/RADIATION THERAPY"
 S HTABLE(14)="AIDS RISK CATEGOR"
 S CHOICES=14
 K DIQ S DIC="^ONCO(165.5,",DR=".05;.06;4",DA=ONCONUM
 S DIQ="ONC" D EN^DIQ1
 S D0=ONCOPA D DOB1^ONCOES S Y=X D DATEOT^ONCOPCE S DOB=Y
 W @IOF D HEAD^ONCNPC0
 W !?25,"TABLE I - GENERAL INFORMATION"
 W !?25,"-----------------------------"
AN W !,"ACCESSION NUMBER.....................: ",ONC(165.5,ONCONUM,.05)
SN W !,"SEQUENCE NUMBER......................: ",ONC(165.5,ONCONUM,.06)
PCAD S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="9POSTAL CODE AT DIAGNOSIS............." D ^DIE G:$D(Y) JUMP
DOB W !,"DATE OF BIRTH........................: ",DOB
AAD W !,"AGE AT DIAGNOSIS.....................: ",ONC(165.5,ONCONUM,4)
R S DIE="^ONCO(160,",DA=ONCOPA
 S DR="8RACE................................." D ^DIE G:$D(Y) JUMP
SO S DIE="^ONCO(160,",DA=ONCOPA
 S DR="9SPANISH ORIGIN......................." D ^DIE G:$D(Y) JUMP
S S DIE="^ONCO(160,",DA=ONCOPA
 S DR="10SEX.................................." D ^DIE G:$D(Y) JUMP
PPAD S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="18PRIMARY PAYER AT DIAGNOSIS..........." D ^DIE G:$D(Y) JUMP
FHOC W !!,"FAMILY HISTORY OF CANCER:",!
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="800  LEUKEMIA..........................." D ^DIE G:$D(Y) JUMP
 S DR="801  NON-HODGKIN'S LYMPHOMA............." D ^DIE G:$D(Y) JUMP
 S DR="802  HODGKIN'S LYMPHOMA................." D ^DIE G:$D(Y) JUMP
 S DR="313  OTHER CANCER......................." D ^DIE G:$D(Y) JUMP
PHOAC W !!,"PERSONAL HISTORY OF ANY CANCER:",!
 D CHFPS^ONCOMNI
 I X="" S DR="803  1ST PRIMARY SITE..................."
 E  S DR="803  1ST PRIMARY SITE...................//"_X
 D ^DIE G:$D(Y) JUMP
 D CHFPH^ONCOMNI
 I X="" S DR="804  1ST PRIMARY HISTOLOGY.............."
 E  S DR="804  1ST PRIMARY HISTOLOGY..............//"_X
 D ^DIE G:$D(Y) JUMP
 D CHSPS^ONCOMNI
 I X="" S DR="805  2ND PRIMARY SITE..................."
 E  S DR="805  2ND PRIMARY SITE...................//"_X
 D ^DIE G:$D(Y) JUMP
 D CHSPH^ONCOMNI
 I X="" S DR="806  2ND PRIMARY HISTOLOGY.............."
 E  S DR="806  2ND PRIMARY HISTOLOGY..............//"_X
 D ^DIE G:$D(Y) JUMP
PC W !!,"PRE-EXISTING CONDITIONS:",!
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="807  ORGAN TRANSPLANT..................." D ^DIE G:$D(Y) JUMP
 S DR="808  HIV POSITIVE......................." D ^DIE G:$D(Y) JUMP
 S DR="809  CROHN'S DISEASE/ULCERATIVE COLITIS." D ^DIE G:$D(Y) JUMP
 S DR="810  HASHIMOTO'S THYROIDITIS............" D ^DIE G:$D(Y) JUMP
 S DR="811  SYSTEMIC LUPUS ERYTHEMATOSUS......." D ^DIE G:$D(Y) JUMP
 S DR="812  RHEUMATOID ARTHRITIS/SJOGREN'S SYN." D ^DIE G:$D(Y) JUMP
 S DR="813  PNEUMOCYSTIS CARINII..............." D ^DIE G:$D(Y) JUMP
 S DR="814  CMV INFECTION......................" D ^DIE G:$D(Y) JUMP
 S DR="815  TUBERCULOSIS......................." D ^DIE G:$D(Y) JUMP
 S DR="816  MYCOBACTERIUM AVIUM................" D ^DIE G:$D(Y) JUMP
 S DR="817  OTHER PARASITIC INFECTIONS........." D ^DIE G:$D(Y) JUMP
 S DR="818  OTHER CONGENTIAL DISEASES.........." D ^DIE G:$D(Y) JUMP
 S DR="819  OPPORTUNISTIC DISEASE (W/I 2 YEARS)" D ^DIE G:$D(Y) JUMP
PCRT W !!,"PREVIOUS CHEMOTHERAPY/RADIATION THERAPY:",!
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="820  CHEMOTHERAPY......................." D ^DIE G:$D(Y) JUMP
 S DR="821  RADIATION THERAPY.................." D ^DIE G:$D(Y) JUMP
ARC S DIE="^ONCO(165.5,",DA=ONCONUM W !
 S DR="822AIDS RISK CATEGORY..................." 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 DOB
 K DA,DR,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,XX,Y
 Q