source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCBRP0.m@ 1036

Last change on this file since 1036 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1ONCBRP0 ;HINES CIOFO/GWB - BREAST PCE 1998 ;6/1/98
2 ;;2.11;ONCOLOGY;**18**;Mar 07, 1995
3CHECK ;Check PCE eligibility
4 ;Check if ACCESSION YEAR = 1998
5 I $P(^ONCO(165.5,ONCONUM,0),U,7)'=1998 S MSG="The Accession Year is not 1998." D ERRMSG G EXIT
6 ;Check if histologically confirmed
7 S DC=$P($G(^ONCO(165.5,ONCONUM,2)),U,6) I DC'=1 S MSG="The Diagnostic Confirmation code is not 1 (Positive histology)." D ERRMSG G EXIT
8 ;Check if Class of Case is either 1, 2 or 6.
9 S COC=$P($G(^ONCO(165.5,ONCONUM,0)),U,4) I (COC'=1)&(COC'=2)&(COC'=6) S MSG="The Class of Case code is not 1, 2 or 6." D ERRMSG G EXIT
10 ;Check if Behavior is either 2 or 3.
11 I (BEH'=2)&(BEH'=3) S MSG="The Behavior Code is not 2 (In situ) or 3 (Malignant)." D ERRMSG G EXIT
12 ;Check Sex, T-code, P-code and Histology
13 S HST(82012)=""
14 S HST(82112)=""
15 S HST(85002)=""
16 S HST(85012)=""
17 S HST(85032)=""
18 S HST(85102)=""
19 S HST(85122)=""
20 S HST(85222)=""
21 S SEX=$P(^ONCO(160,ONCOPA,0),U,8) ;#10 Sex
22 I (SEX'=1)&(SEX'=2) S MSG="Sex is neither 1 (Male) nor 2 (Female)." D ERRMSG G EXIT
23 S CT=$P($G(^ONCO(165.5,ONCONUM,2)),U,25) ;#37.1 Clinical T
24 S PT=$P($G(^ONCO(165.5,ONCONUM,2.1)),U,1) ;#85 Pathologic T
25 I SEX=1 G MENU
26 I SEX=2,(CT="1MIC")!(CT="1A")!(PT="1MIC")!(PT="1A") G MENU
27 I SEX=2,$D(HST(HIST)) G MENU
28 E S MSG="Female patient has neither DCIS nor AJCC tumor size of T1mic or T1a." D ERRMSG G EXIT
29MENU ;Breast PCE menu
30 S SEX=$P($G(^ONCO(160,ONCOPA,0)),U,8)
31 K HST
32 S HST(82013)=""
33 S HST(82113)=""
34 S HST(85003)=""
35 S HST(85013)=""
36 S HST(85033)=""
37 S HST(85103)=""
38 S HST(85123)=""
39 S HST(85223)=""
40 S IDC=0 I $D(HST(HIST)) S IDC=1
41 S $P(^ONCO(165.5,ONCONUM,7),U,15)="BRE"
42 S ^ONCO(165.5,"APCE","BRE",ONCONUM)=""
43 K DIR D HEAD
44 S DIR(0)="SO^1:General Information;2:Initial Diagnosis;3:Tumor Markers and Prognostic Tests;4:Extent of Disease and AJCC Stage;5:First Course of Treatment;6:First Recurrence;7:Status at Last Contact;8:All;9:Print Breast PCE"
45 S DIR("A")="Select Table" D ^DIR
46 G:$D(DIRUT)!($D(DIROUT)) EXIT
47 I Y=8 S OUT="" D G MENU
48 .D ^ONCBRP1 Q:$G(OUT)="Y"
49 .D ^ONCBRP2 Q:$G(OUT)="Y"
50 .D ^ONCBRP3 Q:$G(OUT)="Y"
51 .D ^ONCBRP4 Q:$G(OUT)="Y"
52 .D ^ONCBRP5 Q:$G(OUT)="Y"
53 .D ^ONCBRP6 Q:$G(OUT)="Y"
54 .D ^ONCBRP7 Q:$G(OUT)="Y"
55 S SUB="^ONCBRP"_Y D @SUB G MENU
56ERRMSG ;Error message
57 I ONCOANS=5 W !!,?8,"This primary does not satisfy the PCE eligibility criteria:",!,?8,MSG R Z:10
58 K MSG Q
59HEAD ;PCE HEADER
60 W @IOF,!,?1,PATNAM,?SITTAB,SITEGP,!,?1,SSN,?TOPTAB,TOPNAM," ",TOPCOD,!,DASHES
61 S HDL=$L(" 1998 Patient Care Evaluation Study of Breast Cancer"),TAB=(80-HDL)\2,TAB=TAB-1
62 W !,?TAB,"1998 Patient Care Evaluation Study of Breast Cancer",!,DASHES
63 Q
64EXIT ;Kill Variables and Exit.
65 K HDL,ONCONUM,ONCOPA,OUT,SUB,TAB,SEX,CT,PT,HST,IDC
66 K DIC,DIR,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,X,Y
67 Q
Note: See TracBrowser for help on using the repository browser.