source: WorldVistAEHR/trunk/r/TEXT_INTEGRATION_UTILITIES-GMRP-TIU/TIUO38.m@ 1259

Last change on this file since 1259 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1TIUO38 ; SLC/JM - TIU Object Export Routine ; 4/30/99
2 ;;1.0;TEXT INTEGRATION UTILITIES;**38**;Jun 20, 1997
3 Q
4INSTALL N FILENUM,TAG,ROUTINE,TEXTLINE,FLDNUMS,XPDIDTOT,DIERR,DISYS,%1
5 K ^DD(8925.1,0,"ID",.04) ;Added to fix Beta Site prob, per DBIA #2813
6 S FILENUM=8925.1
7 S U="^",ROUTINE=""
8 S XPDIDTOT=6
9 F TAG=1:1:6 D
10 .N FLD,IDX,IEN,RECORD,DATA,FIELD,TIUFPRIV,ADDCMD
11 .S IDX=0,TIUFPRIV=1
12 .F D Q:RECORD=""
13 ..S IDX=IDX+1
14 ..S TEXTLINE="EN"_TAG_"+"_IDX_U_"TIUO38"
15 ..I $L($T(@(TEXTLINE_ROUTINE)))'>0 D
16 ...I ROUTINE="" S ROUTINE="A"
17 ...E S ROUTINE=$C($A(ROUTINE)+1)
18 ..S RECORD=$P($T(@("EN"_TAG_"+"_IDX_U_"TIUO38"_ROUTINE)),";;",2)
19 ..I RECORD'="" D
20 ...S FIELD=$P(RECORD,U,1)
21 ...S DATA=$P(RECORD,U,2,99)
22 ...I IDX=1 D
23 ....S IEN=$$FIND1^DIC(FILENUM,"","X",DATA,"B","I $P(^(0),U,4)=""O""")
24 ....I +IEN'>0 D I 1
25 .....N ADDCMD,IENLIST
26 .....D ADD("+1")
27 .....D UPDATE^DIE("",$NA(ADDCMD),$NA(IENLIST))
28 .....S IEN=IENLIST(1)
29 ....E D
30 .....N DELCMD
31 .....K ^TMP("TIUOBJINS",$J)
32 .....D GETS^DIQ(FILENUM,IEN,"*","N",$NA(^TMP("TIUOBJINS",$J)))
33 .....S FLD=0
34 .....F S FLD=$O(^TMP("TIUOBJINS",$J,FILENUM,IEN_",",FLD)) Q:'FLD D
35 ......I FLD'=.01 D
36 .......S DELCMD(FILENUM,IEN_",",FLD)="@"
37 .....D FILE^DIE("",$NA(DELCMD))
38 .....K ^TMP("TIUOBJINS",$J)
39 ...D ADD(IEN)
40 .D FILE^DIE("E",$NA(ADDCMD))
41 .D UPDATE^XPDID(TAG)
42 K ^TMP("DIERR",$J)
43 Q
44ADD(IEN) ;
45 I '$D(FLDNUMS(FIELD)) D
46 .S FLDNUMS(FIELD)=$$FLDNUM^DILFD(FILENUM,FIELD)
47 S ADDCMD(FILENUM,IEN_",",FLDNUMS(FIELD))=DATA
48 Q
49EN1 ;TIU Object:ACTIVE MEDICATIONS
50 ;;NAME^ACTIVE MEDICATIONS
51 ;;ABBREVIATION^AMED
52 ;;PRINT NAME^ACTIVE MEDICATIONS
53 ;;TYPE^OBJECT
54 ;;CLASS OWNER^CLINICAL COORDINATOR
55 ;;STATUS^ACTIVE
56 ;;NATIONAL STANDARD^NO
57 ;;OK TO DISTRIBUTE^YES
58 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)",1)
59 ;;TIMESTAMP^57652,49986
60EN2 ;TIU Object:RECENT MEDICATIONS
61 ;;NAME^RECENT MEDICATIONS
62 ;;ABBREVIATION^RMED
63 ;;PRINT NAME^RECENT MEDICATIONS
64 ;;TYPE^OBJECT
65 ;;CLASS OWNER^CLINICAL COORDINATOR
66 ;;STATUS^ACTIVE
67 ;;NATIONAL STANDARD^NO
68 ;;OK TO DISTRIBUTE^YES
69 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)")
70 ;;TIMESTAMP^57652,49384
71EN3 ;TIU Object:DETAILED ACTIVE MEDS
72 ;;NAME^DETAILED ACTIVE MEDS
73 ;;ABBREVIATION^DAMD
74 ;;PRINT NAME^DETAILED ACTIVE MEDS
75 ;;TYPE^OBJECT
76 ;;CLASS OWNER^CLINICAL COORDINATOR
77 ;;STATUS^ACTIVE
78 ;;NATIONAL STANDARD^NO
79 ;;OK TO DISTRIBUTE^YES
80 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)",1,1)
81 ;;TIMESTAMP^57740,41359
82EN4 ;TIU Object:DETAILED RECENT MEDS
83 ;;NAME^DETAILED RECENT MEDS
84 ;;ABBREVIATION^DRMD
85 ;;PRINT NAME^DETAILED RECENT MEDS
86 ;;TYPE^OBJECT
87 ;;CLASS OWNER^CLINICAL COORDINATOR
88 ;;STATUS^ACTIVE
89 ;;NATIONAL STANDARD^NO
90 ;;OK TO DISTRIBUTE^YES
91 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)",0,1)
92 ;;TIMESTAMP^57740,41600
93EN5 ;TIU Object:ACTIVE MEDS COMBINED
94 ;;NAME^ACTIVE MEDS COMBINED
95 ;;ABBREVIATION^AMDC
96 ;;PRINT NAME^ACTIVE MEDS COMBINED
97 ;;TYPE^OBJECT
98 ;;CLASS OWNER^CLINICAL COORDINATOR
99 ;;STATUS^ACTIVE
100 ;;NATIONAL STANDARD^NO
101 ;;OK TO DISTRIBUTE^YES
102 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)",1,0,0,1)
103 ;;TIMESTAMP^57772,59892
104EN6 ;TIU Object:RECENT MEDS COMBINED
105 ;;NAME^RECENT MEDS COMBINED
106 ;;ABBREVIATION^RMDC
107 ;;PRINT NAME^RECENT MEDS COMBINED
108 ;;TYPE^OBJECT
109 ;;CLASS OWNER^CLINICAL COORDINATOR
110 ;;STATUS^ACTIVE
111 ;;NATIONAL STANDARD^NO
112 ;;OK TO DISTRIBUTE^YES
113 ;;OBJECT METHOD^S X=$$LIST^TIULMED(DFN,"^TMP(""TIUMED"",$J)",0,0,0,1)
114 ;;TIMESTAMP^57779,42006
Note: See TracBrowser for help on using the repository browser.