PSGDSPN ;BIR/CML3-PRINT DISCHARGE ORDERS NEW PAGE ; 01 Oct 98 / 10:20 AM
;;5.0; INPATIENT MEDICATIONS ;**20**;16 DEC 97
;
NP ;
I 'CML K DIR S DIR(0)="E" W ! D ^DIR S NP=$S($D(DTOUT):"^",1:$E(X)) K DTOUT,DUOUT,DIRUT,DIROUT Q:NP="^"
I CML W:'NC !!!?44,"PATIENT CONTINUED ON NEXT PAGE..." F Q=$Y:1:IOSL-5 W !
S PG=PG+1 W:CML !?2,PPN,?40,PSSN,?78-$L(PDOB),PDOB I HDR<22 D ENHDR1^PSGDSP0 Q
W:$Y @IOF W !?+HDR,"AUTHORIZED ABSENCE/DISCHARGE ",$P(HDR,"^",2),?73-$L(PG),"Page: "_PG,!?+PSGVAMC,$P(PSGVAMC,U,2),!?1,"VA FORM: 10-7978M",!?1,PPN,?40,PSSN,?60,PDOB
W:DRG]"" !,LINE,!,?56,"Schedule",?72,"Cost per",!," No.",?10,"Medication",?56,"Type",?72,"Dose" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGDSPN 664 printed Oct 16, 2024@18:01:56 Page 2
PSGDSPN ;BIR/CML3-PRINT DISCHARGE ORDERS NEW PAGE ; 01 Oct 98 / 10:20 AM
+1 ;;5.0; INPATIENT MEDICATIONS ;**20**;16 DEC 97
+2 ;
NP ;
+1 IF 'CML
KILL DIR
SET DIR(0)="E"
WRITE !
DO ^DIR
SET NP=$SELECT($DATA(DTOUT):"^",1:$EXTRACT(X))
KILL DTOUT,DUOUT,DIRUT,DIROUT
if NP="^"
QUIT
+2 IF CML
if 'NC
WRITE !!!?44,"PATIENT CONTINUED ON NEXT PAGE..."
FOR Q=$Y:1:IOSL-5
WRITE !
+3 SET PG=PG+1
if CML
WRITE !?2,PPN,?40,PSSN,?78-$LENGTH(PDOB),PDOB
IF HDR<22
DO ENHDR1^PSGDSP0
QUIT
+4 if $Y
WRITE @IOF
WRITE !?+HDR,"AUTHORIZED ABSENCE/DISCHARGE ",$PIECE(HDR,"^",2),?73-$LENGTH(PG),"Page: "_PG,!?+PSGVAMC,$PIECE(PSGVAMC,U,2),!?1,"VA FORM: 10-7978M",!?1,PPN,?40,PSSN,?60,PDOB
+5 if DRG]""
WRITE !,LINE,!,?56,"Schedule",?72,"Cost per",!," No.",?10,"Medication",?56,"Type",?72,"Dose"
QUIT