diff --git a/kids/C0X_1_0_0_T9.KID b/kids/C0X_1_0_0_T9.KID new file mode 100644 index 0000000..a601bc3 --- /dev/null +++ b/kids/C0X_1_0_0_T9.KID @@ -0,0 +1,3936 @@ +KIDS Distribution saved on Sep 07, 2012@18:24:21 +smart container support +**KIDS**:C0X*1.0*0^ + +**INSTALL NAME** +C0X*1.0*0 +"BLD",7921,0) +C0X*1.0*0^^0^3120907^n +"BLD",7921,4,0) +^9.64PA^172.201^2 +"BLD",7921,4,172.101,0) +172.101 +"BLD",7921,4,172.101,222) +y^y^f^^^^n +"BLD",7921,4,172.201,0) +172.201 +"BLD",7921,4,172.201,222) +y^y^f^^^^n +"BLD",7921,4,"B",172.101,172.101) + +"BLD",7921,4,"B",172.201,172.201) + +"BLD",7921,6.3) +8 +"BLD",7921,"KRN",0) +^9.67PA^779.2^20 +"BLD",7921,"KRN",.4,0) +.4 +"BLD",7921,"KRN",.4,"NM",0) +^9.68A^1^1 +"BLD",7921,"KRN",.4,"NM",1,0) +C0X PRINT GRAPH FILE #172.101^172.101^0 +"BLD",7921,"KRN",.4,"NM","B","C0X PRINT GRAPH FILE #172.101",1) + +"BLD",7921,"KRN",.401,0) +.401 +"BLD",7921,"KRN",.402,0) +.402 +"BLD",7921,"KRN",.403,0) +.403 +"BLD",7921,"KRN",.5,0) +.5 +"BLD",7921,"KRN",.84,0) +.84 +"BLD",7921,"KRN",3.6,0) +3.6 +"BLD",7921,"KRN",3.8,0) +3.8 +"BLD",7921,"KRN",9.2,0) +9.2 +"BLD",7921,"KRN",9.8,0) +9.8 +"BLD",7921,"KRN",9.8,"NM",0) +^9.68A^7^7 +"BLD",7921,"KRN",9.8,"NM",1,0) +C0XMAIN^^0^B115393527 +"BLD",7921,"KRN",9.8,"NM",2,0) +C0XF2N^^0^B367797666 +"BLD",7921,"KRN",9.8,"NM",3,0) +C0XTEST^^0^B14490662 +"BLD",7921,"KRN",9.8,"NM",4,0) +C0XINIT^^0^B21176787 +"BLD",7921,"KRN",9.8,"NM",5,0) +C0XUTIL^^0^B11155926 +"BLD",7921,"KRN",9.8,"NM",6,0) +C0XTKSB^^0^B17580555 +"BLD",7921,"KRN",9.8,"NM",7,0) +C0XRDF^^0^B4392 +"BLD",7921,"KRN",9.8,"NM","B","C0XF2N",2) + +"BLD",7921,"KRN",9.8,"NM","B","C0XINIT",4) + +"BLD",7921,"KRN",9.8,"NM","B","C0XMAIN",1) + +"BLD",7921,"KRN",9.8,"NM","B","C0XRDF",7) + +"BLD",7921,"KRN",9.8,"NM","B","C0XTEST",3) + +"BLD",7921,"KRN",9.8,"NM","B","C0XTKSB",6) + +"BLD",7921,"KRN",9.8,"NM","B","C0XUTIL",5) + +"BLD",7921,"KRN",19,0) +19 +"BLD",7921,"KRN",19.1,0) +19.1 +"BLD",7921,"KRN",101,0) +101 +"BLD",7921,"KRN",409.61,0) +409.61 +"BLD",7921,"KRN",771,0) +771 +"BLD",7921,"KRN",779.2,0) +779.2 +"BLD",7921,"KRN",870,0) +870 +"BLD",7921,"KRN",8989.51,0) +8989.51 +"BLD",7921,"KRN",8989.52,0) +8989.52 +"BLD",7921,"KRN",8994,0) +8994 +"BLD",7921,"KRN","B",.4,.4) + +"BLD",7921,"KRN","B",.401,.401) + +"BLD",7921,"KRN","B",.402,.402) + +"BLD",7921,"KRN","B",.403,.403) + +"BLD",7921,"KRN","B",.5,.5) + +"BLD",7921,"KRN","B",.84,.84) + +"BLD",7921,"KRN","B",3.6,3.6) + +"BLD",7921,"KRN","B",3.8,3.8) + +"BLD",7921,"KRN","B",9.2,9.2) + +"BLD",7921,"KRN","B",9.8,9.8) + +"BLD",7921,"KRN","B",19,19) + +"BLD",7921,"KRN","B",19.1,19.1) + +"BLD",7921,"KRN","B",101,101) + +"BLD",7921,"KRN","B",409.61,409.61) + +"BLD",7921,"KRN","B",771,771) + +"BLD",7921,"KRN","B",779.2,779.2) + +"BLD",7921,"KRN","B",870,870) + +"BLD",7921,"KRN","B",8989.51,8989.51) + +"BLD",7921,"KRN","B",8989.52,8989.52) + +"BLD",7921,"KRN","B",8994,8994) + +"FIA",172.101) +C0X TRIPLE +"FIA",172.101,0) +^C0X(101, +"FIA",172.101,0,0) +172.101I +"FIA",172.101,0,1) +y^y^f^^^^n +"FIA",172.101,0,10) + +"FIA",172.101,0,11) + +"FIA",172.101,0,"RLRO") + +"FIA",172.101,172.101) +0 +"FIA",172.101,172.1011) +0 +"FIA",172.201) +C0X STRING +"FIA",172.201,0) +^C0X(201, +"FIA",172.201,0,0) +172.201 +"FIA",172.201,0,1) +y^y^f^^^^n +"FIA",172.201,0,10) + +"FIA",172.201,0,11) + +"FIA",172.201,0,"RLRO") + +"FIA",172.201,172.201) +0 +"FIA",172.201,172.2011) +0 +"IX",172.101,172.101,"G",0) +172.101^G^REGULAR INDEX OF THE GRAPH FIELD^R^^F^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"G",1) +S ^C0X(101,"G",X,DA)="" +"IX",172.101,172.101,"G",2) +K ^C0X(101,"G",X,DA) +"IX",172.101,172.101,"G",2.5) +K ^C0X(101,"G") +"IX",172.101,172.101,"G",11.1,0) +^.114IA^1^1 +"IX",172.101,172.101,"G",11.1,1,0) +1^F^172.101^.02^^1^F +"IX",172.101,172.101,"G",11.1,1,3) + +"IX",172.101,172.101,"GOPS",0) +172.101^GOPS^GRAPH ONLY OBJECT PREDICATE SUBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"GOPS",1) +S ^C0X(101,"GOPS",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA)="" +"IX",172.101,172.101,"GOPS",2) +K ^C0X(101,"GOPS",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA) +"IX",172.101,172.101,"GOPS",2.5) +K ^C0X(101,"GOPS") +"IX",172.101,172.101,"GOPS",11.1,0) +^.114IA^4^4 +"IX",172.101,172.101,"GOPS",11.1,1,0) +1^F^172.101^.02^240^1^F +"IX",172.101,172.101,"GOPS",11.1,1,3) + +"IX",172.101,172.101,"GOPS",11.1,2,0) +2^F^172.101^.05^240^2^F +"IX",172.101,172.101,"GOPS",11.1,2,3) + +"IX",172.101,172.101,"GOPS",11.1,3,0) +3^F^172.101^.04^240^3^F +"IX",172.101,172.101,"GOPS",11.1,3,3) + +"IX",172.101,172.101,"GOPS",11.1,4,0) +4^F^172.101^.03^240^4^F +"IX",172.101,172.101,"GOPS",11.1,4,3) + +"IX",172.101,172.101,"GOSP",0) +172.101^GOSP^GRAPH ONLY OBJECT SUBJECT PREDICATE^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"GOSP",1) +S ^C0X(101,"GOSP",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA)="" +"IX",172.101,172.101,"GOSP",2) +K ^C0X(101,"GOSP",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA) +"IX",172.101,172.101,"GOSP",2.5) +K ^C0X(101,"GOSP") +"IX",172.101,172.101,"GOSP",11.1,0) +^.114IA^4^4 +"IX",172.101,172.101,"GOSP",11.1,1,0) +1^F^172.101^.02^240^1^F +"IX",172.101,172.101,"GOSP",11.1,1,3) + +"IX",172.101,172.101,"GOSP",11.1,2,0) +2^F^172.101^.05^240^2^F +"IX",172.101,172.101,"GOSP",11.1,2,3) + +"IX",172.101,172.101,"GOSP",11.1,3,0) +3^F^172.101^.03^240^3^F +"IX",172.101,172.101,"GOSP",11.1,3,3) + +"IX",172.101,172.101,"GOSP",11.1,4,0) +4^F^172.101^.04^240^4^F +"IX",172.101,172.101,"GOSP",11.1,4,3) + +"IX",172.101,172.101,"GPSO",0) +172.101^GPSO^GRAPH ONLY PREDICATE SUBJECT OBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"GPSO",1) +S ^C0X(101,"GPSO",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA)="" +"IX",172.101,172.101,"GPSO",2) +K ^C0X(101,"GPSO",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA) +"IX",172.101,172.101,"GPSO",2.5) +K ^C0X(101,"GPSO") +"IX",172.101,172.101,"GPSO",11.1,0) +^.114IA^4^4 +"IX",172.101,172.101,"GPSO",11.1,1,0) +1^F^172.101^.02^240^1^F +"IX",172.101,172.101,"GPSO",11.1,1,3) + +"IX",172.101,172.101,"GPSO",11.1,2,0) +2^F^172.101^.04^240^2^F +"IX",172.101,172.101,"GPSO",11.1,2,3) + +"IX",172.101,172.101,"GPSO",11.1,3,0) +3^F^172.101^.03^240^3^F +"IX",172.101,172.101,"GPSO",11.1,3,3) + +"IX",172.101,172.101,"GPSO",11.1,4,0) +4^F^172.101^.05^240^4^F +"IX",172.101,172.101,"GPSO",11.1,4,3) + +"IX",172.101,172.101,"GSPO",0) +172.101^GSPO^GROUP ONLY SUBJECT PREDICATE OBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"GSPO",1) +S ^C0X(101,"GSPO",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA)="" +"IX",172.101,172.101,"GSPO",2) +K ^C0X(101,"GSPO",$E(X(1),1,240),$E(X(2),1,240),$E(X(3),1,240),$E(X(4),1,240),DA) +"IX",172.101,172.101,"GSPO",2.5) +K ^C0X(101,"GSPO") +"IX",172.101,172.101,"GSPO",11.1,0) +^.114IA^4^4 +"IX",172.101,172.101,"GSPO",11.1,1,0) +1^F^172.101^.02^240^1^F +"IX",172.101,172.101,"GSPO",11.1,1,3) + +"IX",172.101,172.101,"GSPO",11.1,2,0) +2^F^172.101^.03^240^2^F +"IX",172.101,172.101,"GSPO",11.1,2,3) + +"IX",172.101,172.101,"GSPO",11.1,3,0) +3^F^172.101^.04^240^3^F +"IX",172.101,172.101,"GSPO",11.1,3,3) + +"IX",172.101,172.101,"GSPO",11.1,4,0) +4^F^172.101^.05^240^4^F +"IX",172.101,172.101,"GSPO",11.1,4,3) + +"IX",172.101,172.101,"OPS",0) +172.101^OPS^REGULAR INDEX OF OBJECT PREDICATE SUBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"OPS",1) +S ^C0X(101,"OPS",X(1),X(2),X(3),DA)="" +"IX",172.101,172.101,"OPS",2) +K ^C0X(101,"OPS",X(1),X(2),X(3),DA) +"IX",172.101,172.101,"OPS",2.5) +K ^C0X(101,"OPS") +"IX",172.101,172.101,"OPS",11.1,0) +^.114IA^3^3 +"IX",172.101,172.101,"OPS",11.1,1,0) +1^F^172.101^.05^^1^F +"IX",172.101,172.101,"OPS",11.1,1,3) + +"IX",172.101,172.101,"OPS",11.1,2,0) +2^F^172.101^.04^^2^F +"IX",172.101,172.101,"OPS",11.1,2,3) + +"IX",172.101,172.101,"OPS",11.1,3,0) +3^F^172.101^.03^^3^F +"IX",172.101,172.101,"OPS",11.1,3,3) + +"IX",172.101,172.101,"OSP",0) +172.101^OSP^REGULAR INDEX OF OBJECT SUBJECT PREDICATE^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"OSP",1) +S ^C0X(101,"OSP",X(1),X(2),X(3),DA)="" +"IX",172.101,172.101,"OSP",2) +K ^C0X(101,"OSP",X(1),X(2),X(3),DA) +"IX",172.101,172.101,"OSP",2.5) +K ^C0X(101,"OSP") +"IX",172.101,172.101,"OSP",11.1,0) +^.114IA^3^3 +"IX",172.101,172.101,"OSP",11.1,1,0) +1^F^172.101^.05^^1^F +"IX",172.101,172.101,"OSP",11.1,1,3) + +"IX",172.101,172.101,"OSP",11.1,2,0) +2^F^172.101^.03^^2^F +"IX",172.101,172.101,"OSP",11.1,2,3) + +"IX",172.101,172.101,"OSP",11.1,3,0) +3^F^172.101^.04^^3^F +"IX",172.101,172.101,"OSP",11.1,3,3) + +"IX",172.101,172.101,"PSO",0) +172.101^PSO^REGULAR INDEX OF PREDICATE SUBJECT OBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"PSO",1) +S ^C0X(101,"PSO",X(1),X(2),X(3),DA)="" +"IX",172.101,172.101,"PSO",2) +K ^C0X(101,"PSO",X(1),X(2),X(3),DA) +"IX",172.101,172.101,"PSO",2.5) +K ^C0X(101,"PSO") +"IX",172.101,172.101,"PSO",11.1,0) +^.114IA^3^3 +"IX",172.101,172.101,"PSO",11.1,1,0) +1^F^172.101^.04^^1^F +"IX",172.101,172.101,"PSO",11.1,1,3) + +"IX",172.101,172.101,"PSO",11.1,2,0) +2^F^172.101^.03^^2^F +"IX",172.101,172.101,"PSO",11.1,2,3) + +"IX",172.101,172.101,"PSO",11.1,3,0) +3^F^172.101^.05^^3^F +"IX",172.101,172.101,"PSO",11.1,3,3) + +"IX",172.101,172.101,"SPO",0) +172.101^SPO^REGULAR INDEX OF SUBJECT PREDICATE OBJECT^R^^R^IR^I^172.101^^^^^LS +"IX",172.101,172.101,"SPO",1) +S ^C0X(101,"SPO",X(1),X(2),X(3),DA)="" +"IX",172.101,172.101,"SPO",2) +K ^C0X(101,"SPO",X(1),X(2),X(3),DA) +"IX",172.101,172.101,"SPO",2.5) +K ^C0X(101,"SPO") +"IX",172.101,172.101,"SPO",11.1,0) +^.114IA^3^3 +"IX",172.101,172.101,"SPO",11.1,1,0) +1^F^172.101^.03^^1^F +"IX",172.101,172.101,"SPO",11.1,1,3) + +"IX",172.101,172.101,"SPO",11.1,2,0) +2^F^172.101^.04^^2^F +"IX",172.101,172.101,"SPO",11.1,2,3) + +"IX",172.101,172.101,"SPO",11.1,3,0) +3^F^172.101^.05^^3^F +"IX",172.101,172.101,"SPO",11.1,3,3) + +"IX",172.201,172.201,"B",0) +172.201^B^regular B index for strings to support long strings^R^^F^IR^I^172.201^^^^^LS +"IX",172.201,172.201,"B",1) +S ^C0X(201,"B",$E(X,1,240),DA)="" +"IX",172.201,172.201,"B",2) +K ^C0X(201,"B",$E(X,1,240),DA) +"IX",172.201,172.201,"B",2.5) +K ^C0X(201,"B") +"IX",172.201,172.201,"B",11.1,0) +^.114IA^1^1 +"IX",172.201,172.201,"B",11.1,1,0) +1^F^172.201^.01^240^1^F +"KRN",.4,1511,-1) +0^1 +"KRN",.4,1511,0) +C0X PRINT GRAPH^3111207.1727^@^172.101^^@^3120605 +"KRN",.4,1511,"F",1) +.03;W25;S~.04;C28;W25~.05;C54;W24~ +"KRN",.4,1511,"H") +C0X TRIPLE LIST +"MBREQ") +0 +"ORD",5,.4) +.4;5;;;EDEOUT^DIFROMSO(.4,DA,"",XPDA);FPRE^DIFROMSI(.4,"",XPDA);EPRE^DIFROMSI(.4,DA,$E("N",$G(XPDNEW)),XPDA,"",OLDA);;EPOST^DIFROMSI(.4,DA,"",XPDA);DEL^DIFROMSK(.4,"",%) +"ORD",5,.4,0) +PRINT TEMPLATE +"QUES","XPF1",0) +Y +"QUES","XPF1","??") +^D REP^XPDH +"QUES","XPF1","A") +Shall I write over your |FLAG| File +"QUES","XPF1","B") +YES +"QUES","XPF1","M") +D XPF1^XPDIQ +"QUES","XPF2",0) +Y +"QUES","XPF2","??") +^D DTA^XPDH +"QUES","XPF2","A") +Want my data |FLAG| yours +"QUES","XPF2","B") +YES +"QUES","XPF2","M") +D XPF2^XPDIQ +"QUES","XPI1",0) +YO +"QUES","XPI1","??") +^D INHIBIT^XPDH +"QUES","XPI1","A") +Want KIDS to INHIBIT LOGONs during the install +"QUES","XPI1","B") +NO +"QUES","XPI1","M") +D XPI1^XPDIQ +"QUES","XPM1",0) +PO^VA(200,:EM +"QUES","XPM1","??") +^D MG^XPDH +"QUES","XPM1","A") +Enter the Coordinator for Mail Group '|FLAG|' +"QUES","XPM1","B") + +"QUES","XPM1","M") +D XPM1^XPDIQ +"QUES","XPO1",0) +Y +"QUES","XPO1","??") +^D MENU^XPDH +"QUES","XPO1","A") +Want KIDS to Rebuild Menu Trees Upon Completion of Install +"QUES","XPO1","B") +NO +"QUES","XPO1","M") +D XPO1^XPDIQ +"QUES","XPZ1",0) +Y +"QUES","XPZ1","??") +^D OPT^XPDH +"QUES","XPZ1","A") +Want to DISABLE Scheduled Options, Menu Options, and Protocols +"QUES","XPZ1","B") +NO +"QUES","XPZ1","M") +D XPZ1^XPDIQ +"QUES","XPZ2",0) +Y +"QUES","XPZ2","??") +^D RTN^XPDH +"QUES","XPZ2","A") +Want to MOVE routines to other CPUs +"QUES","XPZ2","B") +NO +"QUES","XPZ2","M") +D XPZ2^XPDIQ +"RTN") +7 +"RTN","C0XF2N") +0^2^B367797666 +"RTN","C0XF2N",1,0) +C0XF2N ; GPL - Fileman Triples entry point routine ;10/13/11 17:05 +"RTN","C0XF2N",2,0) + ;;0.1;C0X;nopatch;noreleasedate;Build 8 +"RTN","C0XF2N",3,0) + ;Copyright 2011 George Lilly. Licensed under the terms of the GNU +"RTN","C0XF2N",4,0) + ;General Public License See attached copy of the License. +"RTN","C0XF2N",5,0) + ; +"RTN","C0XF2N",6,0) + ;This program is free software; you can redistribute it and/or modify +"RTN","C0XF2N",7,0) + ;it under the terms of the GNU General Public License as published by +"RTN","C0XF2N",8,0) + ;the Free Software Foundation; either version 2 of the License, or +"RTN","C0XF2N",9,0) + ;(at your option) any later version. +"RTN","C0XF2N",10,0) + ; +"RTN","C0XF2N",11,0) + ;This program is distributed in the hope that it will be useful, +"RTN","C0XF2N",12,0) + ;but WITHOUT ANY WARRANTY; without even the implied warranty of +"RTN","C0XF2N",13,0) + ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +"RTN","C0XF2N",14,0) + ;GNU General Public License for more details. +"RTN","C0XF2N",15,0) + ; +"RTN","C0XF2N",16,0) + ;You should have received a copy of the GNU General Public License along +"RTN","C0XF2N",17,0) + ;with this program; if not, write to the Free Software Foundation, Inc., +"RTN","C0XF2N",18,0) + ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +"RTN","C0XF2N",19,0) + ; +"RTN","C0XF2N",20,0) + Q +"RTN","C0XF2N",21,0) + ; +"RTN","C0XF2N",22,0) + ; This is based on C0XMAIN but experiments with a fast load for triples +"RTN","C0XF2N",23,0) + ; that will write directly to the fileman global +"RTN","C0XF2N",24,0) + ; The file 172.101 is a F2N design style for triples, which means +"RTN","C0XF2N",25,0) + ; that it is a Flat file with no subfiles, all fields at the root +"RTN","C0XF2N",26,0) + ; ... it is a "2" file solution which means all strings are stored in +"RTN","C0XF2N",27,0) + ; ... strings file and pointed to by the triples file +"RTN","C0XF2N",28,0) + ; ... it is an N file because it has generated Node IDs instead of +"RTN","C0XF2N",29,0) + ; ... DINUM which would use the IEN for the Node ID. +"RTN","C0XF2N",30,0) + ; gpl 11/04/2011 +"RTN","C0XF2N",31,0) + ; +"RTN","C0XF2N",32,0) +INITFARY(ZFARY) ; INITIALIZE FILE NUMBERS AND OTHER USEFUL THINGS +"RTN","C0XF2N",33,0) + ; FOR THE DEFAULT TRIPLE STORE. USE OTHER VALUES FOR SUPPORTING ADDITIONAL +"RTN","C0XF2N",34,0) + ; TRIPLE STORES +"RTN","C0XF2N",35,0) + I $D(@ZFARY) Q ; ALREADY INITIALIZED +"RTN","C0XF2N",36,0) + S @ZFARY@("C0XTFN")=172.101 ; TRIPLES FILE NUMBER +"RTN","C0XF2N",37,0) + S @ZFARY@("C0XSFN")=172.201 ; TRIPLES STRINGS FILE NUMBER +"RTN","C0XF2N",38,0) + S @ZFARY@("C0XTN")=$NA(^C0X(101)) ; TRIPLES GLOBAL NAME +"RTN","C0XF2N",39,0) + S @ZFARY@("C0XSN")=$NA(^C0X(201)) ; STRING FILE GLOBAL NAME +"RTN","C0XF2N",40,0) + S @ZFARY@("C0XDIR")="/home/glilly/fmts/trunk/samples/smart-new/" +"RTN","C0XF2N",41,0) + S @ZFARY@("BLKLOAD")=1 ; this file supports block load +"RTN","C0XF2N",42,0) + S @ZFARY@("FMTSSTYLE")="F2N" ; fileman style +"RTN","C0XF2N",43,0) + S @ZFARY@("REPLYFMT")="JSON" +"RTN","C0XF2N",44,0) + D USEFARY(ZFARY) +"RTN","C0XF2N",45,0) + Q +"RTN","C0XF2N",46,0) + ; +"RTN","C0XF2N",47,0) +USEFARY(ZFARY) ; INITIALIZES VARIABLES SAVED IN ARRAY ZFARY +"RTN","C0XF2N",48,0) + N ZI S ZI="" +"RTN","C0XF2N",49,0) + F S ZI=$O(@ZFARY@(ZI)) Q:ZI="" D +"RTN","C0XF2N",50,0) + . ;N ZX +"RTN","C0XF2N",51,0) + . S ZX="S "_ZI_"="""_@ZFARY@(ZI)_"""" +"RTN","C0XF2N",52,0) + . ;W !,ZX +"RTN","C0XF2N",53,0) + . X ZX +"RTN","C0XF2N",54,0) + Q +"RTN","C0XF2N",55,0) + ; +"RTN","C0XF2N",56,0) +FILEIN ; INTERACTIVE ENTRY POINT FOR OPTION TO READ IN A FILE +"RTN","C0XF2N",57,0) + I '$D(C0XFARY) D INITFARY("C0XFARY") +"RTN","C0XF2N",58,0) + D USEFARY("C0XFARY") +"RTN","C0XF2N",59,0) + S DIR(0)="F^3:240" +"RTN","C0XF2N",60,0) + S DIR("A")="File Directory" +"RTN","C0XF2N",61,0) + S DIR("B")=C0XDIR +"RTN","C0XF2N",62,0) + D ^DIR +"RTN","C0XF2N",63,0) + I Y="^" Q ; +"RTN","C0XF2N",64,0) + S C0XDIR=Y +"RTN","C0XF2N",65,0) + S C0XFARY("C0XDIR")=Y +"RTN","C0XF2N",66,0) + S DIR(0)="F^3:240" +"RTN","C0XF2N",67,0) + S DIR("A")="File Name" +"RTN","C0XF2N",68,0) + I '$D(C0XFN) S DIR("B")="qds.rdf" +"RTN","C0XF2N",69,0) + E S DIR("B")=C0XFN +"RTN","C0XF2N",70,0) + D ^DIR +"RTN","C0XF2N",71,0) + I Y="" Q ; +"RTN","C0XF2N",72,0) + I Y="^" Q ; +"RTN","C0XF2N",73,0) + S C0XFN=Y +"RTN","C0XF2N",74,0) + D IMPORT(C0XFN,C0XDIR,,"C0XFARY") +"RTN","C0XF2N",75,0) + K C0XFDA +"RTN","C0XF2N",76,0) + Q +"RTN","C0XF2N",77,0) + ; +"RTN","C0XF2N",78,0) +IMPORT(FNAME,INDIR,INURL,FARY) ; EXTRINSIC THAT READS A FILE FROM THE STANDARD +"RTN","C0XF2N",79,0) + ; DIRECTORY, LOADS IT INTO THE TRIPLESTORE AS TEXT, AND RETURNS THE +"RTN","C0XF2N",80,0) + ; NODE NAME OF THE TEXT TRIPLE +"RTN","C0XF2N",81,0) + ; INDIR IS THE OPTIONAL DIRECTORY (DEFAUTS TO STANDARD DIR) +"RTN","C0XF2N",82,0) + ; INURL IS THE OPTIONAL URI FOR ACCESSING THE FILE FROM THE TRIPLE STORE +"RTN","C0XF2N",83,0) + ; FARY IS THE OPTIONAL FILE ARRAY OF THE TRIPLE STORE TO USE +"RTN","C0XF2N",84,0) + I '$D(FARY) D ; +"RTN","C0XF2N",85,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",86,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",87,0) + D USEFARY(FARY) +"RTN","C0XF2N",88,0) + N ZD,ZTMP +"RTN","C0XF2N",89,0) + I '$D(INDIR) S INDIR=C0XDIR ; DIRECTORY OF THE RDF FILE +"RTN","C0XF2N",90,0) + I $G(INURL)="" D ; +"RTN","C0XF2N",91,0) + . ;N ZN2 S ZN2=$P(FNAME,".",1)_"_"_$P(FNAME,".",2) ; REMOVE THE DOT +"RTN","C0XF2N",92,0) + . ;S INURL=FDIR_ZN2 +"RTN","C0XF2N",93,0) + . S INURL=INDIR_FNAME +"RTN","C0XF2N",94,0) + N ZTMP +"RTN","C0XF2N",95,0) + S ZTMP=$NA(^TMP("C0X",$J,"FILEIN",1)) ; WHERE TO PUT THE INCOMING FILE +"RTN","C0XF2N",96,0) + K @ZTMP ; MAKE SURE IT'S CLEAR +"RTN","C0XF2N",97,0) + S C0XSTART=$$NOW^XLFDT +"RTN","C0XF2N",98,0) + W !,"STARTED: ",C0XSTART +"RTN","C0XF2N",99,0) + W !,"READING IN: ",FNAME +"RTN","C0XF2N",100,0) + I '$$FILEREAD(ZTMP,INDIR,FNAME,4) D Q ; QUIT IF NO SUCCESS +"RTN","C0XF2N",101,0) + . W !,"ERROR READING FILE: ",INDIR,FNAME +"RTN","C0XF2N",102,0) + S ZRDF=$NA(^TMP("C0X",$J,"FILEIN")) ; WITHOUT THE SUBSCRIPT +"RTN","C0XF2N",103,0) + W !,$O(@ZRDF@(""),-1)," LINES READ" +"RTN","C0XF2N",104,0) + D INSRDF(ZRDF,INURL,FARY) ; IMPORT AND PROCESS THE RDF +"RTN","C0XF2N",105,0) + K INURL +"RTN","C0XF2N",106,0) + K C0XFDA +"RTN","C0XF2N",107,0) + ;K ^TMP("MXMLDOM",$J) +"RTN","C0XF2N",108,0) + Q +"RTN","C0XF2N",109,0) + ; +"RTN","C0XF2N",110,0) +WGET(ZURL,FARY) ; GET FROM THE INTERNET AN RDF FILE AND INSERT IT +"RTN","C0XF2N",111,0) + ; +"RTN","C0XF2N",112,0) + I '$D(FARY) D ; +"RTN","C0XF2N",113,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",114,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",115,0) + D USEFARY(FARY) +"RTN","C0XF2N",116,0) + ;N ZLOC,ZTMP +"RTN","C0XF2N",117,0) + K ZTMP +"RTN","C0XF2N",118,0) + S ZLOC=$NA(^TMP("C0X","WGET",$J)) +"RTN","C0XF2N",119,0) + K @ZLOC +"RTN","C0XF2N",120,0) + S C0XSTART=$$NOW^XLFDT +"RTN","C0XF2N",121,0) + W !,"STARTED: ",C0XSTART +"RTN","C0XF2N",122,0) + W !,"DOWNLOADING: ",ZURL +"RTN","C0XF2N",123,0) + S OK=$$httpGET^%zewdGTM(ZURL,.ZTMP) +"RTN","C0XF2N",124,0) + M @ZLOC=ZTMP +"RTN","C0XF2N",125,0) + S C0XLINES=$O(@ZLOC@(""),-1) +"RTN","C0XF2N",126,0) + W !,C0XLINES," LINES READ" +"RTN","C0XF2N",127,0) + S C0XDLC=$$NOW^XLFDT ; DOWNLOAD COMPLETE +"RTN","C0XF2N",128,0) + W !,"DOWNLOAD COMPLETE AT ",C0XDLC +"RTN","C0XF2N",129,0) + S C0XDIFF=$$FMDIFF^XLFDT(C0XDLC,C0XSTART,2) +"RTN","C0XF2N",130,0) + W !," ELAPSED TIME: ",C0XDIFF," SECONDS" +"RTN","C0XF2N",131,0) + I C0XDIFF'=0 W !," APPROXIMATELY ",$P(C0XLINES/C0XDIFF,".")," LINES PER SEC" +"RTN","C0XF2N",132,0) + D INSRDF(ZLOC,ZURL,FARY) +"RTN","C0XF2N",133,0) + Q +"RTN","C0XF2N",134,0) + ; +"RTN","C0XF2N",135,0) +INSRDF(ZRDF,ZNAME,FARY) ; INSERT AN RDF FILE INTO THE STORE AND PROCESS +"RTN","C0XF2N",136,0) + ; ZRDF IS PASSED BY NAME +"RTN","C0XF2N",137,0) + I '$D(FARY) D ; +"RTN","C0XF2N",138,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",139,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",140,0) + D USEFARY(FARY) +"RTN","C0XF2N",141,0) + S BATCNT=0 ; BATCH COUNTER +"RTN","C0XF2N",142,0) + S BATMAX=10000 ; TRY BATCHES OF THIS SIZE +"RTN","C0XF2N",143,0) + N ZGRAPH,ZSUBJECT +"RTN","C0XF2N",144,0) + S ZGRAPH="_:G"_$$LKY9 ; RANDOM GRAPH NAME +"RTN","C0XF2N",145,0) + S ZSUBJECT=$$ANONS() ; RANDOM ANOYMOUS SUBJECT +"RTN","C0XF2N",146,0) + D ADD(ZGRAPH,ZSUBJECT,"fmts:url",ZNAME,FARY) +"RTN","C0XF2N",147,0) + N ZTXTNM +"RTN","C0XF2N",148,0) + S ZTXTNM="_TXT_INCOMING_RDF_FILE_"_ZNAME_"_"_$$LKY9 ; NAME FOR TEXT NODE +"RTN","C0XF2N",149,0) + D ADD(ZGRAPH,ZSUBJECT,"fmts:fileSource",ZTXTNM,FARY) +"RTN","C0XF2N",150,0) + D ADD(ZGRAPH,ZSUBJECT,"fmts:fileTag",$$name2tag(ZNAME),FARY) +"RTN","C0XF2N",151,0) + D SWUPDIE(.C0XFDA) ; TRY IT OUT +"RTN","C0XF2N",152,0) + K C0XCNT ;RESET FOR NEXT TIME +"RTN","C0XF2N",153,0) + D STORETXT(ZRDF,ZTXTNM,FARY) +"RTN","C0XF2N",154,0) + W !,"ADDED: ",ZGRAPH," ",ZSUBJECT," fmts:fileSource ",ZTXTNM +"RTN","C0XF2N",155,0) + D PROCESS(.G,ZRDF,ZNAME,ZGRAPH,FARY) ; PARSE AND INSERT THE RDF +"RTN","C0XF2N",156,0) + Q +"RTN","C0XF2N",157,0) + ; +"RTN","C0XF2N",158,0) +name2tag(zname) ; extrinsic which returns a tag derived from a name +"RTN","C0XF2N",159,0) + ; /home/vista/project.xml ==> project +"RTN","C0XF2N",160,0) + q $p($re($p($re(zname),"/")),".") +"RTN","C0XF2N",161,0) + ; +"RTN","C0XF2N",162,0) +STORETXT(ZTXT,ZNAME,FARY) ; STORE TEXT IN THE TRIPLESTORE AT ZNAME +"RTN","C0XF2N",163,0) + ; +"RTN","C0XF2N",164,0) + I '$D(FARY) D ; +"RTN","C0XF2N",165,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",166,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",167,0) + D USEFARY(FARY) +"RTN","C0XF2N",168,0) + N ZIEN +"RTN","C0XF2N",169,0) + S ZIEN=$$IENOF(ZNAME,FARY) ; GET THE IEN +"RTN","C0XF2N",170,0) + D CLEAN^DILF +"RTN","C0XF2N",171,0) + K ZERR +"RTN","C0XF2N",172,0) + D WP^DIE(C0XSFN,ZIEN_",",1,,ZTXT,"ZERR") +"RTN","C0XF2N",173,0) + I $D(ZERR) D Q ; +"RTN","C0XF2N",174,0) + . W !,"ERROR CREATING WORD PROCESSING FIELD" +"RTN","C0XF2N",175,0) + . S C0XERR="ERROR CREATING WORD PROCESSING FIELD" +"RTN","C0XF2N",176,0) + . D ^%ZTER ; error trap +"RTN","C0XF2N",177,0) + Q +"RTN","C0XF2N",178,0) + ; +"RTN","C0XF2N",179,0) +GETTXT(ZRTN,ZNAME,FARY) ; RETURNS RDF SOURCE OR OTHER TEXT +"RTN","C0XF2N",180,0) + ; ZRTN IS PASSED BY REFERENCE +"RTN","C0XF2N",181,0) + I '$D(FARY) D ; +"RTN","C0XF2N",182,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",183,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",184,0) + D USEFARY(FARY) +"RTN","C0XF2N",185,0) + N ZIEN +"RTN","C0XF2N",186,0) + S ZIEN=$$IENOF(ZNAME) +"RTN","C0XF2N",187,0) + S OK=$$GET1^DIQ(C0XSFN,ZIEN_",",1,,"ZRTN") +"RTN","C0XF2N",188,0) + Q +"RTN","C0XF2N",189,0) + ; +"RTN","C0XF2N",190,0) +WHERETXT(ZNAME,FARY) ; EXTRINSIC WHICH RETURNS THE NAME OF THE GLOBAL +"RTN","C0XF2N",191,0) + ; WHERE THE TEXT IS LOCATED. NAME IS THE NAME OF THE STRING +"RTN","C0XF2N",192,0) + I '$D(FARY) D ; +"RTN","C0XF2N",193,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",194,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",195,0) + D USEFARY(FARY) +"RTN","C0XF2N",196,0) + N ZIEN +"RTN","C0XF2N",197,0) + S ZIEN=$$IENOF(ZNAME) +"RTN","C0XF2N",198,0) + Q $NA(@C0XSN@(ZIEN,1)) +"RTN","C0XF2N",199,0) + ; +"RTN","C0XF2N",200,0) +FILEREAD(ZINTMP,ZDIR,ZFNAME,ZLVL) ; READS A FILE INTO ZINTMP USING FTG^%ZISH +"RTN","C0XF2N",201,0) + ; ZINTMP IS PASSED BY NAME AND INCLUDES THE NEW SUBSCRIPT +"RTN","C0XF2N",202,0) + ; IE ^TMP("C0X","FILEIN",1) +"RTN","C0XF2N",203,0) + ; ZLVL IN THIS CASE WOULD BE 3 INCREMENTING THE 1 +"RTN","C0XF2N",204,0) + ; EXTRINSIC WHICH RETURNS THE RESULT OF FTG^%ZISH +"RTN","C0XF2N",205,0) + S OK=$$FTG^%ZISH(ZDIR,FNAME,ZINTMP,ZLVL) +"RTN","C0XF2N",206,0) + Q OK +"RTN","C0XF2N",207,0) + ; +"RTN","C0XF2N",208,0) +TESTPROC ; TEST PROCESS WITH EXISTING SMALL RDF FILE +"RTN","C0XF2N",209,0) + S ZIN=$NA(^TMP("C0X",12226,"FILEIN")) +"RTN","C0XF2N",210,0) + S ZGRAPH="/test/rdfFile" +"RTN","C0XF2N",211,0) + S ZM="/test/rdfFile/meta" +"RTN","C0XF2N",212,0) + D PROCESS(.G,ZIN,ZGRAPH,ZM) +"RTN","C0XF2N",213,0) + Q +"RTN","C0XF2N",214,0) + ; +"RTN","C0XF2N",215,0) +VISTAOWL ; +"RTN","C0XF2N",216,0) + S ZRDF=$NA(^TMP("C0X",542,"FILEIN")) +"RTN","C0XF2N",217,0) + S ZNAME="/home/glilly/vistaowl/VistAOWL.owl" +"RTN","C0XF2N",218,0) + S ZGRAPH="_:G431590209" +"RTN","C0XF2N",219,0) + S FARY="C0XFARY" +"RTN","C0XF2N",220,0) + D INITFARY(FARY) +"RTN","C0XF2N",221,0) + S C0XDOCID=1 +"RTN","C0XF2N",222,0) + S BATCNT=0 +"RTN","C0XF2N",223,0) + S BATMAX=10000 +"RTN","C0XF2N",224,0) + D PROCESS(.G,ZRDF,ZGRAPH,ZNAME,FARY) +"RTN","C0XF2N",225,0) + Q +"RTN","C0XF2N",226,0) + ; +"RTN","C0XF2N",227,0) +PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE +"RTN","C0XF2N",228,0) + ; ZRTN IS PASS BY REFERENCE AND RETURNS MESSAGES ABOUT THE PROCESSING +"RTN","C0XF2N",229,0) + ; ZRDF IS PASSED BY NAME AND IS THE GLOBAL CONTAINING THE RDF FILE +"RTN","C0XF2N",230,0) + ; ZGRF IS THE NAME OF THE GRAPH TO USE IN THE TRIPLE STORE FOR RESULTS +"RTN","C0XF2N",231,0) + ; ZMETA IS OPTIONAL AND IS THE NAME OF THE GRAPH TO STORE METADATA +"RTN","C0XF2N",232,0) + ; +"RTN","C0XF2N",233,0) + I '$D(FARY) D ; +"RTN","C0XF2N",234,0) + . D INITFARY("C0XFARY") +"RTN","C0XF2N",235,0) + . S FARY="C0XFARY" +"RTN","C0XF2N",236,0) + D USEFARY(FARY) +"RTN","C0XF2N",237,0) + ;N BATCNT +"RTN","C0XF2N",238,0) + ;N BATMAX +"RTN","C0XF2N",239,0) + ; -- first parse the rdf file with the MXML parser +"RTN","C0XF2N",240,0) + ;S C0XDOCID=$$PARSE^C0CNHIN(ZRDF,"C0XARRAY") ; PARSE WITH MXML +"RTN","C0XF2N",241,0) + S C0XDLC2=$$NOW^XLFDT ; START OF PARSE +"RTN","C0XF2N",242,0) + I @ZRDF@(1)'["") +"RTN","C0XRDF",24,0) + D ADD(ZARY,"") +"RTN","C0XRDF",25,0) + Q +"RTN","C0XRDF",26,0) + ; +"RTN","C0XRDF",27,0) +LISTSTART(ZARY,ZNAM) +"RTN","C0XRDF",28,0) + Q +"RTN","C0XRDF",29,0) + ; +"RTN","C0XRDF",30,0) +DICTSTART(ZARY,ZSUB) +"RTN","C0XRDF",31,0) + I ZSUB["http" D Q ; +"RTN","C0XRDF",32,0) + . D ADD(ZARY,"") +"RTN","C0XRDF",33,0) + I $E(ZSUB,1,1)="/" D Q ; +"RTN","C0XRDF",34,0) + . D ADD(ZARY,"") +"RTN","C0XRDF",35,0) + D ADD(ZARY,"") +"RTN","C0XRDF",36,0) + Q +"RTN","C0XRDF",37,0) + ; +"RTN","C0XRDF",38,0) +DASSERT(ZARY,ZPRED,ZOBJ) +"RTN","C0XRDF",39,0) + I ZPRED[":" D Q ; +"RTN","C0XRDF",40,0) + . I ZPRED="rdf:type" D Q ; +"RTN","C0XRDF",41,0) + . . D ADD(ZARY,"") +"RTN","C0XRDF",42,0) + . N ZA,ZB,ZC +"RTN","C0XRDF",43,0) + . S ZA=$P(ZPRED,":",1) +"RTN","C0XRDF",44,0) + . S ZB=$P(ZPRED,":",2) +"RTN","C0XRDF",45,0) + . I $E(ZB,1,1)="/" D ; +"RTN","C0XRDF",46,0) + . . S ZB=$P(ZB,"/",2) ; handling gpltest:/note situations +"RTN","C0XRDF",47,0) + . S ZC=C0XVOC(ZA) +"RTN","C0XRDF",48,0) + . I ZOBJ["nodeID:" D Q ; +"RTN","C0XRDF",49,0) + . . D ADD(ZARY,"<"_ZB_" xmlns="""_ZC_""" rdf:nodeID="""_$$EXT^C0XUTIL(ZOBJ)_"""/>") +"RTN","C0XRDF",50,0) + . S ZOBJ=$$EXT^C0XUTIL(ZOBJ) +"RTN","C0XRDF",51,0) + . I ZOBJ["http" D Q ; +"RTN","C0XRDF",52,0) + . . D ADD(ZARY,"<"_ZB_" xmlns="""_ZC_""" rdf:resource="""_ZOBJ_"""/>") +"RTN","C0XRDF",53,0) + . I $E(ZOBJ,1,1)="/" D Q ; +"RTN","C0XRDF",54,0) + . . D ADD(ZARY,"<"_ZB_" xmlns="""_ZC_""" rdf:resource="""_ZOBJ_"""/>") +"RTN","C0XRDF",55,0) + . D ADD(ZARY,"<"_ZB_" xmlns="""_ZC_""">"_$$EXT^C0XUTIL(ZOBJ)_"") +"RTN","C0XRDF",56,0) + Q +"RTN","C0XRDF",57,0) + ; +"RTN","C0XRDF",58,0) +DICTEND(ZARY) +"RTN","C0XRDF",59,0) + D ADD(ZARY,"") +"RTN","C0XRDF",60,0) + Q +"RTN","C0XRDF",61,0) + ; +"RTN","C0XRDF",62,0) +LISTEND(ZARY) +"RTN","C0XRDF",63,0) + Q +"RTN","C0XRDF",64,0) + ; +"RTN","C0XRDF",65,0) +REPLYEND(ZARY) +"RTN","C0XRDF",66,0) + D ADD(ZARY,"") +"RTN","C0XRDF",67,0) + Q +"RTN","C0XRDF",68,0) + ; +"RTN","C0XRDF",69,0) +ADD(ZARY,ZELE) +"RTN","C0XRDF",70,0) + N ZI +"RTN","C0XRDF",71,0) + I '$D(ZARY) S @ZARY@(1)=ZELE Q ; +"RTN","C0XRDF",72,0) + S ZI=$O(@ZARY@(""),-1) +"RTN","C0XRDF",73,0) + S @ZARY@(ZI+1)=ZELE +"RTN","C0XRDF",74,0) + Q +"RTN","C0XRDF",75,0) + ; +"RTN","C0XRDF",76,0) +rdfout(rdfout,zary) ; +"RTN","C0XRDF",77,0) + d REPLYSTART("rdfout") +"RTN","C0XRDF",78,0) + d LISTSTART("rdfout","results") +"RTN","C0XRDF",79,0) + n zi s zi="" +"RTN","C0XRDF",80,0) + f s zi=$o(zary(zi)) q:zi="" d ; for each subject +"RTN","C0XRDF",81,0) + . n zii s zii="" +"RTN","C0XRDF",82,0) + . D DICTSTART("rdfout",$$EXT^C0XUTIL(zi)) +"RTN","C0XRDF",83,0) + . f s zii=$o(zary(zi,zii)) q:zii="" d ; for each pred^obj pair +"RTN","C0XRDF",84,0) + . . d DASSERT("rdfout",$p(zii,"^",1),$p(zii,"^",2)) +"RTN","C0XRDF",85,0) + . D DICTEND("rdfout") +"RTN","C0XRDF",86,0) + d LISTEND("rdfout") +"RTN","C0XRDF",87,0) + d REPLYEND("rdfout") +"RTN","C0XRDF",88,0) + q +"RTN","C0XRDF",89,0) + ; +"RTN","C0XTEST") +0^3^B14490662 +"RTN","C0XTEST",1,0) +C0XTEST ; GPL - Fileman Triples bulk load tester ;11/6/11 17:05 +"RTN","C0XTEST",2,0) + ;;0.1;C0X;nopatch;noreleasedate;Build 8 +"RTN","C0XTEST",3,0) + ;Copyright 2011 George Lilly. Licensed under the terms of the GNU +"RTN","C0XTEST",4,0) + ;General Public License See attached copy of the License. +"RTN","C0XTEST",5,0) + ; +"RTN","C0XTEST",6,0) + ;This program is free software; you can redistribute it and/or modify +"RTN","C0XTEST",7,0) + ;it under the terms of the GNU General Public License as published by +"RTN","C0XTEST",8,0) + ;the Free Software Foundation; either version 2 of the License, or +"RTN","C0XTEST",9,0) + ;(at your option) any later version. +"RTN","C0XTEST",10,0) + ; +"RTN","C0XTEST",11,0) + ;This program is distributed in the hope that it will be useful, +"RTN","C0XTEST",12,0) + ;but WITHOUT ANY WARRANTY; without even the implied warranty of +"RTN","C0XTEST",13,0) + ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +"RTN","C0XTEST",14,0) + ;GNU General Public License for more details. +"RTN","C0XTEST",15,0) + ; +"RTN","C0XTEST",16,0) + ;You should have received a copy of the GNU General Public License along +"RTN","C0XTEST",17,0) + ;with this program; if not, write to the Free Software Foundation, Inc., +"RTN","C0XTEST",18,0) + ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +"RTN","C0XTEST",19,0) + ; +"RTN","C0XTEST",20,0) + Q +"RTN","C0XTEST",21,0) + ; +"RTN","C0XTEST",22,0) +EN ; run the test +"RTN","C0XTEST",23,0) + ; +"RTN","C0XTEST",24,0) + k C0XFDA ; clear the node variable +"RTN","C0XTEST",25,0) + i '$d(^C0X(101,0)) d ; global doesn't exist +"RTN","C0XTEST",26,0) + . s ^C0X(101,0)="C0X TRIPLE^172.101^1^1" +"RTN","C0XTEST",27,0) + n zg +"RTN","C0XTEST",28,0) + S zg="_:G"_$$LKY9 ; all nodes are in the same graph +"RTN","C0XTEST",29,0) + n zi +"RTN","C0XTEST",30,0) + f zi=1:1:100000 d ; try a test of 10000 nodes +"RTN","C0XTEST",31,0) + . s C0XFDA(172.101,zi,.01)="N"_$$LKY17 ; node name +"RTN","C0XTEST",32,0) + . s C0XFDA(172.101,zi,.02)=zg +"RTN","C0XTEST",33,0) + . s C0XFDA(172.101,zi,.03)=$R(100000) +"RTN","C0XTEST",34,0) + . s C0XFDA(172.101,zi,.04)=$R(100000) +"RTN","C0XTEST",35,0) + . s C0XFDA(172.101,zi,.05)=$R(100000) +"RTN","C0XTEST",36,0) + S C0XST=$$NOW^XLFDT ; start of the insertion test +"RTN","C0XTEST",37,0) + W !,"INSERTION STARTS AT ",C0XST,! +"RTN","C0XTEST",38,0) + d BULKLOAD(.C0XFDA) +"RTN","C0XTEST",39,0) + s C0XEND=$$NOW^XLFDT ; end of the insertion test +"RTN","C0XTEST",40,0) + W !,"INSERTION ENDS AT ",C0XEND +"RTN","C0XTEST",41,0) + S C0XDIFF=$$FMDIFF^XLFDT(C0XEND,C0XST,2) +"RTN","C0XTEST",42,0) + W !," ELAPSED TIME: ",C0XDIFF," SECONDS" +"RTN","C0XTEST",43,0) + I C0XDIFF>0 W !," APPROXIMATELY ",$P(100000/C0XDIFF,".")," NODES PER SECOND" +"RTN","C0XTEST",44,0) + q +"RTN","C0XTEST",45,0) + ; +"RTN","C0XTEST",46,0) +LKY9() ;EXTRINIC THAT RETURNS A RANDOM 9 DIGIT NUMBER. USED FOR GENERATING +"RTN","C0XTEST",47,0) + ; UNIQUE NODE AND GRAPH NAMES +"RTN","C0XTEST",48,0) + N ZN,ZI +"RTN","C0XTEST",49,0) + S ZN="" +"RTN","C0XTEST",50,0) + F ZI=1:1:9 D ; +"RTN","C0XTEST",51,0) + . S ZN=ZN_$R(10) +"RTN","C0XTEST",52,0) + Q ZN +"RTN","C0XTEST",53,0) + ; +"RTN","C0XTEST",54,0) +LKY17() ;EXTRINIC THAT RETURNS A RANDOM 9 DIGIT NUMBER. USED FOR GENERATING +"RTN","C0XTEST",55,0) + ; UNIQUE NODE AND GRAPH NAMES +"RTN","C0XTEST",56,0) + N ZN,ZI +"RTN","C0XTEST",57,0) + S ZN="" +"RTN","C0XTEST",58,0) + F ZI=1:1:17 D ; +"RTN","C0XTEST",59,0) + . S ZN=ZN_$R(10) +"RTN","C0XTEST",60,0) + Q ZN +"RTN","C0XTEST",61,0) + ; +"RTN","C0XTEST",62,0) +BULKLOAD(ZBFDA) ; BULK LOADER FOR LOADING TRIPLES INTO FILE 172.101 +"RTN","C0XTEST",63,0) + ; USING GLOBAL SETS INSTEAD OF UPDATE^DIE +"RTN","C0XTEST",64,0) + ; QUITS IF FILE IS NOT 172.101 +"RTN","C0XTEST",65,0) + ; EXPECTS AN FDA WITHOUT STRINGS FOR THE IENS, STARTING AT 1 +"RTN","C0XTEST",66,0) + ; QUITS IF FIRST ENTRY IS NOT IENS 1 +"RTN","C0XTEST",67,0) + ; ASSUMES THAT THE LAST IENS IS THE COUNT OF ENTRIES +"RTN","C0XTEST",68,0) + ; ZBFDA IS PASSED BY REFERENCE +"RTN","C0XTEST",69,0) + ; +"RTN","C0XTEST",70,0) + ; -- reserves a block of iens from file 172.101 by locking the zero node +"RTN","C0XTEST",71,0) + ; -- ^C0X(101,0) and adding the count of entries to piece 2 and 3 +"RTN","C0XTEST",72,0) + ; -- then unlocking to minimize the duration of the lock +"RTN","C0XTEST",73,0) + ; +"RTN","C0XTEST",74,0) + W !,"USING BULKLOAD" +"RTN","C0XTEST",75,0) + I '$D(ZBFDA) Q ; EMPTY FDA +"RTN","C0XTEST",76,0) + I $O(ZBFDA(""))'=172.101 Q ; WRONG FILE +"RTN","C0XTEST",77,0) + N ZCNT,ZP3,ZP4 +"RTN","C0XTEST",78,0) + ; -- find the number of nodes to insert +"RTN","C0XTEST",79,0) + S ZCNT=$O(ZBFDA(172.101,""),-1) +"RTN","C0XTEST",80,0) + I ZCNT="" D Q ; +"RTN","C0XTEST",81,0) + . W !,"ERROR IN BULK LOAD - INVALID NODE COUNT" +"RTN","C0XTEST",82,0) + . B +"RTN","C0XTEST",83,0) + ; -- lock the zero node and reserve a block of iens to insert +"RTN","C0XTEST",84,0) + W !,"LOCKING ZERO NODE" +"RTN","C0XTEST",85,0) + LOCK +^C0X(101,0) +"RTN","C0XTEST",86,0) + S ZP3=$P(^C0X(101,0),U,3) +"RTN","C0XTEST",87,0) + S ZP4=$P(^C0X(101,0),U,4) +"RTN","C0XTEST",88,0) + S $P(^C0X(101,0),U,3)=ZP3+ZCNT+1 +"RTN","C0XTEST",89,0) + S $P(^C0X(101,0),U,4)=ZP4+ZCNT+1 +"RTN","C0XTEST",90,0) + LOCK -^C0X(101,0) +"RTN","C0XTEST",91,0) + N ZI,ZN,ZG,ZS,ZP,ZO,ZIEN,ZBASE +"RTN","C0XTEST",92,0) + S ZBASE=ZP3 ; the last ien in the file +"RTN","C0XTEST",93,0) + W !,"ZERO NODE UNLOCKED, IENS RESERVED=",ZCNT +"RTN","C0XTEST",94,0) + W !,$$NOW^XLFDT +"RTN","C0XTEST",95,0) + S ZI="" +"RTN","C0XTEST",96,0) + F S ZI=$O(ZBFDA(172.101,ZI)) Q:ZI="" D ; +"RTN","C0XTEST",97,0) + . S ZN=$G(ZBFDA(172.101,ZI,.01)) ; node name +"RTN","C0XTEST",98,0) + . I ZN="" D BLKERR Q ; +"RTN","C0XTEST",99,0) + . S ZG=$G(ZBFDA(172.101,ZI,.02)) ; graph pointer +"RTN","C0XTEST",100,0) + . I ZG="" D BLKERR Q ; +"RTN","C0XTEST",101,0) + . S ZS=$G(ZBFDA(172.101,ZI,.03)) ; subject pointer +"RTN","C0XTEST",102,0) + . I ZS="" D BLKERR Q ; +"RTN","C0XTEST",103,0) + . S ZP=$G(ZBFDA(172.101,ZI,.04)) ; predicate pointer +"RTN","C0XTEST",104,0) + . I ZP="" D BLKERR Q ; +"RTN","C0XTEST",105,0) + . S ZO=$G(ZBFDA(172.101,ZI,.05)) ; object pointer +"RTN","C0XTEST",106,0) + . I ZO="" D BLKERR Q ; +"RTN","C0XTEST",107,0) + . S ZIEN=ZI+ZBASE ; the new ien +"RTN","C0XTEST",108,0) + . S ^C0X(101,ZIEN,0)=ZN_U_ZG_U_ZS_U_ZP_U_ZO ; set the zero node +"RTN","C0XTEST",109,0) + . S ^C0X(101,"B",ZN,ZIEN)="" ; the B index +"RTN","C0XTEST",110,0) + . S ^C0X(101,"G",ZG,ZIEN)="" ; the G for Graph index +"RTN","C0XTEST",111,0) + . S ^C0X(101,"SPO",ZS,ZP,ZO)="" +"RTN","C0XTEST",112,0) + . S ^C0X(101,"SOP",ZS,ZO,ZP)="" +"RTN","C0XTEST",113,0) + . S ^C0X(101,"OPS",ZO,ZP,ZS)="" +"RTN","C0XTEST",114,0) + . S ^C0X(101,"OSP",ZO,ZS,ZP)="" +"RTN","C0XTEST",115,0) + . S ^C0X(101,"GOPS",ZG,ZO,ZP,ZS)="" +"RTN","C0XTEST",116,0) + . S ^C0X(101,"GOSP",ZG,ZO,ZS,ZP)="" +"RTN","C0XTEST",117,0) + . S ^C0X(101,"GPSO",ZG,ZP,ZS,ZO)="" +"RTN","C0XTEST",118,0) + . S ^C0X(101,"GSPO",ZG,ZS,ZP,ZO)="" +"RTN","C0XTEST",119,0) + Q +"RTN","C0XTEST",120,0) + ; +"RTN","C0XTEST",121,0) +BLKERR ; +"RTN","C0XTEST",122,0) + W !,"ERROR IN BULK LOAD",! ZWR ZBFDA(ZI) +"RTN","C0XTEST",123,0) + B +"RTN","C0XTEST",124,0) + Q +"RTN","C0XTEST",125,0) + ; +"RTN","C0XTKSB") +0^6^B17580555 +"RTN","C0XTKSB",1,0) +C0XTESTKSB ; GPL - Fileman Triples bulk load tester ;11/6/11 17:05 +"RTN","C0XTKSB",2,0) + ; KSB - modified to fix a minor bug and to use;;;;;Build 8 +"RTN","C0XTKSB",3,0) + ; high resolution time if routines available ; 11/19/11 1410 EST +"RTN","C0XTKSB",4,0) + ;;0.1;C0X;nopatch;noreleasedate;Build 1 +"RTN","C0XTKSB",5,0) + ;Copyright 2011 George Lilly. Licensed under the terms of the GNU +"RTN","C0XTKSB",6,0) + ;General Public License See attached copy of the License. +"RTN","C0XTKSB",7,0) + ; +"RTN","C0XTKSB",8,0) + ;This program is free software; you can redistribute it and/or modify +"RTN","C0XTKSB",9,0) + ;it under the terms of the GNU General Public License as published by +"RTN","C0XTKSB",10,0) + ;the Free Software Foundation; either version 2 of the License, or +"RTN","C0XTKSB",11,0) + ;(at your option) any later version. +"RTN","C0XTKSB",12,0) + ; +"RTN","C0XTKSB",13,0) + ;This program is distributed in the hope that it will be useful, +"RTN","C0XTKSB",14,0) + ;but WITHOUT ANY WARRANTY; without even the implied warranty of +"RTN","C0XTKSB",15,0) + ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +"RTN","C0XTKSB",16,0) + ;GNU General Public License for more details. +"RTN","C0XTKSB",17,0) + ; +"RTN","C0XTKSB",18,0) + ;You should have received a copy of the GNU General Public License along +"RTN","C0XTKSB",19,0) + ;with this program; if not, write to the Free Software Foundation, Inc., +"RTN","C0XTKSB",20,0) + ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +"RTN","C0XTKSB",21,0) + ; +"RTN","C0XTKSB",22,0) + Q +"RTN","C0XTKSB",23,0) + ; +"RTN","C0XTKSB",24,0) +EN ; run the test +"RTN","C0XTKSB",25,0) + ; +"RTN","C0XTKSB",26,0) + k C0XFDA ; clear the node variable +"RTN","C0XTKSB",27,0) + s U="^" ; initialization - Bhaskar 20111119 +"RTN","C0XTKSB",28,0) + i '$d(^C0X(101,0)) d ; global doesn't exist +"RTN","C0XTKSB",29,0) + . s ^C0X(101,0)="C0X TRIPLE^172.101^1^1" +"RTN","C0XTKSB",30,0) + n zg +"RTN","C0XTKSB",31,0) + S zg="_:G"_$$LKY9 ; all nodes are in the same graph +"RTN","C0XTKSB",32,0) + n zi +"RTN","C0XTKSB",33,0) + f zi=1:1:10000 d ; try a test of 10000 nodes +"RTN","C0XTKSB",34,0) + . s C0XFDA(172.101,zi,.01)="N"_$$LKY17 ; node name +"RTN","C0XTKSB",35,0) + . s C0XFDA(172.101,zi,.02)=zg +"RTN","C0XTKSB",36,0) + . s C0XFDA(172.101,zi,.03)=$R(100000) +"RTN","C0XTKSB",37,0) + . s C0XFDA(172.101,zi,.04)=$R(100000) +"RTN","C0XTKSB",38,0) + . s C0XFDA(172.101,zi,.05)=$R(100000) +"RTN","C0XTKSB",39,0) + S C0XST=$$H ; start of the insertion test +"RTN","C0XTKSB",40,0) + W !,"INSERTION STARTS AT ",$ZDATE(C0XST,"YEAR-MM-DD:24:60:SS"),! +"RTN","C0XTKSB",41,0) + d BULKLOAD(.C0XFDA) +"RTN","C0XTKSB",42,0) + s C0XEND=$$H ; end of the insertion test +"RTN","C0XTKSB",43,0) + W !,"INSERTION ENDS AT ",$ZDATE(C0XEND,"YEAR-MM-DD:24:60:SS") +"RTN","C0XTKSB",44,0) + S C0XDIFF=(86400*($P(C0XEND,",",1)-$P(C0XST,",",1)))+$P(C0XEND,",",2)-$P(C0XST,",",2) +"RTN","C0XTKSB",45,0) + W !," ELAPSED TIME: ",C0XDIFF," SECONDS" +"RTN","C0XTKSB",46,0) + W ! +"RTN","C0XTKSB",47,0) + W:C0XDIFF>0 " APPROXIMATELY ",$FN(10000/C0XDIFF,",",0)," NODES PER SECOND",! +"RTN","C0XTKSB",48,0) + q +"RTN","C0XTKSB",49,0) + ; +"RTN","C0XTKSB",50,0) +LKY9() ;EXTRINIC THAT RETURNS A RANDOM 9 DIGIT NUMBER. USED FOR GENERATING +"RTN","C0XTKSB",51,0) + ; UNIQUE NODE AND GRAPH NAMES +"RTN","C0XTKSB",52,0) + N ZN,ZI +"RTN","C0XTKSB",53,0) + S ZN="" +"RTN","C0XTKSB",54,0) + F ZI=1:1:9 D ; +"RTN","C0XTKSB",55,0) + . S ZN=ZN_$R(10) +"RTN","C0XTKSB",56,0) + Q ZN +"RTN","C0XTKSB",57,0) + ; +"RTN","C0XTKSB",58,0) +LKY17() ;EXTRINIC THAT RETURNS A RANDOM 9 DIGIT NUMBER. USED FOR GENERATING +"RTN","C0XTKSB",59,0) + ; UNIQUE NODE AND GRAPH NAMES +"RTN","C0XTKSB",60,0) + N ZN,ZI +"RTN","C0XTKSB",61,0) + S ZN="" +"RTN","C0XTKSB",62,0) + F ZI=1:1:17 D ; +"RTN","C0XTKSB",63,0) + . S ZN=ZN_$R(10) +"RTN","C0XTKSB",64,0) + Q ZN +"RTN","C0XTKSB",65,0) + ; +"RTN","C0XTKSB",66,0) +BULKLOAD(ZBFDA) ; BULK LOADER FOR LOADING TRIPLES INTO FILE 172.101 +"RTN","C0XTKSB",67,0) + ; USING GLOBAL SETS INSTEAD OF UPDATE^DIE +"RTN","C0XTKSB",68,0) + ; QUITS IF FILE IS NOT 172.101 +"RTN","C0XTKSB",69,0) + ; EXPECTS AN FDA WITHOUT STRINGS FOR THE IENS, STARTING AT 1 +"RTN","C0XTKSB",70,0) + ; QUITS IF FIRST ENTRY IS NOT IENS 1 +"RTN","C0XTKSB",71,0) + ; ASSUMES THAT THE LAST IENS IS THE COUNT OF ENTRIES +"RTN","C0XTKSB",72,0) + ; ZBFDA IS PASSED BY REFERENCE +"RTN","C0XTKSB",73,0) + ; +"RTN","C0XTKSB",74,0) + ; -- reserves a block of iens from file 172.101 by locking the zero node +"RTN","C0XTKSB",75,0) + ; -- ^C0X(101,0) and adding the count of entries to piece 2 and 3 +"RTN","C0XTKSB",76,0) + ; -- then unlocking to minimize the duration of the lock +"RTN","C0XTKSB",77,0) + ; +"RTN","C0XTKSB",78,0) + W !,"USING BULKLOAD" +"RTN","C0XTKSB",79,0) + I '$D(ZBFDA) Q ; EMPTY FDA +"RTN","C0XTKSB",80,0) + I $O(ZBFDA(""))'=172.101 Q ; WRONG FILE +"RTN","C0XTKSB",81,0) + N ZCNT,ZP3,ZP4 +"RTN","C0XTKSB",82,0) + ; -- find the number of nodes to insert +"RTN","C0XTKSB",83,0) + S ZCNT=$O(ZBFDA(172.101,""),-1) +"RTN","C0XTKSB",84,0) + I ZCNT="" D Q ; +"RTN","C0XTKSB",85,0) + . W !,"ERROR IN BULK LOAD - INVALID NODE COUNT" +"RTN","C0XTKSB",86,0) + . B +"RTN","C0XTKSB",87,0) + ; -- lock the zero node and reserve a block of iens to insert +"RTN","C0XTKSB",88,0) + W !,"LOCKING ZERO NODE" +"RTN","C0XTKSB",89,0) + LOCK +^C0X(101,0) +"RTN","C0XTKSB",90,0) + S ZP3=$P(^C0X(101,0),U,3) +"RTN","C0XTKSB",91,0) + S ZP4=$P(^C0X(101,0),U,4) +"RTN","C0XTKSB",92,0) + S $P(^C0X(101,0),U,3)=ZP3+ZCNT+1 +"RTN","C0XTKSB",93,0) + S $P(^C0X(101,0),U,4)=ZP4+ZCNT+1 +"RTN","C0XTKSB",94,0) + LOCK -^C0X(101,0) +"RTN","C0XTKSB",95,0) + N ZI,ZN,ZG,ZS,ZP,ZO,ZIEN,ZBASE +"RTN","C0XTKSB",96,0) + S ZBASE=ZP3 ; the last ien in the file +"RTN","C0XTKSB",97,0) + W !,"ZERO NODE UNLOCKED, IENS RESERVED=",ZCNT +"RTN","C0XTKSB",98,0) + W !,$ZDATE($$H,"YEAR-MM-DD:24:60:SS") +"RTN","C0XTKSB",99,0) + S ZI="" +"RTN","C0XTKSB",100,0) + F S ZI=$O(ZBFDA(172.101,ZI)) Q:ZI="" D ; +"RTN","C0XTKSB",101,0) + . S ZN=$G(ZBFDA(172.101,ZI,.01)) ; node name +"RTN","C0XTKSB",102,0) + . I ZN="" D BLKERR Q ; +"RTN","C0XTKSB",103,0) + . S ZG=$G(ZBFDA(172.101,ZI,.02)) ; graph pointer +"RTN","C0XTKSB",104,0) + . I ZG="" D BLKERR Q ; +"RTN","C0XTKSB",105,0) + . S ZS=$G(ZBFDA(172.101,ZI,.03)) ; subject pointer +"RTN","C0XTKSB",106,0) + . I ZS="" D BLKERR Q ; +"RTN","C0XTKSB",107,0) + . S ZP=$G(ZBFDA(172.101,ZI,.04)) ; predicate pointer +"RTN","C0XTKSB",108,0) + . I ZP="" D BLKERR Q ; +"RTN","C0XTKSB",109,0) + . S ZO=$G(ZBFDA(172.101,ZI,.05)) ; object pointer +"RTN","C0XTKSB",110,0) + . I ZO="" D BLKERR Q ; +"RTN","C0XTKSB",111,0) + . S ZIEN=ZI+ZBASE ; the new ien +"RTN","C0XTKSB",112,0) + . S ^C0X(101,ZIEN,0)=ZN_U_ZG_U_ZS_U_ZP_U_ZO ; set the zero node +"RTN","C0XTKSB",113,0) + . S ^C0X(101,"B",ZN,ZIEN)="" ; the B index +"RTN","C0XTKSB",114,0) + . S ^C0X(101,"G",ZG,ZIEN)="" ; the G for Graph index +"RTN","C0XTKSB",115,0) + . S ^C0X(101,"SPO",ZS,ZP,ZO)="" +"RTN","C0XTKSB",116,0) + . S ^C0X(101,"SOP",ZS,ZO,ZP)="" +"RTN","C0XTKSB",117,0) + . S ^C0X(101,"OPS",ZO,ZP,ZS)="" +"RTN","C0XTKSB",118,0) + . S ^C0X(101,"OSP",ZO,ZS,ZP)="" +"RTN","C0XTKSB",119,0) + . S ^C0X(101,"GOPS",ZG,ZO,ZP,ZS)="" +"RTN","C0XTKSB",120,0) + . S ^C0X(101,"GOSP",ZG,ZO,ZS,ZP)="" +"RTN","C0XTKSB",121,0) + . S ^C0X(101,"GPSO",ZG,ZP,ZS,ZO)="" +"RTN","C0XTKSB",122,0) + . S ^C0X(101,"GSPO",ZG,ZS,ZP,ZO)="" +"RTN","C0XTKSB",123,0) + Q +"RTN","C0XTKSB",124,0) + ; +"RTN","C0XTKSB",125,0) +BLKERR ; +"RTN","C0XTKSB",126,0) + W !,"ERROR IN BULK LOAD",! ZWR ZBFDA(ZI) +"RTN","C0XTKSB",127,0) + B +"RTN","C0XTKSB",128,0) + Q +"RTN","C0XTKSB",129,0) + ; +"RTN","C0XTKSB",130,0) +H() +"RTN","C0XTKSB",131,0) + quit:$length($ztrnlnm("GTMXC_posix"))&$length($text(zhorolog^%POSIX)) $$zhorolog^%POSIX quit $horolog +"RTN","C0XUTIL") +0^5^B11155926 +"RTN","C0XUTIL",1,0) +C0XUTIL ; GPL - Fileman Triples utilities ;11/07/11 17:05 +"RTN","C0XUTIL",2,0) + ;;0.1;C0X;nopatch;noreleasedate;Build 8 +"RTN","C0XUTIL",3,0) + ;Copyright 2011 George Lilly. Licensed under the terms of the GNU +"RTN","C0XUTIL",4,0) + ;General Public License See attached copy of the License. +"RTN","C0XUTIL",5,0) + ; +"RTN","C0XUTIL",6,0) + ;This program is free software; you can redistribute it and/or modify +"RTN","C0XUTIL",7,0) + ;it under the terms of the GNU General Public License as published by +"RTN","C0XUTIL",8,0) + ;the Free Software Foundation; either version 2 of the License, or +"RTN","C0XUTIL",9,0) + ;(at your option) any later version. +"RTN","C0XUTIL",10,0) + ; +"RTN","C0XUTIL",11,0) + ;This program is distributed in the hope that it will be useful, +"RTN","C0XUTIL",12,0) + ;but WITHOUT ANY WARRANTY; without even the implied warranty of +"RTN","C0XUTIL",13,0) + ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +"RTN","C0XUTIL",14,0) + ;GNU General Public License for more details. +"RTN","C0XUTIL",15,0) + ; +"RTN","C0XUTIL",16,0) + ;You should have received a copy of the GNU General Public License along +"RTN","C0XUTIL",17,0) + ;with this program; if not, write to the Free Software Foundation, Inc., +"RTN","C0XUTIL",18,0) + ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +"RTN","C0XUTIL",19,0) + ; +"RTN","C0XUTIL",20,0) + Q +"RTN","C0XUTIL",21,0) + ; +"RTN","C0XUTIL",22,0) +NSP(ZX) ; OUTPUT TRANSFORM EXTRINSIC +"RTN","C0XUTIL",23,0) + ; +"RTN","C0XUTIL",24,0) + N ZR +"RTN","C0XUTIL",25,0) + ; I WOULD REALLY LIKE TO NOT HAVE THE FILE NUMBER HARD CODED HERE +"RTN","C0XUTIL",26,0) + ; ANYONE KNOW HOW I COULD DO THAT? :) GPL +"RTN","C0XUTIL",27,0) + S ZR=$$GET1^DIQ(172.201,ZX_",",.01) +"RTN","C0XUTIL",28,0) + I '$D(C0XNSP) S C0XNSP=1 ; DEFAULT ON +"RTN","C0XUTIL",29,0) + I C0XNSP=0 Q ZR ; SWITCHED OFF +"RTN","C0XUTIL",30,0) + I '$D(C0XVOC) D VOCINIT ; INITIALIZE THE VOCABULARIES +"RTN","C0XUTIL",31,0) + N ZI,ZJ,ZK S ZI="" +"RTN","C0XUTIL",32,0) + N DONE S DONE=0 +"RTN","C0XUTIL",33,0) + F S ZI=$O(C0XVOC(ZI)) Q:(DONE=1)!(ZI="") D ; +"RTN","C0XUTIL",34,0) + . ;W !,ZI +"RTN","C0XUTIL",35,0) + . S ZJ=C0XVOC(ZI) +"RTN","C0XUTIL",36,0) + . S ZK=$P(ZR,ZJ,2) +"RTN","C0XUTIL",37,0) + . ;W !,"ZK=",ZK +"RTN","C0XUTIL",38,0) + . I ZK'="" D ; BINGO +"RTN","C0XUTIL",39,0) + . . S ZR=ZI_":"_ZK +"RTN","C0XUTIL",40,0) + . . S DONE=1 +"RTN","C0XUTIL",41,0) + Q ZR +"RTN","C0XUTIL",42,0) + ; +"RTN","C0XUTIL",43,0) +VOCINIT ; INITIALIZE VOCABULARIES +"RTN","C0XUTIL",44,0) + S C0XVOC("dcterms")="http://purl.org/dc/terms/" +"RTN","C0XUTIL",45,0) + S C0XVOC("rdf")="http://www.w3.org/1999/02/22-rdf-syntax-ns#" +"RTN","C0XUTIL",46,0) + S C0XVOC("sp")="http://smartplatforms.org/terms#" +"RTN","C0XUTIL",47,0) + S C0XVOC("qds")="http://cms.gov/pqri/qds/" +"RTN","C0XUTIL",48,0) + S C0XVOC("smart")="http://sandbox-api.smartplatforms.org/records/" +"RTN","C0XUTIL",49,0) + S C0XVOC("snomed")="http://purl.bioontology.org/ontology/SNOMEDCT/" +"RTN","C0XUTIL",50,0) + S C0XVOC("rxnorm")="http://purl.bioontology.org/ontology/RXNORM/" +"RTN","C0XUTIL",51,0) + S C0XVOC("loinc")="http://purl.bioontology.org/ontology/LNC/" +"RTN","C0XUTIL",52,0) + S C0XVOC("file")="/home/glilly/fmts/trunk/samples/" +"RTN","C0XUTIL",53,0) + S C0XVOC("foaf")="http://xmlns.com/foaf/0.1/" +"RTN","C0XUTIL",54,0) + S C0XVOC("skos")="http://www.w3.org/2004/02/skos/core#" +"RTN","C0XUTIL",55,0) + S C0XVOC("gpl")="http://georgetriples.org/" +"RTN","C0XUTIL",56,0) + S C0XVOC("cg")="http://datasets.caregraf.org/" +"RTN","C0XUTIL",57,0) + S C0XVOC("mv")="http://metavista.name/foundation#" +"RTN","C0XUTIL",58,0) + S C0XVOC("rdfs")="http://www.w3.org/2000/01/rdf-schema#" +"RTN","C0XUTIL",59,0) + S C0XVOC("vistaSmart")="https://smart2.vistaewd.net/vista/smart/records/" +"RTN","C0XUTIL",60,0) + S C0XVOC("vmu")="http://vista.org/mu/" +"RTN","C0XUTIL",61,0) + S C0XVOC("vq")="http://vista.org/quality/" +"RTN","C0XUTIL",62,0) + S C0XVOC("nodeID")="iDPsDPss" +"RTN","C0XUTIL",63,0) + S C0XVOC("fmts")="http://glilly.net/fmts#" +"RTN","C0XUTIL",64,0) + S C0XVOC("oro")="http://oro.com/vista/sage" ;change to get URL from system +"RTN","C0XUTIL",65,0) + S C0XVOC("sage")="http://oro.com/sage/schema#" +"RTN","C0XUTIL",66,0) + S C0XVOC("v")="http://www.w3.org/2006/vcard/ns#" +"RTN","C0XUTIL",67,0) + Q +"RTN","C0XUTIL",68,0) + ; +"RTN","C0XUTIL",69,0) +EXT(C0XIN) ; EXTRINSIC WHICH EXPANDS NAMESPACES +"RTN","C0XUTIL",70,0) + ; SO skos:xxx would return http://www.w3.org/2004/02/skos/core#xxx +"RTN","C0XUTIL",71,0) + N C0XPRE +"RTN","C0XUTIL",72,0) + S C0XPRE=C0XIN +"RTN","C0XUTIL",73,0) + I '$D(C0XVOC) D VOCINIT ; INITIALIZE NAME SPACE TABLE +"RTN","C0XUTIL",74,0) + I C0XPRE[":" D ; expand using vocabulary +"RTN","C0XUTIL",75,0) + . N ZB,ZA +"RTN","C0XUTIL",76,0) + . S ZB=$P(C0XPRE,":",1) +"RTN","C0XUTIL",77,0) + . S ZA=$P(C0XPRE,":",2) +"RTN","C0XUTIL",78,0) + . I $G(C0XVOC(ZB))'="" D ; +"RTN","C0XUTIL",79,0) + . . S C0XPRE=C0XVOC(ZB)_ZA ; expanded +"RTN","C0XUTIL",80,0) + Q C0XPRE +"RTN","C0XUTIL",81,0) + ; +"SEC","^DIC",172.101,172.101,0,"AUDIT") +@ +"SEC","^DIC",172.101,172.101,0,"DD") +@ +"SEC","^DIC",172.101,172.101,0,"DEL") +@ +"SEC","^DIC",172.101,172.101,0,"LAYGO") +@ +"SEC","^DIC",172.101,172.101,0,"RD") +@ +"SEC","^DIC",172.101,172.101,0,"WR") +@ +"SEC","^DIC",172.201,172.201,0,"AUDIT") +@ +"SEC","^DIC",172.201,172.201,0,"DD") +@ +"SEC","^DIC",172.201,172.201,0,"DEL") +@ +"SEC","^DIC",172.201,172.201,0,"LAYGO") +@ +"SEC","^DIC",172.201,172.201,0,"RD") +@ +"SEC","^DIC",172.201,172.201,0,"WR") +@ +"VER") +8.0^22.0 +"^DD",172.101,172.101,0) +FIELD^^.05^6 +"^DD",172.101,172.101,0,"DDA") +N +"^DD",172.101,172.101,0,"DT") +3111013 +"^DD",172.101,172.101,0,"ID",.02) +S %I=Y,Y=$S('$D(^(0)):"",$D(^C0X(201,+$P(^(0),U,2),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(172.201,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I +"^DD",172.101,172.101,0,"ID",.03) +S %I=Y,Y=$S('$D(^(0)):"",$D(^C0X(201,+$P(^(0),U,3),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(172.201,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I +"^DD",172.101,172.101,0,"ID",.04) +S %I=Y,Y=$S('$D(^(0)):"",$D(^C0X(201,+$P(^(0),U,4),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(172.201,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I +"^DD",172.101,172.101,0,"ID",.05) +S %I=Y,Y=$S('$D(^(0)):"",$D(^C0X(201,+$P(^(0),U,5),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(172.201,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I +"^DD",172.101,172.101,0,"IX","B",172.101,.01) + +"^DD",172.101,172.101,0,"NM","C0X TRIPLE") + +"^DD",172.101,172.101,.01,0) +NODEID^RF^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X +"^DD",172.101,172.101,.01,.1) +TRIPLE NODE ID +"^DD",172.101,172.101,.01,1,0) +^.1 +"^DD",172.101,172.101,.01,1,1,0) +172.101^B +"^DD",172.101,172.101,.01,1,1,1) +S ^C0X(101,"B",$E(X,1,30),DA)="" +"^DD",172.101,172.101,.01,1,1,2) +K ^C0X(101,"B",$E(X,1,30),DA) +"^DD",172.101,172.101,.01,3) +Answer must be 3-30 characters in length +"^DD",172.101,172.101,.01,"DT") +3111013 +"^DD",172.101,172.101,.02,0) +GRAPH^P172.201O^C0X(201,^0;2^Q +"^DD",172.101,172.101,.02,.1) +TRIPLE GRAPH +"^DD",172.101,172.101,.02,2) +S Y(0)=Y S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.02,2.1) +S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.02,3) +Answer must be 3-240 characters in length +"^DD",172.101,172.101,.02,"DT") +3111207 +"^DD",172.101,172.101,.03,0) +SUBJECT^P172.201O^C0X(201,^0;3^Q +"^DD",172.101,172.101,.03,.1) +TRIPLE SUBJECT +"^DD",172.101,172.101,.03,2) +S Y(0)=Y S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.03,2.1) +S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.03,"DT") +3111207 +"^DD",172.101,172.101,.04,0) +PREDICATE^P172.201O^C0X(201,^0;4^Q +"^DD",172.101,172.101,.04,.1) +TRIPLE PREDICATE +"^DD",172.101,172.101,.04,2) +S Y(0)=Y S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.04,2.1) +S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.04,"DT") +3111207 +"^DD",172.101,172.101,.05,0) +OBJECT^P172.201O^C0X(201,^0;5^Q +"^DD",172.101,172.101,.05,.1) +TRIPLE OBJECT +"^DD",172.101,172.101,.05,2) +S Y(0)=Y S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.05,2.1) +S Y=$$NSP^C0XUTIL(Y) +"^DD",172.101,172.101,.05,"DT") +3111207 +"^DD",172.101,172.101,1,0) +EVENTS^172.1011V^^1;0 +"^DD",172.101,172.1011,0) +EVENTS SUB-FIELD^^.01^1 +"^DD",172.101,172.1011,0,"DT") +3110510 +"^DD",172.101,172.1011,0,"IX","B",172.1011,.01) + +"^DD",172.101,172.1011,0,"NM","EVENTS") + +"^DD",172.101,172.1011,0,"UP") +172.101 +"^DD",172.101,172.1011,.01,0) +EVENTS^V^^0;1^ +"^DD",172.101,172.1011,.01,.1) +PATIENT CLINICAL EVENTS +"^DD",172.101,172.1011,.01,1,0) +^.1 +"^DD",172.101,172.1011,.01,1,1,0) +172.1011^B +"^DD",172.101,172.1011,.01,1,1,1) +S ^C0CXREF(DA(1),1,"B",$E(X,1,30),DA)="" +"^DD",172.101,172.1011,.01,1,1,2) +K ^C0CXREF(DA(1),1,"B",$E(X,1,30),DA) +"^DD",172.101,172.1011,.01,1,1,3) +Required for Variable Pointer +"^DD",172.101,172.1011,.01,"DT") +3110510 +"^DD",172.101,172.1011,.01,"V",0) +^.12P^^3 +"^DD",172.101,172.1011,.01,"V",1,0) +55^MEDICATIONS^1^M^n^y +"^DD",172.101,172.1011,.01,"V",1,1) + +"^DD",172.101,172.1011,.01,"V",1,2) + +"^DD",172.101,172.1011,.01,"V",2,0) +9000011^PATIENT PROBLEM^2^P^n^y +"^DD",172.101,172.1011,.01,"V",2,1) + +"^DD",172.101,172.1011,.01,"V",2,2) + +"^DD",172.101,172.1011,.01,"V",3,0) +69^PATIENT LAB ORDER^3^L^n^y +"^DD",172.201,172.201,0) +FIELD^^1^2 +"^DD",172.201,172.201,0,"DDA") +N +"^DD",172.201,172.201,0,"DT") +3111013 +"^DD",172.201,172.201,0,"NM","C0X STRING") + +"^DD",172.201,172.201,0,"PT",172.101,.02) + +"^DD",172.201,172.201,0,"PT",172.101,.03) + +"^DD",172.201,172.201,0,"PT",172.101,.04) + +"^DD",172.201,172.201,0,"PT",172.101,.05) + +"^DD",172.201,172.201,.01,0) +STRING^RF^^0;1^K:$L(X)>240!($L(X)<1)!'(X=X) X +"^DD",172.201,172.201,.01,.1) +TRIPLE STRING +"^DD",172.201,172.201,.01,1,0) +^.1^^0 +"^DD",172.201,172.201,.01,3) +Answer must be 1-240 characters in length +"^DD",172.201,172.201,.01,"DT") +3111028 +"^DD",172.201,172.201,1,0) +TEXT^172.2011^^1;0 +"^DD",172.201,172.2011,0) +TEXT SUB-FIELD^^.01^1 +"^DD",172.201,172.2011,0,"DT") +3111013 +"^DD",172.201,172.2011,0,"NM","TEXT") + +"^DD",172.201,172.2011,0,"UP") +172.201 +"^DD",172.201,172.2011,.01,0) +TEXT^Wx^^0;1 +"^DD",172.201,172.2011,.01,.1) +LONGER TEXT +"^DD",172.201,172.2011,.01,"DT") +3111013 +"^DIC",172.101,172.101,0) +C0X TRIPLE^172.101 +"^DIC",172.101,172.101,0,"GL") +^C0X(101, +"^DIC",172.101,"B","C0X TRIPLE",172.101) + +"^DIC",172.201,172.201,0) +C0X STRING^172.201 +"^DIC",172.201,172.201,0,"GL") +^C0X(201, +"^DIC",172.201,"B","C0X STRING",172.201) + +**END** +**END**