APCDCAF7 ;IHS/OIT/LJF - NEW INCOMPLETE CHART EDIT OPTION
;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
;
;
INIT ;EP; -- init variables and list array
NEW CATG,LINE,FIELD,ITEM,X
S VALMCNT=0 K APCDCDEV
S LINE="Date Chart Tagged: "_$$GET1^DIQ(9000095,APCDVSIT,.03)
D SET(LINE,.VALMCNT)
;S LINE="Date Reviewed/Complete: "_$$GET1^DIQ(9000095,APCDVSIT,.04)
;D SET(LINE,.VALMCNT)
;
; display ALL provider deficiencies
NEW APCDN1,IENS,PROV,PROVN
D SET("",.VALMCNT)
D SET($$PAD($$PAD("Provider",25)_"Deficiencies",60)_"Status",.VALMCNT)
D SET($$REPEAT^XLFSTR("=",75),.VALMCNT)
;
S APCDN1=0 F S APCDN1=$O(^AUPNCANT(APCDVSIT,12,APCDN1)) Q:'APCDN1 D
. S IENS=APCDN1_","_APCDVSIT
. Q:$$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.03)]"" Q ;skip if resolved & not displaying all
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.08)]"" Q ;skip if deleted & not displaying all
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
. ;
. S PROV=$$GET1^DIQ(9000095.12,IENS,.01,"I") ;provider IEN
. S PROVN=$$GET1^DIQ(9000095.12,IENS,.01) ;provider name
. ;
. S LINE=$$PAD($E(PROVN,1,22),25)_$$GET1^DIQ(9000095.12,IENS,.02) ;provider & deficiency
. S LINE=$$PAD(LINE,60)_$$GET1^DIQ(9000095.12,IENS,.11) ;resolution status
. D SET(LINE,.VALMCNT)
. S LINE=$$PAD(" Entered by: "_$$GET1^DIQ(9000095.12,IENS,.05),50)_"Date Entered: "_$$GET1^DIQ(9000095.12,IENS,.04)
. D SET(LINE,.VALMCNT)
. I $P(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)]"" S LINE="Comments: "_$P(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10) D SET(LINE,.VALMCNT)
. ;
S APCDN1=0 F S APCDN1=$O(^AUPNCANT(APCDVSIT,12,APCDN1)) Q:'APCDN1 D
. S IENS=APCDN1_","_APCDVSIT
. Q:$$GET1^DIQ(9000095.12,IENS,.11,"I")="P"
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.03)]"" Q ;skip if resolved & not displaying all
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.08)]"" Q ;skip if deleted & not displaying all
. I '$G(APCDDALL),$$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
. ;
. S PROV=$$GET1^DIQ(9000095.12,IENS,.01,"I") ;provider IEN
. S PROVN=$$GET1^DIQ(9000095.12,IENS,.01) ;provider name
. ;
. S LINE=$$PAD($E(PROVN,1,22),25)_$$GET1^DIQ(9000095.12,IENS,.02) ;provider & deficiency
. S LINE=$$PAD(LINE,60)_$$GET1^DIQ(9000095.12,IENS,.11) ;resolution status
. D SET(LINE,.VALMCNT)
. S LINE=$$PAD("Entered by: "_$$GET1^DIQ(9000095.12,IENS,.05),50)_"Date Entered: "_$$GET1^DIQ(9000095.12,IENS,.04)
. D SET(LINE,.VALMCNT)
. I $P(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)]"" S LINE="Comments: "_$P(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10) D SET(LINE,.VALMCNT)
. ;
I '$O(^AUPNCANT(APCDVSIT,12,0)) D SET($$SP(5)_"NO DEFICIENCIES ON RECORD",.VALMCNT)
D SET("",.VALMCNT)
;PUT IN CHART AUDIT NOTES
D SET("Chart Audit Notes",.VALMCNT)
D SET($$REPEAT^XLFSTR("=",17),.VALMCNT)
S APCDN1=0 F S APCDN1=$O(^AUPNCANT(APCDVSIT,11,APCDN1)) Q:APCDN1'=+APCDN1 D
.D SET(^AUPNCANT(APCDVSIT,11,APCDN1,0),.VALMCNT)
Q
;
SET(DATA,COUNT) ; stuff data into display lie
S COUNT=COUNT+1
S APCDCDEV(COUNT,0)=DATA
Q
;
PAD(D,L) ;EP pad length of data
; -- D=data L=length
Q $E(D_$$REPEAT^XLFSTR(" ",L),1,L)
;
SP(N) ; pad N number of spaces
Q $$PAD(" ",N)
APCDCAF7 ;IHS/OIT/LJF - NEW INCOMPLETE CHART EDIT OPTION
+1 ;;2.0;IHS PCC SUITE;**11**;MAY 14, 2009;Build 58
+2 ;
+3 ;
INIT ;EP; -- init variables and list array
+1 NEW CATG,LINE,FIELD,ITEM,X
+2 SET VALMCNT=0
KILL APCDCDEV
+3 SET LINE="Date Chart Tagged: "_$$GET1^DIQ(9000095,APCDVSIT,.03)
+4 DO SET(LINE,.VALMCNT)
+5 ;S LINE="Date Reviewed/Complete: "_$$GET1^DIQ(9000095,APCDVSIT,.04)
+6 ;D SET(LINE,.VALMCNT)
+7 ;
+8 ; display ALL provider deficiencies
+9 NEW APCDN1,IENS,PROV,PROVN
+10 DO SET("",.VALMCNT)
+11 DO SET($$PAD($$PAD("Provider",25)_"Deficiencies",60)_"Status",.VALMCNT)
+12 DO SET($$REPEAT^XLFSTR("=",75),.VALMCNT)
+13 ;
+14 SET APCDN1=0
FOR
SET APCDN1=$ORDER(^AUPNCANT(APCDVSIT,12,APCDN1))
IF 'APCDN1
QUIT
Begin DoDot:1
+15 SET IENS=APCDN1_","_APCDVSIT
+16 IF $$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
QUIT
+17 ;skip if resolved & not displaying all
IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.03)]""
QUIT
+18 ;skip if deleted & not displaying all
IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.08)]""
QUIT
+19 IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
+20 ;
+21 ;provider IEN
SET PROV=$$GET1^DIQ(9000095.12,IENS,.01,"I")
+22 ;provider name
SET PROVN=$$GET1^DIQ(9000095.12,IENS,.01)
+23 ;
+24 ;provider & deficiency
SET LINE=$$PAD($EXTRACT(PROVN,1,22),25)_$$GET1^DIQ(9000095.12,IENS,.02)
+25 ;resolution status
SET LINE=$$PAD(LINE,60)_$$GET1^DIQ(9000095.12,IENS,.11)
+26 DO SET(LINE,.VALMCNT)
+27 SET LINE=$$PAD(" Entered by: "_$$GET1^DIQ(9000095.12,IENS,.05),50)_"Date Entered: "_$$GET1^DIQ(9000095.12,IENS,.04)
+28 DO SET(LINE,.VALMCNT)
+29 IF $PIECE(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)]""
SET LINE="Comments: "_$PIECE(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)
DO SET(LINE,.VALMCNT)
+30 ;
End DoDot:1
+31 SET APCDN1=0
FOR
SET APCDN1=$ORDER(^AUPNCANT(APCDVSIT,12,APCDN1))
IF 'APCDN1
QUIT
Begin DoDot:1
+32 SET IENS=APCDN1_","_APCDVSIT
+33 IF $$GET1^DIQ(9000095.12,IENS,.11,"I")="P"
QUIT
+34 ;skip if resolved & not displaying all
IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.03)]""
QUIT
+35 ;skip if deleted & not displaying all
IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.08)]""
QUIT
+36 IF '$GET(APCDDALL)
IF $$GET1^DIQ(9000095.12,IENS,.11,"I")'="P"
+37 ;
+38 ;provider IEN
SET PROV=$$GET1^DIQ(9000095.12,IENS,.01,"I")
+39 ;provider name
SET PROVN=$$GET1^DIQ(9000095.12,IENS,.01)
+40 ;
+41 ;provider & deficiency
SET LINE=$$PAD($EXTRACT(PROVN,1,22),25)_$$GET1^DIQ(9000095.12,IENS,.02)
+42 ;resolution status
SET LINE=$$PAD(LINE,60)_$$GET1^DIQ(9000095.12,IENS,.11)
+43 DO SET(LINE,.VALMCNT)
+44 SET LINE=$$PAD("Entered by: "_$$GET1^DIQ(9000095.12,IENS,.05),50)_"Date Entered: "_$$GET1^DIQ(9000095.12,IENS,.04)
+45 DO SET(LINE,.VALMCNT)
+46 IF $PIECE(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)]""
SET LINE="Comments: "_$PIECE(^AUPNCANT(APCDVSIT,12,APCDN1,0),U,10)
DO SET(LINE,.VALMCNT)
+47 ;
End DoDot:1
+48 IF '$ORDER(^AUPNCANT(APCDVSIT,12,0))
DO SET($$SP(5)_"NO DEFICIENCIES ON RECORD",.VALMCNT)
+49 DO SET("",.VALMCNT)
+50 ;PUT IN CHART AUDIT NOTES
+51 DO SET("Chart Audit Notes",.VALMCNT)
+52 DO SET($$REPEAT^XLFSTR("=",17),.VALMCNT)
+53 SET APCDN1=0
FOR
SET APCDN1=$ORDER(^AUPNCANT(APCDVSIT,11,APCDN1))
IF APCDN1'=+APCDN1
QUIT
Begin DoDot:1
+54 DO SET(^AUPNCANT(APCDVSIT,11,APCDN1,0),.VALMCNT)
End DoDot:1
+55 QUIT
+56 ;
SET(DATA,COUNT) ; stuff data into display lie
+1 SET COUNT=COUNT+1
+2 SET APCDCDEV(COUNT,0)=DATA
+3 QUIT
+4 ;
PAD(D,L) ;EP pad length of data
+1 ; -- D=data L=length
+2 QUIT $EXTRACT(D_$$REPEAT^XLFSTR(" ",L),1,L)
+3 ;
SP(N) ; pad N number of spaces
+1 QUIT $$PAD(" ",N)