source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORLP00.m@ 841

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1ORLP00 ; slc/dcm,cla - Modify Patient Lists ;8/13/91 15:06
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3DEL ;Delete items from patient list
4 I '$D(^XUTL("OR",$J,"ORLP")) W !,"You must build a Patient List before using this option" Q
5L1 S:'$D(OROPREF) OROPREF=$$GET^XPAR("USR.`"_DUZ,"ORLP DEFAULT LIST ORDER",1,"I") S ORUS="^XUTL(""OR"",$J,""ORLP"",",ORUS(0)="40MN",ORUS("T")="W @IOF,?37,""PATIENT LIST"",! ;F I=1:1:IOM-1 W ""-"""
6 S ORUS("W")="S X=$S(OROPREF=""R"":$P(^XUTL(""OR"",$J,""ORLP"",ORDA,0),""^"",5),1:"""")_"" ""_$P(^XUTL(""OR"",$J,""ORLP"",ORDA,0),""^"")_"" (""_$E($P(^(0),""^"",2),6,9)_"")""",ORUS("A")="Select Patient(s) to Remove: "
7 S ORUS("F")="^XUTL(""OR"",$J,""ORLP"","""_$S($L($P(^XUTL("OR",$J,"ORLP",0),"^",3)):$P(^(0),"^",3),1:"B")_""","
8 S ORUS("H")="W !,""Enter a name, number or range separated by commas or a dash"""
9 D EN^ORUS
10 I ($D(Y)<10) D END Q
11 S I=0 W !
12 F S I=$O(Y(I)) Q:I<1 I $D(^XUTL("OR",$J,"ORLP",+Y(I),0)) S X=^(0) D
13 . K ^XUTL("OR",$J,"ORLP",+Y(I)),^XUTL("OR",$J,"ORLP","B",$P(X,"^"),+Y(I)),^XUTL("OR",$J,"ORLP","C",$P(X,"^",2),+Y(I)) W !,"..."_$P(Y(I),"^",2)_" removed"
14 K ^XUTL("OR",$J,"ORV"),^("ORU"),^("ORW") S (C,I)=0 F S I=$O(^XUTL("OR",$J,"ORLP",I)) Q:I<1 S C=C+1
15 S $P(^XUTL("OR",$J,"ORLP",0),"^",4)=C
16 D STOR^ORLP1
17 S %=1 W !!,"Show modified working list" D YN^DICN Q:%=-1 I %=1 G L1
18 D END
19 Q
20END K ORUS,OROPREF,Y
21 Q
22 ;
23ASKPT(TEAM) ;from ^ORLPL or internally - ask for patients
24 N Y,ORDIR
25 F D Q:$D(DTOUT)!($D(DUOUT))!(ORDIR']"")
26 . K DIR S DIR(0)="SO^N:NAME;W:WARD;C:CLINIC;P:PROVIDER;T:TREATING SPECIALTY"
27 . S DIR("A")=" to enter additional patients. (? for help)"
28 . S DIR("?",3)="a PROVIDER, or patients in a TREATING SPECIALTY."
29 . S DIR("?",1)="You may add patients to this list individually by patient NAME, or as a"
30 . S DIR("?",2)="group such as an entire WARD, patients in a CLINIC, all patients seeing"
31 . S DIR("?",4)=""
32 . S DIR("?",5)=" ** CAUTION **"
33 . S DIR("?")="The patients added here will create a static list that will not change through MAS movements."
34 . D ^DIR S ORDIR=Y K DIR Q:Y=""!(Y["^")
35 . I Y="N" D ADD^ORLP0 K ^XUTL("OR",$J,"ORLP"),^("ORV"),^("ORU"),^("ORW") S ORCNT=0 Q
36 . I Y="W" D WARD^ORLP01 K ^XUTL("OR",$J,"ORLP"),^("ORV"),^("ORU"),^("ORW") S ORCNT=0 Q
37 . I Y="C" D CLIN^ORLP01 K ^XUTL("OR",$J,"ORLP"),^("ORV"),^("ORU"),^("ORW") S ORCNT=0 Q
38 . I Y="P" D PROV^ORLP01 K ^XUTL("OR",$J,"ORLP"),^("ORV"),^("ORU"),^("ORW") S ORCNT=0 Q
39 . I Y="T" D SPEC^ORLP01 K ^XUTL("OR",$J,"ORLP"),^("ORV"),^("ORU"),^("ORW") S ORCNT=0 Q
40 Q
Note: See TracBrowser for help on using the repository browser.