source: FOIAVistA/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCEDT5.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1GMRCEDT5 ;SLC/DCM - EDIT A CONSULT AND RE-SEND AS NEW ;6/17/98 10:45
2 ;;3.0;CONSULT/REQUEST TRACKING;**5**;DEC 27, 1997
3WP ;edit comment and request fields
4 N CMDA,DIE,DIC,DWPK,DWLW,DIWESUB,GMRCNOW
5 S DIE="^GMR(123,"
6 S GMRCNOW=$$FMTE^XLFDT($$NOW^XLFDT)
7 S DIC=DIE_+GMRCO_",40,",DWPK=1,DWLW=74
8 I FLDA=40 S GMRCA=20 D S DIWESUB="COMMENTS"
9 .S CMDA=$$ADDCM^GMRCEDT4(+GMRCO),GMRCFLD(FLDA)="COMMENT ADDED: "_$$FMTE^XLFDT($$NOW^XLFDT)_"^"_CMDA D AUDIT0^GMRCEDT4(CMDA,+GMRCO) S DIC=DIC_CMDA_",1," Q
10 .Q
11 I $D(IOTM),$D(IOBM),$D(IOSTBM) D FULL^VALM1
12 I $D(FLDA),FLDA=20 S DIC=DIE_(+GMRCO)_",20,",DWPK=1,DWLW=74 I '$D(GMRCFLD(FLDA)) S GMRCFLD(FLDA)="REASON FOR REQUEST" M GMRCFLD(FLDA)=^GMR(123,+GMRCO,20)
13 D EN^DIWE
14 I FLDA=40,$D(^GMR(123,+GMRCO,40,CMDA,0)),$P($G(^GMR(123.1,+$P(^GMR(123,+GMRCO,40,CMDA,0),U,2),0)),U)="ADDED COMMENT",'$O(^GMR(123,+GMRCO,40,CMDA,0)) D
15 .I $D(CMDA),'$O(^GMR(123,+GMRCO,40,CMDA,0)) S DA=40,DA(1)=CMDA,DIK="^GMR(123,"_DA(1)_",40," D ^DIK K DIK,GMRCFLD(FLDA)
16 .Q
17 S VALMBCK="R"
18 Q
19SAVED ;These lines were removed from WP+8 to WP+20 to removed the
20 ;ability to edit comments in the Edit Cancelled Consult
21 ;Allert. They were placed here until it is determined that
22 ;they should be permaneltly deleted.
23 I GMRCEDCM>0 D Q:GMRCQUT
24 .F W !,"Type The Comment Number To Edit Or Type 0 (Zero) To Add A NEW Comment",!!,"Comment: " R X:DTIME S GMRCQUT=$S('$T:1,X["^":1,X="":1,1:0) Q:GMRCQUT D I $D(CMDA),CMDA>0 Q
25 ..I X["?" W !,"Choose from : " D Q
26 ...S GMRCLX=0 F S GMRCLX=$O(GMRCED(GMRCLX)) Q:GMRCLX="" S GMRCNDA=GMRCED(GMRCLX) W !,"COMMENT #",$J(GMRCLX,2)," "
27 ...W "Entered: ",$$FMTE^XLFDT($P(^GMR(123,+GMRCO,40,GMRCNDA,0),"^",1))," By: ",$P(^VA(200,$P(^(0),"^",4),0),"^",1),!
28 ...W !
29 ...Q
30 ..I X=0 S CMDA=$$ADDCM^GMRCEDT4(+GMRCO) D AUDIT0^GMRCEDT4(CMDA,+GMRCO) S DIC=DIC_CMDA_",1,",DTOUT=0,Y=$$FMTE^XLFDT(DT,"1D"),GMRCFLD(FLDA)="COMMENT ADDED: "_Y_"^"_CMDA Q
31 ..I $D(GMRCED(X)) S CMDA=GMRCED(X),GMRCFLD(FLDA)="COMMENT EDITED: "_$$FMTE^XLFDT($P(^GMR(123,+GMRCO,40,CMDA,0),"^",1)),DIC=DIC_CMDA_",1," Q
32 ..I '$D(GMRCED(X)) W $C(27)," ??"
33 ..Q
34 .Q
35 Q
Note: See TracBrowser for help on using the repository browser.