source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJ0095.m@ 1800

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

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1PSJ0095 ;BIR/JCH-Populate Pre-Exchange Report Device in Ward Parameteres ;22 JAN 03 / 4:29 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**95**;16 DEC 97
3 ;
4ENNV ;
5 I $G(DUZ)="" W !,"Your DUZ is not defined. It must be defined to run this routine." Q
6 K ZTSAVE,ZTSK S ZTRTN="EN^PSJ0095",ZTDESC="Inpatient Ward Parameter Pre-Exchange Report Device (INPATIENT MEDS)",ZTIO="" D ^%ZTLOAD
7 W !!,"The population of Inpatient Ward Parameter PRE-EXCHANGE REPORT DEVICE is",$S($D(ZTSK):"",1:" NOT")," queued",!
8 I $D(ZTSK) D
9 . W " (to start NOW).",!!,"YOU WILL RECEIVE A MAILMAN MESSAGE WHEN TASK #"_ZTSK_" HAS COMPLETED."
10 Q
11EN ;
12 N WARD,PXDEV,CC S (WARD,CC)=0
13 F S WARD=$O(^PS(59.6,WARD)) Q:'WARD S PXDEV=$P($G(^(WARD,0)),"^",29) D
14 . I PXDEV Q:$D(^%ZIS(1,PXDEV))
15 . S DA=WARD,DIE="^PS(59.6,",DR="4////HOME" D ^DIE S CC=CC+1
16 D SENDMSG
17 Q
18 ;
19DONE ;
20 K ZTDESC,ZTDTH,ZTIO,ZTREQ,ZTRTN,ZTSAVE,ZTSK S ZTREQ="@"
21 Q
22SENDMSG ;Send mail message when auto-population is complete.
23 K PSG,XMY S XMDUZ="MEDICATIONS,INPATIENT",XMSUB="PSJ*5*95 POPULATION OF INPATIENT WARD PARAMETER PRE-EXCHANGE REPORT DEVICE "
24 S XMTEXT="PSG(",XMY(DUZ)="" D NOW^%DTC S Y=% X ^DD("DD")
25 S PSG(1,0)="The population of the Inpatient Ward parameter 'PRE-EXCHANGE REPORT DEVICE'",PSG(2,0)="completed as of "_Y_"."
26 S PSG(3,0)="",PSG(4,0)=CC_" Inpatient Wards were updated with this parameter defaulted to 'HOME'."
27 S PSG(5,0)="This will continue to print the report to the user's screen until it is changed"
28 S PSG(6,0)="to another device, or deleted to disable the report for that ward."
29 D ^XMD
30 Q
Note: See TracBrowser for help on using the repository browser.