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

APCDVREF.m

Go to the documentation of this file.
APCDVREF ; IHS/CMI/LAB - POV LOOKUP ; 13 Feb 2014  2:26 PM
 ;;2.0;IHS PCC SUITE;**20**;MAY 14, 2009;Build 25
 ;
FIX ;PEP - CALLED TO STUFF 1202 OF V REFERRAL WITH REQUESTING PROVIDER
 ;FROM RCIS REFERRAL ENTRY
 ;NULL OUT 1210 FIELD VALUE
 ;MOVE AND CORRECT V REFERRAL INFO BASED ON REFERRAL ENTRY
 NEW APCDVREF,APCDREF,APCDRP
 S APCDVREF=0 F  S APCDVREF=$O(^AUPNVREF(APCDVREF)) Q:APCDVREF'=+APCDVREF  D
 .S APCDREF=$$VALI^XBDIQ1(9000010.59,APCDVREF,.06)
 .Q:APCDREF=""  ;NO REFERRAL IEN
 .Q:'$D(^BMCREF(APCDREF,0))  ;no referral??
 .S APCDRP=$$VALI^XBDIQ1(90001,APCDREF,.06)  ;REQUESTING PROVIDER IEN
 .S DIE="^AUPNVREF(",DA=APCDVREF
 .I APCDRP S DR="1210///@;1202////"_APCDRP
 .I 'APCDRP S DR="1210///@;1202///@"
 .D ^DIE
 .I $D(Y) D EN^DDIOL("failure to update v referral "_APCDVREF)
 .K DIE,DA,DR
 .Q
 Q