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

BSDCLET.m

Go to the documentation of this file.
  1. BSDCLET ;cmi/anch/maw - BSD Print Letters by Patient 2/20/2007 1:06:40 PM
  1. ;;5.3;PIMS;**1007**;FEB 27, 2007
  1. ;
  1. ;
  1. ;cmi/anch/maw 2/20/2007 PATCH 1007 item 1007.14
  1. ;
  1. ;
  1. MAIN ;-- main driver
  1. D LTR
  1. I '$G(BSDLET) D XIT Q
  1. D PAT
  1. I $O(VAUTN(""))="" D Q ;cmi/anch/maw 8/14/2007 changed from $D to stop if no patient selected
  1. . W !,"You must select a patient, quitting" H 3
  1. . D XIT
  1. D PRT
  1. D XIT
  1. Q
  1. ;
  1. LTR ;-- select the letter
  1. K DIC,X,Y
  1. S DIC=407.5
  1. S DIC(0)="AEQMZ"
  1. D ^DIC
  1. Q:'$G(Y)
  1. S BSDLET=+Y
  1. Q
  1. ;
  1. PAT ;-- select the patients
  1. S VAUTNI=1
  1. S VAUTNALL=1
  1. D PATIENT^VAUTOMA
  1. Q
  1. ;
  1. PRT ;-- print the letter
  1. D ZIS^DGUTQ
  1. Q:POP
  1. U IO
  1. S SDLET=BSDLET
  1. S SDFORM=0
  1. N BSDDA
  1. S BSDDA=0 F S BSDDA=$O(VAUTN(BSDDA)) Q:BSDDA="" D
  1. . S A=$G(VAUTN(BSDDA))
  1. . D PRT^BSDLT
  1. . D REST^BSDLT
  1. D CLOSE^DGUTQ
  1. Q
  1. ;
  1. XIT ;-- clean up the variables
  1. K VAUTNI,VAUTNALL,SDLET,BSDLET,SDFORM,VAUTN
  1. D KVA^VADPT,KILL^AUPNPAT
  1. Q
  1. ;