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

DGVTSFS.m

Go to the documentation of this file.
  1. DGVTSFS ;7DELTA/KDC - VTS Stand alone Option routine ;07-MAR-2012
  1. ;;5.3;REGISTRATION;**853**;07-MAR-2012;Build 104
  1. Q
  1. EN ;Entry point for stand-alone RideShare sign-up option
  1. ;This routine provides the option to SET the VTS Patient
  1. ;Flag in File #2 (Patient File) which indicates that the
  1. ;patient is enrolled in RideShare
  1. ;
  1. ;
  1. ; SET (YES) - 1
  1. ; Not SET (NO) -0 or ""
  1. ;
  1. ;An HL7 ADT-A28 (ADD) message is built/sent
  1. ; Input -- None
  1. ; Output -- None
  1. ;
  1. ;
  1. ;
  1. ;
  1. N DFN
  1. ;
  1. ;Get Patient file (#2) IEN - DFN
  1. EN1 D GETPAT^DGRPTU(,,.DFN,) G ENQ:DFN<0
  1. L +^DPT(DFN):5 I '$T W !,"Patient record is currently locked, Try again later." G EN1
  1. ;
  1. E1 ; Retrieve patient's VTS flag information
  1. N DIC,DR,DA,%,DIE,DGVTRSF
  1. S DGVTRSF=$$GET1^DIQ(2,DFN_",",3000)
  1. W !,"The VTS Patient Flag is currently: ",DGVTRSF
  1. I DGVTRSF="YES" W !,"Patient is already a RideShare participant" L -^DPT(DFN) K DFN G EN1
  1. W !!,"Are you sure you want to enroll patient in RideShare",!,"and set the VTS Patient Flag"
  1. D YN^DICN I %Y["?" W !!,"Enter YES or NO.",! G E1
  1. I %'=1 L -^DPT(DFN) G ENQ
  1. S DIE=2,DA=DFN,DR="3000///1" D ^DIE
  1. L -^DPT(DFN)
  1. ;
  1. ; Build and send HL7 ADT-A28 ADD Message
  1. D A28^DGVTSA28(DFN)
  1. ;
  1. W !!,"Patient is now a RideShare participant and VTS Patient Flag is set"
  1. K DFN
  1. G EN1
  1. ;
  1. ENQ ;
  1. K DIQ1
  1. Q