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

ACMRL1.m

Go to the documentation of this file.
ACMRL1 ; IHS/TUCSON/TMJ - PROCESS LISTER ; [ 06/01/1999  1:48 PM ]
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;**1**;JAN 10, 1996
 ;IHS/CMI/LAB - patch 1 tmp to xtmp
 ;
 ;
 ;
START ;
 S (ACMBT,ACMBTH)=$H,ACMJOB=$J,ACMRCNT=0
 S ^XTMP("ACMRL",0)=$$FMADD^XLFDT(DT,14)_U_DT_U_"CASE MANAGEMENT GENERAL RETRIEVAL"
 D P
 Q
 ;
P ;
 S DFN=0 F  S DFN=$O(^ACM(41,"AC",DFN)) Q:DFN'=+DFN  I $D(^ACM(41,"AC",DFN,ACMRG)),'$P(^DPT(DFN,0),U,19) S ACMIFN=^ACM(41,"AC",DFN,ACMRG) D PROC
 Q
 ;
 ;
END ;
 S ACMET=$H
 D EOJ
 Q
EOJ ;
 Q
PROC ;
 D SCREENS
 Q:$D(ACMSKIP)
 K ACMSRT,ACMPRNT S ACMCRIT=ACMSORT,ACMX=0
 X:$D(^ACM(58.1,ACMSORT,4)) ^ACM(58.1,ACMSORT,4) I $G(ACMPRNT)="" S ACMPRNT="--"
 S ACMSRT=ACMPRNT
 S ^XTMP("ACMRL",ACMJOB,ACMBTH,"DATA HITS",ACMSRT,DFN)="",ACMRCNT=ACMRCNT+1
 Q:$D(^XTMP("ACMRL",ACMJOB,ACMBTH,"PATIENTS",DFN))!($D(ACMSCNT))
 S ^XTMP("ACMRL",ACMJOB,ACMBTH,"PATIENTS",DFN)="",ACMPTCT=ACMPTCT+1
 Q
SCREENS ;
 K ACMSKIP
 S ACMI=0 F  S ACMI=$O(^ACM(58.8,ACMRPT,11,ACMI)) Q:ACMI'=+ACMI!($D(ACMSKIP))  D
 .I '$P(^ACM(58.1,ACMI,0),U,8) D SINGLE Q
 .D MULT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