source: EWD/archive/C0CE002.m@ 1368

Last change on this file since 1368 was 1265, checked in by George Lilly, 13 years ago

old version of EWD fileman file and sample applications

File size: 3.1 KB
Line 
1 ;GT.M version of page ccr (patientportal application)
2 ;Compiled on Mon, 01 Mar 2010 17:10:44
3 ;using Enterprise Web Developer (Build 790)
4 QUIT
5 ;
6run ;
7 n confirmText,ebToken,Error,formInfo,ok,sessid,sessionArray,tokens
8 s ok=$$pre()
9 i ok d body
10 QUIT
11 ;
12pre() ;
13 ;
14 n ctype,ewdAction,headers,jump,quitStatus,pageTitle,stop,urlNo
15 ;
16 s confirmText="Click OK if you're sure you want to delete this record"
17 s sessionArray("ewd_isFirstPage")="0"
18 s sessionArray("ewd_sessid_timeout")="1200"
19 s sessionArray("ewd_prePageScript")="TEST2^C0CRICH"
20 s sessionArray("ewd_default_timeout")="1200"
21 s sessionArray("ewd_persistRequest")="true"
22 s sessionArray("ewd_pageTitle")=""
23 s sessionArray("ewd_errorPage")="ewdError"
24 s sessionArray("ewd_templatePrePageScript")=""
25 s sessionArray("ewd_onErrorScript")=""
26 s sessionArray("ewd_appName")="patientportal"
27 s sessionArray("ewd_pageName")="ccr"
28 s sessionArray("ewd_translationMode")="0"
29 s sessionArray("ewd_technology")="gtm"
30 s sessionArray("ewd_pageType")=""
31 s Error=$$startSession^%zewdPHP("ccr",.%KEY,.%CGIEVAR,.sessionArray,.filesArray)
32 s sessid=$g(sessionArray("ewd_sessid"))
33 d mergeArrayFromSession^%zewdAPI(.headers,"ewd.header",sessid)
34 s headers("Content-type")="text/xml"
35 d mergeArrayToSession^%zewdAPI(.headers,"ewd.header",sessid)
36 k headers
37 i Error["Enterprise Web Developer Error :",$g(sessionArray("ewd_pageType"))="ajax" d
38 . s Error=$p(Error,":",2,200)
39 . s Error=$$replaceAll^%zewdAPI(Error,"<br>",": ")
40 . s Error="EWD runtime error: "_Error
41 i $e(Error,1,32)="Enterprise Web Developer Error :" d QUIT 0
42 . n errorPage
43 . s errorPage=$g(sessionArray("ewd_errorPage"))
44 . i errorPage="" s errorPage="ewdError"
45 . i $g(sessionArray("ewd_pageType"))="ajax" s errorPage="ewdAjaxErrorRedirect"
46 . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),errorPage,,,sessid,Error)
47 s stop=0
48 i Error="" d i stop QUIT 0
49 . n nextpage
50 . s nextpage=$$getSessionValue^%zewdAPI("ewd_nextPage",sessid)
51 . i nextpage'="" d
52 . . n x
53 . . d writeHTTPHeader^%zewdGTMRuntime(sessionArray("ewd_appName"),nextpage,$$getSessionValue^%zewdAPI("ewd_token",sessid),$$getSessionValue^%zewdAPI("ewd_pageToken",sessid))
54 . . s stop=1
55 i $$getSessionValue^%zewdAPI("ewd_warning",sessid)'="" d
56 . s Error=$$getSessionValue^%zewdAPI("ewd_warning",sessid)
57 . d deleteFromSession^%zewdAPI("ewd_warning",sessid)
58 w "HTTP/1.1 200 OK"_$c(13,10)
59 s ctype="text/html"
60 d mergeArrayFromSession^%zewdAPI(.headers,"ewd.header",sessid)
61 i $d(headers) d
62 . n lcname,name
63 . s name=""
64 . f s name=$o(headers(name)) q:name="" d
65 . . s lcname=$$zcvt^%zewdAPI(name,"l")
66 . . i lcname="content-type" s ctype=headers(name) q
67 . . w name_": "_headers(name)_$c(13,10)
68 w "Content-type: "_ctype_$c(13,10)
69 w $c(13,10)
70 QUIT 1
71 ;
72body ;
73 s no=""
74 i no?1N.N s no=no-1
75 i no?1AP.ANP d
76 . s p1=$e(no,1,$l(no)-1)
77 . s p2=$e(no,$l(no))
78 . s p2=$c($a(p2)-1)
79 . s no=p1_p2
80 s nul=""
81 s endValue12=""
82 i endValue12?1N.N s endValue12=endValue12+1
83 f q:'(($o(^%zewdSession("session",sessid,"CCR",no))'=endValue12)&($o(^%zewdSession("session",sessid,"CCR",no))'=nul)) d
84 .s no=$o(^%zewdSession("session",sessid,"CCR",no))
85 .s data=$g(^%zewdSession("session",sessid,"CCR",no))
86 .w data
87 .
88 QUIT
Note: See TracBrowser for help on using the repository browser.