source: FOIAVistA/trunk/r/RADIOLOGY_NUCLEAR_MEDICINE-RA/RARTVER2.m@ 940

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

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1RARTVER2 ;HISC/FPT-On-line Verify Radiology Reports (cont.) ;11/19/97 13:47
2 ;;5.0;Radiology/Nuclear Medicine;**23,26,31**;Mar 16, 1998
3ADDLRPT ; add'l reports to be verified
4 S (RARPT,RATOT)=0
5 Q:RACHOICE=6
6 F S RARPT=$O(^RARPT(RAD,RARADHLD,RARPT)) Q:'RARPT I $D(^RARPT(RARPT,0)) S RARTDT=$S($P(^(0),"^",6)="":9999999.9999,1:$P(^(0),"^",6)) D
7 .I $D(^TMP($J,"RA","DT",RARTDT,RARPT)) Q
8 .S X=$G(^RARPT(RARPT,0))
9 .Q:$$STUB^RAEDCN1(RARPT) ;skip stub report
10 .Q:$P(X,"^",5)="V" ; skip if already verified
11 .I RACHOICE=1,$P(X,U,12)]"","DR"[$E($P(X,U,5)) D SETTMP Q
12 .I RACHOICE=2,$P(X,U,5)="R" D SETTMP Q
13 .I RACHOICE=3,$P(X,U,5)="D" D SETTMP Q
14 .I RACHOICE=4,$P(X,U,5)="PD" D SETTMP Q
15 .I RACHOICE=5 D SETTMP
16 I RATOT>0 W $C(7),!!?5,RATOT_" additional exam"_$S(RATOT>1:"s are",1:" is")_" now ready for verification.",!! K DIR S DIR(0)="E",DIR("A")="Press RETURN to Continue" D ^DIR S:$D(DIRUT) RATOT=0 K DIR,DIROUT,DIRUT,DTOUT,DUOUT
17 S:RATOT>0 RARLTVFL=""
18 Q
19SETTMP ;
20 S Y=RARPT D RASET^RAUTL2 Q:'Y ; corrupt record - so ignore!!
21 S ^TMP($J,"RA","DT",RARTDT,RARPT)="",RATOT=RATOT+1
22 Q
23CU ; clean-up variables
24 K %,%DT,%W,%Y1,DA,DGO,DI,DIC,DIWF,DIWR,I,OREND,POP,RA,RACHOICE,RACN,RACNI,RACS,RACT,RAD,RADATE,RADFN,RADIV,RADTE,RADTI,RADUP,RADUZ,RAERR,RAFLG,RAIMGTYI,RAIMGTYJ,RAJ1
25 K RANM,RANME,RANUM,RAONLINE,RAOR,RAOUT,RAPGM,RAPRC,RAPRIT,RARAD,RARADHLD,RARDX,RARESFLG,RARPDT,RARLTV,RARLTVFL,RARPT,RARPTX,RARTDT,RARTVER,RARTVERF,RASET,RASIG,RASN,RASTAFF,RASTI,RATOT,RAVER,RAVNB,RAXX,RPTX,X,Y,^TMP($J,"RA")
26 K D,D0,D1,DDER,DLAYGO,RACI,X1,ZTSK,DISYS
27 Q
28SAVE ; Save key variables. User can first print a report to a slave printer
29 ; in which case the key variables are killed by the printing program.
30 ; These variables are needed if the user then decides to CONTINUE
31 ; editing the STATUS.
32 N RAI
33 F RAI="RACN","RACNI","RADFN","RADTI","RARPT","RAVER" S RASAVE(RAI)=$G(@RAI)
34 Q
35RESTORE ; Restore the variables that were saved above.
36 N RAI
37 S RAI=""
38 F S RAI=$O(RASAVE(RAI)) Q:RAI="" S @RAI=RASAVE(RAI)
39 K RASAVE
40 Q
41RETURN ; On-line verifier deletes resident pre-verification values. Report
42 ; will reappear in the resident's list of choices for the resident
43 ; pre-verification option
44 N DIR,DIROUT,DIRUT,DTOUT,DUOUT W !
45 S DIR("A")="Return to Resident (delete pre-verification)"
46 S DIR("?")="If you answer NO, this report will remain pre-verified."
47 S DIR("?",1)="If you answer YES, this report will no longer be marked as pre-verifed."
48 S DIR("?",2)="It will reappear as a selection in the Resident On-Line Pre-Verification"
49 S DIR("?",3)="option for the Resident associated with this report."
50 S DIR("?",4)=" "
51 S DIR(0)="Y"
52 D ^DIR
53 Q:Y=0!($D(DIRUT))
54 N DA,DIE,DR
55 S DIE="^RARPT(",DA=RARPT,DR="14///@;15///@;16///@"
56 D ^DIE
57 Q
58DISRPT ; Display the report
59 S RARTVER="" D RASET Q:'Y D DISP^RART1 K RARTVER
60 Q
61PRTRPT ; Print the report
62 D SAVE^RARTVER2
63 S ION=$P(RAMLC,"^",10),IOP=$S(ION]"":"Q;"_ION,1:"Q")
64 S RAMES="W !!,""Report has been queued for printing on device "",ION,"".""" D Q^RARTR
65 D RESTORE^RARTVER2
66 Q
67RASET ; raset^rautl2 returns radfn,radti,racni's "P"-node
68 S Y=RARPT D RASET^RAUTL2 Q:'Y S Y(0)=Y,RANME=$S($D(^DPT(RADFN,0)):$P(^(0),"^"),1:"UNKNOWN"),RAPRC=$S($D(^RAMIS(71,+$P(Y(0),"^",2),0)):$P(^(0),"^"),1:"UNKNOWN")
69 Q
70LOCK ; Display the warning message when a user is trying to edit a
71 ; locked report
72 S RACN=+$P(^RARPT(RARPT,0),"^",4)
73 W !!,$C(7),"Another user is editing this report",$S($G(RACN)]"":" (Case # "_RACN_")",1:""),". Please try again later." K DIR S DIR(0)="E" D ^DIR K DIR,DIROUT,DIRUT,DTOUT,DUOUT,RACN G GETRPT^RARTVER
74 Q
75EDTCHK ; is user permitted to edit?
76 S RASTATUS=+$P($G(^RADPT(RADFN,"DT",RADTI,"P",RACNI,0)),"^",3)
77 I $P($G(^RA(72,RASTATUS,0)),"^",3)>0 K RASTATUS Q
78 K RASTATUS
79 I $D(^XUSEC("RA MGR",DUZ)) Q
80 I $P(RAMDV,"^",22)=1 Q
81 W $C(7),!!,"The STATUS for this case is CANCELLED. You may not enter a report.",!!
82 S RARDX="C" ;user can verify only
83 Q
84ERR(RA) ; Display inactive physician message.
85 W !!?3,"'"_$P($G(^VA(200,RA,0)),"^")_"' has an inactive provider "
86 W "date of "_$$FMTE^XLFDT($P($G(^VA(200,RA,"PS")),"^",4))_".",$C(7)
87 Q
Note: See TracBrowser for help on using the repository browser.