Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BWBRMDE

BWBRMDE.m

Go to the documentation of this file.
BWBRMDE ;IHS/ANMC/MWR - BROWSE PROCEDURES FOR CDC MDE'S;15-Feb-2003 21:47;PLS
 ;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
 ;;  CALLED BY OPTION: "BW CDC BROWSE PROCEDURES NO DX" TO
 ;;  LIST AND BROWSE PROCEDURES WITH INCOMPLETE DX WORKUP.
 ;
 ;---> USE ^BWBRPCD ROUTINES FOR DISPLAY (NODES 1 & 2 IN ^TMP GLOBAL).
 ;
 D SETVARS
 D DATES  G:BWPOP EXIT
 D DEVICE G:BWPOP EXIT
 D SORT
 D COPYGBL^BWBRPCD
 D DISPLAY^BWBRPCD1(BWTITLE,BWHEADER,BWCODE)
 ;
EXIT ;EP
 W:$D(IOF) @IOF
 D KILLALL^BWUTL8
 Q
 ;
SETVARS ;EP
 ;---> SET REQUIRED VARIABLES.
 D SETVARS^BWUTL5 S BWPOP=0
 S BWTITLE="* * *  MDE PROCEDURES WITH INCOMPLTE DX WORKUP * * *"
 ;---> SET CODE EXCECUTED BY DIR PROMPT.
 S BWCODE="D EDIT^BWBRPCD1,SORT^BWBRMDE,COPYGBL^BWBRPCD"
 ;---> SET LINE LABEL IN ^BWUTL7 TO CALL AS HEADER.
 S BWHEADER="HEADER1"
 Q
 ;
SORT ;EP
 ;---> SORT AND STORE ARRAY IN ^TMP("BW",$J
 K ^TMP("BW",$J) N BWDFN,BWIEN,BWPCD,BWPCDS,N,M,P,Y,Z
 S BWDATE=BWBEGDT-.00001,BWENDDT=BWENDDT+1
 F  S BWDATE=$O(^BWPCD("D",BWDATE)) Q:'BWDATE  Q:(BWDATE'<BWENDDT)  D
 .S BWIEN=0
 .F  S BWIEN=$O(^BWPCD("D",BWDATE,BWIEN)) Q:'BWIEN  D
 ..;---> SET Y=THE ZERO NODE FOR THIS PROCEDURE, Z=THE 2 NODE.
 ..S Y=^BWPCD(BWIEN,0),Z=$G(^BWPCD(BWIEN,2))
 ..;---> QUIT IF THIS PROCEDURE HAS A RESULT OF "ERROR/DISREGARD".
 ..Q:$P(Y,U,5)=8
 ..;---> QUIT IF PIECE 2;20, DX WORKUP PLANNED IS NEITHER
 ..;---> 1:PLANNED NOR 3:UNDETERMINED.
 ..Q:Z=""  Q:(($P(Z,U,20)'=1)&($P(Z,U,20)'=3))
 ..;---> QUIT IF EITHER FIELD 0;33 (FINAL DX PAP/COLP) OR
 ..;---> FIELD 2;3 (FINAL DX FOR BREAST) IS NOT NULL, I.E., A FINAL
 ..;---> DIAGNOSIS HAS BEEN ENTERED.
 ..Q:(($P(Y,U,33)]"")!($P(Z,U,30)]""))
 ..;---> STORE IN ^TMP FOR DISPLAY.
 ..S Y=^BWPCD(BWIEN,0) D STORE^BWBRPCD(1,BWIEN,Y)
 Q
 ;
DEQUEUE ;EP
 ;---> FOR TASKMAN QUEUE OF PRINTOUT.
 D SETVARS,SORT,COPYGBL^BWBRPCD
 D DISPLAY^BWBRPCD1(BWTITLE,BWHEADER,BWCODE)
 D EXIT
 Q
 ;
DATES ;EP
 ;---> ASK DATE RANGE.  RETURN DATES IN BWBEGDT AND BWENDDT.
 ;---> SET DEFAULT BEGIN DATE=DATE CDC FUNDING BEGAN (SITE PARAM).
 S:$G(DUZ(2)) BWBEGDF=$$TXDT^BWUTL5($P($G(^BWSITE(DUZ(2),0)),U,17))
 ;
 D ASKDATES^BWUTL3(.BWBEGDT,.BWENDDT,.BWPOP,BWBEGDF,"T-30")
 Q
 ;
DEVICE ;EP
 ;---> GET DEVICE AND POSSIBLY QUEUE TO TASKMAN.
 S ZTRTN="DEQUEUE^BWBRMDE"
 F BWSV="BEGDT","ENDDT","HEADER" D
 .I $D(@("BW"_BWSV)) S ZTSAVE("BW"_BWSV)=""
 D ZIS^BWUTL2(.BWPOP,1,"HOME")
 Q