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
ACMPSTFX ; IHS/TUCSON/TMJ - POST INIT FIX ;
+1 ;;2.0;ACM CASE MANAGEMENT SYSTEM;;JAN 10, 1996
+2 ;
+3 ;
+4 ;START OF FIX
START ;
V200CONV ;File 200 Conversion
+1 WRITE "I will now begin the Conversion Process",!
+2 SET ACMDFN=0
FOR
SET ACMDFN=$ORDER(^ACM(41,ACMDFN))
IF ACMDFN'=+ACMDFN
QUIT
IF $DATA(^ACM(41,ACMDFN,"DT"))
Begin DoDot:1
+3 DO FIX1
+4 DO FIX2
+5 QUIT
End DoDot:1
+6 QUIT
FIX1 ;SCREEN FOR 200 COMPLETION (IF CASE MGR WAS = NULL)
+1 SET ACMMGRN=$PIECE(^ACM(41,ACMDFN,"DT"),U,6)
+2 IF 'ACMMGRN
DO PHN
DO PROV
+3 QUIT
FIX2 ;SCREEN FOR 200 COMPLETION OF PROVIDER ONLY IF PHN=NULL
+1 SET ACMMGRN=$PIECE(^ACM(41,ACMDFN,"DT"),U,6)
+2 SET ACMPHNN=$PIECE(^ACM(41,ACMDFN,"DT"),U,7)
+3 IF ACMMGRN'=""&(ACMPHNN="")
DO PROV
+4 QUIT
PHN ;PHN FIX
+1 ;Convert 7th piece - PHN
+2 SET ACMOLDN=$PIECE(^ACM(41,ACMDFN,"DT"),U,7)
+3 IF 'ACMOLDN
QUIT
+4 SET ACMNEWN=$GET(^DIC(16,ACMOLDN,"A3"))
+5 IF 'ACMNEWN
WRITE !!,"ERROR - ERROR in Record "_ACMDFN,!
QUIT
+6 SET DA=ACMDFN
SET DIE="^ACM(41,"
SET DR="7///`"_ACMNEWN
DO ^DIE
KILL DIE
+7 QUIT
PROV ;PRIMARY PROVIDER FIX
+1 ;Convert 15th piece - PRIMARY PROVIDER
+2 SET ACMOLDN=$PIECE(^ACM(41,ACMDFN,"DT"),U,15)
+3 IF 'ACMOLDN
QUIT
+4 SET ACMNEWN=$GET(^DIC(16,ACMOLDN,"A3"))
+5 IF 'ACMNEWN
WRITE !!,"ERROR - ERROR in Record "_ACMDFN,!
QUIT
+6 SET DA=ACMDFN
SET DIE="^ACM(41,"
SET DR="15///`"_ACMNEWN
DO ^DIE
KILL DIE
+7 QUIT