source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR7OV2.m@ 1093

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1LR7OV2 ;slc/dcm - Menu actions for parameter updates ;8/11/97
2 ;;5.2;LAB SERVICE;**121,187**;Sep 27, 1994
3 ;
4ALL ;Get all tests in file 60. Used for initial conversion.
5 N AIFN
6 S AIFN=0 F S AIFN=$O(^LAB(60,AIFN)) Q:AIFN<1 D ADD^LR7OV0(AIFN) I "N"[$P(^LAB(60,AIFN,0),"^",3) D DEACT^LR7OV0(AIFN)
7 Q
8ALLU ;Update all tests in file 60.
9 N AIFN
10 W !,"This option will update OE/RR with all Lab tests in file 60.",!,"This will take some time. Are you sure you want to continue" S %=2 D YN^DICN
11 I %=0 W !!,"Answer YES to update all lab tests, NO to quit." G ALLU
12 Q:%'=1 S AIFN=0
13 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
14 I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
15 F S AIFN=$O(^LAB(60,AIFN)) Q:AIFN<1 D UPD^LR7OV0(AIFN) W "."
16 W !!,"----DONE----"
17 Q
18SING ;Update OE/RR with single test from file 60
19 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
20 I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
21 N DIC,Y
22 S DIC=60,DIC(0)="AEQM" D ^DIC Q:Y<1
23S1 W !!,"Update OE/RR with parameters for test: "_$P(^LAB(60,+Y,0),"^")
24 S %=1 D YN^DICN
25 I %=0 W !!,"Answer YES to update OE/RR with the parameters in file 60 for selected test" G S1
26 Q:%'=1 D UPD^LR7OV0(+Y)
27 W !!,"----DONE----"
28 Q
29PARAM ;Update OE/RR with lab parameters
30 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
31 I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
32 W !,"This option will update OE/RR with all Lab ordering parameters.",!,"OK to continue" S %=2 D YN^DICN
33 I %=0 W !!,"Answer YES to update all lab ordering parameters, NO to quit." G PARAM
34 Q:%'=1 D EN^LR7OV1
35 W !!,"----DONE----"
36 Q
37EN(ORVP,TALK) ;Convert lab patients on the fly
38 ;ORVP=Patient DFN;DPT( (variable ptr format)
39 ;TALK=1 to write, 0 for silence
40 I $$VER^LR7OU1<3 Q ;OE/RR 2.5 Check
41 I $G(^ORD(100.99,1,"CONV")) Q
42 N LRPDFN,LRORD,ODT,SN,X,LRODT,LRSN,FLG
43 S X="^"_$P(ORVP,";",2)_+ORVP_",""LR"")",LRPDFN=+$S($D(@X):@X,1:0),FLG=0 Q:'LRPDFN
44 Q:'$D(^LRO(69,"D",LRPDFN))
45 S ODT=0 F S ODT=$O(^LRO(69,"D",LRPDFN,ODT)) Q:ODT<1 S SN=0 F S SN=$O(^LRO(69,"D",LRPDFN,ODT,SN)) Q:SN<1 Q:'$D(^LRO(69,ODT,1,SN,0)) D
46 . S X=^LRO(69,ODT,1,SN,0),LRORD=+$G(^(.1)) I $P(X,"^",11) Q
47 . F L +^LRCNVRT(LRORD):360 Q:$T
48 . S LRODT=0
49 . D NEW1^LR7OB0(ODT,SN,"ZC") W:$G(TALK) "."
50 . S $P(^LRO(69,ODT,1,SN,0),"^",11)=1.69
51 . L -^LRCNVRT(LRORD)
52 Q
53XPARCK() ;Check for existance of XPAR routine
54 Q $L($T(XPAR^XPAR))
Note: See TracBrowser for help on using the repository browser.