Produced by Araxis Merge on 9/25/2018 2:13:29 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | build 3.zip\build 3\MHLTH_YS_137_Source\MUMPS\RTN | YSLXDG.RTN | Thu Sep 6 11:30:10 2018 UTC |
2 | build 3.zip\build 3\MHLTH_YS_137_Source\MUMPS\RTN | YSLXDG.RTN | Wed Sep 12 18:10:16 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 836 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | Cache for UNIX^INT^L oad Initia l Release MH VistA S ource^~For mat=Cache. S~^RAW | |
2 | %RO on 14 Mar 2017 6:10 PM | |
3 | YSLXDG^INT ^1^63910,7 4846^0 | |
4 | YSLXDG ; A LB/RBD - I CD-10 DIAG NOSIS CODE LOOK UP F OR MENTAL HEALTH ;10 May 2013 11:17 AM | |
5 | ;;5.01;ME NTAL HEALT H;**107**; Dec 30, 19 94;Build 2 3 | |
6 | ; | |
7 | ;based on ^ZZLXDG w hich is th e standard Diagnosis Search Pr otocol | |
8 | ;beginnin g routine. | |
9 | ; | |
10 | Q | |
11 | ; | |
12 | EN ; | |
13 | D INITVAR S ;set sta ndards var iables, yo u might no t need thi s if it | |
14 | ; was alr eady done in your ap plication | |
15 | N YSQUIT ; to manag e loop | |
16 | K YSRETV ;to store the select ed code in formation | |
17 | N YSPARAM ; to set your appl ication sp ecific pro mpts and m essages | |
18 | N YSCSYS ;coding sy stem "ICD9 " or ICD10 " | |
19 | N YSOUT ; to return all availa ble inform ation abou t the sele cted code | |
20 | ;settings : | |
21 | D SETPARA M(.YSPARAM ) ;edit th e SETPARAM subroutin e below to set your | |
22 | ; applica tion speci fic prompt s | |
23 | I YSDT'>0 S YSRETV= -1 Q | |
24 | ;starting main loop | |
25 | S YSQUIT= 0 F Q:YSQ UIT=1 D | |
26 | . S YSRET V=0,YSOUT= "" | |
27 | . W !! ;reprompt a few line s down | |
28 | . ;prompt for the d ate of int erest (dat e should b e availabl e for MH) | |
29 | . I YSDT' >0 S YSRET V=-1,YSQUI T=1 Q | |
30 | . ;S YSDT =$$ASKDATE (YSPARAM(" ASKDATE")) | |
31 | . ;prompt for "try again" wit h "No" as default if ^ or null entered | |
32 | . ;for th e date or if timed o ut | |
33 | . I YSDT' >0 S:$$QUE STION(2,YS PARAM("TRY ANOTHER") )'=1 YSQUI T=1 Q | |
34 | . ;determ ine coding system ba sed on the date of i nterest | |
35 | . ;If cod ing system not ICD-1 0 or great er, then Q uit (let M H code | |
36 | . ; handl e it as be fore for n ow) | |
37 | . S YSCSY S=$$ICDSYS DG(YSDT) I YSCSYS=1 S YSRETV=- 1,YSQUIT=1 Q | |
38 | . ;set de fault resp onse for y our prompt | |
39 | . S YSDFL T="" | |
40 | . ;run ei ther ICD9 or ICD10 p rompt/sear ch/select logic | |
41 | . ;ICD9 ( 1 is a poi nter to th e ICD-9 di agnosis sy stem entry in the | |
42 | . ;new fi le #80.4) | |
43 | . I YSCSY S=1 S YSRE TV=$$DIAG9 (YSDT,YSDF LT,.YSOUT, .YSPARAM) I YSRETV=- 2 S:$$QUES TION(1,YSP ARAM("TRY ANOTHER")) '=1 YSQUIT =1 Q | |
44 | . ;ICD10 (30 is a p ointer to the ICD-10 diagnosis system en try in the new file #80.4) | |
45 | . I YSCSY S=30 S YSR ETV=$$DIAG 10(YSDT,YS DFLT,.YSPA RAM) | |
46 | . I $P(YS RETV,U,2)= "LIST CHOI CE" S YSRE TV=$P(YSRE TV,U,1),YS QUIT=1 Q | |
47 | . ;displa y informat ion about the code s elected | |
48 | . I YSRET V>0 W !,"S ELECTED: " D CODEINF O(YSRETV) S YSQUIT=1 Q | |
49 | . ;if no data found | |
50 | . I YSRET V="" W !!, YSPARAM("N O DATA FOU ND") S:$$Q UESTION(1, YSPARAM("T RY ANOTHER "))'=1 YSQ UIT=1,YSRE TV=-1 Q | |
51 | . ;in ICD 10 if the user answe red NO for the quest ion "Do yo u wish to continue(Y /N)?" | |
52 | . I YSRET V=-4 S:$$Q UESTION(1, YSPARAM("T RY ANOTHER "))'=1 YSQ UIT=1 Q | |
53 | . ;no dat a or was a borted | |
54 | . I YSRET V=-2 S:$$Q UESTION(1, YSPARAM("T RY ANOTHER "))'=1 YSQ UIT=1 Q | |
55 | . ;if exi t due to ^ in the IC D Diagnosi s code pro mpt | |
56 | . I YSRET V=-3 S:$$Q UESTION(2, YSPARAM("T RY ANOTHER "))'=1 YSQ UIT=1 Q | |
57 | . ;if no data found | |
58 | . I YSRET V=-1 S:$$Q UESTION(2, YSPARAM("T RY ANOTHER "))'=1 YSQ UIT=1 Q | |
59 | . ; if co ntinue sea rch | |
60 | Q | |
61 | ; | |
62 | ;//------ --- | |
63 | ;The entr y point fo r ICD-10 d iagnosis s earch func tionality | |
64 | ;can be c alled from applicati ons direct ly | |
65 | ;input pa rameters : | |
66 | ; YSDT - date of in terest | |
67 | ; YSDFLT - default values for the searc h string ( can be a c ode by def ault) | |
68 | ; YSOUT - local arr ay to retu rn results (passed a s a refere nce) | |
69 | ; YSPARAM - paramet ers/string constants (see SETP ARAM for d etails) | |
70 | ;returns ICD-10 cod e selected by the us er: | |
71 | ; IEN fi le #80;ICD code valu e^descript ion | |
72 | ; results | |
73 | ; or -1 i f invalid data(press enter) | |
74 | ; "" if n ot found | |
75 | ; or -2 i f time out | |
76 | ; or -3 i f ^ or ^^ | |
77 | ; or -4 i n ICD10 if the user answered N O for the question " Do you wis h to conti nue(Y/N)?" | |
78 | ; | |
79 | DIAG10(YSD T,YSDFLT,Y SPARAM) ; | |
80 | N YSINP | |
81 | S YSINP=$ $SRCHSTR(Y SPARAM("SE ARCH_PROMP T"),YSPARA M("HELP ?" ),YSPARAM( "HELP ??") ,YSDFLT) | |
82 | I YSINP<0 Q +YSINP | |
83 | I $P(YSIN P,U,2)?.N Q $P(YSINP ,U,2)_U_"L IST CHOICE " | |
84 | Q $$LEXIC D10($P(YSI NP,U,2),YS DT,.YSPARA M) | |
85 | ; | |
86 | ;//------ --- | |
87 | ;The entr y point fo r ICD-9 Fi leMan type (^DIC) di agnosis se arch funct ionality | |
88 | ;can be c alled from applicati ons direct ly | |
89 | ;input pa rameters : | |
90 | ; YSDT - date of in terest | |
91 | ; YSDFLT - default values for the searc h string ( can be a c ode by def ault) | |
92 | ; YSOUT - local arr ay to retu rn results (passed as a referen ce) | |
93 | ; YSPARAM - paramet ers/string constants (see SETP ARAM for d etails) | |
94 | ;returns ICD-9 code selected by the use r: | |
95 | ; IEN fi le #80;ICD code valu e^descript ion | |
96 | ; -2 no data or wa s aborted | |
97 | ; -1 if timeout | |
98 | DIAG9(YSDT ,YSDFLT,YS OUT,YSPARA M) ; | |
99 | N YSINP,Y SRETV | |
100 | S YSINP=$ $SRCHSTR(Y SPARAM("SE ARCH_PROMP T"),YSPARA M("HELP ?" ),YSPARAM( "HELP ??") ,YSDFLT) | |
101 | I YSINP=- 1 Q -1 ;e nter | |
102 | I YSINP=- 3 Q -1 ;^ or ^^ | |
103 | I YSINP=- 2 Q -2 ;t imeout or not found | |
104 | I YSINP=- 1!(YSINP=- 3) Q -2 | |
105 | I YSINP<0 Q +YSINP | |
106 | S YSRETV= $$ICD9($P( YSINP,U,2) ,YSDT,.YSO UT) | |
107 | I YSRETV= -1 Q -2 | |
108 | Q YSRETV | |
109 | ; | |
110 | ;-------- ------ | |
111 | ;The entr y point fo r ICD-10 d iagnosis s earch func tionality | |
112 | ;can be c alled from applicati ons direct ly | |
113 | ; Support ed ICR 568 1 ($$DIAGS RCH^LEX10C S) | |
114 | ;input pa rameters : | |
115 | ; YSTXT - search st ring | |
116 | ; YSDATE - date of interest | |
117 | ; YSPAR - array wit h text mes sages and other stri ng constan ts | |
118 | ;returns ICD-10 cod e selected by the us er: | |
119 | ; IEN fi le #80;ICD code valu e^descript ion | |
120 | ; or | |
121 | ; "" if n ot found | |
122 | ; -1 if e xit : ^ or ^^ | |
123 | ; -2 if c ontinue se arching | |
124 | ; | |
125 | LEXICD10(Y STXT,YSDAT E,YSPAR) ; ICD-10 Se arch | |
126 | N YSLVTXT | |
127 | ;paramete rs check | |
128 | S YSDATE= +$G(YSDATE ) | |
129 | S YSDATE= $P(YSDATE, ".",1) | |
130 | I YSDATE' ?7N Q -1 | |
131 | S YSTXT=$ G(YSTXT) | |
132 | Q:'$L(YST XT) -1 | |
133 | N YSNUMB | |
134 | S YSNUMB= $$FREQ^LEX U(YSTXT) | |
135 | I YSNUMB> $$MAX^LEXU (30) D I $$QUESTION ("N",YSPAR AM("WISH C ONTINUE")) '=1 Q -4 | |
136 | . W ! D F ORMWRIT(YS PAR("EXCEE DS MESSAGE 1")_YSTXT_ YSPAR("EXC EEDS MESSA GE2")_YSNU MB_YSPAR(" EXCEEDS ME SSAGE3")_Y STXT_"""." ,0) | |
137 | . D FORMW RIT("",2) W ! | |
138 | ;new and set variab les | |
139 | N DIROUT, DUOUT,DTOU T,YSEXIT,Y SICDNT | |
140 | N YSRETV, YSXX,YSLEV EL | |
141 | S YSRETV= "" | |
142 | S YSEXIT= 0 | |
143 | S YSLEVEL =1,YSLVTXT (YSLEVEL)= YSTXT ;lev el 1 store s the orig inal searc h string | |
144 | ; main lo op | |
145 | F Q:YSEX IT>0 D | |
146 | .K YSICDY | |
147 | .;W !,"Le vel #: ",Y SLEVEL,", search str ing: ",YSL VTXT(YSLEV EL) | |
148 | .;get the search st ring from the curren t level an d call LEX API | |
149 | .S YSICDY =$$DIAGSRC H^LEX10CS( YSLVTXT(YS LEVEL),.YS ICDY,YSDAT E,30) | |
150 | .S:$O(YSI CDY(" "),- 1)>0 YSICD Y=+YSICDY | |
151 | .; Nothin g found | |
152 | .I +YSICD Y'>0 S YSE XIT=1 S YS XX=-1 Q | |
153 | .; displa y the list of items and ask th e user to select the item from the list | |
154 | .S YSXX=$ $SEL^YSLXD G2(.YSICDY ,8) | |
155 | .; if ^ w as entered | |
156 | .; if t his is on the top le vel then q uit | |
157 | .I YSXX=- 2,YSLEVEL' >1 S YSRET V=-1 S YSE XIT=1 Q | |
158 | .; if l ower level then go o ne level u p | |
159 | .I YSXX=- 2,YSLEVEL> 1 S:YSLEVE L>1 YSLEVE L=YSLEVEL- 1 Q | |
160 | .; If tim eout, or n ot selecte d, or ^^ t hen quit | |
161 | .I YSXX=- 1 S YSRETV =-1 S YSEX IT=1 Q | |
162 | .; if Cod e Found an d Selected by the us er save se lection in YSRETV an d quit | |
163 | .I $P(YSX X,";")'="9 9:CAT" S Y SRETV=YSXX S YSEXIT= 1 Q | |
164 | .; If Cat egory Foun d and Sele cted by th e user: | |
165 | .; go to the next inner leve l | |
166 | .; chang e level nu mber | |
167 | .S YSLEVE L=YSLEVEL+ 1 | |
168 | .; set t he new lev el with th e new sear ch string | |
169 | .; and r epeat | |
170 | .S YSLVTX T(YSLEVEL) =$P($P($G( YSXX),"^") ,";",2) | |
171 | Q YSRETV | |
172 | ;-------- -- | |
173 | ;ICD-9 lo okup (File Man lookup ) | |
174 | ;Supporte d ICR 5773 (FileMan lookup for files #80 nad #80.1 ) | |
175 | ;Supporte d ICR 5699 ($$ICDDAT A^ICDXCODE ) | |
176 | ;input pa rameters : | |
177 | ; YSSRCH - search s tring | |
178 | ; YSICDT - date of interest | |
179 | ; YSOUT - local arr ay to retu rn detaile d info (pa ssed as a reference) | |
180 | ;returns ICD-9 code selected by the use r: | |
181 | ; IEN fi le #80;ICD code valu e^descript ion | |
182 | ; or | |
183 | ; "" if n ot found | |
184 | ; -1 if e xit : ^ or ^^ | |
185 | ; -2 if c ontinue se arch | |
186 | ;the arra y YSOUT re turns deta ils if the return va lue >0, he re is an e xample: | |
187 | ; YSOUT=" 6065^814.1 4" | |
188 | ; YSOUT(0 )=814.14 | |
189 | ; YSOUT(0 ,0)=814.14 | |
190 | ; YSOUT(0 ,1)="6065^ 814.14^^FX PISIFORM- OPEN^^8^^1 ^^1^^^0^^^ ^2781001^^ 1^1" | |
191 | ; YSOUT(0 ,2)="OPEN FRACTURE O F PISIF D R N S O E O
|
|
192 | ;Note: th is API is not silent because t he ICD loo kup is not silent | |
193 | ICD9(YSSRC H,YSICDT,Y SOUT) ; | |
194 | N KEY,X,Y ,DIC,YSCDS | |
195 | ;KEY must be newed as ICD loo kup code d oesn't kil l it | |
196 | S DIC="^I CD9(",DIC( 0)="EQXZ" | |
197 | S YSCDS=" ICD9" | |
198 | ;note: yo u must use Y for the 2nd param eter of $$ ICDDATA^IC DXCODE | |
199 | S DIC("S" )="I $P($$ ICDDATA^IC DXCODE(YSC DS,Y,YSICD T),U,10)=1 " | |
200 | ; both X and Y shou ld be set to the sea rch string | |
201 | S (X,Y)=Y SSRCH | |
202 | D ^DIC | |
203 | M YSOUT=Y | |
204 | I $G(Y) Q $S(Y=-1:- 1,1:+Y_";" _$P(Y,U,2) _U_$G(Y(0, 2))) | |
205 | Q X | |
206 | ; | |
207 | ;-------- - | |
208 | ; Clean u p environm ent and qu it | |
209 | EXIT ; | |
210 | K %,DIC,D IR,DIROUT, DIRUT,DTOU T,DUOUT,X, Y | |
211 | Q | |
212 | ; | |
213 | ;-------- --- | |
214 | ; Look-up help for ICD10s. | |
215 | INPHLP ; H elp text c ontroller for ICD-10 | |
216 | I X["???" D QM3 Q | |
217 | I X["??" D QM2 Q | |
218 | I X["?" D QM1 Q | |
219 | Q | |
220 | QM ; Diagn osis help text | |
221 | QM1 ; simp le help te xt for 1 q uestion ma rk | |
222 | W !,"Ente r code or ""text"" f or more in formation. ",! | |
223 | Q | |
224 | QM2 ; enha nced help text for 2 question marks | |
225 | W !,"Ente r a ""free text"" te rm or part of a term such as " "femur fra cture"".", ! | |
226 | W !," or ",! | |
227 | W !,"Ente r a ""clas sification code"" (I CD/CPT etc ) to find the single term asso ciated" | |
228 | W !,"with the code. ",! | |
229 | W !," or" ,! | |
230 | W !,"Ente r a ""part ial code"" . Include the decima l when a s earch crit erion incl udes" | |
231 | W !,"3 ch aracters o r more for code sear ches.",! | |
232 | Q | |
233 | QM3 ; furt her explan ation of f ormat when there are multiple returns, d isplayed f or 3 quest ion marks. | |
234 | W !,"Numb er of Code Matches" | |
235 | W !,"---- ---------- --------", ! | |
236 | W !,"The ICD-10 Dia gnosis Cod e search w ill show t he user th e number o f matches" | |
237 | W !,"foun d, indicat e if addit ional char acters in ICD code e xist, and the number " | |
238 | W !,"of c odes withi n the cate gory or su bcategory that are a vailable f or selecti on." | |
239 | W !,"For example:", ! | |
240 | W !,"14 m atches fou nd",! | |
241 | W !,"M91. - Juve nile osteo chondrosis of hip an d pelvis ( 19)",! | |
242 | W !,"This indicates that 14 u nique matc hes or mat ching grou ps have be en found a nd" | |
243 | W !,"will be displa yed.",! | |
244 | W !,"M91. - the " "-"" indic ates that there are additional character s that spe cify" | |
245 | W !," uniqu e ICD-10 c odes avail able.",! | |
246 | W !,"(19) Indic ates that there are 19 additio nal ICD-10 codes in the M91" | |
247 | W !," ""fam ily"" that are possi ble select ions.",! | |
248 | Q | |
249 | ; | |
250 | MIN2 ; Min imum lengt h of 2 cha racters me ssage | |
251 | W $C(7)," ??",! | |
252 | W !,"Plea se enter a t least th e first tw o characte rs of the ICD-10 cod e or " | |
253 | W !,"code descripti on to star t the sear ch.",! | |
254 | Q | |
255 | ; | |
256 | INPHLP2 ; Look-up he lp for ICD 9s | |
257 | W !," Ent er a ""fre e text"" t erm. Best results oc cur using one to " | |
258 | W !," thr ee full or partial w ords witho ut a suffi x" | |
259 | W:$G(X)'[ "??" "." | |
260 | W:$G(X)[" ??" " (i.e ., ""DIABE TES""," | |
261 | W:$G(X)[" ??" !," "" DIAB MELL" ",""DIAB M ELL INSUL" ")" | |
262 | W !," or " | |
263 | W !," Ent er a class ification code (ICD/ CPT etc) t o find the single " | |
264 | W !," ter m associat ed with th e code." | |
265 | W:$G(X)[" ??" " Exam ple, a loo kup of cod e 239.0 " | |
266 | W:$G(X)[" ??" !," re turns one and only o ne term, t hat is the preferred " | |
267 | W:$G(X)[" ??" !," te rm for the code 239. 0, ""Neopl asm of uns pecified n ature " | |
268 | W:$G(X)[" ??" !," of digestive system""" | |
269 | W !," or " | |
270 | W !," Ent er a class ification code (ICD/ CPT etc) f ollowed by a plus" | |
271 | W !," sig n (+) to r etrieve al l terms as sociated w ith the co de." | |
272 | W:$G(X)[" ??" " Exam ple," | |
273 | W:$G(X)[" ??" !," a lookup of 239.0+ ret urns all t erms that are linked to the " | |
274 | W:$G(X)[" ??" !," co de 239.0." | |
275 | Q | |
276 | ;-------- | |
277 | ;prompt t he user fo r a date o f interest | |
278 | ;input pa rameters : | |
279 | ; YSPRMT - prompt | |
280 | ;returns YYYMMDD | |
281 | ; or -1 i f invalid date | |
282 | ; or -2 i f time out | |
283 | ; or -3 i f ^ | |
284 | ASKDATE(YS PRMT) ; | |
285 | N %DT,DIR OUT,DUOUT, DTOUT | |
286 | S %DT="AE X",%DT("A" )=$G(YSPRM T,"Enter a date: ") | |
287 | D ^%DT | |
288 | Q:Y<0 -1 | |
289 | Q:$D(DTOU T) -2 | |
290 | Q:X="^" - 3 | |
291 | Q (+Y) | |
292 | ;-------- | |
293 | ;ask YES/ NO questio ns | |
294 | ;input pa rameters : | |
295 | ; YSDFLT- 0/null- n ot default , 1- yes, 2 -no | |
296 | ; YSPROM - prompt s tring | |
297 | ;returns | |
298 | ; 2 - no, | |
299 | ; 1 -yes, | |
300 | ; 0 - no answer | |
301 | QUESTION(Y SDFLT,YSPR OM) ; | |
302 | W:$L($G(Y SPROM)) !, YSPROM | |
303 | S %=$G(YS DFLT,2) | |
304 | D YN^DICN | |
305 | Q:%Y["^" -3 | |
306 | I %=2!(%= 1) Q % | |
307 | Q -2 | |
308 | ; | |
309 | ;-------- ---- | |
310 | ;get sear ch string | |
311 | ;input pa rameters : | |
312 | ; YSPRMT prompt tex t | |
313 | ; YSHLP1 "?" help t ext | |
314 | ; YSHLP2 "??" help text | |
315 | ; YSDFLT- default r esponse | |
316 | ;returns piece1 ^ p iece 2 | |
317 | ; piece1: | |
318 | ; 0 if no rmal input | |
319 | ; or -1 i f invalid data | |
320 | ; or -2 i f time out | |
321 | ; or -3 i f ^ | |
322 | ; piece2: string en tered by t he user | |
323 | SRCHSTR(YS PRMT,YSHLP 1,YSHLP2,Y SDFLT) ; | |
324 | SRCHST2 N DIR | |
325 | S DIR("A" )=YSPRMT | |
326 | S DIR("?" )=YSHLP1 | |
327 | S DIR("?? ")=YSHLP2 | |
328 | I $L($G(Y SDFLT)) S DIR("B")=Y SDFLT | |
329 | S DIR(0)= "FAO^0:245 " | |
330 | D ^DIR | |
331 | Q:$D(DTOU T) -2 | |
332 | Q:$D(DUOU T) -3 | |
333 | Q:Y["^" - 3 | |
334 | I $L(Y)=1 D MIN2 G SRCHST2 | |
335 | Q:Y="" -1 | |
336 | Q 0_U_Y | |
337 | ; | |
338 | ;-------- -- | |
339 | ;Determin es and ret urns ACTIV E coding s ystem for DIAGNOSES based on d ate of int erest | |
340 | ;input pa rameters : | |
341 | ; YSICDD - date of interest | |
342 | ; if date of intere st is null , today's date will be assumed | |
343 | ;returns coding sys tem | |
344 | ; as a po inter to t he ICD COD ING SYSTEM file #80. 4 (supppor ted ICR 57 80) | |
345 | ; 30 if ICD-10-CM is active system | |
346 | ; 1 if ICD-9-CM i s active s ystem | |
347 | ICDSYSDG(Y SICDD) ; | |
348 | N YSIMPDT | |
349 | S YSICDD= $S(YSICDD< 0!($L($P(Y SICDD,".", 1))'=7):DT ,1:+$G(YSI CDD)) | |
350 | S YSIMPDT =$$IMPDATE ^LEXU("10D ") | |
351 | Q $S(YSIC DD'<YSIMPD T:30,1:1) | |
352 | ; | |
353 | ;set para meters | |
354 | ;edit the se hardcod ed strings that areu sed for pr ompts, mes sages and so on to a djust | |
355 | ;them to your appli caion's ne eds | |
356 | ;input pa rameters | |
357 | ; YSPAR - local arr ay to sets and store string co nstants fo r your mes sages and prompts | |
358 | SETPARAM(Y SPAR) ; | |
359 | S YSPAR(" ASKDATE")= "Date of i nterest? " | |
360 | S YSPAR(" SEARCH_PRO MPT")="Ent er ICD-10 DIAGNOSIS: " ; ass ume ICD-10 | |
361 | S YSPAR(" HELP ?")=" ^D INPHLP^ YSLXDG" | |
362 | S YSPAR(" HELP ??")= "^D INPHLP ^YSLXDG" | |
363 | S YSPAR(" NO DATA FO UND")=" N o data fou nd" | |
364 | S YSPAR(" EXITING")= " Exiting " | |
365 | S YSPAR(" TRY LATER" )=" Try a gain later " | |
366 | S YSPAR(" NO DATA SE LECTED")=" No data selected" | |
367 | S YSPAR(" TRY ANOTHE R")="Try a nother" | |
368 | S YSPAR(" WISH CONTI NUE")="Do you wish t o continue (Y/N)" | |
369 | S YSPAR(" EXCEEDS ME SSAGE1")=" Searching for """ | |
370 | S YSPAR(" EXCEEDS ME SSAGE2")=" "" require s inspecti ng " | |
371 | S YSPAR(" EXCEEDS ME SSAGE3")=" records t o determin e if they match the search cri teria. Th is could t ake quite some time. Suggest refining t he search by further specifyin g """ | |
372 | Q | |
373 | ; | |
374 | ; | |
375 | ;a wrappe r for ^DIW P | |
376 | ;accumula tes a text and then writes it to the dev ice | |
377 | ;input pa rameters : | |
378 | ; X - tex t | |
379 | ; YSMODE: | |
380 | ; 0 - st art | |
381 | ; 1 - ac cumulate | |
382 | ; 2 - wr ite | |
383 | ;example: | |
384 | ;D FORMWR IT^ZZLXDG( "this API is a wrapp er for ^DI WP, it acc umulates a text and then write s it to th e device, you can us e it in yo ur applica tion code" ,0) | |
385 | ;D FORMWR IT^ZZLXDG( "some more text ",1) | |
386 | ;D FORMWR IT^ZZLXDG( "",2) | |
387 | FORMWRIT(X ,YSMODE) ; | |
388 | N YSLI1 | |
389 | ;if "star t" mode | |
390 | I YSMODE= 0 K ^UTILI TY($J,"W") | |
391 | S DIWL=1, DIWR=79 | |
392 | I $L(X)>0 D ^DIWP | |
393 | ;if "writ e" mode | |
394 | I YSMODE= 2 D | |
395 | . S YSLI1 =0 F S YS LI1=$O(^UT ILITY($J," W",1,YSLI1 )) Q:+YSLI 1=0 W !,$ G(^UTILITY ($J,"W",1, YSLI1,0)) | |
396 | . K ^UTIL ITY($J,"W" ) | |
397 | Q | |
398 | ; | |
399 | ;-------- ------- | |
400 | ;Initiali ze variabl es if you need , you r applicat ion most l ikely alre ady has th is | |
401 | INITVARS ; | |
402 | D HOME^%Z IS | |
403 | S:$G(DT)= 0 DT=$$DT^ XLFDT | |
404 | Q | |
405 | ;press an y key | |
406 | PRESSKEY ; | |
407 | R !!,"Pre ss any key to contin ue.",YSKEY :DTIME | |
408 | Q | |
409 | ;display code info | |
410 | CODEINFO(Y SXX2) ; Wr ite Output | |
411 | N YSKEY,Y SICDSTR | |
412 | S YSICDST R="ICD"_$S (YSCSYS="3 0":"10",1: "9") | |
413 | N YSTXT,Y SI S YSTXT (1)=$P($P( YSXX2,";", 2),U,2) | |
414 | D PR^YSLX DG2(.YSTXT ,48) | |
415 | W !," ",Y SICDSTR," Diagnosis code:",?31 ,$P($P(YSX X2,";",2), U,1) | |
416 | W !," ",Y SICDSTR," Diagnosis descriptio n:",?31,YS TXT(1) | |
417 | S YSI=1 F S YSI=$O (YSTXT(YSI )) Q:+YSI' >0 W !,?3 1,$G(YSTXT (YSI)) | |
418 | Q | |
419 | ; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.