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

AQAQDUE.m

Go to the documentation of this file.
AQAQDUE ;IHS/ANMC/LJF - UTILITIES TO GET COMPUTER FIELDS; [ 05/27/92  11:24 AM ]
 ;;2.2;STAFF CREDENTIALS;;01 OCT 1992
 ;
LASTREAP ;***> SUBRTN to find last reappointment application date
 S (AQAQX,AQAQLAST,AQAQRE)=0
 F  S AQAQX=$O(^AQAQC(D0,"R","B",AQAQX)) Q:AQAQX=""  D
 .I '$O(^AQAQC(D0,"R","B",AQAQX)) S AQAQRE=AQAQX
 .Q:AQAQRE=0
 .S AQAQY=$O(^(AQAQX,0)),AQAQLAST=$P(^AQAQC(D0,"R",AQAQY,0),U,2)
 I AQAQRE=0 S AQAQLAST=$P(^AQAQC(D0,0),U,4)
 Q
 ;
 K ^UTILITY("DIQ1",$J)
 NEW DIC,DR,DA
 S AQAQLAST=999999 Q:'$O(^AQAQC(D0,"R",0))
 S DIC=9002165,DR=4,DA=D0 D EN^DIQ1
 S:$D(^UTILITY("DIQ1",$J,9002165,DA,4)) AQAQLAST=^(4)
 K ^UTILITY("DIQ1",$J)
 Q
 ;
 ;
LASTMLIC ;***> SUBRTN to find all medical license expiration date
 S (AQAQX,AQAQLAST,AQAQEX,AQAQF)=0
 F  S AQAQX=$O(^AQAQML(D0,1,"B",AQAQX)) Q:AQAQX=""  D
 .I '$O(^AQAQML(D0,1,"B",AQAQX)) S AQAQEX=AQAQX
 .Q:AQAQEX=0
 .S AQAQY=$O(^(AQAQX,0)),AQAQLAST=$P(^AQAQML(D0,1,AQAQY,0),U)
 I AQAQEX=0 S AQAQLAST=$P(^AQAQML(D0,0),U,4)  ;only one date
 Q