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

TIU169D.m

Go to the documentation of this file.
  1. TIU169D ; SLC/MAM - Data, etc for Option for TIU*1*169 ; 10/4/2004
  1. ;;1.0;Text Integration Utilities;**169**;Jun 20, 1997
  1. ;
  1. ADDITEM(NUM,TIUDA,PIEN) ; Add DDEF TIUDA to Parent; Return Item IEN
  1. N MENUTXT,TIUFPRIV,TIUFISCR
  1. N DIE,DR
  1. S TIUFPRIV=1
  1. N DA,DIC,DLAYGO,X,Y
  1. N I,DIY
  1. S DA(1)=PIEN
  1. S DIC="^TIU(8925.1,"_DA(1)_",10,",DIC(0)="LX"
  1. S DLAYGO=8925.14
  1. ; -- If TIUDA is say, x, and Parent has x as IFN in Item subfile,
  1. ; code finds item x under parent instead of creating a new item,
  1. ; so don't use "`"_TIUDA:
  1. S X=^TMP("TIU169",$J,"BASICS",NUM,"NAME")
  1. ; -- Make sure the DDEF it adds is TIUDA and not another w same name:
  1. S TIUFISCR=TIUDA ; activates item screen on fld 10, Subfld .01 in DD
  1. D ^DIC I Y'>0!($P(Y,U,3)'=1) S ^TMP("TIU169ERR",$J,NUM)="ADDITEM"
  1. Q Y
  1. ;
  1. FILEITEM(NUM,PIEN,ITEMDA) ; File Menu Text for DDEF item ITEMDA
  1. ;under parent
  1. N TIUFPRIV,MENUTXT,ITEMFDA
  1. K TIUIERR
  1. S TIUFPRIV=1,MENUTXT=$G(^TMP("TIU169",$J,"DATA",NUM,"MENUTXT"))
  1. S ITEMFDA(8925.14,ITEMDA_","_PIEN_",",4)=MENUTXT
  1. D FILE^DIE("TE","ITEMFDA","TIUIERR")
  1. I $D(TIUIERR) S ^TMP("TIU169ERR",$J,NUM)="FILEITEM"
  1. Q
  1. ;
  1. DELETE(TIUDA,PIEN,ITEMDA) ; Delete DDEF TIUDA; If parent PIEN and
  1. ;Item IEN ITEMDA sent, first delete item from parent
  1. N DA,DIK,X,Y,I
  1. I $G(PIEN),$G(ITEMDA) D
  1. . S DA(1)=PIEN,DA=ITEMDA,DIK="^TIU(8925.1,DA(1),10," D ^DIK
  1. N DA,DIK
  1. S DA=TIUDA,DIK="^TIU(8925.1," D ^DIK
  1. Q
  1. ;
  1. PRINT ; Print out results from message array ^TMP("TIU169MSG",$J
  1. N TIUCNT,TIUCONT
  1. I $D(ZTQUEUED) S ZTREQ="@" ; Tell TaskMan to delete Task log entry
  1. I $E(IOST)="C-" W @IOF,!
  1. S TIUCNT="",TIUCONT=1
  1. F S TIUCNT=$O(^TMP("TIU169MSG",$J,TIUCNT)) Q:TIUCNT="" D Q:'TIUCONT
  1. . S TIUCONT=$$SETCONT Q:'TIUCONT
  1. . W ^TMP("TIU169MSG",$J,TIUCNT),!
  1. PRINTX Q
  1. ;
  1. STOP() ;on screen paging check
  1. ; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0
  1. N DIR,Y,TIUCONT
  1. S DIR(0)="E" D ^DIR
  1. S TIUCONT=Y
  1. I TIUCONT W @IOF,!
  1. Q TIUCONT
  1. ;
  1. SETCONT() ; D form feed, Set TIUCONT
  1. N TIUCONT
  1. S TIUCONT=1
  1. I $E(IOST)="C-" G SETX:$Y+5<IOSL
  1. I $E(IOST)="C-" S TIUCONT=$$STOP G SETX
  1. G:$Y+8<IOSL SETX
  1. W @IOF
  1. SETX Q TIUCONT
  1. ;
  1. SETDATA ; Set more data for DDEFS
  1. ; Basic data set in TIUEN169. See rtn TIUEN169 for numbered list of
  1. ;DDEF Names and Types.
  1. ; -- Set Print Name, Owner, Status, National, Exterior Type into
  1. ; FILEDATA node of data array ^TMP("TIU169":
  1. ; -- First, set Docmt Class (#1):
  1. N NUM S NUM=1 D
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.03)=$G(^TMP("TIU169",$J,"BASICS",NUM,"NAME")) ;Name node MUST exist. Using $G to ease testing of fewer DDEFS.
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.06)="CLINICAL COORDINATOR"
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.07)="ACTIVE"
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.13)="YES"
  1. . S ^TMP("TIU169",$J,"FILEDATA",1,.04)="DOCUMENT CLASS"
  1. ; -- Set Titles:
  1. N NUM F NUM=2:1:58 D
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.03)=$G(^TMP("TIU169",$J,"BASICS",NUM,"NAME"))
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.06)="CLINICAL COORDINATOR"
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.07)="INACTIVE"
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.13)="NO"
  1. . S ^TMP("TIU169",$J,"FILEDATA",NUM,.04)="TITLE"
  1. ; -- Set Parent and Menu Text into DATA nodes of ^TMP("TIU169":
  1. ; -- Set PIEN node = IEN of parent if known, or if not,
  1. ; set PNUM node = DDEF# of parent
  1. ; Parent must exist by the time this DDEF is created.
  1. ; -- Parent of DC is CL Progress Notes:
  1. S ^TMP("TIU169",$J,"DATA",1,"PIEN")=3 ;PN IEN is 3
  1. ; -- Parent of Titles is DC:
  1. N NUM F NUM=2:1:58 S ^TMP("TIU169",$J,"DATA",NUM,"PNUM")=1 ; DC DDEF #
  1. ; -- Menutext:
  1. F NUM=1:1:58 S ^TMP("TIU169",$J,"DATA",NUM,"MENUTXT")=$P($T(MENUTXT+NUM),";;",2,99)
  1. Q
  1. ;
  1. ;;C&P Exam Reports
  1. ;;Examination
  1. ;;Multiple Exam
  1. ;;Acromegaly
  1. ;;A&A or Housebound
  1. ;;Arrhythmias
  1. ;;Arteries, Veins, Mis
  1. ;;Audio
  1. ;;Bones
  1. ;;Brain and Spinal Cor
  1. ;;Chronic Fatigue Synd
  1. ;;Cold Injury Protocol
  1. ;;Cranial Nerves
  1. ;;Cushing's Syndrome
  1. ;;Dental and Oral
  1. ;;Diabetes Mellitus
  1. ;;Digestive Conditions
  1. ;;Ear Disease
  1. ;;Eating Disorders
  1. ;;Endocrine Diseases
  1. ;;Epilepsy and Narcole
  1. ;;Esophagus & Hiatal H
  1. ;;Eye Examination
  1. ;;Feet
  1. ;;Fibromyalgia
  1. ;;General Medical
  1. ;;Genitourinary Exam
  1. ;;Gulf War
  1. ;;Gynecological Condit
  1. ;;Hand, Thumb, & Finge
  1. ;;Heart
  1. ;;Hemic Disorders
  1. ;;HIV-Related Illness
  1. ;;Hypertension
  1. ;;Infectious, Immune,
  1. ;;Intestines
  1. ;;Joints
  1. ;;Liver, Gall Bladder,
  1. ;;Lymphatic Disorders
  1. ;;Mental Disorders
  1. ;;Mouth, Lips, and Ton
  1. ;;Muscles
  1. ;;Neurological Disorde
  1. ;;Nose, Sinus, Larynx,
  1. ;;Peripheral Nerves
  1. ;;POW Protocol
  1. ;;PTSD, Initial
  1. ;;PTSD, Review
  1. ;;Pulmonary Tuberculos
  1. ;;Rectum and Anus
  1. ;;Residuals of Amputat
  1. ;;Respiratory
  1. ;;Scars
  1. ;;Sense of Smell and T
  1. ;;Skin Diseases
  1. ;;Spine
  1. ;;Stomach, Duodenum, P
  1. ;;Thyroid and Parathyr
  1. Q
  1. ;