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

DGGECSA.m

Go to the documentation of this file.
  1. DGGECSA ;ALB/RMO - Auto Generate Code Sheets for MAS AMIS(s) ; 13 AUG 90 8:52 am
  1. ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
  1. ;==============================================================
  1. ;Entry Points:
  1. ; ASK -Prompt user to generate AMIS code sheets
  1. ; QUE -Queue generation of AMIS code sheet to default printer
  1. ;==============================================================
  1. ASK ;Prompt user to generate AMIS code sheets
  1. ; Input -- None Required
  1. ; Output -- %=1 user entered 'YES'
  1. ; %=2 user entered 'NO'
  1. ; %<0 user timeout or entered an '^'
  1. S %=0,DGCODPRT=$S($D(^DG(43,1,0)):$P(^(0),"^",25),1:"") G Q:DGCODPRT=""
  1. W !!,"Do you wish to generate code sheets if segments are balanced" S %=2 D YN^DICN G Q:%<0 I '% W !!?3,"Enter 'YES' to generate code sheets, or 'NO' not to." G ASK
  1. I %=1 W !!?3,"NOTE: AMIS Code Sheets will be queued to print on ",DGCODPRT,"."
  1. Q K DGCODPRT Q
  1. ;
  1. QUE ;Queue generation of AMIS code sheet to default MAS code sheet printer
  1. ; Input -- DGSEG Segment Number ie, 334
  1. ; DGDIV Medical Ctr Div File (#40.8) IFN ie, 1
  1. ; DGMYR Month/Year in internal date format ie, 2900200
  1. ; Output -- Task is Queued to Generate a Code Sheet
  1. S ZTRTN="START^DGGECSA",ZTDTH=$H,ZTSAVE("DGTTF")=DGSEG,ZTSAVE("DGDIV")=DGDIV,ZTSAVE("DGMYR")=DGMYR
  1. S ZTDESC="GENERATE AMIS CODE SHEET"
  1. S ZTIO=$S($D(^DG(43,1,0)):$P(^(0),"^",25),1:"") D ^%ZTLOAD:ZTIO'=""
  1. K ZTSK,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTDESC
  1. Q
  1. ;
  1. START ;Auto generation of AMIS code sheet
  1. U IO Q:'$D(DGTTF)!('$D(DGDIV))!('$D(DGMYR))
  1. S SDABORT=0,DGSTR="",DGSTA=$S('$D(^DG(40.8,+DGDIV,0)):0,$P(^(0),"^",2)'="":$P(^(0),"^",2),$D(^DIC(4,+$P(^(0),"^",7),99)):$P(^(99),"^",1),1:0)
  1. I DGTTF'>399 D BLD^DGGECS,GEN^DGGECS:'SDABORT
  1. I DGTTF>399 F I=401:1:420 S DGAMS(I)=""
  1. I DGTTF>399 D START^DGGECS
  1. K DGSTA,DGSTR,DGTTF,SDABORT,I,DGAMS
  1. Q