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

XBFUNC1.m

Go to the documentation of this file.
  1. XBFUNC1 ; IHS/ADC/GTH - FUNCTION LIBRARY CONTINUED ; [ 02/07/97 3:02 PM ]
  1. ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
  1. ;
  1. PROVCLS(PROV,FORM) ;PEP - Retrieve Provider Class from New Person File
  1. I $G(PROV)="" Q ""
  1. I '$D(^VA(200,PROV)) Q ""
  1. NEW X,Z,Y,CLS,DIC,DR,DA,DIQ
  1. S DIC=200,DR="53.5",DA=PROV,DIQ="CLS"
  1. S:$G(FORM)="I" DIQ(0)="I"
  1. D ENDIQ1
  1. S CLS=$S($G(FORM)="I":CLS(200,PROV,"53.5","I"),1:CLS(200,PROV,"53.5"))
  1. Q $S(CLS="":"UNKNOWN",1:CLS)
  1. ;
  1. PROVCLSC(PROV) ;PEP - Retrieve Provider Class Code given New Person File IEN
  1. I $G(PROV)="" Q ""
  1. I '$D(^VA(200,PROV)) Q ""
  1. NEW X,Z,Y,CODE,DIC,DR,DA,DIQ,CLASS
  1. S CLASS=$$PROVCLS^XBFUNC1(PROV,"I")
  1. I CLASS="UNKNOWN" Q "UNKNOWN"
  1. S DIC=7,DR="9999999.01",DA=CLASS,DIQ="CODE"
  1. D ENDIQ1
  1. S CODE=CODE(7,CLASS,"9999999.01")
  1. Q $S(CODE="":"UNKNOWN",1:CODE)
  1. ;
  1. PROVAFFL(PROV,FORM) ;PEP - Retrieve provider affiliation in int or ext format
  1. I $G(PROV)="" Q ""
  1. I '$D(^VA(200,PROV)) Q ""
  1. NEW X,Z,Y,AFFL,DIC,DR,DA,DIQ
  1. S DIC=200,DR="9999999.01",DA=PROV,DIQ="AFFL"
  1. S:$G(FORM)="I" DIQ(0)="I"
  1. D ENDIQ1
  1. S AFFL=$S($G(FORM)="I":AFFL(200,PROV,"9999999.01","I"),1:AFFL(200,PROV,"9999999.01"))
  1. Q AFFL
  1. ;
  1. PROVCODE(PROV) ;PEP - Retrieve provider code
  1. I $G(PROV)="" Q ""
  1. I '$D(^VA(200,PROV)) Q ""
  1. NEW X,Z,Y,CODE,DIC,DR,DA,DIQ
  1. S DIC=200,DR="9999999.02",DA=PROV,DIQ="CODE",DIQ(0)="E"
  1. D ENDIQ1
  1. Q CODE(200,PROV,"9999999.02","E")
  1. ;
  1. PROVINI(PROV) ;PEP - Retrieve provider initials
  1. I '$G(PROV) Q ""
  1. I '$D(^VA(200,PROV)) Q ""
  1. NEW X,Z,Y,INIT,DIC,DR,DA,DIQ
  1. S DIC=200,DR="1",DA=PROV,DIQ="INIT",DIQ(0)="E"
  1. D ENDIQ1
  1. Q INIT(200,PROV,"1","E")
  1. ;
  1. ENDIQ1 ;
  1. NEW CLASS,FORM,PROV,X,Y,Z
  1. D EN^DIQ1
  1. Q
  1. ;