source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPTMSGD.m@ 1590

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1DGPTMSGD ;ALB/JDS - PTF MULTIMESSAGE DELETE ; 19 DEC 84@ 0800
2 ;;5.3;Registration;;Aug 13, 1993
3 D LO^DGUTL
4EN S Z="^PATIENT^NUMBER" R !!,"DELETE BY [P]ATIENT OR [N]UMBER: ",X:DTIME G Q:X=""!('$T)!(X="^") D IN^DGHELP G:%'=-1 @X W !!,"Enter 'P' to delete PTF messages by patient",!," or 'N' to delete PTF messages by number" G EN
5P S DIC="^DPT(",DIC(0)="QEAM",DIC("S")="I $D(^DGM(""PT"",+Y))",DIC("A")="Select Patient whose messages you wish to check off: " D ^DIC G Q:+Y'>0 S DGPTF=+Y K DIC S %DT="XT",X="N" D ^%DT S NOW=+Y D READ G EN
6LOOP F I=0:0 S I=$O(^DGM("PT",DGPTF,I)) Q:I'>0 W ! R:Z>20 "'^' TO STOP",X:DTIME D BACK:Z>20 Q:X["^" W I,?10 I $D(^DGM(I,"M",0)) D MES1
7READ R !!,"Enter the message #'s you wish to release: ",X:DTIME G Q:X']""!('$T) G @($S(X["^":"Q",X["-":"THRU",X[",":"PICK",X?.N:"ONE",X="ALL"!(X="all"):"ALL",1:"HELP"))
8THRU S DGFR=$P(X,"-",1),DGTO=$P(X,"-",2) D DEL G Q
9DEL S DIK="^DGM(" F I=DGFR:1:DGTO I $D(^DGM(I,0)) I 'DGPTF!($P(^(0),U,2)=DGPTF) S DA=I D ^DIK W !,I,?10,"** Deleted **"
10 Q
11ONE S DGFR=X,DGTO=X D DEL G Q
12PICK S J=1,A=X
13PICK1 S DGFR=$P(A,",",J) Q:DGFR'>0 S DGTO=DGFR D DEL S J=J+1 G PICK1
14 G Q
15HELP W !!,"Enter:",!?10,"ALL to release all messages",!?10,"# to release a specific message",!?10,"#-# to release a range of messages",!?10,"#,#,#... to release a group of messages"
16 S Z=10 I X["??" W !,"Choose From:" G LOOP
17 W !!,"Do you want to see a list of messages for this patient" S %=1 D YN^DICN G Q:%<0,HELP:'%,LOOP:%'=2 G READ
18ALL S J=0,DGALL=""
19ALL1 S J=$O(^DGM("PT",DGPTF,J)) G Q:J'>0 S DGFR=J,DGTO=J D DEL G ALL1
20 Q
21BACK S Z=0 F J=1:1:12 W $C(8)
22 Q
23MES1 F J=0:0 S J=$O(^DGM(I,"M",J)) Q:J'>0 S L=^(J,0) W:J>1 ! D MESS
24 Q
25MESS F K=0:1:2 I $L(L)>(65*K) W:K ! W ?13,$E(L,1+(K*65),65*(K+1)) S Z=Z+1
26 Q
27N S DGPTF=0 R !!,"Enter the message #'s you wish to release: ",X:DTIME G Q:('$T) G @($S(X="":"EN",X["^":"Q",X["-":"THRU",X[",":"PICK",X?.N:"ONE",1:"HLPN"))
28HLPN W !!,"Enter:",!?10,"# to release a specific message",!?10,"#-# to release a range of messages",!?10,"#,#,#... to release a group of messages",!
29 S DIC="^DGM(",DIC(0)="M" S:X'["?" X="?" D ^DIC G N
30Q K %Y,L,K,DA,Z,Y,%,DGPTF,J,I,X,A,DIK,DIC,%DT,DGFR,DGTO Q
Note: See TracBrowser for help on using the repository browser.