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

ACMRL.m

Go to the documentation of this file.
ACMRL ; IHS/TUCSON/TMJ - CMS GENERAL RETRIEVAL DRIVER ; [ 02/10/2009  9:48 AM ]
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;**8**;JAN 10, 1996
START ; PEP - GENERAL RETRIEVAL
 K ACMQUIT ;--- this variable controls whether or not a user terminated input
TYPE ;--- get register
 S (ACMPCNT,ACMPTCT)=0 ;ACMPTCT -- pt total for # of "V"isits
R ;lookup register
 I '$G(ACMRG) W !!,"OOPS, REGISTER NOT SELECTED!!" S ACMQUIT=1 G XIT
 D ADD I $D(ACMQUIT) D DEL K ACMQUIT G XIT
 I '$D(ACMCAND) D P1 Q
 D TITLE I $D(ACMQUIT) K ACMQUIT G TYPE
 D ZIS
 Q
P1 ;if patient, no prev defined report used
P11 K ^ACM(58.8,ACMRPT,11) D SCREEN I $D(ACMQUIT) K ACMQUIT D DEL G TYPE
P12 K ^ACM(58.8,ACMRPT,12) S ACMTCW=0 D COUNT I $D(ACMQUIT) K ACMQUIT G P11
P13 D TITLE I $D(ACMQUIT) K ACMQUIT G P12
 D SAVE,ZIS
 Q
SCREEN ;
 D SCREEN^ACMRL3
 Q
COUNT ;count only or detailed report
 D COUNT^ACMRL3
 Q
TITLE ;
 D TITLE^ACMRL3
 Q
SAVE ;
 D SAVE^ACMRL3
 Q
ZIS ;call to XBDBQUE
 I 'ACMTCW S ACMTCW=IOM
 S ACMDONE=""
 D SHOW^ACMRLS,SHOWP^ACMRLS,SHOWR^ACMRLS
 D XIT1
 S XBRP="^ACMRLP",XBRC="^ACMRL1",XBRX="XIT^ACMRL",XBNS="ACM"
 D ^XBDBQUE
 D XIT
 Q
DEL ;EP DELETE LOG ENTRY IF ONE EXISTS AND USER "^" OUT
 I $G(ACMRPT),$D(^ACM(58.8,ACMRPT,0)),'$P(^ACM(58.8,ACMRPT,0),U,2) S DIK="^ACM(58.8,",DA=ACMRPT D ^DIK K DIK,DA,DIC
 Q
ADD ;
 D ADD^ACMRL01
 Q
XIT ;
 D XIT^ACMRL1
XIT1 ;
 D XIT1^ACMRL1
 Q
DONE ;ENTRY POINT - END OF REPORT TIME DISPLAY
 I $D(ACMET) S ACMTS=(86400*($P(ACMET,",")-$P(ACMBT,",")))+($P(ACMET,",",2)-$P(ACMBT,",",2)),ACMH=$P(ACMTS/3600,".") S:ACMH="" ACMH=0 D
 .S ACMTS=ACMTS-(ACMH*3600),ACMM=$P(ACMTS/60,".") S:ACMM="" ACMM=0 S ACMTS=ACMTS-(ACMM*60),ACMS=ACMTS W !!,"RUN TIME (H.M.S): ",ACMH,".",ACMM,".",ACMS
 I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of report.  HIT RETURN" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
 W:$D(IOF) @IOF
 K ACMTS,ACMS,ACMH,ACMM,ACMET
 Q