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

APCDVM3.m

Go to the documentation of this file.
APCDVM3 ; IHS/CMI/LAB - XECUTES NODES IN MODULE PCC LINK CONTROL FILE ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009;Build 18
 ;
 ;     APCDVMF= From visit DFN
 ;     APCDVMT= To visit DFN
 ;
 F APCDVM=0:0 S APCDVM=$O(^APCDLINK(APCDVM)) Q:APCDVM'=+APCDVM  X:$D(^(APCDVM,1)) ^(1)
 K APCDVM
 I $D(ZTQUEUED) S ZTREQ="@"
 I $D(ZTQUEUED) S ZTREQ="@"
 Q
 ;
PROBLEM ;EP - called to change pointers in AUPNPROB from used as pov and used as inpatient afer merge
 NEW APCDP,APCDX
 I '$G(APCDVMT) Q
 I '$G(APCDVMF) Q
 S APCDP=$P($G(^AUPNVSIT(APCDVMT,0)),U,5)
 I 'APCDP Q  ;;NO PATIENT??
 S APCDX=0 F  S APCDX=$O(^AUPNPROB("AC",APCDP,APCDX)) Q:APCDX'=+APCDX  D
 .;USED AS POV
 .S APCDY=0 F  S APCDY=$O(^AUPNPROB(APCDX,14,"B",APCDVMF,APCDY)) Q:APCDY'=+APCDY  D
 ..;call die to change to APCDVMT
 ..K DIE,DA,DR
 ..S DA(1)=APCDX,DA=APCDY,DIE="^AUPNPROB("_APCDX_",14,",DR=".01////"_APCDVMT
 ..D ^DIE
 ..K DIE,DA,DR
 .;USED AS INPATIENT
 .S APCDY=0 F  S APCDY=$O(^AUPNPROB(APCDX,15,"B",APCDVMF,APCDY)) Q:APCDY'=+APCDY  D
 ..;call die to change to APCDVMT
 ..K DIE,DA,DR
 ..S DA(1)=APCDX,DA=APCDY,DIE="^AUPNPROB("_APCDX_",15,",DR=".01////"_APCDVMT
 ..D ^DIE
 ..K DIE,DA,DR
 .Q