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

ONCBRP1.m

Go to the documentation of this file.
ONCBRP1 ;Hines OIFO/GWB - 1998 Breast Cancer Study ;6/1/98
 ;;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. SEX")="SEX"
 S TABLE("9. PRIMARY PAYER AT DIAGNOSIS")="PPAD"
 S TABLE("10. FAMILY HISTORY OF BREAST CANCER")="FHOBC"
 S TABLE("11. (F) PERSONAL HISTORY OF BREAST CANCER")="PHOBC"
 S TABLE("12. SYNCHRONOUS BREAST CANCER")="SBC"
 S TABLE("13. PERSONAL HISTORY OF OTHER CANCER")="PHOC"
 S TABLE("14. (F) HORMONE REPLACEMENT THERAPY")="HRT"
 S TABLE("15. (F) HOW MANY YEARS OF HORMONE REPLACEMENT THERAPY")="HMYHRT"
 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. SEX"
 S HTABLE(9)=" 9. PRIMARY PAYER AT DIAGNOSIS"
 S HTABLE(10)="10. FAMILY HISTORY OF BREAST CANCER"
 S HTABLE(11)="11. (F) PERSONAL HISTORY OF BREAST CANCER"
 S HTABLE(12)="12. SYNCHRONOUS BREAST CANCER"
 S HTABLE(13)="13. PERSONAL HISTORY OF OTHER CANCER"
 S HTABLE(14)="14. (F) HORMONE REPLACEMENT THERAPY"
 S HTABLE(15)="15. (F) HOW MANY YEARS OF HORMONE REPLACEMENT THERAPY"
 S CHOICES=15
 K DIQ S DIC="^ONCO(165.5,",DR=".04;.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^ONCBRP0
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
SEX S DIE="^ONCO(160,",DA=ONCOPA
 S DR="10  8. SEX............................" D ^DIE G:$D(Y) JUMP
PPAD S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="18  9. PRIMARY PAYER AT DIAGNOSIS....." D ^DIE G:$D(Y) JUMP
FHOBC S DIE="^ONCO(165.5,",DA=ONCONUM
 W !!," 10. FAMILY HISTORY OF BREAST CANCER:",!
 S DR="900     DAUGHTER......................." D ^DIE G:$D(Y) JUMP
 S DR="901     MATERNAL AUNT.................." D ^DIE G:$D(Y) JUMP
 S DR="902     MATERNAL GRANDMOTHER..........." D ^DIE G:$D(Y) JUMP
 S DR="903     MOTHER........................." D ^DIE G:$D(Y) JUMP
 S DR="904     ONE SISTER ONLY................" D ^DIE G:$D(Y) JUMP
 S DR="905     MORE THAN ONE SISTER..........." D ^DIE G:$D(Y) JUMP
 S DR="906     FATHER........................." D ^DIE G:$D(Y) JUMP
 S DR="907     BROTHER........................" D ^DIE G:$D(Y) JUMP
 S DR="908     POSITIVE FAMILY HISTORY, NOS..." D ^DIE G:$D(Y) JUMP
 W !
PHOBC I $$GET1^DIQ(160,ONCOPA,10,"I")=1 D  W ! G SBC
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,10)=""
 .W !," 11. (F) PERSONAL HISTORY OF BREAST"
 .W !,"     CANCER.........................: (Data Item for Females Only)"
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="909 11. (F) PERSONAL HISTORY OF BREAST                                                  CANCER........................." D ^DIE G:$D(Y) JUMP
 W !
SBC S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="910 12. SYNCHRONOUS BREAST CANCER......" D ^DIE G:$D(Y) JUMP
PHOC S DIE="^ONCO(165.5,",DA=ONCONUM
 W !!," 13. PERSONAL HISTORY OF OTHER CANCER:",!
 S DR="911     COLON.........................." D ^DIE G:$D(Y) JUMP
 I $$GET1^DIQ(160,ONCOPA,10,"I")=1 D  G P
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,13)=""
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,14)=""
 .W !,"     OVARY (F)......................: (Data Item for Females Only)"
 .W !,"     UTERUS (F).....................: (Data Item for Females Only)"
 S DR="912     OVARY (F)......................" D ^DIE G:$D(Y) JUMP
 S DR="913     UTERUS (F)....................." D ^DIE G:$D(Y) JUMP
P I $$GET1^DIQ(160,ONCOPA,10,"I")=2 D  G O
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,15)=""
 .W !,"     PROSTATE (M)...................: (Data Item for Males Only)"
 S DR="914     PROSTATE (M)..................." D ^DIE G:$D(Y) JUMP
O S DR="915     OTHER.........................." D ^DIE G:$D(Y) JUMP
 W !
HRT I $$GET1^DIQ(160,ONCOPA,10,"I")=1 D  G HMYHRT
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,17)=""
 .W !," 14. (F) HORMONE REPLACEMENT THERAPY: (Data Item for Females Only)"
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="916 14. (F) HORMONE REPLACEMENT THERAPY" D ^DIE G:$D(Y) JUMP
 I X=0 D  G PRTC
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,18)=8
 .W !," 15. (F) HOW MANY YEARS OF HORMONE"
 .W !,"     REPLACEMENT THERAPY............: NA"
 I X=9 D  G PRTC
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,18)=9
 .W !," 15. (F) HOW MANY YEARS OF HORMONE"
 .W !,"     REPLACEMENT THERAPY............: Unknown"
HMYHRT I $$GET1^DIQ(160,ONCOPA,10,"I")=1 D  G PRTC
 .S $P(^ONCO(165.5,ONCONUM,"BRE1"),U,18)=""
 .W !," 15. (F) HOW MANY YEARS OF HORMONE"
 .W !,"     REPLACEMENT THERAPY............: (Data Item for Females Only)"
 S DIE="^ONCO(165.5,",DA=ONCONUM
 S DR="917 15. (F) HOW MANY YEARS OF HORMONE                                                   REPLACEMENT THERAPY............" D ^DIE G:$D(Y) JUMP
PRTC 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 HTABLE,TABLE,CHOICES,ONC,DOB,OSP,IIN
 K DIC,DR,DA,DIQ,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
 Q