source: ccr/trunk/p/C0CEWD1.m@ 1770

Last change on this file since 1770 was 1586, checked in by Sam Habiel, 12 years ago

Changed license to AGPL. Some clean-up for XINDEX

  • Property svn:mergeinfo set to (toggle deleted branches)
    /ccr/branches/ohum/o-old/p/C0CEWD1.m1290
    /ccr/branches/ohum/p/C0CEWD1.m1291-1543
    /ccr/branches/ohum/p/p/C0CEWD1.m1287-1289
File size: 2.4 KB
Line 
1C0CEWD1 ; CCDCCR/GPL - CCR FILEMAN utilities; 12/6/08
2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
3 ;
4 ; This program is free software: you can redistribute it and/or modify
5 ; it under the terms of the GNU Affero General Public License as
6 ; published by the Free Software Foundation, either version 3 of the
7 ; License, or (at your option) any later version.
8 ;
9 ; This program is distributed in the hope that it will be useful,
10 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ; GNU Affero General Public License for more details.
13 ;
14 ; You should have received a copy of the GNU Affero General Public License
15 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ;
17 Q
18 ;
19TEST(filepath) ; filepath IS THE PATH/FILE TO BE READ IN
20 i $g(^%ZISH)["" d ; if the VistA Kernal routine %ZISH exists
21 . n zfile,zpath,ztmp s (zfile,zpath,ztmp)=""
22 . s zfile=$re($p($re(filepath),"/",1)) ;file name
23 . s zpath=$p(filepath,zfile,1) ; file path
24 . s ztmp=$na(^CacheTempEWD($j,0))
25 . s ok=$$FTG^%ZISH(zpath,zfile,ztmp,2) ; import the file incrementing subscr 2
26 q
27 ;
28TEST2 ;
29 s zfilepath="/home/vademo2/CCR/PAT_780_CCR_V1_0_17.xml"
30 ;s ok=$$gtmImportFile^%zewdHTMLParser(zfilepath)
31 s ok=$$LOAD(zfilepath) ;load the XML file to the EWD global
32 s ok=$$parseDocument^%zewdHTMLParser("DerekDOM",0)
33 ;s ok=$$parseXMLFile^%zewdAPI(zfilepath,"fourthDOM")
34 w ok,!
35 q
36 ;
37LOAD(filepath) ; load an xml file into the EWD global for DOM processing
38 ; need to call s error=$$parseDocument^%zewdHTMLParser(docName,isHTML)
39 ; after to process it to the DOM - isHTML=0 for XML files
40 n i
41 i $g(^%ZISH)["" d QUIT i ; if VistA Kernal routine %ZISH exists - gpl 2/23/09
42 . n zfile,zpath,ztmp,zok s (zfile,zpath,ztmp)=""
43 . s zfile=$re($p($re(filepath),"/",1)) ;file name
44 . s zpath=$p(filepath,zfile,1) ; file path
45 . s ztmp=$na(^CacheTempEWD($j,0))
46 . s zok=$$FTG^%ZISH(zpath,zfile,ztmp,2) ; import the file increment subscr 2
47 . s i=$o(^CacheTempEWD($j,""),-1) ; highest line number
48 q i
49 ;
50Q(ZQ,ZD) ; SEND QUERY ZQ TO DOM ZD AND DIPLAY NODES RETURNED
51 I '$D(ZD) S ZD="DerekDOM"
52 s error=$$select^%zewdXPath(ZQ,ZD,.nodes) ;
53 d displayNodes^%zewdXPath(.nodes)
54 q
55 ;
56GET1URL0(URL) ;
57 s ok=$$httpGET^%zewdGTM(URL,.gpl)
58 D INDEX^C0CXPATH("gpl","gpl2")
59 W !,"S URL=""",URL,"""",!
60 S G=""
61 F S G=$O(gpl2(G)) Q:G="" D ;
62 . W " S VDX(""",G,""")=""",gpl2(G),"""",!
63 W !
64 Q
Note: See TracBrowser for help on using the repository browser.