source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRAPWE.m@ 1042

Last change on this file since 1042 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.8 KB
RevLine 
[613]1LRAPWE ;AVAMC/REG/CYM- DATE/TIME GRIDS SCANNED/PRINTS MADE ;2/13/98 11:07
2 ;;5.2;LAB SERVICE;**72,201**;Sep 27, 1994
3 S LRDICS="EM" D ^LRAP G:'$D(Y) END D EM^LRAPWE1 G:J END D S^LRAPST K Y
4 W !!,"Ask 'Date/time grids scanned:' prompt for each accession " S %=2 D YN^LRU Q:%<1 S LRV=$S(%=2:0,1:1)
5ASK S %DT="",X="T" D ^%DT S LRY=$E(Y,1,3)+1700 W !!,"Enter year: ",LRY,"// " R X:DTIME G:'$T!(X[U) END S:X="" X=LRY
6 S %DT="EQ" D ^%DT G:Y<1 ASK S LRY=$E(Y,1,3),LRH(0)=LRY+1700 W " ",LRH(0)
7 S LRN="",LRAD=$E(LRY,1,3)_"0000"
8 I '$O(^LRO(68,LRAA,1,LRAD,1,0)) W $C(7),!!,"NO ",LRO(68)," ACCESSIONS IN FILE FOR ",LRH(0),!! Q
9W K LR("CK") W !!,"Select ",LRO(68)," Accession Number: ",LRN,$S(LRN:"//",1:"") R LRAN:DTIME G:'$T!(LRAN[U)!(LRN=""&(LRAN="")) END S:LRAN="" LRAN=LRN I LRAN'?1N.N S LRN="" W $C(7),!!,"Enter a number." G W
10 S LRN=$O(^LRO(68,LRAA,1,LRAD,1,LRAN)) S:LRN'=+LRN LRN="" D REST G W
11REST W " for ",LRH(0) I '$D(^LRO(68,LRAA,1,LRAD,1,LRAN,0)) W $C(7),!!,"Accession # ",LRAN," for ",LRH(0)," not in ACCESSION file",!! Q
12 S X=^LRO(68,LRAA,1,LRAD,1,LRAN,0),LRAC=$P($G(^(.2)),U),LRI=$P(^(3),U,5),LRDFN=+X Q:'$D(^LR(LRDFN,0)) S X=^(0) D ^LRUP
13 S LRK(1)="" I LRV S %DT("A")="Date/time grids scanned: " D W^LRAPWU S:LRK<1 LRK="" S LRK(1)=LRK
14 S %DT("A")="Date/time prints made: " D W^LRAPWU S:LRK<1 LRK=""
15 Q:'LRK(1)&('LRK) D ^LRAPWU
16 I F W $C(7),!!,"Use 'Blocks, Stains, Procedures, anat path' option to enter date",!,"grids (thin sections) processed. This must be done before entering date",!,"grids scanned, photos taken and prints made." Q
17B Q:$D(LR("CK")) K LR S LR=0 I '$D(IOF) S IOP="HOME" D ^%ZIS
18 S LRA=^LR(LRDFN,LRSS,LRI,0),Y=+LRA D D^LRU S LRE=Y
19 S LRM=0 D H F A=0:0 S A=$O(^LR(LRDFN,LRSS,LRI,.1,A)) Q:'A S LRB=^(A,0) D:$Y>(IOSL-3) M Q:LRM[U W !,$P(LRB,U) D S
20 W !!,"Data displayed ok " S %=2 D YN^LRU Q:%<1 I %=1 D ^LRAPWE1 Q
21 I LR S DIE="^LR(LRDFN,LRSS,",DA=LRI D CK^LRU Q:$D(LR("CK")) W ! D ^LRAPWEA D FRE^LRU
22 G B
23S F E=0:0 S E=$O(^LR(LRDFN,LRSS,LRI,.1,A,E)) Q:'E F B=0:0 S B=$O(^LR(LRDFN,LRSS,LRI,.1,A,E,B)) Q:'B!(LRM[U) S LRB(1)=^(B,0) D:$Y>(IOSL-3) M Q:LRM[U D T
24 Q
25T S Y=$G(^LR(LRDFN,LRSS,LRI,.1,A,E,B,1,LRW,0)) Q:Y="" S X=$P(Y,U,2),Z=$P(Y,U,3),V=X+Z,LRZ(5)=$P(Y,U,5),LRZ(6)=$P(Y,U,6),LRZ(8)=$P(Y,U,8),LRZ(10)=$P(Y,U,10),LRZ(11)=$P(Y,U,11)
26 S LR=LR+1,LR(LR)=A_U_E_U_B_U_V_U_LRZ(5)_U_LRZ(6)_U_LRZ(8)_U_LRZ(10)_U_LRZ(11)_U_$P(Y,U,13)_U_$P(Y,U,12)
27 W !,"*",$J(LR,2),") ",$P(LRB(1),U),?15,$J(+LRZ(6),3),?24,$J(+LRZ(8),3),?33,$J(+LRZ(10),3),?40,$$FMTE^XLFDT(LRZ(5)),?60,$$FMTE^XLFDT(LRZ(11)) Q
28 ;
29M R !,"'^' TO STOP: ",LRM:DTIME S:'$T LRM=U D:LRM'[U H Q
30H W @IOF,LRP," ",SSN(1)," Acc #: ",LRAC," Date: ",LRE,!,?15,"GRIDS",?24,"GRIDS",?32,"PRINTS",?40,"LAST DATE/TIME",?60,"LAST DATE/TIME"
31 W !?5,"BLOCK ID",?14,"PREPARED",?23,"SCANNED",?33,"MADE",?44,"SCANNED",?62,"PRINTS MADE" Q
32 ;
33END D V^LRU Q
Note: See TracBrowser for help on using the repository browser.