source: FOIAVistA/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXAIPRVV.m@ 1245

Last change on this file since 1245 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1PXAIPRVV ;ISL/JVS - VALIDATE THE PROVIDER DATA ;3/19/97
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**27,186**;Aug 12, 1996;Build 3
3 ;
4 ;
5 Q
6 ;
7VAL ;--VALIDATE ENOUGH DATA
8 ;
9 ;
10 ;----Missing a pointer to providers name
11 I $G(PXAA("NAME"))']"" D Q:$G(STOP)
12 .S STOP=1 ;--USED TO STOP DO LOOP
13 .S PXAERRF=1 ;--FLAG INDICATES THERE IS AN ERR
14 .S PXADI("DIALOG")=8390001.001
15 .S PXAERR(9)="NAME"
16 .S PXAERR(11)=$G(PXAA("NAME"))
17 .S PXAERR(12)="You are missing a pointer to the NEW PERSON file #200 that represents the providers name"
18 ;
19 ;----Not a pointer to NEW PERSON file#200
20 I $G(PXAA("NAME"))'["@" D 01^PXAIUPRV($G(PXAA("NAME"))) I $G(PXAIVAL)=1 K PXAIVAL,PXCA("ERROR") D Q:$G(STOP)
21 .S STOP=1
22 .S PXAERRF=1
23 .S PXADI("DIALOG")=8390001.001
24 .S PXAERR(9)="NAME"
25 .S PXAERR(11)=$G(PXAA("NAME"))
26 .S PXAERR(12)=PXAERR(11)_" is NOT a pointer value to the NEW PERSON file #200"
27 ;
28 ;----Not have an active person class
29 N CLASS
30 S CLASS=+$$GET^XUA4A72($G(PXAA("NAME")),$P(+$G(^AUPNVSIT(PXAVISIT,0)),".")) I CLASS<0,'$G(PXAA("DELETE")) D
31 .S STOP=1
32 .S PXAERRF=1
33 .S PXADI("DIALOG")=8390001.001
34 .S PXAERR(9)="NAME"
35 .S PXAERR(11)=$G(PXAA("NAME"))
36 .S PXAERR(12)="The Provider does not have an ACTIVE person class!"
37 Q
38VAL04 ;---SET UP INFORMATION TO DELIVER ERROR
39 D
40 .S PXAERRF=1
41 .S PXADI("DIALOG")=8390001.002
42 .S PXAERR(9)="PRIMARY"
43 .S PXAERR(11)=$G(PXAA("PRIMARY"))
44 .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."
45 .S PXAERR(13)="If you whish to change the PRIMARY PROVIDER designation for this encounter, please use one of PCE'S interactive interfaces."
46 ;
47 Q
Note: See TracBrowser for help on using the repository browser.