source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCARGP.m@ 1578

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1MCARGP ;WISC/TJK-ENDOSCOPY REPORTS ;12/15/97 14:49
2 ;;2.3;Medicine;**15**;09/13/1996
3ENDO ; Endoscopic Report
4 I +$G(MCARGDA)>0 G EN1
5 D MCPPROC^MCARP
6 S MCARGNON=$O(^MCAR(697.2,"B","NON-ENDO",0)),MCARGCON=$O(^MCAR(697.2,"B","CONSULT",0)),DIC("S")="I ($P(^(0),U,12)'=MCARGCON),($P(^(0),U,12)'=MCARGNON),($D(^MCAR(697.2,""D"",MCARCODE,$P(^MCAR(699,+Y,0),U,12))))"
7 S MCARGRTN=$S($G(MCARCODE)="G"&($G(MCBP)=1):"GIB",$G(MCBP)=1:"PULMB",$G(MCARCODE)="G":"GI",1:"PULM"),DIC("A")="Select Patient or Date/Time of Endoscopic Procedure: " G LOOK
8NONENDO ; Non Endoscopic Report
9 D MCPPROC^MCARP
10 S MCARGNUM=$O(^MCAR(697.2,"B","NON-ENDO",0)),DIC("S")="I $P(^MCAR(699,+Y,0),U,12)=MCARGNUM",MCARGRTN=$S($G(MCBP)=1:"NONENDOB",1:"NONENDO"),DIC("A")="Select Patient or Date/Time of Non-Endoscopic Procedure: " G LOOK
11CONSULT ; Office Consult Report
12 S DIC="^MCAR(699.5,",MCESON=0
13 S MCARGNUM=$O(^MCAR(697.2,"B","CONSULT",0)),DIC("S")="I $P(^MCAR(699.5,+Y,0),U,3)",MCARGRTN=$S($G(MCBP)=1:"CONSULTB",1:"CONSULT"),DIC("A")="Select Patient or Date/Time of Consultation: " G LOOK1
14LOOK S DIC="^MCAR(699,",MCFILE=699,MCON=1
15LOOK1 I MCESON S DIC("S")=$$PREVIEW^MCESSCR(MCFILE)
16 S DIC(0)="AEMQZ" D ^DIC K DIC,MCARGCON,MCARGNON,MCARGNUM G EXIT:Y<0
17 S MCARGDA=+Y
18EN1 ;ENTRY POINT FROM SUMMARY OF PATIENT PROCEDURES ROUTINE
19 S MCARZ=$S(MCARGRTN?1"N".E:"NON-ENDOSCOPIC",MCARGRTN?1"C".E:"CONSULT",1:"ENDOSCOPIC")_" REPORT"
20 D:$G(MCESON) STATUS^MCESPRT(MCFILE,MCARGDA)
21 I $D(ORHFS) U IO G PRINT ;dcm/slc added for CPRS
22DEVQUE ; Device Control and Queuing Control
23 K IO("Q") S %ZIS="MQ" D ^%ZIS I POP S MCOUT="" G EXIT
24 I $D(IO("Q")) S ZTSAVE("MC*")="",ZTRTN="PRINT^MCARGP",ZTDESC=MCARZ D ^%ZTLOAD K ZTSK G EXIT
25 U IO
26PRINT ; Print Report
27 S DIC=$S(MCARGRTN["CONSULT":"^MCAR(699.5,",1:"^MCAR(699,"),MCFILE=699 G PRINT^MCARP
28EXIT ;
29 I '$D(MCOUT),IOST'?1"P-".E R !!,"* END * Press return to continue: ",X:DTIME
30 K ^UTILITY($J),IO("Q"),MCARGDA,MCARGDT,SSN,MCARPPS,MCOUT
31 K MCARGNM,MCARGRTN,X,DFN,SSN,MCARGNUM,MCARGNAM,MCARZ,DN,D0,FLDS,MCARCODE
32 K DIOEND,DIOBEG,DI,DICS,DJ,BY,A,DICSS,MCON,MCARGDA
33 K DIEDT,DIQ,DIWF,DIPZ,DIL,DXS,DALL,DSC,DCL,DPP,DPQ,DIC,DU,DQI,DY,S,DC
34 K DL,DV,DE,DA,DK,Y,R,C,D,I,J,Q,M,P,N,D1,DIW,DIWL,DIWR,DIWT,PG,Z,L,DIPGM,DICMX,DIXX,VA,%Y1,%Y2,DIJ,DP,B
35 K MCARP,MCFILE,MCESON,MCESKEY,MCROUT,MCTYPE,MCPBRIEF,MCPFULL,MCPRTRTN,MCBS,MCSUP
36 K MCARDE,MCESS,MCESSEC,MCFILE1,MCOUNT,MCPATFLD,MCPOSTP,MCPRO
37 W:IOST?1"P-".E @IOF D ^%ZISC Q
38RECALL K DIC,FR,TO,DIS S MCPRO="LAP" D MCPPROC^MCARP
39 S DIC="^MCAR(699,",BY="[MCARGIRCLI]",L=0
40 S FLDS="[MCARGIRCLI]"
41 S DIS(0)="I $D(^MCAR(697.2,""D"",MCARCODE,$P(^MCAR(699,D0,0),U,12)))"
42 S DIS(1)="I $D(^MCAR(699,D0,25,""B"",2))"
43 S:$G(MCESON)=1 DIS(2)="I $$SCRGI^MCESSCR(699,D0,MCESKEY,MCSUP)"
44 D EN1^DIP K DIS
45 G EXIT
Note: See TracBrowser for help on using the repository browser.