LRARNPX0 ;SLC/MRH/FHS/J0 - NEW PERSON CONVERSION FOR ^LAR("Z" ; 1/23/93
;;5.2;LAB SERVICE;**59**;Sep 27, 1994
;
Q
EXCEPT(LRFILE,LRD0) ;- LOGS EXCEPTIONS FROM CONVERSION OF DATA FROM 6 AND 16
; exceptions are put into a SORT template so the the site can
; then use fileman enter edit to correct problems found.
;
N DIC,LRSORT,X,Y
I '$D(^DIBT("B",LRFILE_"-EXCEPTIONS")) D ADD
I '$D(LRSORT) S LRSORT=$O(^DIBT("B",LRFILE_"-EXCEPTIONS",0))
S ^DIBT(LRSORT,1,LRD0)=""
Q
;
ADD ; add a new sort template to be used for exception logging and editing
N X,Y
S DIC="^DIBT(",DIC(0)="L",DLAYGO=0,DIC("DR")="2///^S X=""T"";4///^S X=$P(LRFILE,""-"",2);5///^S X=0;"
S X=LRFILE_"-EXCEPTIONS" D FILE^DICN K DLAYGO S LRSORT=+Y
Q
;
DEVICE ; device selection for exception report for file conversions
K %ZIS N POP
S %ZIS="N",%ZIS("A")="PRINTER for EXCEPTION REPORT: ",%ZIS("B")="" D ^%ZIS
I 'POP&($E(IOST,1,2)="P-") S LRIO=ION Q
I POP S LRIO="POP" Q
W !!,"A DEVICE must be chosen for the EXCEPTION report to print on",!,"That is defined as a """"P-"""" something.",!! G DEVICE
Q
;
HEAD(X) ; writes header for all exception reports
N LRTIT
S LRTIT=$P($G(^DIC($P(X,"-",2),0)),U),LRTIT="Exception report for file "_$P(X,"-",2)_": "_LRTIT_"."
W !,?(IOM-$L(LRTIT))\2,LRTIT
S LRTIT=$G(LRTSK) I LRTIT S LRTIT="Task # "_LRTIT W !,?(IOM-$L(LRTIT))\2,LRTIT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRARNPX0 1390 printed Dec 13, 2024@02:09:29 Page 2
LRARNPX0 ;SLC/MRH/FHS/J0 - NEW PERSON CONVERSION FOR ^LAR("Z" ; 1/23/93
+1 ;;5.2;LAB SERVICE;**59**;Sep 27, 1994
+2 ;
+3 QUIT
EXCEPT(LRFILE,LRD0) ;- LOGS EXCEPTIONS FROM CONVERSION OF DATA FROM 6 AND 16
+1 ; exceptions are put into a SORT template so the the site can
+2 ; then use fileman enter edit to correct problems found.
+3 ;
+4 NEW DIC,LRSORT,X,Y
+5 IF '$DATA(^DIBT("B",LRFILE_"-EXCEPTIONS"))
DO ADD
+6 IF '$DATA(LRSORT)
SET LRSORT=$ORDER(^DIBT("B",LRFILE_"-EXCEPTIONS",0))
+7 SET ^DIBT(LRSORT,1,LRD0)=""
+8 QUIT
+9 ;
ADD ; add a new sort template to be used for exception logging and editing
+1 NEW X,Y
+2 SET DIC="^DIBT("
SET DIC(0)="L"
SET DLAYGO=0
SET DIC("DR")="2///^S X=""T"";4///^S X=$P(LRFILE,""-"",2);5///^S X=0;"
+3 SET X=LRFILE_"-EXCEPTIONS"
DO FILE^DICN
KILL DLAYGO
SET LRSORT=+Y
+4 QUIT
+5 ;
DEVICE ; device selection for exception report for file conversions
+1 KILL %ZIS
NEW POP
+2 SET %ZIS="N"
SET %ZIS("A")="PRINTER for EXCEPTION REPORT: "
SET %ZIS("B")=""
DO ^%ZIS
+3 IF 'POP&($EXTRACT(IOST,1,2)="P-")
SET LRIO=ION
QUIT
+4 IF POP
SET LRIO="POP"
QUIT
+5 WRITE !!,"A DEVICE must be chosen for the EXCEPTION report to print on",!,"That is defined as a """"P-"""" something.",!!
GOTO DEVICE
+6 QUIT
+7 ;
HEAD(X) ; writes header for all exception reports
+1 NEW LRTIT
+2 SET LRTIT=$PIECE($GET(^DIC($PIECE(X,"-",2),0)),U)
SET LRTIT="Exception report for file "_$PIECE(X,"-",2)_": "_LRTIT_"."
+3 WRITE !,?(IOM-$LENGTH(LRTIT))\2,LRTIT
+4 SET LRTIT=$GET(LRTSK)
IF LRTIT
SET LRTIT="Task # "_LRTIT
WRITE !,?(IOM-$LENGTH(LRTIT))\2,LRTIT
+5 QUIT