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

ACMPSTFX.m

Go to the documentation of this file.
ACMPSTFX ; IHS/TUCSON/TMJ - POST INIT FIX ;
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;;JAN 10, 1996
 ;
 ;
 ;START OF FIX
START ;
V200CONV ;File 200 Conversion
 W "I will now begin the Conversion Process",!
 S ACMDFN=0 F  S ACMDFN=$O(^ACM(41,ACMDFN)) Q:ACMDFN'=+ACMDFN  I $D(^ACM(41,ACMDFN,"DT")) D 
 .D FIX1
 .D FIX2
 .Q
 Q
FIX1 ;SCREEN FOR 200 COMPLETION (IF CASE MGR WAS = NULL)
 S ACMMGRN=$P(^ACM(41,ACMDFN,"DT"),U,6)
 D:'ACMMGRN PHN,PROV
 Q
FIX2 ;SCREEN FOR 200 COMPLETION OF PROVIDER ONLY IF PHN=NULL
 S ACMMGRN=$P(^ACM(41,ACMDFN,"DT"),U,6)
 S ACMPHNN=$P(^ACM(41,ACMDFN,"DT"),U,7)
 D:ACMMGRN'=""&(ACMPHNN="") PROV
 Q
PHN ;PHN FIX
 ;Convert 7th piece - PHN
 S ACMOLDN=$P(^ACM(41,ACMDFN,"DT"),U,7)
 Q:'ACMOLDN
 S ACMNEWN=$G(^DIC(16,ACMOLDN,"A3"))
 I 'ACMNEWN W !!,"ERROR - ERROR in Record "_ACMDFN,! Q
 S DA=ACMDFN,DIE="^ACM(41,",DR="7///`"_ACMNEWN D ^DIE K DIE
 Q
PROV ;PRIMARY PROVIDER FIX
 ;Convert 15th piece - PRIMARY PROVIDER
 S ACMOLDN=$P(^ACM(41,ACMDFN,"DT"),U,15)
 Q:'ACMOLDN
 S ACMNEWN=$G(^DIC(16,ACMOLDN,"A3"))
 I 'ACMNEWN W !!,"ERROR - ERROR in Record "_ACMDFN,! Q
 S DA=ACMDFN,DIE="^ACM(41,",DR="15///`"_ACMNEWN D ^DIE K DIE
 Q