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

SDC4.m

Go to the documentation of this file.
  1. SDC4 ;ALB/MJK - Check Range for CO'ed Appts; 28 JUN 1993
  1. ;;5.3;Scheduling;**1002,1015**;Aug 13, 1993;Build 21
  1. ;
  1. COED(SDCL,SDBEG,SDEND,SDMSG) ; -- scan appts for those co'ed
  1. N SDDA,SDATE,SD0,SDC,SDESC
  1. S SDESC=0,SDATE=SDBEG-.0000001
  1. F S SDATE=$O(^SC(SDCL,"S",SDATE)) Q:'SDATE!(SDATE>SDEND) D
  1. .S SDDA=0 F S SDDA=$O(^SC(SDCL,"S",SDATE,1,SDDA)) Q:'SDDA S SD0=^(SDDA,0),SDC=$G(^("C")) D
  1. ..I $P(SD0,U,9)="C" Q
  1. ..;IHS/ITSC/WAR 1/27/2005 PATCH #1002 Can't Cancel CL w/a CKD-IN Pt
  1. ..; Added next line and code to line tag MES (see below)
  1. ..I $P(SDC,U,1),'$P(SDC,U,3) S SDESC=-1 ;CK-IN, BUT NOT CKD-OUT YET
  1. ..I $P(SDC,U,3) S SDESC=1
  1. I SDESC,SDMSG D MES
  1. Q SDESC
  1. ;
  1. MES ; -- write warning to user
  1. ;IHS/ITSC/WAR 1/27/2005 PATCH #1002 Added If/Else and addt'l msg
  1. ; Original code only had 6 lines of code which follow:
  1. ;W *7
  1. ;W !?5,"At least one appointment has been checked out in the time"
  1. ;W !?5,"period selected."
  1. ;W !!?5,"As a result, to avoid the loss of workload credit, you are"
  1. ;W !?5,"not allowed to cancel availability for this time period."
  1. ;W !
  1. I SDESC=-1 D
  1. .N X S X="IOBON;IOBOFF"
  1. .D ENDR^%ZISS
  1. .W *7
  1. .W !!?5,"It appears that there is a patient checked in, but not yet"
  1. .W !?5,"checked out for the "
  1. .W $S(SDEND[".2359":"DAY ",1:"TIME RANGE ")
  1. .W "you have selected."
  1. .W IOBON
  1. .W !!?5," Action must be taken to CK-OUT the patient"
  1. .W !?5," before this process can be completed."
  1. .W IOBOFF
  1. .;D KILL^%ZISS ;Removes only variables defined with ENDR^%ZISS
  1. E D
  1. .W *7
  1. .W !?5,"At least one appointment has been checked out in the time"
  1. .W !?5,"period selected."
  1. .W !!?5,"As a result, to avoid the loss of workload credit, you are"
  1. .W !?5,"not allowed to cancel availability for this time period."
  1. W !
  1. ;IHS/ITSC/WAR 1/27/2005 PATCH #1002 End of changes.
  1. Q