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

TIULG.m

Go to the documentation of this file.
  1. TIULG ; SLC/JER - More Library functions ;5/27/03
  1. ;;1.0;TEXT INTEGRATION UTILITIES;**1,89,137**;Jun 20, 1997
  1. ;
  1. TYPSHORT(INTTYPE) ; Return "TL" for Interior Type "DOC",
  1. ;Return int type for others
  1. N TIUY
  1. S TIUY=$S(INTTYPE="DOC":"TL",1:INTTYPE)
  1. Q TIUY
  1. TYPEXT(INTTYPE) ; Given interior type DOC, DC, or CL of Docmt Def,
  1. ;return exterior type
  1. N TIUY
  1. S TIUY=$S(INTTYPE="DOC":"TITLE",INTTYPE="DC":"DOCUMENT CLASS",INTTYPE="CL":"CLASS",1:"Document Definition")
  1. Q TIUY
  1. ;
  1. BADSIG(TIUX,NOAUTH) ; Sig failed
  1. N TIUTNAME
  1. I TIUX=0 D
  1. . W !!,"Use 'Edit Electronic Signature Code' option"
  1. . W !,"on Secondary Menu under User's Toolbox." H 4
  1. I +$G(NOAUTH) W !!,$C(7),$C(7),"Only authorized PROVIDERS may sign. Contact IRM for PROVIDER Key allocation."
  1. S TIUTNAME=$S(+$G(TIUTYP):$$PNAME^TIULC1(TIUTYP),$G(TIUTYP)]"":TIUTYP,1:"DOCUMENT")
  1. W !!,$C(7),"< ",$$UPPER^TIULS($G(TIUTNAME))
  1. W " SAVED - WITHOUT SIGNATURE >",!
  1. S TIUX=$$READ^TIUU("FOA","Press RETURN to continue...")
  1. Q
  1. PRNTMTHD(TIUTYP,TIUDA) ; Get print method/enforce inheritance
  1. N TIUDAD,TIUY S TIUDAD=0
  1. I +$G(TIUDA),+$$ISADDNDM^TIULC1(TIUDA) S TIUTYP=$$PRNTYP(TIUDA)
  1. S TIUY=$G(^TIU(8925.1,+TIUTYP,6))
  1. I TIUY']"" S TIUDAD=$O(^TIU(8925.1,"AD",+TIUTYP,0))
  1. I +TIUDAD S TIUY=$$PRNTMTHD(TIUDAD)
  1. Q TIUY
  1. PRNTGRP(TIUTYP,TIUDA) ; Get print group/enforce inheritance
  1. N TIUDAD,TIUY S TIUDAD=0
  1. I +$G(TIUDA),+$$ISADDNDM^TIULC1(TIUDA) S TIUTYP=$$PRNTYP(TIUDA)
  1. S TIUY=$P($G(^TIU(8925.1,+TIUTYP,6.1)),U,3)
  1. I TIUY']"" S TIUDAD=$O(^TIU(8925.1,"AD",+TIUTYP,0))
  1. I +TIUDAD S TIUY=$$PRNTGRP(TIUDAD)
  1. Q TIUY
  1. PRNTHDR(TIUTYP,TIUDA) ; Get print form header/enforce inheritance
  1. N TIUDAD,TIUY S TIUDAD=0
  1. I +$G(TIUDA),+$$ISADDNDM^TIULC1(TIUDA) S TIUTYP=$$PRNTYP(TIUDA)
  1. S TIUY=$P($G(^TIU(8925.1,+TIUTYP,6.1)),U)
  1. I TIUY']"" S TIUDAD=$O(^TIU(8925.1,"AD",+TIUTYP,0))
  1. I +TIUDAD S TIUY=$$PRNTHDR(TIUDAD)
  1. Q TIUY
  1. PRNTNBR(TIUTYP,TIUDA) ; Get print form number/enforce inheritance
  1. N TIUDAD,TIUY S TIUDAD=0
  1. I +$G(TIUDA),+$$ISADDNDM^TIULC1(TIUDA) S TIUTYP=$$PRNTYP(TIUDA)
  1. S TIUY=$P($G(^TIU(8925.1,+TIUTYP,6.1)),U,2)
  1. I TIUY']"" S TIUDAD=$O(^TIU(8925.1,"AD",+TIUTYP,0))
  1. I +TIUDAD S TIUY=$$PRNTNBR(TIUDAD)
  1. Q TIUY
  1. PRNTYP(TIUDA) ; Get the type of an addendum's parent document
  1. N TIUDADA
  1. S TIUDADA=+$P($G(^TIU(8925,+TIUDA,0)),U,6)
  1. Q +$G(^TIU(8925,+TIUDADA,0))
  1. XTRASGNR(TIUY,TIUDA) ; Get List of Extra Expected Signers
  1. N TIUI S TIUI=0
  1. F S TIUI=$O(^TIU(8925.7,"B",TIUDA,TIUI)) Q:+TIUI'>0 D
  1. . N TIUDUZ,TIUREQ
  1. . S TIUDUZ=+$P(^TIU(8925.7,+TIUI,0),U,3),TIUREQ=$P(^(0),U,2)
  1. . Q:+TIUDUZ'>0!(+$P($G(^TIU(8925.7,+TIUI,0)),U,4)>0)
  1. . S TIUY(TIUDUZ)=TIUREQ_U_$$SIGNAME^TIULS(TIUDUZ)_U_$$SIGTITL^TIULS(TIUDUZ)
  1. Q
  1. ;
  1. ACTIVATE(TIUARRAY,SUCCESS) ; Activate DDEFs
  1. ; Activates IENs in received array TIUARRAY(IEN)=whatever
  1. ; Sets SUCCESS(IEN) = 1 if IEN activated successfully
  1. ; = 0^whynot if not
  1. ; Sets SUCCESS = 1 if all activated successfully
  1. ; = 0 if not
  1. ; Called when exporting new DDEFS and Business Rules, after we
  1. ;know that rules were created successfully.
  1. ; Skips safeguards present when using DDEF utility to
  1. ;activate DDEFs
  1. N IEN,TIUFPRIV
  1. S IEN=0,TIUFPRIV=1
  1. S SUCCESS=1
  1. F S IEN=$O(TIUARRAY(IEN)) Q:'IEN D
  1. . N FDA,TIUERR
  1. . S FDA(8925.1,IEN_",",.07)="ACTIVE"
  1. . D FILE^DIE("KE","FDA","TIUERR")
  1. . I '$D(TIUERR) S SUCCESS(IEN)=1 Q
  1. . S SUCCESS(IEN)="0^"_$G(TIUERR("DIERR",1,"TEXT",1))
  1. . S SUCCESS=0
  1. Q