source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RART.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 4.5 KB
Line 
1RART ;HISC/CAH,FPT,GJC AISC/MJK,TMP,RMO-Reporting Menu ;11/16/98 15:02
2 ;;5.0;Radiology/Nuclear Medicine;**2,5,15,18,43,82**;Mar 16, 1998;Build 8
3 ;;last modification by SS for P18 June 15, 2000
43 ;;Verify a Report
5 D SET^RAPSET1 I $D(XQUIT) K XQUIT Q
6 I $D(RANOSCRN) S X=$$DIVLOC^RAUTL7() I X D Q QUIT
7 G:$D(^VA(200,"ARC","S",DUZ))!($D(^XUSEC("RA VERIFY",DUZ))) 30
8 G:$P(RAMDV,"^",18)=1 30
9 G:'$D(^VA(200,"ARC","R",DUZ)) 30
10 I $P(RAMDV,"^",18)'=1 W !!,$C(7),"Interpreting Residents are not allowed to verify reports." G Q
1130 K RAUP S RAPGM=30,RAREPORT=1 D ^RACNLU G Q:X="^" I '$D(^RARPT(+RARPT,0)) W !!?2,$C(7),"No report available!" G 30
12 I $P(^RARPT(+RARPT,0),"^",5)="V" W !!?2,$C(7),"Report already verified!" G 30
13SS1 Q:$$VERONLY^RAUTL11=-1 ;P18 case info
1431 S DIE("NO^")="",DA=RARPT,DR="[RA VERIFY REPORT ONLY]",DIE="^RARPT("
15 S RAIMGTYI=$P($G(^RADPT(RADFN,"DT",RADTI,0)),U,2),RAIMGTYJ=$P($G(^RA(79.2,+RAIMGTYI,0)),U)
16 I RAIMGTYJ']"" W !,"Error: Cannot determine imaging type of exam.",! K RAIMGTYI,RAIMGTYJ G @RAPGM
17 ; must lock both report AND case together, so to ensure
18 ; that a verified report has the correct diagnostic codes
19 S RAXIT=$$LOCK^RAUTL12(DIE,DA) ; lock Report
20 I RAXIT K RAXIT G @RAPGM
21 S RASAVDIE="^RADPT("_RADFN_",""DT"","_RADTI_",""P"",",RASAVDA(2)=RADFN,RASAVDA(1)=RADTI,RASAVDA=RACNI
22 ; rpt exists & locked, thus no need to lock at "DT" level because users
23 ; can only use 'report entry/edit' option to enter dx's for printsets
24 S RAXIT=$$LOCK^RAUTL12(RASAVDIE,.RASAVDA) ; lock case before asking REPORT STATUS
25 I RAXIT K RAXIT G @RAPGM
26 D ^DIE K DE,DQ,DR D UNLOCK^RAUTL12(DIE,DA) ; unlock Report
27 K DIE,RAXIT
28 S X=+$O(^RA(72,"AA",RAIMGTYJ,9,0)),DA(2)=RADFN,DA(1)=RADTI,DA=RACNI,DIE="^RADPT("_DA(2)_",""DT"","_DA(1)_",""P"","
29 S DR=13_$S(RACT'="V":"",'$D(^RA(72,X,.1)):"",$P(^(.1),"^",5)'="Y":"",1:"R")_";I $D(^RA(78.3,+X,0)),$P(^(0),""^"",4)=""y"" S RAAB=1 "
30 I RACT="V",($P($G(^RA(72,+X,.1)),"^",5)="Y") S DIE("NO^")="BACK"
31 D ^DIE
32 K DA,DE,DQ,DIE,DR
33 I $P(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0),U,13)="" G UNL31
34 S DR="50///"_RACN
35 S DR(2,70.03)=13.1
36 S DR(3,70.14)=.01_";I $D(^RA(78.3,+X,0)),$P(^(0),""^"",4)=""y"" S RAAB=1"
37 S DA(1)=RADFN,DA=RADTI,DIE="^RADPT("_DA(1)_",""DT"","
38 D ^DIE
39UNL31 ; copy then unlock
40 N:'$D(RAPRTSET) RAPRTSET N:'$D(RAMEMARR) RAMEMARR
41 D EN2^RAUTL20(.RAMEMARR)
42 I RAPRTSET S RADRS=1,RAXIT=0 D COPY^RARTE2 ; copy diagnoses
43 D UNLOCK^RAUTL12(RASAVDIE,.RASAVDA) ; use params from PrimDiag's lock
44 K RASAVDIE,RASAVDA
45 K DA,DE,DQ,DIE,DR
4632 K RAXIT
47 I $G(RAPGM)="GETRPT^RARTVER" I $E(RACT'="V"),($P(^RARPT(RARPT,0),U,14)]"") D RETURN^RARTVER2
48PACS I (RACT="V")!(RACT="R") D TASK^RAHLO4
49 I RACT="V",$T(CREATE^WVRALINK)]"" D CREATE^WVRALINK(RADFN,RADTI,RACNI) ;women's health
50 ;
51 I RAPGM="NXT^RABTCH1" G @RAPGM
52TIME D:RACT="V"
53 .N RAHLTCPB S RAHLTCPB=1 D UPSTAT^RAUTL0 K RAAB
54 I $G(RARDX)="S" D
55 . D SAVE^RARTVER2
56 . I $G(RAPGM)="GETRPT^RARTVER" D
57 .. ; for 'On-line Verifying of Reports' default device selection is the
58 .. ; "REPORT PRINTER NAME"
59 .. S %ZIS("B")=$P($G(RAMLC),"^",10) K:%ZIS("B")']"" %ZIS("B")
60 .. Q
61 . D Q^RARTR,RESTORE^RARTVER2
62 . K:$D(%ZIS("B")) %ZIS("B")
63 . Q
64 G @RAPGM
65Q K %,%DT,%X,C,D,D0,D1,DA,DIC,RACN,RACNI,RACT,RADATE,RADFN,RADTE,RADTI,RADUZ,RAHEAD,RAI,RAIMGTYI,RAIMGTYJ,RANME,RANUM,RAOR,RAPGM,RAPRC,RAQUIT,RAREPORT,RARPT,RASET,RASN,RASSN,RAST,RASTI,RAUP,RAVER,X,Y,^TMP($J,"RAEX")
66 K %W,%Y,%Y1,DDER,DI,DIROUT,DIRUT,DLAYGO,DTOUT,DUOUT,RACI,ZTSK,POP,DDH
67 Q
68OERR1 ; Jump to 'OERR1^RART1' This is necessary to support the reference to
69 ; this line label in the OE/RR Notifications file.
70 G OERR1^RART1 Q
71 ;
72PRTDX ; print dx codes on report display (called from RART1)
73 K RAFLG D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF))
74 Q:X="^"!(X="T")!(X="P")
75 S RADXCODE=$P(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0),U,13)
76 W !?3,"Primary Diagnostic Code: ",!?2,$S($D(^RA(78.3,+RADXCODE,0)):$P(^(0),U,1),1:"") K RAFLG
77 D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF)) Q:X="^"!(X="T")!(X="P")
78 I '$O(^RADPT(RADFN,"DT",RADTI,"P",RACNI,"DX",0)) W ! Q
79 W !!?3,"Secondary Diagnostic Codes: "
80 S RADXCODE=0
81 F S RADXCODE=$O(^RADPT(RADFN,"DT",RADTI,"P",RACNI,"DX","B",RADXCODE)) Q:RADXCODE'>0!('$D(^RA(78.3,+RADXCODE,0)))!($D(RAOOUT)) K RAFLG D WAIT^RART1:($Y+6)>IOSL&('$D(RARTVERF)) Q:X="^"!(X="T")!(X="P") W !?2,$P(^RA(78.3,RADXCODE,0),U,1)
82 W !
83 Q
84EXIT ; Kill variables created when user prints 'Abnormal Rad/Nuc Med Report
85 ; Alert'. Variables are created when 'PRT^RARTR' is called.
86 K %X,%XX,%Y,%YY,A,DDER,DFN,DI,DIR,DIW,DIWI,DIWT,DIWTC,DIWX,DLAYGO
87 K DN,RACI,RACN0,RACPT,RACPTNDE,RADTE0,RADTV,RAN,RAOBR4,RAPRCNDE
88 K RAPROC,RAPROCIT,RAPRV,RARPT0,VA,VADM,VAERR,X2,ZTSK
89 Q
Note: See TracBrowser for help on using the repository browser.