1 | PXCAVST2 ;ISL/dee & LEA/Chylton - Validates data from the PCE Device Interface for the Visit and Providers ;3/14/97
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**27,33**;Aug 12, 1996
|
---|
3 | Q
|
---|
4 | ;
|
---|
5 | PROVIDER ;Now do the providers
|
---|
6 | N PXCAPERR,PXCAPRCK
|
---|
7 | S PXCAPERR=1
|
---|
8 | S (PXCAITEM,PXCAPRCK)=+$P(PXCAENC,"^",4)
|
---|
9 | I PXCAPRCK,'$$ACTIVPRV^PXAPI(PXCAITEM,PXCADT) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,4)="Provider is not active or valid^"_PXCAITEM
|
---|
10 | ; add check if no provider sent
|
---|
11 | I 'PXCAPRCK S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,4)="No Provider entered"
|
---|
12 | S PXCAITEM=$P(PXCAENC,"^",15)
|
---|
13 | I PXCAPRCK,'(PXCAITEM="P"!(PXCAITEM="S")) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,15)="Provider indicator code must be P|S^"_PXCAITEM
|
---|
14 | E I PXCAITEM="P" D
|
---|
15 | . I 'PXCAPPRV S PXCAPPRV=+$P(PXCAENC,"^",4)
|
---|
16 | . E I PXCAPPRV'=+$P(PXCAENC,"^",4) D
|
---|
17 | .. S PXCA("WARNING","ENCOUNTER",0,0,15)="There is already a Primary Provider this one is changed to Secondary^"_PXCAITEM
|
---|
18 | .. S $P(PXCAENC,"^",15)="S"
|
---|
19 | S PXCAITEM=$P(PXCAENC,"^",16)
|
---|
20 | I PXCAITEM]"" D
|
---|
21 | . I '$$ACTIVPRV^PXAPI(PXCAITEM,PXCADT) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,16)="Attending Provider is not active or valid^"_PXCAITEM
|
---|
22 | I PXCABULD&PXCAPERR!PXCAERRS D PROVIDER^PXCAPRV(PXCAENC)
|
---|
23 | Q
|
---|
24 | ;
|
---|
25 | EVALCODE(PXCAEVAL) ;Now do the Evaluation and Management CPT
|
---|
26 | S PXCAITEM=+$P(PXCAENC,"^",5)
|
---|
27 | I PXCAITEM D
|
---|
28 | . N DIC,DR,DA,DIQ,PXCADIQ1
|
---|
29 | . S DIC=357.69
|
---|
30 | . S DR=".01;4"
|
---|
31 | . S DA=+PXCAITEM
|
---|
32 | . S DIQ="PXCADIQ1("
|
---|
33 | . S DIQ(0)="I"
|
---|
34 | . D EN^DIQ1
|
---|
35 | . I $G(PXCADIQ1(357.69,DA,.01,"I"))="" S PXCA("ERROR","ENCOUNTER",0,0,5)="Evaluation and Management CPT code not in File 357.69^"_PXCAITEM Q
|
---|
36 | . I $G(PXCADIQ1(357.69,DA,4,"I")) S PXCA("ERROR","ENCOUNTER",0,0,5)="Evaluation and Management CPT code is INACTIVE^"_PXCAITEM Q
|
---|
37 | . S PXCAEVAL=1
|
---|
38 | Q
|
---|
39 | ;
|
---|