source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGMMAR4.m@ 619

Last change on this file since 619 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1PSGMMAR4 ;BIR/CML3-MD MARS - PRINT O/P ORDERS ;05 Oct 98 / 10:25 AM
2 ;;5.0; INPATIENT MEDICATIONS ;**8,12,20,111**;16 DEC 97
3 ;
4PSGMARB ;***Print blank MAR for PRN orders.
5 NEW L1 S L1=" | |"
6 D HEADER F X=1:1:(BL/2) D
7 . F Q=1:1:6 W:Q=1 !,L1,?55,"|",?75,"| ",L1 W:Q'=1 !,?55,"|",?75,"| "
8 . W !,LN1
9 D BOT
10 K ^TMP($J,"1PRN")
11 Q
12 ;
13EN ;***Start print prn orders.
14 NEW LABX,L1,P1,P2 S (PG,LAB)=0,L1=" | |"
15 S:'$D(PSGMPG) PSGMPG=0 S PSGMPGN="PAGE: "
16 F S PG=$O(^TMP($J,"1PRN",PG)) Q:'PG D
17 . D HEADER
18 . F LAB=0:0 S LABX=LAB,LAB=$O(^TMP($J,"1PRN",PG,LAB)) Q:'LAB F LN=0:0 S LN=$O(^TMP($J,"1PRN",PG,LAB,LN)) Q:'LN D
19 .. S P1=$P(^TMP($J,"1PRN",PG,LAB,LN),U,1),P2=$P(^(LN),U,2)
20 .. S:LN=1 P1=$S(P1]"":P1,1:L1),P2=$S(P2]"":P2,1:L1)
21 .. W !,P1,?55,"|",?75,"| ",P2
22 .. W:'(LN#6) !,LN1
23 . F LABX=LABX+1:1:(BL/2) D
24 . .F X=1:1:6 S:X=1 (P1,P2)=L1 W !,P1,?55,"|",?75,"| ",P2 S (P1,P2)=""
25 . .W !,LN1
26 . S:'$O(^TMP($J,"1PRN",PG)) PSGMPGN="LAST PAGE: " D BOT
27 Q
28 ;
29HEADER ;*** Patient info
30 S:'$G(PSGXDT) PSGXDT=PSGDT
31 W:$G(PSGPG) @IOF S PSGPG=1 W ?1,"ONE-TIME/PRN SHEET",?61,PSGMARDF_" DAY MAR",?100,PSGMARSP_" through "_PSGMARFP
32 W !?5,$P($$SITE^PSGMMAR2(80),U,2),?102,"Printed on ",$$ENDTC2^PSGMI(PSGXDT)
33 W !?5,"Name: "_PPN,?62,"Weight (kg): "_WT,?103,"Loc: "_$S(PWDN'["C!":PWDN,1:$P($G(^SC($P(PWDN,"!",2),0)),"^"))
34 W !?6,"PID: "_PSSN,?25,"DOB: "_BD_" ("_PAGE_")",?62,"Height (cm): "_HT,?99,"Room-Bed: "_$S(PWDN'["C!":PRB,1:"")
35 W !?6,"Sex: "_PSEX,?25," Dx: "_DX,?$S(TD:94,1:99),$S(TD:"Last Transfer: "_TD,1:"Admitted: "_$S(PWDN'["C!":AD,1:""))
36 I '$D(PSGALG) W !,"Allergies: See attached list of Allergies/Adverse Reactions"
37 NEW PSGX S PSGX=0 D ATS^PSGMAR3(.PSGX) D:PSGX HEADER Q:PSGX
38 I $G(PSJDIET)]"" W !?57,"Diet: ",PSJDIET
39 E W !
40 ;* W !!?1,"Order",?9,"Start",?21,"Stop",?77,"Order",?85,"Start",?97,"Stop",!,LN1
41 W !?1,"Order",?9,"Start",?21,"Stop",?77,"Order",?85,"Start",?97,"Stop",!,LN1
42 Q
43 ;
44BOT ; rest of PRN sheet
45 W !,"| DATE | TIME | MEDICATION/DOSE/ROUTE | INIT | REASON | RESULTS | TIME | INIT |"
46 S X=$S(BL=4:26,1:20) F Q=1:1:X W !,LN31
47 ;W "| | | | | | | | |"
48ENB ;
49 I $D(PSGMPG) S PSGMPG=PSGMPG+1 S PSGMPGN=$S(PSGMPGN'["LAST":"PAGE: ",1:PSGMPGN)_PSGMPG
50 W !,LN1
51 W !,"|",?13,"SIGNATURE/TITLE",?40,"| INIT | INJECTION SITES |",?97,"SIGNATURE/TITLE",?124,"| INIT |"
52 F Q=1:1:10 W !,"|"_$E(LN1,1,39)_"|------|"_BLN(Q),?84,"|"_$E(LN1,1,39)_"|------|"
53 W !,LN1,!?3,PPN,?45,PSSN,?58,"Room-Bed: "_$S(PWDN'["C!":PRB,1:""),?100,$S($D(PSGMPG):PSGMPGN,1:""),?116,"VA FORM 10-5568d",*13
54 S PSGMAROC=0,(PSGMAPA(1),PSGMAPB(1),PSGMAPC(1),PSGMAPD(1))=" | |" F Q=2:1:6 S (PSGMAPA(Q),PSGMAPB(Q),PSGMAPC(Q),PSGMAPD(Q))=""
55 Q
Note: See TracBrowser for help on using the repository browser.