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

DGV53PT2.m

Go to the documentation of this file.
  1. DGV53PT2 ;MTC/ALB - Provider Conversion Continued ; 21 JAN 93
  1. ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
  1. ;
  1. CON2 ;-- This routine will perform the conversion to file #200 for the
  1. ; Patient file (#2)
  1. ;
  1. N RECNUM,SEQ,NODE,MULT,PROV,PREC,TREC,PSAV,OK
  1. ;-- Init section for other changes to the Patient File
  1. D OTHINIT
  1. ;-- get entry in File 43 for conversion of file 2
  1. D ADDPC^DGV53PT1(2)
  1. ;-- determine if conversion needs to be re-started.
  1. S PSAV=$O(^DG(43,1,"PCON","B",2,0)),PREC=$G(^DG(43,1,"PCON",+PSAV,0))
  1. ;-- quit if file is already converted
  1. G:$P(PREC,U,6)="Y" CON2Q
  1. ;-- create entry in conversion log
  1. D NEWFILE^DGV53PT1(2)
  1. ;-- if record already present then re-start
  1. S OK=1 D REST2(PREC,PSAV)
  1. ;-- start of main loop
  1. F S RECNUM=$O(^DPT(RECNUM)) Q:'RECNUM S TREC=TREC+1 W:'(TREC#100) "." D
  1. . ;-- get provider from .104 node
  1. . S PROV=$P($G(^DPT(RECNUM,.104)),U)
  1. . ;-- save provider information from .104 node
  1. . S ^DG(43,1,"PCON",PSAV,0)=2_U_STIME_U_U_RECNUM_U_.104_U_U_TREC_U_U_U_PROV
  1. . ;-- update .104 node
  1. . I PROV D DPT104(RECNUM,+PROV)
  1. . ;-- get provider information from .1041 node
  1. . S PROV=$P($G(^DPT(RECNUM,.1041)),U)
  1. . ;-- save provider information from .1041 node
  1. . S ^DG(43,1,"PCON",PSAV,0)=2_U_STIME_U_U_RECNUM_U_.1041_U_U_TREC_U_U_U_PROV
  1. . ;-- update .1041 node
  1. . I PROV D DPT1041(RECNUM,PROV)
  1. . ;-- call to process other Patient File changes
  1. . D OTHER(RECNUM)
  1. ;-- enter completion time, mark conversion as completed
  1. D DONE^DGV53PT1(PSAV,TREC),COMFILE^DGV53PT1(2,OK)
  1. ;-- Post section for other Patient File changes
  1. D OTHPST
  1. CON2Q ;-- exit
  1. Q
  1. DPT104(RECNUM,PROV) ;-- process DPT '.104' node
  1. ; INPUT : RECNUM - Record Number to process
  1. ; PROV - Current Provider Pointer
  1. ;
  1. N X,Y
  1. S X=$G(^DIC(16,+PROV,"A3"))
  1. I 'X S Y=">>> Provider fld. (.104) for entry #"_RECNUM_" :'"_$P($G(^DIC(16,+PROV,0)),U)_"' could not be converted." S OK=0 D WRERROR^DGV53PT1(Y)
  1. S DR=".104////"_$S(X:X,1:"@"),DIE="^DPT(",DA=RECNUM D ^DIE K DA,DIE,DR
  1. Q
  1. ;
  1. DPT1041(RECNUM,PROV) ;-- process DPT '.1041' node
  1. ; INPUT : RECNUM - Record Number to process
  1. ; PROV - Current Provider Pointer
  1. ;
  1. N X,Y
  1. S X=$G(^DIC(16,+PROV,"A3"))
  1. I 'X S Y=">>> Attending Physician fld. (.1041) for entry #"_RECNUM_" :'"_$P($G(^DIC(16,+PROV,0)),U)_"' could not be converted." S OK=0 D WRERROR^DGV53PT1(Y)
  1. S DR=".1041////"_$S(X:X,1:"@"),DIE="^DPT(",DA=RECNUM D ^DIE K DA,DIE,DR
  1. Q
  1. ;
  1. REST2(PREC,PSAV) ;-- This tag will re-process the PTF entry incase the conversion
  1. ; needs to be re-started.
  1. ; INPUT : PREC - 0 Node of entry in MAS Parameter File for file 2
  1. ;
  1. ;-- get starting point
  1. I '$P(PREC,U,2) D NOW^%DTC S $P(^DG(43,1,"PCON",PSAV,0),U,2)=%
  1. S STIME=$P(^DG(43,1,"PCON",PSAV,0),U,2),RECNUM=+$P(PREC,U,4),MULT=$P(PREC,U,8),NODE=$P(PREC,U,5),SEQ=+$P(PREC,U,9),TREC=+$P(PREC,U,7),CURPT=$P(PREC,U,10)
  1. I 'RECNUM Q
  1. ;-- check if .104 node has been processed
  1. S X=$P($G(^DPT(RECNUM,.104)),U)
  1. I X,$P(PREC,U,10)=X,NODE=.104 D DPT104(RECNUM,X)
  1. ;-- check if .1041 node has been processed
  1. S X=$P($G(^DPT(RECNUM,.1041)),U)
  1. I X,$P(PREC,U,10)=X,NODE=.1041 D DPT1041(RECNUM,X)
  1. Q
  1. ;
  1. OTHER(DFN) ;-- This routines is used to call other Patient File conversion
  1. ; routines.
  1. ; INPUT : DFN - Current Patient being processed
  1. ;
  1. ;-- Rob W. changes
  1. D TOTVAAMT^DGYPREG(DFN,1)
  1. D CFL^DGYPREG(DFN,1)
  1. D MAKEZIP4^DGYPREG5(DFN)
  1. D DISPZIP^DGYPREG5(DFN)
  1. ;
  1. Q
  1. ;
  1. OTHINIT ;-- This routine will init other changes for the Patient file outside
  1. ; the Provider conversion.
  1. ;
  1. ;-- Rob W. changes
  1. D INITLOOP^DGYPREG
  1. ;
  1. Q
  1. ;
  1. OTHPST ;-- This routine will perform any post Patient File loop changes that
  1. ; other packages require.
  1. ;
  1. ;-- Rob W. changes
  1. D ENDLOOP^DGYPREG3
  1. ;
  1. Q
  1. ;