PXAICPTV ;ISL/JVS,ISA/KWP - VALADATE PROCEDURES(CPT) ;11/14/96 12:46
;;1.0;PCE PATIENT CARE ENCOUNTER;**15,73,74,111**;Aug 12, 1996
;
VAL ;--VALIDATE ENOUGH DATA
;----Missing a pointer to PROCEDURE(CPT) name
I $G(PXAA("PROCEDURE"))']"" D Q:$G(STOP)
.S STOP=1 ;--USED TO STOP DO LOOP
.S PXAERRF=1 ;--FLAG INDICATES THERE IS AN ERR
.S PXADI("DIALOG")=8390001.001
.S PXAERR(9)="PROCEDURE"
.S PXAERR(11)=$G(PXAA("PROCEDURE"))
.S PXAERR(12)="You are missing a pointer to the PROCEDURE CPT FILE#81 that represents the procedure's name"
;
;----NOT a pointer to PROCEDURE CPT FILE#81
I '$D(^ICPT($G(PXAA("PROCEDURE")),0)) D Q:$G(STOP)
.S STOP=1
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.001
.S PXAERR(9)="PROCEDURE"
.S PXAERR(11)=$G(PXAA("PROCEDURE"))
.S PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the CPT FILE #81"
;
;----Not a valid modifier
N SUB,MODIEN
S SUB=""
F S SUB=$O(PXAA("MODIFIERS",SUB)) Q:SUB=""!($G(STOP)) D
.S MODIEN=$$MODP^ICPTMOD(PXAA("PROCEDURE"),SUB,"E","",0)
.I $P(MODIEN,"^")>0 Q
.S STOP=1
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.001
.S PXAERR(9)="MODIFIERS"_","_SUB
.S PXAERR(11)=""
.S PXAERR(12)=SUB_" is NOT a valid modifier for procedure "_$G(PXAA("PROCEDURE"))
;----"Missing the number of times the procedure was performed.
I $G(PXAA("QTY"))<1 D
.S STOP=0
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.002
.S PXAERR(9)="QTY"
.S PXAERR(11)=$G(PXAA("QTY"))
.S PXAERR(12)="If this node is empty we will assume it should be '1'. If it is a less than '1' we will delete any reference to it in the data base."
;
;
Q
VAL04 ;---PROVIDER NARRATIVE
S STOP=1
S PXAERRF=1
S PXADI("DIALOG")=8390001.001
S PXAERR(9)="NARRATIVE"
S PXAERR(11)=$G(PXAA("NARRATIVE"))
S PXAERR(12)="We are unable to retrive a narrative from the PROVIDER NARRATIVE file #9999999.27"
Q
VAL45 ;---PROVIDER NARRATIVE CATEGORY
S STOP=0
S PXAERRF=1
S PXADI("DIALOG")=8390001.002
S PXAERR(9)="CATEGORY"
S PXAERR(11)=$G(PXAA("CATEGORY"))
S PXAERR(12)="We are unable to retrieve a narrative from the PROVIDER NARRATIVE file #9999999.27"
Q
;---------------------SUBROUTINE------------------------------
ARRAY ;--SET ERRORS AND WARNINGS INTO AN ARRAY TO RETURN TO CALLER
I PXADI("DIALOG")=8390001.001 D
.S PXASUB=PXASUB+1
.S PXAPROB($J,PXASUB,"ERROR1",PXAERR(7),PXAERR(9),PXAK)=$G(PXAERR(12))
I PXADI("DIALOG")=8390001.002 D
.S PXASUB=PXASUB+1
.S PXAPROB($J,PXASUB,"WARNING2",PXAERR(7),PXAERR(9),PXAK)=$G(PXAERR(12))
I PXADI("DIALOG")=8390001.003 D
.S PXASUB=PXASUB+1
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"SC")=$G(PXAERR("6W"))
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"AO")=$G(PXAERR("7W"))
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"IR")=$G(PXAERR("8W"))
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"EC")=$G(PXAERR("9W"))
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"MST")=$G(PXAERR("10W"))
.;PX*1*111 - Add HNC
.S PXAPROB($J,PXASUB,"WARNING3","ENCOUNTER",1,"HNC")=$G(PXAERR("17W"))
I PXADI("DIALOG")=8390001.004 D
.S PXASUB=PXASUB+1
.S PXAPROB($J,PXASUB,"ERROR4","PX/DL",PXAK)=$G(PXAERR("PL1"))
Q
PXAICPTV ;ISL/JVS,ISA/KWP - VALADATE PROCEDURES(CPT) ;11/14/96 12:46
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**15,73,74,111**;Aug 12, 1996
+2 ;
VAL ;--VALIDATE ENOUGH DATA
+1 ;----Missing a pointer to PROCEDURE(CPT) name
+2 IF $GET(PXAA("PROCEDURE"))']""
Begin DoDot:1
+3 ;--USED TO STOP DO LOOP
SET STOP=1
+4 ;--FLAG INDICATES THERE IS AN ERR
SET PXAERRF=1
+5 SET PXADI("DIALOG")=8390001.001
+6 SET PXAERR(9)="PROCEDURE"
+7 SET PXAERR(11)=$GET(PXAA("PROCEDURE"))
+8 SET PXAERR(12)="You are missing a pointer to the PROCEDURE CPT FILE#81 that represents the procedure's name"
End DoDot:1
IF $GET(STOP)
QUIT
+9 ;
+10 ;----NOT a pointer to PROCEDURE CPT FILE#81
+11 IF '$DATA(^ICPT($GET(PXAA("PROCEDURE")),0))
Begin DoDot:1
+12 SET STOP=1
+13 SET PXAERRF=1
+14 SET PXADI("DIALOG")=8390001.001
+15 SET PXAERR(9)="PROCEDURE"
+16 SET PXAERR(11)=$GET(PXAA("PROCEDURE"))
+17 SET PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the CPT FILE #81"
End DoDot:1
IF $GET(STOP)
QUIT
+18 ;
+19 ;----Not a valid modifier
+20 NEW SUB,MODIEN
+21 SET SUB=""
+22 FOR
SET SUB=$ORDER(PXAA("MODIFIERS",SUB))
IF SUB=""!($GET(STOP))
QUIT
Begin DoDot:1
+23 SET MODIEN=$$MODP^ICPTMOD(PXAA("PROCEDURE"),SUB,"E","",0)
+24 IF $PIECE(MODIEN,"^")>0
QUIT
+25 SET STOP=1
+26 SET PXAERRF=1
+27 SET PXADI("DIALOG")=8390001.001
+28 SET PXAERR(9)="MODIFIERS"_","_SUB
+29 SET PXAERR(11)=""
+30 SET PXAERR(12)=SUB_" is NOT a valid modifier for procedure "_$GET(PXAA("PROCEDURE"))
End DoDot:1
+31 ;----"Missing the number of times the procedure was performed.
+32 IF $GET(PXAA("QTY"))<1
Begin DoDot:1
+33 SET STOP=0
+34 SET PXAERRF=1
+35 SET PXADI("DIALOG")=8390001.002
+36 SET PXAERR(9)="QTY"
+37 SET PXAERR(11)=$GET(PXAA("QTY"))
+38 SET PXAERR(12)="If this node is empty we will assume it should be '1'. If it is a less than '1' we will delete any reference to it in the data base."
End DoDot:1
+39 ;
+40 ;
+41 QUIT
VAL04 ;---PROVIDER NARRATIVE
+1 SET STOP=1
+2 SET PXAERRF=1
+3 SET PXADI("DIALOG")=8390001.001
+4 SET PXAERR(9)="NARRATIVE"
+5 SET PXAERR(11)=$GET(PXAA("NARRATIVE"))
+6 SET PXAERR(12)="We are unable to retrive a narrative from the PROVIDER NARRATIVE file #9999999.27"
+7 QUIT
VAL45 ;---PROVIDER NARRATIVE CATEGORY
+1 SET STOP=0
+2 SET PXAERRF=1
+3 SET PXADI("DIALOG")=8390001.002
+4 SET PXAERR(9)="CATEGORY"
+5 SET PXAERR(11)=$GET(PXAA("CATEGORY"))
+6 SET PXAERR(12)="We are unable to retrieve a narrative from the PROVIDER NARRATIVE file #9999999.27"
+7 QUIT
+8 ;---------------------SUBROUTINE------------------------------
ARRAY ;--SET ERRORS AND WARNINGS INTO AN ARRAY TO RETURN TO CALLER
+1 IF PXADI("DIALOG")=8390001.001
Begin DoDot:1
+2 SET PXASUB=PXASUB+1
+3 SET PXAPROB($JOB,PXASUB,"ERROR1",PXAERR(7),PXAERR(9),PXAK)=$GET(PXAERR(12))
End DoDot:1
+4 IF PXADI("DIALOG")=8390001.002
Begin DoDot:1
+5 SET PXASUB=PXASUB+1
+6 SET PXAPROB($JOB,PXASUB,"WARNING2",PXAERR(7),PXAERR(9),PXAK)=$GET(PXAERR(12))
End DoDot:1
+7 IF PXADI("DIALOG")=8390001.003
Begin DoDot:1
+8 SET PXASUB=PXASUB+1
+9 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"SC")=$GET(PXAERR("6W"))
+10 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"AO")=$GET(PXAERR("7W"))
+11 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"IR")=$GET(PXAERR("8W"))
+12 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"EC")=$GET(PXAERR("9W"))
+13 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"MST")=$GET(PXAERR("10W"))
+14 ;PX*1*111 - Add HNC
+15 SET PXAPROB($JOB,PXASUB,"WARNING3","ENCOUNTER",1,"HNC")=$GET(PXAERR("17W"))
End DoDot:1
+16 IF PXADI("DIALOG")=8390001.004
Begin DoDot:1
+17 SET PXASUB=PXASUB+1
+18 SET PXAPROB($JOB,PXASUB,"ERROR4","PX/DL",PXAK)=$GET(PXAERR("PL1"))
End DoDot:1
+19 QUIT