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

NURCRL0.m

Go to the documentation of this file.
  1. NURCRL0 ;HIRMFO/RM,RTK-CARE PLAN RANK ORDER PRINT ;8/29/96
  1. ;;4.0;NURSING SERVICE;;Apr 25, 1997
  1. EN1 ; ENTRY FROM OPTION 'NURCRP-CP RANK LISTING' TO PRINT RANK ORDER
  1. ; LISTING OF CARE PLAN
  1. ;
  1. ; Select Date/Time range for report
  1. S %DT("A")="Start with Date (Time Optional): ",%DT="AET",%DT(0)="-NOW" D ^%DT I +Y'>0 G EXIT
  1. S NURCBGDT=+Y
  1. ENDT S %DT("A")="Go to Date (Time Optional): ",%DT="AET",%DT(0)=NURCBGDT D ^%DT I +Y>0 S X=+Y,%DT="T",%DT(0)="-NOW" D ^%DT W:+Y'>0 $C(7)," ??" G:+Y'>0 ENDT I +Y>0 S NURCENDT=+Y_$S(Y[".":"",1:".24")
  1. E G EXIT
  1. ;
  1. ; Select Ward(s) for report :Use Nursing utility
  1. W ! I $$MDIC^NURCRL3'>0 G EXIT
  1. S X="" F S X=$O(NURSNLOC(X)) Q:X="" F Y=0:0 S Y=$O(NURSNLOC(X,Y)) Q:Y'>0 F NURC=0:0 S NURC=$O(^NURSF(211.4,Y,3,NURC)) Q:NURC'>0 D
  1. .S NURSMAS=+$G(^NURSF(211.4,Y,3,NURC,0)) I NURSMAS>0 S NURSMAS(0)=$P($G(^DIC(42,NURSMAS,0)),"^") I $L(NURSMAS(0)) S NURSMAS(NURSMAS(0),NURSMAS)=""
  1. ;
  1. ; Select the Ward/Group Report ID for the header
  1. K DIRUT S NURCLID=$$RPRTID^NURCROP2 G:$D(DIRUT) EXIT
  1. ;
  1. ; Select whether report is for Admitting location or all locations
  1. W ! S NURCSORT=$$SORTYP^NURCROP2 G EXIT:NURCSORT'>0
  1. ;
  1. ; Select if want to display Dx only, Dx/Int or Int only
  1. W ! K DIR S DIR(0)="SOM^1:Nursing Diagnoses Only;2:Combination Nursing Diagnoses/Interventions;3:Interventions Only;",DIR("A")="Select which data is to be displayed in this report",DIR("?")="ENTER A CODE FROM THE LIST."
  1. D ^DIR K DIR I "^^"[Y G EXIT
  1. S NURCRTYP=Y
  1. ;
  1. DEV ; Ask device and allow to queue
  1. ; If QUEUE then call ^%ZTLOAD and exit
  1. W ! S %ZIS="Q" D ^%ZIS I POP K IO("Q") G EXIT
  1. I $E(IOST)="P",'$D(IO("Q")),'$D(IO("S")) D ^%ZISC S XQH="NURS-PRINTER QUEUE" W $C(7) D EN^XQH K XQH G DEV
  1. I $D(IO("Q")) D G EXIT
  1. . K IO("Q")
  1. . S ZTIO=ION,ZTRTN="PRINT^NURCRL0",ZTDESC="Nursing Care Plan Statistics - Rank Order Print",ZTSAVE("NURSMAS*")="",ZTSAVE("NURCBGDT")="",ZTSAVE("NURCENDT")="",ZTSAVE("NURCRTYP")="",ZTSAVE("NURCSORT")="",ZTSAVE("NURCLID")=""
  1. . D ^%ZTLOAD K ZTSK
  1. . Q
  1. ;
  1. PRINT ; ENTRY FROM TASK TO PRINT RANK ORDER PRINT IF QUEUED TO DEVICE
  1. ;
  1. ; Call print routine
  1. D PRINT^NURCRL4
  1. ;
  1. ; If terminal don't let last page scroll off of screen
  1. ; I 'NURCOUT S NURCPAGE=$$HEADER^NURCRL1(-1)
  1. EXIT ;
  1. ; Clean up variables
  1. K ^TMP($J) S NUROUT=$S('$D(NURCOUT):1,1:NURCOUT) D CLOSE^NURSUT1,^NURCKILL
  1. Q