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

SD53P567.m

Go to the documentation of this file.
SD53P567 ;ALB/RLC - POST-INIT TO CLEAN UP SPECIAL AVAIL FLAG FIELD; 7/27/07
 ;;5.3;SCHEDULING;**567**;21-MAR-94;Build 7
 ;
 ; THIS POST-INIT ROUTINE WILL READ THROUGH THE HOSPITAL LOCATION FILE
 ; #44 AND FOR EVERY CLINIC SET UP WITH A SPECIAL PATTERN IT WILL
 ; UPDATE THE SPECIAL AVAILABILITY FLAG TO THE APPROPRIATE DATE VERSUS
 ; THE RECORD INTERNAL ENTRY NUMBER AS THE DATA DICTIONARY INDICATES
 ; THIS IS SUPPOSE TO BE A DATE FIELD.
 ;
 Q  ; must call at entry point
 ;
EN ; entry point
 S SCIEN=0
 F  S SCIEN=$O(^SC(SCIEN)) Q:'SCIEN  D
 .S SCDATE=3091000  ;start file read from start of FY2009, Oct 1, 2010
 .F  S SCDATE=$O(^SC(SCIEN,"ST",SCDATE)) Q:'SCDATE  D
 ..I $D(^SC(SCIEN,"ST",SCDATE,9)) I '$D(^(0)) D DELETE
 ..Q:'$D(^SC(SCIEN,"ST",SCDATE,9))
 ..S DA=SCDATE,DA(1)=SCIEN
 ..S DIE="^SC("_DA(1)_",""ST"","
 ..S DR="3///^S X=SCDATE" D ^DIE
 ..K DA,DR,DIE
 K SCIEN,SCDATE,X,DA,DR,DIE,X1,X2
 Q
 ;
DELETE ; kill bad record
 S DA=SCDATE,DA(1)=SCIEN
 S DIK="^SC("_DA(1)_",""ST"","
 D ^DIK
 K DA,DIK
 Q
 ;