| 1 | TIU169D ; SLC/MAM - Data, etc for Option for TIU*1*169 ; 10/4/2004 | 
|---|
| 2 | ;;1.0;Text Integration Utilities;**169**;Jun 20, 1997 | 
|---|
| 3 | ; | 
|---|
| 4 | ADDITEM(NUM,TIUDA,PIEN)  ; Add DDEF TIUDA to Parent; Return Item IEN | 
|---|
| 5 | N MENUTXT,TIUFPRIV,TIUFISCR | 
|---|
| 6 | N DIE,DR | 
|---|
| 7 | S TIUFPRIV=1 | 
|---|
| 8 | N DA,DIC,DLAYGO,X,Y | 
|---|
| 9 | N I,DIY | 
|---|
| 10 | S DA(1)=PIEN | 
|---|
| 11 | S DIC="^TIU(8925.1,"_DA(1)_",10,",DIC(0)="LX" | 
|---|
| 12 | S DLAYGO=8925.14 | 
|---|
| 13 | ; -- If TIUDA is say, x, and Parent has x as IFN in Item subfile, | 
|---|
| 14 | ;    code finds item x under parent instead of creating a new item, | 
|---|
| 15 | ;    so don't use "`"_TIUDA: | 
|---|
| 16 | S X=^TMP("TIU169",$J,"BASICS",NUM,"NAME") | 
|---|
| 17 | ; -- Make sure the DDEF it adds is TIUDA and not another w same name: | 
|---|
| 18 | S TIUFISCR=TIUDA ; activates item screen on fld 10, Subfld .01 in DD | 
|---|
| 19 | D ^DIC I Y'>0!($P(Y,U,3)'=1) S ^TMP("TIU169ERR",$J,NUM)="ADDITEM" | 
|---|
| 20 | Q Y | 
|---|
| 21 | ; | 
|---|
| 22 | FILEITEM(NUM,PIEN,ITEMDA) ; File Menu Text for DDEF item ITEMDA | 
|---|
| 23 | ;under parent | 
|---|
| 24 | N TIUFPRIV,MENUTXT,ITEMFDA | 
|---|
| 25 | K TIUIERR | 
|---|
| 26 | S TIUFPRIV=1,MENUTXT=$G(^TMP("TIU169",$J,"DATA",NUM,"MENUTXT")) | 
|---|
| 27 | S ITEMFDA(8925.14,ITEMDA_","_PIEN_",",4)=MENUTXT | 
|---|
| 28 | D FILE^DIE("TE","ITEMFDA","TIUIERR") | 
|---|
| 29 | I $D(TIUIERR) S ^TMP("TIU169ERR",$J,NUM)="FILEITEM" | 
|---|
| 30 | Q | 
|---|
| 31 | ; | 
|---|
| 32 | DELETE(TIUDA,PIEN,ITEMDA) ; Delete DDEF TIUDA; If parent PIEN and | 
|---|
| 33 | ;Item IEN ITEMDA sent, first delete item from parent | 
|---|
| 34 | N DA,DIK,X,Y,I | 
|---|
| 35 | I $G(PIEN),$G(ITEMDA) D | 
|---|
| 36 | . S DA(1)=PIEN,DA=ITEMDA,DIK="^TIU(8925.1,DA(1),10," D ^DIK | 
|---|
| 37 | N DA,DIK | 
|---|
| 38 | S DA=TIUDA,DIK="^TIU(8925.1," D ^DIK | 
|---|
| 39 | Q | 
|---|
| 40 | ; | 
|---|
| 41 | PRINT ; Print out results from message array ^TMP("TIU169MSG",$J | 
|---|
| 42 | N TIUCNT,TIUCONT | 
|---|
| 43 | I $D(ZTQUEUED) S ZTREQ="@" ; Tell TaskMan to delete Task log entry | 
|---|
| 44 | I $E(IOST)="C-" W @IOF,! | 
|---|
| 45 | S TIUCNT="",TIUCONT=1 | 
|---|
| 46 | F  S TIUCNT=$O(^TMP("TIU169MSG",$J,TIUCNT)) Q:TIUCNT=""  D  Q:'TIUCONT | 
|---|
| 47 | . S TIUCONT=$$SETCONT Q:'TIUCONT | 
|---|
| 48 | . W ^TMP("TIU169MSG",$J,TIUCNT),! | 
|---|
| 49 | PRINTX Q | 
|---|
| 50 | ; | 
|---|
| 51 | STOP() ;on screen paging check | 
|---|
| 52 | ; quits TIUCONT=1 if cont. ELSE quits TIUCONT=0 | 
|---|
| 53 | N DIR,Y,TIUCONT | 
|---|
| 54 | S DIR(0)="E" D ^DIR | 
|---|
| 55 | S TIUCONT=Y | 
|---|
| 56 | I TIUCONT W @IOF,! | 
|---|
| 57 | Q TIUCONT | 
|---|
| 58 | ; | 
|---|
| 59 | SETCONT() ; D form feed, Set TIUCONT | 
|---|
| 60 | N TIUCONT | 
|---|
| 61 | S TIUCONT=1 | 
|---|
| 62 | I $E(IOST)="C-" G SETX:$Y+5<IOSL | 
|---|
| 63 | I $E(IOST)="C-" S TIUCONT=$$STOP G SETX | 
|---|
| 64 | G:$Y+8<IOSL SETX | 
|---|
| 65 | W @IOF | 
|---|
| 66 | SETX Q TIUCONT | 
|---|
| 67 | ; | 
|---|
| 68 | SETDATA ; Set more data for DDEFS | 
|---|
| 69 | ; Basic data set in TIUEN169.  See rtn TIUEN169 for numbered list of | 
|---|
| 70 | ;DDEF Names and Types. | 
|---|
| 71 | ; -- Set Print Name, Owner, Status, National, Exterior Type into | 
|---|
| 72 | ;    FILEDATA node of data array ^TMP("TIU169": | 
|---|
| 73 | ; -- First, set Docmt Class (#1): | 
|---|
| 74 | N NUM S NUM=1 D | 
|---|
| 75 | . 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. | 
|---|
| 76 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.06)="CLINICAL COORDINATOR" | 
|---|
| 77 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.07)="ACTIVE" | 
|---|
| 78 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.13)="YES" | 
|---|
| 79 | . S ^TMP("TIU169",$J,"FILEDATA",1,.04)="DOCUMENT CLASS" | 
|---|
| 80 | ; -- Set Titles: | 
|---|
| 81 | N NUM F NUM=2:1:58 D | 
|---|
| 82 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.03)=$G(^TMP("TIU169",$J,"BASICS",NUM,"NAME")) | 
|---|
| 83 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.06)="CLINICAL COORDINATOR" | 
|---|
| 84 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.07)="INACTIVE" | 
|---|
| 85 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.13)="NO" | 
|---|
| 86 | . S ^TMP("TIU169",$J,"FILEDATA",NUM,.04)="TITLE" | 
|---|
| 87 | ; -- Set Parent and Menu Text into DATA nodes of ^TMP("TIU169": | 
|---|
| 88 | ; -- Set PIEN node = IEN of parent if known, or if not, | 
|---|
| 89 | ;    set PNUM node = DDEF# of parent | 
|---|
| 90 | ;    Parent must exist by the time this DDEF is created. | 
|---|
| 91 | ; -- Parent of DC is CL Progress Notes: | 
|---|
| 92 | S ^TMP("TIU169",$J,"DATA",1,"PIEN")=3 ;PN IEN is 3 | 
|---|
| 93 | ; -- Parent of Titles is DC: | 
|---|
| 94 | N NUM F NUM=2:1:58 S ^TMP("TIU169",$J,"DATA",NUM,"PNUM")=1 ; DC DDEF # | 
|---|
| 95 | ; -- Menutext: | 
|---|
| 96 | F NUM=1:1:58 S ^TMP("TIU169",$J,"DATA",NUM,"MENUTXT")=$P($T(MENUTXT+NUM),";;",2,99) | 
|---|
| 97 | Q | 
|---|
| 98 | ; | 
|---|
| 99 | MENUTXT ; Use $T to get menutext from this list. Cut off at 20 chars. | 
|---|
| 100 | ;;C&P Exam Reports | 
|---|
| 101 | ;;Examination | 
|---|
| 102 | ;;Multiple Exam | 
|---|
| 103 | ;;Acromegaly | 
|---|
| 104 | ;;A&A or Housebound | 
|---|
| 105 | ;;Arrhythmias | 
|---|
| 106 | ;;Arteries, Veins, Mis | 
|---|
| 107 | ;;Audio | 
|---|
| 108 | ;;Bones | 
|---|
| 109 | ;;Brain and Spinal Cor | 
|---|
| 110 | ;;Chronic Fatigue Synd | 
|---|
| 111 | ;;Cold Injury Protocol | 
|---|
| 112 | ;;Cranial Nerves | 
|---|
| 113 | ;;Cushing's Syndrome | 
|---|
| 114 | ;;Dental and Oral | 
|---|
| 115 | ;;Diabetes Mellitus | 
|---|
| 116 | ;;Digestive Conditions | 
|---|
| 117 | ;;Ear Disease | 
|---|
| 118 | ;;Eating Disorders | 
|---|
| 119 | ;;Endocrine Diseases | 
|---|
| 120 | ;;Epilepsy and Narcole | 
|---|
| 121 | ;;Esophagus & Hiatal H | 
|---|
| 122 | ;;Eye Examination | 
|---|
| 123 | ;;Feet | 
|---|
| 124 | ;;Fibromyalgia | 
|---|
| 125 | ;;General Medical | 
|---|
| 126 | ;;Genitourinary Exam | 
|---|
| 127 | ;;Gulf War | 
|---|
| 128 | ;;Gynecological Condit | 
|---|
| 129 | ;;Hand, Thumb, & Finge | 
|---|
| 130 | ;;Heart | 
|---|
| 131 | ;;Hemic Disorders | 
|---|
| 132 | ;;HIV-Related Illness | 
|---|
| 133 | ;;Hypertension | 
|---|
| 134 | ;;Infectious, Immune, | 
|---|
| 135 | ;;Intestines | 
|---|
| 136 | ;;Joints | 
|---|
| 137 | ;;Liver, Gall Bladder, | 
|---|
| 138 | ;;Lymphatic Disorders | 
|---|
| 139 | ;;Mental Disorders | 
|---|
| 140 | ;;Mouth, Lips, and Ton | 
|---|
| 141 | ;;Muscles | 
|---|
| 142 | ;;Neurological Disorde | 
|---|
| 143 | ;;Nose, Sinus, Larynx, | 
|---|
| 144 | ;;Peripheral Nerves | 
|---|
| 145 | ;;POW Protocol | 
|---|
| 146 | ;;PTSD, Initial | 
|---|
| 147 | ;;PTSD, Review | 
|---|
| 148 | ;;Pulmonary Tuberculos | 
|---|
| 149 | ;;Rectum and Anus | 
|---|
| 150 | ;;Residuals of Amputat | 
|---|
| 151 | ;;Respiratory | 
|---|
| 152 | ;;Scars | 
|---|
| 153 | ;;Sense of Smell and T | 
|---|
| 154 | ;;Skin Diseases | 
|---|
| 155 | ;;Spine | 
|---|
| 156 | ;;Stomach, Duodenum, P | 
|---|
| 157 | ;;Thyroid and Parathyr | 
|---|
| 158 | Q | 
|---|
| 159 | ; | 
|---|