source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RAEDPT.m@ 1800

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1RAEDPT ;HISC/FPT,GJC,SS AISC/MJK,RMO-Edit Exams by Patient ;4/21/97 10:47
2 ;;5.0;Radiology/Nuclear Medicine;**10,18,28,45**;Mar 16, 1998
3 ;last modification by SS JUNE 19,2000
4CASE D SET^RAPSET1 I $D(XQUIT) K XQUIT,POP Q
5 S RAXIT=0,DIC(0)="AEMQ" D ^RADPA G Q:Y<0
6 S RADFN=+Y,RAHEAD="**** Edit Exams By Patient ****"
7 D ^RAPTLU G CASE:"^"[X
8 W !!,"Case No.:",RACN,?15,"Procedure:",$E(RAPRC,1,30),?57,"Date:",RADATE
9 N RADISPLY
10 S RADISPLY=$G(^RAMIS(71,+$P($G(^RADPT(+RADFN,"DT",+RADTI,"P",+RACNI,0)),U,2),0)) ; set $ZR to 71 for prccpt^radd1, not call raprod since diff col
11 S RADISPLY=$$PRCCPT^RADD1()
12 W !,?25,RADISPLY
13 I $D(^RA(72,"AA",RAIMGTY,9,+RAST)),'$D(^XUSEC("RA MGR",DUZ)) W !!?3,$C(7),"You do not have the appropriate access privilege to edit completed exams.",! G CASE
14 I $D(^RA(72,"AA",RAIMGTY,0,+RAST)) W !!?3,$C(7),"Exam has been 'cancelled' therefore it cannot be edited." G CASE
15 S RAQUICK=0,DA=RADFN,DIE("NO^")="OUTOK"
16 S RADADA=RADTI ; RADTI defined in ^RAPTLU
17 S DIE="^RADPT(",DR="[RA EXAM EDIT]"
18 S RADIE="^RADPT("_RADFN_",""DT"","
19 S RAXIT=$$LOCK^RAUTL12(RADIE,RADADA) I RAXIT G CASE
20 N RAREM,RANUZD1,RAPSDRUG,RA00,RADIOPH,RALOW,RAHI,RADRAWN,RAASK,RADOSE,RASKMEDS,RAWHICH ;these are used by the edit template
21 ;
22 ;save 'before' CM data value to compare against the possible 'after'
23 ;value
24 D TRK70CMB^RAMAINU(RADFN,RADTI,RACNI,.RATRKCMB) ;RA*5*45
25 ;
26 D SVBEFOR^RAO7XX(RADFN,RADTI,RACNI) ;P18 save before edit to compare later in RAUTL1
27 D ^DIE K DE,DQ,DIE,DR,RAZCM
28 S:$D(RAPRI) RAPRIT=RAPRI D UP1^RAUTL1
29 ;
30 ;1) check data consistency between 'CONTRAST MEDIA USED' & 'CONTRAST
31 ;MEDIA'
32 ;2) check 'before' CM data against 'after' CM data, file in audit log
33 ;if necessary. Remember, contrast media asked when in input template:
34 ;RA EXAM EDIT (RA*5*45)
35 S RACMDA=RACNI,RACMDA(1)=RADTI,RACMDA(2)=RADFN
36 D XCMINTEG^RAMAINU1(.RACMDA) ;1
37 D TRK70CMA^RAMAINU(RADFN,RADTI,RACNI,RATRKCMB) ;2
38 K RACMDA
39 ;
40 D UNLOCK^RAUTL12(RADIE,RADADA) ;modif P18 by SS
41 K RATRKCMB,RADADA,RADIE,RADUZ W ! G CASE ;modif P18 by SS
42 ;
43Q K %,%DT,%Y,A,C,D0,D1,D2,DA,DIC,I,RACN,RACNI,RACNT,RACT,RADADA,RADATE,RADATI,RADFN,RADIE,RADTE,RADTI,RAHEAD,RAMES,RANME,RAOR,RAORDIFN,RAPOP,RAPRC,RAPRI,RAQUICK,RARPT,RASN,RASSN,RAST,RASTI,RAXIT,XQUIT,VAINDT,VADMVT,X,Y
44 K ^TMP($J,"RAEX")
45 K %W,%Y1,D,D3,DDER,DI,DK,DL,POP,DISYS,DUOUT,RAI
46 Q
Note: See TracBrowser for help on using the repository browser.