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

APCPAPRO.m

Go to the documentation of this file.
APCPAPRO ; IHS/TUCSON/LAB - get provider information for APC record AUGUST 14, 1992 ; [ 04/03/98  08:39 AM ]
 ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;;APR 03, 1998
 ;
PROV ;
 S (APCPAS1,APCPAS2,APCPAS3)="  ",APCPT("A PROVS")=""
 S (APCPT(1),APCPT(2))=0 F  S APCPT(2)=$O(^AUPNVPRV("AD",APCP("V DFN"),APCPT(2))) Q:APCPT(2)'=+APCPT(2)!(APCPT(1)=3)  D SEC
 I $D(APCPE("ERROR")) S APCPT("FILE")=9000010.06 D EOJ Q
 S APCPT("A PROVS")=APCPV("PP DISC")_APCPAS1_APCPAS2_APCPAS3
 D EOJ
 Q
EOJ ;
 K APCPAS1,APCPAS2,APCPAS3
 Q
SEC ;
 I $P(^AUPNVPRV(APCPT(2),0),U,4)="S" S APCPT("AP")=$P(^(0),U) D DISC I '$D(APCPE("ERROR")),APCPT("DISC")'=88 S APCPT(1)=APCPT(1)+1,APCPT("VAR")="APCPAS"_APCPT(1),@APCPT("VAR")=APCPT("DISC")
 Q
DISC ;
 I APCPS("PROV FILE")=200,'$D(^VA(200,APCPT("AP"))) S APCPE("ERROR")="E002" Q
 I APCPS("PROV FILE")=6,'$D(^DIC(6,APCPT("AP"))) S APCPE("ERROR")="E002" Q
 S APCPT("DISC")=$$VAL^XBDIQ1(APCPS("PROV FILE"),APCPT("AP"),9999999.03) I APCPT("DISC")="" S APCPE("ERROR")="E027" Q
 Q