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

PRSNRIA.m

Go to the documentation of this file.
  1. PRSNRIA ;WOIFO/DAM - Nurse POC Report;9/3/2009
  1. ;;4.0;PAID;**126**;Sep 21, 1995;Build 59
  1. ;;Per VHA Directive 2004-038, this routine should not be modified
  1. ;
  1. DEP ; Entry point for Data Entry Personnel
  1. N PRSIEN,GROUP
  1. D ACCESS^PRSNUT02(.GROUP,"E",DT)
  1. I $P($G(GROUP(0)),U,2)="E" D Q
  1. .W !,$P(GROUP(0),U,3)
  1. D MAIN
  1. Q
  1. ;
  1. DAP ; Entry point for Data Approval Personnel
  1. N PRSIEN,GROUP
  1. D ACCESS^PRSNUT02(.GROUP,"A",DT)
  1. I $P($G(GROUP(0)),U,2)="E" D Q
  1. .W !,$P(GROUP(0),U,3)
  1. D MAIN
  1. QUIT
  1. ;
  1. COORD ;Entry point for VANOD Coordinator
  1. ; Coordinator has no access limits so let them pick any nurse
  1. N PRSIEN,DIC,X,Y,DTOUT,DUOUT
  1. S DIC="^PRSPC(",DIC(0)="AEQMZ",DIC("S")="I $$ISNURSE^PRSNUT01(Y)"
  1. D ^DIC
  1. Q:Y'>0!$D(DTOUT)!$D(DUOUT)
  1. S PRSIEN=$P(Y,U)
  1. D MAIN
  1. QUIT
  1. ;
  1. NURSE ;Entry point for VANOD Nurse
  1. N PRSIEN,SSN
  1. S PRSIEN="",SSN=$P($G(^VA(200,DUZ,1)),"^",9)
  1. I SSN'="" S PRSIEN=$O(^PRSPC("SSN",SSN,0))
  1. I 'PRSIEN W !!,*7,"Your SSN was not found in both the New Person & Employee File!" Q
  1. ;
  1. ; if not in 450 as a nurse then explain and quit
  1. I +$$ISNURSE^PRSNUT01(PRSIEN)'>0 D NOTNRSDX^PRSNRMM1 Q
  1. ;
  1. D MAIN
  1. Q
  1. ;
  1. MAIN ; loop through Location or t&l
  1. ;
  1. ; pick a NURSE from the group or the T&L unit
  1. ;
  1. ; ien value from group variable); If coordinator has already picked a
  1. ; nurse, or nurse is doing a lookup on ;self based on SSN and DUZ, then
  1. ;PRSIEN is set and the line of code below will not be executed.
  1. ;
  1. N VALUE
  1. I $G(PRSIEN)'>0 D
  1. . S VALUE=+GROUP($O(GROUP(0)))
  1. . Q:VALUE'>0
  1. . S PRSIEN=+$$PICKNURS^PRSNUT03($P(GROUP(0),U,2),VALUE)
  1. ;
  1. N POCD,PPIEN,PRSNDAY,DAYNODE,RANGE,BEG,END,EXTBEG,EXTEND
  1. ;
  1. ; User is prompted for a date or date range
  1. ;
  1. S RANGE=$$POCRANGE^PRSNUT01()
  1. ; QUIT HERE IF RANGE=0
  1. Q:+RANGE'>0
  1. ;
  1. S BEG=$P($G(RANGE),U)
  1. S END=$P($G(RANGE),U,2)
  1. ;
  1. ;
  1. S PPIEN=+$G(^PRST(458,"AD",BEG))
  1. ;
  1. ; If a record exists for the nurse and the date range, then the
  1. ; Individual Activity report is displayed
  1. ; If record doesn't exist for the date range selected, then a
  1. ; message is displayed, "NO RECORDS EXIST FOR THAT DATE RANGE",
  1. ; and the user is re-prompted for a date.
  1. ;
  1. ;call to generate and display report for individual activity
  1. N %ZIS,POP,IOP
  1. S %ZIS="MQ"
  1. D ^%ZIS
  1. Q:POP
  1. I $D(IO("Q")) D
  1. . K IO("Q")
  1. . N ZTSK,ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTUCI,ZTCPU,ZTPRI,ZTKIL,ZTSYNC
  1. . S ZTDESC="NURSE POINT OF CARE DAILY ACTIVITY REPORT"
  1. . S ZTRTN="REPORT^PRSNRIA"
  1. . S ZTSAVE("PRSIEN")=""
  1. . S ZTSAVE("BEG")=""
  1. . S ZTSAVE("END")=""
  1. . D ^%ZTLOAD
  1. . I $D(ZTSK) S ZTREQ="@" W !,"Request "_ZTSK_" Queued."
  1. E D
  1. . D REPORT
  1. Q
  1. ;
  1. REPORT ;
  1. ;
  1. U IO
  1. D POCDSPLY^PRSNRUT0(PRSIEN,BEG,END)
  1. W !!,"End of Report"
  1. D ^%ZISC
  1. Q