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

LRCAPV3.m

Go to the documentation of this file.
LRCAPV3 ;SLC/AM/DALOI/FHS - CONTINUE STORE OF CAP WORKLOAD TO 64.1 ; 5/1/99
 ;;5.2T9;LR;**1018**;Nov 17, 2004
 ;;5.2;LAB SERVICE;**105,263**;Sep 27, 1994
EN ;
 S:'$D(LRLOG) LRLOG=$P($G(^LAB(69.9,1,"NITE")),U,6)
 I $G(LRLOG) D LRDSS ; This line controls the addition of data to the WKLD LOG FILE (#64.03) FOR DSS LAB WORKLOAD RECORDING
 D BLDIN,STORE
 Q
BLDIN ;
 K DINUM G:$D(^LRO(64.1,LRIN,0))=1 BLDCD
 K DIC,DIE,DR,DA,DO S (X,DINUM,DA)=LRIN,DLAYGO=64.1,DIC(0)="LNM",DIC="^LRO(64.1,",DA(1)=64.1 D FILE^DICN
 S ^LRO(64.1,LRIN,1,0)="^64.11DA^"
BLDCD ;
 K DINUM G:$D(^LRO(64.1,LRIN,1,LRCDT,0))=1 BLDCC
 K DIC,DIE,DR,DA,DO S (X,DINUM,DA)=LRCDT,DLAYGO=64.1,DIC(0)="LNM",DA(2)=64.1,DA(1)=LRIN,DIC="^LRO(64.1,"_LRIN_",1," D FILE^DICN
 S ^LRO(64.1,LRIN,1,LRCDT,1,0)="^64.111PA^"
BLDCC ;
 K DINUM Q:$D(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,0))=1
 K DIC,DIE,DR,DA,DO S (X,DINUM,DA)=LRCC,DLAYGO=64.1,DIC(0)="LNM",DA(3)=64.1,DA(2)=LRIN,DA(1)=LRCDT,DIC="^LRO(64.1,"_LRIN_",1,"_LRCDT_",1," D FILE^DICN
 I $D(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,0))#2 D
 . S $P(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,0),U,2)=1
 . S $P(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,0),U,3)=$P($G(^LAM(LRCC,0)),U,10)
 S ^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,0)="^64.1111A^"
 K DIC,DIE,DR,DA,DO,DINUM,DLAYGO
 Q
STORE ;
 S LRCTM=("."_LRCTM)*10000
 F LRCTM=LRCTM:.001 Q:'($D(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,LRCTM,0))#2)
 S LRZCNT=0
 S:$D(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,0))#2 LRZCNT=$P(^(0),U,4)
 L +^LRO(64.1,LRIN,1,LRCDT,1,LRCC) S ^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,0)="^64.1111A^"_LRCTM_U_(LRZCNT+1)
 S ^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,LRCTM,0)=LRCTM_U_LRTS_U_LRCNT_U_U_U_LRLD_U_LRMA_U_LRLSS_U_LRACC_U_LRFILE_U_LROAD_U_LROAD1_U_LROAD2_U_$S($G(LRSPEC):LRSPEC,1:"")_U_LRRRL
 S ^LRO(64.1,LRIN,1,LRCDT,1,LRCC,1,LRCTM,0)=^(0)_U_LRRRL1_U_LRRRL2_U_LRRRL3_U_LRRRL4_U_U_LROL_U_LRIDT_U_LRUG_U_LRTEC_U_LRWA L -^LRO(64.1,LRIN,1,LRCDT,1,LRCC)
 Q  ;I LRFNUM=62.3 D SETQC
 Q
SETQC ;
 S LRQC=0
 L +^LRO(64.1,LRIN,1,LRCDT,1,LRCC,"S") I $D(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,"S"))#2 S LRQC=+$P(^("S"),U,2)
 S $P(^LRO(64.1,LRIN,1,LRCDT,1,LRCC,"S"),U,2)=LRQC+LRCNT L -^LRO(64.1,LRIN,1,LRCDT,1,LRCC,"S")
 Q
LRDSS ; entry point for DSS/DMSS like projects
 ;Only patients from ^DPT( and LMIP BILLABLE or DSS Feeder=yes or
 ;suffix code = 9999 are passed to LRO(64.03 file
 Q:$P($G(LRX),U,2)'?5N1"."4N.5N  Q:$S($G(LRFNUM)'=2:1,$P(LRX,U,5):0,$P(LRX,U,16):0,+$P(LRX,".",2)=9999:0,1:1)
 S:'$D(^LRO(64.03,0))#2 ^LRO(64.03,0)="WKLD LOG FILE^64.03^"
 S LRDSS0=^LRO(64.03,0),LRDSS=$S($P(LRDSS0,U,3):$P(LRDSS0,U,3),1:1) F LRDSS=LRDSS:1 Q:'$D(^LRO(64.03,LRDSS,0))
 S $P(LRDSS0,U,3)=LRDSS,$P(LRDSS0,U,4)=$P(LRDSS0,U,4)+1,^LRO(64.03,0)=LRDSS0
 S ^LRO(64.03,LRDSS,0)=LRDSS_U_LRRRL1_U_LRFILE_U_LRCDT_"."_LRCTM_U_LRIN_U_LRRRL4_U_LRAA_U_LRTS_U_LRUG_U_LRRRL2_U_LRCC_U_LRIDT_U_LROAD_U_LROAD1_U_LROL_U_LRII_U_$S($G(LRSPEC):LRSPEC,1:"")
 K LRDSS0,LRDSS,LRDN0,LRDSFP,LRDSF
 Q