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

AMQQRMH.m

Go to the documentation of this file.
AMQQRMH ; IHS/CMI/THL - HEALTH SUMMARY GENERATOR ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;-----
HSUM ; - EP - FROM ^AMQQCMPL
 W !
 S DIC="^APCHSCTL("
 S DIC(0)="AEQ"
 S DIC("A")="HEALTH SUMMARY TYPE: "
 S DIC("B")="ADULT REGULAR"
 D ^DIC
 K DIC
 I Y=-1 S AMQQQUIT="",AMQQOPT("SPEC")="" Q
 S APCHSTYP=+Y
 D DEV
 I $D(AMQQQUIT) Q
 S AMQQRMFL="OUTPUT^AMQQRMH"
 I $D(IO("Q")) D HSUMTASK D ^%ZISC W @IOF Q
 U IO D HSUMRUN D ^%ZISC
EXIT K %,I
 Q
 ;
DEV W !!!
 S %ZIS="Q"
 D ^%ZIS
 I POP K DUOUT,DTOUT,POP S AMQQQUIT=""
 D PRINT^AMQQSEC E  W "  <= Not a secure device!!",*7 G DEV
 I $D(IO("Q")),IO=IO(0) W !!,"You can not queue a job to a slave printer..Try again",!!,*7 G DEV
 Q
 ;
HSUMRUN W @IOF
 X AMQV(0)
 I IOST["P-" W @IOF
 I $D(ZTQUEUED) D EXIT2^AMQQKILL S ZTREQ="@"
 K AMQQRMFL,APCHSTYP,APCHSPAT
 Q
 ;
HSUMTASK S ZTRTN="HSUMRUN^AMQQRMH"
 S ZTIO=ION
 S ZTDTH="NOW"
 F I=1:1 S %=$P("AMQQRMFL;APCHSTYP;AMQV(;AMQQ200(;AMQQRV;AMQQNV;AMQQXV;^UTILITY(""AMQQ"",$J,;^UTILITY(""AMQQ RAND"",$J,;^UTILITY(""AMQQ TAX"",$J,",";",I) Q:%=""  S ZTSAVE(%)=""
 S ZTDESC="Q-MAN HEALTH SUMMARY GENERATOR"
 D ^%ZTLOAD
 D ^%ZISC
 W !!,$S($D(ZTSK):"Request queued!",1:"Request cancelled!"),!!!
 H 3
 Q
 ;
OUTPUT ; ENTRY POINT
 I $D(AMQP(0)),$D(APCHSTYP) S X="",APCHSPAT=AMQP(0) D EN^APCHS
 I $G(X)=U S AMQQQUIT="" F %=AMQQOV,.1,1,2,3,5,10 S AMQP(%)=99999999999
 Q
 ;