PRSNRIA ;WOIFO/DAM - Nurse POC Report;9/3/2009
;;4.0;PAID;**126**;Sep 21, 1995;Build 59
;;Per VHA Directive 2004-038, this routine should not be modified
;
DEP ; Entry point for Data Entry Personnel
N PRSIEN,GROUP
D ACCESS^PRSNUT02(.GROUP,"E",DT)
I $P($G(GROUP(0)),U,2)="E" D Q
.W !,$P(GROUP(0),U,3)
D MAIN
Q
;
DAP ; Entry point for Data Approval Personnel
N PRSIEN,GROUP
D ACCESS^PRSNUT02(.GROUP,"A",DT)
I $P($G(GROUP(0)),U,2)="E" D Q
.W !,$P(GROUP(0),U,3)
D MAIN
QUIT
;
COORD ;Entry point for VANOD Coordinator
; Coordinator has no access limits so let them pick any nurse
N PRSIEN,DIC,X,Y,DTOUT,DUOUT
S DIC="^PRSPC(",DIC(0)="AEQMZ",DIC("S")="I $$ISNURSE^PRSNUT01(Y)"
D ^DIC
Q:Y'>0!$D(DTOUT)!$D(DUOUT)
S PRSIEN=$P(Y,U)
D MAIN
QUIT
;
NURSE ;Entry point for VANOD Nurse
N PRSIEN,SSN
S PRSIEN="",SSN=$P($G(^VA(200,DUZ,1)),"^",9)
I SSN'="" S PRSIEN=$O(^PRSPC("SSN",SSN,0))
I 'PRSIEN W !!,*7,"Your SSN was not found in both the New Person & Employee File!" Q
;
; if not in 450 as a nurse then explain and quit
I +$$ISNURSE^PRSNUT01(PRSIEN)'>0 D NOTNRSDX^PRSNRMM1 Q
;
D MAIN
Q
;
MAIN ; loop through Location or t&l
;
; pick a NURSE from the group or the T&L unit
;
; ien value from group variable); If coordinator has already picked a
; nurse, or nurse is doing a lookup on ;self based on SSN and DUZ, then
;PRSIEN is set and the line of code below will not be executed.
;
N VALUE
I $G(PRSIEN)'>0 D
. S VALUE=+GROUP($O(GROUP(0)))
. Q:VALUE'>0
. S PRSIEN=+$$PICKNURS^PRSNUT03($P(GROUP(0),U,2),VALUE)
;
N POCD,PPIEN,PRSNDAY,DAYNODE,RANGE,BEG,END,EXTBEG,EXTEND
;
; User is prompted for a date or date range
;
S RANGE=$$POCRANGE^PRSNUT01()
; QUIT HERE IF RANGE=0
Q:+RANGE'>0
;
S BEG=$P($G(RANGE),U)
S END=$P($G(RANGE),U,2)
;
;
S PPIEN=+$G(^PRST(458,"AD",BEG))
;
; If a record exists for the nurse and the date range, then the
; Individual Activity report is displayed
; If record doesn't exist for the date range selected, then a
; message is displayed, "NO RECORDS EXIST FOR THAT DATE RANGE",
; and the user is re-prompted for a date.
;
;call to generate and display report for individual activity
N %ZIS,POP,IOP
S %ZIS="MQ"
D ^%ZIS
Q:POP
I $D(IO("Q")) D
. K IO("Q")
. N ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTUCI,ZTCPU,ZTPRI,ZTKIL,ZTSYNC
. S ZTDESC="NURSE POINT OF CARE DAILY ACTIVITY REPORT"
. S ZTRTN="REPORT^PRSNRIA"
. S ZTSAVE("PRSIEN")=""
. S ZTSAVE("BEG")=""
. S ZTSAVE("END")=""
. D ^%ZTLOAD
. I $D(ZTSK) S ZTREQ="@" W !,"Request "_ZTSK_" Queued."
E D
. D REPORT
Q
;
REPORT ;
;
U IO
D POCDSPLY^PRSNRUT0(PRSIEN,BEG,END)
W !!,"End of Report"
D ^%ZISC
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSNRIA 2767 printed Dec 13, 2024@02:27:25 Page 2
PRSNRIA ;WOIFO/DAM - Nurse POC Report;9/3/2009
+1 ;;4.0;PAID;**126**;Sep 21, 1995;Build 59
+2 ;;Per VHA Directive 2004-038, this routine should not be modified
+3 ;
DEP ; Entry point for Data Entry Personnel
+1 NEW PRSIEN,GROUP
+2 DO ACCESS^PRSNUT02(.GROUP,"E",DT)
+3 IF $PIECE($GET(GROUP(0)),U,2)="E"
Begin DoDot:1
+4 WRITE !,$PIECE(GROUP(0),U,3)
End DoDot:1
QUIT
+5 DO MAIN
+6 QUIT
+7 ;
DAP ; Entry point for Data Approval Personnel
+1 NEW PRSIEN,GROUP
+2 DO ACCESS^PRSNUT02(.GROUP,"A",DT)
+3 IF $PIECE($GET(GROUP(0)),U,2)="E"
Begin DoDot:1
+4 WRITE !,$PIECE(GROUP(0),U,3)
End DoDot:1
QUIT
+5 DO MAIN
+6 QUIT
+7 ;
COORD ;Entry point for VANOD Coordinator
+1 ; Coordinator has no access limits so let them pick any nurse
+2 NEW PRSIEN,DIC,X,Y,DTOUT,DUOUT
+3 SET DIC="^PRSPC("
SET DIC(0)="AEQMZ"
SET DIC("S")="I $$ISNURSE^PRSNUT01(Y)"
+4 DO ^DIC
+5 if Y'>0!$DATA(DTOUT)!$DATA(DUOUT)
QUIT
+6 SET PRSIEN=$PIECE(Y,U)
+7 DO MAIN
+8 QUIT
+9 ;
NURSE ;Entry point for VANOD Nurse
+1 NEW PRSIEN,SSN
+2 SET PRSIEN=""
SET SSN=$PIECE($GET(^VA(200,DUZ,1)),"^",9)
+3 IF SSN'=""
SET PRSIEN=$ORDER(^PRSPC("SSN",SSN,0))
+4 IF 'PRSIEN
WRITE !!,*7,"Your SSN was not found in both the New Person & Employee File!"
QUIT
+5 ;
+6 ; if not in 450 as a nurse then explain and quit
+7 IF +$$ISNURSE^PRSNUT01(PRSIEN)'>0
DO NOTNRSDX^PRSNRMM1
QUIT
+8 ;
+9 DO MAIN
+10 QUIT
+11 ;
MAIN ; loop through Location or t&l
+1 ;
+2 ; pick a NURSE from the group or the T&L unit
+3 ;
+4 ; ien value from group variable); If coordinator has already picked a
+5 ; nurse, or nurse is doing a lookup on ;self based on SSN and DUZ, then
+6 ;PRSIEN is set and the line of code below will not be executed.
+7 ;
+8 NEW VALUE
+9 IF $GET(PRSIEN)'>0
Begin DoDot:1
+10 SET VALUE=+GROUP($ORDER(GROUP(0)))
+11 if VALUE'>0
QUIT
+12 SET PRSIEN=+$$PICKNURS^PRSNUT03($PIECE(GROUP(0),U,2),VALUE)
End DoDot:1
+13 ;
+14 NEW POCD,PPIEN,PRSNDAY,DAYNODE,RANGE,BEG,END,EXTBEG,EXTEND
+15 ;
+16 ; User is prompted for a date or date range
+17 ;
+18 SET RANGE=$$POCRANGE^PRSNUT01()
+19 ; QUIT HERE IF RANGE=0
+20 if +RANGE'>0
QUIT
+21 ;
+22 SET BEG=$PIECE($GET(RANGE),U)
+23 SET END=$PIECE($GET(RANGE),U,2)
+24 ;
+25 ;
+26 SET PPIEN=+$GET(^PRST(458,"AD",BEG))
+27 ;
+28 ; If a record exists for the nurse and the date range, then the
+29 ; Individual Activity report is displayed
+30 ; If record doesn't exist for the date range selected, then a
+31 ; message is displayed, "NO RECORDS EXIST FOR THAT DATE RANGE",
+32 ; and the user is re-prompted for a date.
+33 ;
+34 ;call to generate and display report for individual activity
+35 NEW %ZIS,POP,IOP
+36 SET %ZIS="MQ"
+37 DO ^%ZIS
+38 if POP
QUIT
+39 IF $DATA(IO("Q"))
Begin DoDot:1
+40 KILL IO("Q")
+41 NEW ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTUCI,ZTCPU,ZTPRI,ZTKIL,ZTSYNC
+42 SET ZTDESC="NURSE POINT OF CARE DAILY ACTIVITY REPORT"
+43 SET ZTRTN="REPORT^PRSNRIA"
+44 SET ZTSAVE("PRSIEN")=""
+45 SET ZTSAVE("BEG")=""
+46 SET ZTSAVE("END")=""
+47 DO ^%ZTLOAD
+48 IF $DATA(ZTSK)
SET ZTREQ="@"
WRITE !,"Request "_ZTSK_" Queued."
End DoDot:1
+49 IF '$TEST
Begin DoDot:1
+50 DO REPORT
End DoDot:1
+51 QUIT
+52 ;
REPORT ;
+1 ;
+2 USE IO
+3 DO POCDSPLY^PRSNRUT0(PRSIEN,BEG,END)
+4 WRITE !!,"End of Report"
+5 DO ^%ZISC
+6 QUIT