FBXIP22 ;WCIOFO/SAB-PATCH INSTALL ROUTINE ;8/17/2000
;;3.5;FEE BASIS;**22**;JAN 30, 1995
Q
;
PS ; post-install entry point
; create KIDS checkpoints with call backs
N FBX,Y
F FBX="UPDPOV" D
. S Y=$$NEWCP^XPDUTL(FBX,FBX_"^FBXIP22")
. I 'Y D BMES^XPDUTL("ERROR Creating "_FBX_" Checkpoint.")
Q
;
UPDPOV ; Update Selected Purpose of Visits (POV)
N FBC,FBCODE,FBDA,FBFDA,FBI,FBNAME,FBPROG,FBX
D BMES^XPDUTL(" Updating selected POVs in the FEE BASIS PURPOSE OF VISIT (161.82) file...")
;
; verify IEN of OUTPATIENT program in FEE BASIS PROGRAM file
I $P($G(^FBAA(161.8,2,0)),U)'="OUTPATIENT" D Q
. D MES^XPDUTL(" ERROR: Fee Program with IEN 2 is not OUTPATIENT.")
. D MES^XPDUTL(" Purpose of Visits could not be updated.")
;
; update POVs
K FBFDA
; loop thru POVs
F FBI=1:1 S FBX=$P($T(POV+FBI),";;",2) Q:FBX="END" D
. S FBCODE=$P(FBX,U)
. S FBNAME=$P(FBX,U,2)
. S FBPROG=$P(FBX,U,3)
. ;
. ; locate POV in file
. S FBDA=$$FIND1^DIC(161.82,"","X",FBCODE,"AC")
. ;
. ; if POV not found then add it
. I 'FBDA D
. . N DA,DD,DIC,DINUM,DLAYGO,DO,X
. . S DIC="^FBAA(161.82,",DIC(0)="L",DLAYGO=161.82
. . S X=FBNAME Q:X=""
. . S DIC("DR")="2////^S X=FBPROG;3////^S X=FBCODE"
. . I +FBCODE,'$D(^FBAA(161.82,+FBCODE,0)) S DINUM=+FBCODE
. . D FILE^DICN
. . I Y<0 D MES^XPDUTL("ERROR ADDING POV WITH CODE "_FBCODE)
. ;
. ; if POV found then add to update list
. I FBDA D
. . I $$GET1^DIQ(161.82,FBDA_",",2,"I")=FBPROG Q
. . S FBFDA(161.82,FBDA_",",2)=FBPROG
;
; actually update the found POVs
I $D(FBFDA) D FILE^DIE("","FBFDA")
;
D MES^XPDUTL(" Done.")
Q
;
POV ;austin code^name^fee program
;;15^CLASS I DENTAL TREATMENT^2
;;16^CLASS II DENTAL TREATMENT^2
;;17^CLASS IIa DENTAL TREATMENT^2
;;18^CLASS IIb DENTAL TREATMENT^2
;;19^CLASS IIc DENTAL TREATMENT^2
;;20^CLASS IIr DENTAL TREATMENT^2
;;21^CLASS III DENTAL TREATMENT^2
;;22^CLASS IV DENTAL TREATMENT^2
;;23^CLASS V DENTAL TREATMENT^2
;;24^CLASS VI DENTAL TREATMENT^2
;;END
;
;FBXIP22
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBXIP22 2064 printed Dec 13, 2024@02:01:34 Page 2
FBXIP22 ;WCIOFO/SAB-PATCH INSTALL ROUTINE ;8/17/2000
+1 ;;3.5;FEE BASIS;**22**;JAN 30, 1995
+2 QUIT
+3 ;
PS ; post-install entry point
+1 ; create KIDS checkpoints with call backs
+2 NEW FBX,Y
+3 FOR FBX="UPDPOV"
Begin DoDot:1
+4 SET Y=$$NEWCP^XPDUTL(FBX,FBX_"^FBXIP22")
+5 IF 'Y
DO BMES^XPDUTL("ERROR Creating "_FBX_" Checkpoint.")
End DoDot:1
+6 QUIT
+7 ;
UPDPOV ; Update Selected Purpose of Visits (POV)
+1 NEW FBC,FBCODE,FBDA,FBFDA,FBI,FBNAME,FBPROG,FBX
+2 DO BMES^XPDUTL(" Updating selected POVs in the FEE BASIS PURPOSE OF VISIT (161.82) file...")
+3 ;
+4 ; verify IEN of OUTPATIENT program in FEE BASIS PROGRAM file
+5 IF $PIECE($GET(^FBAA(161.8,2,0)),U)'="OUTPATIENT"
Begin DoDot:1
+6 DO MES^XPDUTL(" ERROR: Fee Program with IEN 2 is not OUTPATIENT.")
+7 DO MES^XPDUTL(" Purpose of Visits could not be updated.")
End DoDot:1
QUIT
+8 ;
+9 ; update POVs
+10 KILL FBFDA
+11 ; loop thru POVs
+12 FOR FBI=1:1
SET FBX=$PIECE($TEXT(POV+FBI),";;",2)
if FBX="END"
QUIT
Begin DoDot:1
+13 SET FBCODE=$PIECE(FBX,U)
+14 SET FBNAME=$PIECE(FBX,U,2)
+15 SET FBPROG=$PIECE(FBX,U,3)
+16 ;
+17 ; locate POV in file
+18 SET FBDA=$$FIND1^DIC(161.82,"","X",FBCODE,"AC")
+19 ;
+20 ; if POV not found then add it
+21 IF 'FBDA
Begin DoDot:2
+22 NEW DA,DD,DIC,DINUM,DLAYGO,DO,X
+23 SET DIC="^FBAA(161.82,"
SET DIC(0)="L"
SET DLAYGO=161.82
+24 SET X=FBNAME
if X=""
QUIT
+25 SET DIC("DR")="2////^S X=FBPROG;3////^S X=FBCODE"
+26 IF +FBCODE
IF '$DATA(^FBAA(161.82,+FBCODE,0))
SET DINUM=+FBCODE
+27 DO FILE^DICN
+28 IF Y<0
DO MES^XPDUTL("ERROR ADDING POV WITH CODE "_FBCODE)
End DoDot:2
+29 ;
+30 ; if POV found then add to update list
+31 IF FBDA
Begin DoDot:2
+32 IF $$GET1^DIQ(161.82,FBDA_",",2,"I")=FBPROG
QUIT
+33 SET FBFDA(161.82,FBDA_",",2)=FBPROG
End DoDot:2
End DoDot:1
+34 ;
+35 ; actually update the found POVs
+36 IF $DATA(FBFDA)
DO FILE^DIE("","FBFDA")
+37 ;
+38 DO MES^XPDUTL(" Done.")
+39 QUIT
+40 ;
POV ;austin code^name^fee program
+1 ;;15^CLASS I DENTAL TREATMENT^2
+2 ;;16^CLASS II DENTAL TREATMENT^2
+3 ;;17^CLASS IIa DENTAL TREATMENT^2
+4 ;;18^CLASS IIb DENTAL TREATMENT^2
+5 ;;19^CLASS IIc DENTAL TREATMENT^2
+6 ;;20^CLASS IIr DENTAL TREATMENT^2
+7 ;;21^CLASS III DENTAL TREATMENT^2
+8 ;;22^CLASS IV DENTAL TREATMENT^2
+9 ;;23^CLASS V DENTAL TREATMENT^2
+10 ;;24^CLASS VI DENTAL TREATMENT^2
+11 ;;END
+12 ;
+13 ;FBXIP22