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

BQIPLPU.m

Go to the documentation of this file.
  1. BQIPLPU ;GDIT/HCSD/ALA-Panel Autopopulate Utility ; 29 Sep 2015 1:06 PM
  1. ;;2.6;ICARE MANAGEMENT SYSTEM;;Jul 07, 2017;Build 72
  1. ;
  1. SXRF ;EP - Set cross-reference
  1. I $G(D0)="" S ^BQICARE("AF",X,DA(1),DA)="" Q
  1. S ^BQICARE("AF",X,D0,D1)=""
  1. Q
  1. ;
  1. KXRF ; EP - Kill cross-reference
  1. I $G(D0)="" K ^BQICARE("AF",X,DA(1),DA) Q
  1. I $G(D1)="" K ^BQICARE("AF",X,DA(1),DA) Q
  1. K ^BQICARE("AF",X,D0,D1)
  1. Q
  1. ;
  1. ORD ; EP - Order the Nightly Autopopulate panels
  1. NEW USR,PNL,BQPB,BQPE,BQDIF,BQIORD,BQIUP,ORD,ORN,IENS,DA
  1. K ^BQICARE("AF")
  1. S USR=""
  1. F S USR=$O(^BQICARE("AC","N",USR)) Q:'USR D
  1. . S PNL=""
  1. . F S PNL=$O(^BQICARE("AC","N",USR,PNL)) Q:'PNL D
  1. .. S BQPB=$P($G(^BQICARE(USR,1,PNL,3)),"^",8)
  1. .. S BQPE=$P($G(^BQICARE(USR,1,PNL,3)),"^",9)
  1. .. S BQDIF=$$FMDIFF^XLFDT(BQPE,BQPB,2)
  1. .. S BQIORD(BQDIF,USR,PNL)=""
  1. .. S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
  1. .. S BQIUP(90505.01,IENS,3.1)="@"
  1. D FILE^DIE("","BQIUP","ERROR")
  1. ;
  1. S ORD="",ORN=0
  1. F S ORD=$O(BQIORD(ORD),-1) Q:ORD="" D
  1. . S USR="" F S USR=$O(BQIORD(ORD,USR)) Q:USR="" D
  1. .. S PNL="" F S PNL=$O(BQIORD(ORD,USR,PNL)) Q:PNL="" D
  1. ... S ORN=ORN+1,DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
  1. ... S BQIUP(90505.01,IENS,3.1)=ORN
  1. D FILE^DIE("","BQIUP","ERROR")
  1. Q