PRSNREV1 ;WOIFO/DAM - Nursing Education Validation Report II;060409
;;4.0;PAID;**126**;Sep 21, 1995;Build 59
;;Per VHA Directive 2004-038, this routine should not be modified
Q
;
DSPLY(PRSIEN,PRSNOPT,NURSE,STOP) ; Entry point to gather POC Nurse
; Education Data from file 450
;INPUT:
; PRSIEN: Nurse ien 450
; BEG,END: FileMan begin and end dates for report
;
D INFO^PRSNRAS1
N INDEX,CNT
S (INDEX,CNT)=0
D DATA(PRSIEN,PRSNOPT,NURSE,.STOP)
;
K PRSNAME,PRSNSSN,PRSNTL,SKILMIX,ROLE,PRSNLNG,PRSNTWD,PRSNPOC1,PRSDY
K PPIEN,PRSL,PRSNDAY,STARTDT,STDE,BOC,OCC,ASN,EDU,YEAR
Q
;
;
HDR(PRSNOPT) ;Display header
;
W @IOF
S PG=PG+1
W $P("Nursing Education Validation Report^Nurse Position and Pay Information",U,PRSNOPT)," Report"
W " Run Date: ",$E(DT,4,5),"/",$E(DT,6,7),"/",$E(DT,2,3)," Page: ",$J(PG,3)
;nurse education validation
I PRSNOPT=1 D
. W !!,"Nurse Name",?21,"BOC/",?27,"Assignment Code",?47,"PAID Education Level"
. W !,"Last 4 SSN",?21,"OCC",?27,"Nurse Role",?47,"Year Degree Earned"
. QUIT
;nurse position and pay
E D
. W !!,"Nurse Name",?21,"BOC/",?27,"Assignment Code",?47,"Grade/Step",?60,"Salary"
. W !,"Last 4 SSN",?13,"CC",?21,"OCC",?27,"Nurse Role",?47,"Yr. of Ser.",?60,"Salary Start Date"
. QUIT
W !,"--------------------------------------------------------------------------------"
;
QUIT
;
DATA(PRSIEN,PRSNOPT,NURSE,STOP) ;Extract display data from POCD array and get external date
;
N JOB,ED,A,B,PRSNA,ROLE
S (BOC,OCC,ASN,EDU,YEAR)=0
;
S ROLE=$P($G(NURSE),U,2)
S JOB=$$GETCODES^PRSNUT01(PRSIEN) ;Job codes
S BOC=$P(JOB,U)
S OCC=$P(JOB,U,2)
S ASN=$P(JOB,U,7) ;External value of job assignment code
;nurse education validation
I PRSNOPT=1 D
. S ED=$$GETDEG^PRSNUT01(PRSIEN) ;Education level & year degree earned
. S EDU=$P(ED,U)
. S YEAR=$P(ED,U,2)
. QUIT
;nurse position and pay
I PRSNOPT=2 D
. S PRSNA=^PRSPC(PRSIEN,0),YEAR=$P(PRSNA,U,31) S:YEAR YEAR=$E(DT,1,3)-$E(YEAR,1,3)
. S A=$P(PRSNA,U,29),B=$L(A),$P(PRSNA,U,29)=$S(A<1000:A,1:$E(A,1,B-6)_","_$E(A,B-5,B))
. S A=$P(PRSNA,U,28),$P(PRSNA,U,28)=$E(A,4,5)_"/"_$E(A,6,7)_"/"_$E(A,2,3)
. QUIT
D PRT(PRSNOPT)
;
QUIT
;
PRT(PRSNOPT) ;
;print education vaidation report
I PRSNOPT=1 D
. W !!,$E(PRSNAME,1,19),?21,BOC,"/",?27,$E(ASN,1,19),?47,$E(EDU,1,30)
. W !,$E(PRSNSSN,6,9),?21,OCC,?27,$E(ROLE,1,19),?47,YEAR
;print position and pay report
E D
. W !!,$E(PRSNAME,1,19),?21,BOC,"/",?27,$E(ASN,1,19),?47,$P(PRSNA,U,14),"-",$P(PRSNA,U,39),?60,"$",$P(PRSNA,U,29)
. W !,$E(PRSNSSN,6,9),?13,$P(JOB,U,4),?21,OCC,?27,$E(ROLE,1,19),?49,YEAR,?60,$P(PRSNA,U,28)
;
I (IOSL-5)<$Y S STOP=$$ASK^PRSLIB00() I 'STOP D HDR(PRSNOPT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRSNREV1 2775 printed Dec 13, 2024@02:27:21 Page 2
PRSNREV1 ;WOIFO/DAM - Nursing Education Validation Report II;060409
+1 ;;4.0;PAID;**126**;Sep 21, 1995;Build 59
+2 ;;Per VHA Directive 2004-038, this routine should not be modified
+3 QUIT
+4 ;
DSPLY(PRSIEN,PRSNOPT,NURSE,STOP) ; Entry point to gather POC Nurse
+1 ; Education Data from file 450
+2 ;INPUT:
+3 ; PRSIEN: Nurse ien 450
+4 ; BEG,END: FileMan begin and end dates for report
+5 ;
+6 DO INFO^PRSNRAS1
+7 NEW INDEX,CNT
+8 SET (INDEX,CNT)=0
+9 DO DATA(PRSIEN,PRSNOPT,NURSE,.STOP)
+10 ;
+11 KILL PRSNAME,PRSNSSN,PRSNTL,SKILMIX,ROLE,PRSNLNG,PRSNTWD,PRSNPOC1,PRSDY
+12 KILL PPIEN,PRSL,PRSNDAY,STARTDT,STDE,BOC,OCC,ASN,EDU,YEAR
+13 QUIT
+14 ;
+15 ;
HDR(PRSNOPT) ;Display header
+1 ;
+2 WRITE @IOF
+3 SET PG=PG+1
+4 WRITE $PIECE("Nursing Education Validation Report^Nurse Position and Pay Information",U,PRSNOPT)," Report"
+5 WRITE " Run Date: ",$EXTRACT(DT,4,5),"/",$EXTRACT(DT,6,7),"/",$EXTRACT(DT,2,3)," Page: ",$JUSTIFY(PG,3)
+6 ;nurse education validation
+7 IF PRSNOPT=1
Begin DoDot:1
+8 WRITE !!,"Nurse Name",?21,"BOC/",?27,"Assignment Code",?47,"PAID Education Level"
+9 WRITE !,"Last 4 SSN",?21,"OCC",?27,"Nurse Role",?47,"Year Degree Earned"
+10 QUIT
End DoDot:1
+11 ;nurse position and pay
+12 IF '$TEST
Begin DoDot:1
+13 WRITE !!,"Nurse Name",?21,"BOC/",?27,"Assignment Code",?47,"Grade/Step",?60,"Salary"
+14 WRITE !,"Last 4 SSN",?13,"CC",?21,"OCC",?27,"Nurse Role",?47,"Yr. of Ser.",?60,"Salary Start Date"
+15 QUIT
End DoDot:1
+16 WRITE !,"--------------------------------------------------------------------------------"
+17 ;
+18 QUIT
+19 ;
DATA(PRSIEN,PRSNOPT,NURSE,STOP) ;Extract display data from POCD array and get external date
+1 ;
+2 NEW JOB,ED,A,B,PRSNA,ROLE
+3 SET (BOC,OCC,ASN,EDU,YEAR)=0
+4 ;
+5 SET ROLE=$PIECE($GET(NURSE),U,2)
+6 ;Job codes
SET JOB=$$GETCODES^PRSNUT01(PRSIEN)
+7 SET BOC=$PIECE(JOB,U)
+8 SET OCC=$PIECE(JOB,U,2)
+9 ;External value of job assignment code
SET ASN=$PIECE(JOB,U,7)
+10 ;nurse education validation
+11 IF PRSNOPT=1
Begin DoDot:1
+12 ;Education level & year degree earned
SET ED=$$GETDEG^PRSNUT01(PRSIEN)
+13 SET EDU=$PIECE(ED,U)
+14 SET YEAR=$PIECE(ED,U,2)
+15 QUIT
End DoDot:1
+16 ;nurse position and pay
+17 IF PRSNOPT=2
Begin DoDot:1
+18 SET PRSNA=^PRSPC(PRSIEN,0)
SET YEAR=$PIECE(PRSNA,U,31)
if YEAR
SET YEAR=$EXTRACT(DT,1,3)-$EXTRACT(YEAR,1,3)
+19 SET A=$PIECE(PRSNA,U,29)
SET B=$LENGTH(A)
SET $PIECE(PRSNA,U,29)=$SELECT(A<1000:A,1:$EXTRACT(A,1,B-6)_","_$EXTRACT(A,B-5,B))
+20 SET A=$PIECE(PRSNA,U,28)
SET $PIECE(PRSNA,U,28)=$EXTRACT(A,4,5)_"/"_$EXTRACT(A,6,7)_"/"_$EXTRACT(A,2,3)
+21 QUIT
End DoDot:1
+22 DO PRT(PRSNOPT)
+23 ;
+24 QUIT
+25 ;
PRT(PRSNOPT) ;
+1 ;print education vaidation report
+2 IF PRSNOPT=1
Begin DoDot:1
+3 WRITE !!,$EXTRACT(PRSNAME,1,19),?21,BOC,"/",?27,$EXTRACT(ASN,1,19),?47,$EXTRACT(EDU,1,30)
+4 WRITE !,$EXTRACT(PRSNSSN,6,9),?21,OCC,?27,$EXTRACT(ROLE,1,19),?47,YEAR
End DoDot:1
+5 ;print position and pay report
+6 IF '$TEST
Begin DoDot:1
+7 WRITE !!,$EXTRACT(PRSNAME,1,19),?21,BOC,"/",?27,$EXTRACT(ASN,1,19),?47,$PIECE(PRSNA,U,14),"-",$PIECE(PRSNA,U,39),?60,"$",$PIECE(PRSNA,U,29)
+8 WRITE !,$EXTRACT(PRSNSSN,6,9),?13,$PIECE(JOB,U,4),?21,OCC,?27,$EXTRACT(ROLE,1,19),?49,YEAR,?60,$PIECE(PRSNA,U,28)
End DoDot:1
+9 ;
+10 IF (IOSL-5)<$Y
SET STOP=$$ASK^PRSLIB00()
IF 'STOP
DO HDR(PRSNOPT)
+11 QUIT