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

AVAPRVC.m

Go to the documentation of this file.
AVAPRVC ; OHPRD/DG - MUMPS CONDITIONAL ON PROVIDER FILE ; 27-MAY-1993
 ;;93.2;VA SUPPORT FILES;;JUL 01, 1993;Build 12
 ;FINDS OR CREATES GENERIC PROVIDER
 ;
LKUP S AVA("D")=$O(^DIC(7,"B",^UTILITY("DIFGFLD",$J,2),""))
 I AVA("D"),$D(^DIC(7,AVA("D"),9999999)) S AVA("D")=^(9999999)
 E  G XIT ; No Code For Provider Class (Discipline)
 S AVA("AFFIL")=$$INTSET^XBFUNC(6,9999999.01,^UTILITY("DIFGFLD",$J,9999999.01))
 S AVA("ADP")=AVA("AFFIL")_AVA("D")_999
 I $D(^DIC(6,"GIHS",AVA("ADP"))) S Y=$O(^(AVA("ADP"),""))
 E  D CREATE
XIT K AVA
 Q
 ;
CREATE ; Creates New Generic Provider
 NEW DIC,DR,DA,X
 S X=^UTILITY("DIFGFLD",$J,2)_","_$S(^UTILITY("DIFGFLD",$J,9999999.01)'[638:^(9999999.01),1:"TRIBAL CONTRACT")
 S DIC("DR")="",DIADD=1,DLAYGO=16,DIC="^DIC(16,",DIC(0)="FML" D ^DIC K DIC,DR,DA,DIADD I Y=-1 G X1
 S AVA("PRSN")=+Y
 S X="`"_+Y,DIC="^DIC(6,",DLAYGO=6,DIC(0)="FML",DIC("DR")="2///"_^UTILITY("DIFGFLD",$J,2)_";9999999.01///"_^UTILITY("DIFGFLD",$J,9999999.01)_";9999999.02////999" D ^DIC K DIC,DA,DR
 I Y=-1 S DA=AVA("PRSN"),DIK="^DIC(16," D ^DIK K DIK,DA
 I Y>0 S Y=+Y
X1 Q
 ;