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

BSDLINK.m

Go to the documentation of this file.
  1. BSDLINK ; IHS/ANMC/LJF - UPDATE SCHEDULING UPON VISIT MERGE;
  1. ;;5.3;PIMS;;APR 26, 2002
  1. ;
  1. ;This routine is called by the PCC Visit Merge Utility.
  1. ;The input variables are: APCDVMF - Merge from visit ifn
  1. ; APCDVMT - Merge to visit ifn
  1. ;
  1. ;This routine finds the patient involved, scans for this merged visit
  1. ;among the entries in the Outpatient Encounter file and updates it.
  1. ;
  1. MRG ;PEP >> PRIVATE ENTRY POINT between PIMS and PCC
  1. NEW DIE,DA,DR,BSDN,X,Y
  1. Q:'$D(APCDVMF) Q:'$D(APCDVMT)
  1. S BSDN=0,DIE="^SCE("
  1. F S BSDN=$O(^SCE("AVSIT",APCDVMF,BSDN)) Q:BSDN="" D
  1. . I $P(^SCE(BSDN,0),U,2)'=$P(^AUPNVSIT(APCDVMT,0),U,5) Q ;wrong pat
  1. . ; uses 4 slashes to bypass Visit file screen
  1. . S DR=".05////"_APCDVMT,DA=BSDN D ^DIE
  1. ;
  1. Q
  1. ;
  1. POST ;EP; -- add PIMS to PCC Visit Merge Utility
  1. D BMES^XPDUTL("Adding an entry for PIMS into the MODULE PCC LINK CONTROL file...")
  1. Q:$D(^APCDLINK("B","PIMS")) ;already exists
  1. K DD,DO S DIC="^APCDLINK(",DIC(0)="LE",DLAYGO=9001002
  1. S DIC("DR")="1///S:$D(X) BSDX=X S X=""BSDLINK"" X ^%ZOSF(""TEST"") S:$D(BSDX) X=BSDX K BSDX I $T D MRG^BSDLINK"
  1. S X="PIMS" D FILE^DICN
  1. K X S X=$$REPEAT^XLFSTR(" ",20)_"Done." D MES^XPDUTL(.X)
  1. Q