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

ONCOFUP.m

Go to the documentation of this file.
  1. ONCOFUP ;Hines OIFO/GWB - Print Follow-up Letter [ONCO FOLL-PRINT LETTER]
  1. ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
  1. ;
  1. SCL W @IOF,!?2,"************ Print Follow-Up Letter ************",!
  1. K DIC
  1. S DIC="^ONCO(160,"
  1. S DIC(0)="AEMQZ"
  1. S DIC("A")=" Select patient: "
  1. D ^DIC G:(Y=-1)!($D(DTOUT))!($D(DUOUT)) EXIT
  1. S (DA,ONCOD0)=+Y
  1. ;
  1. LFC ;LAST FOLLOW-UP CONTACT (160,15.1)
  1. K ONCOC0
  1. W !
  1. W !?2,"The follow-up letter is sent to the LAST FOLLOW-UP CONTACT."
  1. W !?2,"You may enter a new contact."
  1. LC W !
  1. S DIE="^ONCO(160,",DR="15.1"
  1. L +^ONCO(160,DA):$G(DILOCKTM,5)
  1. I '$T R !?2,"Another user is editing this entry.",X:5 G SCL
  1. D ^DIE L -^ONCO(160,DA)
  1. G EXIT:$D(Y)
  1. S FC=$P($G(^ONCO(160,D0,1)),U,6)
  1. I FC="" W !!?2,"You need to designate a follow-up contact before printing a follow-up letter." G LC
  1. D LET G SCL
  1. ;
  1. LET ;Print follow-up letter (Also called from FA^ONCOFUL)
  1. I $D(ONCOC0) D
  1. .S DIE="^ONCO(160,",DR="15.1////^S X=ONCOC0" D ^DIE
  1. S ONCOC0=$P(^ONCO(160,ONCOD0,1),U,6)
  1. ;
  1. TP S ONCTP=$P($G(^ONCO(165,ONCOC0,0)),U,2)
  1. K DIC
  1. S DIC="^ONCO(165.1,"
  1. S DIC(0)="AEMQZ"
  1. S DIC("A")="Select FOLLOW-UP FORM LETTER: "
  1. I (ONCTP=1)!(ONCTP=2)!(ONCTP=6) S DIC("S")="I $P(^(0),U,2)=ONCTP"
  1. I (ONCTP=3)!(ONCTP=5) S DIC("S")="I $P(^(0),U,2)=3"
  1. I ONCTP=4 S DIC("S")="I $P(^(0),U,2)>3"
  1. D ^DIC
  1. G:(Y=-1)!($D(DTOUT))!($D(DUOUT)) EXIT
  1. S ZZL=+Y
  1. S DIWF="^ONCO(165.1,"_ZZL_",1,"
  1. S DIWF(1)="160"
  1. S BY="NUMBER",(FR,TO)=ONCOD0
  1. W !
  1. K DIC D EN2^DIWF D ^%ZISC D HOME^%ZIS
  1. Q
  1. ;
  1. EXIT ;Exit
  1. K DIC,DA,ONCOD0,ONCOC0,DIE,DR,FC,ONCTP,ZZL,DIWF,BY,FR,TO
  1. Q