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

DGPTFVC.m

Go to the documentation of this file.
  1. DGPTFVC ;ALB/MTC - PTF VALIDITY CHECK ;01 MAY 91 @0800
  1. ;;5.3;Registration;**37,234,850**;Aug 13, 1993;Build 171
  1. PTF S DIC="^DGPT(",DIC(0)="MAQE",DIC("S")="I $P(^(0),U,11)=1" D ^DIC K DIC Q:Y'>0 S DGERR=-1,(PTF,J)=+Y D LOG^DGPTFTR W:DGERR'>0 !," NO ERRORS"
  1. K DGLOGIC,DGDD,DGERR G PTF
  1. Q
  1. EN ;entry point from menu option DG PTF VALIDITY CHECK
  1. ;--setup vars for Austin Edits
  1. K ^TMP("AEDIT",$J),^TMP("AERROR",$J) S DGACNT=0
  1. ;
  1. S DIC="^DGPT(",DIC(0)="MAQE",DIC("S")="I $P(^(0),U,11)=1" D ^DIC K DIC I Y'>0 K DGACNT Q
  1. N DGSDFN S DGSDFN=$P(Y,U,2)
  1. S PTF=+Y,Y=$S($D(^DGPT(+Y,70)):+^(70),1:0) D FMT^DGPTUTL
  1. S:DT<2901001 DGPTFMT=1 ; needed so test sites can still validate 80col.
  1. S Y=1 D RTY^DGPTUTL
  1. S DGERR=0,DGCNT=1,J=PTF
  1. D SETTRAN G:DGOUT Q
  1. D LOG^DGPTFTR G Q:DGERR>0
  1. D VERCHK^DGPTRI3(PTF) G Q:DGERR>0 ; for ICD-10 validate that record is all of correct type
  1. W !,"Performing Additional Edits..." D ^DGPTAE G Q:DGERR>0
  1. XMIT K XMY S XMZ=DGXMZ,XMDUZ=.5,XMY(DUZ)="",DGJ=J,^XMB(3.9,XMZ,2,0)="3.92A^"_DGCNT-1_"^"_DGCNT-1_"^"_DT
  1. D ENT1^XMD
  1. W !,"Message Sent"
  1. ;
  1. Q K DGXMZ,XMZ,XMDUN,XMY,DGOUT,DGLOGIC,DGERR,XMDUZ,DGRTY,DGRTY0,DGPTFMT,XMSUB,XMTEXT,Y,J,PTF,DGJ,DGCNT,DGACNT G EN
  1. SETTRAN ;-- setup mailman transmission
  1. S DGOUT=0
  1. S Y=$P(^DPT(+^DGPT(+J,0),0),U,1),XMSUB=Y_" PTF TRANSMISSION ",XMDUZ=DUZ,XMDUN=$P(^VA(200,DUZ,0),U)
  1. D GET^XMA2
  1. I $D(XMZ),(XMZ>0) S DGXMZ=XMZ K XMZ G SETQ
  1. W !,"*** ERROR *** Unable to create MailMan message... Try again later"
  1. S DGOUT=1
  1. SETQ ;
  1. Q