Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PXCAVST2

PXCAVST2.m

Go to the documentation of this file.
  1. PXCAVST2 ;ISL/dee & LEA/Chylton - Validates data from the PCE Device Interface for the Visit and Providers ;3/14/97
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**27,33**;Aug 12, 1996
  1. Q
  1. ;
  1. PROVIDER ;Now do the providers
  1. N PXCAPERR,PXCAPRCK
  1. S PXCAPERR=1
  1. S (PXCAITEM,PXCAPRCK)=+$P(PXCAENC,"^",4)
  1. I PXCAPRCK,'$$ACTIVPRV^PXAPI(PXCAITEM,PXCADT) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,4)="Provider is not active or valid^"_PXCAITEM
  1. ; add check if no provider sent
  1. I 'PXCAPRCK S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,4)="No Provider entered"
  1. S PXCAITEM=$P(PXCAENC,"^",15)
  1. I PXCAPRCK,'(PXCAITEM="P"!(PXCAITEM="S")) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,15)="Provider indicator code must be P|S^"_PXCAITEM
  1. E I PXCAITEM="P" D
  1. . I 'PXCAPPRV S PXCAPPRV=+$P(PXCAENC,"^",4)
  1. . E I PXCAPPRV'=+$P(PXCAENC,"^",4) D
  1. .. S PXCA("WARNING","ENCOUNTER",0,0,15)="There is already a Primary Provider this one is changed to Secondary^"_PXCAITEM
  1. .. S $P(PXCAENC,"^",15)="S"
  1. S PXCAITEM=$P(PXCAENC,"^",16)
  1. I PXCAITEM]"" D
  1. . I '$$ACTIVPRV^PXAPI(PXCAITEM,PXCADT) S PXCAPERR=0,PXCA("ERROR","ENCOUNTER",0,0,16)="Attending Provider is not active or valid^"_PXCAITEM
  1. I PXCABULD&PXCAPERR!PXCAERRS D PROVIDER^PXCAPRV(PXCAENC)
  1. Q
  1. ;
  1. EVALCODE(PXCAEVAL) ;Now do the Evaluation and Management CPT
  1. S PXCAITEM=+$P(PXCAENC,"^",5)
  1. I PXCAITEM D
  1. . N DIC,DR,DA,DIQ,PXCADIQ1
  1. . S DIC=357.69
  1. . S DR=".01;4"
  1. . S DA=+PXCAITEM
  1. . S DIQ="PXCADIQ1("
  1. . S DIQ(0)="I"
  1. . D EN^DIQ1
  1. . 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
  1. . I $G(PXCADIQ1(357.69,DA,4,"I")) S PXCA("ERROR","ENCOUNTER",0,0,5)="Evaluation and Management CPT code is INACTIVE^"_PXCAITEM Q
  1. . S PXCAEVAL=1
  1. Q
  1. ;