1 | RARTE ;HISC/FPT,GJC AISC/MJK,RMO-Edit/Delete Reports ;8/4/97 09:09
|
---|
2 | ;;5.0;Radiology/Nuclear Medicine;**18,34,45,56**;Mar 16, 1998;Build 3
|
---|
3 | ;Supported IA #3544 ^VA(200,"ARC"
|
---|
4 | ;Supported IA #10076 ^XUSEC(
|
---|
5 | ;Supported IA #2056 ^GET1^DIQ
|
---|
6 | ;Supported IA #10009 YN^DICN
|
---|
7 | ; last modification by SS for P18 June 14,2000
|
---|
8 | D SET^RAPSET1 I $D(XQUIT) K XQUIT Q
|
---|
9 | W !!?3,"Note: To enter receipt of OUTSIDE INTERPRETED REPORTS,",!?3,"please use the 'Outside Report/Entry Edit' option.",!
|
---|
10 | N RAXIT,RADRS,RASUBY0 S RAXIT=0 ;RADRS=copy (1=diag, 2=resid,staff)
|
---|
11 | I $D(RANOSCRN) S X=$$DIVLOC^RAUTL7() I X D Q^RARTE4 QUIT
|
---|
12 | ;
|
---|
13 | ;1. DO NOT KILL the RASIG variable; the RASIG() array is needed in
|
---|
14 | ; the edit template [RA REPORT EDIT] later
|
---|
15 | ;2. The RAELESIG canNOT store file 74's ien, as no rpt has been picked
|
---|
16 | ; from this call to ES^RASIGU
|
---|
17 | ;
|
---|
18 | I $D(^XUSEC("RA VERIFY",DUZ)),($$GET1^DIQ(200,DUZ_",",20.4)]""),($D(^VA(200,"ARC","R",DUZ))!($D(^VA(200,"ARC","S",DUZ)))) D Q:'$D(RAELESIG)
|
---|
19 | . W ! D ES^RASIGU S:%=1 RAELESIG=""
|
---|
20 | . K:'$D(RAELESIG) %,%W,%Y,%Y1,C,X,X1,X2
|
---|
21 | . Q
|
---|
22 | K RABTCH I $P(RAMDV,"^",13) D ASKBTCH^RARTE1 G Q1^RARTE4:X["^" D 1^RABTCH:"Yy"[$E(X) I '$D(RABTCH) W " ...no batch selected",!
|
---|
23 | START K RAVER S RAVW="",RAREPORT=1 D ^RACNLU G Q^RARTE4:"^"[X
|
---|
24 | S RASUBY0=Y(0) ; save value of y(0)
|
---|
25 | G:$P(^RA(72,+RAST,0),"^",3)>0 DISPLAY
|
---|
26 | I $D(^XUSEC("RA MGR",DUZ)) G DISPLAY
|
---|
27 | G:$P(RAMDV,"^",22)=1 DISPLAY
|
---|
28 | W $C(7),!!,"The STATUS for this case is CANCELLED. You may not enter a report.",!! D INCRPT^RARTE4 G START
|
---|
29 | ;
|
---|
30 | DISPLAY ; Display exam specific info, edit/enter the report
|
---|
31 | N RA18EX S RA18EX=0 ;P18 for quit if uparrow inside PUTTCOM
|
---|
32 | I '($D(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0))#2) D D Q^RARTE4 QUIT
|
---|
33 | . W !!?2,"Case #: ",RACN," for ",RANME S RAXIT=1
|
---|
34 | . W !?2,"Procedure: '",$E(RAPRC,1,45),"' has been deleted"
|
---|
35 | . W !?2,"by another user!",$C(7)
|
---|
36 | . Q
|
---|
37 | ;Lock case node so no one else can edit rpt pointer during this session
|
---|
38 | S RAPNODE="^RADPT("_RADFN_",""DT"","_RADTI_",""P"","
|
---|
39 | S RAXIT=$$LOCK^RAUTL12(RAPNODE,RACNI) I RAXIT D INCRPT^RARTE4 G START
|
---|
40 | S RAI="",$P(RAI,"-",80)="" W !,RAI
|
---|
41 | W !?1,"Name : ",$E(RANME,1,25),?40,"Pt ID : ",RASSN
|
---|
42 | W !?1,"Case No. : ",RACN,?18,"Exm. St: ",$E($P($G(^RA(72,+RAST,0)),"^"),1,12),?40,"Procedure : ",$E(RAPRC,1,25)
|
---|
43 | ;check for contrast media; display if CM data exists (patch 45)
|
---|
44 | S RACMDATA=$$CMEDIA^RAUTL8(RADFN,RADTI,RACNI)
|
---|
45 | D:$L(RACMDATA) CMEDIA(RACMDATA)
|
---|
46 | K RACMDATA
|
---|
47 | S RA18EX=$$PUTTCOM2^RAUTL11(RADFN,RADTI,RACN," Tech.Comment: ",15,70,-1,0) ;P18
|
---|
48 | I RA18EX=-1 Q ;P18
|
---|
49 | N RAPRTSET,RAMEMARR,RA1
|
---|
50 | D EN2^RAUTL20(.RAMEMARR)
|
---|
51 | I RAPRTSET D
|
---|
52 | . S RA1=""
|
---|
53 | . F S RA1=$O(RAMEMARR(RA1)) Q:RA1=""!(RA18EX=-1) I RA1'=RACNI D
|
---|
54 | .. W !,?1,"Case No. : ",+RAMEMARR(RA1)
|
---|
55 | .. W:$P(RAMEMARR(RA1),"^",4)]"" ?18,"Exm. St: ",$E($P($G(^RA(72,$P(RAMEMARR(RA1),"^",4),0)),"^"),1,12)
|
---|
56 | .. W ?40,"Procedure : ",$E($P($G(^RAMIS(71,+$P(RAMEMARR(RA1),"^",2),0)),"^"),1,26)
|
---|
57 | ..;check printset for contrast media; display if CM data exists
|
---|
58 | ..S RACMDATA=$$CMEDIA^RAUTL8(RADFN,RADTI,RA1)
|
---|
59 | ..D:$L(RACMDATA) CMEDIA(RACMDATA)
|
---|
60 | ..K RACMDATA
|
---|
61 | .. S RA18EX=$$PUTTCOM2^RAUTL11(RADFN,RADTI,+RAMEMARR(RA1)," Tech.Comment: ",15,70,-1,0) Q:RA18EX=-1 ;P18
|
---|
62 | .. Q
|
---|
63 | . Q
|
---|
64 | SS1 I RA18EX=-1 Q ;P18
|
---|
65 | S Y(0)=RASUBY0
|
---|
66 | W !?1,"Exam Date: ",RADATE,?40,"Technologist: " I $O(^RADPT(RADFN,"DT",RADTI,"P",RACNI,"TC",0))>0,$D(^VA(200,+^($O(^(0)),0),0)) W $E($P(^(0),"^"),1,25)
|
---|
67 | W !?40,"Req Phys : ",$E($S($D(^VA(200,+$P(Y(0),"^",14),0)):$P(^(0),"^"),1:""),1,25),!,RAI
|
---|
68 | I $D(^RARPT(+RARPT,0)) S RA1=$P(^(0),"^",5) I "^V^EF^"[("^"_RA1_"^") W !?3,$C(7),"Report has already been ",$S(RA1="V":"verified",1:"electronically filed"),! D UNLOCK^RAUTL12(RAPNODE,RACNI) D INCRPT^RARTE4 G START
|
---|
69 | ;Create new rpt, or skip to IN to edit existing report
|
---|
70 | G IN^RARTE4:$D(^RARPT(+RARPT,0))
|
---|
71 | G:'RAPRTSET NEW G:$P(^RA(72,+RAST,0),"^",3)>0 NEW
|
---|
72 | ; case is part of a print set, AND is cancelled
|
---|
73 | N RA2 S (RA1,RA2)=""
|
---|
74 | F S RA1=$O(RAMEMARR(RA1)) Q:RA1="" S:$P(RAMEMARR(RA1),"^",3)]"" RA2=$P(RAMEMARR(RA1),"^",3)
|
---|
75 | G:RA2="" NEW
|
---|
76 | W !!,$C(7),"Other cases of this cancelled case ",RACN,"'s print set are entered in a report already",!!,"You may NOT create a new report for this cancelled case,",!,"but you may include this cancelled case in the existing report."
|
---|
77 | W !!,"Do you want to include this cancelled case in the same report",!,"as the others in the print set ?"
|
---|
78 | S %=2 D YN^DICN
|
---|
79 | W:%>0 "...",$S(%=1:"Include",1:"Skip")," this case"
|
---|
80 | I %=1 S $P(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0),"^",17)=RA2,RARPT=RA2,RARPTN=$P(^RARPT(RARPT,0),"^"),RA1=RACN D INSERT^RARTE2
|
---|
81 | D UNLOCK^RAUTL12(RAPNODE,RACNI) D INCRPT^RARTE4 G START
|
---|
82 | NEW G:'RAPRTSET NEW1
|
---|
83 | L +^RADPT(RADFN,"DT",RADTI):0 G:$T NEW1
|
---|
84 | W !!?10,$C(7),"** This case belongs to a printset,",?68,"**",!?10,"** and someone else is currently doing REPORT ENTRY/EDIT",?68,"**"
|
---|
85 | W !?10,"** on another case for this same printset,",?68,"**",!?10,"** so you may not enter a new report.",?68,"**"
|
---|
86 | H 2 D UNLOCK^RAUTL12(RAPNODE,RACNI) D INCRPT^RARTE4 G START
|
---|
87 | NEW1 S RARPTN=$E(RADTE,4,7)_$E(RADTE,2,3)_"-"_RACN
|
---|
88 | W !?3,"...report not entered for this exam...",!?10,"...will now initialize report entry..."
|
---|
89 | S I=+$P(^RARPT(0),"^",3)
|
---|
90 | G LOCK^RARTE4
|
---|
91 | Q
|
---|
92 | ;
|
---|
93 | CMEDIA(X) ;check if contrast media is associated with the report (exam)
|
---|
94 | ;variables assumed to exist X: the string of contrast media used
|
---|
95 | ;delimited by the comma.
|
---|
96 | N Y W !," Contrast :"
|
---|
97 | F Y=1:1 Q:$P(X,", ",Y)="" W ?12,$P(X,", ",Y) W:$P(X,", ",Y+1)'="" !
|
---|
98 | Q
|
---|