source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORLPL.m@ 1605

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1ORLPL ; slc/CLA - Display/Edit Patient Lists; 8/8/91
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3GETDEF ;called by SETUP, ASKLIST^ORLP, INQ^ORLP1 - get a default list from ^TMP or user's primary list
4 N LST
5 I $D(^TMP("ORLP",$J,"TLIST")) S DIC("B")=^TMP("ORLP",$J,"TLIST") Q
6 ;if user has a primary list defined, its type is team, users are defined and the current user is on the list, use the primary list as the default
7 S LST=$$GET^XPAR("USR.`"_DUZ,"ORLP DEFAULT TEAM",1,"I") I +$G(LST)>0,$D(^OR(100.21,LST,0)) S DIC("B")=$P(^(0),U)
8 Q
9SETUP ;called by DELUSER, DELPT - setup list for display and editing
10 S LIST=Y,^TMP("ORLP",$J,"TLIST")=+Y
11 K DIC,^XUTL("OR",$J),Y
12 Q
13DELUSER ;called by option ORLP DELETE TEAM USERS - removes provider/users from a list
14 S ET="U",DIC="^OR(100.21,",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,2)'=""P""",DIC("A")="Select TEAM PATIENT list: "
15 D ^DIC I Y<1 D END Q
16 D SETUP
17 ;if no users on list goto NOENTRY
18 I '$D(^OR(100.21,+LIST,1,0)) G NOENTRY
19 I $P(^OR(100.21,+LIST,1,0),"^",4)=""!($P(^(0),"^",4)=0) G NOENTRY
20 S ORUS="^OR(100.21,+LIST,1,",ORUS(0)="40MN",ORUS("T")="W @IOF,?34,""OWNER LIST"",!",ORUS("A")="Enter Provider/user(s) to REMOVE from list: "
21 D ^ORUS
22 I ($D(Y)<10) G END
23 S I=0 W ! F S I=$O(Y(I)) Q:I<1 S DA(1)=+LIST,DA=+Y(I),DIK="^OR(100.21,"_DA(1)_",1," D
24 . N Y D ^DIK
25 W !,"Provider/user(s) removed from list."
26 D END
27 Q
28DELPT ;called by option ORLP DELETE TEAM PATIENTS - removes patients from a list
29 S ET="P",DIC="^OR(100.21,",DIC(0)="AEMQ",DIC("S")="I $P(^(0),U,2)[""M""",DIC("A")="Select TEAM PATIENT list: "
30 D ^DIC I Y<1 D END Q
31 D SETUP
32 ;if no patients on list goto NOENTRY
33 I '$O(^OR(100.21,+LIST,10,0)) G NOENTRY
34 I $P(^OR(100.21,+LIST,0),U,2)="TA" D D END Q
35 . S A(1)="",A(2)="This 'TEAM PATIENT' list is an AUTOLINK list."
36 . S A(3)="In order to remove patients from this TEAM PATIENT list you must remove the"
37 . S A(4)="AUTOLINK(s).",A(5)="" D EN^DDIOL(.A) K A
38 . S DIR(0)="YO",DIR("A")="Do you want to remove Autolinks",DIR("B")="Y" D ^DIR K DIR Q:$D(DIROUT) I Y=1 D ASKLINK^ORLP2(+LIST)
39 S ORUS="^OR(100.21,+LIST,10,",ORUS(0)="40MN",ORUS("T")="W @IOF,?32,""PATIENT LIST"",!",ORUS("A")="Enter patient(s) to REMOVE from list: "
40 D ^ORUS
41 I ($D(Y)<10) G END
42 S I=0 W ! F S I=$O(Y(I)) Q:I<1 S DA(1)=+LIST,DA=+Y(I),DIK="^OR(100.21,"_DA(1)_",10," D
43 . N Y D ^DIK
44 W !,"Patient(s) removed from list."
45 D END
46 Q
47NOENTRY ;called by DELUSER, DELPT - indicate no entries in file/record/field
48 W !!,"There are no ",$S(ET="U":"provider/user ",ET="P":"patient ",1:""),"entries in this list to edit!"
49END K DA,DIC,DIK,ET,I,J,LIST,ORUS,RESP,Y
50 Q
Note: See TracBrowser for help on using the repository browser.