source: WorldVistAEHR/trunk/r/LEXICON_UTILITY-LEX-GMPT/LEXDCC.m@ 1450

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1LEXDCC ; ISL Default Display ; 09-23-96
2 ;;2.0;LEXICON UTILITY;;Sep 23, 1996;Build 1
3 ;
4 ; Entry: D EN^LEXDCC LEXAP is unknown
5 ;
6 ; Entry: D EN1^LEXDCC(LEXAP) LEXAP is known
7 ;
8 ; Single user entry point - Saves Default Display in file 757.2
9 ;
10 ; Where
11 ;
12 ; LEXAP Pointer to file 757.2
13 ; LEXUSER DUZ of user
14 ; LEXCA Action (modify/delete)
15 ; LEXCM Method (predefined/create)
16 ;
17EN ; Single user, LEXAP is unknown
18 N LEXAP S LEXAP=$$DFI^LEXDM4 Q:+LEXAP=0 W ! D EN1(LEXAP) Q
19EN1(LEXAP) ; Single user, LEXAP is known
20 N LEXUSER,LEXX S LEXUSER=$G(DUZ) Q:+LEXUSER'>0 Q:'$D(^VA(200,+LEXUSER))
21 ;
22 S LEXAP=$G(LEXAP) Q:LEXAP=""
23 I '$D(^LEXT(757.2,+LEXAP,0))&('$D(^LEXT(757.2,"B",LEXAP)))&('$D(^LEXT(757.2,"C",$$UP^XLFSTR(LEXAP))))&('$D(^LEXT(757.2,"AN",LEXAP))) Q
24 S:+LEXAP'>0 LEXAP=$$AP^LEXDFN2(LEXAP)
25 ;
26 Q:+($G(LEXAP))'>0 Q:+($P($G(^LEXT(757.2,+LEXAP,5)),"^",3))'>0
27 K LEXFIL N LEXCA,LEXCM,LEXDVAL,LEXDNAM,LEXFLD
28 S LEXFLD=2,LEXCA=$$MOD^LEXDM(2) Q:LEXCA=0!(LEXCA="^^")
29 D:LEXCA="@" KILL Q:LEXCA="@" W ! S LEXCM=$$MTH^LEXDM(2) Q:LEXCM["^"
30 S:LEXCM=1 LEXDVAL=$$EN^LEXDCCS S:LEXCM=2 LEXDVAL=$$EN^LEXDCCC Q:LEXDVAL="^^"
31 S LEXDNAM=$P(LEXDVAL,"^",2),LEXDVAL=$P(LEXDVAL,"^",1) D SET
32 Q
33MGR(LEXX) ; Multi-user (for Manager options)
34 ; Do not save display, return value to manager option
35 N LEXCA,LEXCM,LEXDVAL S LEXCA=$$MOD^LEXDM(2) Q:LEXCA=0 "^" Q:(LEXCA="^^") "^^"
36 Q:LEXCA="@" "@^Delete display" W ! S LEXCM=$$MTH^LEXDM(2) Q:LEXCM["^" "^No display selected" Q:(LEXCM="^^") "^^"
37 S:LEXCM=1 LEXDVAL=$$EN^LEXDCCS S:LEXCM=2 LEXDVAL=$$EN^LEXDCCC Q:LEXDVAL="^^" "^^"
38 S LEXX=LEXDVAL Q LEXX
39SET ; Set default display
40 D SET^LEXDSV(LEXUSER,LEXAP,LEXDVAL,LEXDNAM,LEXFLD) Q
41KILL ; Kill default display
42 D SET^LEXDSV(LEXUSER,LEXAP,"@","Delete",LEXFLD) Q
Note: See TracBrowser for help on using the repository browser.