source: WorldVistAEHR/trunk/r/GENERIC_CODE_SHEET-GEC/GECSSTT1.m@ 1087

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

initial load of WorldVistAEHR

File size: 2.0 KB
RevLine 
[613]1GECSSTT1 ;WISC/RFJ/KLD-stacker file retransmission ;13 Oct 98
2 ;;2.0;GCS;*19*;MAR 14, 1995
3 N DA,DATA,GECSDOC,GECSXMZ,STATUS,ABORT,DIR
4 F S DA=$$SELECT^GECSSTAA("","","","") Q:'DA S GECSDOC=$P(DA,"^",2),DA=+DA D
5 . L +^GECS(2100.1,DA):5 I '$T W !,"Another user is working with the stack document, try again later." Q
6 . S STATUS=$P(^GECS(2100.1,DA,0),"^",4) S:STATUS="" STATUS="?"
7 . W $C(7),!!?5,"Current Status: ",$$STATUS^GECSSGET(GECSDOC)
8 . I '$D(^GECS(2100.1,DA,10,1,0)) W !,"There is not a code sheet for this stack entry." Q
9 . I $$GET1^DIQ(2100.1,DA,3,"I")="F" D Q:ABORT
10 . . W !?18,"** FINAL DOCUMENTS CANNOT BE RETRANSMITTED **",!
11 . . S ABORT=1
12 . . S DIR(0)="E",DIR("A")="Enter RETURN or '^' to exit"
13 . . D ^DIR
14 . . Q
15 . I STATUS="A" W !,"WARNING: Accepted documents probably should not be retransmitted."
16 . S XP="Do you want to retransmit this document now",XH="Enter 'YES' to retransmit the document immediately, 'NO' or '^' to exit."
17 . W !!
18 . I $$YN^GECSUTIL(2)'=1 L -^GECS(2100.1,DA) Q
19 . ;
20 . ; move mail messages
21 . S GECSXMZ=0 F S GECSXMZ=$O(^GECS(2100.1,DA,20,GECSXMZ)) Q:'GECSXMZ S DATA=$G(^(GECSXMZ,0)) I DATA'="" D MESSAGE^GECSSTTR(DA,21,GECSXMZ) I $D(^GECS(2100.1,DA,21,GECSXMZ,0)) S ^(0)=DATA
22 . K ^GECS(2100.1,DA,20)
23 . D SETSTAT^GECSSTAA(DA,"M")
24 . S STATUS=$P(^GECS(2100.1,DA,0),"^",4) S:STATUS="" STATUS="?"
25 . W !?5,"NEW Status: ",$$STATUS^GECSSGET(GECSDOC)
26 . L -^GECS(2100.1,DA)
27 Q
28 ;
29 ;
30CONFIRM(XMZ,CONFIRM) ; add confirmation number to mailman message number
31 ; xmz=message number; confirm=confirmation number
32 ; return the number of documents with message, 0 if none
33 S COUNT=0
34 S %=0 F S %=$O(^GECS(2100.1,"AM",XMZ,%)) Q:'% I $D(^GECS(2100.1,%,0)) D
35 . I $D(^GECS(2100.1,%,20,0)) L +^GECS(2100.1,%,20) S $P(^GECS(2100.1,%,20,0),"^",2)=CONFIRM L -^GECS(2100.1,%,20) S COUNT=COUNT+1
36 . I $D(^GECS(2100.1,%,21,0)) L +^GECS(2100.1,%,21) S $P(^GECS(2100.1,%,21,0),"^",2)=CONFIRM L -^GECS(2100.1,%,21) S COUNT=COUNT+1
37 Q COUNT
Note: See TracBrowser for help on using the repository browser.