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.
  1. LRCAPED2 ;SLC/DCM- MANUAL EDIT OF AMIS/CAP FILE ; 3/16/89 15:15 ;
  1. ;;V~5.0~;LAB;;02/27/90 17:09
  1. ENT ;from LRCAPED, LRPHITEM
  1. I $D(DUZ(2)) I +DUZ(2) S LRSIT=+DUZ(2)
  1. S:'$D(LRSIT) LRSIT=^DD("SITE",1) Q:'LRSIT S:'$D(^LAM(LRCAP,1,0)) ^(0)="^64.01P^0^0"
  1. 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
  1. I '$D(^LAM(LRCAP,1,LRSIT,1,0)) S ^(0)="^64.02DA^0^0"
  1. 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
  1. S:'$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,0)) ^(0)="^64.03PA^"
  1. LRTSA ;
  1. L ^LAM(LRCAP,1,LRSIT,1,LRTDT):1 I '$T W !!?7,"Another User is Editing this Date",!,*7 Q
  1. 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
  1. S ^LAM(LRCAP,1,LRSIT,1,LRTDT,1,"B",LRTSA,LRI)=""
  1. S ^(5)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,5)):LRA,1:^(5)+(LRA))
  1. I LRX="X" S ^(3)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,3)):LRA,1:^(3)+(LRA)) L K LRTDT,LRC,LRH1,LRC1,LRI Q
  1. I LRURG=1 S ^(7)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,7)):LRA,1:^(7)+(LRA)),^(3)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,LRI,3)):LRA,1:^(3)+(LRA))
  1. I LRIN=1 S ^(4)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,4)):LRA,1:^(4)+(LRA))
  1. INPST I LRIN=1,LRURG=1 S ^(8)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,8)):LRA,1:^(8)+(LRA))
  1. OUTPAT I 'LRIN,LRX="S" S ^(10)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,10)):LRA,1:^(10)+(LRA))
  1. I LRX="R" S ^(6)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,6)):LRA,1:^(6)+(LRA))
  1. I LRX="Q" S ^(2)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,2)):LRA,1:^(2)+(LRA)),^(2)=$S('$D(^(1,LRI,2)):LRA,1:^(2)+(LRA))
  1. REF I LRX="O" S ^(9)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,9)):LRA,1:^(9)+(LRA))
  1. I LRX="S" S ^(1)=$S('$D(^LAM(LRCAP,1,LRSIT,1,LRTDT,1,LRI,1)):LRA,1:^(1)+(LRA))
  1. UNLOCK ;
  1. S $P(^LAM(LRCAP,1,LRTDT,1,0),U,3)=LRI LOCK K LRTDT,LRC,LRH1,LRC1,LRI Q
  1. L K LRTDT,LRC,LRH1,LRC1,LRI Q
  1. UPDATE ;