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

LRCAPED2.m

Go to the documentation of this file.
LRCAPED2 ;SLC/DCM- MANUAL EDIT OF AMIS/CAP FILE ; 3/16/89  15:15 ;
 ;;V~5.0~;LAB;;02/27/90 17:09
ENT ;from LRCAPED, LRPHITEM
 I $D(DUZ(2)) I +DUZ(2) S LRSIT=+DUZ(2)
 S:'$D(LRSIT) LRSIT=^DD("SITE",1) Q:'LRSIT  S:'$D(^LAM(LRCAP,1,0)) ^(0)="^64.01P^0^0"
 I '$D(^LAM(LRCAP,1,LRSIT,0)) S $P(^(0),U)=LRSIT,$P(^LAM(LRCAP,1,0),U,3)=LRSIT,$P(^(0),U,4)=$P(^(0),U,4)+1
 I '$D(^LAM(LRCAP,1,LRSIT,1,0)) S ^(0)="^64.02DA^0^0"
 S LRTDT=$P(LRTIM,".") I '$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,0)) S ^(0)=LRTDT,$P(^LAM(LRCAP,1,LRSIT,1,0),U,3)=LRTDT,$P(^(0),U,4)=$P(^(0),U,4)+1
 S:'$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,0)) ^(0)="^64.03PA^"
LRTSA ;
 L ^LAM(LRCAP,1,LRSIT,1,LRTDT):1 I '$T W !!?7,"Another User is Editing this Date",!,*7 Q
 S LRC1=+$P(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,0),U,3),LRI=+$O(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,"B",LRTSA,0)) I 'LRI F LRI=LRC1:1 I '$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,LRI)) S ^(LRI,0)=LRTSA,$P(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,0),U,3)=LRI,$P(^(0),U,4)=LRC1+1 Q
 S ^LAM(LRCAP,1,LRSIT,1,LRTDT,1,"B",LRTSA,LRI)=""
 S ^(5)=$S('$D(^LA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