PXAIPRVV ;ISL/JVS - VALIDATE THE PROVIDER DATA ;3/19/97
;;1.0;PCE PATIENT CARE ENCOUNTER;**27**;Aug 12, 1996
;
;
Q
;
VAL ;--VALIDATE ENOUGH DATA
;
;
;----Missing a pointer to providers name
I $G(PXAA("NAME"))']"" 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)="NAME"
.S PXAERR(11)=$G(PXAA("NAME"))
.S PXAERR(12)="You are missing a pointer to the NEW PERSON file #200 that represents the providers name"
;
;----Not a pointer to NEW PERSON file#200
I $G(PXAA("NAME"))'["@" D 01^PXAIUPRV($G(PXAA("NAME"))) I $G(PXAIVAL)=1 K PXAIVAL,PXCA("ERROR") D Q:$G(STOP)
.S STOP=1
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.001
.S PXAERR(9)="NAME"
.S PXAERR(11)=$G(PXAA("NAME"))
.S PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the NEW PERSON file #200"
;
;----Not have an active person class
N CLASS
S CLASS=+$$GET^XUA4A72($G(PXAA("NAME")),+$G(^AUPNVSIT(PXAVISIT,0))) I CLASS<0,'$G(PXAA("DELETE")) D
.S STOP=1
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.001
.S PXAERR(9)="NAME"
.S PXAERR(11)=$G(PXAA("NAME"))
.S PXAERR(12)="The Provider does not have an ACTIVE person class!"
Q
VAL04 ;---SET UP INFORMATION TO DELIVER ERROR
D
.S PXAERRF=1
.S PXADI("DIALOG")=8390001.002
.S PXAERR(9)="PRIMARY"
.S PXAERR(11)=$G(PXAA("PRIMARY"))
.S PXAERR(12)="Another provider has been previously designated as the PRIMARY provider for this patient encounter. "_PXAAX("NAME")_" will be saved as s secondary provider."
.S PXAERR(13)="If you whish to change the PRIMARY PROVIDER designation for this encounter, please use one of PCE'S interactive interfaces."
;
Q
PXAIPRVV ;ISL/JVS - VALIDATE THE PROVIDER DATA ;3/19/97
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**27**;Aug 12, 1996
+2 ;
+3 ;
+4 QUIT
+5 ;
VAL ;--VALIDATE ENOUGH DATA
+1 ;
+2 ;
+3 ;----Missing a pointer to providers name
+4 IF $GET(PXAA("NAME"))']""
Begin DoDot:1
+5 ;--USED TO STOP DO LOOP
SET STOP=1
+6 ;--FLAG INDICATES THERE IS AN ERR
SET PXAERRF=1
+7 SET PXADI("DIALOG")=8390001.001
+8 SET PXAERR(9)="NAME"
+9 SET PXAERR(11)=$GET(PXAA("NAME"))
+10 SET PXAERR(12)="You are missing a pointer to the NEW PERSON file #200 that represents the providers name"
End DoDot:1
IF $GET(STOP)
QUIT
+11 ;
+12 ;----Not a pointer to NEW PERSON file#200
+13 IF $GET(PXAA("NAME"))'["@"
DO 01^PXAIUPRV($GET(PXAA("NAME")))
IF $GET(PXAIVAL)=1
KILL PXAIVAL,PXCA("ERROR")
Begin DoDot:1
+14 SET STOP=1
+15 SET PXAERRF=1
+16 SET PXADI("DIALOG")=8390001.001
+17 SET PXAERR(9)="NAME"
+18 SET PXAERR(11)=$GET(PXAA("NAME"))
+19 SET PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the NEW PERSON file #200"
End DoDot:1
IF $GET(STOP)
QUIT
+20 ;
+21 ;----Not have an active person class
+22 NEW CLASS
+23 SET CLASS=+$$GET^XUA4A72($GET(PXAA("NAME")),+$GET(^AUPNVSIT(PXAVISIT,0)))
IF CLASS<0
IF '$GET(PXAA("DELETE"))
Begin DoDot:1
+24 SET STOP=1
+25 SET PXAERRF=1
+26 SET PXADI("DIALOG")=8390001.001
+27 SET PXAERR(9)="NAME"
+28 SET PXAERR(11)=$GET(PXAA("NAME"))
+29 SET PXAERR(12)="The Provider does not have an ACTIVE person class!"
End DoDot:1
+30 QUIT
VAL04 ;---SET UP INFORMATION TO DELIVER ERROR
+1 Begin DoDot:1
+2 SET PXAERRF=1
+3 SET PXADI("DIALOG")=8390001.002
+4 SET PXAERR(9)="PRIMARY"
+5 SET PXAERR(11)=$GET(PXAA("PRIMARY"))
+6 SET PXAERR(12)="Another provider has been previously designated as the PRIMARY provider for this patient encounter. "_PXAAX("NAME")_" will be saved as s secondary provider."
+7 SET PXAERR(13)="If you whish to change the PRIMARY PROVIDER designation for this encounter, please use one of PCE'S interactive interfaces."
End DoDot:1
+8 ;
+9 QUIT