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

AGCNVROI.m

Go to the documentation of this file.
AGCNVROI ;IHS/SD/TPF - CONVERT AUPNPAT FIELDS .04 TO 3601 ;   
 ;;7.1;PATIENT REGISTRATION;**1,2**;JAN 31, 2007
 ;
ROI ;FIND OLD ENTRIES IN FIELD .04
 ;TO POPULATE NEW MULTIPLE FIELD 7101 OF AUPNPAT
 N IEN,ROI
 S IEN=0
 F  S IEN=$O(^AUPNPAT(IEN)) Q:'IEN  D
 . Q:$D(^AUPNPAT(IEN,36,0))  ;QUIT IF ALREADY DONE FOR THIS PATIENT
 . S ROI=$P($G(^AUPNPAT(IEN,0)),U,4) ;ROI
 .Q:'ROI
 .D ROIADD
 Q
ROIADD ;ADD ENTRY FROM OLD FIELDS TO NEW FIELDS
 K DD,DO,X,DA,DINUM
 S DA(1)=IEN
 S DIC="^AUPNPAT("_DA(1)_",36,"
 S DIC(0)="LZE"
 S DLAYGO=9000001
 S X=ROI
 D FILE^DICN
 Q