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

AGCNVIMP.m

Go to the documentation of this file.
AGCNVIMP ;IHS/SD/EFG - CONVERT AUPNPAT FIELD .09 ;   
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 ;
MCR ;FIND OLD ENTRIES IN FIELD .09 OF AUPNMCR TO USE
 ;TO POPULATE NEW MULTIPLE FIELD 1201 OF AUPNMCR
 K AG("DFN"),AG("MCR")
 S AG("DFN")=0
 F  S AG("DFN")=$O(^AUPNMCR(AG("DFN"))) Q:'AG("DFN")  D
 . S AG("MCR")=$P($G(^AUPNMCR(AG("DFN"),0)),U,9)
 . Q:$D(^AUPNMCR(AG("DFN"),12,0))
 . I +AG("MCR") D MCRADD
 Q
MCRADD ;ADD ENTRY FROM OLD FIELD TO NEW FIELD
 K DD,DO,X,DA
 S DA(1)=AG("DFN")
 S DIC="^AUPNMCR("_DA(1)_",12,"
 S DIC(0)="LZE"
 S DLAYGO=9000003
 S X=AG("MCR")
 K DD,DO
 D FILE^DICN
 K DIC
 Q