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

AGCNVBEN.m

Go to the documentation of this file.
AGCNVBEN ; IHS/ASDS/TPF - CONVERT OLD BENEFIT COORDINATOR SUBFILE IN PATIENT FILE TO NEW BENEFIT COORDINATOR FILE
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 ;
START ;
 S PDFN=0
 F  S PDFN=$O(^AUPNPAT(PDFN)) Q:'PDFN  D GETDATA(PDFN)
 Q
GETDATA(PDFN) ;EP
 Q:'$O(^AUPNPAT(PDFN,33,0))  ;QUITE IF NO DATA TO MOVE
 K DIC,DIE
 S X="`"_PDFN S DIC(0)="L" S DIC=9000044 D ^DIC
 Q:Y<0  ;COULD NOT CREATE ENTRY
 I $D(^AUPNBENR(+Y,11)) W !,"BENEFIT DATA ALREADY MOVED" Q
 ;ENTRY CREATED LETS MOVE THE DATA
 M ^AUPNBENR(+Y,11)=^AUPNPAT(PDFN,33)
 S $P(^AUPNBENR(+Y,11,0),U,2)=9000044.11   ;RESET SUBFILE NUMBER
 Q