- LR7OV2 ;slc/dcm - Menu actions for parameter updates ;8/11/97
- ;;5.2;LAB SERVICE;**121,187**;Sep 27, 1994
- ;
- ALL ;Get all tests in file 60. Used for initial conversion.
- N AIFN
- 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)
- Q
- ALLU ;Update all tests in file 60.
- N AIFN
- 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
- I %=0 W !!,"Answer YES to update all lab tests, NO to quit." G ALLU
- Q:%'=1 S AIFN=0
- ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
- F S AIFN=$O(^LAB(60,AIFN)) Q:AIFN<1 D UPD^LR7OV0(AIFN) W "."
- W !!,"----DONE----"
- Q
- SING ;Update OE/RR with single test from file 60
- ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
- N DIC,Y
- S DIC=60,DIC(0)="AEQM" D ^DIC Q:Y<1
- S1 W !!,"Update OE/RR with parameters for test: "_$P(^LAB(60,+Y,0),"^")
- S %=1 D YN^DICN
- I %=0 W !!,"Answer YES to update OE/RR with the parameters in file 60 for selected test" G S1
- Q:%'=1 D UPD^LR7OV0(+Y)
- W !!,"----DONE----"
- Q
- PARAM ;Update OE/RR with lab parameters
- ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- I '$$XPARCK W !!,"Cannot continue. XPAR Parameter utilities have not been installed." Q
- W !,"This option will update OE/RR with all Lab ordering parameters.",!,"OK to continue" S %=2 D YN^DICN
- I %=0 W !!,"Answer YES to update all lab ordering parameters, NO to quit." G PARAM
- Q:%'=1 D EN^LR7OV1
- W !!,"----DONE----"
- Q
- EN(ORVP,TALK) ;Convert lab patients on the fly
- ;ORVP=Patient DFN;DPT( (variable ptr format)
- ;TALK=1 to write, 0 for silence
- I $$VER^LR7OU1<3 Q ;OE/RR 2.5 Check
- I $G(^ORD(100.99,1,"CONV")) Q
- N LRPDFN,LRORD,ODT,SN,X,LRODT,LRSN,FLG
- S X="^"_$P(ORVP,";",2)_+ORVP_",""LR"")",LRPDFN=+$S($D(@X):@X,1:0),FLG=0 Q:'LRPDFN
- Q:'$D(^LRO(69,"D",LRPDFN))
- 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
- . S X=^LRO(69,ODT,1,SN,0),LRORD=+$G(^(.1)) I $P(X,"^",11) Q
- . F L +^LRCNVRT(LRORD):360 Q:$T
- . S LRODT=0
- . D NEW1^LR7OB0(ODT,SN,"ZC") W:$G(TALK) "."
- . S $P(^LRO(69,ODT,1,SN,0),"^",11)=1.69
- . L -^LRCNVRT(LRORD)
- Q
- XPARCK() ;Check for existance of XPAR routine
- Q $L($T(XPAR^XPAR))
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLR7OV2 2606 printed Jan 18, 2025@03:06:40 Page 2
- LR7OV2 ;slc/dcm - Menu actions for parameter updates ;8/11/97
- +1 ;;5.2;LAB SERVICE;**121,187**;Sep 27, 1994
- +2 ;
- ALL ;Get all tests in file 60. Used for initial conversion.
- +1 NEW AIFN
- +2 SET AIFN=0
- FOR
- SET AIFN=$ORDER(^LAB(60,AIFN))
- if AIFN<1
- QUIT
- DO ADD^LR7OV0(AIFN)
- IF "N"[$PIECE(^LAB(60,AIFN,0),"^",3)
- DO DEACT^LR7OV0(AIFN)
- +3 QUIT
- ALLU ;Update all tests in file 60.
- +1 NEW AIFN
- +2 WRITE !,"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"
- SET %=2
- DO YN^DICN
- +3 IF %=0
- WRITE !!,"Answer YES to update all lab tests, NO to quit."
- GOTO ALLU
- +4 if %'=1
- QUIT
- SET AIFN=0
- +5 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- +6 IF '$$XPARCK
- WRITE !!,"Cannot continue. XPAR Parameter utilities have not been installed."
- QUIT
- +7 FOR
- SET AIFN=$ORDER(^LAB(60,AIFN))
- if AIFN<1
- QUIT
- DO UPD^LR7OV0(AIFN)
- WRITE "."
- +8 WRITE !!,"----DONE----"
- +9 QUIT
- SING ;Update OE/RR with single test from file 60
- +1 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- +2 IF '$$XPARCK
- WRITE !!,"Cannot continue. XPAR Parameter utilities have not been installed."
- QUIT
- +3 NEW DIC,Y
- +4 SET DIC=60
- SET DIC(0)="AEQM"
- DO ^DIC
- if Y<1
- QUIT
- S1 WRITE !!,"Update OE/RR with parameters for test: "_$PIECE(^LAB(60,+Y,0),"^")
- +1 SET %=1
- DO YN^DICN
- +2 IF %=0
- WRITE !!,"Answer YES to update OE/RR with the parameters in file 60 for selected test"
- GOTO S1
- +3 if %'=1
- QUIT
- DO UPD^LR7OV0(+Y)
- +4 WRITE !!,"----DONE----"
- +5 QUIT
- PARAM ;Update OE/RR with lab parameters
- +1 ;I $$VER^LR7OU1<3 W !!,"Cannot continue. OE/RR 3.0 has not been installed." Q
- +2 IF '$$XPARCK
- WRITE !!,"Cannot continue. XPAR Parameter utilities have not been installed."
- QUIT
- +3 WRITE !,"This option will update OE/RR with all Lab ordering parameters.",!,"OK to continue"
- SET %=2
- DO YN^DICN
- +4 IF %=0
- WRITE !!,"Answer YES to update all lab ordering parameters, NO to quit."
- GOTO PARAM
- +5 if %'=1
- QUIT
- DO EN^LR7OV1
- +6 WRITE !!,"----DONE----"
- +7 QUIT
- EN(ORVP,TALK) ;Convert lab patients on the fly
- +1 ;ORVP=Patient DFN;DPT( (variable ptr format)
- +2 ;TALK=1 to write, 0 for silence
- +3 ;OE/RR 2.5 Check
- IF $$VER^LR7OU1<3
- QUIT
- +4 IF $GET(^ORD(100.99,1,"CONV"))
- QUIT
- +5 NEW LRPDFN,LRORD,ODT,SN,X,LRODT,LRSN,FLG
- +6 SET X="^"_$PIECE(ORVP,";",2)_+ORVP_",""LR"")"
- SET LRPDFN=+$SELECT($DATA(@X):@X,1:0)
- SET FLG=0
- if 'LRPDFN
- QUIT
- +7 if '$DATA(^LRO(69,"D",LRPDFN))
- QUIT
- +8 SET ODT=0
- FOR
- SET ODT=$ORDER(^LRO(69,"D",LRPDFN,ODT))
- if ODT<1
- QUIT
- SET SN=0
- FOR
- SET SN=$ORDER(^LRO(69,"D",LRPDFN,ODT,SN))
- if SN<1
- QUIT
- if '$DATA(^LRO(69,ODT,1,SN,0))
- QUIT
- Begin DoDot:1
- +9 SET X=^LRO(69,ODT,1,SN,0)
- SET LRORD=+$GET(^(.1))
- IF $PIECE(X,"^",11)
- QUIT
- +10 FOR
- LOCK +^LRCNVRT(LRORD):360
- if $TEST
- QUIT
- +11 SET LRODT=0
- +12 DO NEW1^LR7OB0(ODT,SN,"ZC")
- if $GET(TALK)
- WRITE "."
- +13 SET $PIECE(^LRO(69,ODT,1,SN,0),"^",11)=1.69
- +14 LOCK -^LRCNVRT(LRORD)
- End DoDot:1
- +15 QUIT
- XPARCK() ;Check for existance of XPAR routine
- +1 QUIT $LENGTH($TEXT(XPAR^XPAR))