source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCPFTP.m@ 1087

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

initial load of WorldVistAEHR

File size: 1.3 KB
RevLine 
[613]1MCPFTP ;WISC/TJK-PULMONARY FUNCTION TEST PRINT ;3/6/98 16:29
2 ;;2.3;Medicine;**17,18**;09/13/1996
3DIC ;
4 D MCPPROC^MCARP
5 S MCBP=$S($E(XQY0,3,3)="B":1,1:0)
6 S DIC="^MCAR(700,",DIC(0)="AEQMZ"
7 G:$G(MCARGDA)>0 SUM
8 S:MCESON DIC("S")=$$PREVIEW^MCESSCR(MCFILE)
9 D ^DIC K DIC G EXIT:Y<0
10 S MCARGDA=+Y
11 ;
12SUM ; Entry point when procedure # (MCARGDA) is already defined.
13 ; Called by Summary of Patient Procedures, Interpretation Enter/
14 ; Edit.
15 S MCARZ="PULMONARY FUNCTION TEST REPORT"
16 D:$G(MCESON) STATUS^MCESPRT(MCFILE,MCARGDA)
17 S MCPFT0=^MCAR(700,MCARGDA,0),MCFILE=700,DFN=$P(^(0),U,2)
18 I $D(ORHFS) U IO G PRINT ;dcm/slc added for CPRS
19DEVQUE ; Device Control and Queuing Control
20 K IO("Q") S %ZIS="MQ" D ^%ZIS I POP G EXIT
21 I $D(IO("Q")) K IO("Q") S (ZTSAVE("MC*"),ZTSAVE("DFN"),ZTSAVE("DIC"))="",ZTRTN=$S($G(MCBP)=1:"^MCBPFTP1",1:"^MCPFTP1"),ZTDESC="PFT REPORT" D ^%ZTLOAD K ZTSK G EXIT
22 U IO
23PRINT S HOSP=$P($G(^DPT(DFN,.1)),U) S:HOSP'="" HOSP=$O(^SC("B",HOSP,"")) S:HOSP'="" HOSP=$P(^SC(HOSP,0),U,15) S:HOSP'="" HOSP=$P($G(^DG(40.8,HOSP,0)),U) S PG=0
24 G:$G(MCBP)=1 ^MCBPFTP1 G ^MCPFTP1
25EXIT K DFN,MCARGDA,MCPFT0,Y,POP
26 K MCAR,MCARDOB,MCARDTM,MCARHDR,MCARRB,MCARWARD,MCRHR,VADM,VAIN
27 K MCARP,MCFILE,MCESON,MCESKEY,MCROUT,MCTYPE,MCARGDA
28 K MCPBRIEF,MCPFULL,MCPRTRTN,MCBS
29 D ^%ZISC Q
Note: See TracBrowser for help on using the repository browser.