1 | PXAIUPRV ;ISL/JVS - VALIDATE THE PAROVDER NODES ;6/6/96 07:42
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
|
---|
3 | Q
|
---|
4 | ;
|
---|
5 | 01(IEN) ;
|
---|
6 | I '$D(^VA(200,+IEN,0)) S PXCA("ERROR","PROVIDER",IEN,0,0)="Provider not in File 200^"_IEN,PXAIVAL=1
|
---|
7 | ;E I '$D(^VA(200,"AK.PROVIDER",$P($G(^VA(200,+IEN,0)),"^"))) S PXCA("ERROR","PROVIDER",IEN,0,0)="Provider does not have the AK.PROVIDER key^"_IEN,PXAIVAL=2
|
---|
8 | Q
|
---|
9 | ;
|
---|
10 | 04(IEN,PRIMARY) ;
|
---|
11 | I '(PRIMARY="P"!(PRIMARY="S")) S PXCA("ERROR","PROVIDER",IEN,0,1)="Provider indicator code must be P|S^"_PRIMARY,PXAIVAL=1
|
---|
12 | ;If there is more than one primary the change additional ones to secondary.
|
---|
13 | I PRIMARY="P" D
|
---|
14 | . I 'PXCAPPRV S PXCAPPRV=IEN
|
---|
15 | . E I PXCAPPRV'=IEN D
|
---|
16 | .. S PXCA("WARNING","PROVIDER",IEN,0,1)="There is already a Primary Provider this one is changed to Secondary^"_PRIMARY
|
---|
17 | .. S $P(PXCAPRV,"^",1)="S"
|
---|
18 | Q
|
---|
19 | ;
|
---|
20 | 05(ATTEND) ;
|
---|
21 | I '(ATTEND=1!(ATTEND=0)!(ATTEND="")) S PXCA("ERROR","PROVIDER",IEN,0,2)="Attending flag bad^"_ATTEND,PXAIVAL=1
|
---|
22 | Q
|
---|
23 | ;
|
---|