source: FOIAVistA/tag/r/ONCOLOGY-ONC/ONCOFUP.m@ 1262

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1ONCOFUP ;Hines OIFO/GWB - Print Follow-up Letter [ONCO FOLL-PRINT LETTER]
2 ;;2.11;ONCOLOGY;**2,22,25,47**;Mar 07, 1995;Build 19
3 ;
4SCL W @IOF,!?2,"************ Print Follow-Up Letter ************",!
5 K DIC
6 S DIC="^ONCO(160,"
7 S DIC(0)="AEMQZ"
8 S DIC("A")=" Select patient: "
9 D ^DIC G:(Y=-1)!($D(DTOUT))!($D(DUOUT)) EXIT
10 S (DA,ONCOD0)=+Y
11 ;
12LFC ;LAST FOLLOW-UP CONTACT (160,15.1)
13 K ONCOC0
14 W !
15 W !?2,"The follow-up letter is sent to the LAST FOLLOW-UP CONTACT."
16 W !?2,"You may enter a new contact."
17LC W !
18 S DIE="^ONCO(160,",DR="15.1"
19 L +^ONCO(160,DA):$G(DILOCKTM,5)
20 I '$T R !?2,"Another user is editing this entry.",X:5 G SCL
21 D ^DIE L -^ONCO(160,DA)
22 G EXIT:$D(Y)
23 S FC=$P($G(^ONCO(160,D0,1)),U,6)
24 I FC="" W !!?2,"You need to designate a follow-up contact before printing a follow-up letter." G LC
25 D LET G SCL
26 ;
27LET ;Print follow-up letter (Also called from FA^ONCOFUL)
28 I $D(ONCOC0) D
29 .S DIE="^ONCO(160,",DR="15.1////^S X=ONCOC0" D ^DIE
30 S ONCOC0=$P(^ONCO(160,ONCOD0,1),U,6)
31 ;
32TP S ONCTP=$P($G(^ONCO(165,ONCOC0,0)),U,2)
33 K DIC
34 S DIC="^ONCO(165.1,"
35 S DIC(0)="AEMQZ"
36 S DIC("A")="Select FOLLOW-UP FORM LETTER: "
37 I (ONCTP=1)!(ONCTP=2)!(ONCTP=6) S DIC("S")="I $P(^(0),U,2)=ONCTP"
38 I (ONCTP=3)!(ONCTP=5) S DIC("S")="I $P(^(0),U,2)=3"
39 I ONCTP=4 S DIC("S")="I $P(^(0),U,2)>3"
40 D ^DIC
41 G:(Y=-1)!($D(DTOUT))!($D(DUOUT)) EXIT
42 S ZZL=+Y
43 S DIWF="^ONCO(165.1,"_ZZL_",1,"
44 S DIWF(1)="160"
45 S BY="NUMBER",(FR,TO)=ONCOD0
46 W !
47 K DIC D EN2^DIWF D ^%ZISC D HOME^%ZIS
48 Q
49 ;
50EXIT ;Exit
51 K DIC,DA,ONCOD0,ONCOC0,DIE,DR,FC,ONCTP,ZZL,DIWF,BY,FR,TO
52 Q
Note: See TracBrowser for help on using the repository browser.