KIDS Distribution saved on Jul 26, 2009@12:14:13 XB 4.0 for WorldVista **KIDS**:XB 4.0^ **INSTALL NAME** XB 4.0 "BLD",7416,0) XB 4.0^IHS/VA UTILITIES^0^3090726^y "BLD",7416,1,0) ^^1^1^3090720^ "BLD",7416,1,1,0) XB Utils for GT.M. "BLD",7416,4,0) ^9.64PA^^ "BLD",7416,6.3) 3 "BLD",7416,"INI") "BLD",7416,"INIT") "BLD",7416,"KRN",0) ^9.67PA^9002226^20 "BLD",7416,"KRN",.4,0) .4 "BLD",7416,"KRN",.4,"NM",0) ^9.68A^2^2 "BLD",7416,"KRN",.4,"NM",1,0) XB - FILES MARKED FOR DELETION FILE #1^1^0 "BLD",7416,"KRN",.4,"NM",2,0) XBILL FILE #52^52^0 "BLD",7416,"KRN",.4,"NM","B","XB - FILES MARKED FOR DELETION FILE #1",1) "BLD",7416,"KRN",.4,"NM","B","XBILL FILE #52",2) "BLD",7416,"KRN",.401,0) .401 "BLD",7416,"KRN",.401,"NM",0) ^9.68A^1^1 "BLD",7416,"KRN",.401,"NM",1,0) XB - FILES MARKED FOR DELETION FILE #1^1^0 "BLD",7416,"KRN",.401,"NM","B","XB - FILES MARKED FOR DELETION FILE #1",1) "BLD",7416,"KRN",.402,0) .402 "BLD",7416,"KRN",.403,0) .403 "BLD",7416,"KRN",.5,0) .5 "BLD",7416,"KRN",.84,0) .84 "BLD",7416,"KRN",3.6,0) 3.6 "BLD",7416,"KRN",3.8,0) 3.8 "BLD",7416,"KRN",9.2,0) 9.2 "BLD",7416,"KRN",9.8,0) 9.8 "BLD",7416,"KRN",9.8,"NM",0) ^9.68A^225^225 "BLD",7416,"KRN",9.8,"NM",1,0) XB^^0^B37697009 "BLD",7416,"KRN",9.8,"NM",2,0) XB1^^0^B47144386 "BLD",7416,"KRN",9.8,"NM",3,0) XB3P9^^0^B36139635 "BLD",7416,"KRN",9.8,"NM",4,0) XBARRAY^^0^B27244164 "BLD",7416,"KRN",9.8,"NM",5,0) XBARRAY0^^0^B103574 "BLD",7416,"KRN",9.8,"NM",6,0) XBBJ^^0^B29158 "BLD",7416,"KRN",9.8,"NM",7,0) XBBPI^^0^B15822267 "BLD",7416,"KRN",9.8,"NM",8,0) XBCDIC^^0^B18807629 "BLD",7416,"KRN",9.8,"NM",9,0) XBCDIC2^^0^B46982439 "BLD",7416,"KRN",9.8,"NM",10,0) XBCDIC3^^0^B34717825 "BLD",7416,"KRN",9.8,"NM",11,0) XBCDICD^^0^B2350351 "BLD",7416,"KRN",9.8,"NM",12,0) XBCFIX^^0^B4994700 "BLD",7416,"KRN",9.8,"NM",13,0) XBCFXREF^^0^B23667081 "BLD",7416,"KRN",9.8,"NM",14,0) XBCLM^^0^B1921883 "BLD",7416,"KRN",9.8,"NM",15,0) XBCLS^^0^B24575 "BLD",7416,"KRN",9.8,"NM",16,0) XBCNODE^^0^B1191075 "BLD",7416,"KRN",9.8,"NM",17,0) XBCOUNT^^0^B3536202 "BLD",7416,"KRN",9.8,"NM",18,0) XBCSPC^^0^B17633223 "BLD",7416,"KRN",9.8,"NM",19,0) XBDAD0^^0^B705863 "BLD",7416,"KRN",9.8,"NM",20,0) XBDANGLE^^0^B23368151 "BLD",7416,"KRN",9.8,"NM",21,0) XBDATE^^0^B5595895 "BLD",7416,"KRN",9.8,"NM",22,0) XBDBQDOC^^0^B2221739 "BLD",7416,"KRN",9.8,"NM",23,0) XBDBQUE^^0^B40820945 "BLD",7416,"KRN",9.8,"NM",24,0) XBDELR^^0^B1016011 "BLD",7416,"KRN",9.8,"NM",25,0) XBDH^^0^B2501910 "BLD",7416,"KRN",9.8,"NM",26,0) XBDHD^^0^B19435568 "BLD",7416,"KRN",9.8,"NM",27,0) XBDHD1^^0^B5053033 "BLD",7416,"KRN",9.8,"NM",28,0) XBDHD2^^0^B27257893 "BLD",7416,"KRN",9.8,"NM",29,0) XBDHDF^^0^B13277751 "BLD",7416,"KRN",9.8,"NM",30,0) XBDHDF1^^0^B3011067 "BLD",7416,"KRN",9.8,"NM",31,0) XBDHDIP^^0^B370984 "BLD",7416,"KRN",9.8,"NM",32,0) XBDHDSP^^0^B13412865 "BLD",7416,"KRN",9.8,"NM",33,0) XBDHDSV^^0^B14403878 "BLD",7416,"KRN",9.8,"NM",34,0) XBDHNTEG^^0^B2677678 "BLD",7416,"KRN",9.8,"NM",35,0) XBDICV^^0^B10779618 "BLD",7416,"KRN",9.8,"NM",36,0) XBDIE^^0^B4579351 "BLD",7416,"KRN",9.8,"NM",37,0) XBDIFF^^0^B1819252 "BLD",7416,"KRN",9.8,"NM",38,0) XBDINUM^^0^B7807636 "BLD",7416,"KRN",9.8,"NM",39,0) XBDIQ0^^0^B10954 "BLD",7416,"KRN",9.8,"NM",40,0) XBDIQ1^^0^B23534230 "BLD",7416,"KRN",9.8,"NM",41,0) XBDIR^^0^B1426428 "BLD",7416,"KRN",9.8,"NM",42,0) XBDR^^0^B8732246 "BLD",7416,"KRN",9.8,"NM",43,0) XBDR1^^0^B16611832 "BLD",7416,"KRN",9.8,"NM",44,0) XBDSET^^0^B21552778 "BLD",7416,"KRN",9.8,"NM",45,0) XBDT^^0^B5853981 "BLD",7416,"KRN",9.8,"NM",46,0) XBEHRCK^^0^B72927543 "BLD",7416,"KRN",9.8,"NM",47,0) XBENHANC^^0^B4107547 "BLD",7416,"KRN",9.8,"NM",48,0) XBFCMP^^0^B24082313 "BLD",7416,"KRN",9.8,"NM",49,0) XBFDINFO^^0^B4300016 "BLD",7416,"KRN",9.8,"NM",50,0) XBFIXL1^^0^B13992025 "BLD",7416,"KRN",9.8,"NM",51,0) XBFIXPT^^0^B10219411 "BLD",7416,"KRN",9.8,"NM",52,0) XBFLD^^0^B37077244 "BLD",7416,"KRN",9.8,"NM",53,0) XBFLD0^^0^B1410305 "BLD",7416,"KRN",9.8,"NM",54,0) XBFLD2^^0^B5115759 "BLD",7416,"KRN",9.8,"NM",55,0) XBFLDO^^0^B22108482 "BLD",7416,"KRN",9.8,"NM",56,0) XBFMK^^0^B1109784 "BLD",7416,"KRN",9.8,"NM",57,0) XBFNC^^0^B48630008 "BLD",7416,"KRN",9.8,"NM",58,0) XBFORM^^0^B36016821 "BLD",7416,"KRN",9.8,"NM",59,0) XBFORM0^^0^B3346740 "BLD",7416,"KRN",9.8,"NM",60,0) XBFORM1^^0^B2920807 "BLD",7416,"KRN",9.8,"NM",61,0) XBFRESET^^0^B3733840 "BLD",7416,"KRN",9.8,"NM",62,0) XBFUNC^^0^B8489767 "BLD",7416,"KRN",9.8,"NM",63,0) XBFUNC1^^0^B3264910 "BLD",7416,"KRN",9.8,"NM",64,0) XBFUNC2^^0^B10310135 "BLD",7416,"KRN",9.8,"NM",65,0) XBGC^^0^B9459897 "BLD",7416,"KRN",9.8,"NM",66,0) XBGCMP^^0^B41229292 "BLD",7416,"KRN",9.8,"NM",67,0) XBGCMP2^^0^B4315241 "BLD",7416,"KRN",9.8,"NM",68,0) XBGL^^0^B6934739 "BLD",7416,"KRN",9.8,"NM",69,0) XBGLDFN^^0^B1910868 "BLD",7416,"KRN",9.8,"NM",70,0) XBGSAVE^^0^B11967447 "BLD",7416,"KRN",9.8,"NM",71,0) XBGXFR^^0^B1300319 "BLD",7416,"KRN",9.8,"NM",72,0) XBGXREFS^^0^B731832 "BLD",7416,"KRN",9.8,"NM",73,0) XBHEDD^^0^B15995219 "BLD",7416,"KRN",9.8,"NM",74,0) XBHEDD1^^0^B10295028 "BLD",7416,"KRN",9.8,"NM",75,0) XBHEDD10^^0^B18155092 "BLD",7416,"KRN",9.8,"NM",76,0) XBHEDD11^^0^B9000233 "BLD",7416,"KRN",9.8,"NM",77,0) XBHEDD12^^0^B7419359 "BLD",7416,"KRN",9.8,"NM",78,0) XBHEDD13^^0^B11453020 "BLD",7416,"KRN",9.8,"NM",79,0) XBHEDD2^^0^B5129803 "BLD",7416,"KRN",9.8,"NM",80,0) XBHEDD3^^0^B4074907 "BLD",7416,"KRN",9.8,"NM",81,0) XBHEDD4^^0^B18984466 "BLD",7416,"KRN",9.8,"NM",82,0) XBHEDD5^^0^B10119169 "BLD",7416,"KRN",9.8,"NM",83,0) XBHEDD6^^0^B16116948 "BLD",7416,"KRN",9.8,"NM",84,0) XBHEDD7^^0^B8240740 "BLD",7416,"KRN",9.8,"NM",85,0) XBHEDD8^^0^B11857919 "BLD",7416,"KRN",9.8,"NM",86,0) XBHEDD9^^0^B19958072 "BLD",7416,"KRN",9.8,"NM",87,0) XBHEDDH1^^0^B18812531 "BLD",7416,"KRN",9.8,"NM",88,0) XBHEDDH2^^0^B15674331 "BLD",7416,"KRN",9.8,"NM",89,0) XBHEDDH3^^0^B14819998 "BLD",7416,"KRN",9.8,"NM",90,0) XBHEDDH4^^0^B4933763 "BLD",7416,"KRN",9.8,"NM",91,0) XBHEDDM^^0^B5651587 "BLD",7416,"KRN",9.8,"NM",92,0) XBHELP^^0^B395714 "BLD",7416,"KRN",9.8,"NM",93,0) XBHFMAN^^0^B16278226 "BLD",7416,"KRN",9.8,"NM",94,0) XBHFMAN1^^0^B21257543 "BLD",7416,"KRN",9.8,"NM",95,0) XBHFMAN2^^0^B8591753 "BLD",7416,"KRN",9.8,"NM",96,0) XBINIT^^0^B15577763 "BLD",7416,"KRN",9.8,"NM",97,0) XBINTEG^^0^B14367304 "BLD",7416,"KRN",9.8,"NM",98,0) XBIV^^0^B88787 "BLD",7416,"KRN",9.8,"NM",99,0) XBKD^^0^B46417857 "BLD",7416,"KRN",9.8,"NM",100,0) XBKD1^^0^B2434754 "BLD",7416,"KRN",9.8,"NM",101,0) XBKD2^^0^B27090069 "BLD",7416,"KRN",9.8,"NM",102,0) XBKD3^^0^B9705991 "BLD",7416,"KRN",9.8,"NM",103,0) XBKERCLN^^0^B12352496 "BLD",7416,"KRN",9.8,"NM",104,0) XBKIDS^^0^B9942611 "BLD",7416,"KRN",9.8,"NM",105,0) XBKSET^^0^B220107 "BLD",7416,"KRN",9.8,"NM",106,0) XBKTMP^^0^B108746 "BLD",7416,"KRN",9.8,"NM",107,0) XBKVAR^^0^B1307311 "BLD",7416,"KRN",9.8,"NM",108,0) XBL^^0^B1439722 "BLD",7416,"KRN",9.8,"NM",109,0) XBLCALL^^0^B39192147 "BLD",7416,"KRN",9.8,"NM",110,0) XBLFAM^^0^B25168093 "BLD",7416,"KRN",9.8,"NM",111,0) XBLFD^^0^B5497221 "BLD",7416,"KRN",9.8,"NM",112,0) XBLFMD^^0^B6160303 "BLD",7416,"KRN",9.8,"NM",113,0) XBLFSETS^^0^B12397617 "BLD",7416,"KRN",9.8,"NM",114,0) XBLM^^0^B47237069 "BLD",7416,"KRN",9.8,"NM",115,0) XBLML^^0^B1345893 "BLD",7416,"KRN",9.8,"NM",116,0) XBLMP^^0^B665327 "BLD",7416,"KRN",9.8,"NM",117,0) XBLMSET^^0^B4594576 "BLD",7416,"KRN",9.8,"NM",118,0) XBLUTL^^0^B3337247 "BLD",7416,"KRN",9.8,"NM",119,0) XBLZRO^^0^B5480309 "BLD",7416,"KRN",9.8,"NM",120,0) XBMAIL^^0^B6998848 "BLD",7416,"KRN",9.8,"NM",121,0) XBNEW^^0^B4987918 "BLD",7416,"KRN",9.8,"NM",122,0) XBNODEL^^0^B3983142 "BLD",7416,"KRN",9.8,"NM",123,0) XBOFF^^0^B144923 "BLD",7416,"KRN",9.8,"NM",124,0) XBON^^0^B143109 "BLD",7416,"KRN",9.8,"NM",125,0) XBPATC^^0^B6167972 "BLD",7416,"KRN",9.8,"NM",126,0) XBPATSE^^0^B44471422 "BLD",7416,"KRN",9.8,"NM",127,0) XBPFTV^^0^B751676 "BLD",7416,"KRN",9.8,"NM",128,0) XBPKDEL^^0^B34190229 "BLD",7416,"KRN",9.8,"NM",129,0) XBPKDEL1^^0^B21342872 "BLD",7416,"KRN",9.8,"NM",130,0) XBPKG^^0^B3951750 "BLD",7416,"KRN",9.8,"NM",131,0) XBPOST^^0^B66404313 "BLD",7416,"KRN",9.8,"NM",132,0) XBPRE^^0^B4348281 "BLD",7416,"KRN",9.8,"NM",133,0) XBRESID^^0^B6896206 "BLD",7416,"KRN",9.8,"NM",134,0) XBRESTL1^^0^B3075102 "BLD",7416,"KRN",9.8,"NM",135,0) XBRLL^^0^B2193304 "BLD",7416,"KRN",9.8,"NM",136,0) XBRPRTBD^^0^B15232 "BLD",7416,"KRN",9.8,"NM",137,0) XBRPTL^^0^B2628239 "BLD",7416,"KRN",9.8,"NM",138,0) XBRSBD^^0^B30959901 "BLD",7416,"KRN",9.8,"NM",139,0) XBRSELM^^0^B22704603 "BLD",7416,"KRN",9.8,"NM",140,0) XBRSIZ^^0^B2786246 "BLD",7416,"KRN",9.8,"NM",141,0) XBRSRCH^^0^B3715477 "BLD",7416,"KRN",9.8,"NM",142,0) XBRSRCH1^^0^B567775 "BLD",7416,"KRN",9.8,"NM",143,0) XBRSRCH2^^0^B7866965 "BLD",7416,"KRN",9.8,"NM",144,0) XBRSRCH3^^0^B7821157 "BLD",7416,"KRN",9.8,"NM",145,0) XBRSRCH4^^0^B10373023 "BLD",7416,"KRN",9.8,"NM",146,0) XBRSRCH5^^0^B8443162 "BLD",7416,"KRN",9.8,"NM",147,0) XBRXREF^^0^B16145360 "BLD",7416,"KRN",9.8,"NM",148,0) XBRXREF2^^0^B21464797 "BLD",7416,"KRN",9.8,"NM",149,0) XBSAN^^0^B841163410 "BLD",7416,"KRN",9.8,"NM",150,0) XBSANP^^0^B842421475 "BLD",7416,"KRN",9.8,"NM",151,0) XBSANU^^0^B56800399 "BLD",7416,"KRN",9.8,"NM",152,0) XBSAUD^^0^B1093004 "BLD",7416,"KRN",9.8,"NM",153,0) XBSAUTH^^0^B8949848 "BLD",7416,"KRN",9.8,"NM",154,0) XBSDDAUD^^0^B3675705 "BLD",7416,"KRN",9.8,"NM",155,0) XBSFGBL^^0^B2051189 "BLD",7416,"KRN",9.8,"NM",156,0) XBSIC^^0^B20923740 "BLD",7416,"KRN",9.8,"NM",157,0) XBSITE^^0^B3208049 "BLD",7416,"KRN",9.8,"NM",158,0) XBSUMBLD^^0^B15194366 "BLD",7416,"KRN",9.8,"NM",159,0) XBTM^^0^B26975333 "BLD",7416,"KRN",9.8,"NM",160,0) XBTM1^^0^B515926 "BLD",7416,"KRN",9.8,"NM",161,0) XBTM10^^0^B1882262 "BLD",7416,"KRN",9.8,"NM",162,0) XBTM11^^0^B729789 "BLD",7416,"KRN",9.8,"NM",163,0) XBTM12^^0^B432952 "BLD",7416,"KRN",9.8,"NM",164,0) XBTM13^^0^B418563 "BLD",7416,"KRN",9.8,"NM",165,0) XBTM14^^0^B411389 "BLD",7416,"KRN",9.8,"NM",166,0) XBTM15^^0^B864972 "BLD",7416,"KRN",9.8,"NM",167,0) XBTM2^^0^B490435 "BLD",7416,"KRN",9.8,"NM",168,0) XBTM3^^0^B1704387 "BLD",7416,"KRN",9.8,"NM",169,0) XBTM4^^0^B6781984 "BLD",7416,"KRN",9.8,"NM",170,0) XBTM5^^0^B4587756 "BLD",7416,"KRN",9.8,"NM",171,0) XBTM6^^0^B607339 "BLD",7416,"KRN",9.8,"NM",172,0) XBTM7^^0^B7172724 "BLD",7416,"KRN",9.8,"NM",173,0) XBTM8^^0^B4845502 "BLD",7416,"KRN",9.8,"NM",174,0) XBTM9^^0^B1149656 "BLD",7416,"KRN",9.8,"NM",175,0) XBTMI^^0^B3077215 "BLD",7416,"KRN",9.8,"NM",176,0) XBTMPR^^0^B5888460 "BLD",7416,"KRN",9.8,"NM",177,0) XBTMTI^^0^B3185919 "BLD",7416,"KRN",9.8,"NM",178,0) XBTRK^^0^B1926712 "BLD",7416,"KRN",9.8,"NM",179,0) XBUPCASE^^0^B30215 "BLD",7416,"KRN",9.8,"NM",180,0) XBUTL^^0^B1192881 "BLD",7416,"KRN",9.8,"NM",181,0) XBVCH^^0^B18686034 "BLD",7416,"KRN",9.8,"NM",182,0) XBVCH1^^0^B39538847 "BLD",7416,"KRN",9.8,"NM",183,0) XBVCHV^^0^B4275480 "BLD",7416,"KRN",9.8,"NM",184,0) XBVDF^^0^B4449120 "BLD",7416,"KRN",9.8,"NM",185,0) XBVIDEO^^0^B7083827 "BLD",7416,"KRN",9.8,"NM",186,0) XBVK^^0^B2582562 "BLD",7416,"KRN",9.8,"NM",187,0) XBVL^^0^B1662546 "BLD",7416,"KRN",9.8,"NM",188,0) XBVLINE^^0^B11221599 "BLD",7416,"KRN",9.8,"NM",189,0) XBX12R^^0^B2474267 "BLD",7416,"KRN",9.8,"NM",190,0) XBXTSS^^0^B1066241 "BLD",7416,"KRN",9.8,"NM",191,0) ZIBCKPKG^^0^B33866093 "BLD",7416,"KRN",9.8,"NM",192,0) ZIBCLU^^0^B1192724 "BLD",7416,"KRN",9.8,"NM",193,0) ZIBCLU0^^0^B9097382 "BLD",7416,"KRN",9.8,"NM",194,0) ZIBDR^^0^B3415538 "BLD",7416,"KRN",9.8,"NM",195,0) ZIBER^^0^B17895023 "BLD",7416,"KRN",9.8,"NM",196,0) ZIBERCD^^0^B7257303 "BLD",7416,"KRN",9.8,"NM",197,0) ZIBFIND^^0^B8523829 "BLD",7416,"KRN",9.8,"NM",198,0) ZIBFMD^^0^B20838767 "BLD",7416,"KRN",9.8,"NM",199,0) ZIBFR^^0^B11168634 "BLD",7416,"KRN",9.8,"NM",200,0) ZIBGCHAR^^0^B20768042 "BLD",7416,"KRN",9.8,"NM",201,0) ZIBGCHR^^0^B33985608 "BLD",7416,"KRN",9.8,"NM",202,0) ZIBGD^^0^B3385493 "BLD",7416,"KRN",9.8,"NM",203,0) ZIBGSVED^^0^B11342362 "BLD",7416,"KRN",9.8,"NM",204,0) ZIBGSVEM^^0^B35986084 "BLD",7416,"KRN",9.8,"NM",205,0) ZIBGSVEP^^0^B13215982 "BLD",7416,"KRN",9.8,"NM",206,0) ZIBNSSV^^0^B3627616 "BLD",7416,"KRN",9.8,"NM",207,0) ZIBPKGF^^0^B23500682 "BLD",7416,"KRN",9.8,"NM",208,0) ZIBPKGP^^0^B21579540 "BLD",7416,"KRN",9.8,"NM",209,0) ZIBRD^^0^B1190614 "BLD",7416,"KRN",9.8,"NM",210,0) ZIBRNSPC^^0^B51555795 "BLD",7416,"KRN",9.8,"NM",211,0) ZIBRPI^^0^B33067506 "BLD",7416,"KRN",9.8,"NM",212,0) ZIBRPI1^^0^B19770628 "BLD",7416,"KRN",9.8,"NM",213,0) ZIBRPI2^^0^B13708846 "BLD",7416,"KRN",9.8,"NM",214,0) ZIBRPRTD^^0^B17090085 "BLD",7416,"KRN",9.8,"NM",215,0) ZIBRSEL^^0^B4290207 "BLD",7416,"KRN",9.8,"NM",216,0) ZIBRUN^^0^B8214247 "BLD",7416,"KRN",9.8,"NM",217,0) ZIBTCP^^0^B2219671 "BLD",7416,"KRN",9.8,"NM",218,0) ZIBVCHV^^0^B4345218 "BLD",7416,"KRN",9.8,"NM",219,0) ZIBVKCA^^0^B955366 "BLD",7416,"KRN",9.8,"NM",220,0) ZIBVKIL^^0^B9850962 "BLD",7416,"KRN",9.8,"NM",221,0) ZIBVKMSM^^0^B1032009 "BLD",7416,"KRN",9.8,"NM",222,0) ZIBVL^^0^B13704661 "BLD",7416,"KRN",9.8,"NM",223,0) ZIBVLMSM^^0^B13173024 "BLD",7416,"KRN",9.8,"NM",224,0) ZIBVSS^^0^B15663355 "BLD",7416,"KRN",9.8,"NM",225,0) ZIBZUCI^^0^B40206285 "BLD",7416,"KRN",9.8,"NM","B","XB",1) "BLD",7416,"KRN",9.8,"NM","B","XB1",2) "BLD",7416,"KRN",9.8,"NM","B","XB3P9",3) "BLD",7416,"KRN",9.8,"NM","B","XBARRAY",4) "BLD",7416,"KRN",9.8,"NM","B","XBARRAY0",5) "BLD",7416,"KRN",9.8,"NM","B","XBBJ",6) "BLD",7416,"KRN",9.8,"NM","B","XBBPI",7) "BLD",7416,"KRN",9.8,"NM","B","XBCDIC",8) "BLD",7416,"KRN",9.8,"NM","B","XBCDIC2",9) "BLD",7416,"KRN",9.8,"NM","B","XBCDIC3",10) "BLD",7416,"KRN",9.8,"NM","B","XBCDICD",11) "BLD",7416,"KRN",9.8,"NM","B","XBCFIX",12) "BLD",7416,"KRN",9.8,"NM","B","XBCFXREF",13) "BLD",7416,"KRN",9.8,"NM","B","XBCLM",14) "BLD",7416,"KRN",9.8,"NM","B","XBCLS",15) "BLD",7416,"KRN",9.8,"NM","B","XBCNODE",16) "BLD",7416,"KRN",9.8,"NM","B","XBCOUNT",17) "BLD",7416,"KRN",9.8,"NM","B","XBCSPC",18) "BLD",7416,"KRN",9.8,"NM","B","XBDAD0",19) "BLD",7416,"KRN",9.8,"NM","B","XBDANGLE",20) "BLD",7416,"KRN",9.8,"NM","B","XBDATE",21) "BLD",7416,"KRN",9.8,"NM","B","XBDBQDOC",22) "BLD",7416,"KRN",9.8,"NM","B","XBDBQUE",23) "BLD",7416,"KRN",9.8,"NM","B","XBDELR",24) "BLD",7416,"KRN",9.8,"NM","B","XBDH",25) "BLD",7416,"KRN",9.8,"NM","B","XBDHD",26) "BLD",7416,"KRN",9.8,"NM","B","XBDHD1",27) "BLD",7416,"KRN",9.8,"NM","B","XBDHD2",28) "BLD",7416,"KRN",9.8,"NM","B","XBDHDF",29) "BLD",7416,"KRN",9.8,"NM","B","XBDHDF1",30) "BLD",7416,"KRN",9.8,"NM","B","XBDHDIP",31) "BLD",7416,"KRN",9.8,"NM","B","XBDHDSP",32) "BLD",7416,"KRN",9.8,"NM","B","XBDHDSV",33) "BLD",7416,"KRN",9.8,"NM","B","XBDHNTEG",34) "BLD",7416,"KRN",9.8,"NM","B","XBDICV",35) "BLD",7416,"KRN",9.8,"NM","B","XBDIE",36) "BLD",7416,"KRN",9.8,"NM","B","XBDIFF",37) "BLD",7416,"KRN",9.8,"NM","B","XBDINUM",38) "BLD",7416,"KRN",9.8,"NM","B","XBDIQ0",39) "BLD",7416,"KRN",9.8,"NM","B","XBDIQ1",40) "BLD",7416,"KRN",9.8,"NM","B","XBDIR",41) "BLD",7416,"KRN",9.8,"NM","B","XBDR",42) "BLD",7416,"KRN",9.8,"NM","B","XBDR1",43) "BLD",7416,"KRN",9.8,"NM","B","XBDSET",44) "BLD",7416,"KRN",9.8,"NM","B","XBDT",45) "BLD",7416,"KRN",9.8,"NM","B","XBEHRCK",46) "BLD",7416,"KRN",9.8,"NM","B","XBENHANC",47) "BLD",7416,"KRN",9.8,"NM","B","XBFCMP",48) "BLD",7416,"KRN",9.8,"NM","B","XBFDINFO",49) "BLD",7416,"KRN",9.8,"NM","B","XBFIXL1",50) "BLD",7416,"KRN",9.8,"NM","B","XBFIXPT",51) "BLD",7416,"KRN",9.8,"NM","B","XBFLD",52) "BLD",7416,"KRN",9.8,"NM","B","XBFLD0",53) "BLD",7416,"KRN",9.8,"NM","B","XBFLD2",54) "BLD",7416,"KRN",9.8,"NM","B","XBFLDO",55) "BLD",7416,"KRN",9.8,"NM","B","XBFMK",56) "BLD",7416,"KRN",9.8,"NM","B","XBFNC",57) "BLD",7416,"KRN",9.8,"NM","B","XBFORM",58) "BLD",7416,"KRN",9.8,"NM","B","XBFORM0",59) "BLD",7416,"KRN",9.8,"NM","B","XBFORM1",60) "BLD",7416,"KRN",9.8,"NM","B","XBFRESET",61) "BLD",7416,"KRN",9.8,"NM","B","XBFUNC",62) "BLD",7416,"KRN",9.8,"NM","B","XBFUNC1",63) "BLD",7416,"KRN",9.8,"NM","B","XBFUNC2",64) "BLD",7416,"KRN",9.8,"NM","B","XBGC",65) "BLD",7416,"KRN",9.8,"NM","B","XBGCMP",66) "BLD",7416,"KRN",9.8,"NM","B","XBGCMP2",67) "BLD",7416,"KRN",9.8,"NM","B","XBGL",68) "BLD",7416,"KRN",9.8,"NM","B","XBGLDFN",69) "BLD",7416,"KRN",9.8,"NM","B","XBGSAVE",70) "BLD",7416,"KRN",9.8,"NM","B","XBGXFR",71) "BLD",7416,"KRN",9.8,"NM","B","XBGXREFS",72) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD",73) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD1",74) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD10",75) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD11",76) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD12",77) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD13",78) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD2",79) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD3",80) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD4",81) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD5",82) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD6",83) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD7",84) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD8",85) "BLD",7416,"KRN",9.8,"NM","B","XBHEDD9",86) "BLD",7416,"KRN",9.8,"NM","B","XBHEDDH1",87) "BLD",7416,"KRN",9.8,"NM","B","XBHEDDH2",88) "BLD",7416,"KRN",9.8,"NM","B","XBHEDDH3",89) "BLD",7416,"KRN",9.8,"NM","B","XBHEDDH4",90) "BLD",7416,"KRN",9.8,"NM","B","XBHEDDM",91) "BLD",7416,"KRN",9.8,"NM","B","XBHELP",92) "BLD",7416,"KRN",9.8,"NM","B","XBHFMAN",93) "BLD",7416,"KRN",9.8,"NM","B","XBHFMAN1",94) "BLD",7416,"KRN",9.8,"NM","B","XBHFMAN2",95) "BLD",7416,"KRN",9.8,"NM","B","XBINIT",96) "BLD",7416,"KRN",9.8,"NM","B","XBINTEG",97) "BLD",7416,"KRN",9.8,"NM","B","XBIV",98) "BLD",7416,"KRN",9.8,"NM","B","XBKD",99) "BLD",7416,"KRN",9.8,"NM","B","XBKD1",100) "BLD",7416,"KRN",9.8,"NM","B","XBKD2",101) "BLD",7416,"KRN",9.8,"NM","B","XBKD3",102) "BLD",7416,"KRN",9.8,"NM","B","XBKERCLN",103) "BLD",7416,"KRN",9.8,"NM","B","XBKIDS",104) "BLD",7416,"KRN",9.8,"NM","B","XBKSET",105) "BLD",7416,"KRN",9.8,"NM","B","XBKTMP",106) "BLD",7416,"KRN",9.8,"NM","B","XBKVAR",107) "BLD",7416,"KRN",9.8,"NM","B","XBL",108) "BLD",7416,"KRN",9.8,"NM","B","XBLCALL",109) "BLD",7416,"KRN",9.8,"NM","B","XBLFAM",110) "BLD",7416,"KRN",9.8,"NM","B","XBLFD",111) "BLD",7416,"KRN",9.8,"NM","B","XBLFMD",112) "BLD",7416,"KRN",9.8,"NM","B","XBLFSETS",113) "BLD",7416,"KRN",9.8,"NM","B","XBLM",114) "BLD",7416,"KRN",9.8,"NM","B","XBLML",115) "BLD",7416,"KRN",9.8,"NM","B","XBLMP",116) "BLD",7416,"KRN",9.8,"NM","B","XBLMSET",117) "BLD",7416,"KRN",9.8,"NM","B","XBLUTL",118) "BLD",7416,"KRN",9.8,"NM","B","XBLZRO",119) "BLD",7416,"KRN",9.8,"NM","B","XBMAIL",120) "BLD",7416,"KRN",9.8,"NM","B","XBNEW",121) "BLD",7416,"KRN",9.8,"NM","B","XBNODEL",122) "BLD",7416,"KRN",9.8,"NM","B","XBOFF",123) "BLD",7416,"KRN",9.8,"NM","B","XBON",124) "BLD",7416,"KRN",9.8,"NM","B","XBPATC",125) "BLD",7416,"KRN",9.8,"NM","B","XBPATSE",126) "BLD",7416,"KRN",9.8,"NM","B","XBPFTV",127) "BLD",7416,"KRN",9.8,"NM","B","XBPKDEL",128) "BLD",7416,"KRN",9.8,"NM","B","XBPKDEL1",129) "BLD",7416,"KRN",9.8,"NM","B","XBPKG",130) "BLD",7416,"KRN",9.8,"NM","B","XBPOST",131) "BLD",7416,"KRN",9.8,"NM","B","XBPRE",132) "BLD",7416,"KRN",9.8,"NM","B","XBRESID",133) "BLD",7416,"KRN",9.8,"NM","B","XBRESTL1",134) "BLD",7416,"KRN",9.8,"NM","B","XBRLL",135) "BLD",7416,"KRN",9.8,"NM","B","XBRPRTBD",136) "BLD",7416,"KRN",9.8,"NM","B","XBRPTL",137) "BLD",7416,"KRN",9.8,"NM","B","XBRSBD",138) "BLD",7416,"KRN",9.8,"NM","B","XBRSELM",139) "BLD",7416,"KRN",9.8,"NM","B","XBRSIZ",140) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH",141) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH1",142) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH2",143) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH3",144) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH4",145) "BLD",7416,"KRN",9.8,"NM","B","XBRSRCH5",146) "BLD",7416,"KRN",9.8,"NM","B","XBRXREF",147) "BLD",7416,"KRN",9.8,"NM","B","XBRXREF2",148) "BLD",7416,"KRN",9.8,"NM","B","XBSAN",149) "BLD",7416,"KRN",9.8,"NM","B","XBSANP",150) "BLD",7416,"KRN",9.8,"NM","B","XBSANU",151) "BLD",7416,"KRN",9.8,"NM","B","XBSAUD",152) "BLD",7416,"KRN",9.8,"NM","B","XBSAUTH",153) "BLD",7416,"KRN",9.8,"NM","B","XBSDDAUD",154) "BLD",7416,"KRN",9.8,"NM","B","XBSFGBL",155) "BLD",7416,"KRN",9.8,"NM","B","XBSIC",156) "BLD",7416,"KRN",9.8,"NM","B","XBSITE",157) "BLD",7416,"KRN",9.8,"NM","B","XBSUMBLD",158) "BLD",7416,"KRN",9.8,"NM","B","XBTM",159) "BLD",7416,"KRN",9.8,"NM","B","XBTM1",160) "BLD",7416,"KRN",9.8,"NM","B","XBTM10",161) "BLD",7416,"KRN",9.8,"NM","B","XBTM11",162) "BLD",7416,"KRN",9.8,"NM","B","XBTM12",163) "BLD",7416,"KRN",9.8,"NM","B","XBTM13",164) "BLD",7416,"KRN",9.8,"NM","B","XBTM14",165) "BLD",7416,"KRN",9.8,"NM","B","XBTM15",166) "BLD",7416,"KRN",9.8,"NM","B","XBTM2",167) "BLD",7416,"KRN",9.8,"NM","B","XBTM3",168) "BLD",7416,"KRN",9.8,"NM","B","XBTM4",169) "BLD",7416,"KRN",9.8,"NM","B","XBTM5",170) "BLD",7416,"KRN",9.8,"NM","B","XBTM6",171) "BLD",7416,"KRN",9.8,"NM","B","XBTM7",172) "BLD",7416,"KRN",9.8,"NM","B","XBTM8",173) "BLD",7416,"KRN",9.8,"NM","B","XBTM9",174) "BLD",7416,"KRN",9.8,"NM","B","XBTMI",175) "BLD",7416,"KRN",9.8,"NM","B","XBTMPR",176) "BLD",7416,"KRN",9.8,"NM","B","XBTMTI",177) "BLD",7416,"KRN",9.8,"NM","B","XBTRK",178) "BLD",7416,"KRN",9.8,"NM","B","XBUPCASE",179) "BLD",7416,"KRN",9.8,"NM","B","XBUTL",180) "BLD",7416,"KRN",9.8,"NM","B","XBVCH",181) "BLD",7416,"KRN",9.8,"NM","B","XBVCH1",182) "BLD",7416,"KRN",9.8,"NM","B","XBVCHV",183) "BLD",7416,"KRN",9.8,"NM","B","XBVDF",184) "BLD",7416,"KRN",9.8,"NM","B","XBVIDEO",185) "BLD",7416,"KRN",9.8,"NM","B","XBVK",186) "BLD",7416,"KRN",9.8,"NM","B","XBVL",187) "BLD",7416,"KRN",9.8,"NM","B","XBVLINE",188) "BLD",7416,"KRN",9.8,"NM","B","XBX12R",189) "BLD",7416,"KRN",9.8,"NM","B","XBXTSS",190) "BLD",7416,"KRN",9.8,"NM","B","ZIBCKPKG",191) "BLD",7416,"KRN",9.8,"NM","B","ZIBCLU",192) "BLD",7416,"KRN",9.8,"NM","B","ZIBCLU0",193) "BLD",7416,"KRN",9.8,"NM","B","ZIBDR",194) "BLD",7416,"KRN",9.8,"NM","B","ZIBER",195) "BLD",7416,"KRN",9.8,"NM","B","ZIBERCD",196) "BLD",7416,"KRN",9.8,"NM","B","ZIBFIND",197) "BLD",7416,"KRN",9.8,"NM","B","ZIBFMD",198) "BLD",7416,"KRN",9.8,"NM","B","ZIBFR",199) "BLD",7416,"KRN",9.8,"NM","B","ZIBGCHAR",200) "BLD",7416,"KRN",9.8,"NM","B","ZIBGCHR",201) "BLD",7416,"KRN",9.8,"NM","B","ZIBGD",202) "BLD",7416,"KRN",9.8,"NM","B","ZIBGSVED",203) "BLD",7416,"KRN",9.8,"NM","B","ZIBGSVEM",204) "BLD",7416,"KRN",9.8,"NM","B","ZIBGSVEP",205) "BLD",7416,"KRN",9.8,"NM","B","ZIBNSSV",206) "BLD",7416,"KRN",9.8,"NM","B","ZIBPKGF",207) "BLD",7416,"KRN",9.8,"NM","B","ZIBPKGP",208) "BLD",7416,"KRN",9.8,"NM","B","ZIBRD",209) "BLD",7416,"KRN",9.8,"NM","B","ZIBRNSPC",210) "BLD",7416,"KRN",9.8,"NM","B","ZIBRPI",211) "BLD",7416,"KRN",9.8,"NM","B","ZIBRPI1",212) "BLD",7416,"KRN",9.8,"NM","B","ZIBRPI2",213) "BLD",7416,"KRN",9.8,"NM","B","ZIBRPRTD",214) "BLD",7416,"KRN",9.8,"NM","B","ZIBRSEL",215) "BLD",7416,"KRN",9.8,"NM","B","ZIBRUN",216) "BLD",7416,"KRN",9.8,"NM","B","ZIBTCP",217) "BLD",7416,"KRN",9.8,"NM","B","ZIBVCHV",218) "BLD",7416,"KRN",9.8,"NM","B","ZIBVKCA",219) "BLD",7416,"KRN",9.8,"NM","B","ZIBVKIL",220) "BLD",7416,"KRN",9.8,"NM","B","ZIBVKMSM",221) "BLD",7416,"KRN",9.8,"NM","B","ZIBVL",222) "BLD",7416,"KRN",9.8,"NM","B","ZIBVLMSM",223) "BLD",7416,"KRN",9.8,"NM","B","ZIBVSS",224) "BLD",7416,"KRN",9.8,"NM","B","ZIBZUCI",225) "BLD",7416,"KRN",19,0) 19 "BLD",7416,"KRN",19,"NM",0) ^9.68A^3^3 "BLD",7416,"KRN",19,"NM",1,0) XB DANGLE^^0 "BLD",7416,"KRN",19,"NM",2,0) XB PACKAGE TRACKING^^0 "BLD",7416,"KRN",19,"NM",3,0) ZIB REMOTE PATCH INSTALLATION^^0 "BLD",7416,"KRN",19,"NM","B","XB DANGLE",1) "BLD",7416,"KRN",19,"NM","B","XB PACKAGE TRACKING",2) "BLD",7416,"KRN",19,"NM","B","ZIB REMOTE PATCH INSTALLATION",3) "BLD",7416,"KRN",19.1,0) 19.1 "BLD",7416,"KRN",19.1,"NM",0) ^9.68A^1^1 "BLD",7416,"KRN",19.1,"NM",1,0) XBZ PACKAGE TRACKING^^0 "BLD",7416,"KRN",19.1,"NM","B","XBZ PACKAGE TRACKING",1) "BLD",7416,"KRN",101,0) 101 "BLD",7416,"KRN",101,"NM",0) ^9.68A^4^4 "BLD",7416,"KRN",101,"NM",1,0) XB DISPLAY^^0 "BLD",7416,"KRN",101,"NM",2,0) XB NEXT SCREEN^^0 "BLD",7416,"KRN",101,"NM",3,0) XB PREVIOUS SCREEN^^0 "BLD",7416,"KRN",101,"NM",4,0) XB QUIT^^0 "BLD",7416,"KRN",101,"NM","B","XB DISPLAY",1) "BLD",7416,"KRN",101,"NM","B","XB NEXT SCREEN",2) "BLD",7416,"KRN",101,"NM","B","XB PREVIOUS SCREEN",3) "BLD",7416,"KRN",101,"NM","B","XB QUIT",4) "BLD",7416,"KRN",409.61,0) 409.61 "BLD",7416,"KRN",409.61,"NM",0) ^9.68A^1^1 "BLD",7416,"KRN",409.61,"NM",1,0) XB DISPLAY^^0 "BLD",7416,"KRN",409.61,"NM","B","XB DISPLAY",1) "BLD",7416,"KRN",771,0) 771 "BLD",7416,"KRN",870,0) 870 "BLD",7416,"KRN",8989.51,0) 8989.51 "BLD",7416,"KRN",8989.52,0) 8989.52 "BLD",7416,"KRN",8994,0) 8994 "BLD",7416,"KRN",9002226,0) 9002226 "BLD",7416,"KRN",9002226,"NM",0) ^9.68A^^ "BLD",7416,"KRN","B",.4,.4) "BLD",7416,"KRN","B",.401,.401) "BLD",7416,"KRN","B",.402,.402) "BLD",7416,"KRN","B",.403,.403) "BLD",7416,"KRN","B",.5,.5) "BLD",7416,"KRN","B",.84,.84) "BLD",7416,"KRN","B",3.6,3.6) "BLD",7416,"KRN","B",3.8,3.8) "BLD",7416,"KRN","B",9.2,9.2) "BLD",7416,"KRN","B",9.8,9.8) "BLD",7416,"KRN","B",19,19) "BLD",7416,"KRN","B",19.1,19.1) "BLD",7416,"KRN","B",101,101) "BLD",7416,"KRN","B",409.61,409.61) "BLD",7416,"KRN","B",771,771) "BLD",7416,"KRN","B",870,870) "BLD",7416,"KRN","B",8989.51,8989.51) "BLD",7416,"KRN","B",8989.52,8989.52) "BLD",7416,"KRN","B",8994,8994) "BLD",7416,"KRN","B",9002226,9002226) "BLD",7416,"PRE") XBPRE "BLD",7416,"QUES",0) ^9.62^^ "BLD",7416,"REQB",0) ^9.611^^ "KRN",.4,1492,-1) 0^2 "KRN",.4,1492,0) XBILL^2890316^M#Pp^52^^M#Pp "KRN",.4,1492,"DXS",1,9.2) S I(0,0)=$S($D(D0):D0,1:""),DIP(1)=$S($D(^PSRX(D0,0)):^(0),1:""),D0=$P(DIP(1),U,2) S:'$D(^DPT(+D0,0)) D0=-1 S I(100,0)=$S($D(D0):D0,1:"") "KRN",.4,1492,"DXS",2,9.2) S I(200)="^PSDRUG(",J(200)=50 F D=0:0 S (D,D1)=$N(^PSDRUG(D0,1,D)) Q:D'>0 I $D(^(D,0))#2 S X=$P(^(0),U,1) X DICMX Q:'$D(D) S D=D1 "KRN",.4,1492,"DXS",2,9.3) S I(0,0)=$S($D(D0):D0,1:""),DIP(1)=$S($D(^PSRX(D0,0)):^(0),1:""),D0=$P(DIP(1),U,6) S:'$D(^PSDRUG(+D0,0)) D0=-1 S I(100,0)=$S($D(D0):D0,1:"") "KRN",.4,1492,"DXS",3,9.2) S I(0,0)=$S($D(D0):D0,1:""),DIP(1)=$S($D(^PSRX(D0,0)):^(0),1:""),D0=$P(DIP(1),U,6) S:'$D(^PSDRUG(+D0,0)) D0=-1 S DIP(101)=$S($D(^PSDRUG(D0,0)):^(0),1:"") "KRN",.4,1492,"F",1) 2~ "KRN",.4,1492,"F",2) X DXS(1,9.2) S D0=$P(DIP(1),U,2) S:'$D(^DPT(+D0,0)) D0=-1 S DIP(201)=$S($D(^DPT(D0,0)):^(0),1:"") S X=$P(DIP(201),U,3) S D0=I(0,0) S Y=X D DT K DIP;"DOB";L18;Z;"PATIENT:PATIENT:DOB"~ "KRN",.4,1492,"F",3) 22~52,.01~7~17~8~S DIP(1)=$S($D(^PSRX(D0,0)):^(0),1:"") S X=$P(DIP(1),U,7)*$P(DIP(1),U,17) W X K DIP;"COST";Z;"QTY*UNIT PRICE OF DRUG"~4~ "KRN",.4,1492,"F",4) X DXS(2,9.3) S D0=$P(DIP(1),U,6) S:'$D(^PSDRUG(+D0,0)) D0=-1 X DXS(2,9.2):D0>0 S X="" S D0=I(0,0) W X K DIP;"NDC#";m;Z;"DRUG:DRUG:SYNONYM"~ "KRN",.4,1492,"F",5) X DXS(3,9.2) S X=$P(DIP(101),U,1) S D0=I(0,0) W X K DIP;Z;"DRUG:GENERIC NAME"~ "KRN",.4,1492,"H") MA BILLING 1/23/89 - 2/28/89 "KRN",.4,1493,-1) 0^1 "KRN",.4,1493,0) XB - FILES MARKED FOR DELETION^3020925.1738^@^1^^@^3021113 "KRN",.4,1493,"F",2) .01;L30~0;R12~1~W $$FMTE^XLFDT($P($G(^DIC(D0,"%D",0)),"^",5));"DESC. EDIT DATE";L15;Z;"W $$FMTE^XLFDT($P($G(^DIC(D0,"%D",0)),"^",5))"~ "KRN",.4,1493,"H") FILE LIST "KRN",.401,911,-1) 0^1 "KRN",.401,911,0) XB - FILES MARKED FOR DELETION^3020925.1742^@^1^^@^3021113 "KRN",.401,911,2,0) ^.4014^1^1 "KRN",.401,911,2,1,0) 1^.01^NAME^^^^^^^4 "KRN",.401,911,2,1,"F") )z^* "KRN",.401,911,2,1,"GET") S DISX(1)=$P($G(^DIC(D0,0)),U) "KRN",.401,911,2,1,"IX") ^DIC("B",^DIC(^2 "KRN",.401,911,2,1,"QCON") I (DISX(1)]]")z")&(DISX(1)']]"*ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ") "KRN",.401,911,2,1,"T") *ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ^*ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "KRN",.401,911,2,1,"TXT") NAME from * to *ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ "KRN",.401,911,2,"B",1,1) "KRN",19,10846,-1) 0^2 "KRN",19,10846,0) XB PACKAGE TRACKING^Package Tracking^^R^^XBZ PACKAGE TRACKING^^^^^^IHS/VA UTILITIES "KRN",19,10846,1,0) ^^22^22^3011102^ "KRN",19,10846,1,1,0) This option runs START^XBTRK. "KRN",19,10846,1,2,0) "KRN",19,10846,1,3,0) Routine START^XBTRK counts the number of patched routines in each "KRN",19,10846,1,4,0) namespace in each entry in the PACKAGE file, and, if run in foreground, "KRN",19,10846,1,5,0) only delivers a mail message with the results to all local programmers. "KRN",19,10846,1,6,0) "KRN",19,10846,1,7,0) If Q'd thru option "XB PACKAGE TRACKING", in addition to the mail message "KRN",19,10846,1,8,0) getting generated, a file is sent to the system id(s) specified on the 2nd "KRN",19,10846,1,9,0) page of the TaskMan option scheduling function, with the id(s) set into "KRN",19,10846,1,10,0) variable XBSYSID(n), where "n" is a numberic subscript. "KRN",19,10846,1,11,0) "KRN",19,10846,1,12,0) The option, "XB PACKAGE TRACKING", is recommended to run every 30 days, "KRN",19,10846,1,13,0) and is atch'd to the Site Manager's menu, "XUSITEMGR", as a protection "KRN",19,10846,1,14,0) against deletion by the Kernel's dangling-option cleanup process. "KRN",19,10846,1,15,0) "KRN",19,10846,1,16,0) The format of the data global transmitted to the System(s) is: "KRN",19,10846,1,17,0) "KRN",19,10846,1,18,0) CV^namespace^name^version^#routines^patch "KRN",19,10846,1,19,0) "KRN",19,10846,1,20,0) where "CV" means "Current Version" on that machine. If the first piece is "KRN",19,10846,1,21,0) "PV", the info on that node means the the version of the routines was a "KRN",19,10846,1,22,0) "Previous Version". This assumes there are no 'future' versions. "KRN",19,10846,2) y "KRN",19,10846,25) START^XBTRK "KRN",19,10846,200.9) y^y "KRN",19,10846,"U") PACKAGE TRACKING "KRN",19,10847,-1) 0^1 "KRN",19,10847,0) XB DANGLE^Q'able Dangling Pointer cleanup^^R^^^^^^^^ "KRN",19,10847,25) XBDANGLE "KRN",19,10847,200.9) y "KRN",19,10847,"U") Q'ABLE DANGLING POINTER CLEANU "KRN",19,10848,-1) 0^3 "KRN",19,10848,0) ZIB REMOTE PATCH INSTALLATION^Remote Patch Installation^^R^^^^^^^^^^1 "KRN",19,10848,20) I 2 S:0 %="/usr/spool/uucppublic/^1" "KRN",19,10848,25) START^ZIBRPI "KRN",19,10848,"U") REMOTE PATCH INSTALLATION "KRN",19.1,459,-1) 0^1 "KRN",19.1,459,0) XBZ PACKAGE TRACKING "KRN",19.1,459,1,0) ^^5^5^3010823^ "KRN",19.1,459,1,1,0) This security key protects the "XB PACKAGE TRACKING" option. "KRN",19.1,459,1,2,0) "KRN",19.1,459,1,3,0) That option runs routine START^XBTRK, which examines routines for patch "KRN",19.1,459,1,4,0) leve, generates a local mail message, and attempts to sendto the results "KRN",19.1,459,1,5,0) file to cmbsyb. "KRN",101,4199,-1) 0^1 "KRN",101,4199,0) XB DISPLAY^OUTPUT Browser^^M^^^^^^^^ "KRN",101,4199,4) 26 "KRN",101,4199,10,0) ^101.01PA^3^3 "KRN",101,4199,10,1,0) 4201^+^10^ "KRN",101,4199,10,1,"^") XB NEXT SCREEN "KRN",101,4199,10,2,0) 4202^-^20^ "KRN",101,4199,10,2,"^") XB PREVIOUS SCREEN "KRN",101,4199,10,3,0) 4200^Q^99^ "KRN",101,4199,10,3,"^") XB QUIT "KRN",101,4199,26) D SHOW^VALM "KRN",101,4199,28) Select Action: "KRN",101,4199,29) + "KRN",101,4199,99) 61567,67389 "KRN",101,4200,-1) 0^4 "KRN",101,4200,0) XB QUIT^QUIT^^A^^^^^^^^LIST MANAGER "KRN",101,4200,1,0) ^^1^1^2911105^ "KRN",101,4200,1,1,0) This protocol can be used as a generic 'quit' action. "KRN",101,4200,2,0) ^101.02A^2^2 "KRN",101,4200,2,1,0) EXIT "KRN",101,4200,2,2,0) QUIT "KRN",101,4200,2,"B","EXIT",1) "KRN",101,4200,2,"B","QUIT",2) "KRN",101,4200,20) Q "KRN",101,4200,99) 61567,67388 "KRN",101,4201,-1) 0^2 "KRN",101,4201,0) XB NEXT SCREEN^NEXT SCREEN^^A^^^^^^^^LIST MANAGER "KRN",101,4201,1,0) ^^2^2^2920519^^^ "KRN",101,4201,1,1,0) This action will allow the user to view the next screen "KRN",101,4201,1,2,0) of entries, if any exist. "KRN",101,4201,2,0) ^101.02A^1^1 "KRN",101,4201,2,1,0) NX "KRN",101,4201,2,"B","NX",1) "KRN",101,4201,20) D NEXT^VALM4 "KRN",101,4201,99) 61567,67388 "KRN",101,4202,-1) 0^3 "KRN",101,4202,0) XB PREVIOUS SCREEN^PREVIOUS SCREEN^^A^^^^^^^^LIST MANAGER "KRN",101,4202,1,0) ^^2^2^2920113^^ "KRN",101,4202,1,1,0) This action will allow the user to view the previous screen "KRN",101,4202,1,2,0) of entries, if any exist. "KRN",101,4202,2,0) ^101.02A^3^3 "KRN",101,4202,2,1,0) PR "KRN",101,4202,2,2,0) BK "KRN",101,4202,2,3,0) PR "KRN",101,4202,2,"B","BK",2) "KRN",101,4202,2,"B","PR",1) "KRN",101,4202,2,"B","PR",3) "KRN",101,4202,20) D PREV^VALM4 "KRN",101,4202,99) 61567,67389 "KRN",409.61,640,-1) 0^1 "KRN",409.61,640,0) XB DISPLAY^1^^200^4^21^1^1^^XB DISPLAY^OUTPUT BROWSER^1^^1 "KRN",409.61,640,1) ^VALM HIDDEN ACTIONS "KRN",409.61,640,"ARRAY") ^TMP("XBLM",$J,XBNODE) "KRN",409.61,640,"FNL") D EXIT^XBLM "KRN",409.61,640,"HDR") D HDR^XBLM "KRN",409.61,640,"HLP") D HELP^XBLM "KRN",409.61,640,"INIT") D INIT^XBLM "MBREQ") 0 "ORD",3,19.1) 19.1;3;1;;KEY^XPDTA1;;;KEYF2^XPDIA1;;KEYDEL^XPDIA1 "ORD",3,19.1,0) SECURITY KEY "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 "ORD",6,.401) .401;6;;;EDEOUT^DIFROMSO(.401,DA,"",XPDA);FPRE^DIFROMSI(.401,"",XPDA);EPRE^DIFROMSI(.401,DA,$E("N",$G(XPDNEW)),XPDA,"",OLDA);;EPOST^DIFROMSI(.401,DA,"",XPDA);DEL^DIFROMSK(.401,"",%) "ORD",6,.401,0) SORT TEMPLATE "ORD",15,101) 101;15;;;PRO^XPDTA;PROF1^XPDIA;PROE1^XPDIA;PROF2^XPDIA;;PRODEL^XPDIA "ORD",15,101,0) PROTOCOL "ORD",17,409.61) 409.61;17;1;;;;;;;LMDEL^XPDIA1 "ORD",17,409.61,0) LIST TEMPLATE "ORD",18,19) 19;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA "ORD",18,19,0) OPTION "PKG",209,-1) 1^1 "PKG",209,0) IHS/VA UTILITIES^XB^IHS/VA XB/ZIB ROUTINES "PKG",209,22,0) ^9.49I^1^1 "PKG",209,22,1,0) 4.0^3090726^3090725^23 "PKG",209,22,1,1,0) ^^1^1^3090726 "PKG",209,22,1,1,1,0) XB Utils for GT.M. "PKG",209,"VERSION") 4.0 "PRE") XBPRE "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") 225 "RTN","XB") 0^1^B37697009 "RTN","XB",1,0) XB ; IHS/ADC/GTH - UTILITY MENU ; [ 04/28/2003 9:38 AM ] "RTN","XB",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XB",3,0) ; "RTN","XB",4,0) ; SEE ROUTINE XB1 FOR FURTHER DOCUMENTATION AND THE MENU "RTN","XB",5,0) ; OPTIONS. "RTN","XB",6,0) ; "RTN","XB",7,0) ; This routine lists available utilities in the form of a "RTN","XB",8,0) ; menu with a brief description of what the utility does. "RTN","XB",9,0) ; New utilities may be added to this routine by adding the "RTN","XB",10,0) ; appropriate ";;" entries to the bottom of routine XB1. "RTN","XB",11,0) ; "RTN","XB",12,0) START ; "RTN","XB",13,0) I '$D(^%ZOSF("TEST"))!('$D(^%ZOSF("TRAP"))) W !!,"Missing ^%ZOSF nodes!",! Q "RTN","XB",14,0) S X="%ZIS" "RTN","XB",15,0) D RCHK "RTN","XB",16,0) I XBFAIL D EOJ Q "RTN","XB",17,0) D ^XBKSET "RTN","XB",18,0) S X="XBRPTL" "RTN","XB",19,0) D RCHK "RTN","XB",20,0) S:XBFAIL XBNH="" "RTN","XB",21,0) S XBLBL="M",XBQ=0 "RTN","XB",22,0) F D MENU Q:XBQ "RTN","XB",23,0) D EOJ "RTN","XB",24,0) Q "RTN","XB",25,0) ; "RTN","XB",26,0) MENU ; "RTN","XB",27,0) D LIST "RTN","XB",28,0) W !!,"Choose: " "RTN","XB",29,0) R XBY:$G(DTIME,999) "RTN","XB",30,0) S:XBY="^" XBY="" "RTN","XB",31,0) I XBY["?" D HELP Q "RTN","XB",32,0) I XBY="" S XBQ=1 Q "RTN","XB",33,0) I XBY'=+XBY D LETTERS "RTN","XB",34,0) I XBY'<1,XBY'>(XBI-1) D OPTION D:XBP="P" PAUSE S XBP="" Q "RTN","XB",35,0) W *7 "RTN","XB",36,0) Q "RTN","XB",37,0) ; "RTN","XB",38,0) HELP ; "RTN","XB",39,0) I XBY="?" D Q "RTN","XB",40,0) . S XBH="" "RTN","XB",41,0) . D LIST "RTN","XB",42,0) . KILL XBH "RTN","XB",43,0) . W !!,"To get help on a non-menu option enter '?n' where n is the option number.",! "RTN","XB",44,0) . D PAUSE "RTN","XB",45,0) .Q "RTN","XB",46,0) I XBY?1"?"1N.N S XBY=$P(XBY,"?",2) I XBY,XBY'>(XBI-1) D D PAUSE Q "RTN","XB",47,0) . I $D(XBNH) W !!,"No help available. Routine ^XBRPTL not in UCI.",! Q "RTN","XB",48,0) . KILL ^UTILITY($J) "RTN","XB",49,0) . S XBX=$P($T(@XBLBL+XBY^XB1),";;",3) "RTN","XB",50,0) . I XBX W !!,"No help available for menus." Q "RTN","XB",51,0) . I XBX?1"!".E W !!,"No help available for executable code :",!,"[",$E(XBX,2,99),"]." Q "RTN","XB",52,0) . S XBX=$P(XBX,"^",2),X=XBX "RTN","XB",53,0) . D RCHK "RTN","XB",54,0) . I XBFAIL W !!,"No help available. Routine ^",XBX," not in ",$S($E(XBX)="%":"MGR",1:"UCI"),".",! Q "RTN","XB",55,0) . S %=$$RSEL^ZIBRSEL(XBX,"^UTILITY($J,") "RTN","XB",56,0) . D EN^XBRPTL "RTN","XB",57,0) . KILL ^UTILITY($J) "RTN","XB",58,0) .Q "RTN","XB",59,0) W *7 "RTN","XB",60,0) Q "RTN","XB",61,0) ; "RTN","XB",62,0) LIST ; List menu options. "RTN","XB",63,0) KILL XBTBL "RTN","XB",64,0) ;W !!?5,$P($T(XB+1),";",4)," v ",$$CV^XBFUNC("XB");IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",65,0) W !!?5,$P($T(XB+1),";",4)," v ",$$VERSION^XPDUTL("XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",66,0) W !!?5,$P($T(@XBLBL^XB1),";;",2),! "RTN","XB",67,0) F XBI=1:1 S XBX=$T(@XBLBL+XBI^XB1) Q:$E(XBX)'=" " S XBY=$P(XBX,";;",3),XBX=$P(XBX,";;",2) D "RTN","XB",68,0) . S X=$$UP^XLFSTR(XBX) "RTN","XB",69,0) . S XBTBL(X)=XBI_"^"_XBX "RTN","XB",70,0) . W !,XBI,?5,XBX," ",$S($D(XBH):$S(XBY:"[menu]",1:XBY),1:$S(XBY:"[menu]",1:"")) "RTN","XB",71,0) .Q "RTN","XB",72,0) Q "RTN","XB",73,0) ; "RTN","XB",74,0) LETTERS ; "RTN","XB",75,0) KILL XBC "RTN","XB",76,0) S XBY=$$UP^XLFSTR(XBY) "RTN","XB",77,0) I $D(XBTBL(XBY)) S XBY=XBTBL(XBY) Q "RTN","XB",78,0) S XBC=0,X=XBY "RTN","XB",79,0) F S X=$O(XBTBL(X)) Q:X=""!($E(X,1,$L(XBY))'=XBY) S XBC=XBC+1,XBC(XBC)=+XBTBL(X)_"^"_$P(XBTBL(X),"^",2) "RTN","XB",80,0) W ! "RTN","XB",81,0) I XBC=0 S XBY=0 Q "RTN","XB",82,0) I XBC=1 S XBY=$P(XBC(1),"^",1) Q "RTN","XB",83,0) F I=1:1:XBC W !,I," ",$P(XBC(I),"^",2) "RTN","XB",84,0) W !!,"Which one? " "RTN","XB",85,0) R XBY:$G(DTIME,999) "RTN","XB",86,0) I XBY]"",$D(XBC(XBY)) W " ",$P(XBC(XBY),"^",2) S XBY=$P(XBC(XBY),"^",1) Q "RTN","XB",87,0) W *7 "RTN","XB",88,0) S XBY=0 "RTN","XB",89,0) Q "RTN","XB",90,0) ; "RTN","XB",91,0) OPTION ; "RTN","XB",92,0) S XBX=$T(@XBLBL+XBY^XB1),XBP=$P(XBX,";;",4),XBX=$P(XBX,";;",3) "RTN","XB",93,0) I XBX D RECURSE Q "RTN","XB",94,0) W ! "RTN","XB",95,0) I XBX?1"!".E S XBX=$E(XBX,2,250) "RTN","XB",96,0) E S X=$P(XBX,"^",2),XBX="D "_XBX D RCHK I XBFAIL W "Routine ",X," not in ",$S($E(X)="%":"MGR!",1:"UCI!") Q "RTN","XB",97,0) S X="TRAP^XB",@^%ZOSF("TRAP") "RTN","XB",98,0) ; D ^XBNEW("CALL^XB:XBX;DT;DTIME;U;DUZ") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",99,0) D EN^XBNEW("CALL^XB","XBX;DT;DTIME;U;DUZ") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",100,0) Q "RTN","XB",101,0) ; "RTN","XB",102,0) CALL ; "RTN","XB",103,0) S IOP=$I "RTN","XB",104,0) D ^%ZIS "RTN","XB",105,0) X XBX "RTN","XB",106,0) U 0 "RTN","XB",107,0) Q "RTN","XB",108,0) ; "RTN","XB",109,0) RECURSE ; "RTN","XB",110,0) I $L(XBLBL)>6 W !,"Maximum menu depth exceeded." S XBQ=1 Q "RTN","XB",111,0) S XBLBL=XBLBL_XBX "RTN","XB",112,0) W ! "RTN","XB",113,0) F D MENU Q:XBQ "RTN","XB",114,0) S XBQ=0,XBLBL=$E(XBLBL,1,$L(XBLBL)-1) "RTN","XB",115,0) W ! "RTN","XB",116,0) Q "RTN","XB",117,0) ; "RTN","XB",118,0) TRAP ; ERROR TRAP "RTN","XB",119,0) W !!,"The following error has occurred: ",$$Z^ZIBNSSV("ERROR"),! "RTN","XB",120,0) D:XBP="" PAUSE "RTN","XB",121,0) Q "RTN","XB",122,0) ; "RTN","XB",123,0) PAUSE ;EP "RTN","XB",124,0) Q:'(IO=IO(0)) "RTN","XB",125,0) Q:'($E(IOST,1,2)="C-") "RTN","XB",126,0) S Y=$$DIR^XBDIR("EO") "RTN","XB",127,0) S:$D(DUOUT) XBQ=1 "RTN","XB",128,0) Q "RTN","XB",129,0) ; "RTN","XB",130,0) CHECK ; CHECK XB OPTION ROUTINES (EXECUTED FROM ^XB MENU OPTION) "RTN","XB",131,0) W !,"Patch ",$$PATS," is the highest XB/ZIB patch installed." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",132,0) F XBII=1:1 S X=$T(M+XBII^XB1) Q:X="" I $P(X,";;",1)=" " S X=$P(X,";;",3) I X'=+X,X'?1"!".E D "RTN","XB",133,0) . I X'?.8UN1"^"1.8UN,X'?.8UN1"^"1"%"1.7UN S XBII(4,XBII)=$P($T(M+XBII^XB1),";;",2,9) Q "RTN","XB",134,0) . S X=$P(X,"^",2) "RTN","XB",135,0) . D RCHK "RTN","XB",136,0) . I XBFAIL S XBII($S($E(X)'="%":1,$E(X,2,4)="ZIB":2,1:3),X)="" "RTN","XB",137,0) .Q "RTN","XB",138,0) I '$O(XBII(0)) W !,"All options seem to be ok.",! KILL XBII Q "RTN","XB",139,0) I $D(XBII(1)) W !,"The following routines are not in this UCI:" S X="" F S X=$O(XBII(1,X)) Q:X="" W !?3,X "RTN","XB",140,0) I $D(XBII(2)) W !,"The following ZIB* routines must be moved to MGR as % routines:" S X="" F S X=$O(XBII(2,X)) Q:X="" W !?3,X "RTN","XB",141,0) I $D(XBII(3)) W !,"The following % routines are not in ",$S($$VERSION^%ZOSF(1)["Cache":"this Namespace",1:"MGR"),":" S X="" F S X=$O(XBII(3,X)) Q:X="" W !?3,X ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",142,0) I $D(XBII(4)) W !,"The following options have invalid routine names:" S X="" F S X=$O(XBII(4,X)) Q:X="" W !?3,XBII(4,X) "RTN","XB",143,0) W ! "RTN","XB",144,0) KILL XBII "RTN","XB",145,0) Q "RTN","XB",146,0) ; "RTN","XB",147,0) RCHK ;EP - Check Existence of Routine in X "RTN","XB",148,0) S XBRTN=X,XUSLNT=1 "RTN","XB",149,0) ; I $E(XBRTN)="%" X ^%ZOSF("UCI") S XBUCI=Y,%UCI="MGR" D 2^%XUCI ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",150,0) I ^%ZOSF("OS")["MSM",$E(XBRTN)="%" X ^%ZOSF("UCI") S XBUCI=Y,%UCI="MGR" D 2^%XUCI ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",151,0) S X=XBRTN "RTN","XB",152,0) X ^%ZOSF("TEST") "RTN","XB",153,0) S XBFAIL='$T "RTN","XB",154,0) ; I $E(XBRTN)="%" S %UCI=XBUCI D 2^%XUCI ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",155,0) I ^%ZOSF("OS")["MSM",$E(XBRTN)="%" S %UCI=XBUCI D 2^%XUCI ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",156,0) W:XBFAIL !!,"Routine ",XBRTN," missing!" "RTN","XB",157,0) S X=XBRTN "RTN","XB",158,0) KILL XUSLNT "RTN","XB",159,0) Q "RTN","XB",160,0) ; "RTN","XB",161,0) EOJ ; "RTN","XB",162,0) D ^XBKTMP,EN^XBVK("XB") "RTN","XB",163,0) KILL ^UTILITY($J) "RTN","XB",164,0) KILL DIRUT,DTOUT,DUOUT "RTN","XB",165,0) KILL X,Y "RTN","XB",166,0) Q "RTN","XB",167,0) ; "RTN","XB",168,0) OSNO ;EP "RTN","XB",169,0) W $C(7),!,"Sorry...",!,"Operating System '",$P(^%ZOSF("OS"),"^",1),"' is not supported." "RTN","XB",170,0) I $$DIR^XBDIR("EO","Press RETURN") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",171,0) Q "RTN","XB",172,0) ; "RTN","XB",173,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB",174,0) PATS() ;Display patches installed for XB. "RTN","XB",175,0) NEW I,P,V "RTN","XB",176,0) S I=$O(^DIC(9.4,"C","XB",0)) "RTN","XB",177,0) Q:'I "??" "RTN","XB",178,0) S V=$O(^DIC(9.4,I,22,"B",$P($T(+2),";",3),0)) "RTN","XB",179,0) Q:'V "??" "RTN","XB",180,0) S P=0 "RTN","XB",181,0) F %=0:0 S %=$O(^DIC(9.4,I,22,V,"PAH",%)) Q:'% I $P(^(%,0),"^",1)>P S P=$P(^(0),"^",1) "RTN","XB",182,0) Q P "RTN","XB",183,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1") 0^2^B47144386 "RTN","XB1",1,0) XB1 ; IHS/ADC/GTH - XB MENUS AND DOCUMENTATION ; [ 12/29/2004 11:11 AM ] "RTN","XB1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XB1",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XB1",4,0) ; "RTN","XB1",5,0) ; Each label represents a menu. The label must begin with "RTN","XB1",6,0) ; "M" and be followed by 1 or more 1 digit numbers 1-9. "RTN","XB1",7,0) ; Each digit represents the link # of the parent option. "RTN","XB1",8,0) ; E.G. 'M1' is the label for submenu options for the main "RTN","XB1",9,0) ; menu option with a link # of 1. 'M11' would be the label "RTN","XB1",10,0) ; for subsubmenu options for the option in 'M1' with a link "RTN","XB1",11,0) ; # of 1. Within a menu options are listed and selected "RTN","XB1",12,0) ; positionally. The only purpose of the link # is to link "RTN","XB1",13,0) ; options to their parent menu. Example: "RTN","XB1",14,0) ; "RTN","XB1",15,0) ; M1 ;;FILES/DICTIONARIES "RTN","XB1",16,0) ; ;;Submenu example one;;1 "RTN","XB1",17,0) ; ;;Submenu example two;;2 "RTN","XB1",18,0) ; M11 ;;SUBMENU ONE "RTN","XB1",19,0) ; ;;Submenu option;;^ROUTINEX "RTN","XB1",20,0) ; M12 ;;SUBMENU TWO "RTN","XB1",21,0) ; ;;Submenu option;;^ROUTINEY "RTN","XB1",22,0) ; "RTN","XB1",23,0) ; This label naming technique allows the menu tree to go "RTN","XB1",24,0) ; to seven levels. No more than nine options on one menu "RTN","XB1",25,0) ; may also be menus. "RTN","XB1",26,0) ; "RTN","XB1",27,0) ; For menu options the 2nd ";;" piece is the title, the 3rd "RTN","XB1",28,0) ; ";;" piece must be a number if the option is a submenu, a "RTN","XB1",29,0) ; valid routine or label^routine or executable code if the "RTN","XB1",30,0) ; 3rd piece begins with a !. The code following the ! will "RTN","XB1",31,0) ; be placed in a variable and the variable will be executed. "RTN","XB1",32,0) ; A P in the 4th ";;" piece indicates pause after execution. "RTN","XB1",33,0) ; "RTN","XB1",34,0) M ;;MAIN XB UTILITY MENU "RTN","XB1",35,0) ;;Files/dictionaries;;1 "RTN","XB1",36,0) ;;Globals;;2 "RTN","XB1",37,0) ;;Routines;;3 "RTN","XB1",38,0) ;;Miscellaneous;;4 "RTN","XB1",39,0) ;;Developers;;5 "RTN","XB1",40,0) ;;Check ^XB options and patch level;;CHECK^XB;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",41,0) M1 ;;FILES/DICTIONARIES "RTN","XB1",42,0) ;;List fields;;^XBFLD "RTN","XB1",43,0) ;;List 0th nodes;;^XBLZRO;;P "RTN","XB1",44,0) ;;Check regular xrefs;;^XBCFXREF;;P "RTN","XB1",45,0) ;;Selective RE-INDEX;;^XBRXREF "RTN","XB1",46,0) ;;Compare dictionary in two UCIs/Namespaces;;^XBFCMP;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",47,0) ;;Search for routines executed from dictionary;;^XBRSRCH "RTN","XB1",48,0) ;;Fix 0th nodes;;^XBCFIX;;P "RTN","XB1",49,0) ;;Count entries in file;;^XBCOUNT "RTN","XB1",50,0) ;;FileMan;;P^DI "RTN","XB1",51,0) ;;Delete dictionaries;;^XBKD "RTN","XB1",52,0) ;;Clean dictionaries [caution];;^XBCDIC "RTN","XB1",53,0) ;;List file attributes in various ways;;1;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",54,0) ;;Files Marked For Deletion;;!N L,DIC,BY,FLDS S L=0,DIC=1,(BY,FLDS)="[XB - FILES MARKED FOR DELETION]" D EN1^DIP;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",55,0) ;;Fields Marked For Deletion;;^XBLFMD;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",56,0) ;;Print File IDs, Specifiers, and Conditionals;;^XBSIC;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",57,0) M11 ;;LIST FILE ATTRIBUTES IN VARIOUS WAYS;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",58,0) ;;List Files, inc. Number, Name, Global, opt Desc.;;^XBLFD;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",59,0) ;;List Fields for RIM Modeling;;^XBLFAM;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",60,0) ;;List Fields for CodeSets (RTM) Modeling;;^XBLFSETS;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",61,0) M2 ;;GLOBALS "RTN","XB1",62,0) ;;List global;;!D LG^ZIBVSS "RTN","XB1",63,0) ;;Directory of selected globals;;^ZIBGD;;P "RTN","XB1",64,0) ;;Count unique values;;^XBCNODE "RTN","XB1",65,0) ;;List high entry number;;^XBGLDFN;;P "RTN","XB1",66,0) ;;Copy to another global in same UCI/Namespace;;^XBGC;;;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",67,0) ;;Copy global to another UCI/Namespace;;!D CG^ZIBVSS;;;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",68,0) ;;Search global for value;;!D GSE^ZIBVSS "RTN","XB1",69,0) ;;Global edit;;!D GE^ZIBVSS "RTN","XB1",70,0) ;;Change global value;;!D GCH^ZIBVSS "RTN","XB1",71,0) ;;Global size/efficiency;;!D GSZE^ZIBVSS;;P "RTN","XB1",72,0) ;;Global characteristics;;!D GCHR^ZIBVSS "RTN","XB1",73,0) ;;Global delete;;!D GDEL^ZIBVSS "RTN","XB1",74,0) ;;Global restore;;!D GR^ZIBVSS "RTN","XB1",75,0) ;;Global save;;!D GS^ZIBVSS "RTN","XB1",76,0) ;;Find control chrs in globals;;^ZIBGCHR "RTN","XB1",77,0) ;;Compare Two Globals;;^XBGCMP "RTN","XB1",78,0) M3 ;;ROUTINES "RTN","XB1",79,0) ;;List routines in various ways;;1 "RTN","XB1",80,0) ;;Compare routines in two UCIs/Namespaces;;!D RCMP^ZIBVSS;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",81,0) ;;Restore routines;;!D RR^ZIBVSS "RTN","XB1",82,0) ;;Save routines;;!D RS^ZIBVSS "RTN","XB1",83,0) ;;Routine size;;^XBRSIZ;;P "RTN","XB1",84,0) ;;Delete routines;;!D RDEL^ZIBVSS;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",85,0) ;;Search routines for values (OR);;!D RSE^ZIBVSS;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",86,0) ;;Search routines for values (AND);;!D RSAND^ZIBVSS "RTN","XB1",87,0) ;;Find routines by edit date;;!D NEWED^ZIBVSS;;P "RTN","XB1",88,0) ;;Full screen editor;;!D REDIT^ZIBVSS "RTN","XB1",89,0) ;;Routine change;;!D RCHANGE^ZIBVSS "RTN","XB1",90,0) ;;Routine copy;;!D RCOPY^ZIBVSS "RTN","XB1",91,0) ;;Directory of selected routines;;^ZIBRD;;P "RTN","XB1",92,0) ;;Scan UCIs/Namespaces for routine;;^ZIBFR;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",93,0) ;;Run routine;;!R " Enter routine name: ",Y:30 Q:'$T S:Y'["^" Y="^"_Y S X=$P(Y,"^",2),X=$P(X,"(",1) X ^%ZOSF("TEST") W:'$T " huh? ",*7 I $T D @Y "RTN","XB1",94,0) M31 ;;LIST ROUTINES "RTN","XB1",95,0) ;;List first one/two lines;;^%ZTP1;;P "RTN","XB1",96,0) ;;List to first label;;^XBRPTL;;P "RTN","XB1",97,0) ;;List routines;;!D RPRT^ZIBVSS;;P "RTN","XB1",98,0) ;;List routines by edit date;;^XBRPRTBD "RTN","XB1",99,0) ;;VA routine lister;;^%ZTPP;;P "RTN","XB1",100,0) ;;List one routine with character counts;;^XBRLL;;P "RTN","XB1",101,0) ;;%INDEX;;^%INDEX "RTN","XB1",102,0) ;;Flow chart from entry point;;^XTFCE "RTN","XB1",103,0) ;;Flow chart entire routine;;^XTFCR "RTN","XB1",104,0) ;;List routines by patch number;;^XBPATSE;;P "RTN","XB1",105,0) M4 ;;MISCELLANEOUS "RTN","XB1",106,0) ;;Error report;;!D ER^ZIBVSS;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",107,0) ;;List ^UTILITY nodes for current job;;^XBLUTL;;P "RTN","XB1",108,0) ;;Kill ^UTILITY nodes for current job;;^%ZIBCLU0 "RTN","XB1",109,0) ;;Cleanup utility globals in all UCIs;;EN^ZIBCLU "RTN","XB1",110,0) ;;Cleanup utility globals in current UCI;;EN^%ZIBCLU0 "RTN","XB1",111,0) ;;Fix 'PT' nodes in all files;;^XBFIXPT "RTN","XB1",112,0) ;;Convert non-DINUM data global to DINUM;;^XBDINUM "RTN","XB1",113,0) ;;Check UCI routines against package file;;^ZIBCKPKG;;P "RTN","XB1",114,0) ;;Display FileMan installation data;;^ZIBFMD;;P "RTN","XB1",115,0) ;;Renamespace routines;;^ZIBRNSPC;;P "RTN","XB1",116,0) ;;Number base changer;;^XTBASE "RTN","XB1",117,0) ;;Print a Help Frame manual;;^XBHFMAN "RTN","XB1",118,0) ;;List Local Variables, by Namespace;;MESSAGE^XBVL;;P "RTN","XB1",119,0) ;;Print XB/ZIB Technical Manual;;^XBTM "RTN","XB1",120,0) ;;Check Patient Globals;;^XBPATC;;P "RTN","XB1",121,0) M5 ;;DEVELOPERS "RTN","XB1",122,0) ;;Generate ^DIR call;;^XBDR;;P "RTN","XB1",123,0) ;;Standardize line 1 of routines;;^XBFIXL1 "RTN","XB1",124,0) ;;Set version line;;^XBVLINE "RTN","XB1",125,0) ;;Set dictionary version numbers;;^XBDICV;;P "RTN","XB1",126,0) ;;Set no delete;;^XBNODEL;;P "RTN","XB1",127,0) ;;Set audit;;^XBSAUD;;P "RTN","XB1",128,0) ;;Set authorities;;^XBSAUTH;;P "RTN","XB1",129,0) ;;Analyze file for specifiers;;^XBCSPC "RTN","XB1",130,0) ;;Delete namespaced OPTIONS, KEYS, etc.;;RUN^XBPKDEL;;P "RTN","XB1",131,0) ;;List namespaced OPTIONS, KEYS, etc.;;LIST^XBPKDEL;;P "RTN","XB1",132,0) ;;Build pre-init routine;;^XBBPI "RTN","XB1",133,0) ;;Build integ routine;;^XBSUMBLD "RTN","XB1",134,0) ;;List callable subroutines;;^XBLCALL;;P "RTN","XB1",135,0) ;;Reset file data globals *** DANGER ***;;^XBFRESET "RTN","XB1",136,0) ;;Edit FM print template headers;;^XBDH "RTN","XB1",137,0) ;;List retired/replaced packages;;LIST^XBPKDEL1;;P;;XB*3*8 "RTN","XB1",138,0) ;;Delete retired/replaced packages;;DECERT^XBPKDEL1;;P;;XB*3*8 "RTN","XB1",139,0) ;;Edit File attribute for selected File(s);;^XBDDEDIT;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",140,0) ;;Move files into PACKAGE file FILE multiple;;^XBPKG;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",141,0) ;;Set dd audit;;^XBSDDAUD;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",142,0) ;;dd Field Numbering Conventions;;^XBFNC;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB1",143,0) ;;Options and Security Keys;;^XBSECK;;P;;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB3P9") 0^3^B36139635 "RTN","XB3P9",1,0) XB3P9 ;IHS/SET/GTH - XB 3 PATCH 9 ; [ 04/21/2003 9:21 AM ] "RTN","XB3P9",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XB3P9",3,0) ; "RTN","XB3P9",4,0) ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XB3P9",5,0) ; "RTN","XB3P9",6,0) I '$G(IOM) D HOME^%ZIS "RTN","XB3P9",7,0) ; "RTN","XB3P9",8,0) NEW IORVON,IORVOFF "RTN","XB3P9",9,0) S X="IORVON;IORVOFF" "RTN","XB3P9",10,0) D ENDR^%ZISS "RTN","XB3P9",11,0) ; "RTN","XB3P9",12,0) I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q "RTN","XB3P9",13,0) ; "RTN","XB3P9",14,0) I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q "RTN","XB3P9",15,0) ; "RTN","XB3P9",16,0) S X=$P(^VA(200,DUZ,0),U) "RTN","XB3P9",17,0) D BMES^XPDUTL($$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)) "RTN","XB3P9",18,0) D BMES^XPDUTL($$CJ^XLFSTR("Checking Environment for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3)_" Patch "_$P($T(+2),";",5)_".",IOM)) "RTN","XB3P9",19,0) ; "RTN","XB3P9",20,0) NEW XBQUIT "RTN","XB3P9",21,0) S XBQUIT=0 "RTN","XB3P9",22,0) I '$$VCHK("XB","3.0",2,"'=") S XBQUIT=2 "RTN","XB3P9",23,0) ; "RTN","XB3P9",24,0) NEW DA,DIC "RTN","XB3P9",25,0) S X="XB",DIC="^DIC(9.4,",DIC(0)="",D="C" "RTN","XB3P9",26,0) D IX^DIC "RTN","XB3P9",27,0) I Y<0,$D(^DIC(9.4,"C","XB")) D S XBQUIT=2 "RTN","XB3P9",28,0) . D BMES^XPDUTL($$CJ^XLFSTR("You Have More Than One Entry In The",IOM)),MES^XPDUTL($$CJ^XLFSTR("PACKAGE File with an ""XB"" prefix.",IOM)) "RTN","XB3P9",29,0) . D MES^XPDUTL($$CJ^XLFSTR(IORVON_"One entry needs to be deleted."_IORVOFF,IOM)) "RTN","XB3P9",30,0) . D MES^XPDUTL($$CJ^XLFSTR("FIX IT! Before Proceeding.",IOM)) "RTN","XB3P9",31,0) .Q "RTN","XB3P9",32,0) ; "RTN","XB3P9",33,0) I $G(XPDENV)=1 D "RTN","XB3P9",34,0) . S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 "RTN","XB3P9",35,0) . Q:DUZ(0)["@" "RTN","XB3P9",36,0) . D BMES^XPDUTL("I need ""@"" in your DUZ(0) for the install to work.") "RTN","XB3P9",37,0) . D MES^XPDUTL("In programmer mode, D P^DI,^XUP, and select ""XPD MAIN"" when you're prompted") "RTN","XB3P9",38,0) . D MES^XPDUTL("for OPTION NAME.") "RTN","XB3P9",39,0) . S XBQUIT=2 "RTN","XB3P9",40,0) .Q "RTN","XB3P9",41,0) ; "RTN","XB3P9",42,0) I XBQUIT D SORRY(XBQUIT) Q "RTN","XB3P9",43,0) ; "RTN","XB3P9",44,0) D BMES^XPDUTL($$CJ^XLFSTR("ENVIRONMENT OK.",IOM)) "RTN","XB3P9",45,0) ; "RTN","XB3P9",46,0) I '$$DIR^XBDIR("E","","","","","",2) D SORRY(2) "RTN","XB3P9",47,0) Q "RTN","XB3P9",48,0) ; "RTN","XB3P9",49,0) SORRY(X) ; "RTN","XB3P9",50,0) KILL DIFQ "RTN","XB3P9",51,0) S XPDQUIT=X "RTN","XB3P9",52,0) W:'$D(ZTQUEUED) *7,!,$$CJ^XLFSTR(IORVON_"Sorry...."_IORVOFF,IOM),$$DIR^XBDIR("E","Press RETURN") "RTN","XB3P9",53,0) Q "RTN","XB3P9",54,0) ; "RTN","XB3P9",55,0) VCHK(XBPRE,XBVER,XBQUIT,XBCOMP) ; Check versions needed. "RTN","XB3P9",56,0) ; "RTN","XB3P9",57,0) NEW XBV "RTN","XB3P9",58,0) S XBV=$$VERSION^XPDUTL(XBPRE) "RTN","XB3P9",59,0) W !,$$CJ^XLFSTR("Need "_$S(XBCOMP="<":"at least ",1:"")_XBPRE_" v "_XBVER_"....."_XBPRE_" v "_XBV_" Present",IOM) "RTN","XB3P9",60,0) I @(""""_XBV_""""_XBCOMP_""""_XBVER_"""") Q 0 "RTN","XB3P9",61,0) Q 1 "RTN","XB3P9",62,0) ; "RTN","XB3P9",63,0) ; "RTN","XB3P9",64,0) PRE ;EP - From KIDS. "RTN","XB3P9",65,0) Q "RTN","XB3P9",66,0) D BMES^XPDUTL("Begin 'PRE^XB3P9' at "_$$FMTE^XLFDT($$NOW^XLFDT)_".") "RTN","XB3P9",67,0) D BMES^XPDUTL("End 'PRE^XB3P9' at "_$$FMTE^XLFDT($$NOW^XLFDT)_".") "RTN","XB3P9",68,0) Q "RTN","XB3P9",69,0) ; "RTN","XB3P9",70,0) POST ;EP - From KIDS. "RTN","XB3P9",71,0) D BMES^XPDUTL("Begin 'POST^XB3P9' at "_$$FMTE^XLFDT($$NOW^XLFDT)_".") "RTN","XB3P9",72,0) ; "RTN","XB3P9",73,0) D BMES^XPDUTL("Attaching ""XB PACKAGE TRACKING"" option to the Site Manager menu.") "RTN","XB3P9",74,0) D ATTACH "RTN","XB3P9",75,0) ; "RTN","XB3P9",76,0) D BMES^XPDUTL("Setting up Q'ing of option 'XBTRK' for every 30 days.") "RTN","XB3P9",77,0) D QUE "RTN","XB3P9",78,0) ; "RTN","XB3P9",79,0) I $$VERSION^%ZOSV(1)["Cache" D LOAD "RTN","XB3P9",80,0) ; "RTN","XB3P9",81,0) D BMES^XPDUTL("Delivering XB*3*9 install message to select users...") "RTN","XB3P9",82,0) D MAIL "RTN","XB3P9",83,0) ; "RTN","XB3P9",84,0) D BMES^XPDUTL("Creating Task to delete old/unused XB/ZIB routines.") "RTN","XB3P9",85,0) D DELR "RTN","XB3P9",86,0) ; "RTN","XB3P9",87,0) D BMES^XPDUTL("End 'POST^XB3P9' at "_$$FMTE^XLFDT($$NOW^XLFDT)_".") "RTN","XB3P9",88,0) Q "RTN","XB3P9",89,0) ; "RTN","XB3P9",90,0) ATTACH ; Attach option for protection and interactive access. "RTN","XB3P9",91,0) I $$ADD^XPDMENU("XUSITEMGR","XB PACKAGE TRACKING","PTRK",10) D BMES^XPDUTL("....successfully atch'd....allocating Security Keys...") D I 1 "RTN","XB3P9",92,0) . NEW XB,DA,DIC,DINUM "RTN","XB3P9",93,0) . S XB=0,XB("PG")=$O(^DIC(19.1,"B","XUPROGMODE",0)),XB("TRK")=$O(^DIC(19.1,"B","XBZ PACKAGE TRACKING",0)) "RTN","XB3P9",94,0) . Q:'XB("PG")!'XB("TRK") "RTN","XB3P9",95,0) . S DIC(0)="NMQ",DIC("P")=$P(^DD(200,51,0),U,2) "RTN","XB3P9",96,0) . F S XB=$O(^XUSEC("XUPROGMODE",XB)) Q:'XB D "RTN","XB3P9",97,0) .. Q:$D(^VA(200,XB,51,XB("TRK"))) "RTN","XB3P9",98,0) .. S DIC="^VA(200,XB,51,",DA(1)=XB,(DINUM,X)=XB("TRK") "RTN","XB3P9",99,0) .. D FILE^DICN "RTN","XB3P9",100,0) ..Q "RTN","XB3P9",101,0) .Q "RTN","XB3P9",102,0) E D BMES^XPDUTL("....Attachment *FAILED*.") "RTN","XB3P9",103,0) Q "RTN","XB3P9",104,0) ; "RTN","XB3P9",105,0) QUE ; Add the option to the OPTION SCHEDULING file. "RTN","XB3P9",106,0) NEW DA,DIC "RTN","XB3P9",107,0) S DIC=19.2,DIC(0)="L",X="XB PACKAGE TRACKING",DIC("DR")="2////"_$$SCH^XLFDT("1D",DT)_".05;6///30D" "RTN","XB3P9",108,0) D ^DIC "RTN","XB3P9",109,0) I +Y<0 D BMES^XPDUTL("Entry of ""XB PACKAGE TRACKING"" into OPTION SCHEDULING file failed.") Q "RTN","XB3P9",110,0) S DA(1)=+Y,DIC="^DIC(19.2,"_DA(1)_",2,",DIC(0)="",DIC("P")=$P(^DD(19.2,10,0),U,2),XBSYSID(1)="cmbsyb.hqw.ihs.gov",XBSYSID(2)=$P(^AUTTSITE(1,0),U,14) "RTN","XB3P9",111,0) KILL DO,DD "RTN","XB3P9",112,0) F X="XBSYSID(1)","XBSYSID(2)" S DIC("DR")="1///"""_(@X)_"""" D FILE^DICN "RTN","XB3P9",113,0) D BMES^XPDUTL("""XB PACKAGE TRACKING"" has been entered into OPTION SCHEDULING file.") "RTN","XB3P9",114,0) Q "RTN","XB3P9",115,0) ; "RTN","XB3P9",116,0) MAIL ; Send install mail message. "RTN","XB3P9",117,0) NEW DIFROM,XMSUB,XMDUZ,XMTEXT,XMY "RTN","XB3P9",118,0) KILL ^TMP("XB3P9MS",$J) "RTN","XB3P9",119,0) S ^TMP("XB3P9MS",$J,1)=" --- XB v 3, Patch 9, has been installed ---" "RTN","XB3P9",120,0) S %=0 "RTN","XB3P9",121,0) F S %=$O(^XTMP("XPDI",XPDA,"BLD",XPDBLD,1,%)) Q:'% S ^TMP("XB3P9MS",$J,(%+1))=" "_^(%,0) "RTN","XB3P9",122,0) S XMSUB=$P($P($T(+1),";",2)," ",3,99),XMDUZ=$S($G(DUZ):DUZ,1:.5),XMTEXT="^TMP(""XB3P9MS"",$J,",XMY(1)="",XMY(DUZ)="" "RTN","XB3P9",123,0) F %="XUMGR","XUPROG","XUPROGMODE" D SINGLE(%) "RTN","XB3P9",124,0) D ^XMD "RTN","XB3P9",125,0) KILL ^TMP("XB3P9MS",$J) "RTN","XB3P9",126,0) Q "RTN","XB3P9",127,0) ; "RTN","XB3P9",128,0) SINGLE(K) ; Get holders of a single key K. "RTN","XB3P9",129,0) NEW Y "RTN","XB3P9",130,0) S Y=0 "RTN","XB3P9",131,0) Q:'$D(^XUSEC(K)) "RTN","XB3P9",132,0) F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)="" "RTN","XB3P9",133,0) Q "RTN","XB3P9",134,0) ; "RTN","XB3P9",135,0) DELR ; Create task to delete unnecessary routines. "RTN","XB3P9",136,0) S ZTRTN="DEL^XBDELR(""XBP8"")",ZTDESC="Delete routines in the 'XBP8' namespace.",ZTDTH=$$HADD^XLFDT($H,0,0,30,0),ZTIO="",ZTPRI=1 "RTN","XB3P9",137,0) D ^%ZTLOAD "RTN","XB3P9",138,0) Q "RTN","XB3P9",139,0) ; "RTN","XB3P9",140,0) LOAD ; If Cache', save %-routines into Namespace "RTN","XB3P9",141,0) D BMES^XPDUTL("Saving 5 routines as % routines in current Namespace.") "RTN","XB3P9",142,0) NEW DIE,DIF,X,XB,XBF,XBL,XBT,XCM,XCN,XCNP "RTN","XB3P9",143,0) KILL ^TMP("XB3P9",$J) "RTN","XB3P9",144,0) F XB=1:1 S XBL=$P($T(RTN+XB),";",3) Q:'$L(XBL) D "RTN","XB3P9",145,0) . S XBF=$P(XBL,U,1),XBT=$P(XBL,U,2) "RTN","XB3P9",146,0) . D MES^XPDUTL(" Saving '"_$$LJ^XLFSTR(XBF,8)_"' as '"_$$LJ^XLFSTR(XBT,8)_"'.") "RTN","XB3P9",147,0) . S DIF="^TMP(""XB3P9"",$J,",XCNP=0,X=XBF "RTN","XB3P9",148,0) . X ^%ZOSF("LOAD") "RTN","XB3P9",149,0) . S DIE="^TMP(""XB3P9"",$J,",X=XBT,XCN=0 "RTN","XB3P9",150,0) . X ^%ZOSF("SAVE") "RTN","XB3P9",151,0) . KILL ^TMP("XB3P9",$J) "RTN","XB3P9",152,0) .Q "RTN","XB3P9",153,0) Q "RTN","XB3P9",154,0) ; "RTN","XB3P9",155,0) RTN ; Routine ^ Rename As "RTN","XB3P9",156,0) ;;XBCLS^%XBCLS "RTN","XB3P9",157,0) ;;ZIBGD^%ZIBGD "RTN","XB3P9",158,0) ;;ZIBRD^%ZIBRD "RTN","XB3P9",159,0) ;;ZIBCLU0^%ZIBCLU0 "RTN","XB3P9",160,0) ;;ZIBZUCI^%ZUCI "RTN","XB3P9",161,0) ; "RTN","XBARRAY") 0^4^B27244164 "RTN","XBARRAY",1,0) XBARRAY ; IHS/ADC/GTH - BUILD AN ARRAY ; [ 07/08/1999 3:54 PM ] "RTN","XBARRAY",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBARRAY",3,0) ; "RTN","XBARRAY",4,0) ; Thanks to Paul Wesley, DSD/OIRM, for the original "RTN","XBARRAY",5,0) ; routine. "RTN","XBARRAY",6,0) ; "RTN","XBARRAY",7,0) ; This utility provides a word processing format of free "RTN","XBARRAY",8,0) ; text and local variable references to build an array. "RTN","XBARRAY",9,0) ; "RTN","XBARRAY",10,0) ; A file is necessary that has a .01 field for the form "RTN","XBARRAY",11,0) ; name and a WP field to hold the WP form. "RTN","XBARRAY",12,0) ; "RTN","XBARRAY",13,0) ; Please refer to routine XBFORM0 for documentation. "RTN","XBARRAY",14,0) ; "RTN","XBARRAY",15,0) Q "RTN","XBARRAY",16,0) ; "RTN","XBARRAY",17,0) GEN(XBFORM,XBWPDIC,XBWPFLD,XBREF,XBFMT,XBLAST) ;EP ** generate array "RTN","XBARRAY",18,0) NEW XBLLINE "RTN","XBARRAY",19,0) S XBLLINE=$G(XBLAST) "RTN","XBARRAY",20,0) I $D(XBFORM(XBFORM)) D ZBUILD,REFBUILD,EXIT Q XBLLINE "RTN","XBARRAY",21,0) D WPGET,BUILD,ZBUILD "RTN","XBARRAY",22,0) D REFBUILD "RTN","XBARRAY",23,0) D EXIT "RTN","XBARRAY",24,0) Q XBLLINE "RTN","XBARRAY",25,0) ; "RTN","XBARRAY",26,0) EDIT(XBFORM,XBWPDIC,XBWPFLD) ;EP Edit a Form "RTN","XBARRAY",27,0) EDIT2 ; "RTN","XBARRAY",28,0) KILL XBFORM(XBFORM) "RTN","XBARRAY",29,0) S XBLLINE=0,XBFMT=1 "RTN","XBARRAY",30,0) D EDITWP,WPGET,BUILD,ZBUILD "RTN","XBARRAY",31,0) D ARRAY^XBLM("XBZ(",XBFORM) "RTN","XBARRAY",32,0) I $$DIR^XBDIR("S^R:Re-Edit;Q:Quit")="R" KILL XBZ G EDIT2 "RTN","XBARRAY",33,0) D EXIT "RTN","XBARRAY",34,0) KILL XBLLINE "RTN","XBARRAY",35,0) Q "RTN","XBARRAY",36,0) ; "RTN","XBARRAY",37,0) EDITWP ;** edit WP array "RTN","XBARRAY",38,0) KILL DIE,DIC,DA,DR "RTN","XBARRAY",39,0) S DIC=XBWPDIC,DR=XBWPFLD,DIC(0)="AEQMLZ" "RTN","XBARRAY",40,0) I $L($G(XBFORM)) S X=XBFORM,DIC(0)="XL" "RTN","XBARRAY",41,0) D ^DIC "RTN","XBARRAY",42,0) I Y'>0 S XBQUIT=1 Q "RTN","XBARRAY",43,0) S DIE=$$DIC^XBDIQ1(XBWPDIC),DA=+Y,DR=XBWPFLD "RTN","XBARRAY",44,0) D ^DIE "RTN","XBARRAY",45,0) Q "RTN","XBARRAY",46,0) ; "RTN","XBARRAY",47,0) WPGET ;** get WP array "RTN","XBARRAY",48,0) KILL XBWP,XBL,XBOUT,XBVAR,XBWWP,DIC,DR,DIE,DA "RTN","XBARRAY",49,0) S X=XBFORM,DIC=XBWPDIC,DR=XBWPFLD,DIC(0)="X" "RTN","XBARRAY",50,0) D ^DIC "RTN","XBARRAY",51,0) I Y'>0 S XBWP(1)=XBFORM_" NOT FOUND",XBQUIT=1 "RTN","XBARRAY",52,0) S DA=+Y "RTN","XBARRAY",53,0) D ENP^XBDIQ1(XBWPDIC,DA,XBWPFLD,"XBWWP(") "RTN","XBARRAY",54,0) S %X="XBWWP("_XBWPFLD_",",%Y="XBWP(" "RTN","XBARRAY",55,0) D %XY^%RCR "RTN","XBARRAY",56,0) KILL XBWWP "RTN","XBARRAY",57,0) Q "RTN","XBARRAY",58,0) ; "RTN","XBARRAY",59,0) BUILD ;** scan WP array to build XBL "RTN","XBARRAY",60,0) S XBWPL="",XBLINE=0 "RTN","XBARRAY",61,0) Q:$D(XBFORM(XBFORM)) "RTN","XBARRAY",62,0) F S XBWPL=$O(XBWP(XBWPL)) Q:XBWPL'>0 D LINE "RTN","XBARRAY",63,0) Q "RTN","XBARRAY",64,0) ; "RTN","XBARRAY",65,0) LINE ;** process one line of the WP array "RTN","XBARRAY",66,0) S Z=XBWP(XBWPL) "RTN","XBARRAY",67,0) S XBLINE=XBLINE+1 "RTN","XBARRAY",68,0) F I=1:1:$L(Z) S A=$E(Z,I) D Q:$G(XBQUIT) "RTN","XBARRAY",69,0) . I I=1,A="#" D MAP S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBARRAY",70,0) . I I=1,A="*" D OUT S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBARRAY",71,0) . I I=1,A=";" S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBARRAY",72,0) . I A'=" ",A'="~" D TEXT Q "RTN","XBARRAY",73,0) . I A="~" D VAR Q "RTN","XBARRAY",74,0) .Q "RTN","XBARRAY",75,0) KILL XBQUIT "RTN","XBARRAY",76,0) Q "RTN","XBARRAY",77,0) ; "RTN","XBARRAY",78,0) ZBUILD ;** build Z array from XBL "RTN","XBARRAY",79,0) KILL Z "RTN","XBARRAY",80,0) I '$G(XBFMT) F XBL=1:1 D Q:('$O(XBFORM(XBFORM,XBL))) "RTN","XBARRAY",81,0) . I '$D(XBFORM(XBFORM,XBL)),$O(XBFORM(XBFORM,XBL)) S XBZ(XBL+XBLLINE)=" " Q "RTN","XBARRAY",82,0) . D FILL "RTN","XBARRAY",83,0) .Q "RTN","XBARRAY",84,0) I $G(XBFMT)=1 F XBL=1:1 D Q:('$O(XBFORM(XBFORM,XBL))) "RTN","XBARRAY",85,0) . I '$D(XBFORM(XBFORM,XBL)),$O(XBFORM(XBFORM,XBL)) S XBZ(XBL+XBLLINE,0)=" " Q "RTN","XBARRAY",86,0) . D FILL "RTN","XBARRAY",87,0) .Q "RTN","XBARRAY",88,0) Q "RTN","XBARRAY",89,0) ; "RTN","XBARRAY",90,0) REFBUILD ; %RCR BACK TO CALL "RTN","XBARRAY",91,0) S %Y=XBREF,%X="XBZ(" "RTN","XBARRAY",92,0) D %XY^%RCR "RTN","XBARRAY",93,0) S XBLLINE=XBLLINE+XBL "RTN","XBARRAY",94,0) Q "RTN","XBARRAY",95,0) ; "RTN","XBARRAY",96,0) FILL ;** fill one line "RTN","XBARRAY",97,0) S XBCOL=0,T="" "RTN","XBARRAY",98,0) F S XBCOL=$O(XBFORM(XBFORM,XBL,XBCOL)) Q:XBCOL'>0 D "RTN","XBARRAY",99,0) . S X=XBFORM(XBFORM,XBL,XBCOL),XBCOLX=XBCOL "RTN","XBARRAY",100,0) . I XBCOL#1 S XBCOLX=XBCOL\1,X="S X="_X X X "RTN","XBARRAY",101,0) . S XBXL=$L(X) "RTN","XBARRAY",102,0) . Q:X="" "RTN","XBARRAY",103,0) . S T=$$SETSTR^VALM1(X,T,XBCOLX,XBXL) "RTN","XBARRAY",104,0) .Q "RTN","XBARRAY",105,0) I T="" S XBLLINE=$G(XBLLINE)-1 Q "RTN","XBARRAY",106,0) S:'$G(XBFMT) XBZ(XBL+XBLLINE)=T "RTN","XBARRAY",107,0) S:($G(XBFMT)=1) XBZ(XBL+XBLLINE,0)=T "RTN","XBARRAY",108,0) Q "RTN","XBARRAY",109,0) ; "RTN","XBARRAY",110,0) TEXT ;** "RTN","XBARRAY",111,0) NEW W "RTN","XBARRAY",112,0) S XBCOL=I "RTN","XBARRAY",113,0) F W=I:1:$L(Z) S A=$E(Z,W) Q:A="~" "RTN","XBARRAY",114,0) I W'=$L(Z) S W=W-1 "RTN","XBARRAY",115,0) S XBT=$E(Z,I,W),XBFORM(XBFORM,XBLINE,XBCOL)=XBT,I=W "RTN","XBARRAY",116,0) Q "RTN","XBARRAY",117,0) ; "RTN","XBARRAY",118,0) VAR ;** add .5 to column count to indicate a variable vs text "RTN","XBARRAY",119,0) S XBCOL=I "RTN","XBARRAY",120,0) F W=I+1:1:$L(Z) S A=$E(Z,W) I A="~" Q "RTN","XBARRAY",121,0) S XBT=$E(Z,I+1,W-1),XBFORM(XBFORM,XBLINE,XBCOL+.5)=XBT,I=W "RTN","XBARRAY",122,0) I XBT'["|" D Q "RTN","XBARRAY",123,0) . Q:'$D(XBOUT(XBT)) "RTN","XBARRAY",124,0) . S O=XBOUT(XBT),XBT=$P(O,"X")_XBT_$P(O,"X",2) "RTN","XBARRAY",125,0) . S XBFORM(XBFORM,XBLINE,XBCOL+.5)=XBT "RTN","XBARRAY",126,0) .Q "RTN","XBARRAY",127,0) S XBV=$P(XBT,"|"),XBV=XBVAR(XBV),XBS=$P(XBT,"|",2) "RTN","XBARRAY",128,0) I $L(XBS) S XBS="("_XBS_")" "RTN","XBARRAY",129,0) S XBFORM(XBFORM,XBLINE,XBCOL+.5)=XBV_XBS "RTN","XBARRAY",130,0) I $D(XBOUT(XBT)) D "RTN","XBARRAY",131,0) . S O=XBOUT(XBT),XBT=XBV_XBS,XBT=$P(O,"X")_XBT_$P(O,"X",2) "RTN","XBARRAY",132,0) . S XBFORM(XBFORM,XBLINE,XBCOL+.5)=XBT "RTN","XBARRAY",133,0) .Q "RTN","XBARRAY",134,0) Q "RTN","XBARRAY",135,0) ; "RTN","XBARRAY",136,0) MAP ;** map shorthand for variables "RTN","XBARRAY",137,0) ;#xx1|yyy1*xx2|yyy2* "RTN","XBARRAY",138,0) S Z=$E(Z,2,999) "RTN","XBARRAY",139,0) I Z'["*" S XBVSUB=$P(Z,"|"),XBVAL=$P(Z,"|",2),XBVAR(XBVSUB)=XBVAL Q "RTN","XBARRAY",140,0) F I=1:1 S P=$P(Z,"*",I) Q:P="" S XBVSUB=$P(P,"|"),XBVAL=$P(P,"|",2),XBVAR(XBVSUB)=XBVAL "RTN","XBARRAY",141,0) Q "RTN","XBARRAY",142,0) ; "RTN","XBARRAY",143,0) OUT ;** output tranform of data field "RTN","XBARRAY",144,0) ;*field|mumps output transform f(x)* "RTN","XBARRAY",145,0) S Z=$E(Z,2,999) "RTN","XBARRAY",146,0) I Z'["*" S XBVSUB=$P(Z,"!"),XBVAL=$P(Z,"!",2),XBOUT(XBVSUB)=XBVAL Q "RTN","XBARRAY",147,0) F I=1:1 S P=$P(Z,"*",I) Q:P="" S XBVSUB=$P(P,"!"),XBVAL=$P(P,"!",2),XBOUT(XBVSUB)=XBVAL "RTN","XBARRAY",148,0) Q "RTN","XBARRAY",149,0) ; "RTN","XBARRAY",150,0) TABS ; "RTN","XBARRAY",151,0) W # "RTN","XBARRAY",152,0) F %=0:1:7 W ?%*10,%*10 "RTN","XBARRAY",153,0) F %=1:1:66 W !?1,%,?3,"..^...." F X=1:1:7 W "|....^...." "RTN","XBARRAY",154,0) Q "RTN","XBARRAY",155,0) ; "RTN","XBARRAY",156,0) EXIT ; "RTN","XBARRAY",157,0) KILL %X,%Y,A,I,L,O,P,T,W,X "RTN","XBARRAY",158,0) KILL XBZ,XBFMT,XBCOL,XBCOLX,XBF,XBL,XBLINE,XBLN,XBLOAD,XBOUT,XBQUIT,XBROU,XBS,XBT,XBTAG,XBTAGE,XBV,XBVAL,XBVAR,XBVSUB,XBWP,XBWPDA,XBWPDIC,XBWPFLD,XBWPL,XBWPNODE,XBWPSUB,XBWWP,XBX,XBXL "RTN","XBARRAY",159,0) Q "RTN","XBARRAY",160,0) ; "RTN","XBARRAY",161,0) MDY(X) ;external date to mm/dd/yy x :: var or ~"NOW"~ or ~"TODAY"~ "RTN","XBARRAY",162,0) S %DT="TS" "RTN","XBARRAY",163,0) D ^%DT "RTN","XBARRAY",164,0) ;begin Y2K fix block "RTN","XBARRAY",165,0) ;Q $E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3) "RTN","XBARRAY",166,0) Q $E(Y,4,5)_"/"_$E(Y,6,7)_"/"_($E(Y,1,3)+1700) ;Y2000 "RTN","XBARRAY",167,0) ;end Y2K fix block "RTN","XBARRAY",168,0) ; "RTN","XBARRAY",169,0) WP(X) ;build wp entry X #:: WP(FLD,n)=TEXTn "RTN","XBARRAY",170,0) NEW I,W "RTN","XBARRAY",171,0) S XBLWP=$G(XBLLINE),W=$P(X,")") "RTN","XBARRAY",172,0) F I=0:1 S X=$Q(@X) Q:X="" Q:(W'=$P(X,",")) D "RTN","XBARRAY",173,0) . S T=@X,XBLLINE=XBLWP+I "RTN","XBARRAY",174,0) . S:'$G(XBFMT) XBZ(XBL+XBLLINE)=T "RTN","XBARRAY",175,0) . S:($G(XBFMT)=1) XBZ(XBL+XBLLINE,0)=T "RTN","XBARRAY",176,0) Q "" "RTN","XBARRAY",177,0) ; "RTN","XBARRAY0") 0^5^B103574 "RTN","XBARRAY0",1,0) XBARRAY0 ; IHS/ADC/GTH - Documentation for XBARRAY ; [ 02/07/97 3:02 PM ] "RTN","XBARRAY0",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBARRAY0",3,0) ; "RTN","XBARRAY0",4,0) ; This utility provides a word processing format of free "RTN","XBARRAY0",5,0) ; text and local variable references to build an array. "RTN","XBARRAY0",6,0) ; "RTN","XBARRAY0",7,0) ; A file is necessary that has a .01 field for the form "RTN","XBARRAY0",8,0) ; name and a WP field to hold the WP form. "RTN","XBARRAY0",9,0) ; "RTN","XBARRAY0",10,0) ; Two Entry points "RTN","XBARRAY0",11,0) ; "RTN","XBARRAY0",12,0) ; EDIT^XBARRAY(.NAME,DIC,FIELD) Edits and Displays the "RTN","XBARRAY0",13,0) ; form. Place the call to EDIT in the code where "RTN","XBARRAY0",14,0) ; the data or variables have been gathered. "RTN","XBARRAY0",15,0) ; Typically this is one line previous to the call "RTN","XBARRAY0",16,0) ; to $$GEN^XBARRAY. Once the form is designed the "RTN","XBARRAY0",17,0) ; EDIT call is commented out. "RTN","XBARRAY0",18,0) ; "RTN","XBARRAY0",19,0) ; $$GEN^XBARRAY(.NAME,DIC,FIELD,ROOT,FORMAT,LINE) "RTN","XBARRAY0",20,0) ; Generates the form into the ARRAY indicated by "RTN","XBARRAY0",21,0) ; the ROOT. The call to $$GEN must have all "RTN","XBARRAY0",22,0) ; variables used gathered. The return value of "RTN","XBARRAY0",23,0) ; $$GEN is equal to the last line set in the array. "RTN","XBARRAY0",24,0) ; "RTN","XBARRAY0",25,0) ; VARIABLES "RTN","XBARRAY0",26,0) ; .NAME - The name space variable that holds the name "RTN","XBARRAY0",27,0) ; of the form to be used. A pass by reference is "RTN","XBARRAY0",28,0) ; needed for efficiency so that the pre-compilation of "RTN","XBARRAY0",29,0) ; the form is held for repetitive use. The compilation "RTN","XBARRAY0",30,0) ; is stored in the sub array as NAME(@NAME,line,.....,). "RTN","XBARRAY0",31,0) ; IE one local variable can be used for all form "RTN","XBARRAY0",32,0) ; references. "RTN","XBARRAY0",33,0) ; Ex: S BARFORM="A/R BILL" will store and use "RTN","XBARRAY0",34,0) ; the form compilation in BARFORM("A/R BILL",line,....,) "RTN","XBARRAY0",35,0) ; When finished KILL BARFORM(BARFORM) will retrieve the "RTN","XBARRAY0",36,0) ; local variable space from the last form used. "RTN","XBARRAY0",37,0) ; "RTN","XBARRAY0",38,0) ; DIC - The root or file number of the file holding the "RTN","XBARRAY0",39,0) ; forms. "RTN","XBARRAY0",40,0) ; "RTN","XBARRAY0",41,0) ; FIELD ; The field number of the WP field holding the "RTN","XBARRAY0",42,0) ; form. "RTN","XBARRAY0",43,0) ; "RTN","XBARRAY0",44,0) ; ROOT - The root of the target array to be built. "RTN","XBARRAY0",45,0) ; Either a global or a variable root as in the format "RTN","XBARRAY0",46,0) ; used for a %XY^%RCR call. (%RCR is actually used) "RTN","XBARRAY0",47,0) ; "RTN","XBARRAY0",48,0) ; FORMAT "RTN","XBARRAY0",49,0) ; null or zero The array is built ROOT(line)="... "RTN","XBARRAY0",50,0) ; 1 The array is built ROOT(line,0)=".... "RTN","XBARRAY0",51,0) ; "RTN","XBARRAY0",52,0) ; LINE - The offset in line numbers in building the "RTN","XBARRAY0",53,0) ; array. The array will start construction at LINE +1. "RTN","XBARRAY0",54,0) ; The value of the last line created is returned $$GEN. "RTN","XBARRAY0",55,0) ; "RTN","XBARRAY0",56,0) ; WP FORMAT INSTRUCTIONS "RTN","XBARRAY0",57,0) ; "RTN","XBARRAY0",58,0) ; Free Text: Free text is key striked in where desired. "RTN","XBARRAY0",59,0) ; Do not use ~ as it is used to mark variables. "RTN","XBARRAY0",60,0) ; "RTN","XBARRAY0",61,0) ; Variables: The reference to a variable is marked with "RTN","XBARRAY0",62,0) ; a beginning ~ and a trailing ~. The trailing ~ is "RTN","XBARRAY0",63,0) ; always required even if the variable is last item "RTN","XBARRAY0",64,0) ; on the line. "RTN","XBARRAY0",65,0) ; "RTN","XBARRAY0",66,0) ; Mnemonics: A short hand for variables is available. "RTN","XBARRAY0",67,0) ; "RTN","XBARRAY0",68,0) ; Comments: Programmers comments can be put into the form "RTN","XBARRAY0",69,0) ; which are ignored by the generator. "RTN","XBARRAY0",70,0) ; "RTN","XBARRAY0",71,0) ; Output Transform: Mumps output transforms can be "RTN","XBARRAY0",72,0) ; indicated for execution upon selected variables. "RTN","XBARRAY0",73,0) ; "RTN","XBARRAY0",74,0) ; WP SPECIAL FUNCTIONS Located at the top of the form. "RTN","XBARRAY0",75,0) ; "RTN","XBARRAY0",76,0) ; Comment line Begin the line with a ';' "RTN","XBARRAY0",77,0) ; "RTN","XBARRAY0",78,0) ; Variable Mneumonic Reference: Name spaced variables can "RTN","XBARRAY0",79,0) ; be long. A mnemonic reference is available to make "RTN","XBARRAY0",80,0) ; life simple. Multiple mnemonic lines can be used "RTN","XBARRAY0",81,0) ; if desired. "RTN","XBARRAY0",82,0) ; "RTN","XBARRAY0",83,0) ; SETUP "RTN","XBARRAY0",84,0) ; "RTN","XBARRAY0",85,0) ; #mnemonic1|variable1*mnemonic2|variable2*... "RTN","XBARRAY0",86,0) ; #mnemonicZ|variableZ*..... "RTN","XBARRAY0",87,0) ; "RTN","XBARRAY0",88,0) ; Example: #D|DUZ*V|BARVPT "RTN","XBARRAY0",89,0) ; #I|BARIPT "RTN","XBARRAY0",90,0) ; "RTN","XBARRAY0",91,0) ; (BARIPT array is storing IHS Patient Information) "RTN","XBARRAY0",92,0) ; (BARVPT array is storing VA Patient Information) "RTN","XBARRAY0",93,0) ; "RTN","XBARRAY0",94,0) ; "RTN","XBARRAY0",95,0) ; '#' Marker placed in the first column "RTN","XBARRAY0",96,0) ; "RTN","XBARRAY0",97,0) ; mnemonic1 User's choice "RTN","XBARRAY0",98,0) ; ex: D to denote DUZ "RTN","XBARRAY0",99,0) ; '|' Separator "RTN","XBARRAY0",100,0) ; "RTN","XBARRAY0",101,0) ; variable1 User's choice of the local variable "RTN","XBARRAY0",102,0) ; ex: DUZ "RTN","XBARRAY0",103,0) ; '*' Repetative marker if more than one "RTN","XBARRAY0",104,0) ; mnemonic is indicated "RTN","XBARRAY0",105,0) ; "RTN","XBARRAY0",106,0) ; USE The mnemonic reference can be used any where "RTN","XBARRAY0",107,0) ; in the WP form. "RTN","XBARRAY0",108,0) ; "RTN","XBARRAY0",109,0) ; Format ~mnemonic|variable subscript~ "RTN","XBARRAY0",110,0) ; "RTN","XBARRAY0",111,0) ; '~' Beginning marker for the variable "RTN","XBARRAY0",112,0) ; "RTN","XBARRAY0",113,0) ; mnemonic1 User's mnemonic "RTN","XBARRAY0",114,0) ; "RTN","XBARRAY0",115,0) ; '|' Separator "RTN","XBARRAY0",116,0) ; "RTN","XBARRAY0",117,0) ; subscript The subscript of the variable to be used "RTN","XBARRAY0",118,0) ; "RTN","XBARRAY0",119,0) ; '~' Ending marker for the variable "RTN","XBARRAY0",120,0) ; "RTN","XBARRAY0",121,0) ; ex: ~D|~ for DUZ "RTN","XBARRAY0",122,0) ; ~D|0~ for DUZ(0) "RTN","XBARRAY0",123,0) ; ~I|.01~ for BARIPT(.01) "RTN","XBARRAY0",124,0) ; "RTN","XBARRAY0",125,0) ; MUMPS OUTPUT TRANSFORM "RTN","XBARRAY0",126,0) ; A simple mumps output transform is also provided to aid "RTN","XBARRAY0",127,0) ; in form design. A variable or mnemonic indicated will "RTN","XBARRAY0",128,0) ; have its output transformed prior to being put into the "RTN","XBARRAY0",129,0) ; form. "RTN","XBARRAY0",130,0) ; "RTN","XBARRAY0",131,0) ; SETUP "RTN","XBARRAY0",132,0) ; "RTN","XBARRAY0",133,0) ; *var1!mumps code1*var2!mumps code2 "RTN","XBARRAY0",134,0) ; *mnemonic3!mumps code3*mnemonic4!mumps code4 "RTN","XBARRAY0",135,0) ; "RTN","XBARRAY0",136,0) ; Ex: *DUZ(2)!$J(X,10,2) will output $J(DUZ(2),10,2) "RTN","XBARRAY0",137,0) ; *D | 2!$J(X,10,2) mnemonic notation of same "RTN","XBARRAY0",138,0) ; "RTN","XBARRAY0",139,0) ; '*' Output Transform marker in column one. At TOF "RTN","XBARRAY0",140,0) ; "RTN","XBARRAY0",141,0) ; Variable/ Variable or mnemonic as it would appear in the "RTN","XBARRAY0",142,0) ; Mneumonic form between '~'s. "RTN","XBARRAY0",143,0) ; "RTN","XBARRAY0",144,0) ; '!' Separator "RTN","XBARRAY0",145,0) ; "RTN","XBARRAY0",146,0) ; mumps code Mumps code expression as a function of x. "RTN","XBARRAY0",147,0) ; Do not state 'S X=f(x)' "RTN","XBARRAY0",148,0) ; Enter the function only, f(x). "RTN","XBARRAY0",149,0) ; "RTN","XBARRAY0",150,0) ; '*' Separator if more than one is put on one line. "RTN","XBARRAY0",151,0) ; "RTN","XBARRAY0",152,0) ; SPECIAL OUTPUT TRANSFORMS provided by XBARRAY "RTN","XBARRAY0",153,0) ; "RTN","XBARRAY0",154,0) ; xxx!$$MDY(X) a literal ~"NOW"~ or variable ~IT|9~ "RTN","XBARRAY0",155,0) ; ex: *"NOW"!$$MDY(X) or *IT|9!$$MDY(X) "RTN","XBARRAY0",156,0) ; returns mm/dd/yy "RTN","XBARRAY0",157,0) ; "RTN","XBARRAY0",158,0) ; xxx!$$WP("X") for a word processing field "RTN","XBARRAY0",159,0) ; NOTE: "X" IS ABSOLUTELY NECESSARY "RTN","XBARRAY0",160,0) ; The variable array must have the form "RTN","XBARRAY0",161,0) ; VAR(subcript,n) where n = 1:1 "RTN","XBARRAY0",162,0) ; "RTN","XBARRAY0",163,0) DOCE ; "RTN","XBARRAY0",164,0) ; "RTN","XBARRAY0",165,0) TEST ; If you have A/R installed, uncomment the following lines for a "RTN","XBARRAY0",166,0) ; demonstration. "RTN","XBARRAY0",167,0) ; D INIT^BARUTL "RTN","XBARRAY0",168,0) ; D ENP^XBDIQ1(200,DUZ,".01:.116","BARU(") "RTN","XBARRAY0",169,0) ; S BARFORM="PW TEST" "RTN","XBARRAY0",170,0) ; D EDIT^XBARRAY(.BARFORM,90053.01,1000) "RTN","XBARRAY0",171,0) ; S Y=$$GEN^XBARRAY(.BARFORM,90053.01,1000,"BARFM",0,10) "RTN","XBARRAY0",172,0) ; KILL BARFORM(BARFORM) "RTN","XBARRAY0",173,0) ; Q "RTN","XBARRAY0",174,0) ; "RTN","XBBJ") 0^6^B29158 "RTN","XBBJ",1,0) XBBJ ; EDE/OHPD/IHS GO TO %BJ^%ZTMS "RTN","XBBJ",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBBJ",3,0) ; "RTN","XBBJ",4,0) START ; "RTN","XBBJ",5,0) NEW (U,DT) G %BJ^%ZTMS "RTN","XBBPI") 0^7^B15822267 "RTN","XBBPI",1,0) XBBPI ; IHS/ADC/GTH - BUILD PACKAGE PRE-INIT ROUTINE ; [ 02/07/97 3:02 PM ] "RTN","XBBPI",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBBPI",3,0) ; "RTN","XBBPI",4,0) ; This routine builds a pre-init routine for a specified "RTN","XBBPI",5,0) ; package. The pre-init routine will delete FileMan "RTN","XBBPI",6,0) ; dictionaries being created by the package. Data "RTN","XBBPI",7,0) ; globals and templates will be saved. "RTN","XBBPI",8,0) ; "RTN","XBBPI",9,0) START ; "RTN","XBBPI",10,0) D ^XBKVAR "RTN","XBBPI",11,0) W !!,"This routine will build a pre-init routine for the specified package." "RTN","XBBPI",12,0) W !,"The pre-init routine will call XBKD to delete the FileMan dictionaries" "RTN","XBBPI",13,0) W !,"being created by the package. Data globals and templates will be saved.",!! "RTN","XBBPI",14,0) F XBBPLOOP=0:0 D PACKAGE Q:Y<0 D BUILD "RTN","XBBPI",15,0) KILL %,XBBPLOOP "RTN","XBBPI",16,0) Q "RTN","XBBPI",17,0) ; "RTN","XBBPI",18,0) PACKAGE ; "RTN","XBBPI",19,0) S DIC="^DIC(9.4,",DIC(0)="AEMQ" "RTN","XBBPI",20,0) D ^DIC "RTN","XBBPI",21,0) KILL DIC "RTN","XBBPI",22,0) Q "RTN","XBBPI",23,0) ; "RTN","XBBPI",24,0) BUILD ; "RTN","XBBPI",25,0) S XBBPDFN=+Y,XBBPPRFX=$P(^DIC(9.4,XBBPDFN,0),U,2),Y=DT "RTN","XBBPI",26,0) D DD^%DT "RTN","XBBPI",27,0) S XBBPVER=$G(^DIC(9.4,XBBPDFN,"VERSION"))_";"_$P(^DIC(9.4,XBBPDFN,0),U,1)_";;"_Y,XBBPPGM=XBBPPRFX_"PREI" "RTN","XBBPI",28,0) D CHECKRTN "RTN","XBBPI",29,0) I XBBPFLG D EOJ3 W !!,"Bye",! Q "RTN","XBBPI",30,0) KILL ^UTILITY("XBBPI",$J),^UTILITY("XBBPPGM",$J),^UTILITY("XBBPI EXEC",$J) "RTN","XBBPI",31,0) W "." "RTN","XBBPI",32,0) S (XBBPX,XBBPFLE)=0 "RTN","XBBPI",33,0) F XBBPL=0:0 S XBBPFLE=$O(^DIC(9.4,XBBPDFN,4,"B",XBBPFLE)) Q:XBBPFLE'=+XBBPFLE S ^UTILITY("XBBPI",$J,XBBPFLE)="" "RTN","XBBPI",34,0) W "." "RTN","XBBPI",35,0) S XBBPFLG=0,XBBPFLE="" "RTN","XBBPI",36,0) F XBBPL=0:0 S XBBPFLE=$O(^UTILITY("XBBPI",$J,XBBPFLE)) Q:XBBPFLE'=+XBBPFLE I '$D(^DIC(XBBPFLE)) S XBBPFLG=1 W !,XBBPFLE," does not exist in ^DIC!" "RTN","XBBPI",37,0) I XBBPFLG W !!,"All files in package must exist. Fix and rerun.",!! D EOJ Q "RTN","XBBPI",38,0) W "." "RTN","XBBPI",39,0) S XBBPFLE="" "RTN","XBBPI",40,0) F XBBPL=0:0 S XBBPFLE=$O(^UTILITY("XBBPI",$J,XBBPFLE)) Q:XBBPFLE'=+XBBPFLE S ^(XBBPFLE)="^UTILITY(""XBDSET"",$J,"_XBBPFLE_")=S^S" "RTN","XBBPI",41,0) W "." "RTN","XBBPI",42,0) S %DT="",X="T" "RTN","XBBPI",43,0) D ^%DT "RTN","XBBPI",44,0) X ^DD("DD") "RTN","XBBPI",45,0) S ^UTILITY("XBBPPGM",$J,1,0)=XBBPPGM_" ; CREATED BY XBBPI ON "_Y "RTN","XBBPI",46,0) S ^UTILITY("XBBPPGM",$J,2,0)=" ;;"_XBBPVER "RTN","XBBPI",47,0) F XBBPI=1:1:3 S ^UTILITY("XBBPPGM",$J,XBBPI+2,0)=$P($T(DTA+XBBPI),";;",2,99) "RTN","XBBPI",48,0) S XBBPFLE=0 "RTN","XBBPI",49,0) F XBBPI=6:1 S XBBPFLE=$O(^UTILITY("XBBPI",$J,XBBPFLE)) Q:XBBPFLE'=+XBBPFLE S XBBPY=^(XBBPFLE),^UTILITY("XBBPPGM",$J,XBBPI,0)=" ;;"_XBBPY "RTN","XBBPI",50,0) S DIE="^UTILITY(""XBBPPGM"",$J,",X=XBBPPGM,XCN=0 "RTN","XBBPI",51,0) X ^%ZOSF("SAVE") "RTN","XBBPI",52,0) D EOJ "RTN","XBBPI",53,0) Q "RTN","XBBPI",54,0) ; "RTN","XBBPI",55,0) CHECKRTN ; "RTN","XBBPI",56,0) S XBBPFLG=0 "RTN","XBBPI",57,0) Q:'$D(^DD("OS"))#2 "RTN","XBBPI",58,0) Q:'$D(^DD("OS",^DD("OS"),18))#2 S X=XBBPPGM X ^(18) "RTN","XBBPI",59,0) E Q "RTN","XBBPI",60,0) CR2 ; "RTN","XBBPI",61,0) W !!,XBBPPGM," already exists. Want to recreate it (Y/N) Y//" "RTN","XBBPI",62,0) D YN^DICN "RTN","XBBPI",63,0) S:$E(%Y)="N" XBBPFLG=1 "RTN","XBBPI",64,0) Q "RTN","XBBPI",65,0) ; "RTN","XBBPI",66,0) EOJ ; "RTN","XBBPI",67,0) W !!,"Routine ",XBBPPGM," has been filed.",!! "RTN","XBBPI",68,0) I '$D(^DIC(9.4,XBBPDFN,"INI")) D EOJ2 "RTN","XBBPI",69,0) I $D(^DIC(9.4,XBBPDFN,"INI")),$P(^("INI"),U)="" D EOJ2 I 1 "RTN","XBBPI",70,0) E I $D(^DIC(9.4,XBBPDFN,"INI")),$P(^("INI"),U)'=XBBPPGM W !!,"Package ",XBBPPRFX," has a pre-initialization routine entry but it is ",$P(^("INI"),U),"!" "RTN","XBBPI",71,0) D EOJ3 "RTN","XBBPI",72,0) Q "RTN","XBBPI",73,0) ; "RTN","XBBPI",74,0) EOJ2 ; "RTN","XBBPI",75,0) W !,"Package ",XBBPPRFX," has no pre-initialization routine entry!",! "RTN","XBBPI",76,0) Q "RTN","XBBPI",77,0) ; "RTN","XBBPI",78,0) EOJ3 ; "RTN","XBBPI",79,0) KILL ^UTILITY("XBBPI",$J),^UTILITY("XBBPPGM",$J),^UTILITY("XBBPI EXEC",$J) "RTN","XBBPI",80,0) KILL %,%DT,DIE,XCN "RTN","XBBPI",81,0) KILL XBBPDFN,XBBPFLE,XBBPFLG,XBBPI,XBBPL,XBBPP,XBBPPGM,XBBPPRFX,XBBPX,XBBPY,XBBPVER "RTN","XBBPI",82,0) Q "RTN","XBBPI",83,0) ; "RTN","XBBPI",84,0) DTA ; "RTN","XBBPI",85,0) ;; K ^UTILITY("XBDSET",$J) F XBBPI=1:1 S XBBPIX=$P($T(Q+XBBPI),";;",2) Q:XBBPIX="" S XBBPIY=$P(XBBPIX,"=",2,99),XBBPIX=$P(XBBPIX,"=",1) S @XBBPIX=XBBPIY "RTN","XBBPI",86,0) ;; K XBBPI,XBBPIX,XBBPIY D EN2^XBKD "RTN","XBBPI",87,0) ;;Q Q "RTN","XBCDIC") 0^8^B18807629 "RTN","XBCDIC",1,0) XBCDIC ; IHS/ADC/GTH - CLEAN UP ^DIC AND ^DD ; [ 02/07/97 3:02 PM ] "RTN","XBCDIC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCDIC",3,0) ; "RTN","XBCDIC",4,0) ; PROGRAMMERS NOTE: "RTN","XBCDIC",5,0) ; THIS FUNCTIONALITY HAS BEEN INCLUDED IN THE FILEMAN "RTN","XBCDIC",6,0) ; DD UTILITIES, BEGINNING WITH V 19.0. WE RECOMMEND "RTN","XBCDIC",7,0) ; IT'S USE AS IT IS MORE LIKELY TO BE CURRENT. "RTN","XBCDIC",8,0) ; 3-20-96 "RTN","XBCDIC",9,0) ; "RTN","XBCDIC",10,0) ; This routine cleans up ^DIC and ^DD by a range of "RTN","XBCDIC",11,0) ; dictionary numbers. All files in ^DIC within the range "RTN","XBCDIC",12,0) ; of dictionary numbers are checked for the following: "RTN","XBCDIC",13,0) ; "RTN","XBCDIC",14,0) ; They must have a NAME in ^DIC. "RTN","XBCDIC",15,0) ; The NAME in ^DIC must match the NAME in ^DD. "RTN","XBCDIC",16,0) ; The NAME must exist in ^DIC("B" with the correct number, "RTN","XBCDIC",17,0) ; and that number cannot occur more than once in ^DIC("B". "RTN","XBCDIC",18,0) ; They must have a data global specified in ^DIC. "RTN","XBCDIC",19,0) ; The data global must be in the correct form. "RTN","XBCDIC",20,0) ; The data global must exist. "RTN","XBCDIC",21,0) ; The data global must have a 0th node. "RTN","XBCDIC",22,0) ; The NAME and NUMBER in the data global must match ^DIC. "RTN","XBCDIC",23,0) ; The data globals 0th node must be consistent with "RTN","XBCDIC",24,0) ; the data (Exact count not checked). "RTN","XBCDIC",25,0) ; "RTN","XBCDIC",26,0) ; They must have valid entries in ^DD as follows: "RTN","XBCDIC",27,0) ; The ^DD entry must have a .01 field. "RTN","XBCDIC",28,0) ; All "SB" pointers must point to existing sub-files. "RTN","XBCDIC",29,0) ; All sub-files must point back to correct parent. "RTN","XBCDIC",30,0) ; All "TRB" entries must exist. "RTN","XBCDIC",31,0) ; All "PT" entries must exist. "RTN","XBCDIC",32,0) ; All "ACOMP" entries must exist. "RTN","XBCDIC",33,0) ; "RTN","XBCDIC",34,0) ; When discrepancies are found the entries are corrected "RTN","XBCDIC",35,0) ; automatically where ever possible. If this is not possible "RTN","XBCDIC",36,0) ; operator interaction occurs to make the corrections. If "RTN","XBCDIC",37,0) ; the file cannot be corrected, it will be deleted. "RTN","XBCDIC",38,0) ; "RTN","XBCDIC",39,0) ; After all dictionaries within the range of dictionary "RTN","XBCDIC",40,0) ; numbers are checked, all other entries within the range "RTN","XBCDIC",41,0) ; will be deleted. "RTN","XBCDIC",42,0) ; "RTN","XBCDIC",43,0) ; The last step is to set the 0th node of the FILE OF FILES "RTN","XBCDIC",44,0) ; to the correct high DFN and the correct count of entries. "RTN","XBCDIC",45,0) ; "RTN","XBCDIC",46,0) BEGIN ; "RTN","XBCDIC",47,0) S U="^" "RTN","XBCDIC",48,0) W !!,"THIS FUNCTIONALITY HAS BEEN INCLUDED IN THE FILEMAN" "RTN","XBCDIC",49,0) W !,"DD UTILITIES, BEGINNING WITH V 19.0. WE RECOMMEND" "RTN","XBCDIC",50,0) W !,"IT'S USE AS IT IS MORE LIKELY TO BE CURRENT." "RTN","XBCDIC",51,0) W !," 3-20-96",!! "RTN","XBCDIC",52,0) Q:'$$DIR^XBDIR("E") "RTN","XBCDIC",53,0) W !!,"This routine cleans up ^DIC and ^DD by a range of dictionary numbers." "RTN","XBCDIC",54,0) LO ; "RTN","XBCDIC",55,0) R !!,"Enter low number of range: ",XBCDLO:$G(DTIME,999) "RTN","XBCDIC",56,0) G:XBCDLO'=+XBCDLO EOJ "RTN","XBCDIC",57,0) HI ; "RTN","XBCDIC",58,0) R !,"Enter high number of range: ",XBCDHI:$G(DTIME,999) "RTN","XBCDIC",59,0) S:XBCDHI="" XBCDHI=XBCDLO "RTN","XBCDIC",60,0) G:XBCDHI'=+XBCDHI!(XBCDHIXBCDHI W "." D BCHK "RTN","XBCDIC",75,0) S XBCDFILE=XBCDLO-.00000001 "RTN","XBCDIC",76,0) F XBCDL=0:0 S XBCDFILE=$O(^DIC(XBCDFILE)) Q:XBCDFILE'=+XBCDFILE I XBCDFILE'>XBCDHI W "." S XBCDNDIC=$P(^DIC(XBCDFILE,0),U,1) I XBCDNDIC]"",'$D(^DIC("B",XBCDNDIC,XBCDFILE)) S ^(XBCDFILE)="" W "|" "RTN","XBCDIC",77,0) G EOJ "RTN","XBCDIC",78,0) ; "RTN","XBCDIC",79,0) BCHK ; "RTN","XBCDIC",80,0) I '$D(^DIC(XBCDFILE,0))#2 KILL ^DIC("B",XBCDX,XBCDFILE) W "|" Q "RTN","XBCDIC",81,0) I XBCDX'=$P(^DIC(XBCDFILE,0),U,1) KILL ^DIC("B",XBCDX,XBCDFILE) W "|" "RTN","XBCDIC",82,0) Q "RTN","XBCDIC",83,0) EOJ ; "RTN","XBCDIC",84,0) KILL XBCDLO,XBCDHI,XBCDUCI,XBCDL,XBCDFILE,XBCDX,XBCDNDIC "RTN","XBCDIC",85,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBCDIC",86,0) Q "RTN","XBCDIC",87,0) ; "RTN","XBCDIC",88,0) W !,"Package ",XBBPPRFX," has no pre-initialization routine entry!",! "RTN","XBCDIC",89,0) Q "RTN","XBCDIC",90,0) ; "RTN","XBCDIC",91,0) EOJ3 ; "RTN","XBCDIC",92,0) KILL ^UTILITY("XBBPI",$J),^UTILITY("XBBPPGM",$J),^UTILITY("XBBPI EXEC",$J) "RTN","XBCDIC",93,0) KILL %,%DT,DIE,XCN "RTN","XBCDIC",94,0) KILL XBBPDFN,XBBPFLE,XBBPFLG,XBBPI,XBBPL,XBBPP,XBBPPGM,XBBPPRFX,XBBPX,XBBPY "RTN","XBCDIC",95,0) Q "RTN","XBCDIC",96,0) ; "RTN","XBCDIC",97,0) DTA ; "RTN","XBCDIC",98,0) ;; K ^UTILITY("XBDSET",$J) F XBBPI=1:1 S XBBPIX=$P($T(Q+XBBPI),";;",2) Q:XBBPIX="" S XBBPIY=$P(XBBPIX,"=",2,99),XBBPIX=$P(XBBPIX,"=",1) S @XBBPIX=XBBPIY "RTN","XBCDIC",99,0) ;; K XBBPI,XBBPIX,XBBPIY D EN2^XBKD "RTN","XBCDIC",100,0) ;;Q Q "RTN","XBCDIC",101,0) ; ex: D to denote DUZ "RTN","XBCDIC",102,0) ; '|' Separator "RTN","XBCDIC",103,0) ; "RTN","XBCDIC",104,0) ; variable1 User's choice of the local variable "RTN","XBCDIC",105,0) ; ex: DUZ "RTN","XBCDIC",106,0) ; '*' Repetative marker if more than one "RTN","XBCDIC",107,0) ; mnemonic is indicated "RTN","XBCDIC",108,0) ; "RTN","XBCDIC",109,0) ; USE The mnemonic reference can be used any where "RTN","XBCDIC",110,0) ; in the WP form. "RTN","XBCDIC",111,0) ; Format ~mnemonic|variable subscript~ "RTN","XBCDIC",112,0) ; "RTN","XBCDIC",113,0) ; '~' Beginning marker for the variable "RTN","XBCDIC",114,0) ; "RTN","XBCDIC",115,0) ; mnemonic1 User's mnemonic "RTN","XBCDIC",116,0) ; "RTN","XBCDIC",117,0) ; '|' Separator "RTN","XBCDIC",118,0) ; "RTN","XBCDIC",119,0) ; subscript The subscript of the variable to be used "RTN","XBCDIC",120,0) ; "RTN","XBCDIC",121,0) ; '~' Ending marker for the variable "RTN","XBCDIC",122,0) ; "RTN","XBCDIC",123,0) ; ex: ~D|~ for DUZ "RTN","XBCDIC",124,0) ; ~D|0~ for DUZ(0) "RTN","XBCDIC",125,0) ; ~I|.01~ for BARIPT(.01) "RTN","XBCDIC",126,0) ; "RTN","XBCDIC",127,0) ; MUMPS OUTPUT A simple mumps output transform is also "RTN","XBCDIC",128,0) ; TRANSFORM provided to aid in form design. A variable or "RTN","XBCDIC",129,0) ; mnemonic indicated will have its output "RTN","XBCDIC",130,0) ; transformed prior to being put into the form. "RTN","XBCDIC",131,0) ; "RTN","XBCDIC",132,0) ; SETUP "RTN","XBCDIC",133,0) ; "RTN","XBCDIC",134,0) ; *var1!mumps code1*var2!mumps code2 "RTN","XBCDIC",135,0) ; *mnemonic3!mumps code3*mnemonic4!mumps code4 "RTN","XBCDIC",136,0) ; "RTN","XBCDIC",137,0) ; Ex: *DUZ(2)!$J(X,10,2) will output $J(DUZ(2),10,2) "RTN","XBCDIC",138,0) ; *D|2!$J(X,10,2) mnemonic notation of same "RTN","XBCDIC",139,0) ; "RTN","XBCDIC",140,0) ; '*' Output Transform marker in column one. At TOF "RTN","XBCDIC",141,0) ; "RTN","XBCDIC",142,0) ; Variable/ Variable or mnemonic as it would appear in the "RTN","XBCDIC",143,0) ; Mneumonic form between '~'s. "RTN","XBCDIC",144,0) ; "RTN","XBCDIC",145,0) ; '!' Separator "RTN","XBCDIC",146,0) ; "RTN","XBCDIC",147,0) ; mumps code Mumps code expression as a function of x. "RTN","XBCDIC",148,0) ; Do not state 'S X=f(x)' "RTN","XBCDIC",149,0) ; Enter the function only, f(x). "RTN","XBCDIC",150,0) ; "RTN","XBCDIC",151,0) ; '*' Separator if more than one is put on one line. "RTN","XBCDIC",152,0) ; "RTN","XBCDIC",153,0) ; SPECIAL OUTPUT TRANSFORMS provided by XBARRAY "RTN","XBCDIC",154,0) ; "RTN","XBCDIC",155,0) ; xxx!$$MDY(X) a literal ~"NOW"~ or variable ~IT|9~ "RTN","XBCDIC",156,0) ; ex: *"NOW"!$$MDY(X) or *IT|9!$$MDY(X) "RTN","XBCDIC",157,0) ; returns mm/dd/yy "RTN","XBCDIC",158,0) ; "RTN","XBCDIC",159,0) ; xxx!$$WP("X") for a word processing field "RTN","XBCDIC",160,0) ; NOTE: "X" IS ABSOLUTELY NECESSARY "RTN","XBCDIC",161,0) ; The variable array must have the form "RTN","XBCDIC",162,0) ; VAR(subcript,n) where n = 1:1 "RTN","XBCDIC",163,0) ; "RTN","XBCDIC",164,0) DOCE ; "RTN","XBCDIC",165,0) ; "RTN","XBCDIC",166,0) TEST ; If you have A/R installed, uncomment the following lines for a "RTN","XBCDIC",167,0) ; demonstration. "RTN","XBCDIC",168,0) ; D INIT^BARUTL "RTN","XBCDIC",169,0) ; D ENP^XBDIQ1(200,DUZ,".01:.116","BARU(") "RTN","XBCDIC",170,0) ; S BARFORM="PW TEST" "RTN","XBCDIC",171,0) ; D EDIT^XBARRAY(.BARFORM,90053.01,1000) "RTN","XBCDIC",172,0) ; S Y=$$GEN^XBARRAY(.BARFORM,90053.01,1000,"BARFM",0,10) "RTN","XBCDIC",173,0) ; K BARFORM(BARFORM) "RTN","XBCDIC",174,0) ; Q "RTN","XBCDIC",175,0) ; "RTN","XBCDIC",176,0) NEW I,W "RTN","XBCDIC",177,0) S XBLWP=$G(XBLLINE),W=$P(X,")") "RTN","XBCDIC",178,0) F I=0:1 S X=$Q(@X) Q:X="" Q:(W'=$P(X,",")) D "RTN","XBCDIC",179,0) . S T=@X,XBLLINE=XBLWP+I "RTN","XBCDIC",180,0) . S:'$G(XBFMT) XBZ(XBL+XBLLINE)=T "RTN","XBCDIC",181,0) . S:($G(XBFMT)=1) XBZ(XBL+XBLLINE,0)=T "RTN","XBCDIC",182,0) Q "" "RTN","XBCDIC",183,0) ; "RTN","XBCDIC2") 0^9^B46982439 "RTN","XBCDIC2",1,0) XBCDIC2 ; IHS/ADC/GTH - CHECK DICTIONARY NAMES AND DATA GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","XBCDIC2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCDIC2",3,0) ; "RTN","XBCDIC2",4,0) ; Part of XBCDIC "RTN","XBCDIC2",5,0) ; "RTN","XBCDIC2",6,0) START ; "RTN","XBCDIC2",7,0) S (Y,XBCDUCI)="" "RTN","XBCDIC2",8,0) X:$D(^%ZOSF("UCI"))#2 ^("UCI") "RTN","XBCDIC2",9,0) I Y'="" S XBCDUCI="["""_$P(Y,",",1)_""""_$S($P(Y,",",2)'="":","""_$P(Y,",",2)_"""",1:"")_"]" "RTN","XBCDIC2",10,0) KILL Y "RTN","XBCDIC2",11,0) W !!,"Now checking dictionary names and data globals." "RTN","XBCDIC2",12,0) S XBCDFILE="" "RTN","XBCDIC2",13,0) F XBCDL=0:0 S XBCDFILE=$O(^UTILITY("XBDSET",$J,XBCDFILE)) Q:XBCDFILE="" W !?5,"Checking ",XBCDFILE D XBCDNC "RTN","XBCDIC2",14,0) KILL XBCDFILE,XBCDANS,XBCDC,XBCDG,XBCDGG,XBCDGNM,XBCDGNR,XBCDNDD,XBCDNDIC,XBCDNTBL,XBCDX,XBCDY,XBCDL,XBCDY "RTN","XBCDIC2",15,0) Q "RTN","XBCDIC2",16,0) ; "RTN","XBCDIC2",17,0) XBCDNC ; "RTN","XBCDIC2",18,0) S XBCDNDIC=$G(^DIC(XBCDFILE,0)),XBCDNDIC=$P(XBCDNDIC,U,1) "RTN","XBCDIC2",19,0) D GCHK "RTN","XBCDIC2",20,0) I XBCDNDIC]"",$D(^DD(XBCDFILE,0,"NM",XBCDNDIC))#2 KILL ^DD(XBCDFILE,0,"NM") S ^DD(XBCDFILE,0,"NM",XBCDNDIC)="" "RTN","XBCDIC2",21,0) S XBCDNDD=$O(^DD(XBCDFILE,0,"NM","")) "RTN","XBCDIC2",22,0) I XBCDNDIC=XBCDNDD,XBCDNDIC=XBCDGNM,XBCDFILE=XBCDGNR Q "RTN","XBCDIC2",23,0) I XBCDNDIC]"",XBCDNDIC=XBCDNDD G GNMCHK "RTN","XBCDIC2",24,0) I XBCDNDIC]"",XBCDNDD="" W !?10,"No name in ^DD. Using name in ^DIC." S XBCDNDD=XBCDNDIC,^DD(XBCDFILE,0,"NM",XBCDNDIC)="" G GNMCHK "RTN","XBCDIC2",25,0) I XBCDNDIC="",XBCDNDD]"" W !?10,"No name in ^DIC. Using name in ^DD." S XBCDNDIC=XBCDNDD,$P(^DIC(XBCDFILE,0),U,1)=XBCDNDIC,^DIC("B",XBCDNDIC,XBCDFILE)="" G GNMCHK "RTN","XBCDIC2",26,0) I XBCDNDIC="",XBCDNDD="",XBCDGNM]"",XBCDFILE=XBCDGNR W !?10,"No name in ^DIC or ^DD. Using name in data global." S (XBCDNDIC,XBCDNDD)=XBCDGNM,$P(^DIC(XBCDFILE,0),U,1)=XBCDNDIC,^DIC("B",XBCDNDIC,XBCDFILE)="",^DD(XBCDFILE,0,"NM",XBCDNDD)="" Q "RTN","XBCDIC2",27,0) I XBCDNDIC]"",XBCDNDD]"",XBCDNDIC'=XBCDNDD W !?10,"Name in ^DIC and ^DD differ. Using name in ^DIC." KILL ^DD(XBCDFILE,0,"NM") S XBCDNDD=XBCDNDIC,^DD(XBCDFILE,0,"NM",XBCDNDD)="" G GNMCHK "RTN","XBCDIC2",28,0) W !?10,"Unable to deduce name. Searching DIC(""B"")." "RTN","XBCDIC2",29,0) D DICB "RTN","XBCDIC2",30,0) G:XBCDNDIC]"" GNMCHK "RTN","XBCDIC2",31,0) D READNAME "RTN","XBCDIC2",32,0) G GNMCHK "RTN","XBCDIC2",33,0) ; "RTN","XBCDIC2",34,0) READNAME ; "RTN","XBCDIC2",35,0) W !?10,"Unable to deduce name. Enter File Name or ""^"": ",XBCDX "RTN","XBCDIC2",36,0) I $L(XBCDX)>2,$L(XBCDX)<31,XBCDX?.ANP S (XBCDNDIC,XBCDNDD)=XBCDX,$P(^DIC(XBCDFILE,0),U,1)=XBCDNDIC,^DIC("B",XBCDNDIC,XBCDFILE)="",^DD(XBCDFILE,0,"NM",XBCDNDD)="" Q "RTN","XBCDIC2",37,0) I XBCDX'="^" W *7," ??" G READNAME "RTN","XBCDIC2",38,0) S ^UTILITY("XBDSET",$J,XBCDFILE,"ERR",1)="File "_XBCDFILE_" has no name." "RTN","XBCDIC2",39,0) Q "RTN","XBCDIC2",40,0) ; "RTN","XBCDIC2",41,0) GCHK ; CHECK DATA GLOBAL "RTN","XBCDIC2",42,0) S (XBCDGNM,XBCDGNR)="",XBCDGG=0,XBCDG=$G(^DIC(XBCDFILE,0,"GL")) "RTN","XBCDIC2",43,0) S:XBCDG?1"^"1U.UN1"(".UNP!(XBCDG?1"^"1"%"1U.UN1"(".UNP) XBCDGG=1 "RTN","XBCDIC2",44,0) I XBCDG="" W !?10,"File ",XBCDFILE," has no data global specified in ^DIC." D READGBL G:XBCDG]"" GCHK Q "RTN","XBCDIC2",45,0) I 'XBCDGG W !?10,"File ",XBCDFILE," data global=",XBCDG," is invalid." D READGBL G:XBCDG]"" GCHK Q "RTN","XBCDIC2",46,0) S XBCDG="^"_XBCDUCI_$E(XBCDG,2,99),^UTILITY("XBDSET",$J,XBCDFILE)=XBCDG "RTN","XBCDIC2",47,0) Q:XBCDG["%" "RTN","XBCDIC2",48,0) S XBCDX=$E(XBCDG,1,$L(XBCDG)-1)_$S($E(XBCDG,$L(XBCDG))=",":")",1:""),XBCDX=$D(@XBCDX) "RTN","XBCDIC2",49,0) S XBCDY=$L(XBCDG),XBCDY=$E(XBCDG,1,XBCDY-1)_$E(")",$E(XBCDG,XBCDY)=","),XBCDY=$S(XBCDY[")":$E(XBCDY,1,$L(XBCDY)-1)_",0)",1:XBCDY_"(0)") "RTN","XBCDIC2",50,0) I 'XBCDX W !?10,"Data global ",XBCDG," does not exist. Creating 0th node!" S @XBCDY="CREATED BY XBCD"_U_XBCDFILE Q "RTN","XBCDIC2",51,0) S XBCDX=$D(@XBCDY) "RTN","XBCDIC2",52,0) I XBCDX S XBCDGNM=@XBCDY,XBCDGNR=+$P(XBCDGNM,U,2),XBCDGNM=$P(XBCDGNM,U,1) S:'XBCDGNR XBCDGNR="" G GCHK2 "RTN","XBCDIC2",53,0) W !?10,"File ",XBCDFILE," data global exists but has no 0th node.",!?12,"Creating 0th node. Piece 3 and 4 must be set!" "RTN","XBCDIC2",54,0) S @XBCDY="CREATED BY XBCD"_U_XBCDFILE "RTN","XBCDIC2",55,0) Q "RTN","XBCDIC2",56,0) ; "RTN","XBCDIC2",57,0) GCHK2 ; CHECK 3RD AND 4TH PIECE "RTN","XBCDIC2",58,0) S XBCDX=$P(@XBCDY,U,3,4),XBCDX1=$P(XBCDX,U,2),XBCDX=+XBCDX "RTN","XBCDIC2",59,0) S XBCDX2=$O(@XBCDY) "RTN","XBCDIC2",60,0) I 'XBCDX2,XBCDX!(XBCDX1) W !?10,"Data global 0th node inconsistent with data. Fixing." S $P(@XBCDY,U,3)=0,$P(@XBCDY,U,4)=0 G GCHK3 "RTN","XBCDIC2",61,0) I XBCDX2,'XBCDX!('XBCDX1) W !?10,"Data global 0th node inconsistent with data. Run ^XBCOUNT to fix." G GCHK3 "RTN","XBCDIC2",62,0) I XBCDX,'$D(@(XBCDG_XBCDX_")")) W !?10,"Data global 0th node inconsistent with data. Run ^XBCOUNT to fix." G GCHK3 "RTN","XBCDIC2",63,0) GCHK3 ; CHECK FILE NUMBER IN DATA GLOBAL "RTN","XBCDIC2",64,0) KILL XBCDX1,XBCDX2 "RTN","XBCDIC2",65,0) Q:XBCDGNR=XBCDFILE "RTN","XBCDIC2",66,0) W !?10,"Data global has different number than ^DIC. ",$P(@XBCDY,U,1,2) "RTN","XBCDIC2",67,0) G2R1 ; "RTN","XBCDIC2",68,0) R !?12,"Change number in data global? (Y/N) ",XBCDX:$G(DTIME,999) "RTN","XBCDIC2",69,0) I XBCDX'="Y"&(XBCDX'="N") W *7," ??" G G2R1 "RTN","XBCDIC2",70,0) I XBCDX="Y" S XBCDX=@XBCDY,XBCDX1=$P(XBCDX,U,2),XBCDX2=+XBCDX1,XBCDX3=$P(XBCDX1,XBCDX2,2),$P(XBCDX,U,2)=XBCDFILE_XBCDX3,@XBCDY=XBCDX,XBCDGNR=XBCDFILE KILL XBCDX1,XBCDX2,XBCDX3 KILL XBCDX3 Q "RTN","XBCDIC2",71,0) D READGBL "RTN","XBCDIC2",72,0) I XBCDG="" W !?10,"Removing ^DIC(",XBCDFILE,",""0"",""GL"") node." KILL ^DIC(XBCDFILE,0,"GL") "RTN","XBCDIC2",73,0) G GCHK "RTN","XBCDIC2",74,0) ; "RTN","XBCDIC2",75,0) READGBL ; "RTN","XBCDIC2",76,0) R !!,"Enter Data Global or ""^"": ",XBCDG:$G(DTIME,999) "RTN","XBCDIC2",77,0) I XBCDG="^" S XBCDG="",^UTILITY("XBDSET",$J,XBCDFILE,"ERR",2)="File "_XBCDFILE_" data global missing or invalid." Q "RTN","XBCDIC2",78,0) I XBCDG'?1"^"1U.UN1"(".UNP,XBCDG'?1"^"1"%"1U.UN1"(".UNP W *7," ??" G READGBL "RTN","XBCDIC2",79,0) S ^DIC(XBCDFILE,0,"GL")=XBCDG "RTN","XBCDIC2",80,0) Q "RTN","XBCDIC2",81,0) ; "RTN","XBCDIC2",82,0) DICB ; CHECK DIC("B" "RTN","XBCDIC2",83,0) KILL XBCDNTBL "RTN","XBCDIC2",84,0) S (XBCDX,XBCDC)=0 "RTN","XBCDIC2",85,0) F XBCDL=0:0 S XBCDX=$O(^DIC("B",XBCDX)) Q:XBCDX="" I $D(^(XBCDX,XBCDFILE)) S XBCDC=XBCDC+1,XBCDNTBL(XBCDC)=XBCDX "RTN","XBCDIC2",86,0) Q:'XBCDC "RTN","XBCDIC2",87,0) I XBCDC=1 S XBCDANS=1 D NAMESET KILL XBCDNTBL Q "RTN","XBCDIC2",88,0) W !?12,"Multiple entries were found in ^DIC(""B""). Select one name or enter ""^""",!?12," All unselected names will be removed." "RTN","XBCDIC2",89,0) D PICKNAME "RTN","XBCDIC2",90,0) I XBCDANS'="^" D NAMESET KILL XBCDNTBL(XBCDANS) W ! "RTN","XBCDIC2",91,0) S XBCDX="" "RTN","XBCDIC2",92,0) F XBCDL=0:0 S XBCDX=$O(XBCDNTBL(XBCDX)) Q:XBCDX="" W !?12,"Deleting ^DIC(""B"",""",XBCDNTBL(XBCDX),""",",XBCDFILE,")" KILL ^DIC("B",XBCDNTBL(XBCDX),XBCDFILE) "RTN","XBCDIC2",93,0) W ! "RTN","XBCDIC2",94,0) KILL XBCDNTBL "RTN","XBCDIC2",95,0) Q "RTN","XBCDIC2",96,0) ; "RTN","XBCDIC2",97,0) PICKNAME ; "RTN","XBCDIC2",98,0) F XBCDX=1:1:XBCDC W !?14,XBCDNTBL(XBCDX) "RTN","XBCDIC2",99,0) P1 ; "RTN","XBCDIC2",100,0) R !!?14,"Which one: ",XBCDANS:$G(DTIME,999) "RTN","XBCDIC2",101,0) Q:XBCDANS="^" "RTN","XBCDIC2",102,0) S:XBCDANS="" XBCDANS="?" "RTN","XBCDIC2",103,0) I '$D(XBCDNTBL(XBCDANS)) W *7," ??" G P1 "RTN","XBCDIC2",104,0) Q "RTN","XBCDIC2",105,0) ; "RTN","XBCDIC2",106,0) NAMESET ; "RTN","XBCDIC2",107,0) W !?12,"Setting names to '",XBCDNTBL(XBCDANS),"'" "RTN","XBCDIC2",108,0) S (XBCDNDIC,XBCDNDD)=XBCDNTBL(XBCDANS),$P(^DIC(XBCDFILE,0),U,1)=XBCDNDIC,^DIC("B",XBCDNDIC,XBCDFILE)="" "RTN","XBCDIC2",109,0) KILL ^DD(XBCDFILE,0,"NM") "RTN","XBCDIC2",110,0) S ^DD(XBCDFILE,0,"NM",XBCDNDD)="" "RTN","XBCDIC2",111,0) Q "RTN","XBCDIC2",112,0) ; "RTN","XBCDIC2",113,0) GNMCHK ; CHECK DATA GLOBAL NAME AGAINST ^DIC "RTN","XBCDIC2",114,0) Q:'XBCDGG "RTN","XBCDIC2",115,0) I XBCDGNM]""!(XBCDGNR),XBCDNDIC'=XBCDGNM W !?10,"Data global name does not match ^DIC.",!?12,"Data global: ",XBCDGNM,!?12," ^DIC: ",XBCDNDIC D GNMFIX "RTN","XBCDIC2",116,0) S XBCDX=XBCDG_"0)" "RTN","XBCDIC2",117,0) I XBCDGNM="",XBCDGNR="",$D(@XBCDX)#2 S $P(@XBCDX,U,1)=XBCDNDIC "RTN","XBCDIC2",118,0) Q "RTN","XBCDIC2",119,0) ; "RTN","XBCDIC2",120,0) GNMFIX ; "RTN","XBCDIC2",121,0) R !?12,"Change name in data global? (Y/N) ",XBCDX:$G(DTIME,999) "RTN","XBCDIC2",122,0) I XBCDX'="Y"&(XBCDX'="N") W *7," ??" G GNMFIX "RTN","XBCDIC2",123,0) I XBCDX="Y" S XBCDX=XBCDG_"0)",$P(@XBCDX,U,1)=XBCDNDIC,XBCDGNM=XBCDNDIC Q "RTN","XBCDIC2",124,0) GNMR1 ; "RTN","XBCDIC2",125,0) R !?12,"Change names in ^DIC and ^DD to name in data global? (Y/N) ",XBCDX:$G(DTIME,999) "RTN","XBCDIC2",126,0) I XBCDX'="Y"&(XBCDX'="N") W *7," ??" G GNMR1 "RTN","XBCDIC2",127,0) I XBCDX'="Y" S ^UTILITY("XBDSET",$J,XBCDFILE,"ERR",3)="File "_XBCDFILE_" data global name does not match ^DIC name." Q "RTN","XBCDIC2",128,0) KILL ^DIC("B",XBCDNDIC,XBCDFILE),^DD(XBCDFILE,0,"NM") "RTN","XBCDIC2",129,0) S (XBCDNDIC,XBCDNDD)=XBCDGNM,$P(^DIC(XBCDFILE,0),U,1)=XBCDNDIC,^DIC("B",XBCDNDIC,XBCDFILE)="",^DD(XBCDFILE,0,"NM",XBCDNDD)="" "RTN","XBCDIC2",130,0) Q "RTN","XBCDIC2",131,0) ; "RTN","XBCDIC3") 0^10^B34717825 "RTN","XBCDIC3",1,0) XBCDIC3 ; IHS/ADC/GTH - CHECK ^DD ; [ 02/07/97 3:02 PM ] "RTN","XBCDIC3",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCDIC3",3,0) ; "RTN","XBCDIC3",4,0) ; Part of XBCDIC "RTN","XBCDIC3",5,0) ; "RTN","XBCDIC3",6,0) START ; "RTN","XBCDIC3",7,0) W !!,"Now checking ^DD entries." "RTN","XBCDIC3",8,0) S U="^",XBCDFILE="" "RTN","XBCDIC3",9,0) F XBCDL=0:0 S XBCDFILE=$O(^UTILITY("XBDSET",$J,XBCDFILE)) Q:XBCDFILE="" W !?5,"Checking ",XBCDFILE D XBCDDDC "RTN","XBCDIC3",10,0) KILL XBCDANS,XBCDFILE,XBCDL "RTN","XBCDIC3",11,0) Q "RTN","XBCDIC3",12,0) ; "RTN","XBCDIC3",13,0) XBCDDDC ; CHECK ^DD ENTRY "RTN","XBCDIC3",14,0) D CHKDD0 ; CHECK ^DD 0TH NODE "RTN","XBCDIC3",15,0) D CHKPT ; CHECK "PT" NODE "RTN","XBCDIC3",16,0) D CHKTRB ; CHECK "TRB" NODE "RTN","XBCDIC3",17,0) D CHKACOMP ; CHECK "ACOMP" NODE "RTN","XBCDIC3",18,0) D SBTRACE ; CHECK "SB" NODE "RTN","XBCDIC3",19,0) Q "RTN","XBCDIC3",20,0) ; "RTN","XBCDIC3",21,0) CHKDD0 ; CHECK 0TH NODE "RTN","XBCDIC3",22,0) I '($D(^DD(XBCDFILE,.01,0))#2) W !,"File ",XBCDFILE," has no ^DD(",XBCDFILE,",.01,0) entry." "RTN","XBCDIC3",23,0) I '$D(^DD(XBCDFILE,0,"NM")) W !,"File ",XBCDFILE," has no ^DD(",XBCDFILE,",0,""NM"") entry." "RTN","XBCDIC3",24,0) E S XBCDX=$O(^DD(XBCDFILE,0,"NM","")),XBCDX=$O(^(XBCDX)) I XBCDX]"" W !,"File ",XBCDFILE," has multiple names." "RTN","XBCDIC3",25,0) Q "RTN","XBCDIC3",26,0) ; "RTN","XBCDIC3",27,0) CHKPT ; CHECK "PT" NODE "RTN","XBCDIC3",28,0) S XBCDPFLE="" "RTN","XBCDIC3",29,0) F XBCDL=0:0 S XBCDPFLE=$O(^DD(XBCDFILE,0,"PT",XBCDPFLE)) Q:XBCDPFLE="" S XBCDPFLD="" F XBCDL=0:0 S XBCDPFLD=$O(^DD(XBCDFILE,0,"PT",XBCDPFLE,XBCDPFLD)) Q:XBCDPFLD="" D PT "RTN","XBCDIC3",30,0) KILL XBCDPFLE,XBCDPFLD,XBCDX "RTN","XBCDIC3",31,0) Q "RTN","XBCDIC3",32,0) PT ; "RTN","XBCDIC3",33,0) W "." "RTN","XBCDIC3",34,0) I '$D(^DD(XBCDPFLE)) W "|" KILL ^DD(XBCDFILE,0,"PT",XBCDPFLE) Q "RTN","XBCDIC3",35,0) I '$D(^DD(XBCDPFLE,XBCDPFLD)) W "|" KILL ^DD(XBCDFILE,0,"PT",XBCDPFLE,XBCDPFLD) Q "RTN","XBCDIC3",36,0) S XBCDX=$P(^DD(XBCDPFLE,XBCDPFLD,0),U,2) "RTN","XBCDIC3",37,0) I XBCDX["V",$D(^DD(XBCDPFLE,XBCDPFLD,"V","B",XBCDFILE)) Q "RTN","XBCDIC3",38,0) I XBCDX["P",XBCDX[XBCDFILE Q "RTN","XBCDIC3",39,0) W "|" KILL ^DD(XBCDFILE,0,"PT",XBCDPFLE,XBCDPFLD) "RTN","XBCDIC3",40,0) Q "RTN","XBCDIC3",41,0) ; "RTN","XBCDIC3",42,0) CHKTRB ; CHECK "TRB" NODE "RTN","XBCDIC3",43,0) Q:'$D(^DD(XBCDFILE,"TRB")) "RTN","XBCDIC3",44,0) S XBCDTFLE="" "RTN","XBCDIC3",45,0) F XBCDL=0:0 S XBCDTFLE=$O(^DD(XBCDFILE,"TRB",XBCDTFLE)) Q:XBCDTFLE="" S XBCDTFLD="" F XBCDL=0:0 S XBCDTFLD=$O(^DD(XBCDFILE,"TRB",XBCDTFLE,XBCDTFLD)) Q:XBCDTFLD="" D TRB "RTN","XBCDIC3",46,0) KILL XBCDTFLE,XBCDTFLD,XBCDX "RTN","XBCDIC3",47,0) Q "RTN","XBCDIC3",48,0) ; "RTN","XBCDIC3",49,0) TRB ; THIS CAN CHECK MORE THAN IT DOES *** "RTN","XBCDIC3",50,0) W "." "RTN","XBCDIC3",51,0) I '$D(^DD(XBCDTFLE)) W "|" KILL ^DD(XBCDFILE,"TRB",XBCDTFLE) Q "RTN","XBCDIC3",52,0) I '$D(^DD(XBCDTFLE,XBCDTFLD)) W "|" KILL ^DD(XBCDFILE,"TRB",XBCDTFLE,XBCDTFLD) Q "RTN","XBCDIC3",53,0) Q "RTN","XBCDIC3",54,0) ; "RTN","XBCDIC3",55,0) CHKACOMP ; CHECK "ACOMP" ENTRIES "RTN","XBCDIC3",56,0) Q:'$D(^DD("ACOMP",XBCDFILE)) "RTN","XBCDIC3",57,0) S XBCDFLD="" "RTN","XBCDIC3",58,0) F XBCDL=0:0 S XBCDFLD=$O(^DD("ACOMP",XBCDFILE,XBCDFLD)) Q:XBCDFLD'=+XBCDFLD D CHKFIELD "RTN","XBCDIC3",59,0) KILL XBCDFLD "RTN","XBCDIC3",60,0) Q "RTN","XBCDIC3",61,0) ; "RTN","XBCDIC3",62,0) CHKFIELD ; "RTN","XBCDIC3",63,0) S XBCDAFLE="" "RTN","XBCDIC3",64,0) F XBCDL=0:0 S XBCDAFLE=$O(^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE)) Q:XBCDAFLE="" S XBCDAFLD="" F XBCDL=0:0 S XBCDAFLD=$O(^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE,XBCDAFLD)) Q:XBCDAFLD="" D ACOMP "RTN","XBCDIC3",65,0) KILL XBCDAFLE,XBCDAFLD,XBCDX "RTN","XBCDIC3",66,0) Q "RTN","XBCDIC3",67,0) ; "RTN","XBCDIC3",68,0) ACOMP ; "RTN","XBCDIC3",69,0) W "." "RTN","XBCDIC3",70,0) I '$D(^DD(XBCDAFLE)) W "|" KILL ^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE) Q "RTN","XBCDIC3",71,0) I '$D(^DD(XBCDAFLE,XBCDAFLD)) W "|" KILL ^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE,XBCDAFLD) Q "RTN","XBCDIC3",72,0) I '($D(^DD(XBCDAFLE,XBCDAFLD,0))#2) W "|" KILL ^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE,XBCDAFLD) Q "RTN","XBCDIC3",73,0) S XBCDX=$P(^DD(XBCDAFLE,XBCDAFLD,0),U,2) "RTN","XBCDIC3",74,0) I XBCDX'["C" W "|" KILL ^DD("ACOMP",XBCDFILE,XBCDFLD,XBCDAFLE,XBCDAFLD) "RTN","XBCDIC3",75,0) Q "RTN","XBCDIC3",76,0) ; "RTN","XBCDIC3",77,0) SBTRACE ; CHECK ALL SUB-FILES "RTN","XBCDIC3",78,0) KILL XBCDSFL "RTN","XBCDIC3",79,0) S XBCDC=1,XBCDSFL="",XBCDSFL(XBCDC)=XBCDFILE "RTN","XBCDIC3",80,0) F XBCDL=0:0 S XBCDI=$O(XBCDSFL("")) Q:XBCDI="" S XBCDSF=XBCDSFL(XBCDI) D SBTRACE2 S XBCDI=$O(XBCDSFL("")) W "." KILL XBCDSFL(XBCDI) "RTN","XBCDIC3",81,0) KILL XBCDC,XBCDI,XBCDSF,XBCDSFL,XBCDY,XBCDZ "RTN","XBCDIC3",82,0) Q "RTN","XBCDIC3",83,0) ; "RTN","XBCDIC3",84,0) SBTRACE2 ; "RTN","XBCDIC3",85,0) S XBCDI=0 "RTN","XBCDIC3",86,0) F XBCDL=0:0 S XBCDI=$O(^DD(XBCDSF,"SB",XBCDI)) Q:XBCDI="" W "." S XBCDC=XBCDC+1,XBCDSFL(XBCDC)=XBCDI D SBCHECK "RTN","XBCDIC3",87,0) Q "RTN","XBCDIC3",88,0) ; "RTN","XBCDIC3",89,0) SBCHECK ; "RTN","XBCDIC3",90,0) I '$D(^DD(XBCDI)) S X=$O(^DD(XBCDSF,"SB",XBCDI,0)),Y=$P(^DD(XBCDSF,X,0),U) D Q "RTN","XBCDIC3",91,0) . W !?10,"Subfile ",XBCDI," for field ",X," does not exists.",!?12,"Deleting field ",X," from file ",XBCDSF "RTN","XBCDIC3",92,0) . KILL ^DD(XBCDSF,X),^DD(XBCDSF,"SB",XBCDI),^DD(XBCDSF,"B",Y,X) "RTN","XBCDIC3",93,0) . Q "RTN","XBCDIC3",94,0) D SBTRACE3,SBTRACE4 "RTN","XBCDIC3",95,0) Q "RTN","XBCDIC3",96,0) ; "RTN","XBCDIC3",97,0) SBTRACE3 ; "RTN","XBCDIC3",98,0) I '$D(^DD(XBCDI,0,"UP")),$D(^DIC(XBCDI)) W !?10,XBCDI," is a primary file. Deleting ^DD(",XBCDSF,",""SB"",",XBCDI,")" KILL ^DD(XBCDSF,"SB",XBCDI) Q "RTN","XBCDIC3",99,0) I $D(^DD(XBCDI,0,"PT")) W !?10,XBCDI," sub-file has ""PT"" node. Deleting." KILL ^DD(XBCDI,0,"PT") "RTN","XBCDIC3",100,0) I '$D(^DD(XBCDI,0,"UP")) W !?10,XBCDI," has no ""UP"" node. Creating ^DD(",XBCDI,",0,""UP"")=",XBCDSF S ^DD(XBCDI,0,"UP")=XBCDSF "RTN","XBCDIC3",101,0) Q:^DD(XBCDI,0,"UP")=XBCDSF "RTN","XBCDIC3",102,0) I ^DD(XBCDI,0,"UP")="" W !?10,XBCDI," ""UP"" node is NULL. Setting ^DD(",XBCDI,",0,""UP"")=",XBCDSF S ^DD(XBCDI,0,"UP")=XBCDSF Q "RTN","XBCDIC3",103,0) W !?10,XBCDSF," lists ",XBCDI," as a sub-file. The ""UP"" node in ",!?10+$L(XBCDSF)+1,XBCDI," is ",^DD(XBCDI,0,"UP"),"." "RTN","XBCDIC3",104,0) I $D(^DD(^DD(XBCDI,0,"UP"),"SB",XBCDSF)) W !?12,"The ""SB"" in ",^DD(XBCDI,0,"UP")," agrees. Fixing." KILL ^DD(XBCDSF,"SB",XBCDI) Q "RTN","XBCDIC3",105,0) E W !?12,"The ""SB"" in ",^DD(XBCDI,0,"UP")," disagrees. Fixing." S ^DD(XBCDI,0,"UP")=XBCDSF "RTN","XBCDIC3",106,0) Q "RTN","XBCDIC3",107,0) ; "RTN","XBCDIC3",108,0) SBTRACE4 ; "RTN","XBCDIC3",109,0) I '$D(^DD(XBCDI,0,"NM")) W !?10,"Sub-file ",XBCDI," has no ^DD(",XBCDI,",0,""NM"") entry. Fixing." D SBTFIX I 1 "RTN","XBCDIC3",110,0) E S XBCDX=$O(^DD(XBCDI,0,"NM","")),XBCDX=$O(^(XBCDX)) I XBCDX]"" W !?10,"Sub-file ",XBCDI," has multiple names. Fixing." D SBTFIX "RTN","XBCDIC3",111,0) Q "RTN","XBCDIC3",112,0) ; "RTN","XBCDIC3",113,0) SBTFIX ; FIX "NM" "RTN","XBCDIC3",114,0) KILL ^DD(XBCDI,0,"NM") "RTN","XBCDIC3",115,0) I '$D(^DD(XBCDI,0,"UP")) W !?12,"Can't fix. No ""UP"" node." Q "RTN","XBCDIC3",116,0) S XBCDX=^DD(XBCDI,0,"UP") "RTN","XBCDIC3",117,0) I XBCDX="" W !?12,"Can't fix. ""UP"" node is NULL." Q "RTN","XBCDIC3",118,0) I '$D(^DD(XBCDX,"SB",XBCDI)) W !?12,"Can't fix because can't locate parent field." Q "RTN","XBCDIC3",119,0) S XBCDY=$O(^DD(XBCDX,"SB",XBCDI,"")),XBCDZ=$P(^DD(XBCDX,XBCDY,0),U,1) "RTN","XBCDIC3",120,0) S ^DD(XBCDI,0,"NM",XBCDZ)="" "RTN","XBCDIC3",121,0) Q "RTN","XBCDIC3",122,0) ; "RTN","XBCDICD") 0^11^B2350351 "RTN","XBCDICD",1,0) XBCDICD ; IHS/ADC/GTH - DELETE BAD FILES ; [ 02/07/97 3:02 PM ] "RTN","XBCDICD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCDICD",3,0) ; "RTN","XBCDICD",4,0) ; Part of XBCDIC "RTN","XBCDICD",5,0) ; "RTN","XBCDICD",6,0) START ; "RTN","XBCDICD",7,0) S XBCDDEL=0,XBCDFILE="" "RTN","XBCDICD",8,0) F XBCDL=0:0 S XBCDFILE=$O(^UTILITY("XBDSET",$J,XBCDFILE)) Q:XBCDFILE="" S XBCDGOOD=1 D:$D(^(XBCDFILE,"ERR"))\10 ERRORS K:XBCDGOOD ^UTILITY("XBDSET",$J,XBCDFILE) "RTN","XBCDICD",9,0) I XBCDDEL W !!,"Executing ^XBKD to delete specified files!" D EN2^XBKD "RTN","XBCDICD",10,0) KILL XBCDDEL,XBCDFILE,XBCDGOOD,XBCDX,XBCDNDIC "RTN","XBCDICD",11,0) Q "RTN","XBCDICD",12,0) ; "RTN","XBCDICD",13,0) ERRORS ; RESOLVE ERRORS SET BY ^XBCDIC2 OR ^XBCDIC3 "RTN","XBCDICD",14,0) W ! "RTN","XBCDICD",15,0) S XBCDX="" "RTN","XBCDICD",16,0) F XBCDL=0:0 S XBCDX=$O(^UTILITY("XBDSET",$J,XBCDFILE,"ERR",XBCDX)) Q:XBCDX="" W !,^(XBCDX) "RTN","XBCDICD",17,0) ACTR ; "RTN","XBCDICD",18,0) R !!," Delete file? (Y/N) ",XBCDX:$G(DTIME,999) "RTN","XBCDICD",19,0) I XBCDX'="Y"&(XBCDX'="N") W *7," ??" G ACTR "RTN","XBCDICD",20,0) S:XBCDX="Y" XBCDDEL=1,XBCDGOOD=0,^UTILITY("XBDSET",$J,XBCDFILE)="A^A" "RTN","XBCDICD",21,0) KILL ^UTILITY("XBDSET",$J,XBCDFILE,"ERR") "RTN","XBCDICD",22,0) Q "RTN","XBCDICD",23,0) ; "RTN","XBCFIX") 0^12^B4994700 "RTN","XBCFIX",1,0) XBCFIX ; IHS/ADC/GTH - COUNT ENTRIES IN FILEMAN FILES AND FIX ; [ 02/07/97 3:02 PM ] "RTN","XBCFIX",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCFIX",3,0) ; "RTN","XBCFIX",4,0) ; This routine counts primary entries in FileMan files and "RTN","XBCFIX",5,0) ; fixes the 3rd and 4th piece of the 0th node. "RTN","XBCFIX",6,0) ; "RTN","XBCFIX",7,0) START ; "RTN","XBCFIX",8,0) W !,"^XBCFIX - This routine counts primary entries in FileMan files and fixes",!," the 0th node.",! "RTN","XBCFIX",9,0) S U="^" "RTN","XBCFIX",10,0) D ^XBDSET "RTN","XBCFIX",11,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBCFIX",12,0) W ! "RTN","XBCFIX",13,0) S XBCFIXFL="" "RTN","XBCFIX",14,0) F XBCFIXL=0:0 S XBCFIXFL=$O(^UTILITY("XBDSET",$J,XBCFIXFL)) Q:XBCFIXFL'=+XBCFIXFL D XBCFIXFL "RTN","XBCFIX",15,0) D EOJ "RTN","XBCFIX",16,0) Q "RTN","XBCFIX",17,0) ; "RTN","XBCFIX",18,0) XBCFIXFL ; "RTN","XBCFIX",19,0) W !,XBCFIXFL "RTN","XBCFIX",20,0) I XBCFIXFL=3.081 W " skipping" Q "RTN","XBCFIX",21,0) I '$D(^DIC(XBCFIXFL,0,"GL")) W !!,"No data global specified in ^DIC!" Q "RTN","XBCFIX",22,0) S XBCFIXGB=^DIC(XBCFIXFL,0,"GL") "RTN","XBCFIX",23,0) I '$D(@($S($E(XBCFIXGB,$L(XBCFIXGB))="(":$E(XBCFIXGB,1,$L(XBCFIXGB)-1),1:$E(XBCFIXGB,1,$L(XBCFIXGB)-1)_")"))) W !!,"Bad global!" Q "RTN","XBCFIX",24,0) S XBCFIXGB=XBCFIXGB_"XBCFIXNX)",(XBCFIXHI,XBCFIXNX,XBCFIXC)=0 "RTN","XBCFIX",25,0) F XBCFIXL=0:0 S XBCFIXNX=$O(@(XBCFIXGB)) Q:XBCFIXNX'=+XBCFIXNX S XBCFIXHI=XBCFIXNX,XBCFIXC=XBCFIXC+1 W:'(XBCFIXC#50) "." "RTN","XBCFIX",26,0) W !," Count=",XBCFIXC,?22,"High DFN=",XBCFIXHI "RTN","XBCFIX",27,0) S XBCFIXNX="",XBCFIXX=$O(@(XBCFIXGB)),XBCFIXX=^(0),XBCFIXY=$P(XBCFIXX,U,4),XBCFIXX=$P(XBCFIXX,U,3),$P(^(0),U,3)=XBCFIXHI,$P(^(0),U,4)=XBCFIXC "RTN","XBCFIX",28,0) I XBCFIXC=XBCFIXY,XBCFIXHI=XBCFIXX W ?50,"[correct]" Q "RTN","XBCFIX",29,0) W ?50,"[incorrect -- fixed]" "RTN","XBCFIX",30,0) Q "RTN","XBCFIX",31,0) ; "RTN","XBCFIX",32,0) EOJ ; "RTN","XBCFIX",33,0) KILL XBCFIXHI,XBCFIXX,XBCFIXY,XBCFIXC,DIC,DIC(0),XBCFIXFL,XBCFIXGB,XBCFIXL,XBCFIXNX "RTN","XBCFIX",34,0) Q "RTN","XBCFIX",35,0) ; "RTN","XBCFXREF") 0^13^B23667081 "RTN","XBCFXREF",1,0) XBCFXREF ; IHS/ADC/GTH - CHECK/FIX XREFS ; [ 02/07/97 3:02 PM ] "RTN","XBCFXREF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCFXREF",3,0) ; "RTN","XBCFXREF",4,0) ; This routine checks all REGULAR xrefs at the file level "RTN","XBCFXREF",5,0) ; for selected files to insure all pointed to entries exist. "RTN","XBCFXREF",6,0) ; "RTN","XBCFXREF",7,0) START ; "RTN","XBCFXREF",8,0) D INIT "RTN","XBCFXREF",9,0) I XBCFXREF("QFLG") D EOJ Q "RTN","XBCFXREF",10,0) D FILES "RTN","XBCFXREF",11,0) D EOJ "RTN","XBCFXREF",12,0) Q "RTN","XBCFXREF",13,0) ; "RTN","XBCFXREF",14,0) INIT ; "RTN","XBCFXREF",15,0) S XBCFXREF("QFLG")=0 "RTN","XBCFXREF",16,0) D ^XBKVAR "RTN","XBCFXREF",17,0) W !,"This routine will check the xrefs for the files you select and display",!," all errors found. You may also delete the bad xrefs." "RTN","XBCFXREF",18,0) W !!,"You should probably capture the output to an aux printer." "RTN","XBCFXREF",19,0) S XBCFXREF("DF")=$$DIR^XBDIR("S^1:DISPLAY ONLY;2:DISPLAY & FIX","","1") "RTN","XBCFXREF",20,0) I $D(DIRUT) S XBCFXREF("QFLG")=1 Q "RTN","XBCFXREF",21,0) D ^XBDSET "RTN","XBCFXREF",22,0) I '$D(^UTILITY("XBDSET")) S XBCFXREF("QFLG")=1 Q "RTN","XBCFXREF",23,0) Q "RTN","XBCFXREF",24,0) ; "RTN","XBCFXREF",25,0) FILES ; CHECK FILES "RTN","XBCFXREF",26,0) S XBCFXREF("C")=0 "RTN","XBCFXREF",27,0) F XBCFXREF("FILE")=0:0 S XBCFXREF("FILE")=$O(^UTILITY("XBDSET",$J,XBCFXREF("FILE"))) Q:XBCFXREF("FILE")="" D FILE "RTN","XBCFXREF",28,0) Q "RTN","XBCFXREF",29,0) ; "RTN","XBCFXREF",30,0) ;--------------------------------------------------------------------- "RTN","XBCFXREF",31,0) ; Gather up xrefs to check "RTN","XBCFXREF",32,0) ; "RTN","XBCFXREF",33,0) FILE ; CHECK ONE FILE "RTN","XBCFXREF",34,0) W !!,"Checking the ",$P(^DIC(XBCFXREF("FILE"),0),U,1)," (",XBCFXREF("FILE"),") file" "RTN","XBCFXREF",35,0) KILL XBCFXREF("TBL") "RTN","XBCFXREF",36,0) S XBCFXREF("XREF")="" "RTN","XBCFXREF",37,0) F S XBCFXREF("XREF")=$O(^DD(XBCFXREF("FILE"),0,"IX",XBCFXREF("XREF"))) Q:XBCFXREF("XREF")="" S XBCFXREF("XREF FILE")=$O(^(XBCFXREF("XREF"),0)),XBCFXREF("XREF FIELD")=$O(^(XBCFXREF("XREF FILE"),0)) D "RTN","XBCFXREF",38,0) . S XBCFXREF("TBL",XBCFXREF("XREF FILE"),XBCFXREF("XREF FIELD"),XBCFXREF("XREF"))="" "RTN","XBCFXREF",39,0) .Q "RTN","XBCFXREF",40,0) I $D(XBCFXREF("TBL")) D XREFILE KILL XBCFXREF("TBL") "RTN","XBCFXREF",41,0) I $D(XBCFXREF("TBL2")) D CHECK KILL XBCFXREF("TBL2") "RTN","XBCFXREF",42,0) Q "RTN","XBCFXREF",43,0) ; "RTN","XBCFXREF",44,0) XREFILE ; CHECK EACH FILE/FIELD CREATING XREFS "RTN","XBCFXREF",45,0) F XBCFXREF("XREF FILE")=0:0 S XBCFXREF("XREF FILE")=$O(XBCFXREF("TBL",XBCFXREF("XREF FILE"))) Q:XBCFXREF("XREF FILE")="" D D XREFIELD "RTN","XBCFXREF",46,0) . S XBCFXREF("TOP DA")=0,XBCFXREF("PARENT")="" "RTN","XBCFXREF",47,0) . Q:'$D(^DD(XBCFXREF("XREF FILE"),0,"UP")) ; quit if not subfile "RTN","XBCFXREF",48,0) . NEW SUBFILE,PARENT,FIELD,LVL "RTN","XBCFXREF",49,0) . S SUBFILE=XBCFXREF("XREF FILE"),PARENT="",LVL=1 "RTN","XBCFXREF",50,0) . D BACKUP "RTN","XBCFXREF",51,0) . S XBCFXREF("TOP DA")=LVL,XBCFXREF("PARENT")=PARENT "RTN","XBCFXREF",52,0) . Q "RTN","XBCFXREF",53,0) Q "RTN","XBCFXREF",54,0) ; "RTN","XBCFXREF",55,0) BACKUP ; BACKUP TREE (CALLED RECURSIVELY) "RTN","XBCFXREF",56,0) S PARENT=^DD(SUBFILE,0,"UP") "RTN","XBCFXREF",57,0) S FIELD=$O(^DD(PARENT,"SB",SUBFILE,"")) "RTN","XBCFXREF",58,0) I $D(^DD(PARENT,0,"UP")) S SUBFILE=PARENT,LVL=LVL+1 D BACKUP ; Recurse "RTN","XBCFXREF",59,0) Q "RTN","XBCFXREF",60,0) ; "RTN","XBCFXREF",61,0) XREFIELD ; CHECK EACH FIELD CREATING XREFS "RTN","XBCFXREF",62,0) F XBCFXREF("XREF FIELD")=0:0 S XBCFXREF("XREF FIELD")=$O(XBCFXREF("TBL",XBCFXREF("XREF FILE"),XBCFXREF("XREF FIELD"))) Q:XBCFXREF("XREF FIELD")="" D XREF "RTN","XBCFXREF",63,0) Q "RTN","XBCFXREF",64,0) ; "RTN","XBCFXREF",65,0) XREF ; CHECK XREFS ON FIELD "RTN","XBCFXREF",66,0) NEW G,L,S,X,Y "RTN","XBCFXREF",67,0) KILL XBCFXRT,XBCFXREF("XREFS") "RTN","XBCFXREF",68,0) D ^XBGXREFS(XBCFXREF("XREF FILE"),XBCFXREF("XREF FIELD"),.XBCFXRT) "RTN","XBCFXREF",69,0) F XBCFXREF("XN")=0:0 S XBCFXREF("XN")=$O(XBCFXRT(XBCFXREF("XREF FIELD"),XBCFXREF("XN"))) Q:XBCFXREF("XN")="" S X=XBCFXRT(XBCFXREF("XREF FIELD"),XBCFXREF("XN")) D "RTN","XBCFXREF",70,0) . Q:$P(X,U,2)="" ; must be trigger "RTN","XBCFXREF",71,0) . Q:$P(X,U,3)]"" ; not REGULAR xref "RTN","XBCFXREF",72,0) . Q:'$D(XBCFXREF("TBL",XBCFXREF("XREF FILE"),XBCFXREF("XREF FIELD"),$P(X,U,2))) ; not of interest "RTN","XBCFXREF",73,0) . Q:'$D(XBCFXRT(XBCFXREF("XREF FIELD"),XBCFXREF("XN"),"S")) ; no set "RTN","XBCFXREF",74,0) . S Y=XBCFXRT(XBCFXREF("XREF FIELD"),XBCFXREF("XN"),"S") "RTN","XBCFXREF",75,0) . I '$F(Y,",DA"),'$F(Y,",D0") D Q "RTN","XBCFXREF",76,0) .. W !?2,$P(X,U,2)," doesn't use DA or D0. Skipping." "RTN","XBCFXREF",77,0) .. Q "RTN","XBCFXREF",78,0) . I $F(Y,",D0)=") D SAVE Q "RTN","XBCFXREF",79,0) . I XBCFXREF("PARENT")="",$F(Y,",DA)=") D SAVE Q "RTN","XBCFXREF",80,0) . I XBCFXREF("PARENT")]"" S S=",DA("_XBCFXREF("TOP DA")_"))=" I $F(Y,S) D SAVE Q "RTN","XBCFXREF",81,0) . Q "RTN","XBCFXREF",82,0) KILL XBCFXRT "RTN","XBCFXREF",83,0) Q "RTN","XBCFXREF",84,0) ; "RTN","XBCFXREF",85,0) SAVE ; SAVE XREF TO CHECK "RTN","XBCFXREF",86,0) S XBCFXREF("C")=XBCFXREF("C")+1 "RTN","XBCFXREF",87,0) S XBCFXREF("TBL2",XBCFXREF("C"))=$P(X,U,2) ; save it "RTN","XBCFXREF",88,0) Q "RTN","XBCFXREF",89,0) ; "RTN","XBCFXREF",90,0) ;--------------------------------------------------------------------- "RTN","XBCFXREF",91,0) ; Check data global for xrefs previously gathered "RTN","XBCFXREF",92,0) ; "RTN","XBCFXREF",93,0) CHECK ; CHECK DATA GLOBAL FOR XREFS "RTN","XBCFXREF",94,0) W !!," Checking the following xrefs:" "RTN","XBCFXREF",95,0) NEW I "RTN","XBCFXREF",96,0) F I=0:0 S I=$O(XBCFXREF("TBL2",I)) Q:I="" W:$X>73 ! W " ",XBCFXREF("TBL2",I) "RTN","XBCFXREF",97,0) F XBCFXREF("C")=0:0 S XBCFXREF("C")=$O(XBCFXREF("TBL2",XBCFXREF("C"))) Q:XBCFXREF("C")="" S XBCFXREF("XREF")=XBCFXREF("TBL2",XBCFXREF("C")) D CHKXREF "RTN","XBCFXREF",98,0) Q "RTN","XBCFXREF",99,0) ; "RTN","XBCFXREF",100,0) CHKXREF ; CHECK ONE XREF "RTN","XBCFXREF",101,0) W !!," Checking the """,XBCFXREF("XREF"),""" xref." "RTN","XBCFXREF",102,0) NEW G,L,R,V,X,Y "RTN","XBCFXREF",103,0) S X=XBCFXREF("XREF") "RTN","XBCFXREF",104,0) S G=^DIC(XBCFXREF("FILE"),0,"GL"),R=G_""""_X_""",",X=$E(R,1,$L(R)-1)_")",L=$L(R) "RTN","XBCFXREF",105,0) F S X=$Q(@X) Q:$E(X,1,L)'=R D "RTN","XBCFXREF",106,0) . Q:@X ; quit if mnemonic xref "RTN","XBCFXREF",107,0) . S Y=+$P(X,",",$L(X,",")) "RTN","XBCFXREF",108,0) . Q:$D(@(G_Y_",0)")) "RTN","XBCFXREF",109,0) . W !?4,$$MSMZR^ZIBNSSV," does not exist.",!?6,"XREF node=",X "RTN","XBCFXREF",110,0) . I XBCFXREF("DF")=2 KILL @X W " deleted." "RTN","XBCFXREF",111,0) .Q "RTN","XBCFXREF",112,0) Q "RTN","XBCFXREF",113,0) ; "RTN","XBCFXREF",114,0) ;--------------------------------------------------------------------- "RTN","XBCFXREF",115,0) EOJ ; "RTN","XBCFXREF",116,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBCFXREF",117,0) KILL XBCFXREF,XBCFXRT "RTN","XBCFXREF",118,0) KILL DIRUT,DUOUT,DTOUT "RTN","XBCFXREF",119,0) W !!,"All done",! "RTN","XBCFXREF",120,0) Q "RTN","XBCFXREF",121,0) ; "RTN","XBCLM") 0^14^B1921883 "RTN","XBCLM",1,0) XBCLM ; IHS/ADC/GTH - COLUMN LISTER ; [ 02/07/97 3:02 PM ] "RTN","XBCLM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCLM",3,0) ; "RTN","XBCLM",4,0) ; Thanks to Don Enos, OHPRD, for the original routine, "RTN","XBCLM",5,0) ; 7 Feb 95. "RTN","XBCLM",6,0) ; "RTN","XBCLM",7,0) ; This routine displays a column number header followed by "RTN","XBCLM",8,0) ; the passed string. "RTN","XBCLM",9,0) ; "RTN","XBCLM",10,0) ; "RTN","XBCLM",11,0) EP(STR) ;PEP - Column Lister "RTN","XBCLM",12,0) Q:$G(STR)="" "RTN","XBCLM",13,0) NEW B,C1,C2,CH,CV,CV1,CV2,H,L,LC,X "RTN","XBCLM",14,0) KILL DIR,DIRUT "RTN","XBCLM",15,0) S CH=$S($L(STR)>80:3,1:2) ; set column header height "RTN","XBCLM",16,0) S LC=$L(STR)\80 "RTN","XBCLM",17,0) S:($L(STR)/80)>LC LC=LC+1 ; set loop count "RTN","XBCLM",18,0) W:$D(IOF) @IOF "RTN","XBCLM",19,0) F L=1:1:LC D LINE Q:$$QUIT($L(STR)) "RTN","XBCLM",20,0) Q "RTN","XBCLM",21,0) ; "RTN","XBCLM",22,0) LINE ; WRITE HEADER AND ONE LINE "RTN","XBCLM",23,0) KILL H "RTN","XBCLM",24,0) F C1=1:1:CH D "RTN","XBCLM",25,0) . F C2=1:1:80 D Q:(C2+((L-1)*80))'<$L(STR) "RTN","XBCLM",26,0) .. S CV=(C2+((L-1)*80)) "RTN","XBCLM",27,0) .. S CV1=CV\100,CV2=(CV#100)\10 "RTN","XBCLM",28,0) .. S $E(H(C1),C2)=$S(C1=CH:$E(C2,$L(C2)),C1=(CH-1):CV2,1:CV1) "RTN","XBCLM",29,0) .. Q "RTN","XBCLM",30,0) . Q "RTN","XBCLM",31,0) S X="",$P(X,"=",80)="=" "RTN","XBCLM",32,0) W !,X,! "RTN","XBCLM",33,0) F C1=1:1:CH W H(C1),! "RTN","XBCLM",34,0) S X="",$P(X,"-",80)="-" "RTN","XBCLM",35,0) S B=(1+((L-1)*80)) "RTN","XBCLM",36,0) W X,!,$E(STR,B,B+79),! "RTN","XBCLM",37,0) Q "RTN","XBCLM",38,0) ; "RTN","XBCLM",39,0) QUIT(L) ; "RTN","XBCLM",40,0) NEW B,C1,C2,CH,CV,CV1,CV2,H,LC,X "RTN","XBCLM",41,0) S X=$$DIR^XBDIR("E","<$L="_L_"> Press any key to continue") "RTN","XBCLM",42,0) Q $S($D(DIRUT):1,1:0) "RTN","XBCLM",43,0) ; "RTN","XBCLS") 0^15^B24575 "RTN","XBCLS",1,0) XBCLS ; IHS/ADC/GTH - CLEAR SCREEN ; [ 02/07/97 3:02 PM ] "RTN","XBCLS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCLS",3,0) ; "RTN","XBCLS",4,0) D EN^XBVIDEO("IOF") "RTN","XBCLS",5,0) U IO(0) "RTN","XBCLS",6,0) Q "RTN","XBCLS",7,0) ; "RTN","XBCNODE") 0^16^B1191075 "RTN","XBCNODE",1,0) XBCNODE ; IHS/ADC/GTH - COUNT ENTRIES IN GLOBAL NODE ; [ 02/07/97 3:02 PM ] "RTN","XBCNODE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCNODE",3,0) ; "RTN","XBCNODE",4,0) ; This program counts unique values in a selected global "RTN","XBCNODE",5,0) ; node. "RTN","XBCNODE",6,0) ; "RTN","XBCNODE",7,0) START ; "RTN","XBCNODE",8,0) NEW GBL,CC,NXT,L "RTN","XBCNODE",9,0) W !!,"This program counts unique values in a global node.",! "RTN","XBCNODE",10,0) LOOP ; "RTN","XBCNODE",11,0) R !,"Enter global reference like '^DPT(""B"",' ",GBL:$G(DTIME,300) "RTN","XBCNODE",12,0) Q:GBL="" "RTN","XBCNODE",13,0) S:$E(GBL,$L(GBL))=")" GBL=$E(GBL,1,$L(GBL)-1) "RTN","XBCNODE",14,0) S:$E(GBL)'="^" GBL="^"_GBL "RTN","XBCNODE",15,0) S:$F(GBL,"(")<1 GBL=GBL_"(" "RTN","XBCNODE",16,0) I $E(GBL,$L(GBL))'=",",$E(GBL,$L(GBL)-1)'="(",$E(GBL,$L(GBL))'="(" S GBL=GBL_"," "RTN","XBCNODE",17,0) S CC=0,NXT="" "RTN","XBCNODE",18,0) F L=0:0 X "S NXT=$O("_GBL_"NXT))" Q:NXT="" S CC=CC+1 W:'(CC#50) "." "RTN","XBCNODE",19,0) W !!,"Count for ",GBL," is ",CC,! "RTN","XBCNODE",20,0) G LOOP "RTN","XBCNODE",21,0) ; "RTN","XBCOUNT") 0^17^B3536202 "RTN","XBCOUNT",1,0) XBCOUNT ; IHS/ADC/GTH - COUNT ENTRIES IN FILEMAN FILE ; [ 02/07/97 3:02 PM ] "RTN","XBCOUNT",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCOUNT",3,0) ; "RTN","XBCOUNT",4,0) ; This routine counts primary entries in a FileMan file and "RTN","XBCOUNT",5,0) ; corrects the 0th node. "RTN","XBCOUNT",6,0) ; "RTN","XBCOUNT",7,0) START ; "RTN","XBCOUNT",8,0) NEW ANS,CTR,FILE,GBL,L,NXT "RTN","XBCOUNT",9,0) W !,"This program counts primary entries for a FileMan file.",! "RTN","XBCOUNT",10,0) LOOP ; "RTN","XBCOUNT",11,0) W ! "RTN","XBCOUNT",12,0) S DIC=1,DIC(0)="AE" "RTN","XBCOUNT",13,0) D ^DIC "RTN","XBCOUNT",14,0) G:Y<0 EOJ "RTN","XBCOUNT",15,0) S FILE=+Y "RTN","XBCOUNT",16,0) ENT ; "RTN","XBCOUNT",17,0) I '$D(^DIC(FILE,0,"GL")) W !!,"DIC file entry invalid or does not exist!",! G LOOP "RTN","XBCOUNT",18,0) S GBL=^DIC(FILE,0,"GL") "RTN","XBCOUNT",19,0) I '$D(@($S($E(GBL,$L(GBL))="(":$E(GBL,1,$L(GBL)-1),1:$E(GBL,1,$L(GBL)-1)_")"))) W !!,"Bad global!!",! G LOOP "RTN","XBCOUNT",20,0) S GBL=GBL_"NXT)" "RTN","XBCOUNT",21,0) S (XBHI,NXT,CTR)=0 "RTN","XBCOUNT",22,0) F L=0:0 S NXT=$O(@(GBL)) Q:NXT'=+NXT S XBHI=NXT,CTR=CTR+1 W:'(CTR#50) "." "RTN","XBCOUNT",23,0) W !!,"FileMan file ",FILE," contains ",CTR," entries. High DFN=",XBHI,! "RTN","XBCOUNT",24,0) S NXT="",XBX=$O(@(GBL)),XBX=^(0),XBY=$P(XBX,U,4),XBX=$P(XBX,U,3) "RTN","XBCOUNT",25,0) W !,"The 0th node says ",XBY,", ",XBX," respectively." "RTN","XBCOUNT",26,0) I CTR'=XBY!(XBHI'=XBX) W !," Do you want me to fix it? (Y/N) Y//" R ANS:$G(DTIME,999) I "Y"[$E(ANS) S NXT=0,$P(@(GBL),U,3)=XBHI,$P(^(0),U,4)=CTR W " Done" "RTN","XBCOUNT",27,0) G LOOP "RTN","XBCOUNT",28,0) ; "RTN","XBCOUNT",29,0) EOJ ; "RTN","XBCOUNT",30,0) KILL ANS,XBHI,XBX,XBY,CTR,DIC,FILE,GBL,L,NXT "RTN","XBCOUNT",31,0) Q "RTN","XBCOUNT",32,0) ; "RTN","XBCSPC") 0^18^B17633223 "RTN","XBCSPC",1,0) XBCSPC ; IHS/ADC/GTH - CHECK POTENTIAL SPECIFIER FIELDS ; [ 11/04/97 10:26 AM ] "RTN","XBCSPC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBCSPC",3,0) ; XB*3*5 IHS/ADC/GTH 10-30-97 Fix bug in count of duplicate values. "RTN","XBCSPC",4,0) ; "RTN","XBCSPC",5,0) ; This routine checks selected field to see what percent of "RTN","XBCSPC",6,0) ; the time it exists in the entries in a file, and if it "RTN","XBCSPC",7,0) ; should be unique, it makes sure it is unique. "RTN","XBCSPC",8,0) ; "RTN","XBCSPC",9,0) START ; "RTN","XBCSPC",10,0) NEW CTRD,CTRT,CTRU,CTRX,ENTRY,FGBL,FIELD,FILE,NODE,PIECE,UNIQUE,XREF "RTN","XBCSPC",11,0) D ^XBKVAR "RTN","XBCSPC",12,0) F D FILE Q:Y<1 "RTN","XBCSPC",13,0) D EOJ "RTN","XBCSPC",14,0) Q "RTN","XBCSPC",15,0) ; "RTN","XBCSPC",16,0) FILE ; "RTN","XBCSPC",17,0) W ! "RTN","XBCSPC",18,0) I '$G(EXTERNAL) D Q:Y<1 "RTN","XBCSPC",19,0) . S DIC=1,DIC(0)="AEMQ" "RTN","XBCSPC",20,0) . D ^DIC "RTN","XBCSPC",21,0) . KILL DIC "RTN","XBCSPC",22,0) . Q:Y<1 "RTN","XBCSPC",23,0) . S FILE=+Y "RTN","XBCSPC",24,0) .Q "RTN","XBCSPC",25,0) S FGBL=^DIC(FILE,0,"GL"),X=$O(@(FGBL_"0)")) "RTN","XBCSPC",26,0) I X'=+X W " No data in file",*7 Q "RTN","XBCSPC",27,0) F D FIELD Q:Y<0 "RTN","XBCSPC",28,0) S Y=1 "RTN","XBCSPC",29,0) Q "RTN","XBCSPC",30,0) ; "RTN","XBCSPC",31,0) FIELD ; "RTN","XBCSPC",32,0) I '$G(EXTERNAL) D Q:Y<0 "RTN","XBCSPC",33,0) . S DIC="^DD("_FILE_",",DIC(0)="AEMQ" "RTN","XBCSPC",34,0) . D ^DIC "RTN","XBCSPC",35,0) . KILL DIC "RTN","XBCSPC",36,0) . Q:Y<0 "RTN","XBCSPC",37,0) . S FIELD=+Y "RTN","XBCSPC",38,0) .Q "RTN","XBCSPC",39,0) D FLD^XBFDINFO(FILE,FIELD,.X) "RTN","XBCSPC",40,0) I '$D(X("NODE")) W *7 Q "RTN","XBCSPC",41,0) I X("NODE")="" W *7 Q "RTN","XBCSPC",42,0) S NODE=X("NODE"),PIECE=X("PIECE") "RTN","XBCSPC",43,0) KILL DIRUT,X "RTN","XBCSPC",44,0) I '$G(EXTERNAL) S UNIQUE=$$DIR^XBDIR("YO","Should field be unique","NO") "RTN","XBCSPC",45,0) Q:$D(DIRUT) "RTN","XBCSPC",46,0) D:UNIQUE CHKXREF "RTN","XBCSPC",47,0) D CHKDATA "RTN","XBCSPC",48,0) D LIST "RTN","XBCSPC",49,0) S:$G(EXTERNAL) Y=-1 "RTN","XBCSPC",50,0) Q "RTN","XBCSPC",51,0) ; "RTN","XBCSPC",52,0) LIST ; "RTN","XBCSPC",53,0) W !!,CTRT," entries in file.",!,$FN(CTRD/CTRT*100,"T",2)," percent of entries have data. ",$S(CTRT'=CTRD:CTRT-CTRD_" without data.",1:"") "RTN","XBCSPC",54,0) I UNIQUE,XREF'="" D "RTN","XBCSPC",55,0) . I CTRX=0 W !,"All entries with data have xref." "RTN","XBCSPC",56,0) . E W !,CTRD-CTRX," entr",$S(CTRD-CTRX=1:"y",1:"ies"),", ",$FN(CTRX/CTRD*100,"T",2)," percent of entries with data have no xref." "RTN","XBCSPC",57,0) . Q "RTN","XBCSPC",58,0) I UNIQUE D "RTN","XBCSPC",59,0) . I CTRU=0 W !,"All ",$P(^DD(FILE,FIELD,0),U,1)," field values are unique." "RTN","XBCSPC",60,0) . E W !,CTRU,$S(CTRU=1:" entry has a value that is ",1:" entries have values that are "),"not unique." "RTN","XBCSPC",61,0) . I '$G(EXTERNAL),CTRU W !,"If you want to see duplicate values select global ^TMP(""XBCSPC"",",$J,"," KILL ^TMP("XBCSPC",$J,1) D ^%G "RTN","XBCSPC",62,0) . Q "RTN","XBCSPC",63,0) W ! "RTN","XBCSPC",64,0) Q "RTN","XBCSPC",65,0) ; "RTN","XBCSPC",66,0) CHKXREF ; SEE IF UNIQUE SPECIFIER HAS REGULAR XREF "RTN","XBCSPC",67,0) Q:$G(XREF)'="" "RTN","XBCSPC",68,0) S XREF="" "RTN","XBCSPC",69,0) D XREF^XBGXREFS(FILE,FIELD,.X) "RTN","XBCSPC",70,0) F I=0:0 S I=$O(X(FIELD,I)) Q:I'=+I I $P(X(FIELD,I),"^",3)="" S XREF=$P(X(FIELD,I),"^",2),XREF=""""_XREF_"""" Q "RTN","XBCSPC",71,0) KILL X "RTN","XBCSPC",72,0) I 'I W !,"The ",FIELD," field does not have a REGULAR xref." "RTN","XBCSPC",73,0) E W !,"Using the ",XREF," xref on the ",FIELD," field." "RTN","XBCSPC",74,0) Q "RTN","XBCSPC",75,0) ; "RTN","XBCSPC",76,0) CHKDATA ; CHECK DATA IN SELECTED FIELD "RTN","XBCSPC",77,0) W !,"Checking data. Please wait. " "RTN","XBCSPC",78,0) KILL ^TMP("XBCSPC",$J) "RTN","XBCSPC",79,0) S (CTRT,CTRD,CTRU,CTRX)=0 "RTN","XBCSPC",80,0) F ENTRY=0:0 S ENTRY=$O(@(FGBL_ENTRY_")")) Q:ENTRY'=+ENTRY D "RTN","XBCSPC",81,0) . S CTRT=CTRT+1 "RTN","XBCSPC",82,0) . Q:'$D(@(FGBL_ENTRY_","_NODE_")")) "RTN","XBCSPC",83,0) . S X=$P(@(FGBL_ENTRY_","_NODE_")"),"^",PIECE) "RTN","XBCSPC",84,0) . Q:X="" "RTN","XBCSPC",85,0) . S CTRD=CTRD+1 "RTN","XBCSPC",86,0) . I UNIQUE,XREF'="",'$D(@(FGBL_XREF_","""_X_""","_ENTRY_")")) S CTRX=CTRX+1 "RTN","XBCSPC",87,0) . I UNIQUE D "RTN","XBCSPC",88,0) .. ; I $D(^TMP("XBCSPC",$J,1,X)) S CTRU=CTRU+1,^TMP("XBCSPC",$J,2,X)=cCTRX ; XB*3*5 IHS/ADC/GTH 10-30-97 Fix bug in count of duplicate values. "RTN","XBCSPC",89,0) .. I $D(^TMP("XBCSPC",$J,1,X)) S CTRU=CTRU+1,^(X)=$S($G(^TMP("XBCSPC",$J,2,X)):^(X)+1,1:2) ; XB*3*5 IHS/ADC/GTH 10-30-97 Fix bug in count of duplicate values. "RTN","XBCSPC",90,0) .. E S ^TMP("XBCSPC",$J,1,X)=0 "RTN","XBCSPC",91,0) .. Q "RTN","XBCSPC",92,0) . Q "RTN","XBCSPC",93,0) Q "RTN","XBCSPC",94,0) ; "RTN","XBCSPC",95,0) EN(FILE,FIELD,XREF,UNIQUE) ; EXTERNAL ENTRY POINT TO ALLOW SPECIFID FILE/FIELD "RTN","XBCSPC",96,0) ; pass by value *** will abort if values not passed *** "RTN","XBCSPC",97,0) NEW CTRD,CTRT,CTRU,CTRX,ENTRY,EXTERNAL,FGBL,NODE,PIECE "RTN","XBCSPC",98,0) S EXTERNAL=1 "RTN","XBCSPC",99,0) I FILE,FIELD,XREF'="",UNIQUE'="" "RTN","XBCSPC",100,0) E Q "RTN","XBCSPC",101,0) S XREF=""""_XREF_"""" "RTN","XBCSPC",102,0) D FILE "RTN","XBCSPC",103,0) KILL DIRUT,I,X,Y "RTN","XBCSPC",104,0) Q "RTN","XBCSPC",105,0) ; "RTN","XBCSPC",106,0) EOJ ; "RTN","XBCSPC",107,0) KILL DIRUT,I,X,Y "RTN","XBCSPC",108,0) KILL ^TMP("XBCSPC",$J) "RTN","XBCSPC",109,0) Q "RTN","XBCSPC",110,0) ; "RTN","XBDAD0") 0^19^B705863 "RTN","XBDAD0",1,0) XBDAD0 ; IHS/ADC/GTH - SET ALTERNATE DA/D0 ; [ 02/07/97 3:02 PM ] "RTN","XBDAD0",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDAD0",3,0) ; "RTN","XBDAD0",4,0) ; This routine sets the DA array from D0,D1 etc. or D0,D1 "RTN","XBDAD0",5,0) ; etc. from the DA array. If the variable XBDAD0=2 it sets "RTN","XBDAD0",6,0) ; the DA array, otherwise it sets D0,D1 etc. "RTN","XBDAD0",7,0) ; "RTN","XBDAD0",8,0) ; The variable XBDAD0 will be killed upon exiting this "RTN","XBDAD0",9,0) ; routine. "RTN","XBDAD0",10,0) ; "RTN","XBDAD0",11,0) ; The entry point KILL kills D0, D1, etc. "RTN","XBDAD0",12,0) ; "RTN","XBDAD0",13,0) START ; "RTN","XBDAD0",14,0) NEW I,J "RTN","XBDAD0",15,0) I $G(XBDAD0)=2 D D0DA I 1 "RTN","XBDAD0",16,0) E D DAD0 "RTN","XBDAD0",17,0) KILL XBDAD0 "RTN","XBDAD0",18,0) Q "RTN","XBDAD0",19,0) ; "RTN","XBDAD0",20,0) DAD0 ; ----- Set D0 (etc) from DA array. "RTN","XBDAD0",21,0) F I=1:1 Q:'$D(DA(I)) S I(99-I)=DA(I) "RTN","XBDAD0",22,0) S J=0 "RTN","XBDAD0",23,0) F I=0:1 S J=$O(I(J)) Q:J'=+J S @("D"_I)=I(J) "RTN","XBDAD0",24,0) S @("D"_I)=DA "RTN","XBDAD0",25,0) Q "RTN","XBDAD0",26,0) ; "RTN","XBDAD0",27,0) D0DA ; ----- Set DA array from D0 (etc). "RTN","XBDAD0",28,0) F I=0:1 Q:'$D(@("D"_I)) S J=I "RTN","XBDAD0",29,0) F I=0:1 S DA(J)=@("D"_I) S J=J-1 Q:J<1 "RTN","XBDAD0",30,0) S DA=@("D"_(I+1)) "RTN","XBDAD0",31,0) Q "RTN","XBDAD0",32,0) ; "RTN","XBDAD0",33,0) KILL ;PEP - KILL D0, D1, ETC. "RTN","XBDAD0",34,0) NEW I "RTN","XBDAD0",35,0) F I=0:1 Q:'$D(@("D"_I)) KILL @("D"_I) "RTN","XBDAD0",36,0) Q "RTN","XBDAD0",37,0) ; "RTN","XBDANGLE") 0^20^B23368151 "RTN","XBDANGLE",1,0) XBDANGLE ;IHS/SET/GTH - Q'ABLE CLEANUP DANGLING POINTERS OPTION HELP FRAME PROTOCOL FILES ; [ 10/29/2002 7:42 AM ] "RTN","XBDANGLE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDANGLE",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cleanup dangling pointers. "RTN","XBDANGLE",4,0) ; "RTN","XBDANGLE",5,0) ; This utility can be scheduled to run via TaskMan. "RTN","XBDANGLE",6,0) ; "RTN","XBDANGLE",7,0) ; Actions are delivered to XUPROG key holders via MailMan. "RTN","XBDANGLE",8,0) ; "RTN","XBDANGLE",9,0) ; You can also run this interactively, but you'll still "RTN","XBDANGLE",10,0) ; get the MailMan note, even after the interactive run. "RTN","XBDANGLE",11,0) ; "RTN","XBDANGLE",12,0) ; Thanks to the VA for the original interactive routine, XQ3. "RTN","XBDANGLE",13,0) ; "RTN","XBDANGLE",14,0) D INIT "RTN","XBDANGLE",15,0) D OFIX,HFFIX,PFIX "RTN","XBDANGLE",16,0) D MAIL "RTN","XBDANGLE",17,0) D EXIT "RTN","XBDANGLE",18,0) Q "RTN","XBDANGLE",19,0) ; "RTN","XBDANGLE",20,0) ; ---------------------------------------------------------- "RTN","XBDANGLE",21,0) ; "RTN","XBDANGLE",22,0) OFIX ;Kill any dangling pointers in the OPTION File (#19) "RTN","XBDANGLE",23,0) NEW I,J,K,L,M,X,Y "RTN","XBDANGLE",24,0) S (I,X)=0 ;X=Total Deletions "RTN","XBDANGLE",25,0) L1 ; "RTN","XBDANGLE",26,0) S I=$O(^DIC(19,I)) "RTN","XBDANGLE",27,0) I I>0 S (Y,J)=0 G L2 ;Loop through menus "RTN","XBDANGLE",28,0) D RSLT(X_" pointer"_$S(X=1:"",1:"s")_" fixed in your OPTION file.") "RTN","XBDANGLE",29,0) Q "RTN","XBDANGLE",30,0) ; "RTN","XBDANGLE",31,0) L2 ; "RTN","XBDANGLE",32,0) S J=$O(^DIC(19,I,10,J)) "RTN","XBDANGLE",33,0) I J>0 G ITEM ;Loop through menu items "RTN","XBDANGLE",34,0) I '$D(^DIC(19,I,10,0)) G L1 "RTN","XBDANGLE",35,0) S (K,J)=0 "RTN","XBDANGLE",36,0) F L=1:1 S J=$O(^DIC(19,I,10,J)) Q:J'>0 S K=J ;K=Last item "RTN","XBDANGLE",37,0) S J=^DIC(19,I,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters "RTN","XBDANGLE",38,0) G XREFS "RTN","XBDANGLE",39,0) ; "RTN","XBDANGLE",40,0) ITEM ; "RTN","XBDANGLE",41,0) S K=+^DIC(19,I,10,J,0) "RTN","XBDANGLE",42,0) I $D(^DIC(19,K,0)) S Y=Y+1 G L2 ;Y=No. of items "RTN","XBDANGLE",43,0) D RSLT("Option "_$P(^DIC(19,I,0),U,1)_" points to missing option "_K) "RTN","XBDANGLE",44,0) S X=X+1 "RTN","XBDANGLE",45,0) KILL ^DIC(19,I,10,J) ;Kill invalid menu item "RTN","XBDANGLE",46,0) G L2 "RTN","XBDANGLE",47,0) ; "RTN","XBDANGLE",48,0) XREFS ; "RTN","XBDANGLE",49,0) S K=":" "RTN","XBDANGLE",50,0) L3 ; "RTN","XBDANGLE",51,0) S K=$O(^DIC(19,I,10,K)) "RTN","XBDANGLE",52,0) I K="" G L1 ;Loop through cross references "RTN","XBDANGLE",53,0) S L=-1 "RTN","XBDANGLE",54,0) L4 ; "RTN","XBDANGLE",55,0) S L=$O(^DIC(19,I,10,K,L)) "RTN","XBDANGLE",56,0) I L="" G L3 "RTN","XBDANGLE",57,0) S J=0 "RTN","XBDANGLE",58,0) L5 ; "RTN","XBDANGLE",59,0) S J=$O(^DIC(19,I,10,K,L,J)) "RTN","XBDANGLE",60,0) I J'>0 G L4 "RTN","XBDANGLE",61,0) I '$D(^DIC(19,I,10,J,0)) G KILLXR ;kill xref to invalid item "RTN","XBDANGLE",62,0) L6 ; "RTN","XBDANGLE",63,0) S M=^DIC(19,I,10,J,0) "RTN","XBDANGLE",64,0) I (M=L)!(M[L_"^") G L5 "RTN","XBDANGLE",65,0) KILLXR ; "RTN","XBDANGLE",66,0) KILL ^DIC(19,I,10,K,L,J) "RTN","XBDANGLE",67,0) I $O(^DIC(19,I,10,K,L,-1))="" KILL ^DIC(19,I,10,K,L) "RTN","XBDANGLE",68,0) G L5 "RTN","XBDANGLE",69,0) ; "RTN","XBDANGLE",70,0) ; ---------------------------------------------------------- "RTN","XBDANGLE",71,0) ; "RTN","XBDANGLE",72,0) HFFIX ; Fix dangling pointers on help frame file "RTN","XBDANGLE",73,0) NEW I,J,K,L,X,Y "RTN","XBDANGLE",74,0) S (X,I)=0 "RTN","XBDANGLE",75,0) F S I=$O(^DIC(9.2,I)) Q:I'>0 I $D(^(I,2)) D HF1,HF2,HF3 "RTN","XBDANGLE",76,0) D RSLT(X_" pointer"_$S(X=1:"",1:"s")_" fixed in your HELP FRAME file.") "RTN","XBDANGLE",77,0) Q "RTN","XBDANGLE",78,0) ; "RTN","XBDANGLE",79,0) HF1 ; "RTN","XBDANGLE",80,0) S (Y,J)=0 "RTN","XBDANGLE",81,0) F S J=$O(^DIC(9.2,I,2,J)) Q:J'>0 I $D(^(J,0)) S K=$P(^(0),U,2),Y=Y+1 I $L(K),'$D(^DIC(9.2,K)) S Y=Y-1,X=X+1 K ^DIC(9.2,I,2,J,0) "RTN","XBDANGLE",82,0) Q "RTN","XBDANGLE",83,0) ; "RTN","XBDANGLE",84,0) HF2 ; "RTN","XBDANGLE",85,0) S (K,J)=0 "RTN","XBDANGLE",86,0) F S J=$O(^DIC(9.2,I,2,J)) Q:J'>0 S K=J "RTN","XBDANGLE",87,0) S J=^DIC(9.2,I,2,0),^(0)=$P(J,U,1,2)_U_K_U_Y "RTN","XBDANGLE",88,0) Q "RTN","XBDANGLE",89,0) ; "RTN","XBDANGLE",90,0) HF3 ; "RTN","XBDANGLE",91,0) S K=":" "RTN","XBDANGLE",92,0) F S K=$O(^DIC(9.2,I,2,K)) Q:K="" S J=-1 F S J=$O(^DIC(9.2,I,2,K,J)) Q:J="" D HF4 "RTN","XBDANGLE",93,0) Q "RTN","XBDANGLE",94,0) ; "RTN","XBDANGLE",95,0) HF4 ; "RTN","XBDANGLE",96,0) S L=0 "RTN","XBDANGLE",97,0) F S L=$O(^DIC(9.2,I,2,K,J,L)) Q:L'>0 I '$D(^DIC(9.2,I,2,L,0)) K ^DIC(9.2,I,2,K,J,L) "RTN","XBDANGLE",98,0) Q "RTN","XBDANGLE",99,0) ; "RTN","XBDANGLE",100,0) ; ---------------------------------------------------------- "RTN","XBDANGLE",101,0) ; "RTN","XBDANGLE",102,0) PFIX ;Kill any dangling pointers in the PROTOCOL File (#101) "RTN","XBDANGLE",103,0) NEW I,J,K,L,M,X,Y "RTN","XBDANGLE",104,0) S (I,X)=0 ;X=Total Deletions "RTN","XBDANGLE",105,0) P1 ; "RTN","XBDANGLE",106,0) S I=$O(^ORD(101,I)) "RTN","XBDANGLE",107,0) I I>0 S (Y,J)=0 G P2 ;Loop through protocols "RTN","XBDANGLE",108,0) D RSLT(X_" pointer"_$S(X=1:"",1:"s")_" fixed in your PROTOCOL file.") "RTN","XBDANGLE",109,0) Q "RTN","XBDANGLE",110,0) ; "RTN","XBDANGLE",111,0) P2 ; "RTN","XBDANGLE",112,0) S J=$O(^ORD(101,I,10,J)) "RTN","XBDANGLE",113,0) I J>0 G PITEM ;Loop through items "RTN","XBDANGLE",114,0) I '$D(^ORD(101,I,10,0)) G P1 "RTN","XBDANGLE",115,0) S (K,J)=0 "RTN","XBDANGLE",116,0) F L=1:1 S J=$O(^ORD(101,I,10,J)) Q:J'>0 S K=J ;K=Last item "RTN","XBDANGLE",117,0) S J=^ORD(101,I,10,0),^(0)=$P(J,"^",1,2)_"^"_K_"^"_Y ;fix counters "RTN","XBDANGLE",118,0) G PXREFS "RTN","XBDANGLE",119,0) ; "RTN","XBDANGLE",120,0) PITEM ; "RTN","XBDANGLE",121,0) S K=+^ORD(101,I,10,J,0) "RTN","XBDANGLE",122,0) I $D(^ORD(101,K,0)) S Y=Y+1 G P2 ;Y=No. of items "RTN","XBDANGLE",123,0) D RSLT("Protocol "_$P(^ORD(101,I,0),U,1)_" points to missing option "_K) "RTN","XBDANGLE",124,0) S X=X+1 "RTN","XBDANGLE",125,0) KILL ^ORD(101,I,10,J) ;Kill invalid menu item "RTN","XBDANGLE",126,0) G P2 "RTN","XBDANGLE",127,0) ; "RTN","XBDANGLE",128,0) PXREFS ; "RTN","XBDANGLE",129,0) S K=":" "RTN","XBDANGLE",130,0) P3 ; "RTN","XBDANGLE",131,0) S K=$O(^ORD(101,I,10,K)) "RTN","XBDANGLE",132,0) I K="" G P1 ;Loop through cross references "RTN","XBDANGLE",133,0) S L=-1 "RTN","XBDANGLE",134,0) P4 ; "RTN","XBDANGLE",135,0) S L=$O(^ORD(101,I,10,K,L)) "RTN","XBDANGLE",136,0) I L="" G P3 "RTN","XBDANGLE",137,0) S J=0 "RTN","XBDANGLE",138,0) P5 ; "RTN","XBDANGLE",139,0) S J=$O(^ORD(101,I,10,K,L,J)) "RTN","XBDANGLE",140,0) I J'>0 G P4 "RTN","XBDANGLE",141,0) I '$D(^ORD(101,I,10,J,0)) G PKILLXR ;kill xref to invalid item "RTN","XBDANGLE",142,0) P6 ; "RTN","XBDANGLE",143,0) S M=^ORD(101,I,10,J,0) "RTN","XBDANGLE",144,0) I (M=L)!(M[L_"^") G P5 "RTN","XBDANGLE",145,0) PKILLXR ; "RTN","XBDANGLE",146,0) KILL ^ORD(101,I,10,K,L,J) "RTN","XBDANGLE",147,0) I $O(^ORD(101,I,10,K,L,-1))="" KILL ^ORD(101,I,10,K,L) "RTN","XBDANGLE",148,0) G P5 "RTN","XBDANGLE",149,0) ; "RTN","XBDANGLE",150,0) RSLT(%) S ^(0)=$G(^TMP("XBDANGLE",$J,0))+1,^(^(0))=% W:'$D(ZTQUEUED) !,% Q "RTN","XBDANGLE",151,0) ; "RTN","XBDANGLE",152,0) ; "RTN","XBDANGLE",153,0) INIT ; Set up. "RTN","XBDANGLE",154,0) NEW XMSUB,XMDUZ,XMTEXT,XMY "RTN","XBDANGLE",155,0) KILL ^TMP("XBDANGLE",$J) "RTN","XBDANGLE",156,0) Q "RTN","XBDANGLE",157,0) ; "RTN","XBDANGLE",158,0) MAIL ; Send a note to local programmers 'bout these results. "RTN","XBDANGLE",159,0) S XMSUB=$P($P($T(+1),";",2)," ",4,99),XMDUZ=$G(DUZ,.5),XMTEXT="^TMP(""XBDANGLE"",$J,",XMY(DUZ)="" "RTN","XBDANGLE",160,0) F %="XUPROGMODE" D SINGLE(%) "RTN","XBDANGLE",161,0) D ^XMD "RTN","XBDANGLE",162,0) Q "RTN","XBDANGLE",163,0) ; "RTN","XBDANGLE",164,0) EXIT ; "RTN","XBDANGLE",165,0) KILL ^TMP("XBDANGLE",$J) "RTN","XBDANGLE",166,0) I $D(ZTQUEUED) S ZTREQ="@" Q "RTN","XBDANGLE",167,0) Q "RTN","XBDANGLE",168,0) ; "RTN","XBDANGLE",169,0) SINGLE(K) ; Get holders of a single key K. "RTN","XBDANGLE",170,0) NEW Y "RTN","XBDANGLE",171,0) S Y=0 "RTN","XBDANGLE",172,0) Q:'$D(^XUSEC(K)) "RTN","XBDANGLE",173,0) F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)="" "RTN","XBDANGLE",174,0) Q "RTN","XBDANGLE",175,0) ; "RTN","XBDATE") 0^21^B5595895 "RTN","XBDATE",1,0) XBDATE ; IHS/ADC/GTH - ADAPTATION OF %RS TO SELECT ROUTINES EDITED AFTER SPECIFIED DATE ; [ 10/29/2002 7:42 AM ] "RTN","XBDATE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDATE",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBDATE",4,0) ; "RTN","XBDATE",5,0) ; Thanks to Tom Love, DSD, for providing the original routine. "RTN","XBDATE",6,0) ; "RTN","XBDATE",7,0) ; This routine limits routines selected by RSEL to routines "RTN","XBDATE",8,0) ; edited after some date. "RTN","XBDATE",9,0) ; "RTN","XBDATE",10,0) START ; "RTN","XBDATE",11,0) I '$D(DT) D NOW^%DTC S DT=X "RTN","XBDATE",12,0) S DIR(0)="D^::EX" ;2800101:"_DT_":EX" "RTN","XBDATE",13,0) S DIR("A")="Date of last edit" "RTN","XBDATE",14,0) S Y=DT "RTN","XBDATE",15,0) X ^DD("DD") "RTN","XBDATE",16,0) S DIR("B")=Y "RTN","XBDATE",17,0) W !!,XBTYPE," ROUTINES edited on or after the following date:",! "RTN","XBDATE",18,0) D DIR "RTN","XBDATE",19,0) Q:$D(QUIT) "RTN","XBDATE",20,0) S XBDAT=Y "RTN","XBDATE",21,0) W !!,"One moment please, checking selected routines for last edit date.",! "RTN","XBDATE",22,0) ;Begin mod/add 2 lines;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDATE",23,0) I $$VERSION^%ZOSV(1)["MSM" D "RTN","XBDATE",24,0) . S XB="S RTN="""" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="""" ZL @RTN S X=$T(@RTN),X=$P($P(X,""[ "",2),"" "") D ^%DT K:Y<1!(Y0,((XBDAT=Y)!(Y>XBDAT)) X ^DD(""DD"") W !,RTN,?10,""last edited on "",Y" "RTN","XBDATE",25,0) I $$VERSION^%ZOSV(1)["Cache" D "RTN","XBDATE",26,0) . S XB="S RTN=0 F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="""" S X=$P($$DATE^%R(RTN_"".INT"",1),"" "") D ^%DT K:Y<1!(Y0,((XBDAT=Y)!(Y>XBDAT)) X ^DD(""DD"") W !,RTN,?10,""last edited on "",Y" "RTN","XBDATE",27,0) ;S XB="S RTN="""" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="""" ZL @RTN S X=$T(@RTN),X=$P($P(X,""[ "",2),"" "") D ^%DT K:Y<1!(Y0,((XBDAT=Y)!(Y>XBDAT)) X ^DD(""DD"") W !,RTN,?10,""last edited on "",Y" "RTN","XBDATE",28,0) ;End mod/add 2 lines;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDATE",29,0) X XB "RTN","XBDATE",30,0) I $O(^UTILITY($J,""))="" S Y=XBDAT X ^DD("DD") S XBDAT=Y,QUIT="" Q "RTN","XBDATE",31,0) S DIR(0)="YO",DIR("A")="Proceed with "_XBTYPE,DIR("B")="NO" "RTN","XBDATE",32,0) W ! "RTN","XBDATE",33,0) D DIR "RTN","XBDATE",34,0) S:Y'=1 QUIT="" "RTN","XBDATE",35,0) KILL XBDAT "RTN","XBDATE",36,0) Q "RTN","XBDATE",37,0) ; "RTN","XBDATE",38,0) DIR ; "RTN","XBDATE",39,0) D ^DIR "RTN","XBDATE",40,0) S:$D(DIRUT) QUIT="" "RTN","XBDATE",41,0) KILL DIR,DIRUT,DUOUT,DTOUT "RTN","XBDATE",42,0) Q "RTN","XBDATE",43,0) ; "RTN","XBDBQDOC") 0^22^B2221739 "RTN","XBDBQDOC",1,0) XBDBQDOC ; IHS/ADC/GTH - DOUBLE QUEUING SHELL HANDLER DOCUMENTATION ; [ 02/07/97 3:02 PM ] "RTN","XBDBQDOC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDBQDOC",3,0) ; "RTN","XBDBQDOC",4,0) ;---------------------- "RTN","XBDBQDOC",5,0) ;NOTES FOR PROGRAMMERS| "RTN","XBDBQDOC",6,0) ;---------------------- "RTN","XBDBQDOC",7,0) ; "RTN","XBDBQDOC",8,0) ; %ZIS with "PQM" is called by XBDBQUE if '$D(XBIOP). "RTN","XBDBQDOC",9,0) ; "RTN","XBDBQDOC",10,0) ; The user will be asked to queue if queuing has not been "RTN","XBDBQDOC",11,0) ; selected. "RTN","XBDBQDOC",12,0) ; "RTN","XBDBQDOC",13,0) ; IO variables as necessary are automatically stored. "RTN","XBDBQDOC",14,0) ; "RTN","XBDBQDOC",15,0) ; XBxx variables are killed after loading into an XB array. "RTN","XBDBQDOC",16,0) ; "RTN","XBDBQDOC",17,0) ; XBDBQUE can be nested. "RTN","XBDBQDOC",18,0) ; "RTN","XBDBQDOC",19,0) ; The compute and print phases can call XBDBQUE individually "RTN","XBDBQDOC",20,0) ; (XBIOP is required). "RTN","XBDBQDOC",21,0) ; "RTN","XBDBQDOC",22,0) ; The appropriate %ZTSK node is killed. "RTN","XBDBQDOC",23,0) ; "RTN","XBDBQDOC",24,0) ;EX: "RTN","XBDBQDOC",25,0) ; S XBRC="C^AGTEST",XBRP="P^AGTEST",XBRX="END^AGTEST",XBNS="AG" "RTN","XBDBQDOC",26,0) ; D ^XBDBQUE ;handles foreground and tasking "RTN","XBDBQDOC",27,0) ; Q "RTN","XBDBQDOC",28,0) ; "RTN","XBDBQDOC",29,0) ; VARIABLES NEEDED FROM CALLING PROGRAM "RTN","XBDBQDOC",30,0) ; "RTN","XBDBQDOC",31,0) ;MANDATORY "RTN","XBDBQDOC",32,0) ; EITHER XBRC-Compute Routine or XBRP-Print Routine. "RTN","XBDBQDOC",33,0) ; "RTN","XBDBQDOC",34,0) ;OPTIONAL "RTN","XBDBQDOC",35,0) ; XBRC-Compute Routine. "RTN","XBDBQDOC",36,0) ; XBRP-Print Routine. "RTN","XBDBQDOC",37,0) ; XBRX-Exit Routine that cleans variables (HIGHLY SUGGESTED). "RTN","XBDBQDOC",38,0) ; XBNS-name space of variables to auto load in "RTN","XBDBQDOC",39,0) ; ZTSAVE("NS*")="" "RTN","XBDBQDOC",40,0) ; ="DG;AUPN;PS;..." ; (will add '*'if missing). "RTN","XBDBQDOC",41,0) ; XBNS("xxx")="" - ZTSAVE variable arrays where xxx is as "RTN","XBDBQDOC",42,0) ; described for ZTSAVE("xxxx")="". "RTN","XBDBQDOC",43,0) ; XBFQ=1 Force Queing. "RTN","XBDBQDOC",44,0) ; XBDTH=FM date time of computing/printing. "RTN","XBDBQDOC",45,0) ; XBIOP=pre-selected printer device with constructed with "RTN","XBDBQDOC",46,0) ; ION ; IOST ; IOSL ; IOM "RTN","XBDBQDOC",47,0) ; (mandatory if the calling routine is a queued routine). "RTN","XBDBQDOC",48,0) ; XBPAR= %ZIS("IOPAR") values for host file with XBIOP if "RTN","XBDBQDOC",49,0) ; needed. "RTN","XBDBQDOC",50,0) ; "RTN","XBDBQDOC",51,0) TEST ; "RTN","XBDBQDOC",52,0) ; TESTING CODE the following are KISS (keep it supper simple) test "RTN","XBDBQDOC",53,0) ; of double queing code including nesting. "RTN","XBDBQDOC",54,0) Q "RTN","XBDBQDOC",55,0) ;-------------------------------------------------------------------- "RTN","XBDBQDOC",56,0) TEST1 ; test of stacking a second call to XBDBQUE in the printing routine. "RTN","XBDBQDOC",57,0) S SD=1,DG=2 "RTN","XBDBQDOC",58,0) S XBNS="SD;DG;AG;" "RTN","XBDBQDOC",59,0) S XBRP="PA^XBDBQDOC" "RTN","XBDBQDOC",60,0) D ^XBDBQUE "RTN","XBDBQDOC",61,0) KILL DG,JKL,SD "RTN","XBDBQDOC",62,0) Q "RTN","XBDBQDOC",63,0) PA ; "RTN","XBDBQDOC",64,0) W !,"GOT HERE ON ONE",! "RTN","XBDBQDOC",65,0) X "ZW" "RTN","XBDBQDOC",66,0) S IOP=XB("IOP"),XBRP="PB^XBDBQDOC",XBNS("JKL")="" "RTN","XBDBQDOC",67,0) F I=1:1:10 S JKL(I)=I "RTN","XBDBQDOC",68,0) S XBIOP=XB("IOP") "RTN","XBDBQDOC",69,0) D ^XBDBQUE "RTN","XBDBQDOC",70,0) Q "RTN","XBDBQDOC",71,0) PB ; "RTN","XBDBQDOC",72,0) W !,"GOT HERE ON TWO",! "RTN","XBDBQDOC",73,0) X "ZW" "RTN","XBDBQDOC",74,0) Q "RTN","XBDBQDOC",75,0) TEST2 ; TEST FOR COMPUTING ONLY "RTN","XBDBQDOC",76,0) D DT^DICRW "RTN","XBDBQDOC",77,0) S XBRC="RC^XBDBQDOC" "RTN","XBDBQDOC",78,0) F XBI=1:1:20 KILL ^XBDBT(XBI) "RTN","XBDBQDOC",79,0) W !,"CREATES ^XBDBT(",! "RTN","XBDBQDOC",80,0) D ^XBDBQUE "RTN","XBDBQDOC",81,0) Q "RTN","XBDBQDOC",82,0) RC S %H=$H D YX^%DTC F XBI=1:1:20 S ^PWDBT(XBI)=XBI_Y "RTN","XBDBQDOC",83,0) Q "RTN","XBDBQUE") 0^23^B40820945 "RTN","XBDBQUE",1,0) XBDBQUE ; IHS/ADC/GTH - DOUBLE QUEUING SHELL HANDLER ; 17 Jul 2002 7:47 PM [ 04/28/2003 12:06 PM ] "RTN","XBDBQUE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDBQUE",3,0) ; XB*3*5 - IHS/ADC/GTH 10-31-97 "RTN","XBDBQUE",4,0) ; XB*3*8 - IHS/ASDST/GTH 12-07-00 "RTN","XBDBQUE",5,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Parse of drive in SETIOPN. "RTN","XBDBQUE",6,0) ; Thanks to Paul Wesley, DSD, for the original routine. "RTN","XBDBQUE",7,0) ; --------------------------------------------------------- "RTN","XBDBQUE",8,0) ; |refer to XBDBQDOC for instructions, examples, and tests| "RTN","XBDBQUE",9,0) ; --------------------------------------------------------- "RTN","XBDBQUE",10,0) ; "RTN","XBDBQUE",11,0) START ; "RTN","XBDBQUE",12,0) NEW XB ; use a fresh array in case of nesting double queues "RTN","XBDBQUE",13,0) ; insure IO array is set fully "RTN","XBDBQUE",14,0) I ($D(IO)'>10) S IOP="HOME" D ^%ZIS "RTN","XBDBQUE",15,0) I $D(ZTQUEUED) S XBFQ=1 S:'$D(XBDTH) XBDTH="NOW" ; insure auto-requeue if called from a queued "RTN","XBDBQUE",16,0) I '$D(XBRC),'$D(XBRP) Q ; insure one of RC or RP exist "RTN","XBDBQUE",17,0) S XB("IOP1")=ION_";"_IOST_";"_IOM_";"_IOSL ; store current IO params "RTN","XBDBQUE",18,0) I $G(IOPAR)]"" S XB("IOPAR")=IOPAR ; store IOPAR "RTN","XBDBQUE",19,0) I $L($G(XBRC))=0 S XBRC="NORC^XBDBQUE" ; no compute identified "RTN","XBDBQUE",20,0) S XB("RC")=XBRC,XB("RP")=$G(XBRP),XB("RX")=$G(XBRX) "RTN","XBDBQUE",21,0) ; load XBNS="xx;yy;.." into XB("NS",xx*) ... "RTN","XBDBQUE",22,0) F XBI=1:1 S XBNSX=$P($G(XBNS),";",XBI) Q:XBNSX="" S:(XBNSX'["*") XBNSX=XBNSX_"*" S XB("NS",XBNSX)="" "RTN","XBDBQUE",23,0) S XB("NS","XB*")="" "RTN","XBDBQUE",24,0) ; load XBNS("xxx") array into XB("NS","xxx") "RTN","XBDBQUE",25,0) S XBNSX="" "RTN","XBDBQUE",26,0) F S XBNSX=$O(XBNS(XBNSX)) Q:XBNSX="" S XB("NS",XBNSX)="" "RTN","XBDBQUE",27,0) ; if this is a double queue with XB("IOP") setup .. pull the parameters out a ^%ZIS call to set up the parameters without an open "RTN","XBDBQUE",28,0) S XB("IOP")=$G(XBIOP) "RTN","XBDBQUE",29,0) I $D(XBIOP) S IOP=XBIOP "RTN","XBDBQUE",30,0) ; XB*3*5 - IHS/ADC/GTH 10-31-97 start block "RTN","XBDBQUE",31,0) I $G(XB("IOPAR"))]"" S %ZIS("IOPAR")=XB("IOPAR") D "RTN","XBDBQUE",32,0) . I XB("IOPAR")'?1"(""".E1""":""".E1""")" Q ; skip HFS if not an HFS "RTN","XBDBQUE",33,0) . S XBHFSNM=$P(XB("IOPAR"),":"),XBHFSNM=$TR(XBHFSNM,"()""") "RTN","XBDBQUE",34,0) . S XBHFSMD=$P(XB("IOPAR"),":",2),XBHFSMD=$TR(XBHFSMD,"()""") "RTN","XBDBQUE",35,0) . S %ZIS("HFSNAME")=XBHFSNM,%ZIS("HFSMODE")=XBHFSMD "RTN","XBDBQUE",36,0) . ;this code drops through "RTN","XBDBQUE",37,0) ; XB*3*5 - IHS/ADC/GTH 10-31-97 end block "RTN","XBDBQUE",38,0) ZIS ; "RTN","XBDBQUE",39,0) KILL IO("Q") "RTN","XBDBQUE",40,0) I $G(XBRC)]"",$G(XBRP)="" G ZISQ "RTN","XBDBQUE",41,0) S %ZIS="PQM" "RTN","XBDBQUE",42,0) D ^%ZIS ; get parameters without an open "RTN","XBDBQUE",43,0) I POP W !,"REPORTING-ABORTED",*7 G END1 "RTN","XBDBQUE",44,0) S XB("IO")=IO,XB("IOP")=ION_";"_IOST_";"_IOM_";"_IOSL,XB("IOPAR")=$G(IOPAR),XB("CPU")=$G(IOCPU),XB("ION")=ION "RTN","XBDBQUE",45,0) ZISQ ; "RTN","XBDBQUE",46,0) I '$D(IO("Q")),'$G(XBFQ) D "RTN","XBDBQUE",47,0) . I $D(ZTQUEUED) S XBFQ=1 Q "RTN","XBDBQUE",48,0) . I IO=IO(0),$G(XBRP)]"" Q "RTN","XBDBQUE",49,0) . Q:$$VALI^XBDIQ1(3.5,IOS,5.5)=2 ;Q'ing not allowed to DEVICE selected;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDBQUE",50,0) . KILL DIR "RTN","XBDBQUE",51,0) . S DIR(0)="Y",DIR("B")="Y",DIR("A")="Won't you queue this " "RTN","XBDBQUE",52,0) . D ^DIR "RTN","XBDBQUE",53,0) . KILL DIR "RTN","XBDBQUE",54,0) . I X["^" S XBQUIT=1 "RTN","XBDBQUE",55,0) . S:Y=1 IO("Q")=1 "RTN","XBDBQUE",56,0) . Q "RTN","XBDBQUE",57,0) ; "RTN","XBDBQUE",58,0) KILL XB("ZTSK") "RTN","XBDBQUE",59,0) I $D(ZTQUEUED),$G(ZTSK) S XB("ZTSK")=ZTSK "RTN","XBDBQUE",60,0) KILL ZTSK "RTN","XBDBQUE",61,0) ; quit if user says so "RTN","XBDBQUE",62,0) I $G(XBQUIT) KILL DIR S DIR(0)="E",DIR("A")="Report Aborted .. to continue" D ^DIR KILL DIR G END1 "RTN","XBDBQUE",63,0) ; "RTN","XBDBQUE",64,0) QUE1 ; "RTN","XBDBQUE",65,0) I ($D(IO("Q"))!($G(XBFQ))) D K IO("Q") W:(($G(ZTSK))&('$D(XB("ZTSK")))) !,"Tasked with ",ZTSK W:'$G(ZTSK) !,*7,"Que not successful ... REPORTING ABORTED" D ^%ZISC S IOP=XB("IOP1") D ^%ZIS G END1 ;---> "RTN","XBDBQUE",66,0) . I '$D(ZTQUEUED),IO=IO(0),$G(XBRP)]"" W !,"Queing to slave printer not allowed ... Report Aborting" Q ;---^ "RTN","XBDBQUE",67,0) . S ZTDESC="Double Que COMPUTing "_XBRC_" "_$G(XBRP),ZTIO="",ZTRTN="DEQUE1^XBDBQUE" "RTN","XBDBQUE",68,0) . S:$D(XBDTH) ZTDTH=XBDTH "RTN","XBDBQUE",69,0) . S:$G(XB("CPU"))]"" ZTCPU=XB("CPU") "RTN","XBDBQUE",70,0) . S XBNSX="" "RTN","XBDBQUE",71,0) . F S XBNSX=$O(XB("NS",XBNSX)) Q:XBNSX="" S ZTSAVE(XBNSX)="" "RTN","XBDBQUE",72,0) . KILL XBRC,XBRP,XBRX,XBNS,XBFQ,XBDTH,XBIOP,XBPAR,XBDTH,XBNSX,XBI "RTN","XBDBQUE",73,0) . S ZTIO="" ; insure no device loaded "RTN","XBDBQUE",74,0) . D ^%ZTLOAD "RTN","XBDBQUE",75,0) . Q ; these do .s branch to END1 "RTN","XBDBQUE",76,0) ; (((if queued the above code branched to END))) "RTN","XBDBQUE",77,0) ; "RTN","XBDBQUE",78,0) DEQUE1 ;EP - > 1st deque From TaskMan. "RTN","XBDBQUE",79,0) ; "RTN","XBDBQUE",80,0) KILL XBRC,XBRP,XBRX,XBNS,XBFQ,XBDTH,XBIOP,XBPAR,XBDTH "RTN","XBDBQUE",81,0) KILL XB("ZTSK") "RTN","XBDBQUE",82,0) I $D(ZTQUEUED),$G(ZTSK) S XB("ZTSK")=ZTSK "RTN","XBDBQUE",83,0) ; "RTN","XBDBQUE",84,0) COMPUTE ;>do computing | routine "RTN","XBDBQUE",85,0) ; "RTN","XBDBQUE",86,0) D @(XB("RC")) ; >>>PERFORM THE COMPUTE ROUTINE<<< ;stuffed if not provided with NORC^XBDBQUE "RTN","XBDBQUE",87,0) ; "RTN","XBDBQUE",88,0) QUE2 ; "RTN","XBDBQUE",89,0) ; "RTN","XBDBQUE",90,0) I $D(ZTQUEUED) D G ENDC ;===> automatically requeue if queued "RTN","XBDBQUE",91,0) . Q:XB("RP")="" "RTN","XBDBQUE",92,0) . S ZTDESC="Double Que PRINT "_XB("RC")_" "_XB("RP"),ZTIO=XB("IO"),ZTDTH=$H,ZTRTN="DEQUE2^XBDBQUE" ;IHS/SET/GTH 07/16/2002 "RTN","XBDBQUE",93,0) . S XBNSX="" "RTN","XBDBQUE",94,0) . F S XBNSX=$O(XB("NS",XBNSX)) Q:XBNSX="" S ZTSAVE(XBNSX)="" "RTN","XBDBQUE",95,0) . D SETIOPN K ZTIO "RTN","XBDBQUE",96,0) . D ^%ZTLOAD "RTN","XBDBQUE",97,0) . I '$D(ZTSK) S XBERR="SECOND QUE FAILED" D @^%ZOSF("ERRTN") Q "RTN","XBDBQUE",98,0) . S XBDBQUE=1 "RTN","XBDBQUE",99,0) . Q ; ======> this branches to ENDC "RTN","XBDBQUE",100,0) ; "RTN","XBDBQUE",101,0) ; device opened from the first que ask "RTN","XBDBQUE",102,0) DEQUE2 ;EP - 2nd Deque | printing "RTN","XBDBQUE",103,0) KILL XB("ZTSK") "RTN","XBDBQUE",104,0) I $D(ZTQUEUED),$G(ZTSK) S XB("ZTSK")=ZTSK "RTN","XBDBQUE",105,0) ;open printer device for printing with all selected parameters "RTN","XBDBQUE",106,0) G:(XB("RP")="") END ;---> exit if no print "RTN","XBDBQUE",107,0) ; "RTN","XBDBQUE",108,0) I $D(ZTQUEUED),$$VERSION^%ZOSV(1)["Cache",ION="HFS" D ^%ZISC S IOP=ION,%ZIS("HFSNAME")=XB("IO"),%ZIS("HFSMODE")="W" D ^%ZIS ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDBQUE",109,0) U IO "RTN","XBDBQUE",110,0) D @(XB("RP")) ; >>>PERFORM PRINTING ROUTINE "RTN","XBDBQUE",111,0) ; "RTN","XBDBQUE",112,0) ;------- "RTN","XBDBQUE",113,0) END ;>End | cleanup "RTN","XBDBQUE",114,0) ; "RTN","XBDBQUE",115,0) I $G(XB("RX"))'="" D @(XB("RX")) ; >>>PERFORM CLEANUP ROUTINE<<< "RTN","XBDBQUE",116,0) ; "RTN","XBDBQUE",117,0) END0 ;EP - from compute cycle when XB("RP") EXISTS "RTN","XBDBQUE",118,0) I $D(XB("ZTSK")) S XBTZTSK=$G(ZTSK),ZTSK=XB("ZTSK") D KILL^%ZTLOAD K ZTSK S:$G(XBTZTSK) ZTSK=XBTZTSK KILL XBTZTSK "RTN","XBDBQUE",119,0) END1 ;EP clean out xb as passed in "RTN","XBDBQUE",120,0) D ^%ZISC "RTN","XBDBQUE",121,0) S IOP=XB("IOP1") ; restore original IO parameters "RTN","XBDBQUE",122,0) D ^%ZIS "RTN","XBDBQUE",123,0) K IOPAR,IOUPAR,IOP "RTN","XBDBQUE",124,0) KILL XB,XBRC,XBRP,XBRX,XBNS,XBFQ,XBDTH,XBIOP,XBPAR,XBDTH,XBERR,XBI,XBNSX,XBQUIT,XBDBQUE "RTN","XBDBQUE",125,0) ; "RTN","XBDBQUE",126,0) Q "RTN","XBDBQUE",127,0) ENDC ;EP - end computing cycle "RTN","XBDBQUE",128,0) I $G(XB("RP"))="" G END "RTN","XBDBQUE",129,0) G END0 "RTN","XBDBQUE",130,0) ; "RTN","XBDBQUE",131,0) ;---------------- "RTN","XBDBQUE",132,0) ;---------------- "RTN","XBDBQUE",133,0) SUB ;>Subroutines "RTN","XBDBQUE",134,0) ;---------- "RTN","XBDBQUE",135,0) NORC ;used if no XBRC identified "RTN","XBDBQUE",136,0) Q "RTN","XBDBQUE",137,0) ; "RTN","XBDBQUE",138,0) SETIOPN ;EP Set IOP parameters with (N)o open "RTN","XBDBQUE",139,0) Q:'$D(XB("IOP")) "RTN","XBDBQUE",140,0) S IOP=XB("IOP") "RTN","XBDBQUE",141,0) ;Begin New Code;XB*3*9 10/29/2002 "RTN","XBDBQUE",142,0) I $$VERSION^%ZOSV(1)["Cache",$G(XB("ION"))="HFS" D Q "RTN","XBDBQUE",143,0) . S %ZIS("HFSNAME")=XB("IO"),%ZIS("IOPAR")="WNS",%ZIS("HFSMODE")="W",IOP=$P(XB("IOP"),";"),XB("IOP")=IOP,%ZIS="N" "RTN","XBDBQUE",144,0) . D ^%ZIS "RTN","XBDBQUE",145,0) .Q "RTN","XBDBQUE",146,0) ;End New Code;XB*3*9 10/29/2002 "RTN","XBDBQUE",147,0) ; XB*3*5 - IHS/ADC/GTH 10-31-97 start block "RTN","XBDBQUE",148,0) I $G(XB("IOPAR"))]"" S %ZIS("IOPAR")=XB("IOPAR") D "RTN","XBDBQUE",149,0) . I XB("IOPAR")'?1"(""".E1""":""".E1""")" Q ; skip HFS if not an HFS "RTN","XBDBQUE",150,0) . ; XB*3*8 - IHS/ASDST/GTH 00-12-05 start block "RTN","XBDBQUE",151,0) . ; Index into XB("IOPAR") correctly if ":" in Pathname. "RTN","XBDBQUE",152,0) . NEW A,I "RTN","XBDBQUE",153,0) . S (I,A)=1 "RTN","XBDBQUE",154,0) . F S C=$E(XB("IOPAR"),A) Q:A=$L(XB("IOPAR")) S A=A+1,I=I+(C=":") "RTN","XBDBQUE",155,0) . ; XB*3*8 - IHS/ASDST/GTH 00-12-05 end block "RTN","XBDBQUE",156,0) . ; S XBHFSNM=$P(XB("IOPAR"),":"),XBHFSNM=$TR(XBHFSNM,"()""") ; XB*3*8 "RTN","XBDBQUE",157,0) . S XBHFSNM=$P(XB("IOPAR"),":",I-1),XBHFSNM=$TR(XBHFSNM,"()""") ; XB*3*8 "RTN","XBDBQUE",158,0) . ;S XBHFSNM=$P(XB("IOPAR"),":",I-1),XBHFSNM=$TR(XBHFSNM,"()""") ; XB*3*8 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDBQUE",159,0) . S XBHFSNM=$P(XB("IOPAR"),":",I-2,I-1),XBHFSNM=$TR(XBHFSNM,"()""") ; XB*3*8 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDBQUE",160,0) . ; S XBHFSMD=$P(XB("IOPAR"),":",2),XBHFSMD=$TR(XBHFSMD,"()""") ; XB*3*8 "RTN","XBDBQUE",161,0) . S XBHFSMD=$P(XB("IOPAR"),":",I),XBHFSMD=$TR(XBHFSMD,"()""") ; XB*3*8 "RTN","XBDBQUE",162,0) . S %ZIS("HFSNAME")=XBHFSNM,%ZIS("HFSMODE")=XBHFSMD "RTN","XBDBQUE",163,0) . Q "RTN","XBDBQUE",164,0) ; XB*3*5 - IHS/ADC/GTH 10-31-97 end block "RTN","XBDBQUE",165,0) S %ZIS="N" "RTN","XBDBQUE",166,0) D ^%ZIS "RTN","XBDBQUE",167,0) Q "RTN","XBDELR") 0^24^B1016011 "RTN","XBDELR",1,0) XBDELR ; IHS/ASDST/GTH - AN XB UTILITY ; [ 10/29/2002 7:42 AM ] "RTN","XBDELR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDELR",3,0) ; "RTN","XBDELR",4,0) ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDELR",5,0) ; "RTN","XBDELR",6,0) ; Delete routines in namespace "XBN", if XBA=0. "RTN","XBDELR",7,0) ; If XBA=1, single routine. "RTN","XBDELR",8,0) ; "RTN","XBDELR",9,0) ; It's up to the calling routine to make sure it's not deleted, if "RTN","XBDELR",10,0) ; the calling routine is the current routine. "RTN","XBDELR",11,0) ; "RTN","XBDELR",12,0) ; E.g.: D DEL^XBDELR("MYROUTIN",1) Del 1 routine named "MYROUTIN". "RTN","XBDELR",13,0) ; D DEL^XBDELR("NS") Del all routines in "NS" namespace. "RTN","XBDELR",14,0) ; "RTN","XBDELR",15,0) ; "RTN","XBDELR",16,0) DEL(XBN,XBA) ;PEP - Delete routine(s). "RTN","XBDELR",17,0) I $G(XBA)=1 S ^TMP("XBDELR",$J,XBN)="" "RTN","XBDELR",18,0) E Q:'$$RSEL^ZIBRSEL(XBN_"*","^TMP(""XBDELR"","_$J_",") "RTN","XBDELR",19,0) ; "RTN","XBDELR",20,0) NEW X "RTN","XBDELR",21,0) ; "RTN","XBDELR",22,0) S X="" "RTN","XBDELR",23,0) F S X=$O(^TMP("XBDELR",$J,X)) Q:X="" X ^%ZOSF("DEL") I '$D(ZTQUEUED) D BMES^XPDUTL(X_$E("...........",1,11-$L(X))_"") "RTN","XBDELR",24,0) KILL ^TMP("XBDELR",$J) "RTN","XBDELR",25,0) Q "RTN","XBDELR",26,0) ; "RTN","XBDH") 0^25^B2501910 "RTN","XBDH",1,0) XBDH ; IHS/ADC/GTH - HEADER EDITOR MAIN ROUTINE ; [ 02/07/97 3:02 PM ] "RTN","XBDH",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDH",3,0) ; "RTN","XBDH",4,0) ; Thanks to Dr. Dave Grau, OHPRD/TUCSON, for the original "RTN","XBDH",5,0) ; routine. "RTN","XBDH",6,0) ; "RTN","XBDH",7,0) ; THIS ROUTINE IS DEDICATED TO MY FRIEND AND MENTOR, "RTN","XBDH",8,0) ; KEN FLESHMAN M.D. "RTN","XBDH",9,0) ; "RTN","XBDH",10,0) ; Version 11.1 is dedicated to Maureen Hoye and Tami Winn "RTN","XBDH",11,0) ; who made it possible to create a "legal", distributable "RTN","XBDH",12,0) ; package. Sincere thanks!!! "RTN","XBDH",13,0) ; "RTN","XBDH",14,0) VAR ; "RTN","XBDH",15,0) NEW XBDHMORE,DHD,V,X,Y,XBDHPDFN,XBDHPDNA,XBDHTHLW,XBDHL,XBDHI,%Y,%,A,C,Z,I,XBDHMFLG,XBDHWOFF "RTN","XBDH",16,0) KILL ^TMP("XBDH",$J) "RTN","XBDH",17,0) I '$D(DUZ) W !!,"KERNEL VARIABLES REQUIRED",!!,*7 G EXIT "RTN","XBDH",18,0) KILL:'$D(XBDHDATA) ^TMP("XBDH",$J) "RTN","XBDH",19,0) I $P($T(+2^DI),";",3)<17.77 W !!,"SORRY... THIS ROUTINE IS NOT COMPATABLE WITH YOUR VERSION OF FILEMAN" G EXIT "RTN","XBDH",20,0) S XBDHWOFF="" "RTN","XBDH",21,0) F %=2,8,15,16 I ^DD("OS")=% S XBDHWOFF="U 0:(0)" Q "RTN","XBDH",22,0) S IOP=0 "RTN","XBDH",23,0) D ^%ZIS "RTN","XBDH",24,0) S V="|" "RTN","XBDH",25,0) ; "RTN","XBDH",26,0) TITLE ; "RTN","XBDH",27,0) W @IOF,!,$$C^XBFUNC("***** HEADER LINE PROCESSOR *****"),!,$$C^XBFUNC("Version "_$P($T(XBDH+1),";",3)) "RTN","XBDH",28,0) ; "RTN","XBDH",29,0) XBDHD ; "RTN","XBDH",30,0) D ^XBDHD "RTN","XBDH",31,0) I $D(XBDHQUIT) KILL XBDHQUIT G EXIT "RTN","XBDH",32,0) D:$D(^TMP("XBDH",$J,"HEADER"))=11 ^XBDHDSV "RTN","XBDH",33,0) I $D(^TMP("XBDH",$J,"SAVE")) G XBDHD "RTN","XBDH",34,0) EXIT ; "RTN","XBDH",35,0) KILL:'$D(XBDHDATA) ^TMP("XBDH",$J) "RTN","XBDH",36,0) KILL XBDHDATA "RTN","XBDH",37,0) Q "RTN","XBDH",38,0) ; "RTN","XBDHD") 0^26^B19435568 "RTN","XBDHD",1,0) XBDHD ; IHS/ADC/GTH - GET BASIC INFO ABOUT FILE AND FIELDS ; [ 02/07/97 3:02 PM ] "RTN","XBDHD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHD",3,0) ; "RTN","XBDHD",4,0) NEW ; "RTN","XBDHD",5,0) NEW XBDHCHLW,XBDHDFN,XBDHDFNA,XBDHECHN,XBDHHDN,XBDHHDNO,XBDHHDR,XBDHHDW,XBDHREM,XBDHTCHN,XBDHX,XBDHY,XBDHZ,DIC,Z,XBDHXX,XBDHCHN,XBDHPDFN,XBDHPDNA,XBDHDPTH,XBDHDSUB,XBDHNSL,XBDHLIFO,XBDHY0 "RTN","XBDHD",6,0) W !! "RTN","XBDHD",7,0) I $D(^TMP("XBDH",$J,"SAVE")) D N1,^XBDHD1 S XBDHCHN=XBDHCHN+1 G STACK "RTN","XBDHD",8,0) XBDHPDFN ; "RTN","XBDHD",9,0) S DIR(0)="PO^1:EMQ",DIR("A")="Output from what file",DIR("?")="Enter the name of the file from which you wish to print." "RTN","XBDHD",10,0) D ^DIR "RTN","XBDHD",11,0) KILL DIR "RTN","XBDHD",12,0) D DIRCK "RTN","XBDHD",13,0) I $D(XBDHQUIT) G EXIT "RTN","XBDHD",14,0) S XBDHPDFN=+Y,XBDHPDNA=$P(Y,U,2),^TMP("XBDH",$J,"HEADER")=+Y_U_XBDHPDNA "RTN","XBDHD",15,0) W ! "RTN","XBDHD",16,0) ; "RTN","XBDHD",17,0) HEADER ; "RTN","XBDHD",18,0) I $D(XBDHDATA) S DHD="@",XBDHTHLW=240 G START "RTN","XBDHD",19,0) S Z=XBDHPDNA "RTN","XBDHD",20,0) S:$E(Z,$L(Z)-4,$L(Z))=" LIST" Z=$E(Z,1,$L(Z)-5) "RTN","XBDHD",21,0) S DIR(0)="FO^:",DIR("A")="Report heading",DIR("B")=Z_" LIST" "RTN","XBDHD",22,0) D ^DIR "RTN","XBDHD",23,0) KILL DIR "RTN","XBDHD",24,0) D DIRCK "RTN","XBDHD",25,0) I $D(XBDHQUIT) G EXIT "RTN","XBDHD",26,0) S DHD=X "RTN","XBDHD",27,0) I DHD="" S DHD="@" "RTN","XBDHD",28,0) W ! "RTN","XBDHD",29,0) ; "RTN","XBDHD",30,0) THLW ; "RTN","XBDHD",31,0) S DIR(0)="NO^1:256:",DIR("A")="Header line width",DIR("B")="132",DIR("?")="between 1 and 256" "RTN","XBDHD",32,0) D ^DIR "RTN","XBDHD",33,0) KILL DIR "RTN","XBDHD",34,0) S XBDHTHLW=Y "RTN","XBDHD",35,0) I "^"[XBDHTHLW G EXIT "RTN","XBDHD",36,0) ; "RTN","XBDHD",37,0) START ; "RTN","XBDHD",38,0) S XBDHTCHN="",XBDHCHLW=0,XBDHCHN=1,XBDHNSL=XBDHTHLW "RTN","XBDHD",39,0) STACK ; "RTN","XBDHD",40,0) KILL ^TMP("XBDH",$J,"STACK") "RTN","XBDHD",41,0) S ^TMP("XBDH",$J,"STACK",1)=XBDHPDFN_U_XBDHPDNA_U_U,XBDHLIFO=1 "RTN","XBDHD",42,0) ; "RTN","XBDHD",43,0) FIELD ; "RTN","XBDHD",44,0) KILL Y,XBDHY0 "RTN","XBDHD",45,0) D ^XBDHDF "RTN","XBDHD",46,0) I Y="",$D(^TMP("XBDH",$J,"HEADER",1)),XBDHLIFO=1 S ^TMP("XBDH",$J,"SAVE")=XBDHCHN_U_XBDHCHLW_U_XBDHNSL D:$D(^TMP("XBDH",$J,"HEADER",2)) ^XBDHDSP G EXIT "RTN","XBDHD",47,0) I "^"[Y S:Y=U XBDHQUIT="" G EXIT "RTN","XBDHD",48,0) I Y?1"."1U S XBDHREL="" G RESET "RTN","XBDHD",49,0) ; "RTN","XBDHD",50,0) HDR ; "RTN","XBDHD",51,0) I $D(Y(0))#2 S XBDHY0=Y(0) "RTN","XBDHD",52,0) S Z=$J("",(XBDHLIFO*2)-2),DIR(0)="FO^:",DIR("A")=Z_"Column header",DIR("B")=XBDHHDN,DIR("?")="Enter the label you want to appear at the top of this column" "RTN","XBDHD",53,0) D ^DIR "RTN","XBDHD",54,0) KILL DIR "RTN","XBDHD",55,0) S XBDHHDR=Y "RTN","XBDHD",56,0) I "^"[XBDHHDR W !! G EXIT "RTN","XBDHD",57,0) I $L(XBDHHDN)>XBDHNSL W *7,*7,!!,"THIS HEADER WILL NOT FIT ON THE LINE...TRY AGAIN",!! G HDR "RTN","XBDHD",58,0) ; "RTN","XBDHD",59,0) HDW ; "RTN","XBDHD",60,0) I '$D(XBDHY0) S XBDHZ=XBDHNSL G WIDTH "RTN","XBDHD",61,0) I $P(XBDHY0,U,2)["D",$L(XBDHHDR)<13,XBDHNSL>11 S XBDHZ=12 G WIDTH "RTN","XBDHD",62,0) S XBDHZ="",XBDHX=$P(XBDHY0,U,5),XBDHY="$L(X)>" "RTN","XBDHD",63,0) I XBDHX[XBDHY S XBDHZ=+$P(XBDHX,XBDHY,2) S:XBDHZ<$L(XBDHHDR) XBDHZ=$L(XBDHHDR) S:+$P(XBDHX,XBDHY,2)>XBDHNSL XBDHZ=XBDHNSL "RTN","XBDHD",64,0) WIDTH ; "RTN","XBDHD",65,0) S Z=$J("",(XBDHLIFO*2)-2) "RTN","XBDHD",66,0) KILL XBDHY0 "RTN","XBDHD",67,0) S DIR(0)="NO^"_$L(XBDHHDR)_":"_XBDHNSL_":",DIR("A")=Z_"Enter the width (in columns) of this field",DIR("B")=XBDHZ,DIR("?")="Must not be narrower than column header or wider than remaining space" "RTN","XBDHD",68,0) D ^DIR "RTN","XBDHD",69,0) KILL DIR "RTN","XBDHD",70,0) S XBDHHDW=Y "RTN","XBDHD",71,0) I XBDHHDW="" W ! G HDR "RTN","XBDHD",72,0) I XBDHHDW="^" W !! G EXIT "RTN","XBDHD",73,0) I XBDHHDW=+XBDHHDW,XBDHHDW'<$L(XBDHHDR),XBDHHDW'>XBDHNSL S $P(^TMP("XBDH",$J,"HEADER"),U,3)=XBDHTHLW G GLOB "RTN","XBDHD",74,0) W *7,*7,*13,$J("",IOM),*13 "RTN","XBDHD",75,0) G HDW "RTN","XBDHD",76,0) ; "RTN","XBDHD",77,0) GLOB ; "RTN","XBDHD",78,0) S V="|",^TMP("XBDH",$J,"HEADER",XBDHCHN)=XBDHDFN_"~"_XBDHHDNO_"~~"_XBDHDPTH_V_XBDHHDN_V_XBDHHDR_V_XBDHHDW_"|0|||0" "RTN","XBDHD",79,0) RESET ; "RTN","XBDHD",80,0) D ^XBDHD1,^XBDHD2 "RTN","XBDHD",81,0) I $D(XBDHQUIT) G EXIT "RTN","XBDHD",82,0) S XBDHCHN=XBDHCHN+1 "RTN","XBDHD",83,0) I $D(XBDHREL) KILL XBDHREL D ^XBDHD1 S XBDHCHN=XBDHCHN+1 G STACK "RTN","XBDHD",84,0) G FIELD "RTN","XBDHD",85,0) ; "RTN","XBDHD",86,0) N1 ; "RTN","XBDHD",87,0) S V="|",X=^TMP("XBDH",$J,"SAVE"),XBDHCHN=$P(X,U),XBDHCHLW=$P(X,U,2),XBDHNSL=$P(X,U,3),XBDHTCHN="",X=^("HEADER"),XBDHPDFN=$P(X,U),XBDHPDNA=$P(X,U,2),XBDHTHLW=$P(X,U,3) "RTN","XBDHD",88,0) KILL X "RTN","XBDHD",89,0) Q "RTN","XBDHD",90,0) ; "RTN","XBDHD",91,0) EXIT ; "RTN","XBDHD",92,0) Q "RTN","XBDHD",93,0) ; "RTN","XBDHD",94,0) DIRCK ; "RTN","XBDHD",95,0) I Y=""!($D(DIRUT))!($D(DTOUT)) S XBDHQUIT="" KILL DIRUT,DTOUT,DUOUT,DIROUT "RTN","XBDHD",96,0) Q "RTN","XBDHD",97,0) ; "RTN","XBDHD1") 0^27^B5053033 "RTN","XBDHD1",1,0) XBDHD1 ; IHS/ADC/GTH - COMPILES HEADER LINE ; [ 02/07/97 3:02 PM ] "RTN","XBDHD1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHD1",3,0) ; "RTN","XBDHD1",4,0) NEW ; "RTN","XBDHD1",5,0) NEW XBDHCHN2,XBDHHDPD,XBDHHDSP,XBDHL1,XBDHL2,XBDHL3,DX,DY "RTN","XBDHD1",6,0) INIT ; "RTN","XBDHD1",7,0) W @IOF "RTN","XBDHD1",8,0) X XBDHWOFF "RTN","XBDHD1",9,0) S (XBDHL1,XBDHL2,XBDHL3,XBDHCHN2)="",XBDHCHLW=0,DX=0,XBDHNSL=XBDHTHLW "RTN","XBDHD1",10,0) F XBDHL=0:0 S XBDHCHN2=$O(^TMP("XBDH",$J,"HEADER",XBDHCHN2)) Q:XBDHCHN2="" D:((XBDHCHN2\1)=XBDHCHN2) VAR W "." "RTN","XBDHD1",11,0) W @IOF "RTN","XBDHD1",12,0) WLINE ; "RTN","XBDHD1",13,0) F XBDHZ=1:1:4 Q:XBDHZ>(((XBDHTHLW-1)\80)+1) D LINE "RTN","XBDHD1",14,0) FIN ; "RTN","XBDHD1",15,0) S DY=(3*XBDHZ)+1,XBDHX="",$P(XBDHX,"-",79)="" "RTN","XBDHD1",16,0) X IOXY "RTN","XBDHD1",17,0) W XBDHX,! "RTN","XBDHD1",18,0) EXIT ; "RTN","XBDHD1",19,0) Q "RTN","XBDHD1",20,0) ; "RTN","XBDHD1",21,0) LINE ; "RTN","XBDHD1",22,0) S DY=(XBDHZ*3)-2,XBDHX=80*XBDHZ "RTN","XBDHD1",23,0) F XBDHY="XBDHL1","XBDHL3" S DY=DY+1 X IOXY W $E(@XBDHY,XBDHX-79,XBDHX) "RTN","XBDHD1",24,0) Q "RTN","XBDHD1",25,0) ; "RTN","XBDHD1",26,0) VAR ; "RTN","XBDHD1",27,0) S XBDHHDR=$P(^TMP("XBDH",$J,"HEADER",XBDHCHN2),V,3),XBDHHDW=$P(^(XBDHCHN2),V,4),XBDHHDPD=$P(^(XBDHCHN2),V,5),XBDHHDSP=$P(^(XBDHCHN2),V,8),XBDHCHLW=XBDHCHLW+XBDHHDW,XBDHCHN=XBDHCHN2,XBDHNSL=XBDHNSL-(XBDHHDW+XBDHHDSP) "RTN","XBDHD1",28,0) S XBDHL1=XBDHL1_$J("",XBDHHDPD)_XBDHHDR_$J("",(XBDHHDW-$L(XBDHHDR)-XBDHHDPD+XBDHHDSP)) "RTN","XBDHD1",29,0) S XBDHXX=$C(64+XBDHCHN2) "RTN","XBDHD1",30,0) I $D(XBDHECHN),XBDHECHN=XBDHCHN2 S XBDHXX="^" "RTN","XBDHD1",31,0) S XBDHX="",$P(XBDHX,XBDHXX,XBDHHDW+1)="",XBDHY="",$P(XBDHY,".",XBDHHDSP+1)="" S XBDHL2=XBDHL2_XBDHX_XBDHY "RTN","XBDHD1",32,0) L3 ; "RTN","XBDHD1",33,0) S XBDHX="",$P(XBDHX,".",(XBDHTHLW+1-$L(XBDHL2)))="",XBDHL3=XBDHL2_XBDHX "RTN","XBDHD1",34,0) KILL XBDHXX,XBDHX,XBDHY "RTN","XBDHD1",35,0) Q "RTN","XBDHD1",36,0) ; "RTN","XBDHD1",37,0) NOTES ; "RTN","XBDHD1",38,0) ; WRITES THE CURRENT HEADER LINE AT THE TOP OF THE SCREEN "RTN","XBDHD1",39,0) ; INPUT = ^TMP("XBDH",$J,"HEADER",N),XBDHTHLW "RTN","XBDHD1",40,0) ; OUTPUT = XBDHHDSP,XBDHHDPD "RTN","XBDHD1",41,0) ; ALSO WRITES THE FIELD BOUNDARY LINE (AAAAAABBBCCCCC...) BELOW THE HEADER LINE "RTN","XBDHD1",42,0) ; THIS ROUTINE IS CALLED EVERY TIME THE HEADER LINE IS CHANGED BY THE EDITING PROCESS "RTN","XBDHD2") 0^28^B27257893 "RTN","XBDHD2",1,0) XBDHD2 ; IHS/ADC/GTH - SPECIAL CHOICES ; [ 02/07/97 3:02 PM ] "RTN","XBDHD2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHD2",3,0) ; "RTN","XBDHD2",4,0) NEW ; "RTN","XBDHD2",5,0) NEW XBDHFROM,XBDHI,XBDHTEMP,XBDHTO "RTN","XBDHD2",6,0) ; "RTN","XBDHD2",7,0) START ; "RTN","XBDHD2",8,0) I $D(XBDHECHN) S XBDHCHN=XBDHECHN,XBDHX=^TMP("XBDH",$J,"HEADER",XBDHCHN),XBDHHDR=$P(XBDHX,V,3),XBDHHDW=$P(XBDHX,V,4) "RTN","XBDHD2",9,0) W "EDITING HEADER LINE SEGMENT """,$C(64+XBDHCHN),""" FIELD = """,$P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,2),"""",! "RTN","XBDHD2",10,0) F XBDHI=1:1:7 W $E($T(TEXT+XBDHI),4,99),! "RTN","XBDHD2",11,0) W ! "RTN","XBDHD2",12,0) CNEXT ; "RTN","XBDHD2",13,0) S DIR(0)="NO^1:8:",DIR("A")="Your choice",DIR("?")="Enter the number of the editing function or to go on" "RTN","XBDHD2",14,0) D ^DIR "RTN","XBDHD2",15,0) KILL DIR "RTN","XBDHD2",16,0) S XBDHX=Y "RTN","XBDHD2",17,0) I "^"[XBDHX KILL XBDHECHN Q "RTN","XBDHD2",18,0) G @("C"_XBDHX) "RTN","XBDHD2",19,0) ; "RTN","XBDHD2",20,0) C1 ; "RTN","XBDHD2",21,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,5)=(XBDHHDW-$L(XBDHHDR))\2 "RTN","XBDHD2",22,0) D ^XBDHD1 "RTN","XBDHD2",23,0) G START "RTN","XBDHD2",24,0) ; "RTN","XBDHD2",25,0) C2 ; "RTN","XBDHD2",26,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,5)=0 "RTN","XBDHD2",27,0) D ^XBDHD1 "RTN","XBDHD2",28,0) G START "RTN","XBDHD2",29,0) ; "RTN","XBDHD2",30,0) C3 ; "RTN","XBDHD2",31,0) W !! "RTN","XBDHD2",32,0) C31 ; "RTN","XBDHD2",33,0) S DIR(0)="NO^"_$L(XBDHHDR)_":"_(XBDHNSL+XBDHHDW)_":",DIR("A")="New field width" "RTN","XBDHD2",34,0) D ^DIR "RTN","XBDHD2",35,0) KILL DIR "RTN","XBDHD2",36,0) S XBDHX=Y "RTN","XBDHD2",37,0) I "^"[XBDHX G START "RTN","XBDHD2",38,0) I XBDHX'=+XBDHX W *13,$J("",IOM),*13,*7,*7 G C31 "RTN","XBDHD2",39,0) I (XBDHX<$L(XBDHHDR))!(XBDHX>(XBDHNSL+XBDHHDW)) W *7,*7,*13,$J("",IOM),*13 G C31 "RTN","XBDHD2",40,0) S XBDHHDW=XBDHX,$P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,4)=XBDHX G:$E($P(^(XBDHCHN),V,5)) C1 "RTN","XBDHD2",41,0) D ^XBDHD1 "RTN","XBDHD2",42,0) G START "RTN","XBDHD2",43,0) ; "RTN","XBDHD2",44,0) C4 ; "RTN","XBDHD2",45,0) W !! "RTN","XBDHD2",46,0) S DIR(0)="FO^1:"_XBDHHDW_"",DIR("A")="New header name" "RTN","XBDHD2",47,0) D ^DIR "RTN","XBDHD2",48,0) KILL DIR "RTN","XBDHD2",49,0) S XBDHX=Y "RTN","XBDHD2",50,0) I XBDHX="" G C8 "RTN","XBDHD2",51,0) I XBDHX=U G START "RTN","XBDHD2",52,0) I $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,5) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,3)=XBDHX,XBDHHDR=XBDHX G C1 "RTN","XBDHD2",53,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,3)=XBDHX "RTN","XBDHD2",54,0) D ^XBDHD1 "RTN","XBDHD2",55,0) G START "RTN","XBDHD2",56,0) ; "RTN","XBDHD2",57,0) C5 ; "RTN","XBDHD2",58,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,6)="+" "RTN","XBDHD2",59,0) W !!,"ENTRIES RIGHT JUSTIFIED TO A WIDTH OF ",XBDHHDW," COLUMNS" "RTN","XBDHD2",60,0) H 2 "RTN","XBDHD2",61,0) D ^XBDHD1 "RTN","XBDHD2",62,0) G START "RTN","XBDHD2",63,0) ; "RTN","XBDHD2",64,0) C6 ; "RTN","XBDHD2",65,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN),V,7)="+" "RTN","XBDHD2",66,0) W !!,"ENTRIES WILL BE WORD WRAPPED TO A WIDTH OF ",XBDHHDW," COLUMNS" "RTN","XBDHD2",67,0) H 2 "RTN","XBDHD2",68,0) D ^XBDHD1 "RTN","XBDHD2",69,0) G START "RTN","XBDHD2",70,0) ; "RTN","XBDHD2",71,0) C7 ; "RTN","XBDHD2",72,0) I '$D(XBDHECHN) KILL ^TMP("XBDH",$J,"HEADER",XBDHCHN) D ^XBDHD1 Q "RTN","XBDHD2",73,0) S X="" "RTN","XBDHD2",74,0) F L=0:0 S X=$O(^TMP("XBDH",$J,"HEADER",X)) Q:X="" S ^TMP("XBDH",$J,"HT",X)=^TMP("XBDH",$J,"HEADER",X) W "." "RTN","XBDHD2",75,0) S XBDHTEMP=^TMP("XBDH",$J,"HEADER") "RTN","XBDHD2",76,0) KILL ^TMP("XBDH",$J,"HT",XBDHECHN),^TMP("XBDH",$J,"HEADER") "RTN","XBDHD2",77,0) S X="" "RTN","XBDHD2",78,0) F I=1:1 S X=$O(^TMP("XBDH",$J,"HT",X)) Q:X="" S ^TMP("XBDH",$J,"HEADER",I)=^TMP("XBDH",$J,"HT",X) W "." "RTN","XBDHD2",79,0) S ^TMP("XBDH",$J,"HEADER")=XBDHTEMP "RTN","XBDHD2",80,0) KILL ^TMP("XBDH",$J,"HT"),XBDHTEMP "RTN","XBDHD2",81,0) KILL XBDHECHN "RTN","XBDHD2",82,0) D ^XBDHD1 "RTN","XBDHD2",83,0) Q "RTN","XBDHD2",84,0) ; "RTN","XBDHD2",85,0) C8 ; "RTN","XBDHD2",86,0) S XBDHFROM=$S($D(XBDHECHN):XBDHECHN,1:XBDHCHN),XBDHFROM=$C(64+XBDHFROM) "RTN","XBDHD2",87,0) S X="" "RTN","XBDHD2",88,0) F XBDHTCHN=0:1 S X=$O(^TMP("XBDH",$J,"HEADER",X)) Q:X="" S ^TMP("XBDH",$J,"HT",X)=^(X) W "." S Y="" F L=0:0 S Y=$O(^TMP("XBDH",$J,"HEADER",X,Y)) Q:Y="" S ^TMP("XBDH",$J,"HT",X,Y)=^(Y) "RTN","XBDHD2",89,0) I XBDHCHN<2 W *7,*13,$J("",IOM),*13 G CNEXT "RTN","XBDHD2",90,0) W *13,$J("",IOM),*13 "RTN","XBDHD2",91,0) ; "RTN","XBDHD2",92,0) MOVE ; "RTN","XBDHD2",93,0) S DIR(0)="FO^",DIR("A")="Where do you want to move this header (A - "_$C(64+XBDHTCHN)_")",DIR("?")="Enter a letter which corresponds to a header line field" "RTN","XBDHD2",94,0) D ^DIR "RTN","XBDHD2",95,0) KILL DIR "RTN","XBDHD2",96,0) S XBDHTO=Y "RTN","XBDHD2",97,0) I "^"[XBDHTO W ! G START "RTN","XBDHD2",98,0) I XBDHTO'?1U W *7,*7,*13,$J("",IOM),*13 G MOVE "RTN","XBDHD2",99,0) I XBDHTO]$C(64+XBDHCHN) W *7,*7,*13,$J("",IOM),*13 G MOVE "RTN","XBDHD2",100,0) I XBDHFROM=XBDHTO W *7,*13,$J("",IOM),*13 G MOVE "RTN","XBDHD2",101,0) S XBDHFROM=$A(XBDHFROM)-64,XBDHTO=$A(XBDHTO)-64 "RTN","XBDHD2",102,0) S XBDHX=XBDHTO+.1 "RTN","XBDHD2",103,0) S:(XBDHFROM>XBDHTO) XBDHX=XBDHTO-.1 "RTN","XBDHD2",104,0) S ^TMP("XBDH",$J,"HT",XBDHX)=^TMP("XBDH",$J,"HEADER",XBDHFROM) "RTN","XBDHD2",105,0) S Y="" "RTN","XBDHD2",106,0) F L=0:0 S Y=$O(^TMP("XBDH",$J,"HEADER",XBDHFROM,Y)) Q:Y="" S ^TMP("XBDH",$J,"HT",XBDHX,Y)=^TMP("XBDH",$J,"HEADER",XBDHFROM,Y) "RTN","XBDHD2",107,0) S XBDHTEMP=^TMP("XBDH",$J,"HEADER") "RTN","XBDHD2",108,0) KILL ^TMP("XBDH",$J,"HT",XBDHFROM),^TMP("XBDH",$J,"HEADER") "RTN","XBDHD2",109,0) S X="" "RTN","XBDHD2",110,0) F I=1:1 S X=$O(^TMP("XBDH",$J,"HT",X)) Q:X="" S ^TMP("XBDH",$J,"HEADER",I)=^TMP("XBDH",$J,"HT",X) S Y="" F L=0:0 S Y=$O(^TMP("XBDH",$J,"HT",X,Y)) Q:Y="" S ^TMP("XBDH",$J,"HEADER",I,Y)=^TMP("XBDH",$J,"HT",X,Y) "RTN","XBDHD2",111,0) S ^TMP("XBDH",$J,"HEADER")=XBDHTEMP "RTN","XBDHD2",112,0) KILL ^TMP("XBDH",$J,"HT"),XBDHTEMP,XBDHECHN "RTN","XBDHD2",113,0) D ^XBDHD1 "RTN","XBDHD2",114,0) G START "RTN","XBDHD2",115,0) ; "RTN","XBDHD2",116,0) TEXT ; "RTN","XBDHD2",117,0) ;;DO YOU WANT TO MAKE ANY OTHER CHANGES TO THIS HEADER OR ITS FIELD? "RTN","XBDHD2",118,0) ;; "RTN","XBDHD2",119,0) ;; ACCEPT HEADER AS IS "RTN","XBDHD2",120,0) ;; 1) CENTER HEADER WITHIN FIELD 5) RIGHT JUSTIFY ENTRIES "RTN","XBDHD2",121,0) ;; 2) UNCENTER HEADER 6) WORD WRAP ENTRIES "RTN","XBDHD2",122,0) ;; 3) CHANGE FIELD WIDTH 7) REMOVE THIS HEADER "RTN","XBDHD2",123,0) ;; 4) CHANGE HEADER NAME 8) MOVE THIS HEADER "RTN","XBDHD2",124,0) ; "RTN","XBDHD2",125,0) NOTES ; "RTN","XBDHD2",126,0) ; MAKES SECONDARY EDITING CHANGES AFTER EACH FIELD IS ENTERED "RTN","XBDHD2",127,0) ; INPUT = XBDHCHN OR XBDHECHN (XBDHECHN IS THE .A OR .B CHN),^TMP("XBDH",$J,"HEADER",CHN),XBDHTHLW "RTN","XBDHD2",128,0) ; OUTPUT = RESET ^TMP("XBDH",$J,"HEADER",CHN) "RTN","XBDHD2",129,0) ; TO INSERT A NEW FIELD SIMPLY APPEND IT TO THE END OF THE LINE AND THE MOVE IT "RTN","XBDHDF") 0^29^B13277751 "RTN","XBDHDF",1,0) XBDHDF ; IHS/ADC/GTH - GETS FIELD INFO FOR HEADER LINE EDITOR ; [ 02/07/97 3:02 PM ] "RTN","XBDHDF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHDF",3,0) ; "RTN","XBDHDF",4,0) NEW ; "RTN","XBDHDF",5,0) NEW XBDHXX,XBDHQUIT "RTN","XBDHDF",6,0) VAR ; "RTN","XBDHDF",7,0) S X=^TMP("XBDH",$J,"STACK",XBDHLIFO),XBDHDFN=$P(X,U),XBDHDFNA=$P(X,U,2),XBDHDSUB=$P(X,U,3),XBDHDPTH=$P(X,U,4) "RTN","XBDHDF",8,0) KILL X "RTN","XBDHDF",9,0) I $D(XBDHMFLG) KILL XBDHMFLG S Y="" G OK1 "RTN","XBDHDF",10,0) MORE ; "RTN","XBDHDF",11,0) D PATH "RTN","XBDHDF",12,0) GETFIELD ; "RTN","XBDHDF",13,0) S Z=$J("",(XBDHLIFO*2)-2)_$S(XBDHCHN=1:"First",1:"Then")_" print "_$S(XBDHLIFO>1:(XBDHDFNA_" "),1:"")_XBDHDSUB_"field" "RTN","XBDHDF",14,0) S A="" "RTN","XBDHDF",15,0) I $D(XBDHMULT) S A=XBDHMULT,XBDHMFLG="" KILL XBDHMULT "RTN","XBDHDF",16,0) S Z=Z_": " "RTN","XBDHDF",17,0) I A]"" S Z=Z_A_"//" "RTN","XBDHDF",18,0) W !,Z "RTN","XBDHDF",19,0) R Y:DTIME "RTN","XBDHDF",20,0) E S Y=U "RTN","XBDHDF",21,0) I Y="" S Y=A "RTN","XBDHDF",22,0) I Y="?" W !!,"Enter field name,number,computed expr.,MUMPS code,jump syntax or '??' for list",!! G GETFIELD "RTN","XBDHDF",23,0) I Y="^" W !! Q "RTN","XBDHDF",24,0) I Y="",XBDHCHN=1 W ! G GETFIELD "RTN","XBDHDF",25,0) I Y="",XBDHLIFO=1 W !! Q "RTN","XBDHDF",26,0) OK1 ; "RTN","XBDHDF",27,0) I Y="" KILL ^TMP("XBDH",$J,"STACK",XBDHLIFO) S XBDHLIFO=XBDHLIFO-1,XBDHDPTH=$P(XBDHDPTH,";",1,XBDHLIFO)_";" W !!! G VAR "RTN","XBDHDF",28,0) I Y?1"."1U,$E(Y,2)']$C(63+XBDHCHN) S XBDHECHN=($A($E(Y,2))-64) Q "RTN","XBDHDF",29,0) S XBDHXX=Y "RTN","XBDHDF",30,0) I $E(Y,$L(Y))=":" D ^XBDHDF1 G VAR:Y'=-1,OUT:A="^",GETFIELD "RTN","XBDHDF",31,0) S DIC(0)="EZ",DIC="^DD(XBDHDFN,",X=Y "RTN","XBDHDF",32,0) D ^DIC "RTN","XBDHDF",33,0) I X="??" W !! G GETFIELD "RTN","XBDHDF",34,0) I Y'=-1 D OK S X=$P(^DD(XBDHDFN,+Y,0),U,2) I X?1.9N1"."2N.E D MULTIPLE I Z="VAR" G VAR "RTN","XBDHDF",35,0) I Y'=-1 Q "RTN","XBDHDF",36,0) CKMUMPS ; "RTN","XBDHDF",37,0) D ^DIM "RTN","XBDHDF",38,0) I $D(X) W !,"MUMPS EXPRESSION ENTERED",!! D MUMPS G @X "RTN","XBDHDF",39,0) CKM1 ; "RTN","XBDHDF",40,0) S Y=XBDHXX "RTN","XBDHDF",41,0) I $E(Y,$L(Y))'=":" D ^XBDHDF1 G VAR:Y'=-1,OUT:A="^" "RTN","XBDHDF",42,0) D COMPUTED "RTN","XBDHDF",43,0) G:$D(XBDHQUIT) OUT "RTN","XBDHDF",44,0) W ! "RTN","XBDHDF",45,0) Q:$D(XBDHHDN) "RTN","XBDHDF",46,0) G GETFIELD "RTN","XBDHDF",47,0) ; "RTN","XBDHDF",48,0) OK ; "RTN","XBDHDF",49,0) S XBDHHDNO=+Y,XBDHHDN=$P(Y,U,2) "RTN","XBDHDF",50,0) Q "RTN","XBDHDF",51,0) ; "RTN","XBDHDF",52,0) COMPUTED ; "RTN","XBDHDF",53,0) I XBDHXX="NUMBER" S (XBDHHDN,XBDHHDNO)=XBDHXX KILL XBDHXX Q "RTN","XBDHDF",54,0) S X=XBDHXX "RTN","XBDHDF",55,0) D ^DIM "RTN","XBDHDF",56,0) I $D(X) G C1 "RTN","XBDHDF",57,0) W ! "RTN","XBDHDF",58,0) S DIR(0)="YO",DIR("A")="This is a computed expression, right",DIR("B")="YES" "RTN","XBDHDF",59,0) D ^DIR "RTN","XBDHDF",60,0) KILL DIR "RTN","XBDHDF",61,0) I Y=U W !! Q "RTN","XBDHDF",62,0) I 'Y KILL Y,XBDHHDN W !,"SORRY, I DON'T UNDERSTAND THIS ENTRY...TRY AGAIN",!!,*7 Q "RTN","XBDHDF",63,0) C1 ; "RTN","XBDHDF",64,0) S XBDHHDN="",XBDHHDNO=XBDHXX "RTN","XBDHDF",65,0) KILL XBDHXX "RTN","XBDHDF",66,0) Q "RTN","XBDHDF",67,0) ; "RTN","XBDHDF",68,0) MUMPS ; "RTN","XBDHDF",69,0) S %=1 "RTN","XBDHDF",70,0) W !,"DOES THIS MUMPS EXPRESSION REQUIRE A COLUMN HEADER" "RTN","XBDHDF",71,0) D YN^DICN "RTN","XBDHDF",72,0) I %Y=U S X="OUT" Q "RTN","XBDHDF",73,0) I $E(%Y)'="N" W ! S X="CKM1" Q "RTN","XBDHDF",74,0) F I=1:1 I '$D(^TMP("XBDH",$J,"HEADER",XBDHCHN,I)) S ^(I)=XBDHXX Q "RTN","XBDHDF",75,0) S X="GETFIELD" "RTN","XBDHDF",76,0) W !!! "RTN","XBDHDF",77,0) Q "RTN","XBDHDF",78,0) ; "RTN","XBDHDF",79,0) MULTIPLE ; "RTN","XBDHDF",80,0) S Z=^DD(+X,.01,0) "RTN","XBDHDF",81,0) I $P(Z,U,2)["W" W " (word-processing)" Q "RTN","XBDHDF",82,0) W " (multiple)" "RTN","XBDHDF",83,0) S Z=$O(^DD(+X,0,"NM","")),XBDHLIFO=XBDHLIFO+1,XBDHDPTH=XBDHDPTH_Z_";" "RTN","XBDHDF",84,0) S ^TMP("XBDH",$J,"STACK",XBDHLIFO)=+X_U_Z_U_"SUB-"_U_XBDHDPTH "RTN","XBDHDF",85,0) S Z=$O(^DD(+X,.01)) "RTN","XBDHDF",86,0) S:Z'=+Z XBDHMULT=$P(^DD(+X,.01,0),U) "RTN","XBDHDF",87,0) W !! "RTN","XBDHDF",88,0) S Z="VAR" "RTN","XBDHDF",89,0) Q "RTN","XBDHDF",90,0) ; "RTN","XBDHDF",91,0) PATH ; "RTN","XBDHDF",92,0) NEW A,X,Y,Z "RTN","XBDHDF",93,0) S X="CURRENTLY PRINTING FIELDS FROM THE ",A=0,Y=$L(XBDHDPTH,";") "RTN","XBDHDF",94,0) I XBDHDPTH="" S X=X_"'"_XBDHPDNA_"'"_" FILE" G LINE "RTN","XBDHDF",95,0) DECI ; "RTN","XBDHDF",96,0) S Y=Y-1 "RTN","XBDHDF",97,0) G:Y=0 LAST "RTN","XBDHDF",98,0) S A=A+1,Z=$P(XBDHDPTH,";",Y) "RTN","XBDHDF",99,0) I A>1 S X=X_"OF THE " "RTN","XBDHDF",100,0) I $E(Z,$L(Z))=":" S X=X_"'"_$P(^TMP("XBDH",$J,"STACK",XBDHLIFO),U,2)_"'"_" FILE" G LINE "RTN","XBDHDF",101,0) S X=X_"'"_Z_"'"_" SUB-FILE " "RTN","XBDHDF",102,0) G DECI "RTN","XBDHDF",103,0) ; "RTN","XBDHDF",104,0) LAST ; "RTN","XBDHDF",105,0) I A S X=X_"OF THE " "RTN","XBDHDF",106,0) S X=X_"'"_XBDHPDNA_"'"_" FILE" "RTN","XBDHDF",107,0) LINE ; "RTN","XBDHDF",108,0) W !!,X,!! "RTN","XBDHDF",109,0) Q "RTN","XBDHDF",110,0) ; "RTN","XBDHDF",111,0) OUT ; "RTN","XBDHDF",112,0) S Y="^" "RTN","XBDHDF",113,0) Q "RTN","XBDHDF",114,0) ; "RTN","XBDHDF",115,0) NOTES ; "RTN","XBDHDF",116,0) ; INTERPRETS THE ANSWER TO THE "THEN ENTER FIELD: " QUERY "RTN","XBDHDF",117,0) ; INPUT = ^TMP("XBDH",$J,"STACK",XBDHLIFO) [XBDHDFN^XBDHDFNA^XBDHDSUB^XBDHDPTH],XBDHCHN,XBDHLIFO "RTN","XBDHDF",118,0) ; OUTPUT = XBDHHDNO,XBDHHDN "RTN","XBDHDF",119,0) ; IF FIELD IS A MULTIPLE, IT RESETS PATH AND LIFO AND ASKS FOR SUBFILE. IF ONLY .01 FIELD OF SUBFILE EXISTS, IT PROMPTS FOR IT. "RTN","XBDHDF",120,0) ; ANY ANSWER IT CANT FIGURE OUT IS TREATED (AT LEAST TEMPORARILY) AS A COMPUTED FIELD "RTN","XBDHDF",121,0) ; IF ANSWER IS A RELATIONAL JUMP (ie ENDS IN ':') IT CHECKS ITS LEGALITY,RESETS PATH AND LIFO. "RTN","XBDHDF",122,0) ; MUMPS EXPRSSIONS ARE ATTACHED TO THE SUCCEEDING FIELD AS THE SUBSCRIPT ^TMP("XBDH",$J,"HEADER",X,Y) AND WILL FOLLOW THIS FIELD IF IT IS MOVED OR REMOVED "RTN","XBDHDF",123,0) ; IF USER IS IN A SUBFILE OR JUMPED-TO FILE , PRESSING WILL MOVE HIM TO THE NEXT HIGHER LEVEL "RTN","XBDHDF1") 0^30^B3011067 "RTN","XBDHDF1",1,0) XBDHDF1 ; IHS/ADC/GTH - CHECKS JUMP SYNTAX ; [ 02/07/97 3:02 PM ] "RTN","XBDHDF1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHDF1",3,0) ; "RTN","XBDHDF1",4,0) STRIP ; "RTN","XBDHDF1",5,0) KILL XBDHTC "RTN","XBDHDF1",6,0) I $E(Y,$L(Y))=":" S Y=$E(Y,1,$L(Y)-1),XBDHTC="" "RTN","XBDHDF1",7,0) S X=$L(Y,":"),Z=$S(X>1:$P(Y,":",X),1:Y),A="" "RTN","XBDHDF1",8,0) I $D(XBDHTC) D CKF I Y'=-1 G EXIT "RTN","XBDHDF1",9,0) D CKPT "RTN","XBDHDF1",10,0) I Y'=-1 G EXIT "RTN","XBDHDF1",11,0) I $D(XBDHTC) W " ??",*7,*7,*13,$J("",IOM),*13 "RTN","XBDHDF1",12,0) EXIT ; "RTN","XBDHDF1",13,0) KILL XBDHTC,Z "RTN","XBDHDF1",14,0) Q "RTN","XBDHDF1",15,0) ; "RTN","XBDHDF1",16,0) CKF ; "RTN","XBDHDF1",17,0) S X=Z,DIC(0)="",DIC="^DD(XBDHDFN," "RTN","XBDHDF1",18,0) D ^DIC "RTN","XBDHDF1",19,0) KILL DIC "RTN","XBDHDF1",20,0) I Y=-1 Q "RTN","XBDHDF1",21,0) S X=^DD(XBDHDFN,+Y,0),X=$P(X,U,2) "RTN","XBDHDF1",22,0) I X'["P" S Y=-1 Q "RTN","XBDHDF1",23,0) S X=+$P(X,"P",2),DIC="^DIC(",DIC(0)="" "RTN","XBDHDF1",24,0) D ^DIC "RTN","XBDHDF1",25,0) KILL DIC "RTN","XBDHDF1",26,0) I Y=-1 Q "RTN","XBDHDF1",27,0) D J1 "RTN","XBDHDF1",28,0) Q "RTN","XBDHDF1",29,0) ; "RTN","XBDHDF1",30,0) CKPT ; "RTN","XBDHDF1",31,0) S DIC="^DIC(",DIC(0)="",X=Z "RTN","XBDHDF1",32,0) D ^DIC "RTN","XBDHDF1",33,0) KILL DIC "RTN","XBDHDF1",34,0) I Y=-1 Q "RTN","XBDHDF1",35,0) F X=0:0 S A="",X=$O(^DD(XBDHDFN,0,"PT",+Y,X)) Q:X="" D JUMPQ I "Y^"[A Q "RTN","XBDHDF1",36,0) I X="" S Y=-1 Q "RTN","XBDHDF1",37,0) I A="^" Q "RTN","XBDHDF1",38,0) D J1 "RTN","XBDHDF1",39,0) Q "RTN","XBDHDF1",40,0) ; "RTN","XBDHDF1",41,0) J1 ; "RTN","XBDHDF1",42,0) S XBDHDPTH=XBDHDPTH_XBDHXX_$S($D(XBDHTC):"",1:":")_";" "RTN","XBDHDF1",43,0) S XBDHLIFO=XBDHLIFO+1,^TMP("XBDH",$J,"STACK",XBDHLIFO)=+Y_U_$P(Y,U,2)_U_U_XBDHDPTH "RTN","XBDHDF1",44,0) Q "RTN","XBDHDF1",45,0) ; "RTN","XBDHDF1",46,0) JUMPQ ; "RTN","XBDHDF1",47,0) I '$D(^DD(+Y,"IX",X)) Q "RTN","XBDHDF1",48,0) W !," By '",Z,"' do you mean the ",$P(Y,U,2)," File",!?7,"pointing via its '",$P(^DD(+Y,X,0),U),"' Field? YES// " "RTN","XBDHDF1",49,0) R A:DTIME "RTN","XBDHDF1",50,0) S:'$T A="^" "RTN","XBDHDF1",51,0) S A=$E(A) "RTN","XBDHDF1",52,0) Q "RTN","XBDHDF1",53,0) ; "RTN","XBDHDIP") 0^31^B370984 "RTN","XBDHDIP",1,0) XBDHDIP ; IHS/ADC/GTH - OVERLAY OF DIP2 FOR AUTO FILEMAN ; [ 02/07/97 3:02 PM ] "RTN","XBDHDIP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHDIP",3,0) ; "RTN","XBDHDIP",4,0) AUTO ; "RTN","XBDHDIP",5,0) I '$D(XBDHHDX) S XBDHHDX="" "RTN","XBDHDIP",6,0) S XBDHHDX=$O(^TMP("XBDH",$J,"HELPR",XBDHHDX)),X=^(XBDHHDX) "RTN","XBDHDIP",7,0) I XBDHHDX=99 KILL DIRPIPE,XBDHHDX,^TMP("XBDH",$J,"HELPR") S X="" W !! Q "RTN","XBDHDIP",8,0) W X "RTN","XBDHDIP",9,0) Q "RTN","XBDHDIP",10,0) ; "RTN","XBDHDIP",11,0) NOTES ; "RTN","XBDHDIP",12,0) ; CALLED BY ^DIP2. GETS ^TMP("XBDH",$J,"HELPER",XBDHHDX) TO BE STUFFED INTO "THEN PRINT FIELD: " OF DIP2 "RTN","XBDHDIP",13,0) ; INPUT = XBDHHDX "RTN","XBDHDIP",14,0) ; OUTPUT = ^TMP("XBDH",$J,"HELPR",XBDHHDX),XBDHHDX "RTN","XBDHDIP",15,0) ; IF XBDHHDX=99 THE GLOBAL KILLS ITSELF OFF AND A NULL STRING IS PASSED TO DIP2 "RTN","XBDHDSP") 0^32^B13412865 "RTN","XBDHDSP",1,0) XBDHDSP ; IHS/ADC/GTH - PUTS SPACES BETWEEN HEADERS ; [ 02/07/97 3:02 PM ] "RTN","XBDHDSP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHDSP",3,0) ; "RTN","XBDHDSP",4,0) NEW ; "RTN","XBDHDSP",5,0) NEW XBDHCHN1,XBDHI,XBDHTH,XBDHREP "RTN","XBDHDSP",6,0) INIT ; "RTN","XBDHDSP",7,0) S XBDHTH=XBDHCHN-1,XBDHNSL=XBDHTHLW-XBDHCHLW "RTN","XBDHDSP",8,0) I $P(^TMP("XBDH",$J,"HEADER",1),V,8)>0 G EXIT "RTN","XBDHDSP",9,0) S $P(^TMP("XBDH",$J,"HEADER",XBDHTH),V,8)=0 "RTN","XBDHDSP",10,0) W !!,"IT IS NOW TIME TO INSERT SPACES BETWEEN HEADER FIELDS",! "RTN","XBDHDSP",11,0) CQ ; "RTN","XBDHDSP",12,0) S DIR(0)="SO^1:REPATITIVE SPACING;2:MANUAL SPACING;3:AUTOMATIC SPACING",DIR("A")="Your choice",DIR("B")=1,DIR("?")="Automatic spacing puts maximum no. of spaces possible between fields." "RTN","XBDHDSP",13,0) D ^DIR "RTN","XBDHDSP",14,0) KILL DIR "RTN","XBDHDSP",15,0) S XBDHX=Y "RTN","XBDHDSP",16,0) I XBDHX="" G AUTO "RTN","XBDHDSP",17,0) I XBDHX=1 G REP "RTN","XBDHDSP",18,0) MANUAL ; "RTN","XBDHDSP",19,0) S XBDHCHN1="" "RTN","XBDHDSP",20,0) F XBDHL=0:0 S XBDHCHN1=$O(^TMP("XBDH",$J,"HEADER",XBDHCHN1)) G:XBDHCHN1=XBDHTH!(XBDHCHN1="") EXIT D MAN "RTN","XBDHDSP",21,0) EXIT ; "RTN","XBDHDSP",22,0) S DIR("B")="NO",DIR(0)="YO",DIR("A")="Want to make any more spacing changes" "RTN","XBDHDSP",23,0) D ^DIR "RTN","XBDHDSP",24,0) KILL DIR "RTN","XBDHDSP",25,0) I Y=1 W !! G CQ "RTN","XBDHDSP",26,0) I Y=U S XBDHQUIT="" Q "RTN","XBDHDSP",27,0) Q "RTN","XBDHDSP",28,0) ; "RTN","XBDHDSP",29,0) MAN ; "RTN","XBDHDSP",30,0) S XBDHY=$C(64+XBDHCHN1),XBDHZ=^TMP("XBDH",$J,"HEADER",XBDHCHN1) "RTN","XBDHDSP",31,0) W !!,"PUT SPACES AFTER HEADER """,$C(64+XBDHCHN1),"""" "RTN","XBDHDSP",32,0) W !,"TOTAL NUMBER OF UNUSED COLUMNS LEFT: ",XBDHNSL "RTN","XBDHDSP",33,0) W !,"TOTAL NUMBER OF HEADERS LEFT: ",XBDHTH+1-XBDHCHN1,! "RTN","XBDHDSP",34,0) SP ; "RTN","XBDHDSP",35,0) S DIR(0)="NO^::",DIR("A")="How many spaces do you want after field "_$C(64+XBDHCHN1) "RTN","XBDHDSP",36,0) S:$G(DIR("B"))]"" DIR("B")=XBDHX "RTN","XBDHDSP",37,0) D ^DIR "RTN","XBDHDSP",38,0) KILL DIR "RTN","XBDHDSP",39,0) S XBDHX=Y "RTN","XBDHDSP",40,0) I XBDHX="" S XBDHCHN1=XBDHTH-1 Q "RTN","XBDHDSP",41,0) I XBDHX?1"^"1U,$E(XBDHX,2)']$C(64+XBDHTH),($A(XBDHX)-64)'=XBDHTH S XBDHCHN1=$A($E(XBDHX,2))-64 G MAN "RTN","XBDHDSP",42,0) I XBDHX'=+XBDHX W *7,*7,*13,$J("",IOM),*13 G SP "RTN","XBDHDSP",43,0) I (XBDHX-$P(^TMP("XBDH",$J,"HEADER",XBDHCHN1),V,8))>XBDHNSL W *7,*7,*13,$J("",IOM),*13 G SP "RTN","XBDHDSP",44,0) S XBDHY=$P(^TMP("XBDH",$J,"HEADER",XBDHCHN1),V,8),$P(^TMP("XBDH",$J,"HEADER",XBDHCHN1),V,8)=XBDHX,XBDHNSL=XBDHNSL-XBDHX+XBDHY "RTN","XBDHDSP",45,0) D ^XBDHD1 "RTN","XBDHDSP",46,0) Q "RTN","XBDHDSP",47,0) ; "RTN","XBDHDSP",48,0) AUTO ; "RTN","XBDHDSP",49,0) S XBDHNSL=(XBDHTHLW-XBDHCHLW),XBDHY=XBDHNSL\(XBDHTH-1),XBDHZ=XBDHNSL-(XBDHY*(XBDHTH-1)),XBDHCHN1="" "RTN","XBDHDSP",50,0) F XBDHI=1:1 S XBDHCHN1=$O(^TMP("XBDH",$J,"HEADER",XBDHCHN1)) Q:XBDHCHN1=XBDHTH!(XBDHCHN1="") S XBDHX=XBDHY S:XBDHI'>XBDHZ XBDHX=XBDHX+1 S $P(^TMP("XBDH",$J,"HEADER",XBDHCHN1),V,8)=XBDHX "RTN","XBDHDSP",51,0) S XBDHNSL=0 "RTN","XBDHDSP",52,0) D ^XBDHD1 "RTN","XBDHDSP",53,0) G EXIT "RTN","XBDHDSP",54,0) ; "RTN","XBDHDSP",55,0) REP ; "RTN","XBDHDSP",56,0) W ! "RTN","XBDHDSP",57,0) S XBDHNSL=(XBDHTHLW-XBDHCHLW),XBDHREP=XBDHNSL\(XBDHTH-1),XBDHCHN1="" "RTN","XBDHDSP",58,0) EREP ; "RTN","XBDHDSP",59,0) S DIR(0)="NO^0:"_XBDHREP_":",DIR("A")="How many spaces between each header field",DIR("B")=XBDHREP "RTN","XBDHDSP",60,0) D ^DIR "RTN","XBDHDSP",61,0) KILL DIR "RTN","XBDHDSP",62,0) S XBDHX=Y "RTN","XBDHDSP",63,0) I XBDHX'=+XBDHX W *7,*7,*13,$J("",IOM),*13 G EREP "RTN","XBDHDSP",64,0) I XBDHX>XBDHREP W *7,*7,*13,$J("",IOM),*13 G EREP "RTN","XBDHDSP",65,0) I XBDHX="" S XBDHX=0 "RTN","XBDHDSP",66,0) F XBDHI=1:1 S XBDHCHN1=$O(^TMP("XBDH",$J,"HEADER",XBDHCHN1)) Q:XBDHCHN1=XBDHTH!(XBDHCHN1="") S:XBDHCHN1'["." $P(^TMP("XBDH",$J,"HEADER",XBDHCHN1),V,8)=XBDHX,XBDHNSL=XBDHNSL-XBDHX "RTN","XBDHDSP",67,0) D ^XBDHD1 "RTN","XBDHDSP",68,0) G EXIT "RTN","XBDHDSP",69,0) ; "RTN","XBDHDSP",70,0) NOTES ; "RTN","XBDHDSP",71,0) ; PUTS SPACES BETWEEN FIELDS ON THE HEADER LINE "RTN","XBDHDSP",72,0) ; INPUT = XBDHCHLW,XBDHTHLW,XBDHCHN "RTN","XBDHDSP",73,0) ; OUTPUT = 8TH PIECE OF ^TMP("XBDH",$J,"HEADER",XBDHCHN) "RTN","XBDHDSP",74,0) ; IGNORES PURE MUMPS EXPRESSION AS DESIGNATED BY DECIMAL XBDHCHN "RTN","XBDHDSV") 0^33^B14403878 "RTN","XBDHDSV",1,0) XBDHDSV ; IHS/ADC/GTH - COMPILES HEADER INFO FOR AUTO ENTRY INTO DIP ; [ 02/07/97 3:02 PM ] "RTN","XBDHDSV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHDSV",3,0) ; "RTN","XBDHDSV",4,0) I '$D(^TMP("XBDH",$J,"HEADER")) Q "RTN","XBDHDSV",5,0) NEW ; "RTN","XBDHDSV",6,0) NEW XBDHC,XBDHHDX,DIRPIPE,XBDHI,XBDHLJ,XBDHLPTH,XBDHMORE,XBDHN,XBDHNN,XBDHL,XBDHPDFN,XBDHRJ,XBDHSTG,XBDHTPTH,XBDHWW,XBDHX,XBDHY,I,J,L,P,X,Y,BY,DALL,DIC,DIJ,DP,DPP,FR,IOP,IOX,IOY,TO,XBDHCHLW,XBDHPDNA,% "RTN","XBDHDSV",7,0) INIT ; "RTN","XBDHDSV",8,0) S ^TMP("XBDH",$J,"HELPR",0)="]",^(99)="",X=^TMP("XBDH",$J,"HEADER"),XBDHCHLW=1,XBDHPDFN=$P(X,U),XBDHPDNA=$P(X,U,2),XBDHTHLW=$P(X,U,3),V="|" "RTN","XBDHDSV",9,0) KILL X "RTN","XBDHDSV",10,0) S XBDHLPTH="",(XBDHN,XBDHI)=0 "RTN","XBDHDSV",11,0) INCN ; "RTN","XBDHDSV",12,0) S XBDHN=XBDHN+1 "RTN","XBDHDSV",13,0) G:'$D(^TMP("XBDH",$J,"HEADER",XBDHN)) CLOSE S XBDHX=^(XBDHN) "RTN","XBDHDSV",14,0) D MUMPS,PRELIM "RTN","XBDHDSV",15,0) S XBDHLPTH=XBDHTPTH "RTN","XBDHDSV",16,0) D NORMAL "RTN","XBDHDSV",17,0) G INCN "RTN","XBDHDSV",18,0) ; "RTN","XBDHDSV",19,0) CLOSE ; "RTN","XBDHDSV",20,0) I XBDHTPTH]"" S X=$L(XBDHTPTH,";")-1,Y="" F X=1:1:X D SET "RTN","XBDHDSV",21,0) D STD "RTN","XBDHDSV",22,0) S DIR(0)="YO",DIR("A")="Want to make any more changes",DIR("B")="NO" "RTN","XBDHDSV",23,0) D ^DIR "RTN","XBDHDSV",24,0) KILL DIR "RTN","XBDHDSV",25,0) I Y=1 G EXIT "RTN","XBDHDSV",26,0) I Y=U S XBDHQUIT="" Q "RTN","XBDHDSV",27,0) KILL ^TMP("XBDH",$J,"SAVE") "RTN","XBDHDSV",28,0) EXIT ; "RTN","XBDHDSV",29,0) Q "RTN","XBDHDSV",30,0) ; "RTN","XBDHDSV",31,0) SET ; "RTN","XBDHDSV",32,0) S XBDHI=XBDHI+1,^TMP("XBDH",$J,"HELPR",XBDHI)=Y "RTN","XBDHDSV",33,0) Q "RTN","XBDHDSV",34,0) ; "RTN","XBDHDSV",35,0) MUMPS ; "RTN","XBDHDSV",36,0) S XBDHJ="" "RTN","XBDHDSV",37,0) F L=0:0 S XBDHJ=$O(^TMP("XBDH",$J,"HEADER",XBDHN,XBDHJ)) Q:XBDHJ="" S XBDHI=XBDHI+1,^TMP("XBDH",$J,"HELPR",XBDHI)=^TMP("XBDH",$J,"HEADER",XBDHN,XBDHJ) "RTN","XBDHDSV",38,0) KILL XBDHJ "RTN","XBDHDSV",39,0) Q "RTN","XBDHDSV",40,0) ; "RTN","XBDHDSV",41,0) PRELIM ; "RTN","XBDHDSV",42,0) S X=$P(^TMP("XBDH",$J,"HEADER",XBDHN),V),XBDHTPTH=$P(X,"~",4) "RTN","XBDHDSV",43,0) I XBDHLPTH=XBDHTPTH Q "RTN","XBDHDSV",44,0) I $E(XBDHTPTH,1,$L(XBDHLPTH))=XBDHLPTH D DOWN Q "RTN","XBDHDSV",45,0) I $E(XBDHLPTH,1,$L(XBDHTPTH))=XBDHTPTH D UP Q "RTN","XBDHDSV",46,0) D PATH "RTN","XBDHDSV",47,0) Q "RTN","XBDHDSV",48,0) ; "RTN","XBDHDSV",49,0) DOWN ; "RTN","XBDHDSV",50,0) S X=$L(XBDHLPTH,";") "RTN","XBDHDSV",51,0) F I=X:1 S Y=$P(XBDHTPTH,";",I) Q:Y="" D SET "RTN","XBDHDSV",52,0) Q "RTN","XBDHDSV",53,0) ; "RTN","XBDHDSV",54,0) UP ; "RTN","XBDHDSV",55,0) S X=$L(XBDHTPTH,";"),Y=$L(XBDHLPTH,";"),X=Y-X,Y="" "RTN","XBDHDSV",56,0) F I=1:1:X D SET "RTN","XBDHDSV",57,0) Q "RTN","XBDHDSV",58,0) ; "RTN","XBDHDSV",59,0) PATH ; "RTN","XBDHDSV",60,0) F I=1:1 I $P(XBDHLPTH,";",I)="" S A=I-1 Q "RTN","XBDHDSV",61,0) F I=1:1 I $P(XBDHTPTH,";",I)="" S B=I-1 Q "RTN","XBDHDSV",62,0) F I=1:1:A Q:$P(XBDHLPTH,";",1,I)'=$P(XBDHTPTH,";",1,I) "RTN","XBDHDSV",63,0) S C=I-1,N=A-C,Y="" "RTN","XBDHDSV",64,0) F I=1:1:N D SET "RTN","XBDHDSV",65,0) S C=C+1 "RTN","XBDHDSV",66,0) F I=C:1:B S Y=$P(XBDHTPTH,";",I) D SET "RTN","XBDHDSV",67,0) KILL A,B,C,I,N "RTN","XBDHDSV",68,0) Q "RTN","XBDHDSV",69,0) ; "RTN","XBDHDSV",70,0) NORMAL ; "RTN","XBDHDSV",71,0) S XBDHC=XBDHCHLW,XBDHNN=$J("",$P(XBDHX,V,5))_$P(XBDHX,V,3),XBDHLJ=$P(XBDHX,V,4),XBDHRJ=$P(XBDHX,V,6),XBDHWW=$P(XBDHX,V,7),XBDHCHLW=XBDHCHLW+$P(XBDHX,V,4)+$P(XBDHX,V,8) "RTN","XBDHDSV",72,0) S XBDHSTG=$P($P(XBDHX,V),"~",2) "RTN","XBDHDSV",73,0) I XBDHNN'=$P(XBDHX,V,2) S XBDHSTG=XBDHSTG_";"""_XBDHNN_"""" "RTN","XBDHDSV",74,0) S XBDHSTG=XBDHSTG_";C"_XBDHC "RTN","XBDHDSV",75,0) I XBDHLJ S XBDHSTG=XBDHSTG_$S(XBDHWW="+":";W",1:";L")_XBDHLJ "RTN","XBDHDSV",76,0) I XBDHRJ="+" S XBDHSTG=XBDHSTG_";R"_$P(XBDHX,V,4) "RTN","XBDHDSV",77,0) S XBDHI=XBDHI+1,^TMP("XBDH",$J,"HELPR",XBDHI)=XBDHSTG "RTN","XBDHDSV",78,0) Q "RTN","XBDHDSV",79,0) ; "RTN","XBDHDSV",80,0) STD ; "RTN","XBDHDSV",81,0) W !!,"I AM ABOUT TO PRINT A SAMPLE REPORT.",! "RTN","XBDHDSV",82,0) S DIR(0)="YO",DIR("A")="For this demo, do you want the 'standard' print options",DIR("B")="YES",DIR("?")="Standard options: SORT BY '@NUMBER', DEVICE = 'HOME'" "RTN","XBDHDSV",83,0) D ^DIR "RTN","XBDHDSV",84,0) KILL DIR "RTN","XBDHDSV",85,0) I Y=U S XBDHQUIT="" Q "RTN","XBDHDSV",86,0) W !!,"HMMM, LET ME THINK ABOUT THIS...",!! "RTN","XBDHDSV",87,0) I Y=1 S BY="NUMBER;@",FR="",TO="",IOP=$I,DUZ(0)="@" "RTN","XBDHDSV",88,0) DIP ; "RTN","XBDHDSV",89,0) S DIC=^DIC(XBDHPDFN,0,"GL") "RTN","XBDHDSV",90,0) S DIRPIPE="D ^XBDHDIP",L="]" "RTN","XBDHDSV",91,0) KILL XBDHHDX "RTN","XBDHDSV",92,0) D EN1^DIP "RTN","XBDHDSV",93,0) Q "RTN","XBDHDSV",94,0) ; "RTN","XBDHDSV",95,0) NOTES ; "RTN","XBDHDSV",96,0) ; CONVERTS THE INFO FROM THE "HEADER" GLOBAL INTO FM SYNATX FOR THE "HELPR" GLOBAL "RTN","XBDHDSV",97,0) ; INPUT = ^TMP("XBDH",$J,"HEADER",XBDHCHN) "RTN","XBDHDSV",98,0) ; OUTPUT = ^TMP("XBDH",$J,"HELPR",N) "RTN","XBDHDSV",99,0) ; ";L" IS SUPERCEEDED BY ";W" IF WORDWRAP IS IN EFFECT "RTN","XBDHDSV",100,0) ; EN1^DIP LEAVES SOME LOCALS HANGING AROUND WHICH ARE KILLED IN DIP+2 "RTN","XBDHDSV",101,0) ; "RTN","XBDHNTEG") 0^34^B2677678 "RTN","XBDHNTEG",1,0) XBDHNTEG ;INTEGRITY CHECKER;JUN 12, 1991 "RTN","XBDHNTEG",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDHNTEG",3,0) ; "RTN","XBDHNTEG",4,0) START ; "RTN","XBDHNTEG",5,0) NEW BYTE,COUNT,RTN "RTN","XBDHNTEG",6,0) K ^UTILITY($J) "RTN","XBDHNTEG",7,0) F I=1:1 S X=$T(LIST+I) Q:X="" S X=$P(X,";;",2),R=$P(X,"^",1),B=$P(X,"^",2),C=$P(X,"^",3),^UTILITY($J,R)=B_"^"_C "RTN","XBDHNTEG",8,0) F I=1:1:6 S X=$P($T(@("LINE"_I)),";;",2,99),@("XBINTEG("_I_")=X") "RTN","XBDHNTEG",9,0) X XBINTEG(1) "RTN","XBDHNTEG",10,0) Q "RTN","XBDHNTEG",11,0) ; "RTN","XBDHNTEG",12,0) LINE1 ;;X XBINTEG(2),XBINTEG(6) "RTN","XBDHNTEG",13,0) LINE2 ;;S RTN="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBINTEG(4),XBINTEG(3),XBINTEG(5) "RTN","XBDHNTEG",14,0) LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBINTEG(4) "RTN","XBDHNTEG",15,0) LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y) "RTN","XBDHNTEG",16,0) LINE5 ;;S B=$P(^(RTN),"^",1),C=$P(^(RTN),"^",2) I B'=BYTE!(C'=COUNT) W " has been modified" "RTN","XBDHNTEG",17,0) LINE6 ;;K XBINTEG,B,C,I,J,R,X,Y "RTN","XBDHNTEG",18,0) ; "RTN","XBDHNTEG",19,0) LIST ; "RTN","XBDHNTEG",20,0) ;;XBDH^1015^66897 "RTN","XBDHNTEG",21,0) ;;XBDHD^3059^203397 "RTN","XBDHNTEG",22,0) ;;XBDHD1^1477^95266 "RTN","XBDHNTEG",23,0) ;;XBDHD2^4434^278456 "RTN","XBDHNTEG",24,0) ;;XBDHDF^3469^221710 "RTN","XBDHNTEG",25,0) ;;XBDHDF1^991^59705 "RTN","XBDHNTEG",26,0) ;;XBDHDIP^550^35291 "RTN","XBDHNTEG",27,0) ;;XBDHDSP^2728^178325 "RTN","XBDHNTEG",28,0) ;;XBDHDSV^2938^188450 "RTN","XBDICV") 0^35^B10779618 "RTN","XBDICV",1,0) XBDICV ; IHS/ADC/GTH - SET DICTIONARY VERSION NUMBERS ; [ 02/07/97 3:02 PM ] "RTN","XBDICV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDICV",3,0) ; "RTN","XBDICV",4,0) ; This routine sets FileMan dictionary version numbers. "RTN","XBDICV",5,0) ; "RTN","XBDICV",6,0) START ; "RTN","XBDICV",7,0) I $G(DUZ(0))'="@" W !,*7," Insufficient FileMan access. DUZ(0) is not ""@""." Q "RTN","XBDICV",8,0) S U="^",IOP=$I "RTN","XBDICV",9,0) D ^%ZIS "RTN","XBDICV",10,0) W !!,"^XBDICV - This program sets FileMan dictionary version numbers." "RTN","XBDICV",11,0) ; "RTN","XBDICV",12,0) S (XBDICVHI,XBDICVQF)=0 "RTN","XBDICV",13,0) D GETDICS ; Get set of dictionaries "RTN","XBDICV",14,0) I XBDICVQF D EOJ Q "RTN","XBDICV",15,0) D SHOW ; Show current versions "RTN","XBDICV",16,0) D ASK ; See if user wants control "RTN","XBDICV",17,0) I XBDICVQF D EOJ Q "RTN","XBDICV",18,0) D VER ; Get new version number "RTN","XBDICV",19,0) I XBDICVQF D EOJ Q "RTN","XBDICV",20,0) D CHANGE ; Change version numbers "RTN","XBDICV",21,0) D EOJ ; Clean up "RTN","XBDICV",22,0) Q "RTN","XBDICV",23,0) ; "RTN","XBDICV",24,0) GETDICS ; GET SET OF DICTIONARIES "RTN","XBDICV",25,0) D ^XBDSET "RTN","XBDICV",26,0) S:'$D(^UTILITY("XBDSET",$J)) XBDICVQF=1 "RTN","XBDICV",27,0) Q "RTN","XBDICV",28,0) ; "RTN","XBDICV",29,0) SHOW ; SHOW CURRENT VERSION NUMBERS "RTN","XBDICV",30,0) W ! "RTN","XBDICV",31,0) S XBDICVFL="" "RTN","XBDICV",32,0) F XBDICVL=0:0 S XBDICVFL=$O(^UTILITY("XBDSET",$J,XBDICVFL)) Q:XBDICVFL="" W !,$P(^DIC(XBDICVFL,0),U,1),$S($D(^DD(XBDICVFL,0,"VR")):"..Current version is "_^("VR"),1:"..No version") D HIGH "RTN","XBDICV",33,0) Q "RTN","XBDICV",34,0) ; "RTN","XBDICV",35,0) HIGH ; SAVE HIGH VERSION NUMBER "RTN","XBDICV",36,0) I $D(^DD(XBDICVFL,0,"VR")),+^("VR")>+XBDICVHI S XBDICVHI=^("VR") "RTN","XBDICV",37,0) Q "RTN","XBDICV",38,0) ; "RTN","XBDICV",39,0) ASK ; "RTN","XBDICV",40,0) W !!,"Do you want to be asked before setting each file? (Y/N) Y// " "RTN","XBDICV",41,0) R XBDICASK:$G(DTIME,300) "RTN","XBDICV",42,0) S:XBDICASK="" XBDICASK="Y" "RTN","XBDICV",43,0) I "^YyNn"'[XBDICASK W *7 G ASK "RTN","XBDICV",44,0) I XBDICASK["^" S XBDICVQF=1 Q "RTN","XBDICV",45,0) S XBDICASK=$S("Yy"[$E(XBDICASK):1,1:0) "RTN","XBDICV",46,0) Q "RTN","XBDICV",47,0) ; "RTN","XBDICV",48,0) VER ; "RTN","XBDICV",49,0) R !!,"New version number: ",XBDICVVR:$G(DTIME,300) "RTN","XBDICV",50,0) I XBDICVVR["^" S XBDICVQF=1 Q "RTN","XBDICV",51,0) I XBDICVVR'?1.3N.1".".2N.1A.2N W *7 G VER "RTN","XBDICV",52,0) I +XBDICVVR<+XBDICVHI W !,"One or more selected files already has a version number greater than ",XBDICVVR,*7 G VER "RTN","XBDICV",53,0) Q "RTN","XBDICV",54,0) ; "RTN","XBDICV",55,0) CHANGE ; CHANGE VERSION NUMBERS "RTN","XBDICV",56,0) W ! "RTN","XBDICV",57,0) S XBDICVFL="" "RTN","XBDICV",58,0) F XBDICVL=0:0 S XBDICVFL=$O(^UTILITY("XBDSET",$J,XBDICVFL)) Q:XBDICVFL="" D PROCESS "RTN","XBDICV",59,0) Q "RTN","XBDICV",60,0) ; "RTN","XBDICV",61,0) PROCESS ; "RTN","XBDICV",62,0) S XBDICANS="Y" "RTN","XBDICV",63,0) W !,$P(^DIC(XBDICVFL,0),U,1),$S($D(^DD(XBDICVFL,0,"VR")):"..Current version is "_^("VR"),1:"..No version"),$S(XBDICASK:"..OK? Y// ",1:"") "RTN","XBDICV",64,0) P2 ; "RTN","XBDICV",65,0) I XBDICASK R XBDICANS:$G(DTIME,300) S:XBDICANS="" XBDICANS="Y" I "YyNn"'[$E(XBDICANS) D P2ERR G P2 "RTN","XBDICV",66,0) I XBDICANS="Y" S ^DD(XBDICVFL,0,"VR")=XBDICVVR W " Changed to ",XBDICVVR "RTN","XBDICV",67,0) Q "RTN","XBDICV",68,0) ; "RTN","XBDICV",69,0) P2ERR ; "RTN","XBDICV",70,0) W *7 "RTN","XBDICV",71,0) F XBDICVI=1:1:$L(XBDICANS) W @IOBS," ",@IOBS "RTN","XBDICV",72,0) Q "RTN","XBDICV",73,0) ; "RTN","XBDICV",74,0) EOJ ; "RTN","XBDICV",75,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBDICV",76,0) KILL XBDICANS,XBDICASK,XBDICVFL,XBDICVHI,XBDICVI,XBDICVL,XBDICVQF,XBDICVVR "RTN","XBDICV",77,0) KILL BS,FF,RM,SL,SUB,XY "RTN","XBDICV",78,0) Q "RTN","XBDICV",79,0) ; "RTN","XBDIE") 0^36^B4579351 "RTN","XBDIE",1,0) XBDIE(XBRET) ; IHS/ADC/GTH - NESTING OF DIE ; [ 02/07/97 3:02 PM ] "RTN","XBDIE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDIE",3,0) ; "RTN","XBDIE",4,0) ; Thanks to Paul Wesley, DSD, for providing the original "RTN","XBDIE",5,0) ; routine. "RTN","XBDIE",6,0) ; "RTN","XBDIE",7,0) ; PROGRAMMERS NOTE: PLEASE USE THE MORE GENERIC ^XBNEW. "RTN","XBDIE",8,0) ; "RTN","XBDIE",9,0) ; XBRET has the form "TAG^ROUTINE:VAR,NSVAR*" "RTN","XBDIE",10,0) ; This allows for the nesting of die calls by "RTN","XBDIE",11,0) ; "RTN","XBDIE",12,0) ; 1. Building and executing an exclusive new from preselected "RTN","XBDIE",13,0) ; kernel variables and any local variables &/or name "RTN","XBDIE",14,0) ; spaces identified by the calling parameter. "RTN","XBDIE",15,0) ; 2. After executing the new (....) XBDIE performs a DO call "RTN","XBDIE",16,0) ; to the program entry point identified by the calling "RTN","XBDIE",17,0) ; parameter. The entry point passed should build the "RTN","XBDIE",18,0) ; variables and execute the DIE call to be nested. "RTN","XBDIE",19,0) ; 3. As XBDIE quits to return to the calling program it pops "RTN","XBDIE",20,0) ; the variable stack. "RTN","XBDIE",21,0) ; "RTN","XBDIE",22,0) ; The passing parameter is built by "tag^routine:var;vns*" "RTN","XBDIE",23,0) ; "RTN","XBDIE",24,0) ; The die call to be nested is structured with a tag entry "RTN","XBDIE",25,0) ; and a Quit. "RTN","XBDIE",26,0) ; "RTN","XBDIE",27,0) ; The call is made with DO ^XBDIE("TAG^ROUTINE:AGSITE,ABM*") "RTN","XBDIE",28,0) ; where the variable AGSITE and the namespace ABM is "RTN","XBDIE",29,0) ; included in the exclusive new for illustration. "RTN","XBDIE",30,0) ; "RTN","XBDIE",31,0) ; Proper logic flow after the XBDIE call usually needs some "RTN","XBDIE",32,0) ; attention. "RTN","XBDIE",33,0) ; "RTN","XBDIE",34,0) ; A TEST entry point is provided in this routine for "RTN","XBDIE",35,0) ; illustration. "RTN","XBDIE",36,0) ; "RTN","XBDIE",37,0) S ; "RTN","XBDIE",38,0) I XBRET'[":" S XBRET=XBRET_":" "RTN","XBDIE",39,0) S XBN="XBRET" "RTN","XBDIE",40,0) S XBKVAR=$P($T(XBKVAR),";;",2) "RTN","XBDIE",41,0) S XBNS=$P(XBRET,":",2) "RTN","XBDIE",42,0) I XBNS="" G RETURN "RTN","XBDIE",43,0) F XBI=1:1 S (XB,XBY)=$P(XBNS,";",XBI) Q:XB="" D "RTN","XBDIE",44,0) .I XB'["*" S XBN=XBN_","_XB Q "RTN","XBDIE",45,0) .S (XB,XBY)=$P(XB,"*") "RTN","XBDIE",46,0) .S XBN=XBN_","_XB,XBL=$L(XB) "RTN","XBDIE",47,0) .F S XBY=$O(@XBY) Q:((XBY="")!(XB'=$E(XBY,1,XBL))) S XBN=XBN_","_XBY "RTN","XBDIE",48,0) .Q "RTN","XBDIE",49,0) RETURN ; "RTN","XBDIE",50,0) S XBN="("_XBN_","_XBKVAR_")" "RTN","XBDIE",51,0) S $P(XBRET,":",2)=XBN "RTN","XBDIE",52,0) KILL XBNS,XBN,XB,XBY,XBL,XBKVAR "RTN","XBDIE",53,0) NEW @($P(XBRET,":",2)) "RTN","XBDIE",54,0) D @($P(XBRET,":",1)) "RTN","XBDIE",55,0) Q "RTN","XBDIE",56,0) ; "RTN","XBDIE",57,0) END ;-------------------------------------------------------------- "RTN","XBDIE",58,0) XBKVAR ;;DUZ,DTIME,DT,DISYS,IO,IOF,IOBS,IOM,ION,IOSL,IOST,IOT,IOS,IOXY,U,XRTL,ZTSTOP,ZTQUEUED,ZTREQ "RTN","XBDIE",59,0) ;-------------------------------------------------------------- "RTN","XBDIE",60,0) Q "RTN","XBDIE",61,0) ; "RTN","XBDIE",62,0) TEST ; "RTN","XBDIE",63,0) D ^XBDIE("T2^XBDIE:AG;PW") "RTN","XBDIE",64,0) Q "RTN","XBDIE",65,0) ; "RTN","XBDIE",66,0) T2 ; "RTN","XBDIE",67,0) W !,"GOT TO T2",! "RTN","XBDIE",68,0) W !,"Here is where the die call would be structured and called",!,"Following is a list of variables that were within the exclusive new",! "RTN","XBDIE",69,0) D ^XBVL "RTN","XBDIE",70,0) Q "RTN","XBDIE",71,0) ; "RTN","XBDIFF") 0^37^B1819252 "RTN","XBDIFF",1,0) XBDIFF ; IHS/ADC/GTH - RETURN DIFFERENCE BETWEEN TWO DATE/TIMES ; [ 02/07/97 3:02 PM ] "RTN","XBDIFF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDIFF",3,0) ; "RTN","XBDIFF",4,0) ; Passed two date/times this routine returns the difference "RTN","XBDIFF",5,0) ; in days, hours, minutes, seconds separated by colons ":". "RTN","XBDIFF",6,0) ; "RTN","XBDIFF",7,0) ; The date/times must be passed in the variables X and X1. "RTN","XBDIFF",8,0) ; The result will be returned in X. X1 will be killed. "RTN","XBDIFF",9,0) ; "RTN","XBDIFF",10,0) ; If either X or X1 are invalid X will be returned as -1 and "RTN","XBDIFF",11,0) ; X1 will be killed. "RTN","XBDIFF",12,0) ; "RTN","XBDIFF",13,0) ; The date/times may be passed in $HOROLOG format or in "RTN","XBDIFF",14,0) ; internal FileMan format. "RTN","XBDIFF",15,0) ; "RTN","XBDIFF",16,0) ; See also, $$FMDIFF^XLFDT, and $$HDIFF^XLFDT. "RTN","XBDIFF",17,0) ; "RTN","XBDIFF",18,0) START ; "RTN","XBDIFF",19,0) NEW A,B,C,D,E,F,G "RTN","XBDIFF",20,0) D EDIT "RTN","XBDIFF",21,0) Q:X<0 "RTN","XBDIFF",22,0) S:X>X1 A=X,X=X1,X1=A "RTN","XBDIFF",23,0) I X?5N1","5N S A=$P(X,",",1),B=$P(X,",",2) I 1 "RTN","XBDIFF",24,0) E D H^%DTC S A=%H,B=%T "RTN","XBDIFF",25,0) I X1?5N1","5N S C=$P(X1,",",1),D=$P(X1,",",2) I 1 "RTN","XBDIFF",26,0) E S X=X1 D H^%DTC S C=%H,D=%T "RTN","XBDIFF",27,0) S E=C-A S:D86399 S X=-1 KILL X1 "RTN","XBDIFF",39,0) . Q "RTN","XBDIFF",40,0) S A=$P(X,".",2) "RTN","XBDIFF",41,0) I +$E(A,1,2)<24,+$E(A,3,4)<60,+$E(A,5,6)<60 Q "RTN","XBDIFF",42,0) E S X=-1 KILL X1 "RTN","XBDIFF",43,0) KILL A "RTN","XBDIFF",44,0) Q "RTN","XBDIFF",45,0) ; "RTN","XBDIFF",46,0) EDITX ; EDIT X "RTN","XBDIFF",47,0) Q:X?5N1"."5N "RTN","XBDIFF",48,0) Q:X?7N "RTN","XBDIFF",49,0) Q:X?7N1"."1.6N "RTN","XBDIFF",50,0) S X=-1 "RTN","XBDIFF",51,0) KILL X1 "RTN","XBDIFF",52,0) Q "RTN","XBDIFF",53,0) ; "RTN","XBDIFF",54,0) EDITX1 ; EDIT X1 "RTN","XBDIFF",55,0) Q:X?5N1"."5N "RTN","XBDIFF",56,0) Q:X?7N "RTN","XBDIFF",57,0) Q:X?7N1"."1.6N "RTN","XBDIFF",58,0) S X=-1 "RTN","XBDIFF",59,0) KILL X1 "RTN","XBDIFF",60,0) Q "RTN","XBDIFF",61,0) ; "RTN","XBDINUM") 0^38^B7807636 "RTN","XBDINUM",1,0) XBDINUM ; IHS/ADC/GTH - CONVERTS NON-DINUM FILE TO DINUM FILE ; [ 02/07/97 3:02 PM ] "RTN","XBDINUM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDINUM",3,0) ; "RTN","XBDINUM",4,0) START ; "RTN","XBDINUM",5,0) S U="^" "RTN","XBDINUM",6,0) W !!,"This program sets the DFNs of a DINUM file appropriately.",! "RTN","XBDINUM",7,0) S DIC="^DIC(",DIC(0)="QAZEM" "RTN","XBDINUM",8,0) D ^DIC "RTN","XBDINUM",9,0) Q:Y<0 "RTN","XBDINUM",10,0) S DIC=+Y "RTN","XBDINUM",11,0) I '$D(^DIC(DIC,0,"GL")) W !!,"Corrupted ^DIC!",!,"No ""GL"" node in zeroth node of file ",DIC,"." Q "RTN","XBDINUM",12,0) S XBDIGBL=^DIC(DIC,0,"GL") "RTN","XBDINUM",13,0) X "S XBDIX=$D("_XBDIGBL_"0))" "RTN","XBDINUM",14,0) I 'XBDIX W !!,XBDIGBL,"0) does not exist." Q "RTN","XBDINUM",15,0) I '$P(@(XBDIGBL_"0)"),U,4) W !!,"File ",DIC," has no entries." Q "RTN","XBDINUM",16,0) I '$D(^DD(DIC,.01,0)) W !!,"Corrupted ^DD!" Q "RTN","XBDINUM",17,0) I ^DD(DIC,.01,0)'["DINUM=X" W !!,"File ",DIC," is not a DINUM file." Q "RTN","XBDINUM",18,0) KILL ^UTILITY("XBDINUM",$J),^UTILITY("XBDIDUP",$J) "RTN","XBDINUM",19,0) S (XBDI3,XBDI4,XBDIDFN)=0 "RTN","XBDINUM",20,0) X "S ^UTILITY(""XBDINUM"",$J,0)="_XBDIGBL_"0)" "RTN","XBDINUM",21,0) F XBDIL=0:0 X "S XBDIDFN=$O("_XBDIGBL_XBDIDFN_"))" Q:XBDIDFN'=+XBDIDFN D X1 "RTN","XBDINUM",22,0) S XBDIX=^UTILITY("XBDINUM",$J,0),$P(XBDIX,U,3)=XBDI3,$P(XBDIX,U,4)=XBDI4,^(0)=XBDIX "RTN","XBDINUM",23,0) W !!,"Global ",$E(XBDIGBL,1,$L(XBDIGBL)-1)," now renumbered and stored in ^UTILITY(""XBDINUM"",",$J,!," High DFN=",XBDI3," Number of entries=",XBDI4 "RTN","XBDINUM",24,0) I $D(^UTILITY("XBDIDUP",$J)) W !!,"Duplicate entries found. Stored in ^UTILITY(""XBDIDUP"",",$J,!," Eliminate duplicates and rerun this job!" G EOJ "RTN","XBDINUM",25,0) S XBDIX=$S($E(XBDIGBL,$L(XBDIGBL))="(":$E(XBDIGBL,1,$L(XBDIGBL)-1),1:$E(XBDIGBL,1,$L(XBDIGBL)-1)_")") "RTN","XBDINUM",26,0) KILL @(XBDIX) "RTN","XBDINUM",27,0) W !!,XBDIX," has been killed! Now being recreated." "RTN","XBDINUM",28,0) S TO=XBDIGBL,FROM="^UTILITY(""XBDINUM"",$J,",TALK=1 "RTN","XBDINUM",29,0) D ^XBGXFR "RTN","XBDINUM",30,0) W !!,"File now being RE-INDEXED!",! "RTN","XBDINUM",31,0) S DIK=XBDIGBL,XBDIX=0 "RTN","XBDINUM",32,0) F XBDIL=0:0 X "S XBDIX=$O("_XBDIGBL_XBDIX_"))" Q:XBDIX'=+XBDIX W "." S DA=XBDIX D IX1^DIK "RTN","XBDINUM",33,0) D EOJ "RTN","XBDINUM",34,0) Q "RTN","XBDINUM",35,0) ; "RTN","XBDINUM",36,0) X1 ; "RTN","XBDINUM",37,0) S FROM=XBDIGBL_XBDIDFN_"," "RTN","XBDINUM",38,0) X "S TO=+"_XBDIGBL_XBDIDFN_",0)" "RTN","XBDINUM",39,0) S:TO>XBDI3 XBDI3=TO "RTN","XBDINUM",40,0) S TO=$S('$D(^UTILITY("XBDINUM",$J,TO)):"^UTILITY(""XBDINUM"",$J,"_TO_",",1:"^UTILITY(""XBDIDUP"",$J,"_TO_",") "RTN","XBDINUM",41,0) S:TO'["XBDIDUP" XBDI4=XBDI4+1 "RTN","XBDINUM",42,0) S TALK=1 "RTN","XBDINUM",43,0) D ^XBGXFR "RTN","XBDINUM",44,0) Q "RTN","XBDINUM",45,0) ; "RTN","XBDINUM",46,0) EOJ ; "RTN","XBDINUM",47,0) KILL ^UTILITY("XBDINUM",$J),XBDIGBL,XBDIX,XBDI3,XBDI4,XBDIDFN,XBDIL "RTN","XBDINUM",48,0) Q "RTN","XBDINUM",49,0) ; "RTN","XBDIQ0") 0^39^B10954 "RTN","XBDIQ0",1,0) XBDIQ0 ; IHS/ADC/GTH - Documentation for XBDIQ1 ; [ 02/07/97 3:02 PM ] "RTN","XBDIQ0",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDIQ0",3,0) ; "RTN","XBDIQ0",4,0) ; Documentation for XBDIQ1 "RTN","XBDIQ0",5,0) ; "RTN","XBDIQ0",6,0) ; This routine provides a friendly front end to EN^DIQ1 and "RTN","XBDIQ0",7,0) ; an assortment of other features. "RTN","XBDIQ0",8,0) ; "RTN","XBDIQ0",9,0) ; 1. Data arrays are returned into 'DIQ in a variety of "RTN","XBDIQ0",10,0) ; formats controlled by the parameter set into DIQ(0). "RTN","XBDIQ0",11,0) ; The default is 'DIQ(FLDNUM)= external value of field "RTN","XBDIQ0",12,0) ; FLDNUM is the DD number of the field as used in DR. "RTN","XBDIQ0",13,0) ; "RTN","XBDIQ0",14,0) ; 2. Data retrieval is non-intrusive! Does not disturb the "RTN","XBDIQ0",15,0) ; partition. "RTN","XBDIQ0",16,0) ; "RTN","XBDIQ0",17,0) ; 3. Input Variables used are the same as for EN^DIQ1 with "RTN","XBDIQ0",18,0) ; more friendly results. "RTN","XBDIQ0",19,0) ; "RTN","XBDIQ0",20,0) ; 4. DR(filenumber and DA(filenumber arrays are "RTN","XBDIQ0",21,0) ; automatically built when needed. "RTN","XBDIQ0",22,0) ; "RTN","XBDIQ0",23,0) ; ENTRY POINTS "RTN","XBDIQ0",24,0) ; "RTN","XBDIQ0",25,0) ; ENP^XBDIQ1(DIC,DA,DR,DIQ,DIQ(0)) "RTN","XBDIQ0",26,0) ; Returns 'DIQ(FLDNUM)= data for One Entry. "RTN","XBDIQ0",27,0) ; "RTN","XBDIQ0",28,0) ; ENPM^XBDIQ1(DIC,DA,DR,DIQ,DIQ(0)) "RTN","XBDIQ0",29,0) ; Returns 'DIQ(DA,FLDNUM)= data for Multiple Entries. "RTN","XBDIQ0",30,0) ; DIC("S") can be set and used for screening entries. "RTN","XBDIQ0",31,0) ; "RTN","XBDIQ0",32,0) ; $$VAL^XBDIQ1(DIC,DA,DR) "RTN","XBDIQ0",33,0) ; Returns External value of one field. "RTN","XBDIQ0",34,0) ; "RTN","XBDIQ0",35,0) ; $$VALI^XBDIQ1(DIC,DA,DR) "RTN","XBDIQ0",36,0) ; Returns Internal value of one field. "RTN","XBDIQ0",37,0) ; "RTN","XBDIQ0",38,0) ; $$DIC^XBDIQ1(DIC) Returns constructed DIC from "RTN","XBDIQ0",39,0) ; file/subfile number. "RTN","XBDIQ0",40,0) ; "RTN","XBDIQ0",41,0) ; PARSE^XBDIQ1(DA) "RTN","XBDIQ0",42,0) ; Returns a DA array from a literal string made from "RTN","XBDIQ0",43,0) ; Variables or Numbers mixed in descending order. "RTN","XBDIQ0",44,0) ; EXMP: "1,DFN,56" => DA=56,DA(1)=34,DA(2)=1 where DFN=34 "RTN","XBDIQ0",45,0) ; also: S VAR(I)="1,DFN,56" D PARSE^XBDIQ1(VAR(I)) => as "RTN","XBDIQ0",46,0) ; above. "RTN","XBDIQ0",47,0) ; "RTN","XBDIQ0",48,0) ; EN Returns one Entry (DR) fields. "RTN","XBDIQ0",49,0) ; Needs DIC,DA,DR,DIQ,DIQ(0) as set up for "RTN","XBDIQ0",50,0) ; calls to EN^DIQ1. "RTN","XBDIQ0",51,0) ; "RTN","XBDIQ0",52,0) ; ENM Returns Multiple Entry's (DR) fields "RTN","XBDIQ0",53,0) ; 1) upper DA array ie: DA(1),DA(2), ... "RTN","XBDIQ0",54,0) ; 2) DA="" in the passing array "RTN","XBDIQ0",55,0) ; 3) optional DIC("S") "RTN","XBDIQ0",56,0) ; Needs DIC,DA,DR,DIQ,DIQ(0) as set up for "RTN","XBDIQ0",57,0) ; calls to EN^DIQ1. "RTN","XBDIQ0",58,0) ; DIQ(0)=1 by default. "RTN","XBDIQ0",59,0) ; "RTN","XBDIQ0",60,0) ; DIQ(0) Format Options. "RTN","XBDIQ0",61,0) ; "RTN","XBDIQ0",62,0) ; DIQ(0) If DIQ(0) is not present the default is "RTN","XBDIQ0",63,0) ; set to NULL. "RTN","XBDIQ0",64,0) ; "RTN","XBDIQ0",65,0) ; 0 OR NULL DIQ(FLD)= "RTN","XBDIQ0",66,0) ; 1 DIQ(DA,FLD)= "RTN","XBDIQ0",67,0) ; 2 DIQ(DA(x),..,DA,FLD)= "RTN","XBDIQ0",68,0) ; nI DIQ(... ,FLD,"I")=internal value(s) returned "RTN","XBDIQ0",69,0) ; nN NULL fields are not returned "RTN","XBDIQ0",70,0) ; "RTN","XBDIQ0",71,0) ; DA can be the array .DA or a literal string in descending "RTN","XBDIQ0",72,0) ; order. "RTN","XBDIQ0",73,0) ; "1,23,45" "RTN","XBDIQ0",74,0) ; "1,PATDFN,BLDFN" variables will be unfolded. "RTN","XBDIQ0",75,0) ; BARVDA("EOBSUB") "RTN","XBDIQ0",76,0) ; ("EOBSUB")="BAFCLDA,BARITDA,BAREDA" "RTN","XBDIQ0",77,0) ; "RTN","XBDIQ0",78,0) ; "RTN","XBDIQ0",79,0) Q "RTN","XBDIQ0",80,0) ; "RTN","XBDIQ1") 0^40^B23534230 "RTN","XBDIQ1",1,0) XBDIQ1 ; IHS/ADC/GTH - SPECIAL EN^DIQ1 DATA PULLER ; [ 02/07/97 3:02 PM ] "RTN","XBDIQ1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDIQ1",3,0) ; "RTN","XBDIQ1",4,0) ; Thanks to Paul Wesley, DSD/OIRM, for the original routine. "RTN","XBDIQ1",5,0) ; "RTN","XBDIQ1",6,0) ; Documentation for the APIs in this routine can be found "RTN","XBDIQ1",7,0) ; in routine XBDIQ0. "RTN","XBDIQ1",8,0) ; "RTN","XBDIQ1",9,0) DOC ; "RTN","XBDIQ1",10,0) Q "RTN","XBDIQ1",11,0) ; "RTN","XBDIQ1",12,0) EN ;PEP - Returns single entries "RTN","XBDIQ1",13,0) NEW XB0,XBDIC,XBFN,XBGBL,XBNEWPAR,XBGL "RTN","XBDIQ1",14,0) S XBDIC=DIC "RTN","XBDIQ1",15,0) I DA'=+DA D PARSE(DA) "RTN","XBDIQ1",16,0) D DICFNGL(DIC),^XBSFGBL(XBFN,.XBGBL) "RTN","XBDIQ1",17,0) S XBDIC=$P(XBGBL,"DA,"),DIC=XBDIC "RTN","XBDIQ1",18,0) D ENDIQ1,EXIT "RTN","XBDIQ1",19,0) Q "RTN","XBDIQ1",20,0) ; "RTN","XBDIQ1",21,0) ENP(DIC,DA,DR,DIQ,XBFMT) ;PEP - param pass into EN "RTN","XBDIQ1",22,0) S:'$D(DIQ(0)) DIQ(0)=$G(XBFMT) "RTN","XBDIQ1",23,0) D EN "RTN","XBDIQ1",24,0) Q "RTN","XBDIQ1",25,0) ; "RTN","XBDIQ1",26,0) ENPM(DIC,DA,DR,DIQ,XBFMT) ;PEP - param pass into EN "RTN","XBDIQ1",27,0) S:'$D(DIQ(0)) DIQ(0)=$G(XBFMT) "RTN","XBDIQ1",28,0) D ENM "RTN","XBDIQ1",29,0) Q "RTN","XBDIQ1",30,0) ; "RTN","XBDIQ1",31,0) ENM ;PEP - get multiple entries "RTN","XBDIQ1",32,0) NEW XB0,XBDIC,XBFN,XBGBL,XBNEWPAR,XBGL "RTN","XBDIQ1",33,0) S XBDIC=DIC "RTN","XBDIQ1",34,0) S:$G(DA)="" DA=0 "RTN","XBDIQ1",35,0) I DA'=+DA D PARSE(DA) "RTN","XBDIQ1",36,0) S:(+$G(DIQ(0))'>0) DIQ(0)=1_$G(DIQ(0)) "RTN","XBDIQ1",37,0) D DICFNGL(DIC) "RTN","XBDIQ1",38,0) S XBDIC=$P(XBGL,"DA,"),DIC=XBDIC,DA=0,DIC(0)="" "RTN","XBDIQ1",39,0) I $D(DIC("S")) S XBDICS=DIC("S") "RTN","XBDIQ1",40,0) F S DA=$O(@(XBDIC_"DA)")) Q:DA'>0 D "RTN","XBDIQ1",41,0) . S XB0=@(XBDIC_"DA,0)") "RTN","XBDIQ1",42,0) . I $L($G(XBDICS)) S DIC("S")=XBDICS "RTN","XBDIQ1",43,0) . I $D(DIC("S")) S X="`"_DA,DIC(0)="N" D ^DIC Q:Y'>0 "RTN","XBDIQ1",44,0) . S DIC=XBDIC "RTN","XBDIQ1",45,0) . D ENDIQ1 "RTN","XBDIQ1",46,0) .Q "RTN","XBDIQ1",47,0) KILL XBDICS "RTN","XBDIQ1",48,0) S DA="" "RTN","XBDIQ1",49,0) D EXIT "RTN","XBDIQ1",50,0) Q "RTN","XBDIQ1",51,0) ; "RTN","XBDIQ1",52,0) ENDIQ1 ;EP - call EN^DIQ1 "RTN","XBDIQ1",53,0) NEW XBDIQ,XBGBL0,XBGLS,XBLVL,XBUDA,XB,XB0 "RTN","XBDIQ1",54,0) S XBDIQ=DIQ,XBDIQ(0)=$G(DIQ(0)) "RTN","XBDIQ1",55,0) NEW DIQ,XBDTMP "RTN","XBDIQ1",56,0) D LEVELS "RTN","XBDIQ1",57,0) D "RTN","XBDIQ1",58,0) . NEW DIC,DR,DA "RTN","XBDIQ1",59,0) . D SETDIQ1 "RTN","XBDIQ1",60,0) . D ENDIQ1X "RTN","XBDIQ1",61,0) .Q "RTN","XBDIQ1",62,0) D PULLDIQ1 "RTN","XBDIQ1",63,0) Q:XBDIQ(0)'["I" ; Internal if XB["I" "RTN","XBDIQ1",64,0) KILL DIC "RTN","XBDIQ1",65,0) S DIC=XBDIC ;reset dic "RTN","XBDIQ1",66,0) S DIQ(0)="I" "RTN","XBDIQ1",67,0) D ENDIQ1X,PULLDIQ1 "RTN","XBDIQ1",68,0) KILL ^UTILITY("DIQ1",$J) "RTN","XBDIQ1",69,0) Q "RTN","XBDIQ1",70,0) ; "RTN","XBDIQ1",71,0) ENDIQ1X ;EP - to call DIQ1 with new "RTN","XBDIQ1",72,0) I $G(XBDIQ1(0))["N" S DIQ(0)=$G(DIQ(0))_"N" "RTN","XBDIQ1",73,0) I $G(XBFMT)["N",$G(DIQ(0))'["N" S DIQ(0)=$G(DIQ(0))_"N" "RTN","XBDIQ1",74,0) D EN^XBNEW("ENDIQ1XN^XBDIQ1","DR;DA;DIC;DIQ;XBDTMP;XBSRCFL") "RTN","XBDIQ1",75,0) Q "RTN","XBDIQ1",76,0) ; "RTN","XBDIQ1",77,0) ENDIQ1XN ;EP "RTN","XBDIQ1",78,0) S DIQ="XBDTMP(" "RTN","XBDIQ1",79,0) D EN^DIQ1 "RTN","XBDIQ1",80,0) Q "RTN","XBDIQ1",81,0) ; "RTN","XBDIQ1",82,0) EXIT ;EP "RTN","XBDIQ1",83,0) KILL XBI,XBDEST,XBNEWPAR "RTN","XBDIQ1",84,0) Q "RTN","XBDIQ1",85,0) ; "RTN","XBDIQ1",86,0) PULLDIQ1 ;EP - PULL FROM ^UTILITY("DIQ1",$J) "RTN","XBDIQ1",87,0) D %XY "RTN","XBDIQ1",88,0) S XBGLS=XBDIQ_"""ID"")" S @XBGLS=DA_":"_DIC_":"_XBUDA_":"_+XBDIQ(0) "RTN","XBDIQ1",89,0) D %XY^%RCR "RTN","XBDIQ1",90,0) Q "RTN","XBDIQ1",91,0) ; "RTN","XBDIQ1",92,0) %XY ;EP - set %X & %Y to format "RTN","XBDIQ1",93,0) KILL %X,%Y "RTN","XBDIQ1",94,0) S XBUDA="" "RTN","XBDIQ1",95,0) 0 I +XBDIQ(0)=0 D Q "RTN","XBDIQ1",96,0) . S %X="XBDTMP("_XBFN_","_DA_",",%Y=XBDIQ "RTN","XBDIQ1",97,0) .Q "RTN","XBDIQ1",98,0) 1 I +XBDIQ(0)=1 D Q "RTN","XBDIQ1",99,0) . S %X="XBDTMP("_XBFN_",",%Y=XBDIQ,XBUDA=DA_"," "RTN","XBDIQ1",100,0) .Q "RTN","XBDIQ1",101,0) 2 I +XBDIQ(0)=2 D Q "RTN","XBDIQ1",102,0) . S %X="XBDTMP("_XBFN_"," "RTN","XBDIQ1",103,0) . D ;build da(x),..,da subscripts "RTN","XBDIQ1",104,0) .. S %Y="" "RTN","XBDIQ1",105,0) .. F %=1:1 Q:'$G(DA(%)) S %Y=DA(%)_","_%Y "RTN","XBDIQ1",106,0) ..Q "RTN","XBDIQ1",107,0) . S XBUDA=%Y_DA_"," "RTN","XBDIQ1",108,0) . S %Y=XBDIQ_%Y "RTN","XBDIQ1",109,0) .Q "RTN","XBDIQ1",110,0) %XYE Q "RTN","XBDIQ1",111,0) ;-- "RTN","XBDIQ1",112,0) DICFNGL(X) ;EP - set XBFN & XBGL0 return 1 error "RTN","XBDIQ1",113,0) NEW Y "RTN","XBDIQ1",114,0) KILL XBGL,XBFN "RTN","XBDIQ1",115,0) I X S XBFN=X D ^XBSFGBL(XBFN,.XBGL) Q "RTN","XBDIQ1",116,0) I 'X S Y=X_"0)" S XBFN=+$P(@Y,U,2),Y=0 D ^XBSFGBL(XBFN,.XBGL) "RTN","XBDIQ1",117,0) Q "RTN","XBDIQ1",118,0) ; "RTN","XBDIQ1",119,0) DICFNGLX ; "RTN","XBDIQ1",120,0) Q "RTN","XBDIQ1",121,0) ; "RTN","XBDIQ1",122,0) VAL(DIC,DA,DR) ;PEP - extrinsic pull a value for a field "RTN","XBDIQ1",123,0) NEW DIQ,XBT "RTN","XBDIQ1",124,0) S DIQ="XBT(" "RTN","XBDIQ1",125,0) D EN "RTN","XBDIQ1",126,0) Q $G(XBT(+DR)) "RTN","XBDIQ1",127,0) ; "RTN","XBDIQ1",128,0) VALI(DIC,DA,DR) ;PEP - extrinsic pull a value for a field "RTN","XBDIQ1",129,0) NEW DIQ,XBT "RTN","XBDIQ1",130,0) S DIQ="XBT(",DIQ(0)="I" "RTN","XBDIQ1",131,0) D EN "RTN","XBDIQ1",132,0) Q $G(XBT(+DR,"I")) "RTN","XBDIQ1",133,0) ; "RTN","XBDIQ1",134,0) PARSE(XBDA) ;PEP - parse DA literal into da array "RTN","XBDIQ1",135,0) NEW D,I,J "RTN","XBDIQ1",136,0) F I=1:1 S D(I)=$P(XBDA,",",I) Q:D(I)="" "RTN","XBDIQ1",137,0) S I=I-1 "RTN","XBDIQ1",138,0) F J=0:1:I-1 S DA(J)=D(I-J) "RTN","XBDIQ1",139,0) F J=0:1:I-1 F Q:(DA(J)=+DA(J)) S DA(J)=@(DA(J)) "RTN","XBDIQ1",140,0) S DA=DA(0) "RTN","XBDIQ1",141,0) KILL DA(0) "RTN","XBDIQ1",142,0) Q "RTN","XBDIQ1",143,0) ; "RTN","XBDIQ1",144,0) DIC(XBFN) ;PEP - Extrensic entry to return DIC from global "RTN","XBDIQ1",145,0) NEW XBDIC "RTN","XBDIQ1",146,0) D EN^XBSFGBL(XBFN,.XBDIC) "RTN","XBDIQ1",147,0) S XBDIC=$P(XBDIC,"DA,") "RTN","XBDIQ1",148,0) Q XBDIC "RTN","XBDIQ1",149,0) ; "RTN","XBDIQ1",150,0) LEVELS ;EP - setup XB_FN_DA_DR_FLD arrays for upper levels it they exist "RTN","XBDIQ1",151,0) ;set bottom level "RTN","XBDIQ1",152,0) KILL XB "RTN","XBDIQ1",153,0) S XBLVL=0 "RTN","XBDIQ1",154,0) S XB(0,"DR")=DR,XB(0,"DA")=DA,XB(0,"FN")=XBFN "RTN","XBDIQ1",155,0) S XB(0,"FLD")="" "RTN","XBDIQ1",156,0) S XB(0,"PAR")=$G(^DD(XB(0,"FN"),0,"UP")) "RTN","XBDIQ1",157,0) S:XB(0,"PAR")]"" XB(XBLVL,"FLD")=$O(^DD(XB(0,"PAR"),"SB",XB(0,"FN"),"")) "RTN","XBDIQ1",158,0) D ^XBSFGBL(XB(0,"FN"),.XBGBL0) "RTN","XBDIQ1",159,0) S XB(0,"GBL")=$P(XBGBL0,"DA,") "RTN","XBDIQ1",160,0) I XB(0,"PAR")]"" S XB(0+1,"FN")=XB(0,"PAR"),XBLVL=XBLVL+1 D PARENT "RTN","XBDIQ1",161,0) Q "RTN","XBDIQ1",162,0) ; "RTN","XBDIQ1",163,0) PARENT ; gather parent information "RTN","XBDIQ1",164,0) ; build elements from XBFN(XBLVL) "RTN","XBDIQ1",165,0) S XB(XBLVL,"DA")=DA(XBLVL) "RTN","XBDIQ1",166,0) S XB(XBLVL,"DR")=XB(XBLVL-1,"FLD") "RTN","XBDIQ1",167,0) S XB(XBLVL,"FLD")="" "RTN","XBDIQ1",168,0) S XB(XBLVL,"PAR")=$G(^DD(XB(XBLVL,"FN"),0,"UP")) "RTN","XBDIQ1",169,0) S:XB(XBLVL,"PAR")]"" XB(XBLVL,"FLD")=$O(^DD(XB(XBLVL,"PAR"),"SB",XB(XBLVL,"FN"),"")) "RTN","XBDIQ1",170,0) D ^XBSFGBL(XB(XBLVL,"FN"),.XBGBL0) "RTN","XBDIQ1",171,0) S XB(XBLVL,"GBL")=$P(XBGBL0,"DA,") "RTN","XBDIQ1",172,0) I XB(XBLVL,"PAR")]"" S XB(XBLVL+1,"FN")=XB(XBLVL,"PAR"),XBLVL=XBLVL+1 D PARENT "RTN","XBDIQ1",173,0) EPAR ; "RTN","XBDIQ1",174,0) Q "RTN","XBDIQ1",175,0) ; "RTN","XBDIQ1",176,0) SETDIQ1 ;EP - set DR(fn and DA(fn arrays for DIQ1 "RTN","XBDIQ1",177,0) F XBLVL=0:1 Q:'$D(XB(XBLVL)) D "RTN","XBDIQ1",178,0) . S DR(XB(XBLVL,"FN"))=XB(XBLVL,"DR") "RTN","XBDIQ1",179,0) . S DA(XB(XBLVL,"FN"))=XB(XBLVL,"DA") "RTN","XBDIQ1",180,0) . S DIC=XB(XBLVL,"GBL") "RTN","XBDIQ1",181,0) . S DR=XB(XBLVL,"DR") "RTN","XBDIQ1",182,0) . S DA=XB(XBLVL,"DA") "RTN","XBDIQ1",183,0) .Q "RTN","XBDIQ1",184,0) ; kill off redundant DR( and DA( "RTN","XBDIQ1",185,0) S XBLVL=XBLVL-1 "RTN","XBDIQ1",186,0) KILL DR(XB(XBLVL,"FN")),DA(XB(XBLVL,"FN")) "RTN","XBDIQ1",187,0) Q "RTN","XBDIQ1",188,0) ; "RTN","XBDIR") 0^41^B1426428 "RTN","XBDIR",1,0) XBDIR ; IHS/ADC/GTH - DIR INTERFACE ; [ 02/07/97 3:02 PM ] "RTN","XBDIR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDIR",3,0) ; "RTN","XBDIR",4,0) ; The purpose of routine XBDIR is to provide interface "RTN","XBDIR",5,0) ; methodology for a call to ^DIR, to ensure correct handling "RTN","XBDIR",6,0) ; of variables, and to provide for the expressiveness of an "RTN","XBDIR",7,0) ; extrinsic function. "RTN","XBDIR",8,0) ; "RTN","XBDIR",9,0) ; There is no requirement to use the entry point, below. "RTN","XBDIR",10,0) ; "RTN","XBDIR",11,0) ; The format of the call is to SET a local variable to the "RTN","XBDIR",12,0) ; output of the call to DIR^XBDIR(), which will be Y at the "RTN","XBDIR",13,0) ; bottom of this routine, or, less likely, WRITE the value. "RTN","XBDIR",14,0) ; "RTN","XBDIR",15,0) ; An example of the call is: "RTN","XBDIR",16,0) ; S %=$$DIR^XBDIR() "RTN","XBDIR",17,0) ; where the is: "RTN","XBDIR",18,0) ;(DIR(0),DIR("A"),DIR("B"),DIR("T"),DIR("?"),DIR("??"),) "RTN","XBDIR",19,0) ; where is the number of lines to skip before the call "RTN","XBDIR",20,0) ; to ^DIR. "RTN","XBDIR",21,0) ; "RTN","XBDIR",22,0) ; Examples: "RTN","XBDIR",23,0) ; "RTN","XBDIR",24,0) ; S %=$$DIR^XBDIR("N^1:2","Select report method",2,"","Produ "RTN","XBDIR",25,0) ; ce report by FY or Dates","^D HELP^",300,2) "RTN","XBDIR",26,0) ; "RTN","XBDIR",27,0) ; S FY=$$DIR^XBDIR("NO","Object Class Code Summar "RTN","XBDIR",28,0) ; y for FISCAL YEAR ",FY,$G(DTIME,500),"Enter a FOUR DIGIT F "RTN","XBDIR",29,0) ; ISCAL YEAR","^D SB1^") "RTN","XBDIR",30,0) ; "RTN","XBDIR",31,0) ; "RTN","XBDIR",32,0) DIR(O,A,B,T,Q,H,R) ;PEP - Extrinsic interface to ^DIR. "RTN","XBDIR",33,0) I '$L($G(O)) Q -1 "RTN","XBDIR",34,0) NEW DA,DIR "RTN","XBDIR",35,0) S DIR(0)=O "RTN","XBDIR",36,0) I $D(A) D "RTN","XBDIR",37,0) . I $L($G(A)) S DIR("A")=A "RTN","XBDIR",38,0) . I $L($O(A(""))) S O="" F S O=$O(A(O)) Q:'$L(O) S DIR("A",O)=A(O) "RTN","XBDIR",39,0) .Q "RTN","XBDIR",40,0) I $L($G(B)) S DIR("B")=B "RTN","XBDIR",41,0) I $G(T) S DIR("T")=T "RTN","XBDIR",42,0) I $D(Q) D "RTN","XBDIR",43,0) . I $L($G(Q)) S DIR("?")=Q "RTN","XBDIR",44,0) . I $L($O(Q(""))) S O="" F S O=$O(Q(O)) Q:'$L(O) S DIR("?",O)=Q(O) "RTN","XBDIR",45,0) .Q "RTN","XBDIR",46,0) I $L($G(H)) S DIR("??")=H "RTN","XBDIR",47,0) I $G(R) F A=1:1:R W ! "RTN","XBDIR",48,0) KILL O,A,B,T,Q,H,R,DTOUT,DUOUT,DIRUT,DIROUT "RTN","XBDIR",49,0) D ^DIR "RTN","XBDIR",50,0) Q Y "RTN","XBDIR",51,0) ; "RTN","XBDR") 0^42^B8732246 "RTN","XBDR",1,0) XBDR ; IHS/ADC/GTH - BUILDS DIR STRING ; [ 02/07/97 3:02 PM ] "RTN","XBDR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDR",3,0) ; "RTN","XBDR",4,0) ; This routine builds a string which sets variable DIR, and "RTN","XBDR",5,0) ; it's descendants, for use in a routine. The string is "RTN","XBDR",6,0) ; stored in the variable "%", and in the "Temp" storage "RTN","XBDR",7,0) ; area for the screen editor for the current device. "RTN","XBDR",8,0) ; "RTN","XBDR",9,0) START ; "RTN","XBDR",10,0) NEW XBDRQUIT,DIR,XBDRMIN,XBDRMAX,XBDRSPEC,X,Y,V,XBDRCODE,XBDRDIR,XBDRDIRA,XBDRDIRB,XBDRRUN,XBDRTYPE,I,Z,DIROUT,DUOUT,DTOUT,DIRUT,XBDRDQ,XBDRDQQ,XBDROUT "RTN","XBDR",11,0) RUN ; "RTN","XBDR",12,0) F XBDRRUN=1:1:8 D @$P("LOC,NAR,DFLT,^XBDR1,HELP,SET,TEST,SAVE",",",XBDRRUN) I $D(XBDRQUIT) Q "RTN","XBDR",13,0) EXIT ; "RTN","XBDR",14,0) Q "RTN","XBDR",15,0) ; "RTN","XBDR",16,0) LOC ; "RTN","XBDR",17,0) S V="|",U="^" "RTN","XBDR",18,0) S XBDROUT="I $D(DTOUT)!($D(DUOUT))!($D(DIROUT))" "RTN","XBDR",19,0) I '$D(DT) S X="T" D ^%DT S DT=Y KILL %DT "RTN","XBDR",20,0) I '$D(DTIME) S DTIME=9999 "RTN","XBDR",21,0) I $D(IOM),$D(IOF),$D(IOST),$D(IOSL) Q "RTN","XBDR",22,0) D HOME^%ZIS "RTN","XBDR",23,0) KILL IOPAR,IOT,IOBS,POP "RTN","XBDR",24,0) Q "RTN","XBDR",25,0) ; "RTN","XBDR",26,0) HELP ; "RTN","XBDR",27,0) W !!,"The current HELP text is: " "RTN","XBDR",28,0) S X=$E(XBDRTYPE)_1,X=$T(@X^DIR2),X=$P(X,";",4) "RTN","XBDR",29,0) W """",X,"""" "RTN","XBDR",30,0) S DIR("A")="Additional HELP text",DIR(0)="FO^1:199" "RTN","XBDR",31,0) D ^DIR "RTN","XBDR",32,0) KILL DIR "RTN","XBDR",33,0) X XBDROUT "RTN","XBDR",34,0) I S XBDRQUIT="" Q "RTN","XBDR",35,0) S XBDRDQ=X "RTN","XBDR",36,0) W ! "RTN","XBDR",37,0) I '$D(^DIC(9.2)) Q "RTN","XBDR",38,0) QQ ; "RTN","XBDR",39,0) S DIC("A")="Enter HELP FRAME name: ",DIC(0)="AEQ",DIC=9.2 "RTN","XBDR",40,0) D ^DIC "RTN","XBDR",41,0) KILL DIC "RTN","XBDR",42,0) X XBDROUT "RTN","XBDR",43,0) I S XBDRQUIT="" Q "RTN","XBDR",44,0) I Y=-1 Q "RTN","XBDR",45,0) S XBDRDQQ=$P(Y,U,2) "RTN","XBDR",46,0) Q "RTN","XBDR",47,0) ; "RTN","XBDR",48,0) SET ; "RTN","XBDR",49,0) S XBDRDIR=XBDRTYPE,Y="" "RTN","XBDR",50,0) F I=1:1:3 S X="XBDR"_$P("MIN,MAX,SPEC",",",I) I $D(@X) S $P(Y,":",I)=@X "RTN","XBDR",51,0) I Y]"" S XBDRDIR=XBDRDIR_U_Y "RTN","XBDR",52,0) S1 ; "RTN","XBDR",53,0) S XBDRCODE="S DIR(0)="""_XBDRDIR_"""" "RTN","XBDR",54,0) I $D(XBDRDIRA) S:XBDRTYPE["F"!($E(XBDRTYPE)) XBDRDIRA=XBDRDIRA S XBDRCODE=XBDRCODE_",DIR(""A"")="""_XBDRDIRA_"""" "RTN","XBDR",55,0) I $D(XBDRDIRB) S XBDRCODE=XBDRCODE_",DIR(""B"")="""_XBDRDIRB_"""" "RTN","XBDR",56,0) I $D(XBDRDQ),XBDRDQ]"" S XBDRCODE=XBDRCODE_",DIR(""?"")="""_XBDRDQ_"""" "RTN","XBDR",57,0) I $D(XBDRDQQ),XBDRDQQ]"" S XBDRCODE=XBDRCODE_",DIR(""??"")="""_XBDRDQQ_"""" "RTN","XBDR",58,0) S XBDRCODE=XBDRCODE_" KILL DA D ^DIR KILL DIR" "RTN","XBDR",59,0) Q "RTN","XBDR",60,0) ; "RTN","XBDR",61,0) NAR ; "RTN","XBDR",62,0) S DIR("A")="Enter query narrative",DIR(0)="FO" "RTN","XBDR",63,0) D ^DIR "RTN","XBDR",64,0) KILL DIR "RTN","XBDR",65,0) I X="" Q "RTN","XBDR",66,0) X XBDROUT "RTN","XBDR",67,0) I S XBDRQUIT="" Q "RTN","XBDR",68,0) S XBDRDIRA=X "RTN","XBDR",69,0) Q "RTN","XBDR",70,0) ; "RTN","XBDR",71,0) DFLT ; "RTN","XBDR",72,0) S DIR("A")="Enter default value",DIR(0)="FO" "RTN","XBDR",73,0) D ^DIR "RTN","XBDR",74,0) KILL DIR "RTN","XBDR",75,0) I X="" Q "RTN","XBDR",76,0) X XBDROUT "RTN","XBDR",77,0) I S XBDRQUIT="" Q "RTN","XBDR",78,0) S XBDRDIRB=X "RTN","XBDR",79,0) Q "RTN","XBDR",80,0) ; "RTN","XBDR",81,0) TEST ; "RTN","XBDR",82,0) W !!!!!?30,"***** TEST *****" "RTN","XBDR",83,0) TQ ; "RTN","XBDR",84,0) X XBDRCODE "RTN","XBDR",85,0) I X=U Q "RTN","XBDR",86,0) G TQ "RTN","XBDR",87,0) ; "RTN","XBDR",88,0) SAVE ; "RTN","XBDR",89,0) S %=" "_XBDRCODE "RTN","XBDR",90,0) W !!!,"Saving the following line of code in the '%' variable:",!,%,!! "RTN","XBDR",91,0) D SV(%) "RTN","XBDR",92,0) Q "RTN","XBDR",93,0) ; "RTN","XBDR",94,0) SV(%) ; "RTN","XBDR",95,0) NEW (%) "RTN","XBDR",96,0) D SAVE^ZIBDR(%) "RTN","XBDR",97,0) Q "RTN","XBDR",98,0) ; "RTN","XBDR1") 0^43^B16611832 "RTN","XBDR1",1,0) XBDR1 ; IHS/ADC/GTH - XBDR SUBROUTINE; [ 10/29/2002 7:42 AM ] "RTN","XBDR1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDR1",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Prevent "RTN","XBDR1",4,0) ; "RTN","XBDR1",5,0) ; Part of XBDR "RTN","XBDR1",6,0) ; "RTN","XBDR1",7,0) TYPE ; "RTN","XBDR1",8,0) S DIR("A")="Input data type" "RTN","XBDR1",9,0) S DIR(0)="S^D:DATE;E:END-OF-PAGE;F:FREE TEXT;L:LIST OR RANGE;N:NUMERIC;S:SET;Y:YES/NO;Z:FILEMAN" "RTN","XBDR1",10,0) D ^DIR KILL DIR "RTN","XBDR1",11,0) I $D(DIRUT) S XBDRQUIT="" Q "RTN","XBDR1",12,0) ;S XBDRTYPE=X;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDR1",13,0) S (XBDRTYPE,X)=$$UP^XLFSTR(X) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBDR1",14,0) D @X "RTN","XBDR1",15,0) I $D(XBDRQUIT) Q "RTN","XBDR1",16,0) I XBDRTYPE'?1.4U Q "RTN","XBDR1",17,0) S DIR("A")="Is this query mandatory",DIR("B")="NO",DIR(0)="Y" "RTN","XBDR1",18,0) D ^DIR KILL DIR "RTN","XBDR1",19,0) X XBDROUT "RTN","XBDR1",20,0) I S XBDRQUIT="" Q "RTN","XBDR1",21,0) I "yY"'[$E(X) S XBDRTYPE=XBDRTYPE_"O" "RTN","XBDR1",22,0) Q "RTN","XBDR1",23,0) ; "RTN","XBDR1",24,0) E ; "RTN","XBDR1",25,0) Y ; "RTN","XBDR1",26,0) Q "RTN","XBDR1",27,0) ; "RTN","XBDR1",28,0) MINMAX ; "RTN","XBDR1",29,0) S DIR("A")="Minimum "_Z_" allowed",DIR(0)="NO^::7" "RTN","XBDR1",30,0) D ^DIR "RTN","XBDR1",31,0) KILL DIR "RTN","XBDR1",32,0) X XBDROUT "RTN","XBDR1",33,0) I S XBDRQUIT="" Q "RTN","XBDR1",34,0) S XBDRMIN=X,DIR("A")="Maximum "_Z_" allowed",DIR(0)="NO^::7" "RTN","XBDR1",35,0) D ^DIR "RTN","XBDR1",36,0) KILL DIR "RTN","XBDR1",37,0) X XBDROUT "RTN","XBDR1",38,0) I S XBDRQUIT="" Q "RTN","XBDR1",39,0) S XBDRMAX=X "RTN","XBDR1",40,0) Q "RTN","XBDR1",41,0) ; "RTN","XBDR1",42,0) F ; "RTN","XBDR1",43,0) S Z="length" "RTN","XBDR1",44,0) D MINMAX "RTN","XBDR1",45,0) Q "RTN","XBDR1",46,0) ; "RTN","XBDR1",47,0) L ; "RTN","XBDR1",48,0) S Z="value" "RTN","XBDR1",49,0) D MINMAX "RTN","XBDR1",50,0) Q "RTN","XBDR1",51,0) ; "RTN","XBDR1",52,0) N ; "RTN","XBDR1",53,0) S Z="value" "RTN","XBDR1",54,0) D MINMAX "RTN","XBDR1",55,0) S DIR("A")="Maximum number of decimal places",DIR(0)="NO^0:9" "RTN","XBDR1",56,0) D ^DIR "RTN","XBDR1",57,0) KILL DIR "RTN","XBDR1",58,0) X XBDROUT "RTN","XBDR1",59,0) I S XBDRQUIT="" Q "RTN","XBDR1",60,0) S XBDRSPEC=X "RTN","XBDR1",61,0) Q "RTN","XBDR1",62,0) ; "RTN","XBDR1",63,0) S ; "RTN","XBDR1",64,0) S XBDRMIN="" "RTN","XBDR1",65,0) F L=0:0 D S1 Q:X="" "RTN","XBDR1",66,0) I XBDRMIN="" S XBDRQUIT="" Q "RTN","XBDR1",67,0) I '$D(XBDRQUIT) D S2 "RTN","XBDR1",68,0) Q "RTN","XBDR1",69,0) ; "RTN","XBDR1",70,0) S1 ; "RTN","XBDR1",71,0) W ! "RTN","XBDR1",72,0) S DIR("A")="Code",DIR(0)="FO" "RTN","XBDR1",73,0) D ^DIR "RTN","XBDR1",74,0) KILL DIR "RTN","XBDR1",75,0) X XBDROUT "RTN","XBDR1",76,0) I S XBDRQUIT="",X="" Q "RTN","XBDR1",77,0) I X="" Q "RTN","XBDR1",78,0) S Z=X,DIR("A")="Stands for",DIR(0)="F" "RTN","XBDR1",79,0) D ^DIR "RTN","XBDR1",80,0) KILL DIR "RTN","XBDR1",81,0) X XBDROUT "RTN","XBDR1",82,0) I S XBDRQUIT="",X="" Q "RTN","XBDR1",83,0) S:XBDRMIN]"" XBDRMIN=XBDRMIN_";" "RTN","XBDR1",84,0) S XBDRMIN=XBDRMIN_Z_":"_X "RTN","XBDR1",85,0) I $L(XBDRMIN)>240 W *7," DIR STRING TOO LONG...SESSION ABORTED" S XBDRQUIT="",X="" "RTN","XBDR1",86,0) Q "RTN","XBDR1",87,0) ; "RTN","XBDR1",88,0) S2 ; "RTN","XBDR1",89,0) S DIR("A")="Possible choices should be listed which format" "RTN","XBDR1",90,0) S DIR("B")="VERTICAL" "RTN","XBDR1",91,0) S DIR(0)="SB^H:HORIZONTAL;V:VERTICAL;" "RTN","XBDR1",92,0) W ! "RTN","XBDR1",93,0) D ^DIR "RTN","XBDR1",94,0) KILL DIR "RTN","XBDR1",95,0) X XBDROUT "RTN","XBDR1",96,0) I S XBDRQUIT="" "RTN","XBDR1",97,0) I $E(X)="H" S XBDRTYPE=XBDRTYPE_"B" "RTN","XBDR1",98,0) Q "RTN","XBDR1",99,0) ; "RTN","XBDR1",100,0) D ; "RTN","XBDR1",101,0) S DIR("A")="Enter earliest date",DIR(0)="DO^::ETS" "RTN","XBDR1",102,0) D ^DIR "RTN","XBDR1",103,0) KILL DIR "RTN","XBDR1",104,0) X XBDROUT "RTN","XBDR1",105,0) I S XBDRQUIT="" Q "RTN","XBDR1",106,0) S XBDRMIN=Y "RTN","XBDR1",107,0) S DIR("A")="Enter maximum date",DIR(0)="DO^"_XBDRMIN_"::ETS" "RTN","XBDR1",108,0) D ^DIR "RTN","XBDR1",109,0) KILL DIR "RTN","XBDR1",110,0) X XBDROUT "RTN","XBDR1",111,0) I S XBDRQUIT="" Q "RTN","XBDR1",112,0) S XBDRMAX=Y "RTN","XBDR1",113,0) DTS ; "RTN","XBDR1",114,0) W !!!,"Enter the %DT string using as many of the following as you wish:",!! "RTN","XBDR1",115,0) S X="F;Future dates assumed^N;Numeric input not allowed^P;Past dates assumed^R;Time required^T;Time allowed^X;Exact time required^S;Seconds allowed" "RTN","XBDR1",116,0) F I=1:1 S Y=$P(X,U,I) Q:Y="" W $P(Y,";")," ",$P(Y,";",2),! "RTN","XBDR1",117,0) ADTS ; "RTN","XBDR1",118,0) S DIR("A")="%DT String",DIR(0)="FO" "RTN","XBDR1",119,0) D ^DIR "RTN","XBDR1",120,0) KILL DIR "RTN","XBDR1",121,0) X XBDROUT "RTN","XBDR1",122,0) I S XBDRQUIT="" Q "RTN","XBDR1",123,0) I X="" S XBDRSPEC="E" Q "RTN","XBDR1",124,0) I X'?1.9U W *7," ??" G ADTS "RTN","XBDR1",125,0) S XBDRSPEC="E"_X "RTN","XBDR1",126,0) Q "RTN","XBDR1",127,0) ; "RTN","XBDR1",128,0) Z ; "RTN","XBDR1",129,0) S DIC=1,DIC(0)="AEQ",DIC("A")="Enter FILE name: " "RTN","XBDR1",130,0) W ! "RTN","XBDR1",131,0) D ^DIC "RTN","XBDR1",132,0) KILL DIC "RTN","XBDR1",133,0) I Y=-1 S XBDRQUIT="" Q "RTN","XBDR1",134,0) S Z=+Y,DIC="^DD("_+Y_",",DIC(0)="AEQ",DIC("A")="Enter FIELD name: " "RTN","XBDR1",135,0) D ^DIC "RTN","XBDR1",136,0) KILL DIC "RTN","XBDR1",137,0) I Y=-1 S XBDRQUIT="" Q "RTN","XBDR1",138,0) S XBDRTYPE=Z_","_+Y,XBDRRUN=5 "RTN","XBDR1",139,0) Q "RTN","XBDR1",140,0) ; "RTN","XBDSET") 0^44^B21552778 "RTN","XBDSET",1,0) XBDSET ; IHS/ADC/GTH - BUILDS LIST OF FILEMAN FILES ; [ 12/11/2000 3:13 PM ] "RTN","XBDSET",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDSET",3,0) ; XB*3*8 - IHS/ASDST/GTH 12-07-00 - Add ability to select from BUILD file. "RTN","XBDSET",4,0) ; "RTN","XBDSET",5,0) ; This routine selects FileMan dictionaries individually, "RTN","XBDSET",6,0) ; by a range, or for a specific package. This routine can "RTN","XBDSET",7,0) ; be called from another routine by setting the variables "RTN","XBDSET",8,0) ; XBDSLO, XBDSHI and then D EN1^XBDSET. "RTN","XBDSET",9,0) ; "RTN","XBDSET",10,0) ; If the variable XBDSND exist upon entry no default menu "RTN","XBDSET",11,0) ; option will be displayed. "RTN","XBDSET",12,0) ; "RTN","XBDSET",13,0) START ; "RTN","XBDSET",14,0) S IOP=0 "RTN","XBDSET",15,0) D ^%ZIS "RTN","XBDSET",16,0) KILL DIC,DIR,^UTILITY("XBDSET",$J) "RTN","XBDSET",17,0) S (XBDSP,XBDSQ)=0 "RTN","XBDSET",18,0) F D GETFILES Q:XBDSQ "RTN","XBDSET",19,0) D EOJ "RTN","XBDSET",20,0) Q "RTN","XBDSET",21,0) ; "RTN","XBDSET",22,0) GETFILES ; "RTN","XBDSET",23,0) W ! "RTN","XBDSET",24,0) ; S DIR(0)="SO^"_$S('XBDSP:"O:One file only;",1:"")_"S:Selected files;R:Range of files;P:Package;"_$S($D(^UTILITY("XBDSET",$J)):"L:List of files already selected; : ",1:" : "); XB*3*8 "RTN","XBDSET",25,0) S DIR(0)="SO^"_$S('XBDSP:"O:One file only;",1:"")_"S:Selected files;R:Range of files;P:Package;B:Build;"_$S($D(^UTILITY("XBDSET",$J)):"L:List of files already selected; : ",1:" : ") ; XB*3*8 "RTN","XBDSET",26,0) S DIR("A")="Choose one,"_$S(XBDSP!($D(XBDSND)):" RETURN to continue,",1:"")_" or ^ to cancel" "RTN","XBDSET",27,0) I 'XBDSP,'$D(XBDSND) S DIR("B")="O" "RTN","XBDSET",28,0) S DIR("?")=$S(XBDSP:"Do you want",1:"Do you want one file,") "RTN","XBDSET",29,0) ; S DIR("?")=DIR("?")_" a range of files by number, files from a specific package, "_$S($D(^UTILITY("XBDSET",$J)):"individual files, or a list of files already selected?",1:"or individual files?") ; XB*3*8 "RTN","XBDSET",30,0) S DIR("?")=DIR("?")_" a range of files by number, files from a specific package or build, "_$S($D(^UTILITY("XBDSET",$J)):"individual files, or a list of files already selected?",1:"or individual files?") ; XB*3*8 "RTN","XBDSET",31,0) D ^DIR "RTN","XBDSET",32,0) KILL DIR "RTN","XBDSET",33,0) I $D(DIRUT) K:$D(DUOUT)!($D(DTOUT)) ^UTILITY("XBDSET",$J) S XBDSQ=1 Q "RTN","XBDSET",34,0) D OPTION ; Get files for selected option "RTN","XBDSET",35,0) I $D(^UTILITY("XBDSET",$J)) S XBDSP=1 "RTN","XBDSET",36,0) Q "RTN","XBDSET",37,0) ; "RTN","XBDSET",38,0) OPTION ; GET FILES FOR SELECTED OPTION "RTN","XBDSET",39,0) W ! "RTN","XBDSET",40,0) I Y="O" D ONEFILE Q ; Get one file and exit "RTN","XBDSET",41,0) I Y="S" D SELECT Q ; Get selected files "RTN","XBDSET",42,0) I Y="R" D RANGE Q ; Get range of files "RTN","XBDSET",43,0) I Y="P" D PACKAGE Q ; Get files from package "RTN","XBDSET",44,0) I Y="L" D LIST Q ; List selected files "RTN","XBDSET",45,0) I Y="B" D BUILD Q ; Get files from build ; XB*3*8 "RTN","XBDSET",46,0) Q "RTN","XBDSET",47,0) ; "RTN","XBDSET",48,0) ONEFILE ; GET ONE FILE AND EXIT "RTN","XBDSET",49,0) S XBDSND=1 "RTN","XBDSET",50,0) S DIC="^DIC(",DIC(0)="AEMQ" "RTN","XBDSET",51,0) D ^DIC "RTN","XBDSET",52,0) KILL DIC "RTN","XBDSET",53,0) Q:Y<0 "RTN","XBDSET",54,0) S ^UTILITY("XBDSET",$J,+Y)="" "RTN","XBDSET",55,0) S XBDSQ=1 "RTN","XBDSET",56,0) Q "RTN","XBDSET",57,0) ; "RTN","XBDSET",58,0) SELECT ; GET SELECTED FILES "RTN","XBDSET",59,0) S DIC="^DIC(",DIC(0)="AEMQ" "RTN","XBDSET",60,0) F D ^DIC Q:Y<0 S ^UTILITY("XBDSET",$J,+Y)="" "RTN","XBDSET",61,0) KILL DIC "RTN","XBDSET",62,0) I '$O(^UTILITY("XBDSET",$J,""))!($D(DUOUT)) S XBDSQ=1 Q "RTN","XBDSET",63,0) Q "RTN","XBDSET",64,0) ; "RTN","XBDSET",65,0) RANGE ; GET RANGE OF FILES "RTN","XBDSET",66,0) S DIR(0)="NO^1:99999999:3",DIR("A")="From file number" "RTN","XBDSET",67,0) D ^DIR "RTN","XBDSET",68,0) KILL DIR "RTN","XBDSET",69,0) I $D(DIRUT) S XBDSQ=1 Q "RTN","XBDSET",70,0) S XBDSFF=+Y "RTN","XBDSET",71,0) F S DIR(0)="NO^1:99999999:3",DIR("A")="Thru file number" D ^DIR KILL DIR Q:$D(DIRUT) D Q:'XBDSQ S XBDSQ=0 "RTN","XBDSET",72,0) . I +YXBDSTF) "RTN","XBDSET",85,0) . Q:'$D(^DIC(XBDSFILE,0)) "RTN","XBDSET",86,0) . S ^UTILITY("XBDSET",$J,XBDSFILE)="" "RTN","XBDSET",87,0) . S XBDSC=XBDSC+1 "RTN","XBDSET",88,0) .Q "RTN","XBDSET",89,0) Q "RTN","XBDSET",90,0) ; "RTN","XBDSET",91,0) PACKAGE ; GET FILES FROM SPECIFIC PACKAGE "RTN","XBDSET",92,0) S DIC=9.4,DIC(0)="AEMQ" "RTN","XBDSET",93,0) D ^DIC "RTN","XBDSET",94,0) KILL DIC "RTN","XBDSET",95,0) Q:Y<0 "RTN","XBDSET",96,0) S Y=+Y,X=0 "RTN","XBDSET",97,0) F S X=$O(^DIC(9.4,Y,4,X)) Q:X'=+X I $D(^DIC(^DIC(9.4,Y,4,X,0),0)) S ^UTILITY("XBDSET",$J,^DIC(9.4,Y,4,X,0))="" "RTN","XBDSET",98,0) Q "RTN","XBDSET",99,0) ; "RTN","XBDSET",100,0) ; XB*3*8 start block "RTN","XBDSET",101,0) BUILD ; Get files from selected BUILD "RTN","XBDSET",102,0) S DIC=9.6,DIC(0)="AEMQ" "RTN","XBDSET",103,0) D ^DIC "RTN","XBDSET",104,0) KILL DIC "RTN","XBDSET",105,0) Q:Y<0 "RTN","XBDSET",106,0) S Y=+Y,X=0 "RTN","XBDSET",107,0) F S X=$O(^XPD(9.6,Y,4,X)) Q:X'=+X I $D(^XPD(9.6,Y,4,X,0)) S ^UTILITY("XBDSET",$J,^XPD(9.6,Y,4,X,0))="" "RTN","XBDSET",108,0) Q "RTN","XBDSET",109,0) ; XB*3*8 end block "RTN","XBDSET",110,0) ; "RTN","XBDSET",111,0) LIST ; LIST FILES ALREADY SELECTED "RTN","XBDSET",112,0) I '$D(^UTILITY("XBDSET",$J)) W !,"No files selected." Q "RTN","XBDSET",113,0) W @IOF,"Files already selected:",! "RTN","XBDSET",114,0) S XBDSX="" "RTN","XBDSET",115,0) F S XBDSX=$O(^UTILITY("XBDSET",$J,XBDSX)) Q:XBDSX="" W !,XBDSX,?14,$P(^DIC(XBDSX,0),U,1) I $Y>(IOSL-3) D PXBSE Q:$D(DUOUT) W @IOF "RTN","XBDSET",116,0) I '$D(DUOUT),$Y>(IOSL-10) D PXBSE "RTN","XBDSET",117,0) Q "RTN","XBDSET",118,0) ; "RTN","XBDSET",119,0) PXBSE ; GIVE USER A CHANCE TO SEE LAST PAGE AND QUIT "RTN","XBDSET",120,0) I IO=IO(0),$E(IOST,1,2)="C-" S Y=$$DIR^XBDIR("E") "RTN","XBDSET",121,0) Q "RTN","XBDSET",122,0) ; "RTN","XBDSET",123,0) EN1 ;EP - Non-interactive selection of range of files. "RTN","XBDSET",124,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBDSET",125,0) I '$D(XBDSLO)!('$D(XBDSHI)) Q "RTN","XBDSET",126,0) S XBDSFF=XBDSLO,XBDSTF=XBDSHI "RTN","XBDSET",127,0) D RANGE2 "RTN","XBDSET",128,0) D EOJ "RTN","XBDSET",129,0) Q "RTN","XBDSET",130,0) ; "RTN","XBDSET",131,0) EOJ ; "RTN","XBDSET",132,0) KILL XBDSC,XBDSFF,XBDSFILE,XBDSHI,XBDSL,XBDSLO,XBDSND,XBDSP,XBDSQ,XBDSTF,XBDSX "RTN","XBDSET",133,0) KILL DIC,DIR,DIRUT,DTOUT,DUOUT,X,Y "RTN","XBDSET",134,0) Q "RTN","XBDSET",135,0) ; "RTN","XBDT") 0^45^B5853981 "RTN","XBDT",1,0) XBDT ;IHS/HQW/JDH - date/time utilities ;[ 06/19/1998 11:11 AM ] "RTN","XBDT",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBDT",3,0) ; "RTN","XBDT",4,0) ;FISCAL "RTN","XBDT",5,0) ; usage: S %=$$FISCAL^XBDT(XBDT,XBFYMTH,XBADJ) "RTN","XBDT",6,0) ; "RTN","XBDT",7,0) ; Input: (all parameters are optional) "RTN","XBDT",8,0) ; XBDT Date in either fileman of horlog format. If not defined, "RTN","XBDT",9,0) ; default is today. "RTN","XBDT",10,0) ; XBFYMT Month beginning fiscal year. The definition of this "RTN","XBDT",11,0) ; variable can be assigned in the parameter list. If it "RTN","XBDT",12,0) ; is not and Beginning fiscal year month field in the "RTN","XBDT",13,0) ; PCC MASTER CONTROL file is valued for the current locaton, "RTN","XBDT",14,0) ; its value is used. The default is 10. "RTN","XBDT",15,0) ; XBADJ The value of this variable allows the adjustment of the "RTN","XBDT",16,0) ; FY value "RTN","XBDT",17,0) ; "RTN","XBDT",18,0) ; Output: current fiscal year^star date of FY^end date of FY "RTN","XBDT",19,0) ; "RTN","XBDT",20,0) ;LEAP "RTN","XBDT",21,0) ; input: (optional) date in Fileman, yyyy or horlog "RTN","XBDT",22,0) ; output: boolean 1=yes 0=no "RTN","XBDT",23,0) ; uses algorithm defined for leap year in the RPMS Y2000 Compliance Plan "RTN","XBDT",24,0) ; "RTN","XBDT",25,0) FISCAL(XBDT,XBFYMTH,XBADJ) ; return current fiscal year "RTN","XBDT",26,0) ; "RTN","XBDT",27,0) N %,T,T1,T2,XBFY,XBFYBEG,XBFYEND "RTN","XBDT",28,0) S XBADJ=$G(XBADJ) ; adjustment variable "RTN","XBDT",29,0) S:'$G(XBDT) XBDT=$$NOW^XLFDT "RTN","XBDT",30,0) S:XBDT["," XBDT=$$HTFM^XLFDT(XBDT) ; horolog to fileman "RTN","XBDT",31,0) S T=$P($G(^APCCCTRL(DUZ(2),0)),U,8) ; beg, FY month for location from PCC MASTER CONTROL file "RTN","XBDT",32,0) S:'$G(XBFYMTH) XBFYMTH=$S(T:T,1:10) ; use month entered, as in MSTR file or 10 "RTN","XBDT",33,0) S XBFYMTH=$E("0",XBFYMTH<10)_XBFYMTH ; if month is less then 10 make it two digits "RTN","XBDT",34,0) S T1=XBFYMTH-1<$E(XBDT,4,5) ; boolean. month before or after FY start month "RTN","XBDT",35,0) S T2=XBDT\10000-'T1 ; current year in FM 3 digit year format plus 1 or 0 determined by T1 calculation "RTN","XBDT",36,0) S XBFY=XBDT\10000+T1 ; fiscal Year in external 4 digit format "RTN","XBDT",37,0) S XBFYBEG=T2_XBFYMTH_"01" ; beginning of fiscal year "RTN","XBDT",38,0) S %=T2+1_XBFYMTH_"01" "RTN","XBDT",39,0) S XBFYEND=$$FMADD^XLFDT(%,-1) ;get the beginning date of the fiscal year "RTN","XBDT",40,0) Q XBFY+1700+XBADJ_U_XBFYBEG_U_XBFYEND "RTN","XBDT",41,0) ; "RTN","XBDT",42,0) ; "RTN","XBDT",43,0) ; "RTN","XBDT",44,0) LEAP(XBDT) ; is the year a leap year? "RTN","XBDT",45,0) ; "RTN","XBDT",46,0) S:'$G(XBDT) XBDT=$$NOW^XLFDT "RTN","XBDT",47,0) S:XBDT["," XBDT=$$HTFM^XLFDT(XBDT) ; horolog to fileman "RTN","XBDT",48,0) S:$L(XBDT)>4 XBDT=XBDT\10000+1700 ; 4 digit date "RTN","XBDT",49,0) Q '(XBDT#4)&(XBDT#100)!('(XBDT#100)&'(XBDT#400)) ; leap year algorithm "RTN","XBDT",50,0) ; "RTN","XBEHRCK") 0^46^B72927543 "RTN","XBEHRCK",1,0) XBEHRCK ;IHS/SET/GTH - EHR ENVIRONMENT CHECK ; [ 05/11/2004 ] "RTN","XBEHRCK",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBEHRCK",3,0) ; "RTN","XBEHRCK",4,0) ; To add to the list of requirements, add the info specific to the "RTN","XBEHRCK",5,0) ; application after the "ENV" label, below in the form: "RTN","XBEHRCK",6,0) ; Namespace*Version*Patch "RTN","XBEHRCK",7,0) ; E.g., to check for Pt Reg, v 6.1, patch 2: "RTN","XBEHRCK",8,0) ; AG*6.1*2 "RTN","XBEHRCK",9,0) ; If the application has no patches, leave the patch info blank. "RTN","XBEHRCK",10,0) ; 20040512d "RTN","XBEHRCK",11,0) ; 20040603 IHS/SET/HMW Added checks for Pharmacy Data Management "RTN","XBEHRCK",12,0) ; 20040615 Changed ABSP to check for patch 10 instead of 8 "RTN","XBEHRCK",13,0) ; 20040708 Removed SD patch 63 "RTN","XBEHRCK",14,0) ; 20040719 Removed SD Patches 300 307 314 "RTN","XBEHRCK",15,0) ; Removed HL Patches 17 18 21 8 9 "RTN","XBEHRCK",16,0) ; Removed GMTS Patch 45 "RTN","XBEHRCK",17,0) ; Removed ABSP Patch 10 "RTN","XBEHRCK",18,0) ; Removed APSE 6.1 "RTN","XBEHRCK",19,0) ; "RTN","XBEHRCK",20,0) ENV ; Namespace*Version*Patch "RTN","XBEHRCK",21,0) ;;XU*8.0*1010 "RTN","XBEHRCK",22,0) ;;XU*8.0*2 "RTN","XBEHRCK",23,0) ;;XU*8.0*15 "RTN","XBEHRCK",24,0) ;;XU*8.0*16 "RTN","XBEHRCK",25,0) ;;XU*8.0*26 "RTN","XBEHRCK",26,0) ;;XU*8.0*28 "RTN","XBEHRCK",27,0) ;;XU*8.0*32 "RTN","XBEHRCK",28,0) ;;XU*8.0*44 "RTN","XBEHRCK",29,0) ;;XU*8.0*311 "RTN","XBEHRCK",30,0) ;;XU*8.0*288 "RTN","XBEHRCK",31,0) ;;XT*7.3*1002 "RTN","XBEHRCK",32,0) ;;XT*7.3*73 "RTN","XBEHRCK",33,0) ;;DI*22.0*1001 "RTN","XBEHRCK",34,0) ;;DI*22.0*70 "RTN","XBEHRCK",35,0) ;;HL*1.6*1005 "RTN","XBEHRCK",36,0) ;;PSO*6.0*5 "RTN","XBEHRCK",37,0) ;;APSA*6.1 "RTN","XBEHRCK",38,0) ;;AUPN*99.1*11 "RTN","XBEHRCK",39,0) ;;LEX*2*9 "RTN","XBEHRCK",40,0) ;;VSIT*2 "RTN","XBEHRCK",41,0) ;;PX*1*45 "RTN","XBEHRCK",42,0) ;;PX*1*73 "RTN","XBEHRCK",43,0) ;;PX*1*74 "RTN","XBEHRCK",44,0) ;;PX*1*88 "RTN","XBEHRCK",45,0) ;;PX*1*115 "RTN","XBEHRCK",46,0) ;;PXRM*1.5*1 "RTN","XBEHRCK",47,0) ;;PXRM*1.5*2 "RTN","XBEHRCK",48,0) ;;PXRM*1.5*3 "RTN","XBEHRCK",49,0) ;;PXRM*1.5*4 "RTN","XBEHRCK",50,0) ;;PXRM*1.5*5 "RTN","XBEHRCK",51,0) ;;PXRM*1.5*6 "RTN","XBEHRCK",52,0) ;;PXRM*1.5*7 "RTN","XBEHRCK",53,0) ;;PXRM*1.5*8 "RTN","XBEHRCK",54,0) ;;PXRM*1.5*9 "RTN","XBEHRCK",55,0) ;;PXRM*1.5*10 "RTN","XBEHRCK",56,0) ;;PXRM*1.5*11 "RTN","XBEHRCK",57,0) ;;PXRM*1.5*13 "RTN","XBEHRCK",58,0) ;;PXRM*1.5*14 "RTN","XBEHRCK",59,0) ;;PXRM*1.5*17 "RTN","XBEHRCK",60,0) ;;PXRM*1.5*15 "RTN","XBEHRCK",61,0) ;;PXRM*1.5*19 "RTN","XBEHRCK",62,0) ;;GMTS*2.7*36 "RTN","XBEHRCK",63,0) ;;GMTS*2.7*43 "RTN","XBEHRCK",64,0) ;;GMTS*2.7*52 "RTN","XBEHRCK",65,0) ;;GMTS*2.7*60 "RTN","XBEHRCK",66,0) ;;GMTS*2.7*62 "RTN","XBEHRCK",67,0) ;;GMTS*2.7*64 "RTN","XBEHRCK",68,0) ;;GMTS*2.7*68 "RTN","XBEHRCK",69,0) ;;PIMS*5.3T11 "RTN","XBEHRCK",70,0) ;;DG*5.3*124 "RTN","XBEHRCK",71,0) ;;DG*5.3*57 "RTN","XBEHRCK",72,0) ;;DG*5.3*134 "RTN","XBEHRCK",73,0) ;;DG*5.3*249 "RTN","XBEHRCK",74,0) ;;DG*5.3*265 "RTN","XBEHRCK",75,0) ;;DG*5.3*276 "RTN","XBEHRCK",76,0) ;;DG*5.3*277 "RTN","XBEHRCK",77,0) ;;DG*5.3*389 "RTN","XBEHRCK",78,0) ;;DG*5.3*415 "RTN","XBEHRCK",79,0) ;;SD*5.3*131 SEQ #127 "RTN","XBEHRCK",80,0) ;;SD*5.3*263 SEQ #243 "RTN","XBEHRCK",81,0) ;;SD*5.3*254 SEQ #247 "RTN","XBEHRCK",82,0) ;;USR*1.0 "RTN","XBEHRCK",83,0) ;;TIU*1.0*1 SEQ #4 "RTN","XBEHRCK",84,0) ;;TIU*1.0*3 SEQ #5 "RTN","XBEHRCK",85,0) ;;TIU*1.0*4 SEQ #8 "RTN","XBEHRCK",86,0) ;;TIU*1.0*7 SEQ #9 "RTN","XBEHRCK",87,0) ;;TIU*1.0*15 SEQ #10 "RTN","XBEHRCK",88,0) ;;TIU*1.0*19 SEQ #19 "RTN","XBEHRCK",89,0) ;;TIU*1.0*28 SEQ #22 "RTN","XBEHRCK",90,0) ;;TIU*1.0*31 SEQ #34 "RTN","XBEHRCK",91,0) ;;TIU*1.0*47 SEQ #60 "RTN","XBEHRCK",92,0) ;;TIU*1.0*76 SEQ #70 "RTN","XBEHRCK",93,0) ;;TIU*1.0*80 SEQ #82 "RTN","XBEHRCK",94,0) ;;TIU*1.0*102 SEQ #86 "RTN","XBEHRCK",95,0) ;;TIU*1.0*89 SEQ #90 "RTN","XBEHRCK",96,0) ;;TIU*1.0*108 SEQ #99 "RTN","XBEHRCK",97,0) ;;TIU*1.0*170 "RTN","XBEHRCK",98,0) ;;TIU*1.0*150 SEQ #142 "RTN","XBEHRCK",99,0) ;;TIU*1.0*100 SEQ #103 "RTN","XBEHRCK",100,0) ;;TIU*1.0*105 SEQ #106 "RTN","XBEHRCK",101,0) ;;TIU*1.0*119 SEQ #109 "RTN","XBEHRCK",102,0) ;;TIU*1.0*125 SEQ #113 "RTN","XBEHRCK",103,0) ;;TIU*1.0*127 SEQ #118 "RTN","XBEHRCK",104,0) ;;TIU*1.0*122 SEQ #119 "RTN","XBEHRCK",105,0) ;;TIU*1.0*124 SEQ #124 "RTN","XBEHRCK",106,0) ;;TIU*1.0*138 SEQ #125 "RTN","XBEHRCK",107,0) ;;TIU*1.0*63 SEQ #76 "RTN","XBEHRCK",108,0) ;;TIU*1.0*137 "RTN","XBEHRCK",109,0) ;;TIU*1.0*134 "RTN","XBEHRCK",110,0) ;;TIU*1.0*109 SEQ #123 "RTN","XBEHRCK",111,0) ;;LR*5.2*1018 "RTN","XBEHRCK",112,0) ;;LR*5.2*128 "RTN","XBEHRCK",113,0) ;;LR*5.2*121 "RTN","XBEHRCK",114,0) ;;LR*5.2*201 "RTN","XBEHRCK",115,0) ;;LR*5.2*191 "RTN","XBEHRCK",116,0) ;;LR*5.2*208 "RTN","XBEHRCK",117,0) ;;RA*5.0 "RTN","XBEHRCK",118,0) ;;PSJ*4.5 "RTN","XBEHRCK",119,0) ;;BW*2.0 "RTN","XBEHRCK",120,0) ;;BW*2.0*9 "RTN","XBEHRCK",121,0) ;;XWB*1.1*6 "RTN","XBEHRCK",122,0) ;;XWB*1.1*12 "RTN","XBEHRCK",123,0) ;;END; <-- Leave this alone. It's the LOOP ender. "RTN","XBEHRCK",124,0) ; ----------------------------------------------------- "RTN","XBEHRCK",125,0) ; "RTN","XBEHRCK",126,0) ; begin - FOR TEST ONLY REMOVE FOR DIST. "RTN","XBEHRCK",127,0) ;I '$G(DUZ) D "RTN","XBEHRCK",128,0) ;. KILL "RTN","XBEHRCK",129,0) ;. KILL ^XUTL("XQ",$J) "RTN","XBEHRCK",130,0) ;. D HOME^%ZIS,DT^DICRW,^XBKTMP "RTN","XBEHRCK",131,0) ;. S DUZ=1,DUZ(2)=$P(^AUTTSITE(1,0),U) "RTN","XBEHRCK",132,0) ;.Q "RTN","XBEHRCK",133,0) ; end - FOR TEST ONLY REMOVE FOR DIST. "RTN","XBEHRCK",134,0) ; "RTN","XBEHRCK",135,0) I '$G(DUZ) D RSLT(""),RSLT("Please set your DUZ before running this routine.") Q "RTN","XBEHRCK",136,0) D DT^DICRW,^XBKVAR "RTN","XBEHRCK",137,0) D ASKDEV Q:POP "RTN","XBEHRCK",138,0) Q:$D(ZTQUEUED) "RTN","XBEHRCK",139,0) ; "RTN","XBEHRCK",140,0) ZTM ;EP - Taskman entry point "RTN","XBEHRCK",141,0) KILL ^TMP("XBEHRCK",$J) "RTN","XBEHRCK",142,0) NEW XBEH,XBEHNEED,XBEHOK "RTN","XBEHRCK",143,0) N XBEHNS,XBEHNAME,XBEHVER,XBEHPKG,XBEHC "RTN","XBEHRCK",144,0) U IO "RTN","XBEHRCK",145,0) S XBEHOK=1,XBEHC=0 "RTN","XBEHRCK",146,0) S XBEHPKG="" "RTN","XBEHRCK",147,0) S X=$P(^VA(200,DUZ,0),U) "RTN","XBEHRCK",148,0) ; "RTN","XBEHRCK",149,0) D RSLT(""),RSLT("Hello, "_$P(X,",",2)_" "_$P(X,",")) "RTN","XBEHRCK",150,0) D RSLT(""),RSLT("Environment Checker for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3)_", as of "_$P($T(+2),";",6)_".") "RTN","XBEHRCK",151,0) ; "RTN","XBEHRCK",152,0) F XBEH=1:1 Q:$P($T(ENV+XBEH),";",3)="END" D "RTN","XBEHRCK",153,0) . S XBEH(0)=$P($T(ENV+XBEH),";",3) "RTN","XBEHRCK",154,0) . S XBEHNS=$P(XBEH(0),"*") "RTN","XBEHRCK",155,0) . Q:XBEHNS="" "RTN","XBEHRCK",156,0) . S XBEHVER=$P(XBEH(0),"*",2) "RTN","XBEHRCK",157,0) . S XBEHNAME=$O(^DIC(9.4,"C",XBEHNS,0)) "RTN","XBEHRCK",158,0) . S:XBEHNAME]"" XBEHNAME=$G(^DIC(9.4,XBEHNAME,0)) "RTN","XBEHRCK",159,0) . S:XBEHNAME]"" XBEHNAME=$P(XBEHNAME,U) "RTN","XBEHRCK",160,0) . D VCHK(XBEHNS,XBEHVER,XBEHNAME) "RTN","XBEHRCK",161,0) . D RSLT("") "RTN","XBEHRCK",162,0) . Q "RTN","XBEHRCK",163,0) ; "RTN","XBEHRCK",164,0) D RXCK "RTN","XBEHRCK",165,0) D RSLT(""),RSLT("ENVIRONMENT "_$S(XBEHOK:"",1:"-NOT- ")_"OK.") "RTN","XBEHRCK",166,0) I 'XBEHOK D "RTN","XBEHRCK",167,0) . D RSLT("INSTALL THE FOLLOWING PACKAGES AND PATCHES:") "RTN","XBEHRCK",168,0) . S XBEHNEED="" "RTN","XBEHRCK",169,0) . F S XBEHNEED=$O(XBEHNEED(XBEHNEED)) Q:'$L(XBEHNEED) D RSLT(XBEHNEED) "RTN","XBEHRCK",170,0) .Q "RTN","XBEHRCK",171,0) ; "RTN","XBEHRCK",172,0) D POST "RTN","XBEHRCK",173,0) ; "RTN","XBEHRCK",174,0) Q "RTN","XBEHRCK",175,0) RXCK ; "RTN","XBEHRCK",176,0) ; "RTN","XBEHRCK",177,0) N PS S PS=$P($G(^PS(59.7,1,80)),U,2) "RTN","XBEHRCK",178,0) I 'PS D "RTN","XBEHRCK",179,0) . S XBEHMSG="The Pharmacy Data Management package must be installed, and the Orderable Item Auto Create run to completion." "RTN","XBEHRCK",180,0) . D RSLT(XBEHMSG) "RTN","XBEHRCK",181,0) . S XBEHNEED("Pharmacy Data Management")="" "RTN","XBEHRCK",182,0) I PS=1 D "RTN","XBEHRCK",183,0) . S XBEHMSG="The Orderable Item Auto Create in Pharmacy Data Management package must be run to completion." "RTN","XBEHRCK",184,0) . D RSLT(XBEHMSG) "RTN","XBEHRCK",185,0) . S XBEHNEED("Pharmacy Data Management Orderable Item Auto Create")="" "RTN","XBEHRCK",186,0) I PS=2 D "RTN","XBEHRCK",187,0) . S XBEHMSG="The Manual Matching Process for Orderable Items in Pharmacy Data Management package has not been completed." "RTN","XBEHRCK",188,0) . D RSLT(XBEHMSG) "RTN","XBEHRCK",189,0) . S XBEHNEED("Pharmacy Data Management Manual Matching Process must be completed.")="" "RTN","XBEHRCK",190,0) I $P($G(^PS(59.7,1,80)),"^",3)'=3 D "RTN","XBEHRCK",191,0) . S XBEHMSG="Pharmacy Dosage Conversion is not complete." "RTN","XBEHRCK",192,0) . D RSLT(XBEHMSG) "RTN","XBEHRCK",193,0) . S XBEHNEED("Pharmacy Dosage Conversion must be completed.")="" "RTN","XBEHRCK",194,0) Q "RTN","XBEHRCK",195,0) ; "RTN","XBEHRCK",196,0) VCHK(XBEHPRE,XBEHVER,XBEHNAME) ; ----------------------------------------------------- "RTN","XBEHRCK",197,0) ; Check versions needed. "RTN","XBEHRCK",198,0) ; Modifies XBEHNEED "RTN","XBEHRCK",199,0) ; "RTN","XBEHRCK",200,0) NEW XBEHV,XBEHMSG "RTN","XBEHRCK",201,0) I XBEHNAME'=XBEHPKG D "RTN","XBEHRCK",202,0) . D RSLT("") "RTN","XBEHRCK",203,0) . S XBEHPKG=XBEHNAME "RTN","XBEHRCK",204,0) . S XBEHV=$$VERSION^XPDUTL(XBEHPRE) "RTN","XBEHRCK",205,0) . S XBEHMSG=XBEHNAME_$S(XBEHNAME]"":":",1:"")_" Need at least "_XBEHPRE_" v "_XBEHVER "RTN","XBEHRCK",206,0) . I +XBEHV S XBEHMSG=XBEHMSG_"....."_XBEHPRE_" v "_XBEHV_" is installed." "RTN","XBEHRCK",207,0) . E S XBEHMSG=XBEHMSG_"....."_XBEHPRE_" is not installed." "RTN","XBEHRCK",208,0) . D RSLT(XBEHMSG) "RTN","XBEHRCK",209,0) . I XBEHV0 "RTN","XBEHRCK",252,0) Q:'$D(^DIC(9.4,"C",X)) "RTN","XBEHRCK",253,0) D RSLT(" You Have More Than One Entry In The") "RTN","XBEHRCK",254,0) D RSLT(" PACKAGE File with an "_X_" prefix.") "RTN","XBEHRCK",255,0) D RSLT(" One entry needs to be deleted.") "RTN","XBEHRCK",256,0) Q "RTN","XBEHRCK",257,0) POST ; ----------------------------------------------------- "RTN","XBEHRCK",258,0) NEW XMSUB,XMDUZ,XMTEXT,XMY "RTN","XBEHRCK",259,0) S XMSUB=$P($P($T(+1),";",2)," ",3,99),XMDUZ=$G(DUZ,.5),XMTEXT="^TMP(""XBEHRCK"",$J,",XMY(1)="",XMY(DUZ)="" "RTN","XBEHRCK",260,0) D SINGLE("XUPROGMODE") "RTN","XBEHRCK",261,0) NEW DIFROM "RTN","XBEHRCK",262,0) D ^XMD "RTN","XBEHRCK",263,0) KILL ^TMP("XBEHRCK",$J) "RTN","XBEHRCK",264,0) D RSLT("") "RTN","XBEHRCK",265,0) D RSLT("The results are in your MailMan 'IN' basket.") "RTN","XBEHRCK",266,0) Q "RTN","XBEHRCK",267,0) ; ----------------------------------------------------- "RTN","XBEHRCK",268,0) SINGLE(K) ; Get holders of a single key K. "RTN","XBEHRCK",269,0) NEW Y "RTN","XBEHRCK",270,0) S Y=0 "RTN","XBEHRCK",271,0) Q:'$D(^XUSEC(K)) "RTN","XBEHRCK",272,0) F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)="" "RTN","XBEHRCK",273,0) Q "RTN","XBEHRCK",274,0) ; ----------------------------------------------------- "RTN","XBEHRCK",275,0) RSLT(%) ;S ^(0)=$G(^TMP("XBEHRCK",$J,0))+1,^(^(0))=% "RTN","XBEHRCK",276,0) ;More readable: "RTN","XBEHRCK",277,0) S ^TMP("XBEHRCK",$J,0)=$G(^TMP("XBEHRCK",$J,0))+1 "RTN","XBEHRCK",278,0) S ^TMP("XBEHRCK",$J,^TMP("XBEHRCK",$J,0))=% "RTN","XBEHRCK",279,0) W !,% "RTN","XBEHRCK",280,0) Q "RTN","XBEHRCK",281,0) ; "RTN","XBEHRCK",282,0) ASKDEV ;EP "RTN","XBEHRCK",283,0) K IOP "RTN","XBEHRCK",284,0) S %ZIS="NQ" D ^%ZIS Q:POP "RTN","XBEHRCK",285,0) S IOP=ION "RTN","XBEHRCK",286,0) S %ZIS("IOPAR")=IOPAR "RTN","XBEHRCK",287,0) I $D(IO("Q")) D QUE I '$D(ZTQUEUED) K IOP G ASKDEV "RTN","XBEHRCK",288,0) I $D(IO("Q")) D HOME^%ZIS W !,"REPORT IS QUEUED!" "RTN","XBEHRCK",289,0) Q "RTN","XBEHRCK",290,0) ; "RTN","XBEHRCK",291,0) QUE ; "RTN","XBEHRCK",292,0) S ZTRTN="ZTM^XBEHRCK",ZTDESC="EHR ENVIRONMENT CHECK" "RTN","XBEHRCK",293,0) S ZTSAVE("IOP")="" "RTN","XBEHRCK",294,0) D ^%ZTLOAD "RTN","XBEHRCK",295,0) Q "RTN","XBENHANC") 0^47^B4107547 "RTN","XBENHANC",1,0) XBENHANC ; IHS/ADC/GTH - DISPLAY/PRINT ENHANCEMENTS FIELD IN PACKAGE FILE ; [ 02/07/97 3:02 PM ] "RTN","XBENHANC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBENHANC",3,0) ; "RTN","XBENHANC",4,0) ; Print enhancements to a package, from the entry in the "RTN","XBENHANC",5,0) ; PACKAGE file. Entry point EN^XBENHANC(ns) is used, with "RTN","XBENHANC",6,0) ; the caller providing the namespace of the package. "RTN","XBENHANC",7,0) ; "RTN","XBENHANC",8,0) EN(XB) ;PEP - XB = Namespace of package to print enhancements. "RTN","XBENHANC",9,0) Q:'($G(XB)]"") "RTN","XBENHANC",10,0) D HOME^%ZIS,DT^DICRW "RTN","XBENHANC",11,0) DEV ; "RTN","XBENHANC",12,0) S %ZIS="OPQ" "RTN","XBENHANC",13,0) D ^%ZIS "RTN","XBENHANC",14,0) I POP S IOP=$I D ^%ZIS G K "RTN","XBENHANC",15,0) G:'$D(IO("Q")) START "RTN","XBENHANC",16,0) KILL IO("Q") "RTN","XBENHANC",17,0) I $D(IO("S"))!($E(IOST)'="P") W *7,!,"Please queue to system printers." D ^%ZISC G DEV "RTN","XBENHANC",18,0) S ZTRTN="START^XBENHANC",ZTDESC=$P($P($T(XBENHANC),"-",2),";",2),ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL,ZTSAVE("XB")="" "RTN","XBENHANC",19,0) D ^%ZTLOAD "RTN","XBENHANC",20,0) G:'$D(ZTSK) DEV "RTN","XBENHANC",21,0) K ; "RTN","XBENHANC",22,0) KILL ZTSK "RTN","XBENHANC",23,0) D ^%ZISC "RTN","XBENHANC",24,0) Q "RTN","XBENHANC",25,0) ; "RTN","XBENHANC",26,0) START ;EP - TaskMan. "RTN","XBENHANC",27,0) NEW A,B,DIRUT,DIWL,DIWR,DIWF,XBHDR,XBPG "RTN","XBENHANC",28,0) S A=$O(^DIC(9.4,"C",XB,0)) "RTN","XBENHANC",29,0) Q:'A "RTN","XBENHANC",30,0) Q:'$D(^DIC(9.4,A,"VERSION")) "RTN","XBENHANC",31,0) S B=$O(^DIC(9.4,A,22,"B",^DIC(9.4,A,"VERSION"),0)) "RTN","XBENHANC",32,0) Q:'B "RTN","XBENHANC",33,0) S XBHDR="Enhancements to "_$P(^DIC(9.4,A,0),U)_", Version "_^DIC(9.4,A,"VERSION") "RTN","XBENHANC",34,0) KILL ^UTILITY($J,"W") "RTN","XBENHANC",35,0) S DIWL=5,DIWR=IOM-6,DIWF="W" "RTN","XBENHANC",36,0) U IO "RTN","XBENHANC",37,0) D TOF "RTN","XBENHANC",38,0) S %=0 "RTN","XBENHANC",39,0) F S %=$O(^DIC(9.4,A,22,B,1,%)) Q:'% D DIWP(^(%,0)),TOF:$Y>(IOSL-6) Q:$D(DIRUT) "RTN","XBENHANC",40,0) D:'$D(DIRUT) ^DIWW "RTN","XBENHANC",41,0) KILL ^UTILITY($J,"W") "RTN","XBENHANC",42,0) D ^%ZISC "RTN","XBENHANC",43,0) Q "RTN","XBENHANC",44,0) ; "RTN","XBENHANC",45,0) DIWP(X) ; "RTN","XBENHANC",46,0) NEW %,A,B "RTN","XBENHANC",47,0) D ^DIWP "RTN","XBENHANC",48,0) Q "RTN","XBENHANC",49,0) ; "RTN","XBENHANC",50,0) TOF ; "RTN","XBENHANC",51,0) NEW %,A,B "RTN","XBENHANC",52,0) S XBPG=$G(XBPG)+1 "RTN","XBENHANC",53,0) W !! "RTN","XBENHANC",54,0) I '$D(ZTQUEUED),'$D(IO("S")),IO=IO(0),$$DIR^XBDIR("E") "RTN","XBENHANC",55,0) Q:$D(DIRUT) "RTN","XBENHANC",56,0) W @IOF,!!,?DIWL-1,XBHDR,?(DIWR-$L("Page "_XBPG)-1),"Page ",XBPG,!?DIWL-1,$$REPEAT^XLFSTR("-",DIWR-DIWL),!! "RTN","XBENHANC",57,0) Q "RTN","XBENHANC",58,0) ; "RTN","XBFCMP") 0^48^B24082313 "RTN","XBFCMP",1,0) XBFCMP ; IHS/ADC/GTH - COMPARES FILEMAN FILES IN TWO UCIs ; [ 10/29/2002 7:42 AM ] "RTN","XBFCMP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFCMP",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBFCMP",4,0) ; "RTN","XBFCMP",5,0) ; Ignores the following: "RTN","XBFCMP",6,0) ; ^DD(file,0,"PT", "RTN","XBFCMP",7,0) ; ^DD(file,field,1,0) "RTN","XBFCMP",8,0) ; ^DD(file,field,21 "RTN","XBFCMP",9,0) ; ^DD(file,field,"DT" "RTN","XBFCMP",10,0) ; "RTN","XBFCMP",11,0) ; If a field does not exist in one file, a message is "RTN","XBFCMP",12,0) ; displayed and all sub-nodes of that field are ignored. "RTN","XBFCMP",13,0) ; "RTN","XBFCMP",14,0) ; If the compare is limited to fields containing a "RTN","XBFCMP",15,0) ; particular GROUP, the second pass, which checks for "RTN","XBFCMP",16,0) ; entries in the secondary UCI not in the primary UCI, is "RTN","XBFCMP",17,0) ; not executed. On the first pass the GROUP multiple in the "RTN","XBFCMP",18,0) ; secondary UCI is ignored. "RTN","XBFCMP",19,0) ; "RTN","XBFCMP",20,0) START ; "RTN","XBFCMP",21,0) NEW XBWHERE S XBWHERE=$S($$VERSION^%ZOSV(1)["Cache":"Namespace",1:"UCI") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",22,0) NEW GROUP "RTN","XBFCMP",23,0) ; W !,"This program compares FileMan files in two different UCIs." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",24,0) W !,"This program compares FileMan files in two different ",XBWHERE,"s." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",25,0) S U="^" "RTN","XBFCMP",26,0) X ^%ZOSF("UCI") "RTN","XBFCMP",27,0) S XBFCMPU1=$P(Y,",",1) "RTN","XBFCMP",28,0) ;W !!,"Primary UCI is ",XBFCMPU1 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",29,0) W !!,"Primary ",XBWHERE," is ",XBFCMPU1 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",30,0) D GET2ND "RTN","XBFCMP",31,0) I XBFCMPU2="" W !!,"Bye",! D EOJ Q "RTN","XBFCMP",32,0) D ^XBDSET "RTN","XBFCMP",33,0) I '$D(^UTILITY("XBDSET",$J)) W !!,"No files selected",! D EOJ Q "RTN","XBFCMP",34,0) R !!,"Only check fields with GROUP: ",GROUP:$G(DTIME,999) "RTN","XBFCMP",35,0) I GROUP="" KILL GROUP "RTN","XBFCMP",36,0) S XBFCMPFL="" "RTN","XBFCMP",37,0) F XBFCMPL=0:0 S XBFCMPFL=$O(^UTILITY("XBDSET",$J,XBFCMPFL)) Q:XBFCMPFL'=+XBFCMPFL D XBFCMPFL "RTN","XBFCMP",38,0) D EOJ "RTN","XBFCMP",39,0) Q "RTN","XBFCMP",40,0) ; "RTN","XBFCMP",41,0) XBFCMPFL ; "RTN","XBFCMP",42,0) W !!,XBFCMPFL,! "RTN","XBFCMP",43,0) F XBFCMPG="DIC","DD" D COMPARE "RTN","XBFCMP",44,0) S XBCDFILE=XBFCMPFL "RTN","XBFCMP",45,0) D SBTRACE "RTN","XBFCMP",46,0) S XBFCMPFL=XBCDFILE "RTN","XBFCMP",47,0) Q "RTN","XBFCMP",48,0) ; "RTN","XBFCMP",49,0) COMPARE ; "RTN","XBFCMP",50,0) S XBFCMPP="^["""_XBFCMPU1_"""]"_XBFCMPG_"("_XBFCMPFL_","_$S(XBFCMPG="DIC":"0,",1:"") "RTN","XBFCMP",51,0) S XBFCMPS="^["""_XBFCMPU2_"""]"_XBFCMPG_"("_XBFCMPFL_","_$S(XBFCMPG="DIC":"0,",1:"") "RTN","XBFCMP",52,0) ;I '$D(@($E(XBFCMPS,1,$L(XBFCMPS)-1)_")")) W " File not in ^",XBFCMPG," of secondary UCI" Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",53,0) I '$D(@($E(XBFCMPS,1,$L(XBFCMPS)-1)_")")) W " File not in ^",XBFCMPG," of secondary ",XBWHERE Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",54,0) S XBGP=XBFCMPP,XBGS=XBFCMPS,XBGPASS=1 "RTN","XBFCMP",55,0) D XBGCMP "RTN","XBFCMP",56,0) S XBGP=XBFCMPS,XBGS=XBFCMPP,XBGPASS=2 "RTN","XBFCMP",57,0) D XBGCMP "RTN","XBFCMP",58,0) Q "RTN","XBFCMP",59,0) ; "RTN","XBFCMP",60,0) SBTRACE ; CHECK ALL SUB-FILES "RTN","XBFCMP",61,0) KILL XBCDSFL "RTN","XBFCMP",62,0) S XBCDC=1,XBCDSFL="",XBCDSFL(XBCDC)=XBCDFILE "RTN","XBFCMP",63,0) F XBCDL=0:0 S XBCDI=$O(XBCDSFL("")) Q:XBCDI="" S XBCDSF=XBCDSFL(XBCDI) D SBTRACE2 S XBCDI=$O(XBCDSFL("")) W "." KILL XBCDSFL(XBCDI) "RTN","XBFCMP",64,0) KILL XBCDC,XBCDI,XBCDSF,XBCDSFL,XBCDY,XBCDZ "RTN","XBFCMP",65,0) Q "RTN","XBFCMP",66,0) ; "RTN","XBFCMP",67,0) SBTRACE2 ; "RTN","XBFCMP",68,0) S XBCDI=0 "RTN","XBFCMP",69,0) F XBCDL=0:0 S XBCDI=$O(^DD(XBCDSF,"SB",XBCDI)) Q:XBCDI="" W "." S XBCDC=XBCDC+1,XBCDSFL(XBCDC)=XBCDI D SBTRACE3 "RTN","XBFCMP",70,0) Q "RTN","XBFCMP",71,0) ; "RTN","XBFCMP",72,0) SBTRACE3 ; "RTN","XBFCMP",73,0) W !!,XBCDI,! "RTN","XBFCMP",74,0) S XBFCMPG="DD",XBFCMPFL=XBCDI "RTN","XBFCMP",75,0) D COMPARE "RTN","XBFCMP",76,0) Q "RTN","XBFCMP",77,0) ; "RTN","XBFCMP",78,0) GET2ND ; GET SECONDARY UCI "RTN","XBFCMP",79,0) S XBFCMPU2="" "RTN","XBFCMP",80,0) ;R !!,"Secondary UCI: ",X:$G(DTIME,999) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",81,0) W !!,"Secondary ",XBWHERE,": " R X:$G(DTIME,999) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFCMP",82,0) Q:X=""!(X="^") "RTN","XBFCMP",83,0) S XBFCMPU2=X "RTN","XBFCMP",84,0) Q "RTN","XBFCMP",85,0) ; "RTN","XBFCMP",86,0) EOJ ; "RTN","XBFCMP",87,0) KILL C,I,GDFN,GROOT,L,NOGROUP,NT,P,T,T1,T2,T3,T4,T5,T6,TT,ZZ "RTN","XBFCMP",88,0) KILL XBCDFILE,XBCDL "RTN","XBFCMP",89,0) KILL %UCI,%UCN,XBFCMPFL,XBFCMPG,XBFCMPL,XBFCMPP,XBFCMPS,XBFCMPU1,XBFCMPU2,X,Y "RTN","XBFCMP",90,0) Q "RTN","XBFCMP",91,0) ; "RTN","XBFCMP",92,0) XBGCMP ; COMPARES GLOBAL TREES "RTN","XBFCMP",93,0) I $D(GROUP),XBFCMPG="DD",XBGPASS=2 Q "RTN","XBFCMP",94,0) D SEARCH "RTN","XBFCMP",95,0) KILL XBGP,XBGS,XBGPASS "RTN","XBFCMP",96,0) Q "RTN","XBFCMP",97,0) ; "RTN","XBFCMP",98,0) SEARCH ; "RTN","XBFCMP",99,0) S T="T",C=",",P=")",NT=$L(XBGP,C)-1,L=1,T1="" "RTN","XBFCMP",100,0) S TT=XBGP "RTN","XBFCMP",101,0) F I=1:1:30 S TT=TT_T_I_C "RTN","XBFCMP",102,0) EXTR ; "RTN","XBFCMP",103,0) S X=T_L,Y=$P(TT,C,1,L+NT)_P,@X=$O(@Y) "RTN","XBFCMP",104,0) I @X]"" D:$D(@(Y))#2 SUB S L=L+1,@(T_L)="" G EXTR "RTN","XBFCMP",105,0) S L=L-1 "RTN","XBFCMP",106,0) Q:L=0 "RTN","XBFCMP",107,0) G EXTR "RTN","XBFCMP",108,0) ; "RTN","XBFCMP",109,0) SUB ; "RTN","XBFCMP",110,0) W "." "RTN","XBFCMP",111,0) S ZZ=XBGS_$P(Y,XBGP,2) "RTN","XBFCMP",112,0) I $D(@Y) "RTN","XBFCMP",113,0) Q:$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",0,""PT""".E "RTN","XBFCMP",114,0) Q:$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N.".".N1",21,".E "RTN","XBFCMP",115,0) Q:$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N.".".N1",""DT""".E "RTN","XBFCMP",116,0) Q:$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N.".".N1",1,0)" "RTN","XBFCMP",117,0) I $D(SKIP),SKIP=$E($$MSMZR^ZIBNSSV,1,$L(SKIP)) Q "RTN","XBFCMP",118,0) KILL SKIP "RTN","XBFCMP",119,0) I $D(GROUP),$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N.".".N1",0)" D CHKGROUP I NOGROUP S SKIP=$E($$MSMZR^ZIBNSSV,1,$L($$MSMZR^ZIBNSSV)-3) Q "RTN","XBFCMP",120,0) I '$D(@ZZ),$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N.".".N1",0)" W !,$$MSMZR^ZIBNSSV," <",$P(@Y,"^",1)," field does not exist>" S SKIP=$E($$MSMZR^ZIBNSSV,1,$L($$MSMZR^ZIBNSSV)-3) Q "RTN","XBFCMP",121,0) I $D(GROUP),$P($$MSMZR^ZIBNSSV,"DD(",2)?.".".N.".".N1",".".".N1",20,".E Q "RTN","XBFCMP",122,0) I '$D(@ZZ) W !,$$MSMZR^ZIBNSSV,"=",@Y," " Q "RTN","XBFCMP",123,0) Q:XBGPASS=2 "RTN","XBFCMP",124,0) I @ZZ'=@Y W !,$$MSMZR^ZIBNSSV," ",!,@ZZ,!,@Y Q "RTN","XBFCMP",125,0) Q "RTN","XBFCMP",126,0) ; "RTN","XBFCMP",127,0) CHKGROUP ; "RTN","XBFCMP",128,0) S GDFN=0,NOGROUP=1,GROOT=$E($$MSMZR^ZIBNSSV,1,$L($$MSMZR^ZIBNSSV)-3) "RTN","XBFCMP",129,0) F GL=0:0 S GDFN=$O(@(GROOT_",20,GDFN)")) Q:GDFN="" I @(GROOT_",20,GDFN,0)")=GROUP S NOGROUP=0 Q "RTN","XBFCMP",130,0) I $D(@Y) "RTN","XBFCMP",131,0) Q "RTN","XBFCMP",132,0) ; "RTN","XBFDINFO") 0^49^B4300016 "RTN","XBFDINFO",1,0) XBFDINFO(FILE,FIELD,ROOT) ; IHS/ADC/GTH - RETURN FIELD INFORMATION ; [ 02/07/97 3:02 PM ] "RTN","XBFDINFO",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFDINFO",3,0) ; "RTN","XBFDINFO",4,0) ; ATTENTION PROGRAMMERS: Use line label FLD() for entry. "RTN","XBFDINFO",5,0) ; Do not use the first line for entry. "RTN","XBFDINFO",6,0) ; "RTN","XBFDINFO",7,0) ; Given a file/subfile number, a field number, and an array "RTN","XBFDINFO",8,0) ; root, this routine will return information about the "RTN","XBFDINFO",9,0) ; specified field. The information will be returned as "RTN","XBFDINFO",10,0) ; subscripted variables from the root passed by the caller. "RTN","XBFDINFO",11,0) ; "RTN","XBFDINFO",12,0) ; The field information returned will be a subset of the "RTN","XBFDINFO",13,0) ; following: "RTN","XBFDINFO",14,0) ; "RTN","XBFDINFO",15,0) ; ROOT("NAME") = name of field "RTN","XBFDINFO",16,0) ; ROOT("NODE") = node in data global "RTN","XBFDINFO",17,0) ; ROOT("PIECE") = piece in node "RTN","XBFDINFO",18,0) ; ROOT("TYPE") = FileMan field type or "M" for multiple, "RTN","XBFDINFO",19,0) ; or "C" for computed "RTN","XBFDINFO",20,0) ; ROOT("SFILE") = subfile number if the field is a multiple "RTN","XBFDINFO",21,0) ; ROOT("PFILE") = file number of pointed to file "RTN","XBFDINFO",22,0) ; ROOT("PGBL") = gbl of pointed to file "RTN","XBFDINFO",23,0) ; ROOT("DINUM") = existance indicates DINUM pointer "RTN","XBFDINFO",24,0) ; "RTN","XBFDINFO",25,0) ; ROOT("VPFILE",file) = variable pointer prefix. 'file' is "RTN","XBFDINFO",26,0) ; pointed to file "RTN","XBFDINFO",27,0) ; ROOT("VPGBL",file) = variable pointer gbl of pointed to "RTN","XBFDINFO",28,0) ; file. 'file' is pointed to file "RTN","XBFDINFO",29,0) ; "RTN","XBFDINFO",30,0) ; Formal list: "RTN","XBFDINFO",31,0) ; "RTN","XBFDINFO",32,0) ; 1) FILE = file/subfile number (call by value) "RTN","XBFDINFO",33,0) ; 2) FIELD = field number (call by value) "RTN","XBFDINFO",34,0) ; 3) ROOT = array root (call by reference) "RTN","XBFDINFO",35,0) ; "RTN","XBFDINFO",36,0) START ; "RTN","XBFDINFO",37,0) KILL ROOT "RTN","XBFDINFO",38,0) NEW W,X,Y,Z "RTN","XBFDINFO",39,0) Q:FILE'=+FILE "RTN","XBFDINFO",40,0) Q:FIELD'=+FIELD "RTN","XBFDINFO",41,0) Q:'$D(^DD(FILE,FIELD,0)) S X=^(0) "RTN","XBFDINFO",42,0) S ROOT("NAME")=$P(X,"^",1) "RTN","XBFDINFO",43,0) I $P(X,"^",2)["C" S ROOT("TYPE")="C" Q "RTN","XBFDINFO",44,0) S ROOT("NODE")=$S(FIELD=.001:"",1:$P($P(X,"^",4),";",1)) "RTN","XBFDINFO",45,0) S ROOT("PIECE")=$S(FIELD=.001:"",1:$P($P(X,"^",4),";",2)) "RTN","XBFDINFO",46,0) S Y=$P(X,"^",2) "RTN","XBFDINFO",47,0) S ROOT("TYPE")=$S(Y["F":"F",Y["C":"C",Y["D":"D",Y["K":"K",Y["N":"N",Y["P":"P",Y["S":"S",Y["V":"V",Y["K":"K",Y["W":"W",1:"?") "RTN","XBFDINFO",48,0) I +$P(X,"^",2) S ROOT("SFILE")=+$P(X,"^",2),ROOT("TYPE")="M" I 1 "RTN","XBFDINFO",49,0) E S:Y["P" ROOT("PFILE")=+$P(Y,"P",2),ROOT("PGBL")=$P(X,"^",3),@($S($P(X,"^",5,99)["DINUM"&(FIELD=.01):"ROOT(""DINUM"")",1:"Z"))="" "RTN","XBFDINFO",50,0) I Y["V" F Z=0:0 S Z=$O(^DD(FILE,FIELD,"V","B",Z)) Q:Z'=+Z S W=$O(^(Z,"")),ROOT("VPFILE",Z)=$P(^DD(FILE,FIELD,"V",W,0),"^",4),ROOT("VPGBL",Z)=^DIC(Z,0,"GL") "RTN","XBFDINFO",51,0) Q "RTN","XBFDINFO",52,0) ; "RTN","XBFDINFO",53,0) FLD(FILE,FIELD,ROOT) ;PEP - Return information about a field. "RTN","XBFDINFO",54,0) G START "RTN","XBFDINFO",55,0) ; "RTN","XBFIXL1") 0^50^B13992025 "RTN","XBFIXL1",1,0) XBFIXL1 ; IHS/ADC/GTH - STANDARDIZE LINE 1 OF SELECTED ROUTINES ; [ 10/29/2002 7:42 AM ] "RTN","XBFIXL1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFIXL1",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBFIXL1",4,0) ; "RTN","XBFIXL1",5,0) ; This routine asks user to select a set of routines, asks "RTN","XBFIXL1",6,0) ; the user for the programmer information and standardizes "RTN","XBFIXL1",7,0) ; the format of the first line of each routine. "RTN","XBFIXL1",8,0) ; "RTN","XBFIXL1",9,0) ; The form of the first line will be as follows: "RTN","XBFIXL1",10,0) ; "RTN","XBFIXL1",11,0) ; label ; agency/site/developer - comment ; edit date E.G. "RTN","XBFIXL1",12,0) ; XBFIXL1 ; IHS/ADC/GTH - FIX LINE 1 ; [ 11/08/90 10:41 AM ] "RTN","XBFIXL1",13,0) ; "RTN","XBFIXL1",14,0) START ; "RTN","XBFIXL1",15,0) NEW ASK,QUIT,RTN "RTN","XBFIXL1",16,0) S QUIT=0 "RTN","XBFIXL1",17,0) D ^XBKTMP,^XBKVAR "RTN","XBFIXL1",18,0) X ^%ZOSF("RSEL") "RTN","XBFIXL1",19,0) I $D(^UTILITY($J,"XBFIXL1")) W !,"^XBFIXL1 cannot modify itself. Ignored." KILL ^UTILITY($J,"XBFIXL1") "RTN","XBFIXL1",20,0) G:$O(^UTILITY($J,""))="" EOJ "RTN","XBFIXL1",21,0) S XBPI=$$DIR^XBDIR("F^9:20","Enter agency/site/programmer","","","E.G IHS/OHPRD/ACC") "RTN","XBFIXL1",22,0) G:$D(DIRUT) EOJ "RTN","XBFIXL1",23,0) ;S XBRTN="";IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFIXL1",24,0) S XBRTN=0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFIXL1",25,0) F S XBRTN=$O(^UTILITY($J,XBRTN)) Q:XBRTN="" D CHECK Q:QUIT "RTN","XBFIXL1",26,0) G EOJ "RTN","XBFIXL1",27,0) ; "RTN","XBFIXL1",28,0) CHECK ; "RTN","XBFIXL1",29,0) KILL ^TMP("XBFIXL1",$J) "RTN","XBFIXL1",30,0) S DIF="^TMP(""XBFIXL1"",$J,",XCNP=0,X=XBRTN "RTN","XBFIXL1",31,0) X ^%ZOSF("LOAD") "RTN","XBFIXL1",32,0) S XBL1=^TMP("XBFIXL1",$J,1,0) "RTN","XBFIXL1",33,0) I $E($P(XBL1," ",2))'=";" W !!,XBRTN," - line 1 contains code and must be changed manually. Skipping" Q "RTN","XBFIXL1",34,0) S XBSAVE=XBL1 "RTN","XBFIXL1",35,0) D MODIFY "RTN","XBFIXL1",36,0) REVER ; "RTN","XBFIXL1",37,0) D VERIFY "RTN","XBFIXL1",38,0) Q:QUIT "RTN","XBFIXL1",39,0) D:Y="R" FIX "RTN","XBFIXL1",40,0) I QUIT S XBL1=XBSAVE G REVER "RTN","XBFIXL1",41,0) I XBL1]"" S ^TMP("XBFIXL1",$J,1,0)=XBL1,DIE=DIF,XCN=0,X=XBRTN X ^%ZOSF("SAVE") "RTN","XBFIXL1",42,0) Q "RTN","XBFIXL1",43,0) ; "RTN","XBFIXL1",44,0) MODIFY ; Modify Line 1. "RTN","XBFIXL1",45,0) S XBTAG=$P(XBL1," "),X=$P(XBL1,";",2,99) "RTN","XBFIXL1",46,0) D EXTDATE "RTN","XBFIXL1",47,0) F Q:$E(X)'=" " S X=$E(X,2,$L(X)) "RTN","XBFIXL1",48,0) S:$P(X,";")?." " $P(X,";")=XBPI_" - NO DESCRIPTION PROVIDED" "RTN","XBFIXL1",49,0) S %=$P(X,";") "RTN","XBFIXL1",50,0) I %'["-",$P(%," ")?1A.AN1"/"1A.AN.E S $P(%," ")=$P(%," ")_" - ",$P(X,";")=% "RTN","XBFIXL1",51,0) F S %=$F(X,";") Q:'% S X=$E(X,1,%-2)_" "_$E(X,%,$L(X)) "RTN","XBFIXL1",52,0) F S %=$F(X," ") Q:'% S X=$E(X,1,%-3)_" "_$E(X,%,$L(X)) "RTN","XBFIXL1",53,0) S:$E(X)=" " X=$E(X,2,$L(X)) S:$E(X,$L(X))=" " X=$E(X,1,$L(X)-1) "RTN","XBFIXL1",54,0) I X["-" S %=$P($P(X,"-")," ") S %=(%["/")*(1+($P($P(X,"-"),%,2)?." ")) S:%=1 $P(X," ")=XBPI_" -" S:%=2 $P(X,"-")=XBPI_" " S:'% X=XBPI_" - "_X "RTN","XBFIXL1",55,0) I X'["-" S X=XBPI_" - "_X "RTN","XBFIXL1",56,0) S XBL1=XBTAG_" ; "_X_" ;"_$S(XBDATE]"":" [ "_XBDATE_" ]",1:"") "RTN","XBFIXL1",57,0) Q "RTN","XBFIXL1",58,0) ; "RTN","XBFIXL1",59,0) EXTDATE ; Extract date and remove from Line. "RTN","XBFIXL1",60,0) S XBNP=$L(X,";"),XBLP=$P(X,";",XBNP) "RTN","XBFIXL1",61,0) F XBPAT=("1.2N1""/""1.2N1""/""2.4N"),("1.2N1"" ""3A1"" ""2.4N"),("1.2N1""-""3A1""-""2.4N") S XBLDT=$$GETPATRN^XBFUNC(XBLP,XBPAT) Q:XBLDT]"" "RTN","XBFIXL1",62,0) I XBLDT="" S XBDATE="" Q "RTN","XBFIXL1",63,0) S XBLTM=$$GETPATRN^XBFUNC($P(XBLP,XBLDT,2),"1.2N1"":""1.2N1"" ""2A") "RTN","XBFIXL1",64,0) S:XBLTM]"" XBLDT=XBLDT_" "_XBLTM "RTN","XBFIXL1",65,0) S XBLP=$P(XBLP,XBLDT)_$P(XBLP,XBLDT,2) "RTN","XBFIXL1",66,0) S XBLDJ=$$FNDPATRN^XBFUNC(XBLP,"."" ""1""["".E1""]"".E") "RTN","XBFIXL1",67,0) S:XBLDJ XBLP=$E(XBLP,1,XBLDJ-1) "RTN","XBFIXL1",68,0) S $P(X,";",XBNP)=XBLP "RTN","XBFIXL1",69,0) S XBDATE=XBLDT "RTN","XBFIXL1",70,0) Q "RTN","XBFIXL1",71,0) ; "RTN","XBFIXL1",72,0) VERIFY ; Ask user to verify mod. "RTN","XBFIXL1",73,0) W !!,XBRTN,!," from: ",XBSAVE,!," to: ",XBL1 "RTN","XBFIXL1",74,0) S Y=$$DIR^XBDIR("S^A:Accept;R:Replace;S:Skip","","A","","Accept the proposed modification; Replace the proposal with your own line; Skip the routine") "RTN","XBFIXL1",75,0) S:$D(DIRUT) QUIT=1 "RTN","XBFIXL1",76,0) S:Y="S" XBL1="" "RTN","XBFIXL1",77,0) Q "RTN","XBFIXL1",78,0) ; "RTN","XBFIXL1",79,0) FIX ; Get comment from user. "RTN","XBFIXL1",80,0) S X=$$DIR^XBDIR("F^5:40","Enter comment to follow agency/site/programmer ") "RTN","XBFIXL1",81,0) S:$D(DIRUT) QUIT=1 "RTN","XBFIXL1",82,0) S $P(XBL1,";",2)=XBPI_" - "_X "RTN","XBFIXL1",83,0) Q "RTN","XBFIXL1",84,0) ; "RTN","XBFIXL1",85,0) EOJ ; "RTN","XBFIXL1",86,0) D ^XBKTMP "RTN","XBFIXL1",87,0) KILL DIF,XCNP,DIE,XCN "RTN","XBFIXL1",88,0) KILL %,X,Y,^UTILITY($J) "RTN","XBFIXL1",89,0) KILL DTOUT,DUOUT,DIRUT,DIROUT "RTN","XBFIXL1",90,0) KILL XBDATE,XBL1,XBLDJ,XBLDT,XBLP,XBLTM,XBNP,XBPAT,XBPI,XBRTN,XBSAVE,XBTAG "RTN","XBFIXL1",91,0) Q "RTN","XBFIXL1",92,0) ; "RTN","XBFIXPT") 0^51^B10219411 "RTN","XBFIXPT",1,0) XBFIXPT ; IHS/ADC/GTH - FIX ALL "PT" NODES ; [ 11/04/97 10:26 AM ] "RTN","XBFIXPT",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFIXPT",3,0) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent UNDEF if ^DD entry incorrect. "RTN","XBFIXPT",4,0) ; "RTN","XBFIXPT",5,0) ; This routine fixes all "PT" nodes for files 1 through the "RTN","XBFIXPT",6,0) ; highest file number in the current UCI. "RTN","XBFIXPT",7,0) ; "RTN","XBFIXPT",8,0) START ; "RTN","XBFIXPT",9,0) W:'$D(XBFIXPT("NOTALK")) !!,"This routine insures the ""PT"" node of each FileMan file is correct.",! "RTN","XBFIXPT",10,0) W:'$D(XBFIXPT("NOTALK")) !!,"Now checking false positives.",! "RTN","XBFIXPT",11,0) S U="^" "RTN","XBFIXPT",12,0) S XBFFILE=.99999999 "RTN","XBFIXPT",13,0) F XBFL=0:0 S XBFFILE=$O(^DD(XBFFILE)) Q:XBFFILE'=+XBFFILE I $D(^DD(XBFFILE,0,"PT")) W:'$D(XBFIXPT("NOTALK")) !,XBFFILE D FPOS "RTN","XBFIXPT",14,0) W:'$D(XBFIXPT("NOTALK")) !!,"Now checking false negatives.",! "RTN","XBFIXPT",15,0) D FNEG "RTN","XBFIXPT",16,0) KILL XBFFILE,XBFL "RTN","XBFIXPT",17,0) W:'$D(XBFIXPT("NOTALK")) !!,"DONE",! "RTN","XBFIXPT",18,0) Q "RTN","XBFIXPT",19,0) ; "RTN","XBFIXPT",20,0) FPOS ; CHECK FOR FALSE POSITIVES "RTN","XBFIXPT",21,0) S XBFPFILE="" "RTN","XBFIXPT",22,0) F XBFL=0:0 S XBFPFILE=$O(^DD(XBFFILE,0,"PT",XBFPFILE)) Q:XBFPFILE="" S XBFPFLD="" F XBFL=0:0 S XBFPFLD=$O(^DD(XBFFILE,0,"PT",XBFPFILE,XBFPFLD)) Q:XBFPFLD="" D CHKIT "RTN","XBFIXPT",23,0) KILL XBFPFILE,XBFPFLD,XBFX "RTN","XBFIXPT",24,0) Q "RTN","XBFIXPT",25,0) ; "RTN","XBFIXPT",26,0) CHKIT ; "RTN","XBFIXPT",27,0) W:'$D(XBFIXPT("NOTALK")) "." "RTN","XBFIXPT",28,0) I '$D(^DD(XBFPFILE)) W:'$D(XBFIXPT("NOTALK")) "|" KILL ^DD(XBFFILE,0,"PT",XBFPFILE) Q "RTN","XBFIXPT",29,0) ; I '$D(^DD(XBFPFILE,XBFPFLD)) W:'$D(XBFIXPT("NOTALK")) "|" KILL ^DD(XBFFILE,0,"PT",XBFPFILE,XBFPFLD) Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent UNDEF if ^DD entry incorrect. "RTN","XBFIXPT",30,0) I '$D(^DD(XBFPFILE,XBFPFLD,0)) W:'$D(XBFIXPT("NOTALK")) "|" KILL ^DD(XBFFILE,0,"PT",XBFPFILE,XBFPFLD) Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent UNDEF if ^DD entry incorrect. "RTN","XBFIXPT",31,0) S XBFX=$P(^DD(XBFPFILE,XBFPFLD,0),U,2) "RTN","XBFIXPT",32,0) I XBFX["P",XBFX[XBFFILE Q "RTN","XBFIXPT",33,0) I XBFX["V",$D(^DD(XBFPFILE,XBFPFLD,"V","B",XBFFILE)) Q "RTN","XBFIXPT",34,0) W:'$D(XBFIXPT("NOTALK")) "|" "RTN","XBFIXPT",35,0) KILL ^DD(XBFFILE,0,"PT",XBFPFILE,XBFPFLD) "RTN","XBFIXPT",36,0) Q "RTN","XBFIXPT",37,0) ; "RTN","XBFIXPT",38,0) FNEG ; CHECK FOR FALSE NEGATIVES "RTN","XBFIXPT",39,0) S XBFFILE=.99999999 "RTN","XBFIXPT",40,0) F XBFL=0:0 S XBFFILE=$O(^DD(XBFFILE)) Q:XBFFILE'=+XBFFILE W:'$D(XBFIXPT("NOTALK")) !,XBFFILE S XBFFLD=0 F XBFL=0:0 S XBFFLD=$O(^DD(XBFFILE,XBFFLD)) Q:XBFFLD'=+XBFFLD D:$D(^(XBFFLD,0))#2 PTRCHK "RTN","XBFIXPT",41,0) KILL XBFFILE,XBFFLD,XBFX,XBFI "RTN","XBFIXPT",42,0) Q "RTN","XBFIXPT",43,0) ; "RTN","XBFIXPT",44,0) PTRCHK ; "RTN","XBFIXPT",45,0) S XBFX=$P(^DD(XBFFILE,XBFFLD,0),U,2) "RTN","XBFIXPT",46,0) I XBFX["V" D PTRCHK2 Q "RTN","XBFIXPT",47,0) Q:XBFX'["P" "RTN","XBFIXPT",48,0) F XBFI=1:1:$L(XBFX)+1 Q:$E(XBFX,XBFI)?1N "RTN","XBFIXPT",49,0) Q:XBFI>$L(XBFX) "RTN","XBFIXPT",50,0) S XBFX=$E(XBFX,XBFI,999),XBFX=+XBFX "RTN","XBFIXPT",51,0) Q:'XBFX "RTN","XBFIXPT",52,0) Q:XBFX<1 ;*** DOES NOT MESS WITH FILE NUMBERS < 1 *** "RTN","XBFIXPT",53,0) W:'$D(XBFIXPT("NOTALK")) "." "RTN","XBFIXPT",54,0) Q:'$D(^DIC(XBFX)) "RTN","XBFIXPT",55,0) Q:'$D(^DD(XBFX,0)) "RTN","XBFIXPT",56,0) I '$D(^DD(XBFX,0,"PT",XBFFILE,XBFFLD)) W "|" S ^(XBFFLD)="" "RTN","XBFIXPT",57,0) Q "RTN","XBFIXPT",58,0) ; "RTN","XBFIXPT",59,0) PTRCHK2 ; VARIABLE POINTER CHECK "RTN","XBFIXPT",60,0) S XBFX="" "RTN","XBFIXPT",61,0) F XBFL=0:0 S XBFX=$O(^DD(XBFFILE,XBFFLD,"V","B",XBFX)) Q:XBFX="" I '$D(^DD(XBFX,0,"PT",XBFFILE,XBFFLD)) W:'$D(XBFIXPT("NOTALK")) "|" S ^(XBFFLD)="" "RTN","XBFIXPT",62,0) Q "RTN","XBFIXPT",63,0) ; "RTN","XBFLD") 0^52^B37077244 "RTN","XBFLD",1,0) XBFLD ; IHS/ADC/GTH - DICTIONARY LISTING ; [ 02/07/97 3:02 PM ] "RTN","XBFLD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFLD",3,0) ; "RTN","XBFLD",4,0) ; This routine lists dictionaries which may be selected "RTN","XBFLD",5,0) ; individually or by a range of dictionary numbers. "RTN","XBFLD",6,0) ; "RTN","XBFLD",7,0) ; This routine requires the 89 MUMPS Standard, FileMan "RTN","XBFLD",8,0) ; Version 17.7 or greater, Kernel Version 6 or greater, and "RTN","XBFLD",9,0) ; the following routines must exist in the UCI in which this "RTN","XBFLD",10,0) ; routine is running: "RTN","XBFLD",11,0) ; "RTN","XBFLD",12,0) ; XBKVAR, XBSFGBL "RTN","XBFLD",13,0) ; "RTN","XBFLD",14,0) START ; "RTN","XBFLD",15,0) D LOOP ; List files until user says stop "RTN","XBFLD",16,0) D EOJ ; Clean up "RTN","XBFLD",17,0) Q "RTN","XBFLD",18,0) ; "RTN","XBFLD",19,0) LOOP ; LIST FILES UNTIL USER SAYS STOP "RTN","XBFLD",20,0) NEW XBQFLG "RTN","XBFLD",21,0) W !,"^XBFLD - This routine lists FileMan dictionaries." "RTN","XBFLD",22,0) F D INIT Q:XBQFLG D LIST W ! D ^%ZISC Q:XBQFLG "RTN","XBFLD",23,0) Q "RTN","XBFLD",24,0) ; "RTN","XBFLD",25,0) LIST ; LIST RANGE OF FILES "RTN","XBFLD",26,0) S:'$D(XBFMT) XBFMT="" "RTN","XBFLD",27,0) NEW XBCOMP,XBFILE,XBFIELD,XBLNFEED,XBNAME,XBPIECE,XBPAGE,XBPSUB,XBPSUBOL,XBSUBFIL,XBSUB,XBTAB,XBTYPE,XBWPC,XBWPSUB "RTN","XBFLD",28,0) S XBQFLG=0 "RTN","XBFLD",29,0) F XBFILE=0:0 S XBFILE=$O(^UTILITY("XBDSET",$J,XBFILE)) Q:XBFILE="" D FILE Q:XBQFLG "RTN","XBFLD",30,0) Q "RTN","XBFLD",31,0) ; "RTN","XBFLD",32,0) FILE ; LIST ONE FILE "RTN","XBFLD",33,0) S (XBCOMP,XBLNFEED,XBPAGE,XBTAB)=0,XBSUB="D0,",XBPSUBOL="" "RTN","XBFLD",34,0) D HEADING "RTN","XBFLD",35,0) D FIELDS "RTN","XBFLD",36,0) Q:XBQFLG "RTN","XBFLD",37,0) D PAUSE "RTN","XBFLD",38,0) Q "RTN","XBFLD",39,0) ; "RTN","XBFLD",40,0) FIELDS ; LIST ALL FIELDS IN ONE FILE/SUBFILE (CALLED RECURSIVELY) "RTN","XBFLD",41,0) F XBFIELD=0:0 S XBFIELD=$O(^DD(XBFILE,XBFIELD)) Q:XBFIELD'=+XBFIELD D FIELD Q:XBQFLG "RTN","XBFLD",42,0) Q "RTN","XBFLD",43,0) ; "RTN","XBFLD",44,0) FIELD ; LIST ONE FIELD "RTN","XBFLD",45,0) S (XBNAME,XBPIECE,XBPSUB,XBTYPE)="" "RTN","XBFLD",46,0) S X=^DD(XBFILE,XBFIELD,0) "RTN","XBFLD",47,0) S XBNAME=$P(X,U,1) "RTN","XBFLD",48,0) S Y=$P(X,U,2) "RTN","XBFLD",49,0) S XBTYPE=$S(+Y:"",Y["C":"C",Y["F":"F",Y["N":"N",Y["P":"P",Y["S":"S",Y["V":"V",Y["K":"K",Y["W":"W",Y["D":"D",1:"?") "RTN","XBFLD",50,0) I XBTYPE="C" D COMPUTED Q "RTN","XBFLD",51,0) I XBCOMP S XBCOMP=0 D WRITELF ; Extra lf after computed fields "RTN","XBFLD",52,0) I XBTYPE="" D MULTIPLE Q "RTN","XBFLD",53,0) S Y=$P(X,U,4) "RTN","XBFLD",54,0) S XBPSUB=XBSUB_$S($P(Y,";",1)=+$P(Y,";",1):$P(Y,";",1),1:""""_$P(Y,";",1)_"""") "RTN","XBFLD",55,0) S XBPIECE=$S(XBTYPE="K":" ",1:$P(Y,";",2)) ; MUMPS field has no piece "RTN","XBFLD",56,0) D WRITE "RTN","XBFLD",57,0) Q "RTN","XBFLD",58,0) ; "RTN","XBFLD",59,0) COMPUTED ; COMPUTED FIELD "RTN","XBFLD",60,0) ; The variable XBCOMP prevents multiple lfs between adjacent "RTN","XBFLD",61,0) ; computed fields. "RTN","XBFLD",62,0) ; "RTN","XBFLD",63,0) D:'XBCOMP WRITELF "RTN","XBFLD",64,0) S XBPSUB="COMPUTED",XBTYPE="",XBCOMP=1 "RTN","XBFLD",65,0) S XBPSUB=XBPSUB_$S(Y["B":" (BOOLEAN)",Y["D":" (DATE)",1:"") "RTN","XBFLD",66,0) D WRITE "RTN","XBFLD",67,0) Q "RTN","XBFLD",68,0) ; "RTN","XBFLD",69,0) MULTIPLE ; LIST MULTIPLE, THEN FIELDS IN SUBFILE "RTN","XBFLD",70,0) S XBNAME=XBNAME_" ("_+Y_")",XBSUBFIL=+Y "RTN","XBFLD",71,0) D WRITELF,WRITE "RTN","XBFLD",72,0) Q:XBQFLG "RTN","XBFLD",73,0) NEW XBFILE,XBFIELD,XBSUB "RTN","XBFLD",74,0) S XBFILE=XBSUBFIL "RTN","XBFLD",75,0) D ^XBSFGBL(XBFILE,.XBSUB,2) "RTN","XBFLD",76,0) S XBSUB="D0"_$P(XBSUB,"D0",2),XBSUB=$P(XBSUB,")",1) "RTN","XBFLD",77,0) S XBTAB=XBTAB+2 "RTN","XBFLD",78,0) D FIELDS ; Recurse "RTN","XBFLD",79,0) S XBTAB=XBTAB-2 "RTN","XBFLD",80,0) Q:XBQFLG "RTN","XBFLD",81,0) D WRITELF "RTN","XBFLD",82,0) Q "RTN","XBFLD",83,0) ; "RTN","XBFLD",84,0) WRITE ; WRITE ONE LINE "RTN","XBFLD",85,0) S XBLNFEED=0 "RTN","XBFLD",86,0) D PAGE:$Y>(IOSL-3) "RTN","XBFLD",87,0) Q:XBQFLG "RTN","XBFLD",88,0) S XBWPSUB=$S(XBFIELD=.001:"",XBPSUB]""&(XBPSUB=XBPSUBOL):" """,1:XBPSUB) "RTN","XBFLD",89,0) S XBWPC=$S(XBPIECE:$J(XBPIECE,5,0),1:XBPIECE) "RTN","XBFLD",90,0) I (XBPSUB'["COMPUTED") W !?XBTAB,XBFIELD,?13+XBTAB,$S(XBTYPE="":XBNAME,1:$E(XBNAME,1,31-XBTAB)),?46,$E(XBWPSUB,1,21),?68,XBWPC,?77,XBTYPE I 1 "RTN","XBFLD",91,0) E W !?XBTAB,XBFIELD,?13+XBTAB,$S(XBTYPE="":XBNAME,1:$E(XBNAME,1,31-XBTAB)),?46,$E(XBWPSUB,1,21) W:XBFMT["C" ?56,^DD(XBFILE,XBFIELD,9.1) "RTN","XBFLD",92,0) I XBTYPE]"" I $L(XBNAME)>(31-XBTAB)!($L(XBWPSUB)>25) W !,?13+XBTAB,$E(XBNAME,32-XBTAB,$L(XBNAME)),?46,$E(XBWPSUB,22,$L(XBWPSUB)) "RTN","XBFLD",93,0) I XBTYPE="S",XBFMT["S" W !,?16+XBTAB,"S: ",$P(^DD(XBFILE,XBFIELD,0),"^",3) "RTN","XBFLD",94,0) I XBTYPE="P",XBFMT["P" S XBFLDPT=$P(X,"^",2),XBFLDPT=+$P(XBFLDPT,"P",2) S:$D(^DIC(XBFLDPT,0)) XBFLDPT=$P(^DIC(XBFLDPT,0),"^") W !,?16+XBTAB,"P: ",XBFLDPT KILL XBFLDPT "RTN","XBFLD",95,0) I XBTYPE="V",XBFMT["V" S XBFLDPT=0 F S XBFLDPT=$O(^DD(XBFILE,XBFIELD,"V",XBFLDPT)) Q:'XBFLDPT W !,?16+XBTAB,"V: ",$P(^DD(XBFILE,XBFIELD,"V",XBFLDPT,0),"^",1,2) "RTN","XBFLD",96,0) S XBPSUBOL=XBPSUB "RTN","XBFLD",97,0) I $D(^DD(XBFILE,XBFIELD,1,1,0)),XBFMT["X" D ^XBFLD0 "RTN","XBFLD",98,0) Q "RTN","XBFLD",99,0) ; "RTN","XBFLD",100,0) WRITELF ; WRITE ONE LINE FEED "RTN","XBFLD",101,0) ; The variable XBLNFEED prevents multiple lfs when backing out of "RTN","XBFLD",102,0) ; deep recursion. "RTN","XBFLD",103,0) ; "RTN","XBFLD",104,0) Q:XBLNFEED "RTN","XBFLD",105,0) I $Y>2,$Y'>(IOSL-3) W ! S XBLNFEED=1 "RTN","XBFLD",106,0) Q "RTN","XBFLD",107,0) ; "RTN","XBFLD",108,0) HEADING ; DICTIONARY HEADERS "RTN","XBFLD",109,0) NEW XBHOUR,XBMINUT,XBTITLE,XBTIME "RTN","XBFLD",110,0) S XBPAGE=1 "RTN","XBFLD",111,0) W @IOF "RTN","XBFLD",112,0) D HEADING2 "RTN","XBFLD",113,0) W ?80-$L("FILE: "_$P(^DIC(XBFILE,0),"^",1))\2,"FILE: ",$P(^DIC(XBFILE,0),"^",1),!,?80-$L("GLOBAL: "_^DIC(XBFILE,0,"GL"))\2,"GLOBAL: ",^DIC(XBFILE,0,"GL"),!,?80-$L("FILE #: "_XBFILE)\2,"FILE #: ",XBFILE,!! "RTN","XBFLD",114,0) D PAGE "RTN","XBFLD",115,0) Q "RTN","XBFLD",116,0) ; "RTN","XBFLD",117,0) HEADING2 ; HARD COPY HEADERS "RTN","XBFLD",118,0) I IO=IO(0),$E(IOST,1,2)="C-" Q "RTN","XBFLD",119,0) I $G(XBFLD("BROWSE")) W !!! Q "RTN","XBFLD",120,0) S XBTITLE="I.H.S. DICTIONARY FIELDS",XBTIME=$P($H,",",2),XBHOUR=XBTIME\3600,XBMINUT=XBTIME#3600\60 "RTN","XBFLD",121,0) S:XBMINUT<10 XBMINUT="0"_XBMINUT "RTN","XBFLD",122,0) S XBTIME=XBHOUR_":"_XBMINUT "RTN","XBFLD",123,0) W XBTIME,?80-$L(XBTITLE)\2,XBTITLE,?72,"page ",XBPAGE,!,?80-$L(^DD("SITE"))\2,^DD("SITE"),! "RTN","XBFLD",124,0) X ^%ZOSF("UCI") "RTN","XBFLD",125,0) S Y="UCI: "_$P(Y,",",1) "RTN","XBFLD",126,0) W ?80-$L(Y)\2,Y "RTN","XBFLD",127,0) I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y "RTN","XBFLD",128,0) S Y=DT "RTN","XBFLD",129,0) X ^DD("DD") "RTN","XBFLD",130,0) W !!,?80-$L("as of "_Y)\2,"as of ",Y,!! "RTN","XBFLD",131,0) Q "RTN","XBFLD",132,0) ; "RTN","XBFLD",133,0) PAGE ;EP - PAGE HEADERS "RTN","XBFLD",134,0) NEW X "RTN","XBFLD",135,0) D:XBPAGE>1 PAUSE "RTN","XBFLD",136,0) Q:XBQFLG "RTN","XBFLD",137,0) I XBPAGE>1 W:$D(IOF) @IOF "RTN","XBFLD",138,0) S XBPAGE=XBPAGE+1 "RTN","XBFLD",139,0) W "FIELD #",?13,"FIELD NAME",?46,"SUBSCRIPT",?69,"PIECE",?75,"TYPE",!,$$REPEAT^XLFSTR("=",79),! "RTN","XBFLD",140,0) S XBPSUBOL="" "RTN","XBFLD",141,0) Q "RTN","XBFLD",142,0) ; "RTN","XBFLD",143,0) PAUSE ; GIVE USER A CHANCE TO SEE LAST PAGE AND QUIT "RTN","XBFLD",144,0) I IO=IO(0),$E(IOST,1,2)="C-" S %=$$DIR^XBDIR("E") S:$D(DIRUT)!($D(DUOUT)) XBQFLG=1 KILL DIRUT,DUOUT "RTN","XBFLD",145,0) Q "RTN","XBFLD",146,0) ; "RTN","XBFLD",147,0) INIT ; INITIALIZATION "RTN","XBFLD",148,0) S XBFLDP=$S($D(XBFLDP):1,1:0) "RTN","XBFLD",149,0) S:XBFLDP XBDSND=1 "RTN","XBFLD",150,0) D ^XBFLD2 ; Get device and files to list "RTN","XBFLD",151,0) Q "RTN","XBFLD",152,0) ; "RTN","XBFLD",153,0) FORMAT ;EP - select format "RTN","XBFLD",154,0) NEW A,X "RTN","XBFLD",155,0) S A="Select Format Combination" "RTN","XBFLD",156,0) F %=1:1 S X=$P($T(TXT+%),";;",2) Q:X="END" S A(%)=X "RTN","XBFLD",157,0) S Y=$$DIR^XBDIR("FO^0:5",.A,"","","","",1) "RTN","XBFLD",158,0) I Y="A" S Y="VPSXC" "RTN","XBFLD",159,0) S XBFMT=Y "RTN","XBFLD",160,0) Q "RTN","XBFLD",161,0) ; "RTN","XBFLD",162,0) TXT ; "RTN","XBFLD",163,0) ;; "RTN","XBFLD",164,0) ;;Addition resolution of fields is available "RTN","XBFLD",165,0) ;; V - VARIABLE POINTER "RTN","XBFLD",166,0) ;; P - POINTER "RTN","XBFLD",167,0) ;; S - SET OF CODES "RTN","XBFLD",168,0) ;; C - COMPUTED EXPRESSION "RTN","XBFLD",169,0) ;; X - CROSS-REFERENCES "RTN","XBFLD",170,0) ;; A - ALL "RTN","XBFLD",171,0) ;; "RTN","XBFLD",172,0) ;;END "RTN","XBFLD",173,0) ; "RTN","XBFLD",174,0) EN ; EXTERNAL ENTRY POINT "RTN","XBFLD",175,0) ; To use this entry point ^UTILITY("XBDSET",$J, must contain "RTN","XBFLD",176,0) ; the list of dictionaries. All device variables must be set "RTN","XBFLD",177,0) ; and, if appropriate, the U IO executed prior to the call. "RTN","XBFLD",178,0) ; It is the callers responsibility to close the device. "RTN","XBFLD",179,0) ; "RTN","XBFLD",180,0) NEW XBQFLG "RTN","XBFLD",181,0) I $D(IO)#2,$D(IO(0))#2,$D(IOF)#2,$D(IOSL)#2 D LIST "RTN","XBFLD",182,0) D EOJ "RTN","XBFLD",183,0) Q "RTN","XBFLD",184,0) ; "RTN","XBFLD",185,0) EOJ ; END OF JOB "RTN","XBFLD",186,0) KILL XBFLDP,XBFLDPT,XBFMT,XBFLD,XBIHS "RTN","XBFLD",187,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBFLD",188,0) KILL DIR,DIRUT,DTOUT,DUOUT,POP,S,X,Y "RTN","XBFLD",189,0) I $D(ZTQUEUED) S ZTREQ="@" Q "RTN","XBFLD",190,0) Q "RTN","XBFLD",191,0) ; "RTN","XBFLD0") 0^53^B1410305 "RTN","XBFLD0",1,0) XBFLD0 ; IHS/ADC/GTH - PRINT FIELD TRIGGERS ; [ 02/07/97 3:02 PM ] "RTN","XBFLD0",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFLD0",3,0) ; "RTN","XBFLD0",4,0) S ; "RTN","XBFLD0",5,0) NEW I,T,N "RTN","XBFLD0",6,0) S I=0 "RTN","XBFLD0",7,0) F S I=$O(^DD(XBFILE,XBFIELD,1,I)) Q:I'>0 D "RTN","XBFLD0",8,0) . D:$Y>(IOSL-4) PAGE^XBFLD "RTN","XBFLD0",9,0) . W !?16,"X: ",$P(^DD(XBFILE,XBFIELD,1,I,0),"^",2,5) S T=$P(^(0),U,3),T=$E(T,1,2) "RTN","XBFLD0",10,0) . S:T="" T="RG" "RTN","XBFLD0",11,0) . ;choices for T==> RG,MU,BU,KW,MN,TR "RTN","XBFLD0",12,0) . D @T "RTN","XBFLD0",13,0) Q "RTN","XBFLD0",14,0) ; "RTN","XBFLD0",15,0) MU ;MUMPS "RTN","XBFLD0",16,0) MN ;MNEMONIC "RTN","XBFLD0",17,0) F N=1,2 W !?20,N,")",?25,^DD(XBFILE,XBFIELD,1,I,N) "RTN","XBFLD0",18,0) Q "RTN","XBFLD0",19,0) ; "RTN","XBFLD0",20,0) RG ;REGULAR "RTN","XBFLD0",21,0) F N=1 W !?20,N,")",?25,^DD(XBFILE,XBFIELD,1,I,N) "RTN","XBFLD0",22,0) Q "RTN","XBFLD0",23,0) ; "RTN","XBFLD0",24,0) BU ;BULLETIN "RTN","XBFLD0",25,0) S X="CREATE",N=X "RTN","XBFLD0",26,0) F S N=$O(^DD(XBFILE,XBFIELD,1,I,N)) Q:N'[X W !?20,N,?40,^(N) "RTN","XBFLD0",27,0) Q "RTN","XBFLD0",28,0) ; "RTN","XBFLD0",29,0) KW ;KWIC "RTN","XBFLD0",30,0) Q "RTN","XBFLD0",31,0) ; "RTN","XBFLD0",32,0) TR ;TRIGGER "RTN","XBFLD0",33,0) F N="CREATE VALUE","DELETE VALUE","FIELD" W !?20,N,?35,$G(^DD(XBFILE,XBFIELD,1,I,N)) "RTN","XBFLD0",34,0) Q "RTN","XBFLD0",35,0) ; "RTN","XBFLD2") 0^54^B5115759 "RTN","XBFLD2",1,0) XBFLD2 ; IHS/ADC/GTH - INITIALIZATION FOR ^XBFLD ; [ 02/07/97 3:02 PM ] "RTN","XBFLD2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFLD2",3,0) ; "RTN","XBFLD2",4,0) ; Part of XBFLD "RTN","XBFLD2",5,0) ; "RTN","XBFLD2",6,0) ; ^UTILITY("XBDSET",$J, is used to store the list of files "RTN","XBFLD2",7,0) ; to be listed so that other software can pass files to be "RTN","XBFLD2",8,0) ; listed to the external entry point EN^XBFLD, and the other "RTN","XBFLD2",9,0) ; software could select files by using ^XBDSET. "RTN","XBFLD2",10,0) ; "RTN","XBFLD2",11,0) INIT ; INITIALIZATION "RTN","XBFLD2",12,0) NEW XBFILE "RTN","XBFLD2",13,0) D ^XBKVAR "RTN","XBFLD2",14,0) KILL ^UTILITY($J),^UTILITY("XBDSET",$J) "RTN","XBFLD2",15,0) S XBQFLG=0 "RTN","XBFLD2",16,0) D ^XBDSET "RTN","XBFLD2",17,0) S:'$D(^UTILITY("XBDSET",$J)) XBQFLG=1 "RTN","XBFLD2",18,0) Q:XBQFLG "RTN","XBFLD2",19,0) D FORMAT^XBFLD "RTN","XBFLD2",20,0) D DEVICE ; Get device "RTN","XBFLD2",21,0) Q "RTN","XBFLD2",22,0) ; "RTN","XBFLD2",23,0) DEVICE ; GET DEVICE (QUEUEING ALLOWED) "RTN","XBFLD2",24,0) XBLM ; "RTN","XBFLD2",25,0) S Y=$$DIR^XBDIR("S^P:PRINT Output;B:BROWSE Output on Screen","Do you wish to ","P","","","",1) "RTN","XBFLD2",26,0) KILL DA "RTN","XBFLD2",27,0) Q:$D(DIRUT) "RTN","XBFLD2",28,0) I Y="B" S XBFLD("BROWSE")=1 D VIEWR^XBLM("EN^XBFLD"),FULL^VALM1 W:$D(IOF) @IOF D Q "RTN","XBFLD2",29,0) . D CLEAR^VALM1 ;clears out all list man stuff "RTN","XBFLD2",30,0) . KILL XQORNEST,VALMKEY,VALM,VALMAR,VALMBCK,VALMBG,VALMCAP,VALMCNT,VALMOFF,VALMCON,VALMDN,VALMEVL,VALMIOXY,VALMKEY,VALMLFT,VALMLST,VALMMENU,VALMSGR,VALMUP,VALMWD,VALMY,XQORS,XQORSPEW,VALMCOFF "RTN","XBFLD2",31,0) XBLME .Q "RTN","XBFLD2",32,0) S %ZIS="Q" "RTN","XBFLD2",33,0) D ^%ZIS "RTN","XBFLD2",34,0) I POP S XBQFLG=1 KILL POP Q "RTN","XBFLD2",35,0) I $D(IO("Q")) D S XBQFLG=1 Q "RTN","XBFLD2",36,0) . S ZTRTN="EN^XBFLD",ZTIO=ION,ZTDESC="List dictionary",ZTSAVE("^UTILITY(""XBDSET"",$J,")="",ZTSAVE("XBFMT")="" "RTN","XBFLD2",37,0) . D ^%ZTLOAD "RTN","XBFLD2",38,0) . W !!,$S($D(ZTSK):"Request queued!",1:"Request cancelled!") "RTN","XBFLD2",39,0) . D ^%ZISC "RTN","XBFLD2",40,0) . KILL ZTSK,IO("Q") "RTN","XBFLD2",41,0) . KILL ZTIO ; ^%ZTLOAD kills other ZT* variables, but not this one "RTN","XBFLD2",42,0) .Q "RTN","XBFLD2",43,0) U IO "RTN","XBFLD2",44,0) Q "RTN","XBFLD2",45,0) ; "RTN","XBFLDO") 0^55^B22108482 "RTN","XBFLDO",1,0) XBFLD ; DICTIONARY LISTING [ 02/15/95 12:25 PM ] "RTN","XBFLDO",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFLDO",3,0) ; "RTN","XBFLDO",4,0) ; This routine lists dictionaries which may be selected individually "RTN","XBFLDO",5,0) ; or by a range of dictionary numbers. "RTN","XBFLDO",6,0) ; "RTN","XBFLDO",7,0) ; This routine requires the 89 MUMPS Standard, FileMan Version 17.7 "RTN","XBFLDO",8,0) ; or greater, Kernel Version 6 or greater, and the following routines "RTN","XBFLDO",9,0) ; must exist in the UCI in which this routine is running: "RTN","XBFLDO",10,0) ; "RTN","XBFLDO",11,0) ; XBKVAR, XBSFGBL "RTN","XBFLDO",12,0) ; "RTN","XBFLDO",13,0) START ; "RTN","XBFLDO",14,0) D LOOP ; List files until user says stop "RTN","XBFLDO",15,0) D EOJ ; Clean up "RTN","XBFLDO",16,0) Q "RTN","XBFLDO",17,0) ; "RTN","XBFLDO",18,0) LOOP ; LIST FILES UNTIL USER SAYS STOP "RTN","XBFLDO",19,0) NEW QFLG "RTN","XBFLDO",20,0) W !,"^XBFLD - This routine lists FileMan dictionaries." "RTN","XBFLDO",21,0) F D INIT Q:QFLG D LIST W ! X ^%ZIS("C") Q:QFLG "RTN","XBFLDO",22,0) Q "RTN","XBFLDO",23,0) ; "RTN","XBFLDO",24,0) LIST ; LIST RANGE OF FILES "RTN","XBFLDO",25,0) NEW COMP,FILE,FLD,LF,NAME,PC,PG,PSUB,PSUBOLD,SUBFILE,SUB,TAB,TYPE,WPC,WPSUB "RTN","XBFLDO",26,0) S QFLG=0 "RTN","XBFLDO",27,0) F FILE=0:0 S FILE=$O(^UTILITY("XBDSET",$J,FILE)) Q:FILE="" D FILE Q:QFLG "RTN","XBFLDO",28,0) Q "RTN","XBFLDO",29,0) ; "RTN","XBFLDO",30,0) FILE ; LIST ONE FILE "RTN","XBFLDO",31,0) S (COMP,LF,PG,TAB)=0,SUB="D0,",PSUBOLD="" "RTN","XBFLDO",32,0) D HEADING "RTN","XBFLDO",33,0) D FIELDS "RTN","XBFLDO",34,0) Q:QFLG "RTN","XBFLDO",35,0) D PAUSE "RTN","XBFLDO",36,0) Q "RTN","XBFLDO",37,0) ; "RTN","XBFLDO",38,0) FIELDS ; LIST ALL FIELDS IN ONE FILE/SUBFILE (CALLED RECURSIVELY) "RTN","XBFLDO",39,0) F FLD=0:0 S FLD=$O(^DD(FILE,FLD)) Q:FLD'=+FLD D FIELD Q:QFLG "RTN","XBFLDO",40,0) Q "RTN","XBFLDO",41,0) ; "RTN","XBFLDO",42,0) FIELD ; LIST ONE FIELD "RTN","XBFLDO",43,0) S (NAME,PC,PSUB,TYPE)="" "RTN","XBFLDO",44,0) S X=^DD(FILE,FLD,0) "RTN","XBFLDO",45,0) S NAME=$P(X,U,1) "RTN","XBFLDO",46,0) S Y=$P(X,U,2) "RTN","XBFLDO",47,0) S TYPE=$S(+Y:"",Y["C":"C",Y["F":"F",Y["N":"N",Y["P":"P",Y["S":"S",Y["V":"V",Y["K":"K",Y["W":"W",Y["D":"D",1:"?") "RTN","XBFLDO",48,0) I TYPE="C" D COMPUTED Q "RTN","XBFLDO",49,0) I COMP S COMP=0 D WRITELF ; Extra lf after computed fields "RTN","XBFLDO",50,0) I TYPE="" D MULTIPLE Q "RTN","XBFLDO",51,0) S Y=$P(X,U,4) "RTN","XBFLDO",52,0) S PSUB=SUB_$S($P(Y,";",1)=+$P(Y,";",1):$P(Y,";",1),1:""""_$P(Y,";",1)_"""") "RTN","XBFLDO",53,0) S PC=$S(TYPE="K":" ",1:$P(Y,";",2)) ; MUMPS field has no piece "RTN","XBFLDO",54,0) D WRITE "RTN","XBFLDO",55,0) Q "RTN","XBFLDO",56,0) ; "RTN","XBFLDO",57,0) COMPUTED ; COMPUTED FIELD "RTN","XBFLDO",58,0) ; The variable COMP prevents multiple lfs between adjacent "RTN","XBFLDO",59,0) ; computed fields. "RTN","XBFLDO",60,0) ; "RTN","XBFLDO",61,0) D:'COMP WRITELF "RTN","XBFLDO",62,0) S PSUB="COMPUTED",TYPE="",COMP=1 "RTN","XBFLDO",63,0) S PSUB=PSUB_$S(Y["B":" (BOOLEAN)",Y["D":" (DATE)",1:"") "RTN","XBFLDO",64,0) D WRITE "RTN","XBFLDO",65,0) Q "RTN","XBFLDO",66,0) ; "RTN","XBFLDO",67,0) MULTIPLE ; LIST MULTIPLE, THEN FIELDS IN SUBFILE "RTN","XBFLDO",68,0) S NAME=NAME_" ("_+Y_")",SUBFILE=+Y "RTN","XBFLDO",69,0) D WRITELF,WRITE "RTN","XBFLDO",70,0) Q:QFLG "RTN","XBFLDO",71,0) NEW FILE,FLD,SUB "RTN","XBFLDO",72,0) S FILE=SUBFILE "RTN","XBFLDO",73,0) D ^XBSFGBL(FILE,.SUB,2) S SUB="D0"_$P(SUB,"D0",2),SUB=$P(SUB,")",1) "RTN","XBFLDO",74,0) S TAB=TAB+2 "RTN","XBFLDO",75,0) D FIELDS ; Recurse "RTN","XBFLDO",76,0) S TAB=TAB-2 "RTN","XBFLDO",77,0) Q:QFLG "RTN","XBFLDO",78,0) D WRITELF "RTN","XBFLDO",79,0) Q "RTN","XBFLDO",80,0) ; "RTN","XBFLDO",81,0) WRITE ; WRITE ONE LINE "RTN","XBFLDO",82,0) S LF=0 "RTN","XBFLDO",83,0) D PAGE:$Y>(IOSL-3) "RTN","XBFLDO",84,0) Q:QFLG "RTN","XBFLDO",85,0) S WPSUB=$S(FLD=.001:"",PSUB]""&(PSUB=PSUBOLD):" """,1:PSUB) "RTN","XBFLDO",86,0) S WPC=$S(PC:$J(PC,5,0),1:PC) ;S:$E(WPC)="E" WPC=$E(" ",1,7-$L(WPC))_WPC "RTN","XBFLDO",87,0) W !,?TAB,FLD,?13+TAB,$S(TYPE="":NAME,1:$E(NAME,1,31-TAB)),?46,$E(WPSUB,1,21),?68,WPC,?77,TYPE "RTN","XBFLDO",88,0) I TYPE'="" I $L(NAME)>(31-TAB)!($L(WPSUB)>25) W !,?13+TAB,$E(NAME,32-TAB,$L(NAME)),?46,$E(WPSUB,22,$L(WPSUB)) "RTN","XBFLDO",89,0) ;S S="" S:TAB $P(S," ",TAB)=" " "RTN","XBFLDO",90,0) ;W !,S_FLD,?13,S_NAME,?42,$S(FLD=.001:"",PSUB]""&(PSUB=PSUBOLD):" """,1:PSUB),?70,$S(PC:$J(PC,2,0),1:""),?77,TYPE "RTN","XBFLDO",91,0) S PSUBOLD=PSUB "RTN","XBFLDO",92,0) Q "RTN","XBFLDO",93,0) ; "RTN","XBFLDO",94,0) WRITELF ; WRITE ONE LINE FEED "RTN","XBFLDO",95,0) ; The variable LF prevents multiple lfs when backing out of "RTN","XBFLDO",96,0) ; deep recursion. "RTN","XBFLDO",97,0) ; "RTN","XBFLDO",98,0) Q:LF "RTN","XBFLDO",99,0) I $Y>2,$Y'>(IOSL-3) W ! S LF=1 "RTN","XBFLDO",100,0) Q "RTN","XBFLDO",101,0) ; "RTN","XBFLDO",102,0) HEADING ; DICTIONARY HEADERS "RTN","XBFLDO",103,0) NEW HR,MIN,TITLE,TM,TME,UCI "RTN","XBFLDO",104,0) S PG=1 "RTN","XBFLDO",105,0) W @IOF "RTN","XBFLDO",106,0) D HEADING2 "RTN","XBFLDO",107,0) W ?80-$L("FILE: "_$P(^DIC(FILE,0),"^",1))\2,"FILE: ",$P(^DIC(FILE,0),"^",1),!,?80-$L("GLOBAL: "_^DIC(FILE,0,"GL"))\2,"GLOBAL: ",^DIC(FILE,0,"GL"),!,?80-$L("FILE #: "_FILE)\2,"FILE #: ",FILE,!! "RTN","XBFLDO",108,0) D PAGE "RTN","XBFLDO",109,0) Q "RTN","XBFLDO",110,0) ; "RTN","XBFLDO",111,0) HEADING2 ; HARD COPY HEADERS "RTN","XBFLDO",112,0) I IO=IO(0),$E(IOST,1,2)="C-" Q "RTN","XBFLDO",113,0) S TITLE="I.H.S. DICTIONARY FIELDS",TM=$P($H,",",2),HR=TM\3600,MIN=TM#3600\60 S:MIN<10 MIN="0"_MIN S TME=HR_":"_MIN "RTN","XBFLDO",114,0) W TME,?80-$L(TITLE)\2,TITLE,?72,"page ",PG,!,?80-$L(^DD("SITE"))\2,^DD("SITE"),! "RTN","XBFLDO",115,0) X ^%ZOSF("UCI") S UCI="UCI: "_$P(Y,",",1) W ?80-$L(UCI)\2,UCI "RTN","XBFLDO",116,0) I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y "RTN","XBFLDO",117,0) S Y=DT X ^DD("DD") W !!,?80-$L("as of "_Y)\2,"as of ",Y,!! "RTN","XBFLDO",118,0) Q "RTN","XBFLDO",119,0) ; "RTN","XBFLDO",120,0) PAGE ; PAGE HEADERS "RTN","XBFLDO",121,0) D:PG>1 PAUSE "RTN","XBFLDO",122,0) Q:QFLG "RTN","XBFLDO",123,0) I PG>1 W:$D(IOF) @IOF "RTN","XBFLDO",124,0) S PG=PG+1 "RTN","XBFLDO",125,0) S X="",$P(X,"=",79)="=" W "FIELD #",?13,"FIELD NAME",?46,"SUBSCRIPT",?69,"PIECE",?75,"TYPE",!,X,! S X="" "RTN","XBFLDO",126,0) S PSUBOLD="" "RTN","XBFLDO",127,0) Q "RTN","XBFLDO",128,0) ; "RTN","XBFLDO",129,0) PAUSE ; GIVE USER A CHANCE TO SEE LAST PAGE AND QUIT "RTN","XBFLDO",130,0) I IO=IO(0),$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR S:$D(DIRUT)!($D(DUOUT)) QFLG=1 K DIRUT,DUOUT "RTN","XBFLDO",131,0) Q "RTN","XBFLDO",132,0) ; "RTN","XBFLDO",133,0) INIT ; INITIALIZATION "RTN","XBFLDO",134,0) S XBFLDP=$S($D(XBFLDP):1,1:0) "RTN","XBFLDO",135,0) S:XBFLDP XBDSND=1 "RTN","XBFLDO",136,0) D ^XBFLD2 ; Get device and files to list "RTN","XBFLDO",137,0) Q "RTN","XBFLDO",138,0) ; "RTN","XBFLDO",139,0) EN ; EXTERNAL ENTRY POINT "RTN","XBFLDO",140,0) ; To use this entry point ^UTILITY("XBDSET",$J, must contain "RTN","XBFLDO",141,0) ; the list of dictionaries. All device variables must be set "RTN","XBFLDO",142,0) ; and, if appropriate, the U IO executed prior to the call. "RTN","XBFLDO",143,0) ; It is the callers responsibility to close the device. "RTN","XBFLDO",144,0) ; "RTN","XBFLDO",145,0) NEW QFLG "RTN","XBFLDO",146,0) I $D(IO)#2,$D(IO(0))#2,$D(IOF)#2,$D(IOSL)#2 D LIST "RTN","XBFLDO",147,0) D EOJ "RTN","XBFLDO",148,0) Q "RTN","XBFLDO",149,0) ; "RTN","XBFLDO",150,0) EOJ ; END OF JOB "RTN","XBFLDO",151,0) K XBFLDP "RTN","XBFLDO",152,0) K ^UTILITY("XBDSET",$J) "RTN","XBFLDO",153,0) K DIR,DIRUT,DTOUT,DUOUT,POP,S,X,Y "RTN","XBFLDO",154,0) I $D(ZTQUEUED) S ZTREQ="@" Q "RTN","XBFLDO",155,0) I $D(ZTSK),ZTSK K ^%ZTSK(ZTSK) ; ***** For old Kernel ***** "RTN","XBFLDO",156,0) Q "RTN","XBFMK") 0^56^B1109784 "RTN","XBFMK",1,0) XBFMK ; IHS/ADC/GTH - KILL FILEMAN VARIABLES ; [ 02/07/97 3:02 PM ] "RTN","XBFMK",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFMK",3,0) ; "RTN","XBFMK",4,0) ; This routine kills variables left around by FileMan. "RTN","XBFMK",5,0) ; "RTN","XBFMK",6,0) KILL %,%1,%DEVTYPE,%DT,%GSREF,%H,%K,%RCR,%ST,%T,%W,%X,%XUCI,%Y,%ZISOS "RTN","XBFMK",7,0) KILL A,C,I,J,L,S,UT,X,Y,Z "RTN","XBFMK",8,0) KILL D,D0,D1,D2,DA,DD,DDC,DDH,DI,DIC,DIC1,DICR,DIE,DIEC,DIG,DIH,DIK,DILC,DIOV,DIPGM,DIR,DIU,DIV,DIW,DIWF,DIWL,DIWR,DIWT,DIZ,DK,DL,DLAYGO,DN,DQ,DR,DX,DZ "RTN","XBFMK",9,0) KILL DIRUT,DTOUT,DUOUT "RTN","XBFMK",10,0) Q "RTN","XBFMK",11,0) ; "RTN","XBFNC") 0^57^B48630008 "RTN","XBFNC",1,0) XBFNC ;IHS/SET/GTH - Field Numbering Conventions ; [ 10/29/2002 7:42 AM ] "RTN","XBFNC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFNC",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFNC",4,0) ; "RTN","XBFNC",5,0) ; Given an input of files, check the fields in the files "RTN","XBFNC",6,0) ; for conformance to the SAC field numbering conventions. "RTN","XBFNC",7,0) ; "RTN","XBFNC",8,0) ; Can also print conventions. "RTN","XBFNC",9,0) ; "RTN","XBFNC",10,0) Q ; F = File "RTN","XBFNC",11,0) ; H = Header "RTN","XBFNC",12,0) ; I = Field "RTN","XBFNC",13,0) ; N = Node "RTN","XBFNC",14,0) ; P = Piece "RTN","XBFNC",15,0) ; "RTN","XBFNC",16,0) W !,"FileMan Field Numbering Conventions",! "RTN","XBFNC",17,0) D FNC,^XBDSET "RTN","XBFNC",18,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBFNC",19,0) NEW F "RTN","XBFNC",20,0) S F=0 "RTN","XBFNC",21,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:'F D FILE(F) "RTN","XBFNC",22,0) Q "RTN","XBFNC",23,0) ; "RTN","XBFNC",24,0) FILE(F) ; "RTN","XBFNC",25,0) NEW I,H,N,P "RTN","XBFNC",26,0) S I=0 "RTN","XBFNC",27,0) F S I=$O(^DD(F,I)) Q:'I I '($P(^(I,0),U,2)["C") D "RTN","XBFNC",28,0) . S H=0 "RTN","XBFNC",29,0) . I +$P(^DD(F,I,0),U,2) D Q "RTN","XBFNC",30,0) .. I $L(I)'=4 D ERR(1) "RTN","XBFNC",31,0) .. D FILE(+$P(^DD(F,I,0),U,2)) "RTN","XBFNC",32,0) ..Q "RTN","XBFNC",33,0) . S N=$P($P(^DD(F,I,0),U,4),";",1),P=$P($P(^(0),U,4),";",2) "RTN","XBFNC",34,0) . I N=0 D Q "RTN","XBFNC",35,0) .. I $E(I)'="." D ERR(2) "RTN","XBFNC",36,0) .. I P'=+$P(I,".",2)!(+$P(I,".")) D ERR(3) "RTN","XBFNC",37,0) .. I P=10 D ERR(4) "RTN","XBFNC",38,0) ..Q "RTN","XBFNC",39,0) . I $E(I)="." D ERR(5) "RTN","XBFNC",40,0) . I +N,N'=+$E(I,1,$L(N)) D ERR(6) "RTN","XBFNC",41,0) . I +N,P'=+$E(I,$L(N)+1,99) D ERR(7) "RTN","XBFNC",42,0) . I 'N,P'=I D ERR(8) "RTN","XBFNC",43,0) .Q "RTN","XBFNC",44,0) Q "RTN","XBFNC",45,0) ; "RTN","XBFNC",46,0) ERR(E) ; "RTN","XBFNC",47,0) W:'H !," ",F," (",$O(^DD(F,0,"NM","")),"), ",I," (",$P(^DD(F,I,0),U,1),"), global location ",$P(^(0),U,4),$S(+P:"",1:"(Multiple)") "RTN","XBFNC",48,0) S H=1 "RTN","XBFNC",49,0) W !?5,$P($T(@E),";",3),"." "RTN","XBFNC",50,0) Q "RTN","XBFNC",51,0) ; "RTN","XBFNC",52,0) 1 ;;Field number of multiple field is not 4 digits "RTN","XBFNC",53,0) 2 ;;Field number in 0th node should begin with '.' "RTN","XBFNC",54,0) 3 ;;Piece number in 0th node should = +$P(fld#,".",2) "RTN","XBFNC",55,0) 4 ;;Piece 10 of 0th node should be null "RTN","XBFNC",56,0) 5 ;;Field begins with '.' and not in 0th node "RTN","XBFNC",57,0) 6 ;;Field number does not begin with node location "RTN","XBFNC",58,0) 7 ;;Piece number does not match non-nodal part of field number "RTN","XBFNC",59,0) 8 ;;Field number and piece number do not match "RTN","XBFNC",60,0) ; "RTN","XBFNC",61,0) FNC ; "RTN","XBFNC",62,0) Q:'$$DIR^XBDIR("Y","Print conventions","N") "RTN","XBFNC",63,0) D ^%ZIS "RTN","XBFNC",64,0) Q:POP "RTN","XBFNC",65,0) U IO "RTN","XBFNC",66,0) D HELP^XBHELP("TXT","XBFNC",0),^%ZISC "RTN","XBFNC",67,0) Q "RTN","XBFNC",68,0) ; "RTN","XBFNC",69,0) TXT ; "RTN","XBFNC",70,0) ;; "RTN","XBFNC",71,0) ;; ------------------------------- "RTN","XBFNC",72,0) ;; DATA DICTIONARY FIELD NUMBERING "RTN","XBFNC",73,0) ;; AND DATA PLACEMENT CONVENTIONS "RTN","XBFNC",74,0) ;; ------------------------------- "RTN","XBFNC",75,0) ;; "RTN","XBFNC",76,0) ;;The following conventions for numbering fields, and placing data in pieces, is "RTN","XBFNC",77,0) ;;extracted from a mail message dated 25 Feb 88, and is considered to be those "RTN","XBFNC",78,0) ;;conventions referred to in the Programming Standards And Conventions paragraph "RTN","XBFNC",79,0) ;;which states "Field numbers for FileMan files will be assigned in accordance "RTN","XBFNC",80,0) ;;with established conventions." "RTN","XBFNC",81,0) ;; "RTN","XBFNC",82,0) ;; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = "RTN","XBFNC",83,0) ;; "RTN","XBFNC",84,0) ;;1) There is a direct correlation between the field number and the node and "RTN","XBFNC",85,0) ;;piece, and for multiples, between the field number and the sub-file number. "RTN","XBFNC",86,0) ;; "RTN","XBFNC",87,0) ;;2) Fields beginning with a "." are all .01-.n and are in the 0th node. Where "RTN","XBFNC",88,0) ;;possible, files only have a 0th node. This reduces the number of disc accesses "RTN","XBFNC",89,0) ;;required. A field number must be canonic, therefore, there is no .10 field. "RTN","XBFNC",90,0) ;;It goes from .09 to .11. That means piece 10 will always be NULL. "RTN","XBFNC",91,0) ;; "RTN","XBFNC",92,0) ;;3) Where the entire entry cannot be put in one node, there are more nodes, "RTN","XBFNC",93,0) ;;generally grouped by logically related fields into field numbers within some "RTN","XBFNC",94,0) ;;range, say 1101-1116. These would be node 11 piece 1-16, and in this case "RTN","XBFNC",95,0) ;;piece 10 is allowed because it is canonic. "RTN","XBFNC",96,0) ;; "RTN","XBFNC",97,0) ;;4) Multiple fields are always 4 digits. The first two digits are the next "RTN","XBFNC",98,0) ;;higher group, using the example above, 11 would be the next higher group. The "RTN","XBFNC",99,0) ;;second two digits are always 00. The subscript for that multiple is always the "RTN","XBFNC",100,0) ;;first two digits of the multi-valued field number. 11 in this case. The "RTN","XBFNC",101,0) ;;sub-file number is always the parent file number with the first two digits of "RTN","XBFNC",102,0) ;;the multi-valued field number appended. If we were in file 9000001 in the "RTN","XBFNC",103,0) ;;above example, the sub-file for field 1100 would be 9000001.11, and the "RTN","XBFNC",104,0) ;;subscript would be 11. Now, if we added a multiple to that sub-file, as say "RTN","XBFNC",105,0) ;;field number 1500, its sub-file would be 9000001.1115 and its subscript would "RTN","XBFNC",106,0) ;;be 15. In the data global it would look like ^AUPNPAT(DA(1),11,DA,15,0). The "RTN","XBFNC",107,0) ;;assigning of sub-file numbers is important, because if you let FileMan do it, "RTN","XBFNC",108,0) ;;he will assign numbers that may fall within the number space of primary files "RTN","XBFNC",109,0) ;;using our file number assigning logic. "RTN","XBFNC",110,0) ;; "RTN","XBFNC",111,0) ;;5) There are special cases that do not follow the rules, of course. On most "RTN","XBFNC",112,0) ;;of the pointed to files, we have added a field number 9901 MNEMONIC which is "RTN","XBFNC",113,0) ;;used on a site by site basis if you have a very high percentage of your lookups "RTN","XBFNC",114,0) ;;to two or three entries, you can add data to the MNEMONIC field, say 1, 2, and "RTN","XBFNC",115,0) ;;3, and instead of responding CLAREMORE to a LOCATION lookup, you can respond 1. "RTN","XBFNC",116,0) ;;This field is in node 88 piece 1. It is 8801 so the MNEMONIC field would be "RTN","XBFNC",117,0) ;;the same number in all dictionaries, regardless of how many fields, and field "RTN","XBFNC",118,0) ;;numbers, a particular file had already. "RTN","XBFNC",119,0) ;; "RTN","XBFNC",120,0) ;;6) Computed fields, where ever possible, immediately follow the field from "RTN","XBFNC",121,0) ;;which they are computed, and the computed field number is the same as the real "RTN","XBFNC",122,0) ;;field followed by a 9. If the field above was .12 the computed field would be "RTN","XBFNC",123,0) ;;.129. If you wanted more than one computed field off of .12 they would be "RTN","XBFNC",124,0) ;;.1291 and .1292. "RTN","XBFNC",125,0) ;; "RTN","XBFNC",126,0) ;;7) There is another class of computed field. That is a computed field that "RTN","XBFNC",127,0) ;;points back to the VA PATIENT file. Those fields have a .2 following the field "RTN","XBFNC",128,0) ;;number. That indicates it is not really a computed field, but just a pointer "RTN","XBFNC",129,0) ;;back to the VA PATIENT file. "RTN","XBFNC",130,0) ;; "RTN","XBFNC",131,0) ;;******************************************** "RTN","XBFORM") 0^58^B36016821 "RTN","XBFORM",1,0) XBFORM ; IHS/ADC/GTH - BUILD ARRAY FROM WP FORMAT ; [ 07/08/1999 3:53 PM ] "RTN","XBFORM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFORM",3,0) ; "RTN","XBFORM",4,0) ; Please refer to routine XBFORM0 for documentation. "RTN","XBFORM",5,0) ; "RTN","XBFORM",6,0) Q "RTN","XBFORM",7,0) ; "RTN","XBFORM",8,0) EDIT(XBFORM,XBWPDIC,XBWPFLD) ;EP Edit a Form "RTN","XBFORM",9,0) EDIT2 ; "RTN","XBFORM",10,0) KILL ^TMP($J,"XBFORM",XBFORM) "RTN","XBFORM",11,0) S XBLLINE=0,XBFMT=1 "RTN","XBFORM",12,0) I $D(XBLMMRK) S XBLMMARK=XBLMMRK "RTN","XBFORM",13,0) I '$D(XBLMMARK) S XBLMMARK=$$DIR^XBDIR("Y","MARKERS ","N") "RTN","XBFORM",14,0) S XBLMMRK=XBLMMARK "RTN","XBFORM",15,0) D EDITWP,WPGET,BUILD,ZBUILD "RTN","XBFORM",16,0) ;** add RV markers "RTN","XBFORM",17,0) I '$D(XBLMMARK) S XBLMMARK=$$DIR^XBDIR("Y","MARKERS ","N") "RTN","XBFORM",18,0) I $D(DIRUT) D EXIT KILL XBLLINE Q "RTN","XBFORM",19,0) MARK ; "RTN","XBFORM",20,0) I $G(XBLMMARK) F XBRVL=5:5 Q:'$D(XBZ(XBRVL)) S:'(XBRVL#10) $E(XBZ(XBRVL,0),80)=$E(XBRVL) "RTN","XBFORM",21,0) KILL XBRVL "RTN","XBFORM",22,0) D ARRAY^XBLM("XBZ(",XBFORM),CLEAR^VALM1 "RTN","XBFORM",23,0) I $$DIR^XBDIR("S^R:Re-Edit;Q:Quit")="R" KILL XBZ G EDIT2 "RTN","XBFORM",24,0) D EXIT "RTN","XBFORM",25,0) KILL XBLLINE "RTN","XBFORM",26,0) Q "RTN","XBFORM",27,0) ; "RTN","XBFORM",28,0) GEN(XBFORM,XBWPDIC,XBWPFLD,XBREF,XBFMT,XBLAST) ;EP ** generate array "RTN","XBFORM",29,0) NEW XBLLINE "RTN","XBFORM",30,0) S XBLLINE=$G(XBLAST) "RTN","XBFORM",31,0) I $D(^TMP($J,"XBFORM",XBFORM)) D ZBUILD,REFBUILD,EXIT Q XBLLINE "RTN","XBFORM",32,0) D WPGET,BUILD,ZBUILD,REFBUILD,EXIT "RTN","XBFORM",33,0) Q XBLLINE "RTN","XBFORM",34,0) ; "RTN","XBFORM",35,0) EDITWP ;** edit WP array "RTN","XBFORM",36,0) KILL DIE,DIC,DA,DR "RTN","XBFORM",37,0) S DIC=XBWPDIC,DR=XBWPFLD,DIC(0)="AEQMLZ" "RTN","XBFORM",38,0) I $L($G(XBFORM))>0 S X=XBFORM,DIC(0)="XL" "RTN","XBFORM",39,0) D ^DIC "RTN","XBFORM",40,0) I Y'>0 S XBQUIT=1 Q "RTN","XBFORM",41,0) S DIE=$$DIC^XBDIQ1(XBWPDIC),DA=+Y,DR=XBWPFLD "RTN","XBFORM",42,0) D ^DIE "RTN","XBFORM",43,0) Q "RTN","XBFORM",44,0) ; "RTN","XBFORM",45,0) WPGET ;** get WP array "RTN","XBFORM",46,0) KILL XBWP,XBL,XBOUT,XBVAR,XBWWP,DIC,DR,DIE,DA "RTN","XBFORM",47,0) S X=XBFORM,DIC=XBWPDIC,DR=XBWPFLD,DIC(0)="X" "RTN","XBFORM",48,0) D ^DIC "RTN","XBFORM",49,0) I Y'>0 S XBWP(1)=XBFORM_" NOT FOUND",XBQUIT=1 "RTN","XBFORM",50,0) S DA=+Y "RTN","XBFORM",51,0) D ENP^XBDIQ1(XBWPDIC,DA,XBWPFLD,"XBWWP(") "RTN","XBFORM",52,0) S %X="XBWWP("_XBWPFLD_",",%Y="XBWP(" "RTN","XBFORM",53,0) D %XY^%RCR "RTN","XBFORM",54,0) KILL XBWWP "RTN","XBFORM",55,0) Q "RTN","XBFORM",56,0) ; "RTN","XBFORM",57,0) BUILD ;** scan WP array to build XBL "RTN","XBFORM",58,0) S XBWPL="",XBLINE=0 "RTN","XBFORM",59,0) Q:$D(^TMP($J,"XBFORM",XBFORM)) "RTN","XBFORM",60,0) F S XBWPL=$O(XBWP(XBWPL)) Q:XBWPL'>0 D LINE "RTN","XBFORM",61,0) Q "RTN","XBFORM",62,0) ; "RTN","XBFORM",63,0) LINE ;** process one line of the WP array "RTN","XBFORM",64,0) S Z=XBWP(XBWPL),XBLINE=XBLINE+1 "RTN","XBFORM",65,0) F I=1:1:$L(Z) S A=$E(Z,I) D Q:$G(XBQUIT) "RTN","XBFORM",66,0) . I I=1,A="#" D MAP S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBFORM",67,0) . I I=1,A="*" D OUT S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBFORM",68,0) . I I=1,A=";" S I=$L(Z),XBLINE=XBLINE-1,XBQUIT=1 Q "RTN","XBFORM",69,0) . I A'=" ",A'="|" D TEXT Q "RTN","XBFORM",70,0) . I A="|" D VAR Q "RTN","XBFORM",71,0) .Q "RTN","XBFORM",72,0) KILL XBQUIT "RTN","XBFORM",73,0) Q "RTN","XBFORM",74,0) ; "RTN","XBFORM",75,0) ZBUILD ;** build Z array from XBL "RTN","XBFORM",76,0) KILL Z "RTN","XBFORM",77,0) I '$G(XBFMT) F XBL=1:1 D Q:('$O(^TMP($J,"XBFORM",XBFORM,XBL))) "RTN","XBFORM",78,0) . I '$D(^TMP($J,"XBFORM",XBFORM,XBL)),$O(^TMP($J,"XBFORM",XBFORM,XBL)) S XBZ(XBL+XBLLINE)=" " Q "RTN","XBFORM",79,0) . D FILL "RTN","XBFORM",80,0) .Q "RTN","XBFORM",81,0) I $G(XBFMT)=1 F XBL=1:1 D Q:('$O(^TMP($J,"XBFORM",XBFORM,XBL))) "RTN","XBFORM",82,0) . I '$D(^TMP($J,"XBFORM",XBFORM,XBL)),$O(^TMP($J,"XBFORM",XBFORM,XBL)) S XBZ(XBL+XBLLINE,0)=" " Q "RTN","XBFORM",83,0) . D FILL "RTN","XBFORM",84,0) .Q "RTN","XBFORM",85,0) Q "RTN","XBFORM",86,0) ; "RTN","XBFORM",87,0) REFBUILD ; %RCR BACK TO CALL "RTN","XBFORM",88,0) S %Y=XBREF,%X="XBZ(" "RTN","XBFORM",89,0) D %XY^%RCR "RTN","XBFORM",90,0) S XBLLINE=XBLLINE+XBL "RTN","XBFORM",91,0) Q "RTN","XBFORM",92,0) ; "RTN","XBFORM",93,0) FILL ;** fill one line "RTN","XBFORM",94,0) S XBCOL=0,T="" "RTN","XBFORM",95,0) F S XBCOL=$O(^TMP($J,"XBFORM",XBFORM,XBL,XBCOL)) Q:XBCOL'>0 D "RTN","XBFORM",96,0) . S X=^TMP($J,"XBFORM",XBFORM,XBL,XBCOL) "RTN","XBFORM",97,0) . S XBCOLX=XBCOL "RTN","XBFORM",98,0) . I XBCOL#1 S XBCOLX=XBCOL\1,X="S X="_X X X "RTN","XBFORM",99,0) . S XBXL=$L(X) "RTN","XBFORM",100,0) . Q:X="" "RTN","XBFORM",101,0) . S T=$$SETSTR^VALM1(X,T,XBCOLX,XBXL) "RTN","XBFORM",102,0) .Q "RTN","XBFORM",103,0) I T="" S XBLLINE=$G(XBLLINE)-1 Q "RTN","XBFORM",104,0) S:'$G(XBFMT) XBZ(XBL+XBLLINE)=T "RTN","XBFORM",105,0) S:($G(XBFMT)=1) XBZ(XBL+XBLLINE,0)=T "RTN","XBFORM",106,0) Q "RTN","XBFORM",107,0) ; "RTN","XBFORM",108,0) TEXT ;** "RTN","XBFORM",109,0) NEW W "RTN","XBFORM",110,0) S XBCOL=I "RTN","XBFORM",111,0) F W=I:1:$L(Z) S A=$E(Z,W) Q:A="|" "RTN","XBFORM",112,0) I W'=$L(Z) S W=W-1 "RTN","XBFORM",113,0) S XBT=$E(Z,I,W),^TMP($J,"XBFORM",XBFORM,XBLINE,XBCOL)=XBT,I=W "RTN","XBFORM",114,0) Q "RTN","XBFORM",115,0) ; "RTN","XBFORM",116,0) VAR ;** add .5 to column count to indicate a variable vs text "RTN","XBFORM",117,0) S XBCOL=I "RTN","XBFORM",118,0) F W=I+1:1:$L(Z) S A=$E(Z,W) I A="|" Q "RTN","XBFORM",119,0) S XBT=$E(Z,I+1,W-1) "RTN","XBFORM",120,0) I XBT="" S XBT="""|""" "RTN","XBFORM",121,0) S ^TMP($J,"XBFORM",XBFORM,XBLINE,XBCOL+.5)=XBT,I=W "RTN","XBFORM",122,0) I XBT'["@" D Q "RTN","XBFORM",123,0) . Q:'$D(XBOUT(XBT)) "RTN","XBFORM",124,0) . I $E(XBOUT(XBT))=";" S XBOUT(XBT)=$$FMSUB(XBOUT(XBT)) "RTN","XBFORM",125,0) . S O=XBOUT(XBT),XBT=$$SUB^XBFORM1(XBT,O) "RTN","XBFORM",126,0) . S ^TMP($J,"XBFORM",XBFORM,XBLINE,XBCOL+.5)=XBT "RTN","XBFORM",127,0) .Q "RTN","XBFORM",128,0) S XBV=$P(XBT,"@"),XBV=XBVAR(XBV),XBS=$P(XBT,"@",2) "RTN","XBFORM",129,0) I $L(XBS) S XBS="("_XBS_")" "RTN","XBFORM",130,0) S ^TMP($J,"XBFORM",XBFORM,XBLINE,XBCOL+.5)=XBV_XBS "RTN","XBFORM",131,0) I $D(XBOUT(XBT)) D "RTN","XBFORM",132,0) . I $E(XBOUT(XBT))=";" S XBOUT(XBT)=$$FMSUB(XBOUT(XBT)) "RTN","XBFORM",133,0) . S O=XBOUT(XBT),XBT=XBV_XBS,XBT=$$SUB^XBFORM1(XBT,O) "RTN","XBFORM",134,0) . S ^TMP($J,"XBFORM",XBFORM,XBLINE,XBCOL+.5)=XBT "RTN","XBFORM",135,0) .Q "RTN","XBFORM",136,0) Q "RTN","XBFORM",137,0) ; "RTN","XBFORM",138,0) MAP ;** map shorthand for variables "RTN","XBFORM",139,0) ;#xx1=yyy1|xx2=yyy2| "RTN","XBFORM",140,0) S Z=$E(Z,2,999) "RTN","XBFORM",141,0) I Z'["|" S XBVSUB=$P(Z,"="),XBVAL=$P(Z,"=",2),XBVAR(XBVSUB)=XBVAL Q "RTN","XBFORM",142,0) F I=1:1 S P=$P(Z,"|",I) Q:P="" S XBVSUB=$P(P,"="),XBVAL=$P(P,"=",2),XBVAR(XBVSUB)=XBVAL "RTN","XBFORM",143,0) Q "RTN","XBFORM",144,0) ; "RTN","XBFORM",145,0) OUT ;** output transform of data field "RTN","XBFORM",146,0) ;*field:mumps output transform f(x)| "RTN","XBFORM",147,0) S Z=$E(Z,2,999) "RTN","XBFORM",148,0) I Z'["|" S XBVSUB=$P(Z,":"),XBVAL=$P(Z,":",2,99),XBOUT(XBVSUB)=XBVAL Q "RTN","XBFORM",149,0) F I=1:1 S P=$P(Z,"|",I) Q:P="" S XBVSUB=$P(P,":"),XBVAL=$P(P,":",2,99),XBOUT(XBVSUB)=XBVAL "RTN","XBFORM",150,0) Q "RTN","XBFORM",151,0) ; "RTN","XBFORM",152,0) TABS ; "RTN","XBFORM",153,0) S XBF="|....^...." "RTN","XBFORM",154,0) W # "RTN","XBFORM",155,0) F I=0:1:7 W ?I*10,I*10 "RTN","XBFORM",156,0) F L=1:1:66 W !?1,L,?3,"..^...." F X=1:1:7 W XBF "RTN","XBFORM",157,0) Q "RTN","XBFORM",158,0) ; "RTN","XBFORM",159,0) EXIT ; "RTN","XBFORM",160,0) KILL XBZ,XBFMT,XBCOL,XBCOLX,XBF,XBL,XBLINE,XBLN,XBLOAD,XBOUT,XBQUIT,XBROU,XBS,XBT,XBTAG,XBTAGE,XBV,XBVAL,XBVAR,XBVSUB,XBWP,XBWPDA,XBWPDIC,XBWPFLD,XBWPL,XBWPNODE,XBWPSUB,XBWWP,XBX,XBXL,XBRVL,XBLWP,XBLMMRK "RTN","XBFORM",161,0) KILL XBLIN,XBLIN0,XBLIN1,XBLINX "RTN","XBFORM",162,0) Q "RTN","XBFORM",163,0) ; "RTN","XBFORM",164,0) MDY(X) ;external date to mm/dd/yy x :: var or ~"NOW"~ or ~"TODAY"~ "RTN","XBFORM",165,0) S %DT="TS" "RTN","XBFORM",166,0) D ^%DT "RTN","XBFORM",167,0) ;begin Y2K fix block "RTN","XBFORM",168,0) ;S X=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3) "RTN","XBFORM",169,0) S X=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_($E(Y,1,3)+1700) ;Y2000 "RTN","XBFORM",170,0) ;end Y2K fix block "RTN","XBFORM",171,0) Q X "RTN","XBFORM",172,0) ; "RTN","XBFORM",173,0) WP(X) ;build wp entry X #:: WP(FLD,n)=TEXTn "RTN","XBFORM",174,0) NEW I,W "RTN","XBFORM",175,0) S XBLWP=$G(XBLLINE),W=$P(X,")") "RTN","XBFORM",176,0) F I=0:1 S X=$Q(@X) Q:X="" Q:(W'=$P(X,",")) D "RTN","XBFORM",177,0) . S T=@X,XBLLINE=XBLWP+I "RTN","XBFORM",178,0) . S:'$G(XBFMT) XBZ(XBL+XBLLINE)=T "RTN","XBFORM",179,0) . S:($G(XBFMT)=1) XBZ(XBL+XBLLINE,0)=T "RTN","XBFORM",180,0) .Q "RTN","XBFORM",181,0) Q "" "RTN","XBFORM",182,0) ; "RTN","XBFORM",183,0) FL(X) ; FL fill lines until line X "RTN","XBFORM",184,0) NEW I,W "RTN","XBFORM",185,0) S XBLWP=$G(XBLLINE) "RTN","XBFORM",186,0) Q:((XBLLINE+XBL)'0 D "RTN","XBFORM1",27,0) .S XB(XBI,"M")=0,XB(XBI,0)=XB(XBI) "RTN","XBFORM1",28,0) .I XBP[$E(XBLINX,XB(XBI)-1),XBS[$E(XBLINX,XB(XBI)+XBL) S XB(XBI,"M")=1 "RTN","XBFORM1",29,0) .S XB("B",XB(XBI))=XBI,XB("E",XB(XBI)+XBL-1)=XBI "RTN","XBFORM1",30,0) .S XB(XBI,"E")=XB(XBI)+XBL-1 "RTN","XBFORM1",31,0) .Q "RTN","XBFORM1",32,0) KILL XB(XBI) "RTN","XBFORM1",33,0) CHKMK ; "RTN","XBFORM1",34,0) S XBMK="",XBJM="" "RTN","XBFORM1",35,0) F S XBJM=$O(XB(XBJM)) Q:XBJM="" I $G(XB(XBJM,"M")) S XBMK=1 Q "RTN","XBFORM1",36,0) KILL XBJM "RTN","XBFORM1",37,0) SCANE ; "RTN","XBFORM1",38,0) Q "RTN","XBFORM1",39,0) ; "RTN","XBFORM1",40,0) BLDLIN1 ; "RTN","XBFORM1",41,0) S XBLIN=XBLINX,XBV0="X" "RTN","XBFORM1",42,0) S XBLIN0=XBLIN,XBSUB=XBV0_":"_XBV1,XBLIN1="" "RTN","XBFORM1",43,0) F XBI=1:1 Q:'$D(XB(XBI)) S XBLIN1=XBLIN1_$E(XBLIN,$G(XB(XBI-1,"E"))+1,XB(XBI,0)-1)_$S(XB(XBI,"M"):XBV1,1:XBV0) "RTN","XBFORM1",44,0) S XBI=XBI-1 S XBLIN1=XBLIN1_$E(XBLIN,XB(XBI,"E")+1,999) "RTN","XBFORM1",45,0) BLDLIN1E ; "RTN","XBFORM1",46,0) Q "RTN","XBFORM1",47,0) ; "RTN","XBFRESET") 0^61^B3733840 "RTN","XBFRESET",1,0) XBFRESET ; IHS/ADC/GTH - RESET FILE GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","XBFRESET",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFRESET",3,0) ; "RTN","XBFRESET",4,0) ; This routine removes all data from FileMan files by "RTN","XBFRESET",5,0) ; saving the 0th node, killing the global, then resetting "RTN","XBFRESET",6,0) ; the 0th node. "RTN","XBFRESET",7,0) ; "RTN","XBFRESET",8,0) START ; "RTN","XBFRESET",9,0) NEW I "RTN","XBFRESET",10,0) W !!,$$REPEAT^XLFSTR("*",78),!,"This routine kills file data globals and resets the 0th nodes. If you are not",!,"absolutely sure of what you are doing, please ^ out at the first opportunity!",!,$$REPEAT^XLFSTR("*",78),!! "RTN","XBFRESET",11,0) F I=1:1:3 W *7,"*** WARNING ***" H 1 W:I'=3 *13,$J("",79),*13 "RTN","XBFRESET",12,0) KILL I "RTN","XBFRESET",13,0) W !!,"Select the files you wish reset." "RTN","XBFRESET",14,0) D ^XBDSET "RTN","XBFRESET",15,0) EN1 ;PEP - Interactive entry, files already selected. "RTN","XBFRESET",16,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBFRESET",17,0) W !!,"The following files globals will be killed and reset.",! "RTN","XBFRESET",18,0) H 2 "RTN","XBFRESET",19,0) D EN^XBLZRO "RTN","XBFRESET",20,0) Q:'$$DIR^XBDIR("Y","Do you want to continue","NO","","","",1) "RTN","XBFRESET",21,0) EN2 ;PEP - Non-interactive entry, files already selected. "RTN","XBFRESET",22,0) NEW F,G,X,Y "RTN","XBFRESET",23,0) S F="" "RTN","XBFRESET",24,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F="" D "RTN","XBFRESET",25,0) . Q:'$D(^DIC(F,0,"GL")) S G=^("GL") "RTN","XBFRESET",26,0) . S Y=G_"0)" "RTN","XBFRESET",27,0) . S G=$E(G,1,$L(G)-1)_$S($E(G,$L(G))="(":"",1:")") "RTN","XBFRESET",28,0) . W:'$D(ZTQUEUED) "." "RTN","XBFRESET",29,0) . S X=@Y,X=$P(X,"^",1,2)_"^0^0" "RTN","XBFRESET",30,0) . KILL @G "RTN","XBFRESET",31,0) . S @Y=X "RTN","XBFRESET",32,0) . Q "RTN","XBFRESET",33,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBFRESET",34,0) Q "RTN","XBFRESET",35,0) ; "RTN","XBFUNC") 0^62^B8489767 "RTN","XBFUNC",1,0) XBFUNC ; IHS/ADC/GTH - FUNCTION LIBRARY ; [ 10/29/2002 7:42 AM ] "RTN","XBFUNC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFUNC",3,0) ; "RTN","XBFUNC",4,0) FNDPATRN(STR,PAT) ;PEP - Find pattern in string. Return beginning position. "RTN","XBFUNC",5,0) ; "RTN","XBFUNC",6,0) ; E.g.: $$FNDPATRN^XBFUNC("ABC8RX","1A1N") will return 3. "RTN","XBFUNC",7,0) ; "RTN","XBFUNC",8,0) I '$L($G(STR))!('$L($G(PAT))) Q 0 "RTN","XBFUNC",9,0) I STR'?@(".E"_PAT_".E") Q 0 "RTN","XBFUNC",10,0) NEW I,J "RTN","XBFUNC",11,0) S J=0 "RTN","XBFUNC",12,0) F I=1:1:$L(STR) I $E(STR,I,$L(STR))?@(PAT_".E") S J=I Q "RTN","XBFUNC",13,0) Q J "RTN","XBFUNC",14,0) ; "RTN","XBFUNC",15,0) GETPATRN(STR,PAT) ;PEP - Retrieve pattern from string. "RTN","XBFUNC",16,0) ; "RTN","XBFUNC",17,0) ; E.g.: $$GETPATRN^XBFUNC("ABC8RX","1A1N") will return "C8". "RTN","XBFUNC",18,0) ; "RTN","XBFUNC",19,0) I '$L($G(STR))!('$L($G(PAT))) Q "" "RTN","XBFUNC",20,0) NEW I,S "RTN","XBFUNC",21,0) S I=$$FNDPATRN^XBFUNC(STR,PAT) "RTN","XBFUNC",22,0) I 'I Q "" "RTN","XBFUNC",23,0) S S=$E(STR,I,$L(STR)) "RTN","XBFUNC",24,0) F I=1:1 Q:(S="")!(S?@PAT) S S=$E(S,1,$L(S)-1) "RTN","XBFUNC",25,0) Q S "RTN","XBFUNC",26,0) ; "RTN","XBFUNC",27,0) INTSET(FILE,FIELD,EXTVAL) ;PEP - Get Intnl Field Value Given Extnl Field Value "RTN","XBFUNC",28,0) ; For a set of codes type field "RTN","XBFUNC",29,0) ; "RTN","XBFUNC",30,0) ; E.g.: $$INTSET^XBFUNC(9000001,.21,"RETIRED") returns 5. "RTN","XBFUNC",31,0) ; "RTN","XBFUNC",32,0) I '$G(FILE)!('$G(FIELD)) Q "" "RTN","XBFUNC",33,0) I $G(EXTVAL)="" Q "" "RTN","XBFUNC",34,0) I '$D(^DD(FILE,FIELD)) Q "" "RTN","XBFUNC",35,0) S EXTVAL=":"_EXTVAL_";" "RTN","XBFUNC",36,0) I $P(^DD(FILE,FIELD,0),"^",3)'[EXTVAL Q "" "RTN","XBFUNC",37,0) NEW %,%A,%B "RTN","XBFUNC",38,0) S %=$P(^DD(FILE,FIELD,0),"^",3),%A=$P(%,EXTVAL),%B=$L(%A,";") "RTN","XBFUNC",39,0) Q $P(%A,";",%B) "RTN","XBFUNC",40,0) ; "RTN","XBFUNC",41,0) EXTSET(FILE,FIELD,INTVAL) ;PEP - Get Extnl Field Value Given Intnl Field Value "RTN","XBFUNC",42,0) ; For a set of codes type field "RTN","XBFUNC",43,0) ; "RTN","XBFUNC",44,0) ; E.g.: $$EXTSET^XBFUNC(9000001,.21,5) returns "RETIRED". "RTN","XBFUNC",45,0) ; "RTN","XBFUNC",46,0) I '$G(FILE)!('$G(FIELD)) Q "" "RTN","XBFUNC",47,0) I $G(INTVAL)="" Q "" "RTN","XBFUNC",48,0) I '$D(^DD(FILE,FIELD)) Q "" "RTN","XBFUNC",49,0) I $P(^DD(FILE,FIELD,0),"^",3)'[INTVAL Q "" "RTN","XBFUNC",50,0) NEW %,%A "RTN","XBFUNC",51,0) S %=$P(^DD(FILE,FIELD,0),"^",3),%A=$P(%,(INTVAL_":"),2) "RTN","XBFUNC",52,0) Q $P(%A,";") "RTN","XBFUNC",53,0) ; "RTN","XBFUNC",54,0) DECFRAC(X) ;PEP - Convert Decimal to Fraction (X contains Decimal number). "RTN","XBFUNC",55,0) ; "RTN","XBFUNC",56,0) ; E.g.: $$DECFRAC^XBFUNC(.25) returns "1/4". "RTN","XBFUNC",57,0) ; "RTN","XBFUNC",58,0) Q:'$D(X) "" "RTN","XBFUNC",59,0) Q:$E(X)'="." "" "RTN","XBFUNC",60,0) NEW D,N "RTN","XBFUNC",61,0) S N=+$P(X,".",2) "RTN","XBFUNC",62,0) Q:'N "" "RTN","XBFUNC",63,0) S $P(D,"0",$L(+X))="" S D="1"_D "RTN","XBFUNC",64,0) F Q:(N#2) S N=N/2,D=D/2 "RTN","XBFUNC",65,0) F Q:(N#5) S N=N/5,D=D/5 "RTN","XBFUNC",66,0) Q N_"/"_D "RTN","XBFUNC",67,0) ; "RTN","XBFUNC",68,0) C(X,Y) ;PEP - Center X in field length Y/IOM/80. "RTN","XBFUNC",69,0) Q $J("",$S($D(Y):Y,$G(IOM):IOM,1:80)-$L(X)\2)_X "RTN","XBFUNC",70,0) ; "RTN","XBFUNC",71,0) GDT(JDT) ;PEP - Return Gregorian Date, given Julian Date. "RTN","XBFUNC",72,0) Q:'$G(JDT) -1 "RTN","XBFUNC",73,0) S:'$D(DT) DT=$$DT^XLFDT "RTN","XBFUNC",74,0) Q $$HTE^XLFDT($P($$FMTH^XLFDT($E(DT,1,3)_"0101"),",")+JDT-1) "RTN","XBFUNC",75,0) ; "RTN","XBFUNC",76,0) JDT(XBDT) ;PEP - Return Julian Date, given FM date. "RTN","XBFUNC",77,0) Q:'$D(XBDT) -1 "RTN","XBFUNC",78,0) Q:'(XBDT?7N) -1 "RTN","XBFUNC",79,0) S:'$D(DT) DT=$$DT^XLFDT "RTN","XBFUNC",80,0) Q $$FMDIFF^XLFDT(XBDT,$E(DT,1,3)_"0101")+1 "RTN","XBFUNC",81,0) ; "RTN","XBFUNC",82,0) USR() ;PEP - Return name of current user for ^VA(200. "RTN","XBFUNC",83,0) Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0") "RTN","XBFUNC",84,0) ; "RTN","XBFUNC",85,0) LOC() ;PEP - Return location name from file 4 based on DUZ(2). "RTN","XBFUNC",86,0) Q $S($G(DUZ(2)):$S($D(^DIC(4,DUZ(2),0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0") "RTN","XBFUNC",87,0) ; "RTN","XBFUNC",88,0) CV(X) ;PEP - Given a Namespace, return current version. "RTN","XBFUNC",89,0) Q $$VERSION^XPDUTL(X) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFUNC",90,0) Q:'$L($G(X)) -1 "RTN","XBFUNC",91,0) S X=$O(^DIC(9.4,"C",X,0)) "RTN","XBFUNC",92,0) Q:'X -1 "RTN","XBFUNC",93,0) Q $G(^DIC(9.4,X,"VERSION"),-1) "RTN","XBFUNC",94,0) ; "RTN","XBFUNC",95,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFUNC",96,0) FNAME(N) ;PEP - Given File number, return File Name. "RTN","XBFUNC",97,0) Q:'$L($G(N)) -1 "RTN","XBFUNC",98,0) S N=$O(^DD(N,0,"NM","")) "RTN","XBFUNC",99,0) Q:'$L(N) -1 "RTN","XBFUNC",100,0) Q N "RTN","XBFUNC",101,0) ; "RTN","XBFUNC",102,0) FGLOB(N) ;PEP - Given File number, return File Global. "RTN","XBFUNC",103,0) Q:'$L($G(N)) -1 "RTN","XBFUNC",104,0) Q $G(^DIC(N,0,"GL"),-1) "RTN","XBFUNC",105,0) ; "RTN","XBFUNC",106,0) ZEROTH(A,B,C,D,E,F,G,H,I,J,K) ;PEP - Return dd 0th node. A is file #, rest fields. "RTN","XBFUNC",107,0) I '$G(A) Q -1 "RTN","XBFUNC",108,0) I '$G(B) Q -1 "RTN","XBFUNC",109,0) F %=67:1:75 Q:'$G(@($C(%))) S A=+$P(^DD(A,B,0),U,2),B=@($C(%)) "RTN","XBFUNC",110,0) I 'A!('B) Q -1 "RTN","XBFUNC",111,0) I '$D(^DD(A,B,0)) Q -1 "RTN","XBFUNC",112,0) Q U_$P(^DD(A,B,0),U,2) "RTN","XBFUNC",113,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBFUNC",114,0) ; "RTN","XBFUNC1") 0^63^B3264910 "RTN","XBFUNC1",1,0) XBFUNC1 ; IHS/ADC/GTH - FUNCTION LIBRARY CONTINUED ; [ 02/07/97 3:02 PM ] "RTN","XBFUNC1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFUNC1",3,0) ; "RTN","XBFUNC1",4,0) PROVCLS(PROV,FORM) ;PEP - Retrieve Provider Class from New Person File "RTN","XBFUNC1",5,0) I $G(PROV)="" Q "" "RTN","XBFUNC1",6,0) I '$D(^VA(200,PROV)) Q "" "RTN","XBFUNC1",7,0) NEW X,Z,Y,CLS,DIC,DR,DA,DIQ "RTN","XBFUNC1",8,0) S DIC=200,DR="53.5",DA=PROV,DIQ="CLS" "RTN","XBFUNC1",9,0) S:$G(FORM)="I" DIQ(0)="I" "RTN","XBFUNC1",10,0) D ENDIQ1 "RTN","XBFUNC1",11,0) S CLS=$S($G(FORM)="I":CLS(200,PROV,"53.5","I"),1:CLS(200,PROV,"53.5")) "RTN","XBFUNC1",12,0) Q $S(CLS="":"UNKNOWN",1:CLS) "RTN","XBFUNC1",13,0) ; "RTN","XBFUNC1",14,0) PROVCLSC(PROV) ;PEP - Retrieve Provider Class Code given New Person File IEN "RTN","XBFUNC1",15,0) I $G(PROV)="" Q "" "RTN","XBFUNC1",16,0) I '$D(^VA(200,PROV)) Q "" "RTN","XBFUNC1",17,0) NEW X,Z,Y,CODE,DIC,DR,DA,DIQ,CLASS "RTN","XBFUNC1",18,0) S CLASS=$$PROVCLS^XBFUNC1(PROV,"I") "RTN","XBFUNC1",19,0) I CLASS="UNKNOWN" Q "UNKNOWN" "RTN","XBFUNC1",20,0) S DIC=7,DR="9999999.01",DA=CLASS,DIQ="CODE" "RTN","XBFUNC1",21,0) D ENDIQ1 "RTN","XBFUNC1",22,0) S CODE=CODE(7,CLASS,"9999999.01") "RTN","XBFUNC1",23,0) Q $S(CODE="":"UNKNOWN",1:CODE) "RTN","XBFUNC1",24,0) ; "RTN","XBFUNC1",25,0) PROVAFFL(PROV,FORM) ;PEP - Retrieve provider affiliation in int or ext format "RTN","XBFUNC1",26,0) I $G(PROV)="" Q "" "RTN","XBFUNC1",27,0) I '$D(^VA(200,PROV)) Q "" "RTN","XBFUNC1",28,0) NEW X,Z,Y,AFFL,DIC,DR,DA,DIQ "RTN","XBFUNC1",29,0) S DIC=200,DR="9999999.01",DA=PROV,DIQ="AFFL" "RTN","XBFUNC1",30,0) S:$G(FORM)="I" DIQ(0)="I" "RTN","XBFUNC1",31,0) D ENDIQ1 "RTN","XBFUNC1",32,0) S AFFL=$S($G(FORM)="I":AFFL(200,PROV,"9999999.01","I"),1:AFFL(200,PROV,"9999999.01")) "RTN","XBFUNC1",33,0) Q AFFL "RTN","XBFUNC1",34,0) ; "RTN","XBFUNC1",35,0) PROVCODE(PROV) ;PEP - Retrieve provider code "RTN","XBFUNC1",36,0) I $G(PROV)="" Q "" "RTN","XBFUNC1",37,0) I '$D(^VA(200,PROV)) Q "" "RTN","XBFUNC1",38,0) NEW X,Z,Y,CODE,DIC,DR,DA,DIQ "RTN","XBFUNC1",39,0) S DIC=200,DR="9999999.02",DA=PROV,DIQ="CODE",DIQ(0)="E" "RTN","XBFUNC1",40,0) D ENDIQ1 "RTN","XBFUNC1",41,0) Q CODE(200,PROV,"9999999.02","E") "RTN","XBFUNC1",42,0) ; "RTN","XBFUNC1",43,0) PROVINI(PROV) ;PEP - Retrieve provider initials "RTN","XBFUNC1",44,0) I '$G(PROV) Q "" "RTN","XBFUNC1",45,0) I '$D(^VA(200,PROV)) Q "" "RTN","XBFUNC1",46,0) NEW X,Z,Y,INIT,DIC,DR,DA,DIQ "RTN","XBFUNC1",47,0) S DIC=200,DR="1",DA=PROV,DIQ="INIT",DIQ(0)="E" "RTN","XBFUNC1",48,0) D ENDIQ1 "RTN","XBFUNC1",49,0) Q INIT(200,PROV,"1","E") "RTN","XBFUNC1",50,0) ; "RTN","XBFUNC1",51,0) ENDIQ1 ; "RTN","XBFUNC1",52,0) NEW CLASS,FORM,PROV,X,Y,Z "RTN","XBFUNC1",53,0) D EN^DIQ1 "RTN","XBFUNC1",54,0) Q "RTN","XBFUNC1",55,0) ; "RTN","XBFUNC2") 0^64^B10310135 "RTN","XBFUNC2",1,0) XBFUNC2 ; IHS/ADC/GTH - FUNCTION LIBRARY : PCC RELATED FUNCTIONS ; [ 02/07/97 3:02 PM ] "RTN","XBFUNC2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBFUNC2",3,0) ; "RTN","XBFUNC2",4,0) ; "RTN","XBFUNC2",5,0) PCCPPINT(XBVISIT) ;PEP - Return primary provider ien in VA(200 "RTN","XBFUNC2",6,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBY "RTN","XBFUNC2",7,0) S XBX=0 "RTN","XBFUNC2",8,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=+^AUPNVPRV(XBX,0) Q "RTN","XBFUNC2",9,0) I '$G(XBY) Q "" "RTN","XBFUNC2",10,0) Q XBY "RTN","XBFUNC2",11,0) ; "RTN","XBFUNC2",12,0) PCCPPN(XBVISIT) ;PEP - Return a visit's primary provider (NAME) "RTN","XBFUNC2",13,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBY "RTN","XBFUNC2",14,0) S XBX=0 "RTN","XBFUNC2",15,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=XBX Q "RTN","XBFUNC2",16,0) I '$G(XBY) Q "NONE ENTERED" "RTN","XBFUNC2",17,0) S XBX=$$VAL^XBDIQ1(9000010.06,XBY,.01) "RTN","XBFUNC2",18,0) Q:XBX="" "NONE ENTERED" "RTN","XBFUNC2",19,0) Q XBX "RTN","XBFUNC2",20,0) ; "RTN","XBFUNC2",21,0) PCCPPI(XBVISIT) ;PEP - Return a visit's primary provider (INITIALS) "RTN","XBFUNC2",22,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBY "RTN","XBFUNC2",23,0) S XBX=0 "RTN","XBFUNC2",24,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=+^AUPNVPRV(XBX,0) Q "RTN","XBFUNC2",25,0) I '$G(XBY) Q "???" "RTN","XBFUNC2",26,0) S XBX=$$VAL^XBDIQ1($S($P($G(^AUTTSITE(1,0)),U,22):200,1:6),XBY,1) "RTN","XBFUNC2",27,0) Q:XBX="" "???" "RTN","XBFUNC2",28,0) Q XBX "RTN","XBFUNC2",29,0) ; "RTN","XBFUNC2",30,0) PCCPPCLS(XBVISIT,FORM) ;PEP - Return a visit's primary provider class (CODE) "RTN","XBFUNC2",31,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBY,XBCODE "RTN","XBFUNC2",32,0) S XBX=0 "RTN","XBFUNC2",33,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=+^AUPNVPRV(XBX,0) Q "RTN","XBFUNC2",34,0) I '$G(XBY) Q "???" "RTN","XBFUNC2",35,0) S:$G(FORM)="I" DIQ(0)="I" "RTN","XBFUNC2",36,0) S DA=XBY,DIC=$S($P($G(^AUTTSITE(1,0)),U,22):200,1:6),DR=$S($P($G(^AUTTSITE(1,0)),U,22):53.5,1:2),DIQ="XBX" "RTN","XBFUNC2",37,0) D EN^DIQ1 "RTN","XBFUNC2",38,0) I $P($G(^AUTTSITE(1,0)),U,22) S XBX=$S($G(FORM)="I":$G(XBX(200,XBY,"53.5","I")),1:$G(XBX(200,XBY,"53.5"))) "RTN","XBFUNC2",39,0) I '$P($G(^AUTTSITE(1,0)),U,22) S XBX=$S($G(FORM)="I":$G(XBX(6,XBY,"2","I")),1:$G(XBX(6,XBY,"2"))) "RTN","XBFUNC2",40,0) I XBX="" Q "???" "RTN","XBFUNC2",41,0) Q XBX "RTN","XBFUNC2",42,0) ; "RTN","XBFUNC2",43,0) PCCPPCLC(XBVISIT) ;PEP - Return a visit's primary provider class (CODE) "RTN","XBFUNC2",44,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBCODE,XBY,XBN "RTN","XBFUNC2",45,0) S XBX=0 "RTN","XBFUNC2",46,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=+^AUPNVPRV(XBX,0) Q "RTN","XBFUNC2",47,0) I '$G(XBY) Q "???" "RTN","XBFUNC2",48,0) S DA=XBY,DIC=200,DR="53.5",DIQ="XBX",DIQ(0)="I" "RTN","XBFUNC2",49,0) D EN^DIQ1 "RTN","XBFUNC2",50,0) S XBX=$G(XBX(200,XBY,"53.5","I")) "RTN","XBFUNC2",51,0) Q:XBX="" "???" "RTN","XBFUNC2",52,0) S DIC=7,DR="9999999.01",DA=XBX,DIQ="XBCODE" "RTN","XBFUNC2",53,0) D EN^DIQ1 "RTN","XBFUNC2",54,0) S XBX=XBCODE(7,XBX,"9999999.01","I") "RTN","XBFUNC2",55,0) Q XBX "RTN","XBFUNC2",56,0) ; "RTN","XBFUNC2",57,0) PCCPPAFF(XBVISIT,FORM) ;PEP - Return a visit's primary provider (affiliation) "RTN","XBFUNC2",58,0) NEW X,Y,Z,XBX,DIC,DR,DA,DIQ,XBY,XBN "RTN","XBFUNC2",59,0) S XBX=0 "RTN","XBFUNC2",60,0) F S XBX=$O(^AUPNVPRV("AD",XBVISIT,XBX)) Q:XBX'=+XBX I $P(^AUPNVPRV(XBX,0),U,4)="P" S XBY=+^AUPNVPRV(XBX,0) Q "RTN","XBFUNC2",61,0) I '$G(XBY) Q "???" "RTN","XBFUNC2",62,0) S:$G(FORM)="I" DIQ(0)="I" "RTN","XBFUNC2",63,0) S DA=XBY,DIC=$S($P($G(^AUTTSITE(1,0)),U,22):200,1:6),DR="9999999.01",DIQ="XBX" "RTN","XBFUNC2",64,0) D EN^DIQ1 "RTN","XBFUNC2",65,0) I $P($G(^AUTTSITE(1,0)),U,22) S XBX=$S($G(FORM)="I":$G(XBX(200,XBY,9999999.01,"I")),1:$G(XBX(200,XBY,9999999.01))) "RTN","XBFUNC2",66,0) I '$P($G(^AUTTSITE(1,0)),U,22) S XBX=$S($G(FORM)="I":$G(XBX(6,XBY,9999999.01,"I")),1:$G(XBX(6,XBY,9999999.01))) "RTN","XBFUNC2",67,0) Q:XBX="" "???" "RTN","XBFUNC2",68,0) Q XBX "RTN","XBFUNC2",69,0) ; "RTN","XBGC") 0^65^B9459897 "RTN","XBGC",1,0) XBGC ; IHS/ADC/GTH - COPY GLOBAL (ANY LEVEL) ; [ 02/07/97 3:02 PM ] "RTN","XBGC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGC",3,0) ; "RTN","XBGC",4,0) START ; "RTN","XBGC",5,0) NEW (%) "RTN","XBGC",6,0) GSGL ; "RTN","XBGC",7,0) R !,"Source global: ",SG:$G(DTIME,999),! "RTN","XBGC",8,0) Q:SG="" "RTN","XBGC",9,0) S:$E(SG)'="^" SG="^"_SG "RTN","XBGC",10,0) S:SG'["(" SG=SG_"(" "RTN","XBGC",11,0) S:$E(SG,$L(SG))="," SG=$E(SG,1,$L(SG)-1) "RTN","XBGC",12,0) I SG'?1"^"1U.U1"(".UNP W $C(7) G GSGL "RTN","XBGC",13,0) I $E(SG,$L(SG))=")" W !!,"Global must be partial!,",!,$C(7) G GSGL "RTN","XBGC",14,0) KILL SUB,SCNT,NSUB "RTN","XBGC",15,0) I $E(SG,$L(SG))="(" I $D(@($E(SG,1,$L(SG)-1)))=0 W !!,"Global ",SG," does not exist!",!,$C(7) G GSGL "RTN","XBGC",16,0) I $E(SG,$L(SG))'="(" I $D(@(SG_")"))=0 W !!,"Partial global ",SG," does not exist!",!,$C(7) G GSGL "RTN","XBGC",17,0) GDGL ; "RTN","XBGC",18,0) R !,"Destination global: ",DG:$G(DTIME,999),! "RTN","XBGC",19,0) Q:DG="" "RTN","XBGC",20,0) S:$E(DG)'="^" DG="^"_DG "RTN","XBGC",21,0) S:DG'["(" DG=DG_"(" "RTN","XBGC",22,0) S:$E(DG,$L(DG))="," DG=$E(DG,1,$L(DG)-1) "RTN","XBGC",23,0) I DG'?1"^"1U.U1"(".UNP W $C(7) G GDGL "RTN","XBGC",24,0) I $E(DG,$L(DG))=")" W !!,"Global must be partial!,",!,$C(7) G GDGL "RTN","XBGC",25,0) KILL SUB,SCNT,NSUB "RTN","XBGC",26,0) I SG=DG W !!,"Output same as input!",$C(7),! G GSGL "RTN","XBGC",27,0) I $L(DG)>$L(SG) I $E(DG,1,$L(SG))=SG W !!,"Output contained in input!",$C(7),! G GSGL "RTN","XBGC",28,0) I $L(DG)<$L(SG) I $E(SG,1,$L(DG))=DG W !!,"Input contained in output!",$C(7),! G GSGL "RTN","XBGC",29,0) I $E(DG,$L(DG))="(" I $D(@($P(DG,"(",1)))'=0 W !!,"Destination global """,$P(DG,"(",1),""" already exists!",! S IS="" "RTN","XBGC",30,0) I $E(DG,$L(DG))'="(" I $D(@(DG_")"))'=0 W !!,"Partial global ",DG," already exists.",! S IS="" "RTN","XBGC",31,0) I $D(IS) W !,"KILL (Y/N) " R ANS:$G(DTIME,999) I $E(ANS)="Y" K:$E(DG,$L(DG))="(" @($E(DG,1,$L(DG)-1)) K:$E(DG,$L(DG))'="(" @(DG_")") "RTN","XBGC",32,0) I $D(IS),ANS'="Y" W !,"Copy anyway? (Y/N) N//" R ANS:$G(DTIME,999) S:ANS="" ANS="N" Q:ANS'="Y" "RTN","XBGC",33,0) I $E(SG,$L(SG))="(" S FROM=$E(SG,1,$L(SG)-1) "RTN","XBGC",34,0) E S FROM=SG_")" "RTN","XBGC",35,0) I $E(DG,$L(DG))="(" S TO=$E(DG,1,$L(DG)-1) "RTN","XBGC",36,0) E S TO=DG_")" "RTN","XBGC",37,0) S:$D(@(FROM))#10 @(TO)=@(FROM) "RTN","XBGC",38,0) S (SCMA,DCMA)="" "RTN","XBGC",39,0) S:$E(SG,$L(SG))'="(" SCMA="," "RTN","XBGC",40,0) S:$E(DG,$L(DG))'="(" DCMA="," "RTN","XBGC",41,0) S CTR=0 "RTN","XBGC",42,0) D WALK "RTN","XBGC",43,0) W !!,"All done!",! "RTN","XBGC",44,0) G START "RTN","XBGC",45,0) ; "RTN","XBGC",46,0) WALK ; TRAVERSE TREE AT CURRENT SUBSCRIPT LEVEL "RTN","XBGC",47,0) NEW (CTR,SCMA,DCMA,SG,DG) "RTN","XBGC",48,0) S NL="" "RTN","XBGC",49,0) F L=0:0 S NL=$O(@(SG_SCMA_""""_NL_""")")) Q:NL="" D GOTNODE "RTN","XBGC",50,0) Q "RTN","XBGC",51,0) ; "RTN","XBGC",52,0) GOTNODE ; PROCESS ONE NODE "RTN","XBGC",53,0) S CTR=CTR+1 "RTN","XBGC",54,0) W:'(CTR#100) "." "RTN","XBGC",55,0) S FROM=SG_SCMA_"NL)",TO=DG_DCMA_"NL)" "RTN","XBGC",56,0) I $D(@(FROM))#10 S VAL=@(FROM),@(TO)=VAL "RTN","XBGC",57,0) I $D(@(FROM))\10 S LNL=$L(NL),SG=SG_SCMA_""""_NL_"""",DG=DG_DCMA_""""_NL_"""",SVSCMA=SCMA,SVDCMA=DCMA,(SCMA,DCMA)="," D WALK S SCMA=SVSCMA,DCMA=SVDCMA,SG=$E(SG,1,$L(SG)-(LNL+2+$L(SCMA))),DG=$E(DG,1,$L(DG)-(LNL+2+$L(DCMA))) "RTN","XBGC",58,0) Q "RTN","XBGC",59,0) ; "RTN","XBGCMP") 0^66^B41229292 "RTN","XBGCMP",1,0) XBGCMP ; IHS/ADC/GTH - COMPARES TWO DIFFERENT GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","XBGCMP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGCMP",3,0) ; "RTN","XBGCMP",4,0) ;;This utility is to be used to compare two globals. The initial "RTN","XBGCMP",5,0) ;;globals entered must be identically subscripted. The utility will "RTN","XBGCMP",6,0) ;;indicate which nodes of the first global have values different "RTN","XBGCMP",7,0) ;;than similarly subscipted nodes of the second global. It will "RTN","XBGCMP",8,0) ;;also indicate if a node in one global exists and if a similarly "RTN","XBGCMP",9,0) ;;subscripted node in the other does not exist. You may utilize the "RTN","XBGCMP",10,0) ;;[UCI,VOLUME] syntax to compare across UCIs and volume groups. "RTN","XBGCMP",11,0) ;; "RTN","XBGCMP",12,0) ;;### "RTN","XBGCMP",13,0) ; "RTN","XBGCMP",14,0) NEW X "RTN","XBGCMP",15,0) D INIT "RTN","XBGCMP",16,0) A ; "RTN","XBGCMP",17,0) D ASK "RTN","XBGCMP",18,0) I XBQ G X1 "RTN","XBGCMP",19,0) D SETUP ; sets up up print/display, calls subrtn to process gbls "RTN","XBGCMP",20,0) G A "RTN","XBGCMP",21,0) X1 ; "RTN","XBGCMP",22,0) D EOJ "RTN","XBGCMP",23,0) Q "RTN","XBGCMP",24,0) ; "RTN","XBGCMP",25,0) INIT ; Setup "RTN","XBGCMP",26,0) D ^XBKVAR "RTN","XBGCMP",27,0) S (XBS,XBQ)=0 "RTN","XBGCMP",28,0) X ^%ZOSF("UCI") "RTN","XBGCMP",29,0) S XBVOL=$P(Y,",",2) "RTN","XBGCMP",30,0) Q "RTN","XBGCMP",31,0) ; "RTN","XBGCMP",32,0) ASK ; Get globals to be compared "RTN","XBGCMP",33,0) 1 ; "RTN","XBGCMP",34,0) R !,"First global to compare, i.e., NAME, NAME(1) or NAME(""B""): ^",X:DTIME "RTN","XBGCMP",35,0) D:X["?" HELP^XBHELP("XBGCMP","XBGCMP") "RTN","XBGCMP",36,0) G:X["?" 1 "RTN","XBGCMP",37,0) I "^"[X S XBQ=1 G X2 "RTN","XBGCMP",38,0) D CHECK "RTN","XBGCMP",39,0) I XBS S XBS=0 G 1 "RTN","XBGCMP",40,0) S XBG1=X "RTN","XBGCMP",41,0) 2 ; "RTN","XBGCMP",42,0) R !,"Second global to compare: ^",X:DTIME "RTN","XBGCMP",43,0) D:X["?" HELP^XBHELP("XBGCMP","XBGCMP") "RTN","XBGCMP",44,0) G:X["?" 2 "RTN","XBGCMP",45,0) I "^"[X S XBQ=1 G X2 "RTN","XBGCMP",46,0) D CHECK "RTN","XBGCMP",47,0) I XBS S XBS=0 G 2 "RTN","XBGCMP",48,0) S XBG2=X "RTN","XBGCMP",49,0) D CHECK2 "RTN","XBGCMP",50,0) I XBS S XBS=0 G 1 "RTN","XBGCMP",51,0) X2 ; "RTN","XBGCMP",52,0) Q "RTN","XBGCMP",53,0) ; "RTN","XBGCMP",54,0) CHECK ; Check each global "RTN","XBGCMP",55,0) I X["(",X'[")" S XBS=1 W !,*7," Must end in "")""" G X6 "RTN","XBGCMP",56,0) S XBT=$P(X,"(") "RTN","XBGCMP",57,0) I XBT["[" D "RTN","XBGCMP",58,0) . I XBT'["]" W !,*7," Invalid cross UCI notation" S XBS=1 G X4 "RTN","XBGCMP",59,0) . S XBT=$P(XBT,"]") "RTN","XBGCMP",60,0) . I XBT["""" F XBI=1:1:$L(XBT) I $E(XBT,XBI)="""" S $E(XBT,XBI)="",XBI=XBI-1 "RTN","XBGCMP",61,0) . I XBT?1"["3U1","3U!(XBT?1"["3U) "RTN","XBGCMP",62,0) . E W !,*7," Invalid cross UCI notation" S XBS=1 G X4 "RTN","XBGCMP",63,0) . I XBT'[","!($P(XBT,",",2)'=XBVOL) S X="["""_$P(XBT,"[",2)_"""]"_$P(X,"]",2) G X4 "RTN","XBGCMP",64,0) . S X="["""_$P($P(XBT,"[",2),",")_"""]"_$P(X,"]",2) "RTN","XBGCMP",65,0) X4 . Q "RTN","XBGCMP",66,0) S XBT(1)=$S($P(X,"(")["[":$P($P(X,"]",2),"("),1:$P(X,"(")) "RTN","XBGCMP",67,0) I $L(XBT(1))>8 W !,*7," Invalid global name" S XBS=1 G X6 "RTN","XBGCMP",68,0) I XBT(1)?1A.AN!(XBT(1)?1"XB".AN) "RTN","XBGCMP",69,0) E W !,*7," Invalid global name" S XBS=1 G X6 "RTN","XBGCMP",70,0) S XBT(2)=X,X="TRAP^XBGCMP",@^%ZOSF("TRAP"),X=XBT(2) "RTN","XBGCMP",71,0) I '$D(@("^"_X)) W !,*7," Global does not exist" S XBS=1 "RTN","XBGCMP",72,0) X6 ; "RTN","XBGCMP",73,0) Q "RTN","XBGCMP",74,0) ; "RTN","XBGCMP",75,0) TRAP ; Error trap for missing quotes "RTN","XBGCMP",76,0) I $$Z^ZIBNSSV("ERROR")["0 D PAUSE Q:$G(XBSTP) S XBL=IOSL-3 W ! "RTN","XBGCMP",142,0) . I $L(^TMP("XBGCMP",XBN,XB))>76 W !,$P(^(XB),"~"),!,$P(^(XB),"~",2),! S XBL=XBL-3.25 "RTN","XBGCMP",143,0) . E W !,$P(^TMP("XBGCMP",XBN,XB),"~")," ",$P(^(XB),"~",2),! S XBL=XBL-2 "RTN","XBGCMP",144,0) I '$G(XBSTP) W !,"Comparison completed with ",XBC," difference",$S(XBC'=1:"s",1:"")," found.",! "RTN","XBGCMP",145,0) KILL ^TMP("XBGCMP",XBN) "RTN","XBGCMP",146,0) I $D(ZTQUEUED) S ZTREQ="@" D EOJ "RTN","XBGCMP",147,0) Q "RTN","XBGCMP",148,0) ; "RTN","XBGCMP",149,0) PAUSE ; Quit display? "RTN","XBGCMP",150,0) I $E(IOST,1,2)="C-" S Y=$$DIR^XBDIR("E") S:$D(DIRUT)!($D(DUOUT)) XBSTP=1 KILL DIRUT,DUOUT W ! "RTN","XBGCMP",151,0) Q "RTN","XBGCMP",152,0) ; "RTN","XBGCMP",153,0) SCHED ; Schedules another task to print "RTN","XBGCMP",154,0) KILL ZTSAVE "RTN","XBGCMP",155,0) F %="XBN","XBG1","XBG2","XBC" S ZTSAVE(%)="" "RTN","XBGCMP",156,0) S ZTRTN="PRINT^XBGCMP",ZTDESC="PRINT COMPARISON OF TWO GLOBALS",ZTIO=XBION,ZTDTH=DT "RTN","XBGCMP",157,0) D ^%ZTLOAD "RTN","XBGCMP",158,0) KILL ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK "RTN","XBGCMP",159,0) Q "RTN","XBGCMP",160,0) ; "RTN","XBGCMP",161,0) EOJ ; "RTN","XBGCMP",162,0) KILL XB,XBA,XBB,XBC,XBI,XBL,XBG1,XBG2,XBION,XBN,XBQ,XBS,XBSTP,XBT,XBTEMP,XBTMP,XBVOL "RTN","XBGCMP",163,0) Q "RTN","XBGCMP",164,0) ; "RTN","XBGCMP",165,0) HELP ;EP - Dooda about the utility "RTN","XBGCMP",166,0) ;;@;! "RTN","XBGCMP2") 0^67^B4315241 "RTN","XBGCMP2",1,0) XBGCMP2 ;DG/OHPRD; HELP FOR GLOBAL COMPARE UTILITY [ 01/27/92 3:55 PM ] "RTN","XBGCMP2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGCMP2",3,0) HELP ; Dooda about the utility "RTN","XBGCMP2",4,0) W !!,"This utility is to be used to compare two globals. The initial globals entered",!,"must be identically subscripted. The utility will indicate which nodes of the" D "RTN","XBGCMP2",5,0) . W !,"first global have values different than similarly subscipted nodes of the",!,"second global. It will also indicate if a node in one global exists and",!,"if a similarly subscripted node in the other does not exist. You may" "RTN","XBGCMP2",6,0) . W !,"utilize the [UCI,VOLUME] syntax to compare across UCIs and volume groups.",! "RTN","XBGCMP2",7,0) Q "RTN","XBGCMP2",8,0) ; "RTN","XBGL") 0^68^B6934739 "RTN","XBGL",1,0) XBGL ;IHS/ITSC/DMJ - GLOBAL LISTER [ 03/17/2005 10:46 AM ] "RTN","XBGL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGL",3,0) START ;START HERE "RTN","XBGL",4,0) K XB,DIR W ! S $Y=1 "RTN","XBGL",5,0) S DIR(0)="FAO^1:80",DIR("A")="Global: ^" D ^DIR K DIR "RTN","XBGL",6,0) I Y=""!(Y="^") W ! K DIR Q "RTN","XBGL",7,0) I Y[",,"!(Y["(,") W *7,!!,"Use '*' for wildcard.",! G START "RTN","XBGL",8,0) I $E(Y,1)'="^" S Y="^"_Y "RTN","XBGL",9,0) I $L(Y,"(")=2,$P(Y,"(",2)']"" S Y=$P(Y,"(",1) "RTN","XBGL",10,0) S (XB("Y"),XB("IN"))=Y "RTN","XBGL",11,0) S XB("RB")=$P(XB("IN"),"(",1) "RTN","XBGL",12,0) I1 ;SET UP INPUT FOR COMPARISON "RTN","XBGL",13,0) I XB("IN")["(" D "RTN","XBGL",14,0) .S (XB("LP"),XB("RP"))=0 F I=1:1:$L(XB("IN")) S:$E(XB("IN"),I)="(" XB("LP")=XB("LP")+1 S:$E(XB("IN"),I)=")" XB("RP")=XB("RP")+1 "RTN","XBGL",15,0) .S XB("X")="",XB("Z")="" "RTN","XBGL",16,0) .S XB("IS")=$P(XB("IN"),"(",2,999) "RTN","XBGL",17,0) .I $E(XB("IS"),$L(XB("IS")))=")",XB("LP")=XB("RP") S XB("IS")=$E(XB("IS"),1,$L(XB("IS"))-1) "RTN","XBGL",18,0) .F I=1:1:$L(XB("IS"),",") D "RTN","XBGL",19,0) ..S XB("I"_I)=$P(XB("IS"),",",I) Q:XB("I"_I)="" "RTN","XBGL",20,0) ..S X="ER2",@^%ZOSF("TRAP") I 'XB("I"_I),XB("I"_I)'=0,XB("I"_I)'="*",$E(XB("I"_I),1)'=$C(34) D "RTN","XBGL",21,0) ...I $E(XB("I"_I),$L(XB("I"_I)))=":" S XB("I"_I)=$E(XB("I"_I),1,$L(XB("I"_I))-1),XB("F3")=1 "RTN","XBGL",22,0) ...S XB("I"_I)=@XB("I"_I) "RTN","XBGL",23,0) ...I $G(XB("F3")) S XB("I"_I)=XB("I"_I)_":",XB("F3")=0 "RTN","XBGL",24,0) ..S $P(XB("X"),",",I)=XB("I"_I),$P(XB("Z"),",",I)=XB("I"_I) "RTN","XBGL",25,0) ..I XB("I"_I)="*" S $P(XB("X"),",",I)="0" "RTN","XBGL",26,0) ..I $E(XB("I"_I),$L(XB("I"_I)))=":" S $P(XB("Z"),",",I)="*",$P(XB("X"),",",I)=$E(XB("I"_I),1,$L(XB("I"_I))-1),XB("I"_I)="*" "RTN","XBGL",27,0) .S XB("IN")=XB("RB")_"("_XB("Z")_$S($E(Y,$L(Y))=")"&(XB("RP")=XB("LP")):")",1:""),XB("I")=$L(XB("Z"),",") "RTN","XBGL",28,0) .S XB("Y")=XB("RB")_"("_XB("X")_")" "RTN","XBGL",29,0) FIRST ;INITIAL ENTRY "RTN","XBGL",30,0) S X="ER1",@^%ZOSF("TRAP") "RTN","XBGL",31,0) I XB("IN")[")",XB("IN")'["*" S XB("F1")=1 "RTN","XBGL",32,0) I $D(@XB("Y"))#2 D DISP I $G(XB("OUT")) G START "RTN","XBGL",33,0) LOOP ;LOOP HERE "RTN","XBGL",34,0) S X="ER2",@^%ZOSF("TRAP") "RTN","XBGL",35,0) F S XB("Y")=$Q(@(XB("Y"))) D MATCH Q:$G(XB("F1")) D DISP I $G(XB("OUT")) G START "RTN","XBGL",36,0) G START "RTN","XBGL",37,0) ER1 ;FIRST ERROR CONDITION "RTN","XBGL",38,0) G LOOP "RTN","XBGL",39,0) ER2 ;SECOND ERROR CONDITION "RTN","XBGL",40,0) W *7,!!,"??",! G START "RTN","XBGL",41,0) MATCH ;DECIPHER INPUT "RTN","XBGL",42,0) I XB("Y")="" S XB("F1")=1 Q "RTN","XBGL",43,0) I $P(XB("IN"),"(",2)']"" Q "RTN","XBGL",44,0) S XB("F2")=0 "RTN","XBGL",45,0) S XB("SB")=$P(XB("Y"),"(",2),XB("SB")=$E(XB("SB"),1,$L(XB("SB"))-1),XB("S")=$L(XB("SB"),",") "RTN","XBGL",46,0) I $E(XB("IN"),$L(XB("IN")))=")",XB("S")'=XB("I") S XB("F2")=1 Q "RTN","XBGL",47,0) S XB("*")=0 F I=1:1:XB("I") D "RTN","XBGL",48,0) .I XB("I"_I)="*" S XB("*")=XB("*")+1 Q "RTN","XBGL",49,0) .S XB("S"_I)=$P(XB("SB"),",",I) "RTN","XBGL",50,0) .I XB("I"_I)'=XB("S"_I) D "RTN","XBGL",51,0) ..S XB("F2")=1 "RTN","XBGL",52,0) ..I 'XB("*") S XB("F1")=1 "RTN","XBGL",53,0) ..I XB("IN")'["*" S XB("F1")=1 "RTN","XBGL",54,0) Q "RTN","XBGL",55,0) DISP ;OUTPUT "RTN","XBGL",56,0) Q:$G(XB("F2")) "RTN","XBGL",57,0) S XB("=")=@(XB("Y")) "RTN","XBGL",58,0) W !,XB("Y")," = ",XB("=") "RTN","XBGL",59,0) I $Y>20 D "RTN","XBGL",60,0) .S DIR(0)="E" D ^DIR K DIR "RTN","XBGL",61,0) .I 'Y S XB("OUT")=1 Q "RTN","XBGL",62,0) .W @IOF "RTN","XBGL",63,0) Q "RTN","XBGLDFN") 0^69^B1910868 "RTN","XBGLDFN",1,0) XBGLDFN ; IHS/ADC/GTH - GET LAST DFN ; [ 02/07/97 3:02 PM ] "RTN","XBGLDFN",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGLDFN",3,0) ; "RTN","XBGLDFN",4,0) START ; "RTN","XBGLDFN",5,0) NEW GBL,LDFN,NDFN,STRT,TGBL "RTN","XBGLDFN",6,0) LOOP ; "RTN","XBGLDFN",7,0) R !,"Enter global reference like '^DPT(""B"",' ",GBL:$G(DTIME,999) "RTN","XBGLDFN",8,0) Q:GBL="" "RTN","XBGLDFN",9,0) I $E(GBL)="?"!(GBL'?1"^"1U.U.E) W !,"Enter global reference (e.g. ""^AUPNPAT("")." G LOOP "RTN","XBGLDFN",10,0) S TGBL=$S($E(GBL,$L(GBL))="(":$P(GBL,"(",1),$E(GBL,$L(GBL))=",":$E(GBL,1,$L(GBL)-1)_")",$E(GBL,$L(GBL))'=")":GBL_")",1:GBL) "RTN","XBGLDFN",11,0) I '$D(@(TGBL)) W !!,"Global ",GBL," does not exist!" G XBGLDFN "RTN","XBGLDFN",12,0) R !,"Start after DFN: 0// ",STRT:$G(DTIME,999) "RTN","XBGLDFN",13,0) S:STRT="" STRT=0 "RTN","XBGLDFN",14,0) S LDFN="Started after high DFN" "RTN","XBGLDFN",15,0) S NDFN=$D(@(GBL_STRT_")")),NDFN=STRT F L=0:0 S NDFN=$O(^(NDFN)) Q:NDFN=""!(NDFN'?1N.N) S LDFN=NDFN "RTN","XBGLDFN",16,0) W !!,"Last DFN is ",LDFN "RTN","XBGLDFN",17,0) Q "RTN","XBGLDFN",18,0) ; "RTN","XBGSAVE") 0^70^B11967447 "RTN","XBGSAVE",1,0) XBGSAVE ; IHS/ADC/GTH - GENERIC GLOBAL SAVE FOR TRANSMISSION GLOBALS ; [ 07/21/2005 4:13 PM ] "RTN","XBGSAVE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGSAVE",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBGSAVE",4,0) ; "RTN","XBGSAVE",5,0) ; XBGL = name of global (mandatory, all others optional) "RTN","XBGSAVE",6,0) ; "RTN","XBGSAVE",7,0) ; XBCON= if defined, stops if first-level subscript is non-cannonic "RTN","XBGSAVE",8,0) ; XBDT = date of save, in FM format, default NOW "RTN","XBGSAVE",9,0) ; XBE = ending first-level numeric subscript "RTN","XBGSAVE",10,0) ; XBFLT= 1, saves as flat file "RTN","XBGSAVE",11,0) ; XBFN = output file name, default "." "RTN","XBGSAVE",12,0) ; XBF = beginning first-level numeric subscript, seed for $ORDER "RTN","XBGSAVE",13,0) ; XBIO = output device number "RTN","XBGSAVE",14,0) ; XBMED= media to which to save global (user asked, if not exist) "RTN","XBGSAVE",15,0) ; XBNAR= description displayed to user, if user asks for help "RTN","XBGSAVE",16,0) ; XBPAR= CR parameter (DSM only) "RTN","XBGSAVE",17,0) ; XBQ = Y/N, to place file in uucp q, default "Y" "RTN","XBGSAVE",18,0) ; XBQTO= 'sendto' destination, default AO sysid in RPMS SITE file "RTN","XBGSAVE",19,0) ; XBTLE= comment for dump header (facility name is concatenated) "RTN","XBGSAVE",20,0) ; XBUF = directory, default no longer provided - will kick out error "RTN","XBGSAVE",21,0) ; if XBUF undefined and no directory found in files "RTN","XBGSAVE",22,0) ; 9999999.39 or 8989.3 "RTN","XBGSAVE",23,0) ; XBS1 = zish send paramaters file entry "RTN","XBGSAVE",24,0) ; "RTN","XBGSAVE",25,0) SETUP ; "RTN","XBGSAVE",26,0) I '$D(^%ZOSF("OS")) S XBFLG(1)="The ^%ZOSF(""OS"") node does not exist",XBFLG=-1 G EOJ "RTN","XBGSAVE",27,0) ; I '(^%ZOSF("OS")["MSM"),'(^%ZOSF("OS")["DSM") S XBFLG(1)="Operating system is not 'MSM' or 'DSM'",XBFLG=-1 G EOJ ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBGSAVE",28,0) I '(^%ZOSF("OS")["MSM"),'(^%ZOSF("OS")["OpenM") S XBFLG(1)="Operating system is not 'MSM' or 'Cache'",XBFLG=-1 G EOJ ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBGSAVE",29,0) I '$G(DUZ(2)) S XBFLG(1)="Facility Number 'DUZ(2)' is not defined",XBFLG=-1 G EOJ "RTN","XBGSAVE",30,0) I '$D(XBGL) S XBFLG(1)="The variable 'XBGL' must contain the name of the global you wish to save." S XBFLG=-1 G EOJ "RTN","XBGSAVE",31,0) KILL XBFLG,XBGLL "RTN","XBGSAVE",32,0) S:'$D(DTIME) DTIME=300 "RTN","XBGSAVE",33,0) CHECK ; "RTN","XBGSAVE",34,0) S X=XBGL "RTN","XBGSAVE",35,0) I $L(X,"(")>1,$P(X,"(",2)="" S X=$P(X,"(") "RTN","XBGSAVE",36,0) S:$E(X,$L(X))="," X=$E(X,1,($L(X)-1)) "RTN","XBGSAVE",37,0) I $L(XBGL,"(")>1,$E(XBGL,$L(XBGL))'="," S XBGL=XBGL_"," "RTN","XBGSAVE",38,0) I $L(X,"(")>1,$E(X,$L(X))'=")" S X=X_")" "RTN","XBGSAVE",39,0) S:$L(X,"(")=1 XBGL=X_"(" "RTN","XBGSAVE",40,0) S XBGLL=U_X "RTN","XBGSAVE",41,0) CKGLOB ; "RTN","XBGSAVE",42,0) I '$D(@XBGLL) S XBFLG(1)="Transaction File does not exist",XBFLG=-1 G EOJ "RTN","XBGSAVE",43,0) ;S:'$D(XBUF) XBUF="/usr/spool/uucppublic" "RTN","XBGSAVE",44,0) I $G(XBUF)="" S XBUF=$P($G(^AUTTSITE(1,1)),"^",2) "RTN","XBGSAVE",45,0) I XBUF="" S XBUF=$P($G(^XTV(8989.3,1,"DEV")),"^",1) "RTN","XBGSAVE",46,0) I XBUF="" D G EOJ "RTN","XBGSAVE",47,0) .S XBFLG(1)="Export Directory NOT Specified" "RTN","XBGSAVE",48,0) .S XBFLG=-1 "RTN","XBGSAVE",49,0) I "/\"[$E(XBUF,$L(XBUF)) D "RTN","XBGSAVE",50,0) .S XBUF=$E(XBUF,1,($L(XBUF)-1)) "RTN","XBGSAVE",51,0) I '$D(DT) D DT^DICRW "RTN","XBGSAVE",52,0) S X2=$E(DT,1,3)_"0101",X1=DT "RTN","XBGSAVE",53,0) D ^%DTC "RTN","XBGSAVE",54,0) S XBCARTNO=X+1,XBDT=$S($D(XBDT):$$FMTE^XLFDT(XBDT),1:$$HTE^XLFDT($H)) "RTN","XBGSAVE",55,0) S:$E(XBGL)'=U XBGL=U_XBGL "RTN","XBGSAVE",56,0) S XBNAR=$G(XBNAR),XBTLE=$G(XBTLE)_" "_$P(^DIC(4,DUZ(2),0),U) "RTN","XBGSAVE",57,0) I $D(XBMED) S XBMED=$$UP^XLFSTR($E(XBMED)) "RTN","XBGSAVE",58,0) S XBQ=$E($G(XBQ)_"Y") "RTN","XBGSAVE",59,0) I XBQ="Y" S XBQTO=$G(XBQTO) I XBQTO="" S XBQTO=$P(^AUTTSITE(1,0),U,14) I XBQTO="" S XBQ="N" "RTN","XBGSAVE",60,0) S XBF=$G(XBF),XBE=$G(XBE) "RTN","XBGSAVE",61,0) I XBF="" S XBF="""""" "RTN","XBGSAVE",62,0) I ^%ZOSF("OS")["DSM" G SETUPDSM "RTN","XBGSAVE",63,0) SETUPMSM ; "RTN","XBGSAVE",64,0) S:'$D(XBIO) XBIO=51 "RTN","XBGSAVE",65,0) I $D(XBMED),'("CDFT"[XBMED) S XBFLG(1)="Media Type '"_XBMED_"' is incorrect",XBFLG=-1 G EOJ "RTN","XBGSAVE",66,0) D ^ZIBGSVEM "RTN","XBGSAVE",67,0) I $G(XBS1)'="" D "RTN","XBGSAVE",68,0) .S XBFLG=$$SENDTO1^ZISHMSMU(XBS1,XBPAFN) "RTN","XBGSAVE",69,0) .S XBFLG(1)=$P(XBFLG,"^",2) "RTN","XBGSAVE",70,0) .S XBFLG=+XBFLG "RTN","XBGSAVE",71,0) .Q:$D(ZTQUEUED) "RTN","XBGSAVE",72,0) .W:XBFLG=0 !!,"File was sent successfully" "RTN","XBGSAVE",73,0) .W:'(XBFLG=0) !!,"File was **NOT** sent successfully" "RTN","XBGSAVE",74,0) G EOJ "RTN","XBGSAVE",75,0) ; "RTN","XBGSAVE",76,0) SETUPDSM ; "RTN","XBGSAVE",77,0) I '$D(XBIO) S XBIO=47 "RTN","XBGSAVE",78,0) I $D(XBMED),'("CT"[XBMED) S XBFLG(1)="Media Type '"_XBMED_"' is incorrect",XBFLG=-1 G EOJ "RTN","XBGSAVE",79,0) D ^ZIBGSVED "RTN","XBGSAVE",80,0) EOJ ; "RTN","XBGSAVE",81,0) S:'$D(XBFLG) XBFLG=0 "RTN","XBGSAVE",82,0) KILL %DT,X,XBCON,XBFN,XBGL,XBGLL,XBCARTNO,X1,X2,XBNAR,XBTLE,XBIO,XBPAR,XBDT,XBE,XBF,XBMED,XBUF,XBQ,XBQTO,XBFLT,XBSUFAC,Y "RTN","XBGSAVE",83,0) Q "RTN","XBGSAVE",84,0) ; "RTN","XBGXFR") 0^71^B1300319 "RTN","XBGXFR",1,0) XBGXFR ; IHS/ADC/GTH - TRANSFERS GLOBAL TREES ; [ 02/07/97 3:02 PM ] "RTN","XBGXFR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGXFR",3,0) ; "RTN","XBGXFR",4,0) ; CREATED BY GIS 7/17/85 FOR MSM UNIX MUMPS (2.3) "RTN","XBGXFR",5,0) ; MODIFIED AND RENAMED BY EDE 12/21/86 "RTN","XBGXFR",6,0) ; "RTN","XBGXFR",7,0) START ; "RTN","XBGXFR",8,0) D SEARCH "RTN","XBGXFR",9,0) KILL FROM,TO,TALK "RTN","XBGXFR",10,0) Q "RTN","XBGXFR",11,0) ; "RTN","XBGXFR",12,0) SEARCH ; "RTN","XBGXFR",13,0) NEW (FROM,TO,TALK) "RTN","XBGXFR",14,0) S F="F",T="T",C=",",P=")",NF=$L(FROM,C)-1,NT=$L(TO,C)-1,L=1,F1="" "RTN","XBGXFR",15,0) S TF=FROM "RTN","XBGXFR",16,0) F I=1:1:30 S TF=TF_F_I_C "RTN","XBGXFR",17,0) S TT=TO "RTN","XBGXFR",18,0) F I=1:1:30 S TT=TT_F_I_C "RTN","XBGXFR",19,0) S Y=$E(FROM,1,$L(FROM)-1)_$S($E(FROM,$L(FROM))=",":")",1:"") "RTN","XBGXFR",20,0) I $D(@(Y))#2 S Z=TO_$P(FROM,"(",2),Z=$E(Z,1,$L(Z)-1)_")",@Z=@Y "RTN","XBGXFR",21,0) EXTR ; "RTN","XBGXFR",22,0) S X=F_L,Y=$P(TF,C,1,L+NF)_P,@X=$O(@Y) "RTN","XBGXFR",23,0) I @X]"" D:$D(@(Y))#2 SUB S L=L+1,@(F_L)="" G EXTR "RTN","XBGXFR",24,0) S L=L-1 "RTN","XBGXFR",25,0) Q:L=0 "RTN","XBGXFR",26,0) G EXTR "RTN","XBGXFR",27,0) ; "RTN","XBGXFR",28,0) SUB ; "RTN","XBGXFR",29,0) S Z=$P(TT,C,1,L+NT)_P,@Z=@Y "RTN","XBGXFR",30,0) W:$D(TALK) "." "RTN","XBGXFR",31,0) Q "RTN","XBGXFR",32,0) ; "RTN","XBGXFR",33,0) EN(FROM,TO,TALK) ;PEP - Transfer global trees. "RTN","XBGXFR",34,0) Q:$G(FROM)="" "RTN","XBGXFR",35,0) Q:$G(TO)="" "RTN","XBGXFR",36,0) S TALK=$G(TALK) "RTN","XBGXFR",37,0) G START "RTN","XBGXFR",38,0) ; "RTN","XBGXREFS") 0^72^B731832 "RTN","XBGXREFS",1,0) XBGXREFS(FILE,FIELD,ROOT) ; IHS/ADC/GTH - GET XREFS FOR ONE FIELD IN ONE FILE ; [ 02/07/97 3:02 PM ] "RTN","XBGXREFS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBGXREFS",3,0) ; "RTN","XBGXREFS",4,0) ; ATTENTION PROGRAMMERS: Do not use line one for entry. "RTN","XBGXREFS",5,0) ; Use label XREF for entry. "RTN","XBGXREFS",6,0) ; "RTN","XBGXREFS",7,0) ; Given a file/subfile number, a field number, and a variable "RTN","XBGXREFS",8,0) ; from which to assign subscripted values, this routine will "RTN","XBGXREFS",9,0) ; return the xrefs for the specified field. "RTN","XBGXREFS",10,0) ; "RTN","XBGXREFS",11,0) ; The returned xrefs will be subscripted from the ROOT as "RTN","XBGXREFS",12,0) ; follows: "RTN","XBGXREFS",13,0) ; "RTN","XBGXREFS",14,0) ; ROOT(FIELD,n) = file/subfile^xref (e.g. 9000010^AC) "RTN","XBGXREFS",15,0) ; ROOT(FIELD,n,"K") = executable kill logic "RTN","XBGXREFS",16,0) ; ROOT(FIELD,n,"S") = executable set logic "RTN","XBGXREFS",17,0) ; "RTN","XBGXREFS",18,0) ; Formal list: "RTN","XBGXREFS",19,0) ; "RTN","XBGXREFS",20,0) ; 1) FILE = file or subfile number (call by value) "RTN","XBGXREFS",21,0) ; 2) FIELD = field number (call by value) "RTN","XBGXREFS",22,0) ; 3) ROOT = array root (call by reference) "RTN","XBGXREFS",23,0) ; "RTN","XBGXREFS",24,0) G START "RTN","XBGXREFS",25,0) ; "RTN","XBGXREFS",26,0) XREF(FILE,FIELD,ROOT) ;PEP - Return x-ref info for a field. "RTN","XBGXREFS",27,0) ; "RTN","XBGXREFS",28,0) START ; "RTN","XBGXREFS",29,0) NEW Y "RTN","XBGXREFS",30,0) F Y=0:0 S Y=$O(^DD(FILE,FIELD,1,Y)) Q:Y'=+Y S ROOT(FIELD,Y)=^(Y,0),ROOT(FIELD,Y,"S")=^(1),ROOT(FIELD,Y,"K")=^(2) "RTN","XBGXREFS",31,0) Q "RTN","XBGXREFS",32,0) ; "RTN","XBHEDD") 0^73^B15995219 "RTN","XBHEDD",1,0) XBHEDD ;402,DJB,5/1/90,EDD - Electronic Data Dictionary "RTN","XBHEDD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD",3,0) ;;FLAGQ='^',FLAGE='^^',FLAGP=Printing on,FLAGP1=Option 11 selected to turn on printing "RTN","XBHEDD",4,0) ;;FLAGH=Bypass 1st screen "RTN","XBHEDD",5,0) ;;FLAGS=Scrolling speed set,FLAGL=Last item in list,FLAGM='^' or "RTN","XBHEDD",6,0) ;;'^^' in menu,FLAGG=No Groups,FLAGNFF=Suppress Form Feed,FLAGPT=Pointer File or Field nonexistent "RTN","XBHEDD",7,0) ;;FLAGGL=Invalid entry in GLOBAL "RTN","XBHEDD",8,0) TOP ; "RTN","XBHEDD",9,0) S:'$D(DUZ)#2 DUZ=0 I +DUZ=0 W *7,!!?5,"Your DUZ is not defined!",! Q "RTN","XBHEDD",10,0) N FLAGE,FLAGG,FLAGGL,FLAGGL1,FLAGL,FLAGM,FLAGP,FLAGP1,FLAGQ,FLAGS "RTN","XBHEDD",11,0) N A,B,BAR,C,C1,DASHES,DIC,E,EDDDATE,FGRP,FILE,FLD,G,GROUP,GROUP1,GRP1,GRP2,GT,H,HD,I,I2,II,III,IOP,J,K,L,LENGTH,LEVEL,LINE,M1,M2,M3,M4,M5,NORMAL,NUM,O,PAGE,SCROLL,SIZE,SLOW,SPACE,STRING,X,XREF,XREFNAM,XREFTYPE,XX,Y,YCNT "RTN","XBHEDD",12,0) N Z,Z1,ZA,ZANS,ZAP,ZB,ZCNT,ZD,ZDATA,ZDATA1,ZDSUB,ZFLDNAM,ZFLDNUM,ZGL,ZGL1,ZHELP,ZHNUM,ZLINE,ZLINE1,ZLINE2,ZMULT,ZMZ,ZNAM,ZPOTMP,ZZGL "RTN","XBHEDD",13,0) N ZNUM,ZONE,ZPAGE,ZPF,ZPO,ZPO1,ZPO2,ZTHREE,ZTWO,ZX,ZY1,ZZ,ZZ1,ZZA,ZZB,ZZH,ZZX "RTN","XBHEDD",14,0) D INIT "RTN","XBHEDD",15,0) EN S (FLAGP,FLAGQ,FLAGS)=0 K ^UTILITY($J) "RTN","XBHEDD",16,0) D:'FLAGH HD "RTN","XBHEDD",17,0) D GETFILE G:FLAGQ EX D MULT^XBHEDD7,MENU G:FLAGE EX "RTN","XBHEDD",18,0) S FLAGH=1 G EN ;Set FLAGH to bypass opening screen "RTN","XBHEDD",19,0) EX ;Exit "RTN","XBHEDD",20,0) K FLAGH,FLAGNFF,^UTILITY($J) "RTN","XBHEDD",21,0) Q "RTN","XBHEDD",22,0) GETFILE ;File lookup "RTN","XBHEDD",23,0) R !?8,"Select FILE: ",X:DTIME S:'$T X="^" I "^"[X S FLAGQ=1 Q "RTN","XBHEDD",24,0) I $L(X)>1,$E(X)="^" D GLOBAL^XBHEDD9 G:FLAGGL GETFILE Q "RTN","XBHEDD",25,0) I X="?" W !?1,"Enter global in the format '^DG' or '^RA(78', or" "RTN","XBHEDD",26,0) S DIC="^DIC(",DIC(0)="QEM" D ^DIC K DIC I Y<0 G GETFILE "RTN","XBHEDD",27,0) S ZNUM=+Y,ZNAM=$P(Y,U,2),ZGL=^DIC(ZNUM,0,"GL") "RTN","XBHEDD",28,0) Q "RTN","XBHEDD",29,0) MENU ; "RTN","XBHEDD",30,0) S (FLAGE,FLAGG,FLAGL,FLAGM,FLAGQ,FLAGP1,FLAGS)=0 "RTN","XBHEDD",31,0) D HD1,^XBHEDDM G:FLAGP1 MENU I FLAGP S:IO'=IO(0) FLAGQ=1 D PRINT^XBHEDD7 ;Turn off printing "RTN","XBHEDD",32,0) Q:FLAGM!FLAGE G:FLAGQ MENU "RTN","XBHEDD",33,0) I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD",34,0) R !!?2," to go to Main Menu, '^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1="^" S FLAGE=1 Q "RTN","XBHEDD",35,0) G MENU "RTN","XBHEDD",36,0) DIR ;Supress heading "RTN","XBHEDD",37,0) S FLAGH=1 G TOP "RTN","XBHEDD",38,0) GL ;Call XBHEDD here to get listing of Globals in ASCII order. "RTN","XBHEDD",39,0) N FLAGH,FLAGNFF,FLAGP,FLAGQ,M1,M2,M3,M4,M5,SIZE,Z1,ZLINE,ZLINE1,ZLINE2 "RTN","XBHEDD",40,0) S SIZE=(IOSL-5),(FLAGP,FLAGQ)=0 D INIT,GL^XBHEDD10 G EX "RTN","XBHEDD",41,0) PRT ;Stop page feeds. Use on ptr/keyboard "RTN","XBHEDD",42,0) S (FLAGH,FLAGNFF)=1 G TOP "RTN","XBHEDD",43,0) HD ; "RTN","XBHEDD",44,0) W:'FLAGNFF @IOF "RTN","XBHEDD",45,0) W !?65,"David Bolduc",!?65,"Togus, ME" "RTN","XBHEDD",46,0) W !!!?35,"E D D",!?34,"~~~~~~~",!?35,"~~~~~",!?36,"~~~",!?37,"~",!?25,"Electronic Data Dictionary",!?32,"Version 2.3",! "RTN","XBHEDD",47,0) W !?22,"*",?25,"Everything you ever wanted",?53,"*",!?22,"*",?25,"to know about a file but",?53,"*",!?22,"*",?25,"were afraid to ask.",?53,"*" "RTN","XBHEDD",48,0) W !! "RTN","XBHEDD",49,0) Q "RTN","XBHEDD",50,0) HD1 ;Heading for Top of Main Menu "RTN","XBHEDD",51,0) W:'FLAGNFF @IOF W !?M1,"A.) FILE NAME:------------- ",ZNAM "RTN","XBHEDD",52,0) W !?48,"F.) FILE ACCESS:" "RTN","XBHEDD",53,0) W !?M1,"B.) FILE NUMBER:----------- ",ZNUM "RTN","XBHEDD",54,0) W ?53,"DD______ ",$S($D(^DIC(ZNUM,0,"DD")):^("DD"),1:"") "RTN","XBHEDD",55,0) W !?53,"Read____ ",$S($D(^DIC(ZNUM,0,"RD")):^("RD"),1:"") "RTN","XBHEDD",56,0) W !?M1,"C.) NUM OF FLDS:----------- ",^UTILITY($J,"TOT") "RTN","XBHEDD",57,0) W ?53,"Write___ ",$S($D(^DIC(ZNUM,0,"WR")):^("WR"),1:"") "RTN","XBHEDD",58,0) W !?53,"Delete__ ",$S($D(^DIC(ZNUM,0,"DEL")):^("DEL"),1:"") "RTN","XBHEDD",59,0) W !?M1,"D.) DATA GLOBAL:----------- ",ZGL "RTN","XBHEDD",60,0) W ?53,"Laygo___ ",$S($D(^DIC(ZNUM,0,"LAYGO")):^("LAYGO"),1:"") "RTN","XBHEDD",61,0) W !!?M1,"E.) TOTAL GLOBAL ENTRIES:-- " "RTN","XBHEDD",62,0) S ZZGL=ZGL_"0)",ZZGL=@ZZGL W $S($P(ZZGL,U,4)]"":$P(ZZGL,U,4),1:"Blank") "RTN","XBHEDD",63,0) W ?48,"G.) PRINTING STATUS:-- ",$S(FLAGP:"On",1:"Off") "RTN","XBHEDD",64,0) W !,$E(ZLINE1,1,80) "RTN","XBHEDD",65,0) Q "RTN","XBHEDD",66,0) INIT ; "RTN","XBHEDD",67,0) S:'$D(DTIME) DTIME=600 S M1=2,M2=15,M3=20,M4=22,M5=25 ;Variables for column numbers "RTN","XBHEDD",68,0) K ZLINE,ZLINE1,ZLINE2 S $P(ZLINE,"-",212)="",$P(ZLINE1,"=",212)="",$P(ZLINE2,". ",106)="",U="^" "RTN","XBHEDD",69,0) S IOP=0 D ^%ZIS K IOP S SIZE=(IOSL-5) S:'$D(FLAGNFF) FLAGNFF=0 S:'$D(FLAGH) FLAGH=0 "RTN","XBHEDD",70,0) Q "RTN","XBHEDD1") 0^74^B10295028 "RTN","XBHEDD1",1,0) XBHEDD1 ;402,DJB,10/23/91,EDD - FIELD Global Locations "RTN","XBHEDD1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD1",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD1",4,0) PRINT ;Called by START,LOOP "RTN","XBHEDD1",5,0) Q:'$D(^DD(FILE(LEVEL),FLD(LEVEL),0)) "RTN","XBHEDD1",6,0) S ZDATA=^DD(FILE(LEVEL),FLD(LEVEL),0),ZZA=$S($P(ZDATA,U,4)=" ; ":"Computed",1:$P(ZDATA,U,4)),ZZB=$P(ZDATA,U) "RTN","XBHEDD1",7,0) W !?2,$J(ZZA,12),?17,$J(FLD(LEVEL),8),?28,DASHES,ZZB "RTN","XBHEDD1",8,0) S ZY1=$P($P(ZDATA,U,4),";",2) W:ZY1=0 ?70,"-->Mult" "RTN","XBHEDD1",9,0) S ZMZ=" " I ZY1=0 F II=1:1:41-$L(DASHES_ZZB) S ZMZ=ZMZ_" " "RTN","XBHEDD1",10,0) I S ZMZ=ZMZ_"-->Mult" "RTN","XBHEDD1",11,0) I 'FLAGP S ^UTILITY($J,"LIST",PAGE,YCNT)=ZZA_"^"_FLD(LEVEL)_"^"_DASHES_ZZB_ZMZ "RTN","XBHEDD1",12,0) S YCNT=YCNT+1 "RTN","XBHEDD1",13,0) Q "RTN","XBHEDD1",14,0) EN ;Entry Point "RTN","XBHEDD1",15,0) D ASK G:FLAGQ EX "RTN","XBHEDD1",16,0) I FLAGP,IO'=IO(0),^UTILITY($J,"TOT")>100 D WARN G:FLAGQ EX "RTN","XBHEDD1",17,0) S HD="HD" D INIT^XBHEDD7 G:FLAGQ EX D @HD D START,LOOP "RTN","XBHEDD1",18,0) EX ; "RTN","XBHEDD1",19,0) I FLAGQ!FLAGE!FLAGP S:IO'=IO(0) FLAGQ=1 D KILL Q "RTN","XBHEDD1",20,0) S FLAGL=1 D ^XBHEDD2 S:'FLAGQ FLAGQ=1 D KILL "RTN","XBHEDD1",21,0) Q "RTN","XBHEDD1",22,0) ASK ; "RTN","XBHEDD1",23,0) W !?26,"""F""........ to select starting FIELD",!?26,"... for all fields" "RTN","XBHEDD1",24,0) ASK1 W !?30,"Select: ALL// " R ZZX:DTIME S:'$T ZZX="^" I ZZX["^" S FLAGQ=1 S:ZZX="^^" FLAGE=1 Q "RTN","XBHEDD1",25,0) I ZZX="?" W !?10,"Type ""^"" to quit",!?10," to see all fields",!?10,"""F"" to start listing at a particular field" G ASK1 "RTN","XBHEDD1",26,0) S (LEVEL,PAGE,YCNT)=1,FILE(LEVEL)=ZNUM,DASHES="" "RTN","XBHEDD1",27,0) I ZZX="F" W ! S DIC="^DD("_ZNUM_",",DIC(0)="QEAM",DIC("W")="I $P(^DD(ZNUM,Y,0),U,2)>0 W ?65,"" -->Mult""" D ^DIC K DIC("W") S:Y<0 FLAGQ=1 Q:Y<0 S FLD(LEVEL)=+Y "RTN","XBHEDD1",28,0) E S FLD(LEVEL)=0 "RTN","XBHEDD1",29,0) Q "RTN","XBHEDD1",30,0) START ;Print if data, otherwise continue to loop. "RTN","XBHEDD1",31,0) I $D(^DD(FILE(LEVEL),FLD(LEVEL),0))#2 D PRINT I ZY1=0 S LEVEL=LEVEL+1,FILE(LEVEL)=+$P(ZDATA,U,2),FLD(LEVEL)=0 "RTN","XBHEDD1",32,0) Q "RTN","XBHEDD1",33,0) LOOP ;Start For Loop "RTN","XBHEDD1",34,0) S FLD(LEVEL)=$O(^DD(FILE(LEVEL),FLD(LEVEL))) I +FLD(LEVEL)=0 S LEVEL=LEVEL-1 G:LEVEL LOOP Q "RTN","XBHEDD1",35,0) S (SPACE,BAR)="" "RTN","XBHEDD1",36,0) F II=1:1:LEVEL-1 S SPACE=SPACE_" ",BAR=BAR_"-" "RTN","XBHEDD1",37,0) S DASHES=SPACE_BAR "RTN","XBHEDD1",38,0) D PRINT I ZY1=0 S LEVEL=LEVEL+1,FILE(LEVEL)=+$P(ZDATA,U,2),FLD(LEVEL)=0 "RTN","XBHEDD1",39,0) I $Y>SIZE D:'FLAGP ^XBHEDD2 Q:FLAGQ I FLAGP D PAUSE Q:FLAGQ W @IOF W:IO'=IO(0) !!! D HD "RTN","XBHEDD1",40,0) G LOOP "RTN","XBHEDD1",41,0) PAUSE ; "RTN","XBHEDD1",42,0) Q:IO'=IO(0) "RTN","XBHEDD1",43,0) W !!?2," to continue, '^' to quit: " "RTN","XBHEDD1",44,0) R Z1:DTIME S:'$T Z1="^^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 "RTN","XBHEDD1",45,0) Q "RTN","XBHEDD1",46,0) WARN ;Warn if printing and over 100 fields in file "RTN","XBHEDD1",47,0) W !?8,"This file has over 100 fields. Sure you want to print? YES//" "RTN","XBHEDD1",48,0) R XX:DTIME S:'$T XX="N" S:"Yy"'[$E(XX) FLAGQ=1 I XX="?" W !?2,"[Y]es to print, [N]o to return to Main Menu." G WARN "RTN","XBHEDD1",49,0) Q "RTN","XBHEDD1",50,0) HD ; "RTN","XBHEDD1",51,0) W !?2,"NODE ; PIECE",?17,"FLD NUM",?48,"FIELD NAME",!?2,"------------",?17,"--------",?28,"-------------------------------------------------" "RTN","XBHEDD1",52,0) Q "RTN","XBHEDD1",53,0) KILL ;Kill variables "RTN","XBHEDD1",54,0) K DASHES,EDDDATE,FILE,HD,LEVEL,PAGE,PAGETEMP,YCNT,^UTILITY($J,"LIST") "RTN","XBHEDD1",55,0) Q "RTN","XBHEDD10") 0^75^B18155092 "RTN","XBHEDD10",1,0) XBHEDD10 ;402,DJB,10/23/91,EDD - Pointers From This File and Global Listing "RTN","XBHEDD10",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD10",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD10",4,0) PT ;Pointers from this file "RTN","XBHEDD10",5,0) D INIT^XBHEDD7 S HD="HD1" D @HD,PTGET "RTN","XBHEDD10",6,0) PTEX ; "RTN","XBHEDD10",7,0) K CNT,NAME,NODE0,NUMBER,ZDD "RTN","XBHEDD10",8,0) Q "RTN","XBHEDD10",9,0) PTGET ; "RTN","XBHEDD10",10,0) S ZDD="",CNT=1 "RTN","XBHEDD10",11,0) F S ZDD=$O(^UTILITY($J,"TMP",ZDD)) Q:ZDD=""!(FLAGQ) S NAME="" F S NAME=$O(^DD(ZDD,"B",NAME)) Q:NAME="" S NUMBER="",NUMBER=$O(^DD(ZDD,"B",NAME,"")) D PTLIST Q:FLAGQ "RTN","XBHEDD10",12,0) I CNT=1 W !!!!!?20,"This file has no fields that",!?20,"point to other files." "RTN","XBHEDD10",13,0) Q "RTN","XBHEDD10",14,0) PTLIST ; "RTN","XBHEDD10",15,0) Q:^DD(ZDD,"B",NAME,NUMBER)=1 ;If this node equals 1 it is TITLE not NAME "RTN","XBHEDD10",16,0) S NODE0=^DD(ZDD,NUMBER,0) Q:$P(NODE0,U,2)'["P" Q:$P(NODE0,U,3)']"" "RTN","XBHEDD10",17,0) W !?1,$S(ZDD'=ZNUM:"MULT",1:""),?6,$J(NUMBER,8),?16,NAME S FILE="^"_$P(NODE0,U,3)_"0)" W ?48,$S($D(@FILE):$E($P(@FILE,U),1,30),1:"-->No such file") "RTN","XBHEDD10",18,0) S CNT=CNT+1 I $Y>SIZE D PAGE Q:FLAGQ=1 "RTN","XBHEDD10",19,0) Q "RTN","XBHEDD10",20,0) GL ;List Globals in ASCII order "RTN","XBHEDD10",21,0) D:'$D(^UTILITY("EDD/GL")) HELP "RTN","XBHEDD10",22,0) GLTOP D @$S($D(^UTILITY("EDD/GL")):"GLRANGE",1:"GLRANGE1") G:FLAGQ GLEX D INIT S HD="HD" D @HD "RTN","XBHEDD10",23,0) D GLLIST G:FLAGQ GLEX "RTN","XBHEDD10",24,0) GLEX ;Global Exit "RTN","XBHEDD10",25,0) K AA,BB,CNT,HD,TEMP,VAR,XXX "RTN","XBHEDD10",26,0) Q "RTN","XBHEDD10",27,0) GLRANGE ;Starting and Ending Global "RTN","XBHEDD10",28,0) I FLAGP W !?8,"Enter Global range...Include Starting & Ending Global:" "RTN","XBHEDD10",29,0) GLRANGE1 R !?8,"Starting Global: ^",AA:DTIME S:'$T!(AA="") AA="^" S:AA["^" FLAGQ=1 S:AA="^^" FLAGE=1 Q:FLAGQ "RTN","XBHEDD10",30,0) I AA="?"!(AA="*R") D:AA="?" HELP1 D:AA="*R" GLLOAD G GLRANGE "RTN","XBHEDD10",31,0) I '$D(^UTILITY("EDD/GL")) W *7," Enter '*R' to build your Global listing." G GLRANGE1 "RTN","XBHEDD10",32,0) S AA=$S(AA="*":0,1:"^"_AA) "RTN","XBHEDD10",33,0) S BB="^ZZZZZZZZZ" I FLAGP R !?8,"Ending Global: ^",BB:DTIME S:'$T!(BB="") BB="^" G:BB="^" GLRANGE S BB="^"_BB I BB']AA W *7," Ending Global must 'follow' Starting Global" G GLRANGE1 "RTN","XBHEDD10",34,0) I FLAGP S TEMP=$O(^UTILITY("EDD/GL",AA)) I TEMP=""!(TEMP]BB) W *7," No globals in this range" G GLRANGE1 "RTN","XBHEDD10",35,0) Q "RTN","XBHEDD10",36,0) GLLIST ;Start listing Globals "RTN","XBHEDD10",37,0) F S AA=$O(^UTILITY("EDD/GL",AA)) Q:AA=""!(AA]BB) W !?2,AA,?23,$J($P(^(AA),U),14),?40,$E($P(^(AA),U,2),1,35) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD10",38,0) Q "RTN","XBHEDD10",39,0) GLLOAD ; "RTN","XBHEDD10",40,0) S AA=0,CNT=1 K ^UTILITY("EDD/GL") "RTN","XBHEDD10",41,0) F S AA=$O(^DIC(AA)) Q:AA'>0 I $D(^DIC(AA,0,"GL")) S ^UTILITY("EDD/GL",^DIC(AA,0,"GL"))=AA_"^"_$P(^DIC(AA,0),"^") W "." "RTN","XBHEDD10",42,0) Q "RTN","XBHEDD10",43,0) HELP ;No data in ^UTILITY("EDD/GL") "RTN","XBHEDD10",44,0) W *7,?35,"You have no data in ^UTILITY(""EDD/GL"")." "RTN","XBHEDD10",45,0) W !?35,"You must first build your Global listing." "RTN","XBHEDD10",46,0) W !?35,"Enter '?' at the 'Starting Global:' prompt." "RTN","XBHEDD10",47,0) Q "RTN","XBHEDD10",48,0) HELP1 ;"Starting Global" prompt "RTN","XBHEDD10",49,0) W !!?8,"1. Enter Global you want listing to start with.",!?11,"Examples: ^DPT , ^L , or ^%ZIS." "RTN","XBHEDD10",50,0) W !?8,"2. Enter '*' to list all globals." "RTN","XBHEDD10",51,0) W !?8,"3. Enter '*R' to Build/Update your Global listing." "RTN","XBHEDD10",52,0) W !?14,"Your Global listing is kept in ^UTILITY(""EDD/GL""). If this is the" "RTN","XBHEDD10",53,0) W !?14,"first time you've used this utility, or if you have added or" "RTN","XBHEDD10",54,0) W !?14,"deleted any files on your system, enter '*R' here to build/update" "RTN","XBHEDD10",55,0) W !?14,"your listing. It will take approximately 30 seconds to run." "RTN","XBHEDD10",56,0) Q "RTN","XBHEDD10",57,0) PAGE ; "RTN","XBHEDD10",58,0) I FLAGP,IO'=IO(0) W @IOF,!!! D @HD Q "RTN","XBHEDD10",59,0) R !!?2," to continue, '^' to quit, '^^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD10",60,0) W @IOF D @HD "RTN","XBHEDD10",61,0) Q "RTN","XBHEDD10",62,0) HD ; "RTN","XBHEDD10",63,0) W !?2,"Globals in ASCII order:" "RTN","XBHEDD10",64,0) W !?10,"GLOBAL",?28,"FILE NUM",?46,"FILE (Truncated to 35)" "RTN","XBHEDD10",65,0) W !,?2,"----------------------",?27,"----------",?40,"-----------------------------------" "RTN","XBHEDD10",66,0) Q "RTN","XBHEDD10",67,0) HD1 ;Pointers from this file "RTN","XBHEDD10",68,0) W !?3,"Pointers FROM this file..",!?6,"FLD NUM",?26,"FIELD NAME",?52,"FILE (Truncated to 30)",!?6,"--------",?16,"------------------------------",?48,"------------------------------" "RTN","XBHEDD10",69,0) Q "RTN","XBHEDD10",70,0) INIT ; "RTN","XBHEDD10",71,0) I FLAGP,IO=IO(0),IOSL>25 D SCROLL^XBHEDD7 Q:FLAGQ "RTN","XBHEDD10",72,0) I FLAGP W:IO'=IO(0) " Printing.." U IO "RTN","XBHEDD10",73,0) W @IOF Q "RTN","XBHEDD11") 0^76^B9000233 "RTN","XBHEDD11",1,0) XBHEDD11 ;402,DJB,10/23/91,EDD - Templates and Description "RTN","XBHEDD11",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD11",3,0) ;;David Bolduc - Togus,ME "RTN","XBHEDD11",4,0) EN ;Templates "RTN","XBHEDD11",5,0) I '$D(^DIBT("F"_ZNUM)),'$D(^DIPT("F"_ZNUM)),'$D(^DIE("F"_ZNUM)) W ?30,"No Templates" S FLAGG=1 G EX "RTN","XBHEDD11",6,0) S Z1="" D INIT^XBHEDD7 G:FLAGQ EX D HD "RTN","XBHEDD11",7,0) D DIPT G:FLAGQ EX D DIBT G:FLAGQ EX D DIE "RTN","XBHEDD11",8,0) EX ; "RTN","XBHEDD11",9,0) K A,DISYS,DIW,DIWI,DIWTC,DIWX,DIWT,DIWL,DIWF,DIWR,DN,HEAD,II,VAR "RTN","XBHEDD11",10,0) Q "RTN","XBHEDD11",11,0) DIPT ;Print Templates "RTN","XBHEDD11",12,0) S HEAD="A.) PRINT TEMPLATES:" W !?2,HEAD "RTN","XBHEDD11",13,0) S A="",VAR="^DIPT" "RTN","XBHEDD11",14,0) F II=1:1 S A=$O(^DIPT("F"_ZNUM,A)) Q:A="" W !?12,$J(II,4),". ",A S B=$O(^DIPT("F"_ZNUM,A,"")) W:$D(^DIPT(B,"ROU")) ?60,"Compiled: ",^DIPT(B,"ROU") I $Y>SIZE D PAGE Q:FLAGQ!(Z1="S") "RTN","XBHEDD11",15,0) I II=1 W ?25,"No print templates..." "RTN","XBHEDD11",16,0) Q "RTN","XBHEDD11",17,0) DIBT ;Sort Templates "RTN","XBHEDD11",18,0) S HEAD="B.) SORT TEMPLATES:" W !?2,HEAD "RTN","XBHEDD11",19,0) S A="",VAR="^DIBT" "RTN","XBHEDD11",20,0) F II=1:1 S A=$O(^DIBT("F"_ZNUM,A)) Q:A="" W !?12,$J(II,4),". ",A I $Y>SIZE D PAGE Q:FLAGQ!(Z1="S") "RTN","XBHEDD11",21,0) I II=1 W ?25,"No sort templates..." "RTN","XBHEDD11",22,0) Q "RTN","XBHEDD11",23,0) DIE ;Edit Templates "RTN","XBHEDD11",24,0) S HEAD="C.) INPUT TEMPLATES:" W !?2,HEAD "RTN","XBHEDD11",25,0) S A="",VAR="^DIE" "RTN","XBHEDD11",26,0) F II=1:1 S A=$O(^DIE("F"_ZNUM,A)) Q:A="" W !?12,$J(II,4),". ",A S B=$O(^DIE("F"_ZNUM,A,"")) W:$D(^DIE(B,"ROU")) ?60,"Compiled: ",^DIE(B,"ROU") I $Y>SIZE D PAGE Q:FLAGQ!(VAR="") "RTN","XBHEDD11",27,0) I II=1 W ?25,"No input templates..." "RTN","XBHEDD11",28,0) Q "RTN","XBHEDD11",29,0) PAGE ;Templates "RTN","XBHEDD11",30,0) I VAR="^DIE" S ZX=VAR_"(""F"_ZNUM_""","""_A_""")" I $O(@ZX)="" S VAR="" Q "RTN","XBHEDD11",31,0) I FLAGP,IO'=IO(0) W @IOF,!!! D HD Q "RTN","XBHEDD11",32,0) W !!?2," to continue, 'S' to skip, '^' to quit, '^^' to exit: " "RTN","XBHEDD11",33,0) R Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD11",34,0) I Z1="S",VAR="^DIE" S FLAGQ=1 Q "RTN","XBHEDD11",35,0) S ZX=VAR_"(""F"_ZNUM_""","""_A_""")" "RTN","XBHEDD11",36,0) W @IOF D HD I Z1="S"!($O(@ZX)="") Q "RTN","XBHEDD11",37,0) W !?2,HEAD," continued..." Q "RTN","XBHEDD11",38,0) PAGE1 ;File Description "RTN","XBHEDD11",39,0) I FLAGP,IO'=IO(0) W @IOF,!!! D HD1 Q "RTN","XBHEDD11",40,0) R !!?2," to continue, '^' to quit, '^' to exit: ",Z1:DTIME "RTN","XBHEDD11",41,0) S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD11",42,0) W @IOF D HD1 "RTN","XBHEDD11",43,0) Q "RTN","XBHEDD11",44,0) DES ;File Description "RTN","XBHEDD11",45,0) I FLAGP D PRINT^XBHEDD7 ;Shut off printing "RTN","XBHEDD11",46,0) I '$D(^DIC(ZNUM,"%D")) W ?30,"No description available." S FLAGG=1 Q "RTN","XBHEDD11",47,0) W @IOF D HD1 "RTN","XBHEDD11",48,0) K ^UTILITY($J,"W") "RTN","XBHEDD11",49,0) S A=0 F S A=$O(^DIC(ZNUM,"%D",A)) Q:A="" S X=^DIC(ZNUM,"%D",A,0),DIWL=5,DIWR=75,DIWF="W" D ^DIWP I $Y>SIZE D PAGE1 Q:FLAGQ "RTN","XBHEDD11",50,0) D:'FLAGQ ^DIWW "RTN","XBHEDD11",51,0) G EX "RTN","XBHEDD11",52,0) HD ;Templates "RTN","XBHEDD11",53,0) W !?2,"T E M P L A T E S PRINT * SORT * INPUT",!,$E(ZLINE,1,IOM) "RTN","XBHEDD11",54,0) Q "RTN","XBHEDD11",55,0) HD1 ;File description "RTN","XBHEDD11",56,0) W !?2,"File description for ",ZNAM," file.",!,$E(ZLINE1,1,IOM) "RTN","XBHEDD11",57,0) Q "RTN","XBHEDD12") 0^77^B7419359 "RTN","XBHEDD12",1,0) XBHEDD12 ;402,DJB,10/23/91,EDD - File Characteristics "RTN","XBHEDD12",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD12",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD12",4,0) CHAR ;Identifiers, Post Selection Actions, Special Look-up Program "RTN","XBHEDD12",5,0) I '$D(^DD(ZNUM,0,"ID")),'$D(^DD(ZNUM,0,"ACT")),'$D(^DD(ZNUM,0,"DIC")) W !?10,"No Identifiers, Post Selection Actions, or Special Look-up Program." S FLAGG=1 Q "RTN","XBHEDD12",6,0) D INIT^XBHEDD7 G:FLAGQ EX "RTN","XBHEDD12",7,0) W !?21,"F I L E C H A R A C T E R I S T I C S",!?20,"-----------------------------------------" "RTN","XBHEDD12",8,0) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "RTN","XBHEDD12",9,0) W !!?2,"1. POST SELECTION ACTION:" I $D(^DD(ZNUM,0,"ACT")) D "RTN","XBHEDD12",10,0) .W " The following code is executed after an entry to" "RTN","XBHEDD12",11,0) .W !?29,"this file has been selected. If Y=-1 entry will" "RTN","XBHEDD12",12,0) .W !?29,"not be selected:" "RTN","XBHEDD12",13,0) .W !?14,"CODE:" S STRING=^DD(ZNUM,0,"ACT") D STRING "RTN","XBHEDD12",14,0) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "RTN","XBHEDD12",15,0) W !!?2,"2. SPECIAL LOOK-UP PROGRAM: " I $D(^DD(ZNUM,0,"DIC")) W "^",^DD(ZNUM,0,"DIC") "RTN","XBHEDD12",16,0) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "RTN","XBHEDD12",17,0) W !!?2,"3. IDENTIFIERS:" "RTN","XBHEDD12",18,0) I $D(^DD(ZNUM,0,"ID")) D NOTE,HD S XX="" F S XX=$O(^DD(ZNUM,0,"ID",XX)) Q:XX=""!FLAGQ D W ! "RTN","XBHEDD12",19,0) .W !?1,$J(XX,12),?15,$S(+XX=XX:"Yes",1:"No") S STRING=^DD(ZNUM,0,"ID",XX) D STRING "RTN","XBHEDD12",20,0) ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "RTN","XBHEDD12",21,0) EX ;Exit "RTN","XBHEDD12",22,0) Q "RTN","XBHEDD12",23,0) STRING ;String=code - Prints a string in lines of 55 characters "RTN","XBHEDD12",24,0) S LINE(1)=$E(STRING,1,55) W ?M3,LINE(1) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",25,0) I $L(STRING)>55 S LINE(2)=$E(STRING,56,110) W !?M3,LINE(2) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",26,0) I $L(STRING)>110 S LINE(3)=$E(STRING,111,165) W !?M3,LINE(3) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",27,0) I $L(STRING)>165 S LINE(4)=$E(STRING,166,220) W !?M3,LINE(4) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",28,0) I $L(STRING)>220 S LINE(5)=$E(STRING,221,275) W !?M3,LINE(5) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",29,0) I $L(STRING)>275 S LINE(6)=$E(STRING,276,330) W !?M3,LINE(6) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD12",30,0) Q "RTN","XBHEDD12",31,0) PAGE ; "RTN","XBHEDD12",32,0) I FLAGP,$E(IOST)="P" W @IOF,!!! D HD Q "RTN","XBHEDD12",33,0) R !!?2," to continue, ""^"" to quit, ""^^"" to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD12",34,0) W @IOF D HD "RTN","XBHEDD12",35,0) Q "RTN","XBHEDD12",36,0) NOTE ; "RTN","XBHEDD12",37,0) W " If ASK=Yes, field is asked when a new entry is added.",! "RTN","XBHEDD12",38,0) Q "RTN","XBHEDD12",39,0) HD ;Heading "RTN","XBHEDD12",40,0) W !?8,"FIELD",?15,"ASK",?(M3+10),"WRITE STATEMENT TO GENERATE DISPLAY",!?8,"-----",?15,"---",?M3,"-------------------------------------------------------" "RTN","XBHEDD12",41,0) Q "RTN","XBHEDD13") 0^78^B11453020 "RTN","XBHEDD13",1,0) XBHEDD13 ;402,DJB,5/1/90,EDD - Help Text 2 "RTN","XBHEDD13",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD13",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD13",4,0) ;;Called by XBHEDD1 "RTN","XBHEDD13",5,0) W @IOF,!?5,"INPUT",?20,"EFFECT",!?5,"=======",?20,"=========================================================" "RTN","XBHEDD13",6,0) W !?2,"1.",?7,"""^""",?20,"Causes an exit back to the Main Menu." "RTN","XBHEDD13",7,0) W !!?2,"2.",?7,"""B""",?20,"Backs up to previous screen." "RTN","XBHEDD13",8,0) W !!?2,"3.",?7,"""n""",?20,"Typing a number here allows you to jump to that screen." "RTN","XBHEDD13",9,0) W !?20,"In the lower right hand corner of the screen, you will" "RTN","XBHEDD13",10,0) W !?20,"see 2 numbers: TOP and CUR. TOP is the highest screen" "RTN","XBHEDD13",11,0) W !?20,"you have to. CUR is the current screen" "RTN","XBHEDD13",12,0) W !?20,"you are viewing. You can only jump between the first and" "RTN","XBHEDD13",13,0) W !?20,"TOP screen. As an example, if you selected the ""FIELD" "RTN","XBHEDD13",14,0) W !?20,"Global Location"" option and then hit 6 times," "RTN","XBHEDD13",15,0) W !?20,"TOP would be equal to 6 and CUR would be equal to 6." "RTN","XBHEDD13",16,0) W !?20,"Now you can jump to any screen between 1 and 6." "RTN","XBHEDD13",17,0) W !?20,"If you entered a ""2"" and , you would jump" "RTN","XBHEDD13",18,0) W !?20,"to screen 2. TOP would still be equal to 6 but CUR" "RTN","XBHEDD13",19,0) W !?20,"would now be 2. If you then hit ""B"" to back up 1 screen," "RTN","XBHEDD13",20,0) W !?20,"TOP would be 6 and CUR would be 1. If you now" "RTN","XBHEDD13",21,0) W !?20,"wanted to return to TOP (screen 6) you would type a ""6""" "RTN","XBHEDD13",22,0) R !!?2," to continue, ""^"" to quit: ",Z1:DTIME S:'$T Z1="^" I Z1="^" S FLAG="QUIT" Q "RTN","XBHEDD13",23,0) W @IOF,!?5,"INPUT",?20,"EFFECT",!?5,"=======",?20,"=========================================================" "RTN","XBHEDD13",24,0) W !?20,"and this page would now be displayed. TOP and CUR would" "RTN","XBHEDD13",25,0) W !?20,"both be equal to 6 again." "RTN","XBHEDD13",26,0) W !!?2,"4.",?7,"""I""",?20,"""I"" allows you to zoom in on an individual field. It" "RTN","XBHEDD13",27,0) W !?20,"prompts you for a field and then gives you the Individual" "RTN","XBHEDD13",28,0) W !?20,"FIELD Summary for that field. When using ""I"", you" "RTN","XBHEDD13",29,0) W !?20,"must start at the top of the multiple. For example, if" "RTN","XBHEDD13",30,0) W !?20,"you were looking at the Patient file and you had selected" "RTN","XBHEDD13",31,0) W !?20,"""Admission Date"" as the starting point for FIELD Global" "RTN","XBHEDD13",32,0) W !?20,"Location and you thru 2 screens, you would see" "RTN","XBHEDD13",33,0) W !?20,"the field Treating Specialty. To view the Individual" "RTN","XBHEDD13",34,0) W !?20,"FIELD Summary for this field you would have to first" "RTN","XBHEDD13",35,0) W !?20,"select Admission Date and then Treating Specialty. This" "RTN","XBHEDD13",36,0) W !?20,"is made easier by the design of the FIELD Global Location" "RTN","XBHEDD13",37,0) W !?20,"screens. Each layer of multiple fields is preceeded by" "RTN","XBHEDD13",38,0) W !?20,"dashes that indicated their level. You trace these dashes" "RTN","XBHEDD13",39,0) W !?20,"back to locate the starting point for each layer." "RTN","XBHEDD13",40,0) W !?20,"You can also use the ""Trace a Field"" option." "RTN","XBHEDD13",41,0) R !!?2,"Hit any key to continue: ",Z1:DTIME S FLAG="QUIT" Q "RTN","XBHEDD2") 0^79^B5129803 "RTN","XBHEDD2",1,0) XBHEDD2 ;402,DJB,10/23/91,EDD - Screen prompt ; keeps track of pages "RTN","XBHEDD2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD2",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD2",4,0) TOP S PAGETEMP=PAGE D ASK "RTN","XBHEDD2",5,0) I Z1="B" S PAGETEMP=PAGE-1 D MOVE "RTN","XBHEDD2",6,0) I Z1?1.N S PAGETEMP=Z1 D MOVE "RTN","XBHEDD2",7,0) I Z1="I" S PAGETEMP=PAGE D ^XBHEDD3 Q:FLAGE D MOVE "RTN","XBHEDD2",8,0) I Z1="N" S PAGETEMP=PAGE D ^XBHEDD9 Q:FLAGE D MOVE "RTN","XBHEDD2",9,0) I Z1="?" S PAGETEMP=PAGE D ^XBHEDD14,MOVE "RTN","XBHEDD2",10,0) Q:FLAGQ!FLAGE I FLAGL,Z1="" Q "RTN","XBHEDD2",11,0) S PAGE=PAGE+1,YCNT=1 W @IOF W:IO'=IO(0) !!! D HD "RTN","XBHEDD2",12,0) Q "RTN","XBHEDD2",13,0) ASK ; "RTN","XBHEDD2",14,0) S FLAGQ=0 I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD2",15,0) W !,$E(ZLINE,1,IOM),!," B=Backup N=Node I=Indiv Fld Sum 'num'=Jump(1 to TOP)",?57,"|",?69,"| TOP: ",PAGE "RTN","XBHEDD2",16,0) W !," =Continue ^=Quit ^^=Exit ?=Help",?57,"|",?69,"| CUR: ",PAGETEMP "RTN","XBHEDD2",17,0) F I=1:1:18 W *8 "RTN","XBHEDD2",18,0) R "Select: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 "RTN","XBHEDD2",19,0) S:$E(Z1)="0" Z1=+Z1 S:Z1["." Z1=Z1\1 "RTN","XBHEDD2",20,0) Q "RTN","XBHEDD2",21,0) MOVE ; "RTN","XBHEDD2",22,0) W @IOF W:IO'=IO(0) !!! D HD S PAGETEMP=$S(PAGETEMP<1:1,PAGETEMP>PAGE:PAGE,1:PAGETEMP) "RTN","XBHEDD2",23,0) S H="" F I=0:0 S H=$O(^UTILITY($J,"LIST",PAGETEMP,H)) Q:H="" S ZZH=^UTILITY($J,"LIST",PAGETEMP,H) S ZONE=$P(ZZH,U),ZTWO=$P(ZZH,U,2),ZTHREE=$P(ZZH,U,3) W !?2,$J(ZONE,12),?17,$J(ZTWO,8),?28,ZTHREE "RTN","XBHEDD2",24,0) D ASK Q:FLAGQ "RTN","XBHEDD2",25,0) I Z1="B" S PAGETEMP=PAGETEMP-1 G MOVE "RTN","XBHEDD2",26,0) I Z1?1.N S PAGETEMP=Z1 G MOVE "RTN","XBHEDD2",27,0) I Z1="I" D ^XBHEDD3 Q:FLAGE G MOVE "RTN","XBHEDD2",28,0) I Z1="N" D ^XBHEDD9 Q:FLAGE G MOVE "RTN","XBHEDD2",29,0) I Z1="?" D ^XBHEDD14 G MOVE "RTN","XBHEDD2",30,0) S PAGETEMP=PAGETEMP+1 Q:PAGETEMP>PAGE "RTN","XBHEDD2",31,0) G MOVE "RTN","XBHEDD2",32,0) HD ;Heading "RTN","XBHEDD2",33,0) W !?2,"NODE ; PIECE",?17,"FLD NUM",?48,"FIELD NAME",!?2,"------------",?17,"--------",?28,"-------------------------------------------------" "RTN","XBHEDD2",34,0) Q "RTN","XBHEDD3") 0^80^B4074907 "RTN","XBHEDD3",1,0) XBHEDD3 ;402,DJB,10/23/91,EDD - Individual Field Summary "RTN","XBHEDD3",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD3",3,0) ;;David Bolduc - Togus,ME "RTN","XBHEDD3",4,0) N CNT,DATA,FILE,FNAM,FNUM,LEV,TEMP "RTN","XBHEDD3",5,0) D INIT I FLAGP D HD "RTN","XBHEDD3",6,0) F D GETFLD Q:'LEV!FLAGE "RTN","XBHEDD3",7,0) I FLAGP,$D(^UTILITY($J,"INDIV")) D PRINT "RTN","XBHEDD3",8,0) EX ; "RTN","XBHEDD3",9,0) K DIC,^UTILITY($J,"INDIV") S FLAGQ=1 Q "RTN","XBHEDD3",10,0) GETFLD ;Field lookup. Var LEV increments and decrements with Multiple layers. "RTN","XBHEDD3",11,0) S DIC="^DD("_FILE(LEV)_"," D ^DIC I Y<0 S LEV=LEV-1 Q "RTN","XBHEDD3",12,0) S FNUM=+Y,FNAM=$P(Y,U,2),TEMP=+$P(^DD(FILE(LEV),FNUM,0),U,2) "RTN","XBHEDD3",13,0) I TEMP S LEV=LEV+1,FILE(LEV)=TEMP Q "RTN","XBHEDD3",14,0) I 'FLAGP D ^XBHEDD4 Q "RTN","XBHEDD3",15,0) S ^UTILITY($J,"INDIV",CNT)=FILE(LEV)_"^"_FNUM_"^"_FNAM,CNT=CNT+1 "RTN","XBHEDD3",16,0) Q "RTN","XBHEDD3",17,0) PRINT ; "RTN","XBHEDD3",18,0) W:IO'=IO(0) " Printing.." U IO D TXT^XBHEDD7 "RTN","XBHEDD3",19,0) S CNT="" F S CNT=$O(^UTILITY($J,"INDIV",CNT)) Q:CNT="" S DATA=^UTILITY($J,"INDIV",CNT),FILE(LEV)=$P(DATA,U),FNUM=$P(DATA,U,2),FNAM=$P(DATA,U,3) D ^XBHEDD4 Q:FLAGQ W !!,$E(ZLINE2,1,IOM),!! "RTN","XBHEDD3",20,0) Q "RTN","XBHEDD3",21,0) HD ; "RTN","XBHEDD3",22,0) W @IOF,!,$E(ZLINE1,1,80),!?5,"Enter one at a time, as many fields as you wish to print. Fields will",!?5,"print in the order entered.",!,$E(ZLINE1,1,80),! "RTN","XBHEDD3",23,0) Q "RTN","XBHEDD3",24,0) INIT ; "RTN","XBHEDD3",25,0) S (CNT,LEV)=1,FILE(LEV)=ZNUM K ^UTILITY($J,"INDIV") "RTN","XBHEDD3",26,0) S DIC(0)="QEAM",DIC("W")="I $P(^DD(FILE(LEV),Y,0),U,2)>0 W "" -->Mult Fld""" "RTN","XBHEDD3",27,0) Q "RTN","XBHEDD4") 0^81^B18984466 "RTN","XBHEDD4",1,0) XBHEDD4 ;DJB,402,10/23/91,EDD - Individual Field Summary "RTN","XBHEDD4",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD4",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD4",4,0) ;; Called by XBHEDD3 "RTN","XBHEDD4",5,0) N NODE "RTN","XBHEDD4",6,0) I 'FLAGP W @IOF,!!,$E(ZLINE,1,IOM) "RTN","XBHEDD4",7,0) S FLAGQ=0 "RTN","XBHEDD4",8,0) F II=0,.1,2,3,4,12,12.1 S:$D(^DD(FILE(LEV),FNUM,II)) NODE(II)=^(II) "RTN","XBHEDD4",9,0) W !?M1,"FIELD NAME:",?M3,FNAM "RTN","XBHEDD4",10,0) W !!?M1,"FLD NUMBER:",?M3,FNUM,?36,"FLD TITLE: " W:$D(NODE(.1)) NODE(.1) "RTN","XBHEDD4",11,0) W !?M1,"NODE;PIECE:",?M3,$S($P(NODE(0),U,4)=" ; ":"Computed",1:$P(NODE(0),U,4)) "RTN","XBHEDD4",12,0) W ?35,"HELP FRAME: " W:$D(^DD(FILE(LEV),FNUM,22)) ^(22) "RTN","XBHEDD4",13,0) W !!?M1," ACCESS:",?M3,"RD: ",$S($D(^DD(FILE(LEV),FNUM,8)):^(8),1:"")," ","DEL: ",$S($D(^(8.5)):^(8.5),1:"")," ","WR: ",$S($D(^(9)):^(9),1:"") "RTN","XBHEDD4",14,0) DATATYPE S ZD=$P(NODE(0),U,2) W !!?M1," DATA TYPE:" "RTN","XBHEDD4",15,0) W ?M3,$S(ZD["C":"Computed",ZD["D":"Date/Time",ZD["F":"Free Text",ZD["N":"Numeric",ZD["P":"Pointer",ZD["S":"Set of Codes",ZD["W":"Word Processing",ZD["V":"Variable Pointer",ZD["K":"MUMPS code",1:"*****") "RTN","XBHEDD4",16,0) F I=1:1:$L(ZD) S ZDSUB=$E(ZD,I) D:"BIORX"[ZDSUB DTYPE1^XBHEDD5 D:"am*'"[ZDSUB DTYPE2^XBHEDD5 "RTN","XBHEDD4",17,0) I ZD["S" F I=1:1:$L($P(NODE(0),U,3),";")-1 W !?M4,$P($P(NODE(0),U,3),";",I) "RTN","XBHEDD4",18,0) I ZD["P" S ZA="^"_$P(NODE(0),U,3) W !!?M1,"POINTS TO:",?M3 S ZB=ZA_"0)" W:$D(@ZB) $P(@ZB,U)," file - ",ZA W:'$D(@ZB) ZB," - Global doesn't exist." "RTN","XBHEDD4",19,0) I ZD["V"&($D(^DD(FILE(LEV),FNUM,"V",0))) W !!?M1,"POINTS TO:" "RTN","XBHEDD4",20,0) I S VAR=0 F I=0:0 S VAR=$O(^DD(FILE(LEV),FNUM,"V",VAR)) Q:VAR'>0 S ZDATA1=^DD(FILE(LEV),FNUM,"V",VAR,0) W ?M3,$P(ZDATA1,U),?M5,$P(ZDATA1,U,2) W:$O(^DD(FILE(LEV),FNUM,"V",VAR))>0 ! "RTN","XBHEDD4",21,0) I $P(NODE(0),U,5)]"" W !!?M1,$S(ZD["C":"CODE CREATING X:",1:"INPUT TRANSFORM:") S STRING=$P(NODE(0),U,5,99) D STRING^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",22,0) I $D(NODE(2)) W !!?M1,"OUTPUT TRANSFORM:" S STRING=NODE(2) D STRING^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",23,0) I $D(^DD(FILE(LEV),FNUM,"DEL")) W !!?M1,"DELETE NODE(S):",?M3,"If $T is set to 1, no deleting." D "RTN","XBHEDD4",24,0) .S XX="" F S XX=$O(^DD(FILE(LEV),FNUM,"DEL",XX)) Q:XX="" W !?6,"Node: ",XX S STRING=^DD(FILE(LEV),FNUM,"DEL",XX,0) D STRING^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",25,0) G:FLAGQ EX "RTN","XBHEDD4",26,0) I $D(^DD(FILE(LEV),0,"ID",FNUM)) W !!?M1,"IDENTIFIER:" S STRING=^DD(FILE(LEV),0,"ID",FNUM) D STRING^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",27,0) I $D(NODE(3)) W !!?M1,"PROMPT MESSAGE:" S STRING=NODE(3) D WORD^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",28,0) I $D(NODE(12)) W !!?M1,"SCREEN: " S STRING=NODE(12) D STRING^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",29,0) I $D(NODE(12.1)) W !?M1,"SCREEN CODE:" S STRING=NODE(12.1) D STRING^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",30,0) I $D(^DD(FILE(LEV),FNUM,1)) D XREF G:FLAGQ EX "RTN","XBHEDD4",31,0) I $D(^DD(FILE(LEV),FNUM,21)) W ! D:$Y>SIZE PAGE^XBHEDD5 G:FLAGQ EX "RTN","XBHEDD4",32,0) I W !?M1,"DESCRIPTION:" S A=0 F S A=$O(^DD(FILE(LEV),FNUM,21,A)) Q:A=""!FLAGQ S STRING=^(A,0) D WORD^XBHEDD5 W ! "RTN","XBHEDD4",33,0) G:FLAGQ EX "RTN","XBHEDD4",34,0) I $D(^DD(FILE(LEV),FNUM,22)),^(22)]"" D HELP G:FLAGQ EX "RTN","XBHEDD4",35,0) EX ; "RTN","XBHEDD4",36,0) K LINE Q:FLAGQ "RTN","XBHEDD4",37,0) I 'FLAGP I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD4",38,0) I 'FLAGP W !,$E(ZLINE,1,IOM) "RTN","XBHEDD4",39,0) Q "RTN","XBHEDD4",40,0) XREF ; "RTN","XBHEDD4",41,0) S K=0 F S K=$O(^DD(FILE(LEV),FNUM,1,K)) Q:K=""!(K'>0)!FLAGQ S XREFNAM=$P(^DD(FILE(LEV),FNUM,1,K,0),U,2) S:XREFNAM="" XREFNAM="-----" S XREFTYPE=$P(^(0),U,3) S:XREFTYPE="" XREFTYPE="REGULAR" D XREF1 "RTN","XBHEDD4",42,0) Q "RTN","XBHEDD4",43,0) XREF1 ; "RTN","XBHEDD4",44,0) W ! D:$Y>SIZE PAGE^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",45,0) W !?M1,"CROSS REF NAME:",?M3,XREFNAM D:$Y>SIZE PAGE^XBHEDD5 Q:FLAGQ W !?12,"TYPE:",?M3,XREFTYPE D:$Y>SIZE PAGE^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",46,0) S L=0 F S L=$O(^DD(FILE(LEV),FNUM,1,K,L)) Q:L=""!FLAGQ D:L="%D" DESCRIP I $D(^(L))#2 W ! W:L'>0 ?M1,L W:L>0 ?6,"Node: ",L S STRING=^(L) D STRING^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",47,0) Q "RTN","XBHEDD4",48,0) DESCRIP ; "RTN","XBHEDD4",49,0) W ! S M=0 F S M=$O(^DD(FILE(LEV),FNUM,1,K,L,M)) Q:M=""!FLAGQ W !,?M1 S STRING=^(M,0) D WORD^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",50,0) W ! Q "RTN","XBHEDD4",51,0) HELP ;Print HELP FRAME text (^DIC(9.2,) "RTN","XBHEDD4",52,0) Q:FLAGP "RTN","XBHEDD4",53,0) W ! D:$Y>SIZE PAGE^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",54,0) W !?M1,"This field has a HELP FRAME." D:$Y>SIZE PAGE^XBHEDD5 Q:FLAGQ "RTN","XBHEDD4",55,0) R !?M1,"Do you wish to see the HELP FRAME text?: [YES/NO] NO//",ANS:DTIME S:'$T ANS="N" S:ANS="" ANS="N" Q:"Yy"'[$E(ANS) "RTN","XBHEDD4",56,0) S XQH=^DD(FILE(LEV),FNUM,22) D EN^XQH "RTN","XBHEDD4",57,0) K ANS,XQH Q "RTN","XBHEDD5") 0^82^B10119169 "RTN","XBHEDD5",1,0) XBHEDD5 ;402,DJB,10/23/91,EDD - Individual Field Summary "RTN","XBHEDD5",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD5",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD5",4,0) STRING ;String=code - Prints a string in lines of 55 characters "RTN","XBHEDD5",5,0) S LINE(1)=$E(STRING,1,55) W ?M3,LINE(1) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",6,0) I $L(STRING)>55 S LINE(2)=$E(STRING,56,110) W !?M3,LINE(2) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",7,0) I $L(STRING)>110 S LINE(3)=$E(STRING,111,165) W !?M3,LINE(3) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",8,0) I $L(STRING)>165 S LINE(4)=$E(STRING,166,220) W !?M3,LINE(4) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",9,0) I $L(STRING)>220 S LINE(5)=$E(STRING,221,275) W !?M3,LINE(5) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",10,0) I $L(STRING)>275 S LINE(6)=$E(STRING,276,330) W !?M3,LINE(6) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",11,0) Q "RTN","XBHEDD5",12,0) WORD ;String=text - Prints a string in lines of 55 characters "RTN","XBHEDD5",13,0) S LINE(1)=$E(STRING,1,55) "RTN","XBHEDD5",14,0) I $L(STRING)>55 S LINE(1)=$P(LINE(1)," ",1,$L(LINE(1)," ")-1) "RTN","XBHEDD5",15,0) W ?M3,LINE(1) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",16,0) S LENGTH=$L(LINE(1)) "RTN","XBHEDD5",17,0) Q:$L(STRING)'>LENGTH "RTN","XBHEDD5",18,0) S LINE(2)=$E(STRING,LENGTH+2,LENGTH+57) "RTN","XBHEDD5",19,0) I $L(STRING)>(LENGTH+2+55) S LINE(2)=$P(LINE(2)," ",1,$L(LINE(2)," ")-1) "RTN","XBHEDD5",20,0) W !?M3,LINE(2) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",21,0) S LENGTH=LENGTH+2+$L(LINE(2)) "RTN","XBHEDD5",22,0) Q:$L(STRING)'>LENGTH "RTN","XBHEDD5",23,0) S LINE(3)=$E(STRING,LENGTH+2,LENGTH+57) "RTN","XBHEDD5",24,0) I $L(STRING)>(LENGTH+2+55) S LINE(3)=$P(LINE(3)," ",1,$L(LINE(3)," ")-1) "RTN","XBHEDD5",25,0) W !?M3,LINE(3) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",26,0) S LENGTH=LENGTH+2+$L(LINE(3)) "RTN","XBHEDD5",27,0) S LINE(4)=$E(STRING,LENGTH+2,LENGTH+57) "RTN","XBHEDD5",28,0) I $L(STRING)>(LENGTH+2+55) S LINE(4)=$P(LINE(4)," ",1,$L(LINE(4)," ")-1) "RTN","XBHEDD5",29,0) W !?M3,LINE(4) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",30,0) S LENGTH=LENGTH+2+$L(LINE(4)) "RTN","XBHEDD5",31,0) S LINE(5)=$E(STRING,LENGTH+2,LENGTH+57) "RTN","XBHEDD5",32,0) I $L(STRING)>(LENGTH+2+55) S LINE(5)=$P(LINE(5)," ",1,$L(LINE(5)," ")-1) "RTN","XBHEDD5",33,0) W !?M3,LINE(5) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",34,0) S LENGTH=LENGTH+2+$L(LINE(5)) "RTN","XBHEDD5",35,0) S LINE(6)=$E(STRING,LENGTH+2,LENGTH+57) "RTN","XBHEDD5",36,0) I $L(STRING)>(LENGTH+2+55) S LINE(6)=$P(LINE(6)," ",1,$L(LINE(6)," ")-1) "RTN","XBHEDD5",37,0) W !?M3,LINE(6) I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD5",38,0) Q "RTN","XBHEDD5",39,0) DTYPE1 ;Called by DATATYPE^XBHEDD4 "RTN","XBHEDD5",40,0) W !?M3,$S(ZDSUB["B":"True-False (""Boolean"")",ZDSUB["I":"Uneditable",ZDSUB["O":"Has output transform",ZDSUB["R":"Required field",ZDSUB["X":"Input Transform has been modified in Utility Option",1:"") "RTN","XBHEDD5",41,0) Q "RTN","XBHEDD5",42,0) DTYPE2 ;Called by DATATYPE^XBHEDD4 "RTN","XBHEDD5",43,0) W !?M3,$S(ZDSUB["a":"Marked for auditing",ZDSUB["m":"Multilined",ZDSUB["*":"Field has a screen",ZDSUB["'":"LAYGO to ""pointed to"" file not allowed",1:"") "RTN","XBHEDD5",44,0) Q "RTN","XBHEDD5",45,0) PAGE ; "RTN","XBHEDD5",46,0) I FLAGP,IO'=IO(0) W @IOF,!!! Q "RTN","XBHEDD5",47,0) I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD5",48,0) W:'FLAGP !,$E(ZLINE,1,IOM) W:FLAGP ! "RTN","XBHEDD5",49,0) R !?2," to continue, ""^"" to quit, ""^^"" to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD5",50,0) W @IOF W:'FLAGP !?55,"FLD NUMBER: ",FNUM,!,$E(ZLINE,1,IOM),! "RTN","XBHEDD5",51,0) Q "RTN","XBHEDD6") 0^83^B16116948 "RTN","XBHEDD6",1,0) XBHEDD6 ;402,DJB,10/23/91,EDD - Xref,Groups,Pointers In "RTN","XBHEDD6",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD6",3,0) ;; David Bolduc - Togus, ME "RTN","XBHEDD6",4,0) XREF ;Cross Reference Listing "RTN","XBHEDD6",5,0) I '$D(^DD(ZNUM,0,"IX")) W ?30,"No XREF for this file." S FLAGG=1 Q "RTN","XBHEDD6",6,0) S NM="",HD="HD1" D INIT^XBHEDD7 G:FLAGQ EX D HD1 "RTN","XBHEDD6",7,0) F S NM=$O(^DD(ZNUM,0,"IX",NM)) Q:NM="" D:$Y>SIZE PAGE Q:FLAGQ S ZDD="",ZDD=$O(^DD(ZNUM,0,"IX",NM,ZDD)),ZFLD="",ZFLD=$O(^DD(ZNUM,0,"IX",NM,ZDD,ZFLD)) D XREFPRT "RTN","XBHEDD6",8,0) G EX "RTN","XBHEDD6",9,0) XREFPRT ; "RTN","XBHEDD6",10,0) S GLTEMP=ZGL_""""_NM_""""_")" "RTN","XBHEDD6",11,0) W ! W:$D(@(GLTEMP)) ?1,"*" W ?4,"""",NM,"""",?22,$J(ZDD,8),?33,$J(ZFLD,10) "RTN","XBHEDD6",12,0) I $D(^DD(ZDD,ZFLD,0)) W ?46,$P(^(0),U) Q "RTN","XBHEDD6",13,0) W ?46,"---> Field doesn't exist" "RTN","XBHEDD6",14,0) Q "RTN","XBHEDD6",15,0) PT ;Pointers to this file "RTN","XBHEDD6",16,0) I '$D(^DD(ZNUM,0,"PT")) W ?30,"No files point to this file." S FLAGG=1 Q "RTN","XBHEDD6",17,0) D INIT^XBHEDD7 G:FLAGQ EX D HD3 S ZFILE="",ZCNT=1,HD="HD3" "RTN","XBHEDD6",18,0) F S ZFILE=$O(^DD(ZNUM,0,"PT",ZFILE)) Q:ZFILE=""!FLAGQ S FLAGPT=0 D @$S($D(^DIC(ZFILE,0)):"PTYES",1:"PTNO") I 'FLAGPT S ZFLD="" F S ZFLD=$O(^DD(ZNUM,0,"PT",ZFILE,ZFLD)) Q:ZFLD="" D PTPRT Q:FLAGQ "RTN","XBHEDD6",19,0) G EX "RTN","XBHEDD6",20,0) PTNO ; "RTN","XBHEDD6",21,0) I '$D(^DD(ZFILE,0,"UP")) S FLAGPT=1 Q "RTN","XBHEDD6",22,0) S ZFILETP=ZFILE F S ZFILETP=^DD(ZFILETP,0,"UP") Q:$D(^DIC(ZFILETP,0)) I '$D(^DD(ZFILETP,0,"UP")) Q "RTN","XBHEDD6",23,0) I '$D(^DIC(ZFILETP,0)) S FLAGPT=1 Q "RTN","XBHEDD6",24,0) S GL=^DIC(ZFILETP,0,"GL"),ZFILEN=$P(^DIC(ZFILETP,0),U) "RTN","XBHEDD6",25,0) Q "RTN","XBHEDD6",26,0) PTYES ; "RTN","XBHEDD6",27,0) S GL=^DIC(ZFILE,0,"GL"),ZFILEN=$P(^DIC(ZFILE,0),U) Q "RTN","XBHEDD6",28,0) PTPRT ; "RTN","XBHEDD6",29,0) W !,$J(ZCNT,4),".",?6,GL,?21,$E(ZFILEN,1,25) "RTN","XBHEDD6",30,0) W ?48 I $D(^DD(ZFILE,ZFLD,0)),$P(^(0),U)]"" W $E($P(^(0),U),1,22)," (",ZFLD,")" "RTN","XBHEDD6",31,0) E W "--> Field ",ZFLD," does not exist." "RTN","XBHEDD6",32,0) S ZCNT=ZCNT+1 I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD6",33,0) Q "RTN","XBHEDD6",34,0) GRP ;Groups "RTN","XBHEDD6",35,0) S ZMULT="",HD="HD2" D GRPBLD G:FLAGG EX D INIT^XBHEDD7 G:FLAGQ EX D HD2,GRPPRT "RTN","XBHEDD6",36,0) G EX "RTN","XBHEDD6",37,0) GRPBLD ; "RTN","XBHEDD6",38,0) S Z="",X=1 "RTN","XBHEDD6",39,0) F S Z=$O(^UTILITY($J,"TMP",Z)) Q:Z="" I $D(^DD(Z,"GR")) S GRP="" F S GRP=$O(^DD(Z,"GR",GRP)) Q:GRP="" S ZFLD="" F S ZFLD=$O(^DD(Z,"GR",GRP,ZFLD)) Q:ZFLD="" S ^UTILITY($J,"GROUP",GRP,Z,ZFLD)=$P(^DD(Z,ZFLD,0),U),X=X+1 I X#9=0 W "." "RTN","XBHEDD6",40,0) I '$D(^UTILITY($J,"GROUP")) W ?30,"No Groups established." S FLAGG=1 "RTN","XBHEDD6",41,0) Q "RTN","XBHEDD6",42,0) GRPPRT ; "RTN","XBHEDD6",43,0) S GRP="" F I=1:1 S GRP=$O(^UTILITY($J,"GROUP",GRP)) Q:GRP=""!FLAGQ W !,$J(I,3),". ",GRP D GRPPRT1 "RTN","XBHEDD6",44,0) Q "RTN","XBHEDD6",45,0) GRPPRT1 ; "RTN","XBHEDD6",46,0) S GRP1="" "RTN","XBHEDD6",47,0) F S GRP1=$O(^UTILITY($J,"GROUP",GRP,GRP1)) Q:GRP1=""!FLAGQ S GRP2="" F S GRP2=$O(^UTILITY($J,"GROUP",GRP,GRP1,GRP2)) Q:GRP2="" W ?18,$J(GRP1,6),?27,$J(GRP2,8),?39,^(GRP2),! I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDD6",48,0) Q "RTN","XBHEDD6",49,0) EX ; "RTN","XBHEDD6",50,0) K FLAGPT,GL,GLTEMP,GRP,GRP1,GRP2,HD,NM,ZDD,ZFILE,ZFILEN,ZFILETP,ZFLD,ZGL1,ZMULT "RTN","XBHEDD6",51,0) K ^UTILITY($J,"GROUP") Q "RTN","XBHEDD6",52,0) HD1 ;XREF "RTN","XBHEDD6",53,0) W !?9,"XREF",?25,"DD",?34,"FLD NUM",?56,"FIELD NAME",!?4,"---------------",?22,"--------",?33,"----------",?46,"------------------------------" "RTN","XBHEDD6",54,0) Q "RTN","XBHEDD6",55,0) HD2 ;Groups "RTN","XBHEDD6",56,0) W !?5,"GROUP NAME",?20,"DD",?27,"FLD NUM",?48,"FIELD NAME",!?5,"-----------",?18,"------",?27,"--------",?39,"------------------------------",! "RTN","XBHEDD6",57,0) Q "RTN","XBHEDD6",58,0) HD3 ;Pointers to this file "RTN","XBHEDD6",59,0) W !?3,"Pointers TO this file..",!?9,"GLOBAL",?22,"FILE (Truncated to 25)",?50,"FIELD (Truncated to 22)",!?6,"-------------",?21,"-------------------------",?48,"------------------------------" "RTN","XBHEDD6",60,0) Q "RTN","XBHEDD6",61,0) PAGE ; "RTN","XBHEDD6",62,0) I FLAGP,IO'=IO(0) W @IOF,!!! D @HD Q "RTN","XBHEDD6",63,0) R !!?2," to continue, '^' to quit, '^^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD6",64,0) W @IOF D @HD "RTN","XBHEDD6",65,0) Q "RTN","XBHEDD7") 0^84^B8240740 "RTN","XBHEDD7",1,0) XBHEDD7 ;402,DJB,10/23/91,EDD - Count fields, Printing "RTN","XBHEDD7",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD7",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD7",4,0) ;;This is run each time EDD is run, right after you select a File. "RTN","XBHEDD7",5,0) ;;It sets up multiples in ^UTILITY($J,"TMP") "RTN","XBHEDD7",6,0) MULT ; "RTN","XBHEDD7",7,0) D MULTBLD K CNT,TMP Q "RTN","XBHEDD7",8,0) MULTBLD ; "RTN","XBHEDD7",9,0) K ^UTILITY($J) "RTN","XBHEDD7",10,0) S CNT=1,^UTILITY($J,"TMP",ZNUM)=$P(^DD(ZNUM,0),U,4)_"^"_CNT,^UTILITY($J,"TOT")=$P(^DD(ZNUM,0),U,4) "RTN","XBHEDD7",11,0) Q:'$D(^DD(ZNUM,"SB")) S TMP(1)=ZNUM,CNT=2,TMP(CNT)="" "RTN","XBHEDD7",12,0) F S TMP(CNT)=$O(^DD(TMP(CNT-1),"SB",TMP(CNT))) D MULTBLD1 Q:CNT=1 "RTN","XBHEDD7",13,0) Q "RTN","XBHEDD7",14,0) MULTBLD1 ; "RTN","XBHEDD7",15,0) I TMP(CNT)="" S CNT=CNT-1 Q "RTN","XBHEDD7",16,0) I '$D(^DD(TMP(CNT),0)) Q "RTN","XBHEDD7",17,0) S ^UTILITY($J,"TMP",TMP(CNT))=$P(^DD(TMP(CNT),0),U,4)_"^"_CNT_"^"_$O(^DD(TMP(CNT-1),"SB",TMP(CNT),"")) "RTN","XBHEDD7",18,0) S ^UTILITY($J,"TOT")=^UTILITY($J,"TOT")+$P(^DD(TMP(CNT),0),U,4) "RTN","XBHEDD7",19,0) I $D(^DD(TMP(CNT),"SB")) S CNT=CNT+1,TMP(CNT)="" "RTN","XBHEDD7",20,0) Q "RTN","XBHEDD7",21,0) PRINTM ;Option 11 in Main Menu "RTN","XBHEDD7",22,0) S FLAGP1=1 ;Redraws Main Menu. See MENU+2^XBHEDD. "RTN","XBHEDD7",23,0) PRINT ; "RTN","XBHEDD7",24,0) I FLAGS W *27,"[?4l" S FLAGS=0 ;Reset scroll to normal "RTN","XBHEDD7",25,0) S FLAGP=FLAGP=0 I FLAGP=0 W:IO'=IO(0)&('FLAGM) @IOF D ^%ZISC S SIZE=(IOSL-5) Q ;If FLAGM user hit at Main Menu pompt. "RTN","XBHEDD7",26,0) S %ZIS("A")=" DEVICE: " D ^%ZIS K %ZIS("A") I POP S FLAGP=0 Q "RTN","XBHEDD7",27,0) S SIZE=(IOSL-5) Q "RTN","XBHEDD7",28,0) TXT ; "RTN","XBHEDD7",29,0) W @IOF Q:'FLAGP W:IO'=IO(0) !!! "RTN","XBHEDD7",30,0) I '$D(EDDDATE) S X="NOW",%DT="T" D ^%DT K %DT S EDDDATE=$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3) "RTN","XBHEDD7",31,0) W !,$E(ZLINE1,1,IOM),!?2,"File:---- ",ZNAM,!?2,"Global:-- ",ZGL,?(IOM-17),"Date: ",EDDDATE,!,$E(ZLINE1,1,IOM),! "RTN","XBHEDD7",32,0) Q "RTN","XBHEDD7",33,0) SCROLL ;Adjust scroll rate "RTN","XBHEDD7",34,0) W !!?8,"SCROLLING: [N]ormal [S]mooth . . . . ","Select: N//" "RTN","XBHEDD7",35,0) R SCROLL:DTIME S:'$T SCROLL="^" S SCROLL=$E(SCROLL) I SCROLL="^" S FLAGQ=1 Q "RTN","XBHEDD7",36,0) I SCROLL="?" W !?8,"Since you're printing to your CRT and you've asked for a page",!?8,"length greater than 25, you may now adjust the scroll rate.",!?8,"For DEC VT-100 compatible devices only." G SCROLL "RTN","XBHEDD7",37,0) S:SCROLL="" SCROLL="N" Q:"S,s"'[SCROLL S FLAGS=1 W *27,"[?4h" Q "RTN","XBHEDD7",38,0) INIT ; "RTN","XBHEDD7",39,0) I FLAGP,IO=IO(0),IOSL>25 D SCROLL Q:FLAGQ "RTN","XBHEDD7",40,0) I FLAGP W:IO'=IO(0) " Printing.." U IO "RTN","XBHEDD7",41,0) D TXT Q "RTN","XBHEDD8") 0^85^B11857919 "RTN","XBHEDD8",1,0) XBHEDD8 ;402,DJB,10/23/91,EDD - Trace a Field "RTN","XBHEDD8",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD8",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD8",4,0) EN ; "RTN","XBHEDD8",5,0) I FLAGP D PRINT^XBHEDD7 ;Turn off printing "RTN","XBHEDD8",6,0) D GETFLD G:FLAGQ EX D LIST G:FLAGG!(FLAGE) EX "RTN","XBHEDD8",7,0) D TRACE G:FLAGQ EX D PRINT,ASK "RTN","XBHEDD8",8,0) EX K CNT,DATA,FLD,FLD1,FLDCNT,I,LEVEL,MAR,MAR1,ZDD,ZNAME,ZNUMBER,^UTILITY($J,"FLD") "RTN","XBHEDD8",9,0) S FLAGQ=1 Q "RTN","XBHEDD8",10,0) GETFLD ; "RTN","XBHEDD8",11,0) R !?8,"Enter Field Name: ALL FIELDS//",FLD:DTIME S:'$T FLD="^^" I FLD["^" S FLAGQ=1 S:FLD="^^" FLAGE=1 Q "RTN","XBHEDD8",12,0) I FLD="?" W !?2,"Enter field name or any portion of name. I will display the field's path.",!?2,"Use this option if you get ""beeped"" in the INDIVIDUAL FIELD SUMMARY because",!?2,"the field is decendent from a multiple." G GETFLD "RTN","XBHEDD8",13,0) Q "RTN","XBHEDD8",14,0) LIST ; "RTN","XBHEDD8",15,0) S ZDD="",FLDCNT=1 "RTN","XBHEDD8",16,0) F S ZDD=$O(^UTILITY($J,"TMP",ZDD)) Q:ZDD=""!(FLAGQ) S LEVEL=$P(^(ZDD),U,2),ZNAME="" F S ZNAME=$O(^DD(ZDD,"B",ZNAME)) Q:ZNAME="" I $E(ZNAME,1,$L(FLD))=FLD D LIST1 Q:FLAGQ "RTN","XBHEDD8",17,0) I '$D(^UTILITY($J,"FLD")) W ?50,"No such field." S FLAGG=1 "RTN","XBHEDD8",18,0) S FLAGQ=0 Q "RTN","XBHEDD8",19,0) LIST1 ; "RTN","XBHEDD8",20,0) S ZNUMBER=$O(^DD(ZDD,"B",ZNAME,"")) Q:^DD(ZDD,"B",ZNAME,ZNUMBER)=1 "RTN","XBHEDD8",21,0) D:FLDCNT=1 HD "RTN","XBHEDD8",22,0) W ! W:$P(^DD(ZDD,ZNUMBER,0),U,2)>0 "Mult->" W ?6,$J(FLDCNT,3),".",?LEVEL*5+6," ",ZNAME," (",ZNUMBER,")" "RTN","XBHEDD8",23,0) S ^UTILITY($J,"FLD",FLDCNT)=ZNAME_"^"_ZDD_"^"_ZNUMBER_"^"_LEVEL "RTN","XBHEDD8",24,0) D:$Y>SIZE PAGE Q:FLAGQ "RTN","XBHEDD8",25,0) S FLDCNT=FLDCNT+1 "RTN","XBHEDD8",26,0) Q "RTN","XBHEDD8",27,0) TRACE ;If more than one match do NUM "RTN","XBHEDD8",28,0) R !!?8,"Select Number: ",FLD1:DTIME S:'$T FLD1="^^" S:FLD1="" FLD1="^" I FLD1["^" S FLAGQ=1 S:FLD1="^^" FLAGE=1 Q "RTN","XBHEDD8",29,0) I FLD1<1!(FLD1>(FLDCNT)) W *7,!?2,"Enter a number from the left hand column." G TRACE "RTN","XBHEDD8",30,0) S CNT=1,ZNAME(CNT)=$P(^UTILITY($J,"FLD",FLD1),U),ZNUMBER(CNT)=$P(^(FLD1),U,3),ZDD=$P(^(FLD1),U,2) "RTN","XBHEDD8",31,0) Q:ZDD=ZNUM "RTN","XBHEDD8",32,0) F S CNT=CNT+1,ZNUMBER(CNT)=$P(^UTILITY($J,"TMP",ZDD),U,3),ZDD=^DD(ZDD,0,"UP"),ZNAME(CNT)=$P(^DD(ZDD,ZNUMBER(CNT),0),U) Q:ZDD=ZNUM "RTN","XBHEDD8",33,0) Q "RTN","XBHEDD8",34,0) PRINT ;Print data. "RTN","XBHEDD8",35,0) W @IOF,!!!,?IOM\2-11,"F I E L D T R A C E",!,$E(ZLINE1,1,IOM) "RTN","XBHEDD8",36,0) S MAR=5,MAR1=15 "RTN","XBHEDD8",37,0) F W !!?MAR,ZNUMBER(CNT),?MAR1,ZNAME(CNT) S CNT=CNT-1 Q:CNT=0 S MAR=MAR+5,MAR1=MAR1+5 "RTN","XBHEDD8",38,0) Q "RTN","XBHEDD8",39,0) ASK ; "RTN","XBHEDD8",40,0) I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD8",41,0) W !,$E(ZLINE1,1,IOM) "RTN","XBHEDD8",42,0) W !?2,"(=Main Menu) ('I'=Individual Field Summary)" "RTN","XBHEDD8",43,0) ASK1 R !?2,"Select: ",Z1:DTIME S:'$T Z1="^^" I Z1="^^" S FLAGE=1 "RTN","XBHEDD8",44,0) I Z1="?" W *7,!?2,"See menu on line above." G ASK1 "RTN","XBHEDD8",45,0) S:Z1="i" Z1="I" I Z1="I" D ^XBHEDD3 "RTN","XBHEDD8",46,0) Q "RTN","XBHEDD8",47,0) PAGE ; "RTN","XBHEDD8",48,0) R !!?2," to continue, '^' to quit, '^^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD8",49,0) D HD Q "RTN","XBHEDD8",50,0) HD ;Trace a field "RTN","XBHEDD8",51,0) W @IOF,!!,"MULTIPLE",?13,"1 2 3 4 5 6 7",!,"LEVELS",?13,"| | | | | | |",!,$E(ZLINE,1,IOM),! "RTN","XBHEDD8",52,0) Q "RTN","XBHEDD9") 0^86^B19958072 "RTN","XBHEDD9",1,0) XBHEDD9 ;402,DJB,10/23/91,EDD - NODE Lookup and Look-up by Global "RTN","XBHEDD9",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDD9",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDD9",4,0) N FILE,FLD,NODE,NODE0,NODE1,PIECE "RTN","XBHEDD9",5,0) K ^UTILITY($J,"EDD/NP") S FILE=ZNUM "RTN","XBHEDD9",6,0) ND ;Lookup by NODE and PIECE "RTN","XBHEDD9",7,0) D NDGET G:FLAGQ EX D NDBLD "RTN","XBHEDD9",8,0) I '$D(^UTILITY($J,"EDD/NP")) W *7," No such node." G ND "RTN","XBHEDD9",9,0) ND1 D NDPRT G:FLAGQ EX "RTN","XBHEDD9",10,0) I $O(^UTILITY($J,"EDD/NP",NODE,""))=0 S FILE=+$P(^UTILITY($J,"EDD/NP",NODE,0),U,3),NODE1=NODE G ND "RTN","XBHEDD9",11,0) D NDSUM G:FLAGD ND G:FLAGE EX "RTN","XBHEDD9",12,0) S FLAGQ=0 G ND1 "RTN","XBHEDD9",13,0) EX ; "RTN","XBHEDD9",14,0) S:'FLAGE FLAGQ=0 K NP,FLAGD,FNAM,FNUM,LEV,^UTILITY($J,"EDD/NP") "RTN","XBHEDD9",15,0) Q "RTN","XBHEDD9",16,0) NDGET ;Node get "RTN","XBHEDD9",17,0) W ! "RTN","XBHEDD9",18,0) NDGET1 I FILE'=ZNUM W !,"Select '",NODE1,"' SUBNODE: " "RTN","XBHEDD9",19,0) E W !,"Select NODE: " "RTN","XBHEDD9",20,0) R NODE:DTIME S:'$T NODE="^" I "^"[NODE S FLAGQ=1 Q "RTN","XBHEDD9",21,0) I NODE="?" D HELP G NDGET1 "RTN","XBHEDD9",22,0) Q "RTN","XBHEDD9",23,0) NDBLD ; "RTN","XBHEDD9",24,0) S FLD=0 K ^UTILITY($J,"EDD/NP") "RTN","XBHEDD9",25,0) F S FLD=$O(^DD(FILE,FLD)) Q:FLD'>0 I $P($P(^DD(FILE,FLD,0),U,4),";")=NODE S NODE0=^(0),NP=$P(NODE0,U,4),PIECE=$P(NP,";",2),^UTILITY($J,"EDD/NP",NODE,PIECE)=FLD_U_$P(NODE0,U,1,4) "RTN","XBHEDD9",26,0) Q "RTN","XBHEDD9",27,0) NDPRT ;Print "RTN","XBHEDD9",28,0) S PIECE="" W @IOF D HD "RTN","XBHEDD9",29,0) F S PIECE=$O(^UTILITY($J,"EDD/NP",NODE,PIECE)) Q:PIECE="" W !?3,$J(NODE_";"_PIECE,12),?20,$J($P(^UTILITY($J,"EDD/NP",NODE,PIECE),U),7),?32,$P(^(PIECE),U,2) I $Y>SIZE D PAGE Q:FLAGQ=1 "RTN","XBHEDD9",30,0) Q "RTN","XBHEDD9",31,0) NDSUM ; "RTN","XBHEDD9",32,0) W !!?2,"You may now do an 'INDIVIDUAL FIELD SUMMARY'",!?2,"on the field(s) listed above.." "RTN","XBHEDD9",33,0) S FLAGD=0 W ! S DIC="^DD("_FILE_",",DIC(0)="QEAM" D ^DIC I Y<0 S FLAGD=1 Q "RTN","XBHEDD9",34,0) S FNUM=+Y,FNAM=$P(Y,U,2),LEV=1,FILE(LEV)=FILE D ^XBHEDD4 Q:FLAGQ "RTN","XBHEDD9",35,0) I $Y'>SIZE F I=$Y:1:SIZE W ! "RTN","XBHEDD9",36,0) R ?2," to continue..",XX:DTIME "RTN","XBHEDD9",37,0) Q "RTN","XBHEDD9",38,0) PAGE ; "RTN","XBHEDD9",39,0) R !!?2," to continue, '^' to quit, '^' to exit: ",Z1:DTIME S:'$T Z1="^" I Z1["^" S FLAGQ=1 S:Z1="^^" FLAGE=1 Q "RTN","XBHEDD9",40,0) W @IOF D HD "RTN","XBHEDD9",41,0) Q "RTN","XBHEDD9",42,0) HELP ; "RTN","XBHEDD9",43,0) N FLD,NDTEMP "RTN","XBHEDD9",44,0) S FLD=0 K ^UTILITY($J,"EDD/NP") "RTN","XBHEDD9",45,0) F S FLD=$O(^DD(FILE,FLD)) Q:FLD'>0 S NDTEMP=$P($P(^DD(FILE,FLD,0),U,4),";") W:'$D(^UTILITY($J,"EDD/NP",NDTEMP))#2 " ",NDTEMP W:$X>70 !?5 S ^UTILITY($J,"EDD/NP",NDTEMP)="" "RTN","XBHEDD9",46,0) K ^UTILITY($J,"EDD/NP") Q "RTN","XBHEDD9",47,0) HD ;Node look-up "RTN","XBHEDD9",48,0) W !?3,"NODE ; PIECE",?20,"FLD NUM",?42,"FIELD NAME" "RTN","XBHEDD9",49,0) W !?3,"------------",?20,"-------",?32,"------------------------------" "RTN","XBHEDD9",50,0) Q "RTN","XBHEDD9",51,0) GLOBAL ;Find File when user enters global "RTN","XBHEDD9",52,0) K ^UTILITY($J) S (FLAGGL,FLAGGL1)=0 "RTN","XBHEDD9",53,0) I '$D(^UTILITY("EDD/GL")) W *7,!?25,"You have no data in ^UTILITY(""EDD/GL""). You must run",!?25,"option 10, List Globals in ASCII Order, before you",!?25,"can do a lookup on a global." S FLAGGL=1 Q "RTN","XBHEDD9",54,0) I $D(^UTILITY("EDD/GL",X)) S ZNUM=$P(^(X),U),ZNAM=$P(^(X),U,2),ZGL=X Q "RTN","XBHEDD9",55,0) S XX=X F I=1:1 S XX=$O(^UTILITY("EDD/GL",XX)) Q:XX=""!($E(XX,1,$L(X))'=X) D GLLIST I I#5=0 D GLPAGE Q:FLAGGL!FLAGGL1 "RTN","XBHEDD9",56,0) I '$D(^UTILITY($J)) W *7," ??" S FLAGGL=1 "RTN","XBHEDD9",57,0) Q:FLAGGL "RTN","XBHEDD9",58,0) I 'FLAGGL1 S I=(I-1) D GLPAGE1 Q:FLAGGL "RTN","XBHEDD9",59,0) I Z1>I F II=(I+1):1:Z1 S XX=$O(^UTILITY("EDD/GL",XX)) Q:XX=""!($E(XX,1,$L(X))'=X) S ^UTILITY($J,II)=$P(^UTILITY("EDD/GL",XX),U)_"\~"_$P(^(XX),U,2)_"\~"_XX "RTN","XBHEDD9",60,0) I '$D(^UTILITY($J,Z1)) W *7," ??" S FLAGGL=1 Q "RTN","XBHEDD9",61,0) S ZNUM=$P(^UTILITY($J,Z1),"\~"),ZNAM=$P(^(Z1),"\~",2),ZGL=$P(^(Z1),"\~",3) "RTN","XBHEDD9",62,0) I '$D(^DD(ZNUM)) W *7," ?? This file has been deleted." S FLAGGL=1 ;Check to see if file still exists "RTN","XBHEDD9",63,0) Q "RTN","XBHEDD9",64,0) GLLIST ;List Globals "RTN","XBHEDD9",65,0) I I=1 W !?28,"FILE NUM",?38,"FILE NAME (Truncated to 32)",!?28,"--------",?38,"--------------------------------" "RTN","XBHEDD9",66,0) W !?3,$J(I,3)," ",XX,?28,$J($P(^UTILITY("EDD/GL",XX),U),8),?38,$E($P(^(XX),U,2),1,32) "RTN","XBHEDD9",67,0) S ^UTILITY($J,I)=$P(^UTILITY("EDD/GL",XX),U)_"\~"_$P(^(XX),U,2)_"\~"_XX "RTN","XBHEDD9",68,0) Q "RTN","XBHEDD9",69,0) GLPAGE ; "RTN","XBHEDD9",70,0) W !,"TYPE '^' TO STOP, OR",!,"CHOOSE NUMBER: " "RTN","XBHEDD9",71,0) R Z1:DTIME S:'$T Z1="^" I Z1="?" W " Enter a number from left hand column.." G GLPAGE "RTN","XBHEDD9",72,0) S:Z1["^" FLAGGL=1 I +Z1>0 S FLAGGL1=1 "RTN","XBHEDD9",73,0) Q "RTN","XBHEDD9",74,0) GLPAGE1 ; "RTN","XBHEDD9",75,0) W !,"TYPE '^' TO STOP, OR",!,"CHOOSE NUMBER: " "RTN","XBHEDD9",76,0) R Z1:DTIME S:'$T Z1="^" I "^"[Z1!(+Z1'>0) S FLAGGL=1 "RTN","XBHEDD9",77,0) I Z1="?" W " Enter a number from left hand column.." G GLPAGE1 "RTN","XBHEDD9",78,0) Q "RTN","XBHEDDH1") 0^87^B18812531 "RTN","XBHEDDH1",1,0) XBHEDDH1 ;402,DJB,10/23/91,EDD - Help Text - Main Menu "RTN","XBHEDDH1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDDH1",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDDH1",4,0) ;;Called by XBHEDD1 "RTN","XBHEDDH1",5,0) D INIT G:FLAGQ EX "RTN","XBHEDDH1",6,0) I FLAGP,IO'=IO(0) W !!! "RTN","XBHEDDH1",7,0) F I=1:1 S TEXT=$P($T(TXT+I),";;;",2) Q:TEXT="***" W !,TEXT I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDDH1",8,0) I 'FLAGQ D ^XBHEDDH2 "RTN","XBHEDDH1",9,0) EX ; "RTN","XBHEDDH1",10,0) K TEXT Q "RTN","XBHEDDH1",11,0) TXT ;Start of text "RTN","XBHEDDH1",12,0) ;;; E D D - Electonic Data Dictionary "RTN","XBHEDDH1",13,0) ;;; Version 2.2 David Bolduc Togus,ME "RTN","XBHEDDH1",14,0) ;;;============================================================================== "RTN","XBHEDDH1",15,0) ;;; HELP [] HELP [] HELP [] HELP [] HELP [] HELP [] HELP [] HELP "RTN","XBHEDDH1",16,0) ;;;============================================================================== "RTN","XBHEDDH1",17,0) ;;; NOTE: When you're in EDD, enter '?' at any prompt for help. "RTN","XBHEDDH1",18,0) ;;; "RTN","XBHEDDH1",19,0) ;;; A) E N T R Y P O I N T S: "RTN","XBHEDDH1",20,0) ;;; "RTN","XBHEDDH1",21,0) ;;; DO ^XBHEDD - Main entry point. At 'Select FILE:' prompt "RTN","XBHEDDH1",22,0) ;;; enter File Name, File Number, or File Global "RTN","XBHEDDH1",23,0) ;;; in the form '^DG' or '^RA('. "RTN","XBHEDDH1",24,0) ;;; DO GL^XBHEDD - Gives listing of your system's globals sorted "RTN","XBHEDDH1",25,0) ;;; in ASCII order, including file number and name. "RTN","XBHEDDH1",26,0) ;;; DO PRT^XBHEDD - Bypasses opening screen and suppressess some page "RTN","XBHEDDH1",27,0) ;;; feeds. Use if you're on a printing/keyboard device "RTN","XBHEDDH1",28,0) ;;; such as a counsol. "RTN","XBHEDDH1",29,0) ;;; DO DIR^XBHEDD - Bypasses opening screen. "RTN","XBHEDDH1",30,0) ;;; "RTN","XBHEDDH1",31,0) ;;; B) M E N U O P T I O N S: "RTN","XBHEDDH1",32,0) ;;; "RTN","XBHEDDH1",33,0) ;;; 1) Cross References - An '*' in the far left column indicates this "RTN","XBHEDDH1",34,0) ;;; XREF can be used for lookup purposes. If you "RTN","XBHEDDH1",35,0) ;;; concantenate the global shown on the Main Menu "RTN","XBHEDDH1",36,0) ;;; screen with this XREF, there will be data. "RTN","XBHEDDH1",37,0) ;;; "RTN","XBHEDDH1",38,0) ;;; 2) Pointers To This File - Lists all files that point to this file. "RTN","XBHEDDH1",39,0) ;;; "RTN","XBHEDDH1",40,0) ;;; 3) Pointers From This File - Lists all fields in this file that are "RTN","XBHEDDH1",41,0) ;;; pointers, and the files they point to. An 'M' in "RTN","XBHEDDH1",42,0) ;;; the far left column indicates the pointing field "RTN","XBHEDDH1",43,0) ;;; is a multiple. Use 'Trace a Field' to determine "RTN","XBHEDDH1",44,0) ;;; it's path. "RTN","XBHEDDH1",45,0) ;;; "RTN","XBHEDDH1",46,0) ;;; 4) Groups - In Filenanager Groups are a shorthand way for a user to "RTN","XBHEDDH1",47,0) ;;; call up several fields at once for Print or "RTN","XBHEDDH1",48,0) ;;; Entry/Edit purposes. Also, some programmers "RTN","XBHEDDH1",49,0) ;;; use Groups to keep track of locally added/alterred "RTN","XBHEDDH1",50,0) ;;; fields. See VA FILEMAN USER'S MANUAL to learn "RTN","XBHEDDH1",51,0) ;;; how to use Groups. "RTN","XBHEDDH1",52,0) ;;; "RTN","XBHEDDH1",53,0) ;;; 5) Trace a Field - Displays the pathway to fields that are decendent "RTN","XBHEDDH1",54,0) ;;; from a multiple. "RTN","XBHEDDH1",55,0) ;;; Example: When looking at PATIENT file, you type "RTN","XBHEDDH1",56,0) ;;; 'MOV' at the 'Enter Field Name:' prompt. Trace "RTN","XBHEDDH1",57,0) ;;; a Field will display: "RTN","XBHEDDH1",58,0) ;;; 401 Admission Date/Time "RTN","XBHEDDH1",59,0) ;;; 5 Treating Specialty "RTN","XBHEDDH1",60,0) ;;; 1000 Movement Number "RTN","XBHEDDH1",61,0) ;;; This is the pathway to the MOVEMENT NUMBER field. "RTN","XBHEDDH1",62,0) ;;; You can now select 'I' and type in the field "RTN","XBHEDDH1",63,0) ;;; number of each field in the path. You will get "RTN","XBHEDDH1",64,0) ;;; the Individual Field Listing for the MOVEMENT "RTN","XBHEDDH1",65,0) ;;; NUMBER field. "RTN","XBHEDDH1",66,0) ;;;*** "RTN","XBHEDDH1",67,0) PAGE ; "RTN","XBHEDDH1",68,0) I FLAGP,IO'=IO(0) W @IOF,!!! Q "RTN","XBHEDDH1",69,0) R !!?2," to continue, '^' to quit: ",XX:DTIME S:'$T XX="^" S:XX["^" FLAGQ=1 I FLAGQ Q "RTN","XBHEDDH1",70,0) W @IOF Q "RTN","XBHEDDH1",71,0) INIT ; "RTN","XBHEDDH1",72,0) I FLAGP,IO=IO(0),IOSL>25 D SCROLL^XBHEDD7 Q:FLAGQ "RTN","XBHEDDH1",73,0) I FLAGP W:IO'=IO(0) " Printing.." U IO "RTN","XBHEDDH1",74,0) W @IOF Q "RTN","XBHEDDH2") 0^88^B15674331 "RTN","XBHEDDH2",1,0) XBHEDDH2 ;402,DJB,10/23/91,EDD - Help Text - Main Menu cont. "RTN","XBHEDDH2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDDH2",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDDH2",4,0) F I=1:1 S TEXT=$P($T(TXT+I),";;;",2) Q:TEXT="***" W !,TEXT I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDDH2",5,0) Q "RTN","XBHEDDH2",6,0) TXT ; "RTN","XBHEDDH2",7,0) ;;; "RTN","XBHEDDH2",8,0) ;;; 6) Individual Field Summary - Lists contents of the Data Dictionary "RTN","XBHEDDH2",9,0) ;;; for selected field. This option is equivalent "RTN","XBHEDDH2",10,0) ;;; to Filemanager's LIST FILE ATTRIBUTES. "RTN","XBHEDDH2",11,0) ;;; "RTN","XBHEDDH2",12,0) ;;; 7) Field Global Location - List of all fields and their global "RTN","XBHEDDH2",13,0) ;;; location (NODE;PIECE). See the 'HELP' that's "RTN","XBHEDDH2",14,0) ;;; available in this option. "RTN","XBHEDDH2",15,0) ;;; "RTN","XBHEDDH2",16,0) ;;; 8) Templates - Lists Print, Sort, and Input templates. If "RTN","XBHEDDH2",17,0) ;;; listing is too long for any type, you may "RTN","XBHEDDH2",18,0) ;;; enter 'S' and skip over to next type. "RTN","XBHEDDH2",19,0) ;;; "RTN","XBHEDDH2",20,0) ;;; 9) File Description - Narrative describing the selected file. "RTN","XBHEDDH2",21,0) ;;; "RTN","XBHEDDH2",22,0) ;;; 10) List Globals In ASCII Order - Gives listing of your system's globals "RTN","XBHEDDH2",23,0) ;;; sorted in ASCII order. Includes file number "RTN","XBHEDDH2",24,0) ;;; and name. Example: If you are looking at the "RTN","XBHEDDH2",25,0) ;;; RADIOLOGY PATIENT file, the Main Menu screen "RTN","XBHEDDH2",26,0) ;;; shows it's data global as ^RADPT. If you "RTN","XBHEDDH2",27,0) ;;; wanted to identify other Radiology files, "RTN","XBHEDDH2",28,0) ;;; you would use this option and start the "RTN","XBHEDDH2",29,0) ;;; listing at ^R. "RTN","XBHEDDH2",30,0) ;;; "RTN","XBHEDDH2",31,0) ;;; 11) File Characteristics - Displays post-selection actions, special "RTN","XBHEDDH2",32,0) ;;; look-up programs, and identifiers. For more "RTN","XBHEDDH2",33,0) ;;; information on any of these topics see Chapter 5 "RTN","XBHEDDH2",34,0) ;;; Section D of the VA Fileman Programmers' manual "RTN","XBHEDDH2",35,0) ;;; (Version 18). "RTN","XBHEDDH2",36,0) ;;; "RTN","XBHEDDH2",37,0) ;;; 12) Printing On/Off - Allows you to send screens to a printer. You will "RTN","XBHEDDH2",38,0) ;;; be offered the DEVICE: prompt. Enter printer. "RTN","XBHEDDH2",39,0) ;;; After , Main Menu will reappear and "RTN","XBHEDDH2",40,0) ;;; PRINTING STATUS, in the top half of the screen, "RTN","XBHEDDH2",41,0) ;;; will be set to 'ON'. You then select a Main "RTN","XBHEDDH2",42,0) ;;; Menu option and output will go to the selected "RTN","XBHEDDH2",43,0) ;;; device. When you return to the Main Menu, "RTN","XBHEDDH2",44,0) ;;; PRINTING STATUS will be 'OFF'. To print again "RTN","XBHEDDH2",45,0) ;;; you must select Printing On/Off option again "RTN","XBHEDDH2",46,0) ;;; to reset PRINTING STATUS to 'ON'. If PRINTING "RTN","XBHEDDH2",47,0) ;;; STATUS is 'ON' you may turn it off by selecting "RTN","XBHEDDH2",48,0) ;;; Printing On/Off option again. To slave "RTN","XBHEDDH2",49,0) ;;; print, enter '0;;60' at the DEVICE: prompt. "RTN","XBHEDDH2",50,0) ;;; "RTN","XBHEDDH2",51,0) ;;; NOTE: Since all screens are designed to be "RTN","XBHEDDH2",52,0) ;;; displayed on a CRT, printing to a 10 pitch, "RTN","XBHEDDH2",53,0) ;;; 80 margin printer looks best. "RTN","XBHEDDH2",54,0) ;;;*** "RTN","XBHEDDH2",55,0) PAGE ; "RTN","XBHEDDH2",56,0) I FLAGP,IO'=IO(0) W @IOF,!!! Q "RTN","XBHEDDH2",57,0) R !!?2," to continue, '^' to quit: ",XX:DTIME S:'$T XX="^" S:XX="^" FLAGQ=1 I FLAGQ Q "RTN","XBHEDDH2",58,0) W @IOF Q "RTN","XBHEDDH3") 0^89^B14819998 "RTN","XBHEDDH3",1,0) XBHEDDH3 ;402,DJB,10/23/91,EDD - Help Text - Field Global Location "RTN","XBHEDDH3",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDDH3",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDDH3",4,0) ;;Called by XBHEDD1 "RTN","XBHEDDH3",5,0) W @IOF "RTN","XBHEDDH3",6,0) F I=1:1 S TEXT=$P($T(TXT+I),";;;",2) Q:TEXT="***" W !,TEXT I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDDH3",7,0) I 'FLAGQ D ^XBHEDDH4 "RTN","XBHEDDH3",8,0) EX ; "RTN","XBHEDDH3",9,0) K TEXT I 'FLAGQ D PAUSE "RTN","XBHEDDH3",10,0) Q "RTN","XBHEDDH3",11,0) TXT ; "RTN","XBHEDDH3",12,0) ;;; INPUT EFFECT "RTN","XBHEDDH3",13,0) ;;;========================================================================== "RTN","XBHEDDH3",14,0) ;;; "RTN","XBHEDDH3",15,0) ;;; 1. '^' Exit back to Main Menu. "RTN","XBHEDDH3",16,0) ;;; "RTN","XBHEDDH3",17,0) ;;; 2. 'B' Back up to previous screen. "RTN","XBHEDDH3",18,0) ;;; "RTN","XBHEDDH3",19,0) ;;; 3. 'n' Typing a number here allows you to jump to that screen. "RTN","XBHEDDH3",20,0) ;;; In the lower right hand corner of the screen, you will "RTN","XBHEDDH3",21,0) ;;; see 2 numbers: TOP and CUR. TOP is the highest screen "RTN","XBHEDDH3",22,0) ;;; you have to. CUR is the current screen you "RTN","XBHEDDH3",23,0) ;;; are viewing. You can only jump between the first and TOP "RTN","XBHEDDH3",24,0) ;;; screen. As an example, if you selected the 'Field Global "RTN","XBHEDDH3",25,0) ;;; Location' option and then hit 6 times, TOP would "RTN","XBHEDDH3",26,0) ;;; be equal to 6 and CUR would be equal to 6. Now you can jump "RTN","XBHEDDH3",27,0) ;;; to any screen between 1 and 6. If you entered '2' and , "RTN","XBHEDDH3",28,0) ;;; you would jump to screen 2. TOP would still be equal to 6 but "RTN","XBHEDDH3",29,0) ;;; CUR would now be 2. If you then hit 'B' to back up 1 screen, "RTN","XBHEDDH3",30,0) ;;; TOP would be 6 and CUR would be 1. If you now wanted to return "RTN","XBHEDDH3",31,0) ;;; to TOP (screen 6), you would type a '6' and this page "RTN","XBHEDDH3",32,0) ;;; would now be displayed. TOP and CUR would both be equal "RTN","XBHEDDH3",33,0) ;;; to 6 again. "RTN","XBHEDDH3",34,0) ;;; "RTN","XBHEDDH3",35,0) ;;; 4. 'I' Allows you to zoom in on an individual field. It prompts you "RTN","XBHEDDH3",36,0) ;;; for a field and then gives you the Individual Field Summary "RTN","XBHEDDH3",37,0) ;;; for that field. When using 'I', you must start at the top "RTN","XBHEDDH3",38,0) ;;; of the multiple. For example, if you were looking at the "RTN","XBHEDDH3",39,0) ;;; Patient file and you had selected 'Admission Date' as the "RTN","XBHEDDH3",40,0) ;;; starting point for Field Global Location and you "RTN","XBHEDDH3",41,0) ;;; thru 2 screens, you would see the field Treating Specialty. "RTN","XBHEDDH3",42,0) ;;; To view the Individual Field Summary for this field you would "RTN","XBHEDDH3",43,0) ;;; have to first select Admission Date and then Treating Specialty. "RTN","XBHEDDH3",44,0) ;;; This is made easier by the design of the Field Global Location "RTN","XBHEDDH3",45,0) ;;; screens. Each layer of multiple fields is preceeded by "RTN","XBHEDDH3",46,0) ;;; dashes that indicated their level. You trace these dashes "RTN","XBHEDDH3",47,0) ;;; back to locate the starting point for each layer. You can "RTN","XBHEDDH3",48,0) ;;; also use the Trace a Field option. "RTN","XBHEDDH3",49,0) ;;;*** "RTN","XBHEDDH3",50,0) PAGE ; "RTN","XBHEDDH3",51,0) R !!?2," to continue, '^' to quit: ",XX:DTIME S:'$T XX="^" S:XX["^" FLAGQ=1 I FLAGQ Q "RTN","XBHEDDH3",52,0) W @IOF Q "RTN","XBHEDDH3",53,0) PAUSE ; "RTN","XBHEDDH3",54,0) I $Y to continue..",XX:DTIME "RTN","XBHEDDH3",56,0) Q "RTN","XBHEDDH4") 0^90^B4933763 "RTN","XBHEDDH4",1,0) XBHEDDH4 ;402,DJB,10/23/91,EDD - Help Text - Field Global Location cont. "RTN","XBHEDDH4",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDDH4",3,0) ;;David Bolduc - Togus, ME "RTN","XBHEDDH4",4,0) F I=1:1 S TEXT=$P($T(TXT+I),";;;",2) Q:TEXT="***" W !,TEXT I $Y>SIZE D PAGE Q:FLAGQ "RTN","XBHEDDH4",5,0) Q "RTN","XBHEDDH4",6,0) TXT ; "RTN","XBHEDDH4",7,0) ;;; "RTN","XBHEDDH4",8,0) ;;; 5. 'N' Allows you to do a look up by global node. At the 'Select NODE:' "RTN","XBHEDDH4",9,0) ;;; prompt type '?' to see all nodes, or enter node. If that "RTN","XBHEDDH4",10,0) ;;; node is a multiple you will be asked for subnode.You will then "RTN","XBHEDDH4",11,0) ;;; get a list of all fields that are contained by that node. "RTN","XBHEDDH4",12,0) ;;; You may do an 'Individual Field Summary' on any of them. "RTN","XBHEDDH4",13,0) ;;; Example: If you wanted to know what fields are contained "RTN","XBHEDDH4",14,0) ;;; in ^DPT(34,"DA",3,"T",0) you would enter '^DPT' at "RTN","XBHEDDH4",15,0) ;;; the 'Select FILE:' prompt, select option 7, enter "RTN","XBHEDDH4",16,0) ;;; 'N' for node, and then enter the following: "RTN","XBHEDDH4",17,0) ;;; Select NODE: 'DA' "RTN","XBHEDDH4",18,0) ;;; Select 'DA' SUBNODE: 'T' "RTN","XBHEDDH4",19,0) ;;; Select 'T' SUBNODE: '0' "RTN","XBHEDDH4",20,0) ;;; EDD will now display all the fields contained in "RTN","XBHEDDH4",21,0) ;;; the selected node and allow you to do an 'Individual "RTN","XBHEDDH4",22,0) ;;; Field Summary'. "RTN","XBHEDDH4",23,0) ;;;*** "RTN","XBHEDDH4",24,0) PAGE ; "RTN","XBHEDDH4",25,0) R !!?2," to continue, '^' to quit: ",XX:DTIME S:'$T XX="^" S:XX="^" FLAGQ=1 I FLAGQ Q "RTN","XBHEDDH4",26,0) W @IOF Q "RTN","XBHEDDM") 0^91^B5651587 "RTN","XBHEDDM",1,0) XBHEDDM ;402,DJB,10/23/91,EDD - Menu Driver "RTN","XBHEDDM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHEDDM",3,0) ;;David Bolduc - Togus ME "RTN","XBHEDDM",4,0) EN ;Entry Point "RTN","XBHEDDM",5,0) D HD "RTN","XBHEDDM",6,0) I FLAGP F I=1,8,2,9,3,10,4,11,5,12,6,13,7 S X=$T(OPT+I) Q:X="" W @$S(I<8:"!?7",1:"?41"),$S(I=5:"*",I=9:"*",I=12:"*",1:" "),$J(I,2)_") ",$P(X,";",3) "RTN","XBHEDDM",7,0) ;I FLAGP F I=1,6,11,2,7,12,3,8,13,4,9,5,10 S X=$T(OPT+I) Q:X="" W @$S(I<6:"!",I<11:"?29",1:"?58"),$S(I=5:"*",I=9:"*",I=12:"*",1:" "),$J(I,2)_") ",$P(X,";",3) ;3 Columns "RTN","XBHEDDM",8,0) E F I=1,8,2,9,3,10,4,11,5,12,6,13,7 S X=$T(OPT+I) Q:X="" W @$S(I<8:"!?7",1:"?41"),$J(I,2)_") ",$P(X,";",3) "RTN","XBHEDDM",9,0) ;E F I=1,6,11,2,7,12,3,8,13,4,9,5,10 S X=$T(OPT+I) Q:X="" W @$S(I<6:"!",I<11:"?29",1:"?58"),$J(I,2)_") ",$P(X,";",3) ;3 Columns "RTN","XBHEDDM",10,0) W ! "RTN","XBHEDDM",11,0) B R !?8,"Select OPTION: ",O:DTIME S:'$T O="^^" I "^"[O S FLAGM=1 G EX "RTN","XBHEDDM",12,0) I O="^^" S FLAGE=1 G EX "RTN","XBHEDDM",13,0) I O?1.N,O>0,O<14,$T(OPT+O)'="" G C "RTN","XBHEDDM",14,0) I O'?1.N D ALLCAPS F I=1:1 S X=$P($T(OPT+I),";",5) Q:X="" I $E(X,1,$L(O))=O W $E(X,$L(O)+1,80) S O=I G C "RTN","XBHEDDM",15,0) W *7,?30,"Enter Option number or name." G B "RTN","XBHEDDM",16,0) C S X=$T(OPT+O) D @$P(X,";",4) I FLAGG S FLAGG=0 G B ;FLAGG indicates no Groups or no Pointers. "RTN","XBHEDDM",17,0) EX K I,X,Y,ZHDR Q "RTN","XBHEDDM",18,0) ALLCAPS ; "RTN","XBHEDDM",19,0) F %=1:1:$L(O) S:$E(O,%)?1L O=$E(O,0,%-1)_$C($A(O,%)-32)_$E(O,%+1,999) "RTN","XBHEDDM",20,0) Q "RTN","XBHEDDM",21,0) HD ; "RTN","XBHEDDM",22,0) S ZHDR="M A I N M E N U" W !?(IOM-$L(ZHDR)\2),ZHDR W:FLAGP ?57,"[*=Opts not printable]" "RTN","XBHEDDM",23,0) W ! Q "RTN","XBHEDDM",24,0) OPT ;MENU OPTIONS "RTN","XBHEDDM",25,0) ;;Cross References;XREF^XBHEDD6;CROSS REFERENCES "RTN","XBHEDDM",26,0) ;;Pointers TO This File;PT^XBHEDD6;POINTERS "RTN","XBHEDDM",27,0) ;;Pointers FROM This File;PT^XBHEDD10;POINTERS FROM THIS FILE "RTN","XBHEDDM",28,0) ;;Groups;GRP^XBHEDD6;GROUPS "RTN","XBHEDDM",29,0) ;;Trace a Field;EN^XBHEDD8;TRACE A FIELD "RTN","XBHEDDM",30,0) ;;Individual Fld Summary;^XBHEDD3;INDIVIDUAL FIELD SUMMARY "RTN","XBHEDDM",31,0) ;;Field Global Location;EN^XBHEDD1;FIELD GLOBAL LOCATION "RTN","XBHEDDM",32,0) ;;Templates;EN^XBHEDD11;TEMPLATES "RTN","XBHEDDM",33,0) ;;File Description;DES^XBHEDD11;FILE DESCRIPTION "RTN","XBHEDDM",34,0) ;;Globals in ASCII Order;GL^XBHEDD10;LIST GLOBALS IN ASCII ORDER "RTN","XBHEDDM",35,0) ;;File Characteristics;CHAR^XBHEDD12;FILE CHARACTERISTICS "RTN","XBHEDDM",36,0) ;;Printing-On/Off;PRINTM^XBHEDD7;PRINTING - ON/OFF "RTN","XBHEDDM",37,0) ;;Help;^XBHEDDH1;HELP "RTN","XBHELP") 0^92^B395714 "RTN","XBHELP",1,0) XBHELP ; IHS/ADC/GTH - DISPLAY HELP TEXT FROM ROUTINE ; [ 02/07/97 3:02 PM ] "RTN","XBHELP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHELP",3,0) ; "RTN","XBHELP",4,0) ; Display text from the named routine, beginning at the "RTN","XBHELP",5,0) ; named label. The fourth semi-colon piece is displayed. "RTN","XBHELP",6,0) ; If the third semi-colon piece is "@", the indirection "RTN","XBHELP",7,0) ; of the fourth semi-colon piece is written. The display "RTN","XBHELP",8,0) ; ends if null or "###" is returned. "RTN","XBHELP",9,0) ; "RTN","XBHELP",10,0) ; E.g: "RTN","XBHELP",11,0) ; "RTN","XBHELP",12,0) ; D HELP^XBHELP("LABEL","ROUTINE",0) will print the text "RTN","XBHELP",13,0) ; after LABEL: "RTN","XBHELP",14,0) ; "RTN","XBHELP",15,0) ; ROUTINE ; "RTN","XBHELP",16,0) ; LABEL ; "RTN","XBHELP",17,0) ; ;;Please enter what I think you should enter. "RTN","XBHELP",18,0) ; ;;@;*7 "RTN","XBHELP",19,0) ; ;;@;! "RTN","XBHELP",20,0) ; ;;### "RTN","XBHELP",21,0) ; "RTN","XBHELP",22,0) HELP(L,R,T) ;PEP - Display text at label L, routine R, tab T spaces (default 4). "RTN","XBHELP",23,0) Q:$D(ZTQUEUED) "RTN","XBHELP",24,0) S:$G(T)'?1.N T=4 "RTN","XBHELP",25,0) NEW X "RTN","XBHELP",26,0) W ! "RTN","XBHELP",27,0) F %=1:1 S X=$T(@L+%^@R) Q:($P(X,";",3)="###")!(X="") D "RTN","XBHELP",28,0) . I $P(X,";",3)="@" W @($P(X,";",4)) Q "RTN","XBHELP",29,0) . W !?T,$P(X,";",3) "RTN","XBHELP",30,0) .Q "RTN","XBHELP",31,0) Q "RTN","XBHELP",32,0) ; "RTN","XBHFMAN") 0^93^B16278226 "RTN","XBHFMAN",1,0) XBHFMAN ; IHS/ADC/GTH - HELP FRAME MANUAL (1/2) ; [ 02/07/97 3:02 PM ] "RTN","XBHFMAN",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHFMAN",3,0) ; "RTN","XBHFMAN",4,0) ; Print a help frame manual for an IHS application, using "RTN","XBHFMAN",5,0) ; OPTION descriptions and HELP FRAME texts in the namespace "RTN","XBHFMAN",6,0) ; of the application selected from the PACKAGE file. "RTN","XBHFMAN",7,0) ; "RTN","XBHFMAN",8,0) ; Information for the title and preface pages, and for "RTN","XBHFMAN",9,0) ; indexed words, is expected to be in a routine named "RTN","XBHFMAN",10,0) ; HFMN. The title page lines are expected to "RTN","XBHFMAN",11,0) ; begin at line TITLE+1, and the preface page at PREFACE+1. "RTN","XBHFMAN",12,0) ; Any words to be indexed are expected to begin at line "RTN","XBHFMAN",13,0) ; INDEX+1. See routine XBHFMAN2 for an example. "RTN","XBHFMAN",14,0) ; "RTN","XBHFMAN",15,0) ; If entered from the top, user is asked for application. "RTN","XBHFMAN",16,0) ; Entry point EN() must have the namespace of the application "RTN","XBHFMAN",17,0) ; as the parameter. That allows programmers to create their "RTN","XBHFMAN",18,0) ; own option and call it, without forcing user to select the "RTN","XBHFMAN",19,0) ; applcation. "RTN","XBHFMAN",20,0) ; "RTN","XBHFMAN",21,0) D HOME^%ZIS,DT^DICRW "RTN","XBHFMAN",22,0) NEW DIR,XBSEL "RTN","XBHFMAN",23,0) G EN1 "RTN","XBHFMAN",24,0) ; "RTN","XBHFMAN",25,0) EN(XBSEL) ;PEP ----- From application options, with namespace of application. "RTN","XBHFMAN",26,0) ; "RTN","XBHFMAN",27,0) EN1 ; "RTN","XBHFMAN",28,0) S DIC=9.4,DIC(0)="AEM",DIC("S")="I ""AB""[$E($P(^(0),U,2))" "RTN","XBHFMAN",29,0) I $D(XBSEL) S X=XBSEL,DIC(0)="",D="C" D IX^DIC I 1 "RTN","XBHFMAN",30,0) E D ^DIC "RTN","XBHFMAN",31,0) I Y<1 W !,"^DIC( LOOKUP FAILED." Q "RTN","XBHFMAN",32,0) S XBSEL=+Y "RTN","XBHFMAN",33,0) DEV ; "RTN","XBHFMAN",34,0) S %ZIS="OPQ" "RTN","XBHFMAN",35,0) D ^%ZIS "RTN","XBHFMAN",36,0) I POP S IOP=$I D ^%ZIS G K "RTN","XBHFMAN",37,0) G:'$D(IO("Q")) START "RTN","XBHFMAN",38,0) KILL IO("Q") "RTN","XBHFMAN",39,0) I $D(IO("S"))!($E(IOST)'="P") W *7,!,"Please queue to system printers." D ^%ZISC G DEV "RTN","XBHFMAN",40,0) S ZTRTN="START^XBHFMAN",ZTDESC="Help Frame Manual for "_$P(^DIC(9.4,XBSEL,0),U),ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL,ZTSAVE("XBSEL")="" "RTN","XBHFMAN",41,0) D ^%ZTLOAD "RTN","XBHFMAN",42,0) G:'$D(ZTSK) DEV "RTN","XBHFMAN",43,0) K ; "RTN","XBHFMAN",44,0) KILL XB,ZTSK "RTN","XBHFMAN",45,0) D ^%ZISC "RTN","XBHFMAN",46,0) D END^XBHFMAN1 "RTN","XBHFMAN",47,0) Q "RTN","XBHFMAN",48,0) ; "RTN","XBHFMAN",49,0) START ;EP ----- From TaskMan. "RTN","XBHFMAN",50,0) ; "RTN","XBHFMAN",51,0) I '$D(ZTQUEUED),'$D(IO("S")) U IO(0) D WAIT^DICD U IO "RTN","XBHFMAN",52,0) ; "RTN","XBHFMAN",53,0) NEW DIWL,DIWR,DIWF,DIRUT "RTN","XBHFMAN",54,0) NEW XBBM,XBCHAP,XBCONT,XBSAVX,XBTM,XBTITL,XBPG,XBHDR,XBHDRE,XBHDRO,XBDASH,XBSTRIP,XBNOHDR,XBIENI,XBLEVEL,XBNAME,XBNS "RTN","XBHFMAN",55,0) ; "RTN","XBHFMAN",56,0) KILL ^TMP("XBHFMAN",$J),^UTILITY($J) "RTN","XBHFMAN",57,0) ; "RTN","XBHFMAN",58,0) ; S X=$O(^DIC(9.4,XBSEL,22,"B","0.5",0)) "RTN","XBHFMAN",59,0) ; I X S %=0 F S %=$O(^DIC(9.4,XBSEL,22,X,"P",%)) Q:'% S Y=^(%,0) I $L(Y) S ^TMP("XBHFMAN-I",$J,Y)="" "RTN","XBHFMAN",60,0) ; "RTN","XBHFMAN",61,0) ; ----- Set namespace and read indexed words into ^TMP("XBHFMAN-I",$J. "RTN","XBHFMAN",62,0) S XBNS=$P(^DIC(9.4,XBSEL,0),U,2) "RTN","XBHFMAN",63,0) F X=1:1 S Y=$P($T(@"INDX"+X^@(XBNS_"HFMN")),";",3) Q:'$L(Y) S ^TMP("XBHFMAN-I",$J,Y)="" "RTN","XBHFMAN",64,0) ; "RTN","XBHFMAN",65,0) S DIWL=10,DIWR=74,DIWF="W" "RTN","XBHFMAN",66,0) S XBBM=IOSL-5,XBTM=6,XBTITL=$P(^DIC(9.4,XBSEL,0),U)_" HELP FRAME MANUAL",XBPG=0,XBHDR="Index",(XBHDRE,XBHDRO)="",XBDASH="",$P(XBDASH,"-",81)="",XBDASH=$E(XBDASH,DIWL,DIWR) "RTN","XBHFMAN",67,0) S XBSTRIP=^DD("FUNC",$O(^DD("FUNC","B","STRIPBLANKS",0)),1) "RTN","XBHFMAN",68,0) S (XBCHAP,XBLEVEL)=1,(XBCONT,XBHDR,XBPG,XBNOHDR)=0 "RTN","XBHFMAN",69,0) ; "RTN","XBHFMAN",70,0) ; ----- Set primary menu as chapter 1. "RTN","XBHFMAN",71,0) D SETTMP($O(^DIC(19,"B",XBNS_"MENU",0)),"1") "RTN","XBHFMAN",72,0) ; "RTN","XBHFMAN",73,0) S XBNAME=XBNS "RTN","XBHFMAN",74,0) F S XBNAME=$O(^DIC(19,"B",XBNAME)) Q:$E(XBNAME,1,$L(XBNS))'=XBNS I '$D(^DIC(19,"AD",$O(^DIC(19,"B",XBNAME,0)))) S ^TMP("XBHFMAN-M",$J,XBNAME)="" "RTN","XBHFMAN",75,0) KILL ^TMP("XBHFMAN-M",$J,XBNS_"MENU") "RTN","XBHFMAN",76,0) D MENU($O(^DIC(19,"B",XBNS_"MENU",0))) "RTN","XBHFMAN",77,0) ; "RTN","XBHFMAN",78,0) S XBCHAP=1,XBNAME="" "RTN","XBHFMAN",79,0) F S XBNAME=$O(^TMP("XBHFMAN-M",$J,XBNAME)) Q:XBNAME="" S XBCHAP=+$P(XBCHAP,".")+1,XBLEVEL=1 D SETTMP($O(^DIC(19,"B",XBNAME,0)),XBCHAP),MENU($O(^DIC(19,"B",XBNAME,0))) "RTN","XBHFMAN",80,0) ; "RTN","XBHFMAN",81,0) U IO "RTN","XBHFMAN",82,0) D ^XBHFMAN1 "RTN","XBHFMAN",83,0) Q "RTN","XBHFMAN",84,0) ; "RTN","XBHFMAN",85,0) ; "RTN","XBHFMAN",86,0) MENU(I) ; ----- Assign chapter number to OPTIONs. Recurse if OPTION is a menu. "RTN","XBHFMAN",87,0) Q:'$G(I) "RTN","XBHFMAN",88,0) NEW X "RTN","XBHFMAN",89,0) S X=0,XBLEVEL=XBLEVEL+1 "RTN","XBHFMAN",90,0) F S X=$O(^DIC(19,I,10,X)) Q:'X S $P(XBCHAP,".",XBLEVEL)=$P(XBCHAP,".",XBLEVEL)+1,Y=+^(X,0) D SETTMP(Y,XBCHAP) I $$DATA(Y,0,4)="M" D MENU(Y) S $P(XBCHAP,".",XBLEVEL)=0,XBLEVEL=XBLEVEL-1 "RTN","XBHFMAN",91,0) Q "RTN","XBHFMAN",92,0) ; "RTN","XBHFMAN",93,0) DATA(I,N,P) ; "RTN","XBHFMAN",94,0) Q $P(^DIC(19,I,N),U,P) "RTN","XBHFMAN",95,0) ; "RTN","XBHFMAN",96,0) ; "RTN","XBHFMAN",97,0) ; "RTN","XBHFMAN",98,0) RTRN ;EP ----- If interactive, ask usr to press RETURN. "RTN","XBHFMAN",99,0) I IOST["C-",'$D(IO("S")),$$DIR^XBDIR("E","Press RETURN To Continue or ""^"" to exit","","","","",1) "RTN","XBHFMAN",100,0) Q "RTN","XBHFMAN",101,0) ; "RTN","XBHFMAN",102,0) SETTMP(I,N) ; ----- Set option IEN and chapter designation into ^TMP. "RTN","XBHFMAN",103,0) NEW X,Y "RTN","XBHFMAN",104,0) I '$D(ZTQUEUED),'$D(IO("S")) U IO(0) W "." U IO "RTN","XBHFMAN",105,0) F %=1:1 I '$P(N,".",%) S N=$P(N,".",1,%-1) Q "RTN","XBHFMAN",106,0) S ^(0)=$G(^TMP("XBHFMAN",$J,0))+1 "RTN","XBHFMAN",107,0) S ^TMP("XBHFMAN",$J,^TMP("XBHFMAN",$J,0))=I_"^"_N "RTN","XBHFMAN",108,0) Q "RTN","XBHFMAN",109,0) ; "RTN","XBHFMAN1") 0^94^B21257543 "RTN","XBHFMAN1",1,0) XBHFMAN1 ; IHS/ADC/GTH - HELP FRAME MANUAL (2/2) ; [ 02/07/97 3:02 PM ] "RTN","XBHFMAN1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHFMAN1",3,0) ; "RTN","XBHFMAN1",4,0) ; ----- Print Title and Preface page. "RTN","XBHFMAN1",5,0) ; "RTN","XBHFMAN1",6,0) ; "RTN","XBHFMAN1",7,0) S X=XBNS_"HFMN" "RTN","XBHFMAN1",8,0) X ^%ZOSF("TEST") "RTN","XBHFMAN1",9,0) E G MAIN "RTN","XBHFMAN1",10,0) S XBNOHDR=1 "RTN","XBHFMAN1",11,0) NEW A,B "RTN","XBHFMAN1",12,0) F A="TITLE","PREFACE" Q:$D(DIRUT) D ^DIWW,TOF F B=1:1 S X=$T(@A+B^@(XBNS_"UMAN")) Q:$L($P(X,";",1))>1 D PR($P(X,";",3)) Q:$D(DIRUT) "RTN","XBHFMAN1",13,0) ; "RTN","XBHFMAN1",14,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",15,0) D ^DIWW "RTN","XBHFMAN1",16,0) ; "RTN","XBHFMAN1",17,0) MAIN ; ----- $ORDER thru the list of OPTIONS, and print them. "RTN","XBHFMAN1",18,0) S (XBNAME,XBNOHDR)=0 "RTN","XBHFMAN1",19,0) F S XBNAME=$O(^TMP("XBHFMAN",$J,XBNAME)) Q:'XBNAME D MAKEHDRS,TOF Q:$D(DIRUT) D HDR(XBNAME),DESC(+^TMP("XBHFMAN",$J,XBNAME)),HF($P($G(^DIC(19,+^TMP("XBHFMAN",$J,XBNAME),0)),U,7)),^DIWW "RTN","XBHFMAN1",20,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",21,0) ; "RTN","XBHFMAN1",22,0) INDEX ; ----- Print the index. "RTN","XBHFMAN1",23,0) S XBHDR="Index" "RTN","XBHFMAN1",24,0) D TOF "RTN","XBHFMAN1",25,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",26,0) W !!! "RTN","XBHFMAN1",27,0) S X="|NOWRAP||SETTAB(""C"")||TAB|INDEX" "RTN","XBHFMAN1",28,0) D ^DIWP,^DIWW "RTN","XBHFMAN1",29,0) W !!! "RTN","XBHFMAN1",30,0) D CONT("INDEX^^"_XBPG) "RTN","XBHFMAN1",31,0) S (XB,XBCONT)="",$P(XBCONT,".",81)="" "RTN","XBHFMAN1",32,0) F S XB=$O(^TMP("XBHFMAN-INDEX",$J,XB)) Q:XB="" S X="" D Q:$D(DIRUT) "RTN","XBHFMAN1",33,0) .F XBX=0:0 S XBX=$O(^TMP("XBHFMAN-INDEX",$J,XB,XBX)) S X=X_XBX_"," I '$O(^(XBX)) D Q "RTN","XBHFMAN1",34,0) ..S X=XB_"..."_$E(XBCONT,1,DIWR-DIWL-$L(XB)-3-$L(X))_$E(X,1,$L(X)-1) "RTN","XBHFMAN1",35,0) ..S XBSAVX=X "RTN","XBHFMAN1",36,0) ..F S X=$E(XBSAVX,1,DIWR-DIWL),XBSAVX=$E(XBSAVX,DIWR-DIWL+1,$L(XBSAVX)) Q:'$L(X) D TOF:$Y>XBBM Q:$D(DIRUT) D ^DIWP "RTN","XBHFMAN1",37,0) ..Q "RTN","XBHFMAN1",38,0) .Q "RTN","XBHFMAN1",39,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",40,0) D ^DIWW,RTRN^XBHFMAN "RTN","XBHFMAN1",41,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",42,0) ; "RTN","XBHFMAN1",43,0) CONTENTS ; ----- Print the table of Contents. "RTN","XBHFMAN1",44,0) S XBNOHDR=1 "RTN","XBHFMAN1",45,0) W @IOF,!!!!! "RTN","XBHFMAN1",46,0) S X="|SETTAB(""C"")||TAB|CONTENTS" "RTN","XBHFMAN1",47,0) D ^DIWP,^DIWW "RTN","XBHFMAN1",48,0) W !! "RTN","XBHFMAN1",49,0) S XB=0 "RTN","XBHFMAN1",50,0) F S XB=$O(^TMP("XBHFMAN-CONTENTS",$J,XB)) Q:'+XB S X=^(XB),X=$P(X,U)_" "_$P(X,U,2)_$E(XBCONT,1,DIWR-DIWL-$L(X)+1)_$P(X,U,3) D TOF:$Y>XBBM Q:$D(DIRUT) D ^DIWP "RTN","XBHFMAN1",51,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",52,0) D ^DIWW,RTRN^XBHFMAN "RTN","XBHFMAN1",53,0) I $D(DIRUT) G HATOUT "RTN","XBHFMAN1",54,0) END ;EP - Paginate, close, kill, quit. "RTN","XBHFMAN1",55,0) W @IOF "RTN","XBHFMAN1",56,0) HATOUT ; "RTN","XBHFMAN1",57,0) D ^%ZISC "RTN","XBHFMAN1",58,0) KILL ^TMP("XBHFMAN",$J),XB,XBBM,XBCHAP,XBCONT,XBODD,XBHDR,XBIEN,XBPARA,XBPG,XBROOT,XBTITL,XBTM,XBX,XBY,DIC,DIWF,DIWL,DIWR "RTN","XBHFMAN1",59,0) Q "RTN","XBHFMAN1",60,0) ; "RTN","XBHFMAN1",61,0) PR(X) ;EP - Process one line of text. "RTN","XBHFMAN1",62,0) NEW A,B,I,N,Y "RTN","XBHFMAN1",63,0) I X="|TOP|" D TOF Q "RTN","XBHFMAN1",64,0) D INDX(X),^DIWP,TOF:$Y>XBBM "RTN","XBHFMAN1",65,0) Q "RTN","XBHFMAN1",66,0) ; "RTN","XBHFMAN1",67,0) INDX(X) ; ----- Parse/capitalize one line of text. Check for indexed words. "RTN","XBHFMAN1",68,0) Q:'$D(XBPG) "RTN","XBHFMAN1",69,0) NEW Y,Z "RTN","XBHFMAN1",70,0) S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") "RTN","XBHFMAN1",71,0) S X=$TR(X,"~`!@#$%^&*()_-+=|\{[}]:;""""'<,>.?/"," ") "RTN","XBHFMAN1",72,0) X XBSTRIP "RTN","XBHFMAN1",73,0) F S %=$F(X," ") Q:'% S X=$E(X,1,%-2)_$E(X,%,$L(X)) "RTN","XBHFMAN1",74,0) F %=1:1 S Y=$P(X," ",%) Q:Y="" I $D(^TMP("XBHFMAN-I",$J,Y)) S ^TMP("XBHFMAN-INDEX",$J,Y,XBPG)="" "RTN","XBHFMAN1",75,0) Q "RTN","XBHFMAN1",76,0) ; "RTN","XBHFMAN1",77,0) HDR(XB) ; ----- Print a chapter heading. "RTN","XBHFMAN1",78,0) S %=$P(^TMP("XBHFMAN",$J,XB),U,2),XB=%_U_$P($G(^DIC(19,+^TMP("XBHFMAN",$J,XB),0)),U,2) "RTN","XBHFMAN1",79,0) F X="|SETTAB(""C"")||TAB|Chapter "_$P(XB,U),"|SETTAB(""C"")||TAB|"_$P(XB,U,2) D ^DIWP "RTN","XBHFMAN1",80,0) W !! "RTN","XBHFMAN1",81,0) D CONT($P(XB,U)_U_$P(XB,U,2)_U_XBPG) "RTN","XBHFMAN1",82,0) Q "RTN","XBHFMAN1",83,0) ; "RTN","XBHFMAN1",84,0) TOF ;EP ----- Move to bottom of page, print footer, paginate, print header. "RTN","XBHFMAN1",85,0) I XBNOHDR D RTRN^XBHFMAN Q:$D(DIRUT) W @IOF Q "RTN","XBHFMAN1",86,0) F Q:$Y>XBBM W ! "RTN","XBHFMAN1",87,0) I XBPG W !?(DIWL-1),XBDASH,!,?$S(XBODD:DIWR-$L(XBTITL),1:DIWL-1),XBTITL "RTN","XBHFMAN1",88,0) D RTRN^XBHFMAN "RTN","XBHFMAN1",89,0) I $D(DIRUT) Q "RTN","XBHFMAN1",90,0) W @IOF "RTN","XBHFMAN1",91,0) S XBPG=XBPG+1,XBODD=XBPG#2 "RTN","XBHFMAN1",92,0) F Q:$Y=(XBTM-2) W ! "RTN","XBHFMAN1",93,0) W ?$S(XBODD:DIWR-$L("Page "_XBPG),1:DIWL-1),"Page ",XBPG "RTN","XBHFMAN1",94,0) I '(XBHDR="Index") W !?DIWL-1,$S(XBODD:XBHDRO,1:XBHDRE) "RTN","XBHFMAN1",95,0) W !?(DIWL-1),XBDASH,!! "RTN","XBHFMAN1",96,0) Q "RTN","XBHFMAN1",97,0) ; "RTN","XBHFMAN1",98,0) MAKEHDRS ; ----- Make headers for odd and even pages. "RTN","XBHFMAN1",99,0) S (XBHDRE,XBHDRO)=$P($G(^DIC(19,+^TMP("XBHFMAN",$J,XBNAME),0)),U,2) "RTN","XBHFMAN1",100,0) S XBCHAP=$P(^TMP("XBHFMAN",$J,XBNAME),U,2) "RTN","XBHFMAN1",101,0) F %=1:1 I '$P(XBCHAP,".",%) S XBCHAP=$P(XBCHAP,".",1,%-1) Q "RTN","XBHFMAN1",102,0) S XBHDRO=XBHDRO_$J("",DIWR-DIWL-$L(XBHDRO)-$L("Chapter "_XBCHAP)+1)_"Chapter "_XBCHAP "RTN","XBHFMAN1",103,0) S XBHDRE="Chapter "_XBCHAP_$J("",DIWR-DIWL-$L(XBHDRE)-$L("Chapter "_XBCHAP)+1)_XBHDRE "RTN","XBHFMAN1",104,0) Q "RTN","XBHFMAN1",105,0) ; "RTN","XBHFMAN1",106,0) CONT(X) ; ----- Add chapter number, title, and page number to list. "RTN","XBHFMAN1",107,0) S XBCONT=XBCONT+1,^TMP("XBHFMAN-CONTENTS",$J,XBCONT)=X "RTN","XBHFMAN1",108,0) Q "RTN","XBHFMAN1",109,0) ; "RTN","XBHFMAN1",110,0) DESC(A) ; ----- Print descriptions of the OPTIONs as the first of the chapter. "RTN","XBHFMAN1",111,0) NEW B,I,N,Y "RTN","XBHFMAN1",112,0) I '$D(^DIC(19,A,1)) D PR("") Q "RTN","XBHFMAN1",113,0) S B=0 "RTN","XBHFMAN1",114,0) F S B=$O(^DIC(19,A,1,B)) Q:'B D PR(^(B,0)) Q:$D(DIRUT) "RTN","XBHFMAN1",115,0) Q "RTN","XBHFMAN1",116,0) ; "RTN","XBHFMAN1",117,0) HF(A) ; ----- Print the HELP FRAME text. "RTN","XBHFMAN1",118,0) I 'A D PR("") Q "RTN","XBHFMAN1",119,0) I '$D(^DIC(9.2,A,1)) D PR("") Q "RTN","XBHFMAN1",120,0) NEW B,I,N,Y "RTN","XBHFMAN1",121,0) S B=0 "RTN","XBHFMAN1",122,0) F S B=$O(^DIC(9.2,A,1,B)) Q:'B D PR(^(B,0)) Q:$D(DIRUT) "RTN","XBHFMAN1",123,0) ; ----- Print any tied HELP FRAMEs. "RTN","XBHFMAN1",124,0) I $O(^DIC(9.2,A,2,0)) S B=0 F S B=$O(^DIC(9.2,A,2,B)) Q:'B D HF($P($G(^(B,0)),U,2)) Q:$D(DIRUT) "RTN","XBHFMAN1",125,0) Q "RTN","XBHFMAN1",126,0) ; "RTN","XBHFMAN2") 0^95^B8591753 "RTN","XBHFMAN2",1,0) XBHFMAN2 ; IHS/ADC/GTH - HELP FRAME MANUAL INFO EXAMPLE ; [ 02/07/97 3:02 PM ] "RTN","XBHFMAN2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBHFMAN2",3,0) ; "RTN","XBHFMAN2",4,0) TITLE ;EP "RTN","XBHFMAN2",5,0) ;; "RTN","XBHFMAN2",6,0) ;; ---------------------------------------------------------- "RTN","XBHFMAN2",7,0) ;; "RTN","XBHFMAN2",8,0) ;; DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT ** "RTN","XBHFMAN2",9,0) ;; "RTN","XBHFMAN2",10,0) ;; GO DUCKS! "RTN","XBHFMAN2",11,0) ;; "RTN","XBHFMAN2",12,0) ;; "RTN","XBHFMAN2",13,0) ;; INDIAN HEALTH SERVICE "RTN","XBHFMAN2",14,0) ;; "RTN","XBHFMAN2",15,0) ;; "RTN","XBHFMAN2",16,0) ;; "RTN","XBHFMAN2",17,0) ;; "RTN","XBHFMAN2",18,0) ;; "RTN","XBHFMAN2",19,0) ;; RESOURCE AND PATIENT MANAGEMENT SYSTEM "RTN","XBHFMAN2",20,0) ;; "RTN","XBHFMAN2",21,0) ;; "RTN","XBHFMAN2",22,0) ;; RPMS ADP SYSTEMS HELP FRAME'S MANUAL "RTN","XBHFMAN2",23,0) ;; "RTN","XBHFMAN2",24,0) ;; "RTN","XBHFMAN2",25,0) ;; "RTN","XBHFMAN2",26,0) ;; "RTN","XBHFMAN2",27,0) ;; ********************************** "RTN","XBHFMAN2",28,0) ;; * CHS DENIED/DEFERRED SERVICES * "RTN","XBHFMAN2",29,0) ;; ********************************** "RTN","XBHFMAN2",30,0) ;; "RTN","XBHFMAN2",31,0) ;; "RTN","XBHFMAN2",32,0) ;; "RTN","XBHFMAN2",33,0) ;; "RTN","XBHFMAN2",34,0) ;; VERSION 2.1 "RTN","XBHFMAN2",35,0) ;; "RTN","XBHFMAN2",36,0) ;; "RTN","XBHFMAN2",37,0) ;; DECEMBER 1994 "RTN","XBHFMAN2",38,0) ;; "RTN","XBHFMAN2",39,0) ;; Office of Information Resources Management "RTN","XBHFMAN2",40,0) ;; Indian Health Service "RTN","XBHFMAN2",41,0) ;; Albuquerque, New Mexico "RTN","XBHFMAN2",42,0) ;; "RTN","XBHFMAN2",43,0) ;; DRAFT ** DRAFT ** DRAFT ** DRAFT ** DRAFT ** "RTN","XBHFMAN2",44,0) ;; "RTN","XBHFMAN2",45,0) ;; ---------------------------------------------------------- "RTN","XBHFMAN2",46,0) PREFACE ;EP "RTN","XBHFMAN2",47,0) ;; "RTN","XBHFMAN2",48,0) ;; "RTN","XBHFMAN2",49,0) ;; "RTN","XBHFMAN2",50,0) ;; "RTN","XBHFMAN2",51,0) ;; Preface "RTN","XBHFMAN2",52,0) ;; "RTN","XBHFMAN2",53,0) ;; "RTN","XBHFMAN2",54,0) ;;This Help Frame's Manual describes the procedures necessary to enter "RTN","XBHFMAN2",55,0) ;;CHS Denials and Deferred Services information into the local "RTN","XBHFMAN2",56,0) ;;facility's RPMS computer. "RTN","XBHFMAN2",57,0) ;; "RTN","XBHFMAN2",58,0) ;;Please address corrections and/or suggested changes to the "RTN","XBHFMAN2",59,0) ;;software and associated documentations to: "RTN","XBHFMAN2",60,0) ;; "RTN","XBHFMAN2",61,0) ;; Division of Systems Development / OIRM "RTN","XBHFMAN2",62,0) ;; IHS Headquarters West "RTN","XBHFMAN2",63,0) ;; 5300 Homestead Road NE "RTN","XBHFMAN2",64,0) ;; Albuquerque NM 87110 "RTN","XBHFMAN2",65,0) ;; "RTN","XBHFMAN2",66,0) ;; 505-837-4189 "RTN","XBHFMAN2",67,0) ;; "RTN","XBHFMAN2",68,0) INDX ;EP "RTN","XBHFMAN2",69,0) ;;ABBREVIATION "RTN","XBHFMAN2",70,0) ;;ACCRUED "RTN","XBHFMAN2",71,0) ;;ADDRESS "RTN","XBHFMAN2",72,0) ;;ALTERNATE "RTN","XBHFMAN2",73,0) ;;AMOUNT "RTN","XBHFMAN2",74,0) ;;APPEAL "RTN","XBHFMAN2",75,0) ;;AREA "RTN","XBHFMAN2",76,0) ;;CANCEL "RTN","XBHFMAN2",77,0) ;;CAPTIONED "RTN","XBHFMAN2",78,0) ;;CATEGORY "RTN","XBHFMAN2",79,0) ;;CATEGORIES "RTN","XBHFMAN2",80,0) ;;CHARGES "RTN","XBHFMAN2",81,0) ;;CHART "RTN","XBHFMAN2",82,0) ;;CLOSING "RTN","XBHFMAN2",83,0) ;;CONTROL "RTN","XBHFMAN2",84,0) ;;DIRECTOR "RTN","XBHFMAN2",85,0) ;;DOCUMENT "RTN","XBHFMAN2",86,0) ;;FACILITY "RTN","XBHFMAN2",87,0) ;;ISSUE "RTN","XBHFMAN2",88,0) ;;LETTER "RTN","XBHFMAN2",89,0) ;;LETTERHEAD "RTN","XBHFMAN2",90,0) ;;MEDICAL "RTN","XBHFMAN2",91,0) ;;NEW "RTN","XBHFMAN2",92,0) ;;NUMBER "RTN","XBHFMAN2",93,0) ;;PATIENT "RTN","XBHFMAN2",94,0) ;;PRIMARY "RTN","XBHFMAN2",95,0) ;;PRIORITY "RTN","XBHFMAN2",96,0) ;;PRIORITIES "RTN","XBHFMAN2",97,0) ;;PROVIDER "RTN","XBHFMAN2",98,0) ;;REPORT "RTN","XBHFMAN2",99,0) ;;RESOURCE "RTN","XBHFMAN2",100,0) ;;SERVICE "RTN","XBHFMAN2",101,0) ;;SIGNATURE "RTN","XBHFMAN2",102,0) ;;STREET "RTN","XBHFMAN2",103,0) ;;SUPPLEMENTAL "RTN","XBHFMAN2",104,0) ;;TABLE "RTN","XBHFMAN2",105,0) ;;UNIT "RTN","XBINIT") 0^96^B15577763 "RTN","XBINIT",1,0) XBINIT ; IHS/ADC/GTH - XB/ZIB V 3.0 INITS ; [ 02/07/97 3:02 PM ] "RTN","XBINIT",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBINIT",3,0) ; "RTN","XBINIT",4,0) K DIF,DIFQ,DIFQR,DIFQN,DIK,DDF,DDT,DTO,D0,DLAYGO,DIC,DIDUZ,DIR,DA,DIFROM,DFR,DTN,DIX,DZ,DIRUT,DTOUT,DUOUT "RTN","XBINIT",5,0) S DIOVRD=1,U="^",DIFQ=0,DIFROM="3.0" W !,"This version (#3.0) of 'XBINIT' was created on 07-FEB-1997" "RTN","XBINIT",6,0) W !?9,"(at GEORGE'S PC, by VA FileMan V.21.0)",! "RTN","XBINIT",7,0) I $D(^DD("VERSION")),^("VERSION")'<21 G GO "RTN","XBINIT",8,0) ;W !,"FIRST, I'LL FRESHEN UP YOUR VA FILEMAN...." D N^DINIT "RTN","XBINIT",9,0) I ^DD("VERSION")<21 W !,"but I need version 21 of the VA FileMan!" G Q "RTN","XBINIT",10,0) GO ; "RTN","XBINIT",11,0) W !,"I HAVE TO RUN AN ENVIRONMENT CHECK ROUTINE." D PKG,^XBPRE Q:'$D(DIFQ) D NOW^%DTC S DIFROM("PRE")=% "RTN","XBINIT",12,0) EN ; ENTER HERE TO BYPASS THE PRE-INIT PROGRAM "RTN","XBINIT",13,0) S DIFQ=0 K DIRUT,DTOUT,DUOUT "RTN","XBINIT",14,0) F DIFRIR=1:1:1 S DIFRRTN="^XBINIT"_$E("5",DIFRIR) D @DIFRRTN "RTN","XBINIT",15,0) W:0 !,"I AM GOING TO SET UP THE FOLLOWING FILE:" F I=1:2:0 S DIF(I)=^UTILITY("DIF",$J,I) D 1 G Q:DIFQ!$D(DIRUT) K DIF(I) "RTN","XBINIT",16,0) S DIFROM="3.0" D PKG:'$D(DIFROM(0)),^XBINIT1 G Q:'$D(DIFQ) S DIK(0)="AB" "RTN","XBINIT",17,0) F DIF=1:2:0 S %=^UTILITY("DIF",$J,DIF),DIK=$P(%,";",5),N=$P(%,";",3),D=$P(%,";",4)_U_N D D K DIFQ(N) "RTN","XBINIT",18,0) K DIFQR D ^XBINIT2,^XBINIT3 "RTN","XBINIT",19,0) L S DUZ=DIDUZ W:0 !,"NO"_$P("TE THAT FILE",U,DSEC)_" SECURITY-CODE PROTECTION HAS BEEN MADE" "RTN","XBINIT",20,0) D ^XBPOST,NOW^%DTC S DIFROM("INIT")=% "RTN","XBINIT",21,0) I DIFROM F DIF=1:2:0 S %=^UTILITY("DIF",$J,DIF),N=+$P(%,";",3) I N,$P(%,";",8)="y" S ^DD(N,0,"VR")=DIFROM "RTN","XBINIT",22,0) I DIFROM(0)>0 F %="PRE","INI","INIT" S:$D(DIFROM(%)) $P(^DIC(9.4,DIFROM(0),%),U,2)=DIFROM(%) "RTN","XBINIT",23,0) I $G(DIFQN) S $P(^(0),U,3,4)=$P(DIFQN,U,2)_U_($P(^DIC(0),U,4)+DIFQN) K DIFQN "RTN","XBINIT",24,0) I DIFROM,$D(^%ZTSK) S X="XBINIS" X ^%ZOSF("TEST") D:$T PAC^XBINIS($T(IXF),.DIFROM) "RTN","XBINIT",25,0) S:DIFROM(0)>0 ^DIC(9.4,DIFROM(0),"VERSION")=DIFROM G Q^DIFROM0 "RTN","XBINIT",26,0) D S:$D(^DIC(+N,0))[0 ^(0)=D S X=$D(@(DIK_"0)")),^(0)=D_U_$S(X#2:$P(^(0),U,3,9),1:U) "RTN","XBINIT",27,0) S DIFQR=DIFQR(+N) I ^DD("VERSION")>17.5,$D(^DD(+N,0,"DIK"))#2 S X=^("DIK"),Y=+N,DMAX=^DD("ROU") D EN^DIKZ "RTN","XBINIT",28,0) I DIFQR D IXALL^DIK:$O(@(DIK_"0)")) W "." "RTN","XBINIT",29,0) Q "RTN","XBINIT",30,0) R G REP^XBINIT2 "RTN","XBINIT",31,0) ; "RTN","XBINIT",32,0) 1 S N=+$P(DIF(I),";",3),DIF=$P(DIF(I),";",4),S=$P(DIF(I),";",5) "RTN","XBINIT",33,0) W !!?3,N,?13,DIF,$P(" (Partial Definition)",U,$P(DIF(I),";",6)),$P(" (including data)",U,$P(DIF(I),";",13)="y") S Z=$S($D(^DIC(N,0))#2:^(0),1:"") "RTN","XBINIT",34,0) I Z="" S DIFQ(N)=1,DIFQN=$G(DIFQN)+1_U_N G S "RTN","XBINIT",35,0) I $L($P(Z,DIF)) W $C(7),!,"*BUT YOU ALREADY HAVE '",$P(Z,U),"' AS FILE #",N,"!" D R Q:DIFQ G S:$D(DIFKEP(N)),1 "RTN","XBINIT",36,0) S DIFQ(N)=$P(DIF(I),";",7)'="n" "RTN","XBINIT",37,0) I $L(Z) W $C(7),!,"Note: You already have the '",$P(Z,U),"' File." S DIFQ(0)=1 "RTN","XBINIT",38,0) S %=$E(^UTILITY("DIF",$J,I+1),4,245) I %]"" X % S DIFQ(N)=$T W:'$T !,"Screen on this Data Dictionary did not pass--DD will not be installed!" G S "RTN","XBINIT",39,0) I $L(Z),$P(DIF(I),";",10)="y" S DIR("A")="Shall I write over the existing Data Definition",DIR("??")="^D DD^DIFROMH1",DIR("B")="YES",DIR(0)="Y" D ^DIR S DIFQ(N)=Y "RTN","XBINIT",40,0) S S DIFQR(N)=0 Q:$P(DIF(I),";",13)'="y"!$D(DIRUT) "RTN","XBINIT",41,0) I $P(DIF(I),";",15)="y",$O(@(S_"0)"))>0 S DIF=$P(DIF(I),";",14)="o",DIR("A")="Want my data "_$P("merged with^to overwrite",U,DIF+1)_" yours",DIR("??")="^D DTA^DIFROMH1",DIR(0)="Y" D ^DIR S DIFQR(N)=$S('Y:Y,1:Y+DIF) Q "RTN","XBINIT",42,0) S %=$P(DIF(I),";",14)="o" W !,$C(7),"I will ",$P("MERGE^OVERWRITE",U,%+1)," your data with mine." S DIFQR(N)=%+1 "RTN","XBINIT",43,0) Q "RTN","XBINIT",44,0) Q W $C(7),!!,"NO UPDATING HAS OCCURRED!" G Q^DIFROM0 "RTN","XBINIT",45,0) ; "RTN","XBINIT",46,0) PKG S X=$P($T(IXF),";",3),DIC="^DIC(9.4,",DIC(0)="",DIC("S")="I $P(^(0),U,2)="""_$P(X,U,2)_"""",X=$P(X,U) D ^DIC S DIFROM(0)=+Y K DIC "RTN","XBINIT",47,0) Q "RTN","XBINIT",48,0) ; "RTN","XBINIT",49,0) IXF ;;IHS/VA UTILITIES^XB;0 "RTN","XBINTEG") 0^97^B14367304 "RTN","XBINTEG",1,0) XBINTEG ; ROUTINE INTEGRITY CHECK "RTN","XBINTEG",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBINTEG",3,0) ; "RTN","XBINTEG",4,0) ; This routine calls ^%RSEL to select a set of routines and generates "RTN","XBINTEG",5,0) ; an integrity checking routine for the selected routines. The user "RTN","XBINTEG",6,0) ; is asked to enter the name of the generated routine. "RTN","XBINTEG",7,0) ; "RTN","XBINTEG",8,0) START ; "RTN","XBINTEG",9,0) NEW BYTE,COUNT,QUIT,RTDATE,RTN,RTNAME,VERSION "RTN","XBINTEG",10,0) K ^UTILITY($J),^UTILITY("XBINTEG",$J) "RTN","XBINTEG",11,0) D ^XBKVAR "RTN","XBINTEG",12,0) ;D ^%RSEL K QUIT "RTN","XBINTEG",13,0) X ^%ZOSF("RSEL") "RTN","XBINTEG",14,0) I $O(^UTILITY($J,""))="" D EOJ Q "RTN","XBINTEG",15,0) S DIR(0)="F^5:8^K:X'?1U.U X",DIR("A")="Enter name of routine to be generated: ",DIR("?")="Example: APCDINTG" D ^DIR K DIR "RTN","XBINTEG",16,0) I $D(DIRUT) D EOJ Q "RTN","XBINTEG",17,0) S RTNAME=Y "RTN","XBINTEG",18,0) D CHECKRTN "RTN","XBINTEG",19,0) I 'Y D EOJ Q "RTN","XBINTEG",20,0) S DIR(0)="F^1:5^K:'(X?1.2N!(X?1.2N1"".""1.2N)) X",DIR("A")="Enter version number",DIR("?")="Must be n or n.n where the length of n is 1-2" D ^DIR K DIR "RTN","XBINTEG",21,0) I $D(DIRUT) D EOJ Q "RTN","XBINTEG",22,0) S VERSION=" ;;"_X "RTN","XBINTEG",23,0) S DIR(0)="FO^2:30",DIR("A")="Enter package name" D ^DIR K DIR "RTN","XBINTEG",24,0) I $D(DTOUT)!($D(DUOUT)) D EOJ Q "RTN","XBINTEG",25,0) S VERSION=VERSION_";"_X "RTN","XBINTEG",26,0) S DIR(0)="D",DIR("A")="Enter date",DIR("B")="TODAY" D ^DIR K DIR "RTN","XBINTEG",27,0) I $D(DIRUT) D EOJ Q "RTN","XBINTEG",28,0) D DD^%DT "RTN","XBINTEG",29,0) S RTDATE=Y "RTN","XBINTEG",30,0) S VERSION=VERSION_";;"_Y "RTN","XBINTEG",31,0) F %=1:1:11 S X=$P($T(@("LINE"_%)),";;",2,99),@("XBINTEG("_%_")=X") "RTN","XBINTEG",32,0) F %=1:1:3 S X=$P($T(@("CODE"_%)),";;",2,99),@("XBINTEG(""CODE"_%_""")=X") "RTN","XBINTEG",33,0) K %,X,Y "RTN","XBINTEG",34,0) X XBINTEG(1) "RTN","XBINTEG",35,0) Q "RTN","XBINTEG",36,0) ; "RTN","XBINTEG",37,0) CHECKRTN ; "RTN","XBINTEG",38,0) S Y=1 "RTN","XBINTEG",39,0) Q:'$D(^DD("OS"))#2 "RTN","XBINTEG",40,0) Q:'$D(^DD("OS",^DD("OS"),18))#2 "RTN","XBINTEG",41,0) S X=RTNAME X ^(18) "RTN","XBINTEG",42,0) E Q "RTN","XBINTEG",43,0) S DIR(0)="YO",DIR("A")="Routine already exists. Want to recreate it",DIR("B")="NO" D ^DIR K DIR "RTN","XBINTEG",44,0) I $D(DIRUT) S Y=0 Q "RTN","XBINTEG",45,0) Q "RTN","XBINTEG",46,0) ; "RTN","XBINTEG",47,0) EOJ ; "RTN","XBINTEG",48,0) K %,X,Y,XBINTEG,^UTILITY($J) "RTN","XBINTEG",49,0) K DTOUT,DUOUT,DIRUT,DIROUT "RTN","XBINTEG",50,0) Q "RTN","XBINTEG",51,0) ; "RTN","XBINTEG",52,0) ; The only good thing I can say about the following is that it works. "RTN","XBINTEG",53,0) LINE1 ;;X XBINTEG(2),XBINTEG(6),XBINTEG(11) "RTN","XBINTEG",54,0) LINE2 ;;S RTN="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBINTEG(4),XBINTEG(3),XBINTEG(5) "RTN","XBINTEG",55,0) LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBINTEG(4) "RTN","XBINTEG",56,0) LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y) "RTN","XBINTEG",57,0) LINE5 ;;S ^UTILITY("XBINTEG",$J,RTN)=BYTE_"^"_COUNT "RTN","XBINTEG",58,0) LINE6 ;;ZR S X=RTNAME_" ;INTEGRITY CHECKER;"_RTDATE ZI X ZI VERSION ZI " ;" ZI "START ;" ZI " NEW BYTE,COUNT,RTN" ZI " K ^UTILITY($J)" X XBINTEG(7),XBINTEG(8),XBINTEG(9),XBINTEG(10) ZS @RTNAME "RTN","XBINTEG",59,0) LINE7 ;;F I=1:1:3 S V="CODE"_I S Z=XBINTEG(V) Q:Z="" ZI Z "RTN","XBINTEG",60,0) LINE8 ;;ZI " Q" ZI " ;" ZI "LINE1 ;;X XBINTEG(2),XBINTEG(6)" F I=2:1:4 S Z="LINE"_I_" ;;"_XBINTEG(I) ZI Z "RTN","XBINTEG",61,0) LINE9 ;;ZI "LINE5 ;;S B=$P(^(RTN),""^"",1),C=$P(^(RTN),""^"",2) I B'=BYTE!(C'=COUNT) W "" has been modified""" ZI "LINE6 ;;K XBINTEG,B,C,I,J,R,X,Y" ZI " ;" ZI "LIST ;" "RTN","XBINTEG",62,0) LINE10 ;;S RTN="" F S RTN=$O(^UTILITY("XBINTEG",$J,RTN)) Q:RTN="" S Z=^(RTN),Z=" ;;"_RTN_"^"_Z ZI Z "RTN","XBINTEG",63,0) LINE11 ;;K %,XBINTEG,DTOUT,DUOUT,DIRUT,DIROUT,I,J,V,X,Y,Z,^UTILITY($J),^UTILITY("XBINTEG",$J) "RTN","XBINTEG",64,0) CODE1 ;; F I=1:1 S X=$T(LIST+I) Q:X="" S X=$P(X,";;",2),R=$P(X,"^",1),B=$P(X,"^",2),C=$P(X,"^",3),^UTILITY($J,R)=B_"^"_C "RTN","XBINTEG",65,0) CODE2 ;; F I=1:1:6 S X=$P($T(@("LINE"_I)),";;",2,99),@("XBINTEG("_I_")=X") "RTN","XBINTEG",66,0) CODE3 ;; X XBINTEG(1) "RTN","XBIV") 0^98^B88787 "RTN","XBIV",1,0) XBIV(FILE,FIELD,EXTVAL) ;DG/OHPRD; "RTN","XBIV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBIV",3,0) ;Get Internal Field Value Given External Field Value "RTN","XBIV",4,0) ; "RTN","XBIV",5,0) I '$D(^DD(FILE,FIELD)) Q "" "RTN","XBIV",6,0) Q "HELLO" "RTN","XBKD") 0^99^B46417857 "RTN","XBKD",1,0) XBKD ; IHS/ADC/GTH - KILLS DICs and GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","XBKD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKD",3,0) ; "RTN","XBKD",4,0) ; This routine deletes FileMan dictionaries, and optionally "RTN","XBKD",5,0) ; their globals, TEMPLATES and AUTHORITIES, by a range of "RTN","XBKD",6,0) ; dictionary numbers, or if called from another routine, by "RTN","XBKD",7,0) ; a predefined set of dictionaries. The assumptions made "RTN","XBKD",8,0) ; by this routine are that ^UTILITY, ^DIC, and ^DD are not "RTN","XBKD",9,0) ; UCI TRANSLATED. Any other globals may be translated, but "RTN","XBKD",10,0) ; the KILLs will take place in the current UCI only. "RTN","XBKD",11,0) ; "RTN","XBKD",12,0) ; This routine can be called from another routine by setting "RTN","XBKD",13,0) ; the variables XBKDLO, XBKDHI, XBKDDEL, XBKDTMP and then "RTN","XBKD",14,0) ; D EN1^XBKD, or by creating the array ^UTILITY("XBDSET",$J) "RTN","XBKD",15,0) ; and then D EN2^XBKD. "RTN","XBKD",16,0) ; "RTN","XBKD",17,0) ; The array ^UTILITY("XBDSET",$J) is subscripted by the file "RTN","XBKD",18,0) ; numbers and has a value of 'v1^v2' where v1 applies to the "RTN","XBKD",19,0) ; data global, and v2 applies to the TEMPLATES attached to "RTN","XBKD",20,0) ; the file. The allowable values of v1 and v2 are 'S' for "RTN","XBKD",21,0) ; save, 'D' for delete, 'A' for ask. "RTN","XBKD",22,0) ; "RTN","XBKD",23,0) ; This routine will execute ^XBRESID to delete any residual "RTN","XBKD",24,0) ; entries in ^DD if dictionaries are deleted by a range of "RTN","XBKD",25,0) ; numbers. "RTN","XBKD",26,0) ; "RTN","XBKD",27,0) BEGIN ; "RTN","XBKD",28,0) D ^XBKVAR "RTN","XBKD",29,0) W !!,"This program deletes FileMan dictionaries, and optionally their" "RTN","XBKD",30,0) W !,"globals, TEMPLATES and AUTHORITIES, by a range of dictionary numbers.",!! "RTN","XBKD",31,0) ; "RTN","XBKD",32,0) LO ; "RTN","XBKD",33,0) R !,"Enter first dictionary number to be deleted: ",XBKDLO:$G(DTIME,999) "RTN","XBKD",34,0) G:XBKDLO'=+XBKDLO EOJ "RTN","XBKD",35,0) HI ; "RTN","XBKD",36,0) W !,"Enter last dictionary number to be deleted: ",XBKDLO,"//" "RTN","XBKD",37,0) R XBKDHI:$G(DTIME,999) "RTN","XBKD",38,0) S:XBKDHI="" XBKDHI=XBKDLO "RTN","XBKD",39,0) G:XBKDHI'=+XBKDHI!(XBKDHI",XBKDDEL,"<---" G EOJ "RTN","XBKD",57,0) S:'$D(XBKDTMP) XBKDTMP="A" "RTN","XBKD",58,0) S:XBKDTMP="K" XBKDTMP="S" ;***** UPWARD COMPATABLE ***** "RTN","XBKD",59,0) I "DAS"'[XBKDTMP W !!,"Invalid XBKDTMP --->",XBKDTMP,"<---" G EOJ "RTN","XBKD",60,0) S XBDSLO=XBKDLO,XBDSHI=XBKDHI "RTN","XBKD",61,0) D EN1^XBDSET "RTN","XBKD",62,0) S XBKDFILE=(XBKDLO-.00000001) "RTN","XBKD",63,0) F XBKDL=0:0 S XBKDFILE=$O(^DD(XBKDFILE)) Q:XBKDFILE>XBKDHI!(XBKDFILE'=+XBKDFILE) I '$D(^UTILITY("XBDSET",$J,XBKDFILE)) D CHECKDD "RTN","XBKD",64,0) I '$D(^UTILITY("XBDSET",$J)) W !!,"No dictionaries were selected." G EOJ "RTN","XBKD",65,0) S XBKDFILE=0 "RTN","XBKD",66,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" S ^(XBKDFILE)=XBKDDEL_U_XBKDTMP "RTN","XBKD",67,0) G EN2 "RTN","XBKD",68,0) ; "RTN","XBKD",69,0) CHECKDD ; CHECK ^DD FOR DANGLING ENTRIES "RTN","XBKD",70,0) Q:$D(^DD(XBKDFILE,0,"UP")) "RTN","XBKD",71,0) W "." "RTN","XBKD",72,0) S ^UTILITY("XBDSET",$J,XBKDFILE)="" "RTN","XBKD",73,0) Q "RTN","XBKD",74,0) ; "RTN","XBKD",75,0) EN2 ;PEP - Array ^UTILITY("XBDSET",$J) must exist when entering here. "RTN","XBKD",76,0) I '$D(^UTILITY("XBDSET",$J)) W !!,"^UTILITY(""XBDSET"",$J) is not defined!" G EOJ "RTN","XBKD",77,0) I $O(^UTILITY("XBDSET",$J,""))<2 W !!,"*** Don't mess with files less than 2!! ***",*7 KILL XBKDLO,XBKDHI G EOJ "RTN","XBKD",78,0) D ^XBKVAR "RTN","XBKD",79,0) S (XBKDFILE,XBKDFLG)=0 "RTN","XBKD",80,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" S XBKDX=^(XBKDFILE) D CHKVAL "RTN","XBKD",81,0) I XBKDFLG W !!,"One or more invalid GLOBAL^TEMPLATE disposition values encountered!" G EOJ "RTN","XBKD",82,0) KILL XBKDDEL,XBKDERR,XBKDFLG,XBKDTMP,XBKDX "RTN","XBKD",83,0) D ^XBKD2 "RTN","XBKD",84,0) S XBKDFLG=0 "RTN","XBKD",85,0) D CONFIRM "RTN","XBKD",86,0) G:XBKDFLG EOJ "RTN","XBKD",87,0) KILL XBKDASK,XBKDFLG,XBKDX,XBKDY "RTN","XBKD",88,0) D ^XBKD3 "RTN","XBKD",89,0) W !!,"Resetting ^DIC(0) " "RTN","XBKD",90,0) S (XBKDC,XBKDFILE)=0,XBKDLAST="" "RTN","XBKD",91,0) F XBKDL=0:0 S XBKDFILE=$O(^DIC(XBKDFILE)) Q:XBKDFILE'=+XBKDFILE S XBKDC=XBKDC+1,XBKDLAST=XBKDFILE "RTN","XBKD",92,0) S $P(^DIC(0),"^",3)=XBKDLAST,$P(^DIC(0),"^",4)=XBKDC "RTN","XBKD",93,0) G EOJ "RTN","XBKD",94,0) ; "RTN","XBKD",95,0) CHKVAL ; CHECK G^T VALUES "RTN","XBKD",96,0) S XBKDERR=0 "RTN","XBKD",97,0) I XBKDX'?1U1"^"1U S XBKDERR=1 "RTN","XBKD",98,0) ;***** "K" TO "S" ADDED TO FOLLOWING LINE FOR UPWARD COMPABILITY ***** "RTN","XBKD",99,0) I 'XBKDERR S XBKDDEL=$P(XBKDX,U,1),XBKDTMP=$P(XBKDX,U,2) S:XBKDDEL="K" XBKDDEL="S" S:XBKDTMP="K" XBKDTMP="S" S:"ADS"'[XBKDDEL XBKDERR=1 S:"ADS"'[XBKDTMP XBKDERR=1 "RTN","XBKD",100,0) I XBKDERR S XBKDFLG=1 W !,"Invalid value ",XBKDFILE,"=",XBKDX "RTN","XBKD",101,0) Q "RTN","XBKD",102,0) ; "RTN","XBKD",103,0) CONFIRM ; SHOW AND ASK "RTN","XBKD",104,0) I '$D(^UTILITY("XBDSET",$J)) S XBKDFLG=1 Q "RTN","XBKD",105,0) W !!," NUMBER",?14,"NAME",?45,"G^T",?50,"DATA GLOBAL",! "RTN","XBKD",106,0) S (XBKDFILE,XBKDASK)=0 "RTN","XBKD",107,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" S XBKDX=^(XBKDFILE) S:$E(XBKDX,1,3)["A" XBKDASK=1 D LIST "RTN","XBKD",108,0) W !!,"The above list of dictionaries will be deleted in UCI ",XBKDUCI,". Data" "RTN","XBKD",109,0) W !,"globals, TEMPLATES and AUTHORITIES, will be kept, deleted, or asked depending" "RTN","XBKD",110,0) W !,"on flag. '?' in G position indicates invalid data global." "RTN","XBKD",111,0) W !!,"[S]ave, [D]elete, [A]sk. Globals to be deleted are also marked" "RTN","XBKD",112,0) W !," by '*' in position 1." "RTN","XBKD",113,0) I $D(ADIFROM("IHS")) S XBKDX="" "RTN","XBKD",114,0) E R !!,"[C]ontinue, [S]top, [M]odify? C//",XBKDX:$G(DTIME,999) S:XBKDX="^" XBKDX="S" "RTN","XBKD",115,0) I $E(XBKDX)="S" S XBKDFLG=1 Q "RTN","XBKD",116,0) I $E(XBKDX)="M" D MODIFY G CONFIRM "RTN","XBKD",117,0) Q:'XBKDASK "RTN","XBKD",118,0) W ! "RTN","XBKD",119,0) S XBKDFILE="" "RTN","XBKD",120,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" S XBKDX=^(XBKDFILE) D:$E(XBKDX,1,3)["A" ASK "RTN","XBKD",121,0) G CONFIRM "RTN","XBKD",122,0) ; "RTN","XBKD",123,0) LIST ; LIST FILE INFO "RTN","XBKD",124,0) W !,$S($P(XBKDX,U,1)="D":"*",1:" "),XBKDFILE,?14,$E($P(^DIC(XBKDFILE,0),U,1),1,30),?45,$E(XBKDX,1,3),?50,$S($P(XBKDX,U,3)="":"",1:$P(XBKDX,U,3)) "RTN","XBKD",125,0) Q "RTN","XBKD",126,0) ; "RTN","XBKD",127,0) MODIFY ; "RTN","XBKD",128,0) R !!,"Which file? ",XBKDFILE:$G(DTIME,999) "RTN","XBKD",129,0) Q:XBKDFILE'=+XBKDFILE "RTN","XBKD",130,0) I '$D(^UTILITY("XBDSET",$J,XBKDFILE)) W *7 G MODIFY "RTN","XBKD",131,0) R !," Delete file from list of files to be deleted (Y/N) N//",XBKDY:$G(DTIME,999) "RTN","XBKD",132,0) I $E(XBKDY)="Y" KILL ^UTILITY("XBDSET",$J,XBKDFILE) Q "RTN","XBKD",133,0) S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,2)="A",$P(^(XBKDFILE),U,1)=$S($P(^(XBKDFILE),U,1)="?":"?",1:"A"),XBKDX=^(XBKDFILE) "RTN","XBKD",134,0) W ! "RTN","XBKD",135,0) D ASK "RTN","XBKD",136,0) Q "RTN","XBKD",137,0) ; "RTN","XBKD",138,0) ASK ; "RTN","XBKD",139,0) G:$P(XBKDX,U,1)'="A" ASK2 "RTN","XBKD",140,0) W !,"Do you want to delete the data global for ",XBKDFILE," ",$P(^DIC(XBKDFILE,0),U,1)," (Y/N) N//" "RTN","XBKD",141,0) R XBKDY:$G(DTIME,999) "RTN","XBKD",142,0) I $E(XBKDY)="Y" S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="D" "RTN","XBKD",143,0) E S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="S" "RTN","XBKD",144,0) ASK2 ; "RTN","XBKD",145,0) Q:$P(XBKDX,U,2)'="A" "RTN","XBKD",146,0) W !,"Do you want to delete the TEMPLATES and AUTHORITIES for ",XBKDFILE," ",$P(^DIC(XBKDFILE,0),U,1)," (Y/N) N//" "RTN","XBKD",147,0) R XBKDY:$G(DTIME,999) "RTN","XBKD",148,0) I $E(XBKDY)="Y" S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,2)="D" "RTN","XBKD",149,0) E S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,2)="S" "RTN","XBKD",150,0) Q "RTN","XBKD",151,0) ; "RTN","XBKD",152,0) EOJ ; "RTN","XBKD",153,0) I $D(XBKDLO),$D(XBKDHI),XBKDLO=+XBKDLO,XBKDHI=+XBKDHI,XBKDHI>XBKDLO S XBRLO=XBKDLO,XBRHI=XBKDHI D EN1^XBRESID "RTN","XBKD",154,0) I $D(^UTILITY("XBKD",$J)) W !,"Restoring saved ^DD nodes. " S FROM="^UTILITY(""XBKD"",$J,",TO="^DD(" D ^XBGXFR "RTN","XBKD",155,0) KILL ^UTILITY("XBDSET",$J),^UTILITY("XBKD",$J) "RTN","XBKD",156,0) KILL %,DA,DIK,Y "RTN","XBKD",157,0) KILL XBKDASK,XBKDC,XBKDDEL,XBKDERR,XBKDFILE,XBKDFLD,XBKDFLG,XBKDG,XBKDHI,XBKDL,XBKDLAST,XBKDLO,XBKDNDIC,XBKDTMP,XBKDUCI,XBKDX,XBKDY "RTN","XBKD",158,0) KILL FROM,TO "RTN","XBKD",159,0) W !!,"DONE",!! "RTN","XBKD",160,0) Q "RTN","XBKD",161,0) ; "RTN","XBKD1") 0^100^B2434754 "RTN","XBKD1",1,0) XBKD1 ; IHS/ADC/GTH - XBKD SUBROUTINES ; [ 02/07/97 3:02 PM ] "RTN","XBKD1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKD1",3,0) ; "RTN","XBKD1",4,0) ; Part of XBKD "RTN","XBKD1",5,0) ; "RTN","XBKD1",6,0) BX ; "RTN","XBKD1",7,0) KILL A "RTN","XBKD1",8,0) S (I,C)="" "RTN","XBKD1",9,0) F J=1:1 S I=$O(^DIC("B",I)) Q:I="" I $D(^(I,N)) S C=C+1,A(C)=I "RTN","XBKD1",10,0) I 'C S C=$O(^DD(N,"NM","")) I C]"" S A=C,C=1,A(C)=A "RTN","XBKD1",11,0) Q "RTN","XBKD1",12,0) ; "RTN","XBKD1",13,0) NCK ; "RTN","XBKD1",14,0) G NCKER:'$D(^DIC(N,0)),NCKER:+$P(^(0),"^",2)'=N "RTN","XBKD1",15,0) I $D(^DIC(N,0,"GL")) S G=^("GL") G NCKOK:G?1"^DIC(".E "RTN","XBKD1",16,0) I @("$D("_G_"0))"),+$P(^(0),"^",2)=N G NCKOK "RTN","XBKD1",17,0) NCKER ; "RTN","XBKD1",18,0) S E=1 "RTN","XBKD1",19,0) Q "RTN","XBKD1",20,0) ; "RTN","XBKD1",21,0) NCKOK ; "RTN","XBKD1",22,0) S E=0 "RTN","XBKD1",23,0) Q "RTN","XBKD1",24,0) ; "RTN","XBKD1",25,0) FGLB ; "RTN","XBKD1",26,0) G FGOK:'$D(^DD(N,.01,1)) "RTN","XBKD1",27,0) S I=0 "RTN","XBKD1",28,0) F J=1:1 S I=$O(^DD(N,.01,1,I)) Q:I="" I $D(^(I,1)) S X=^(1) D SB1 G FGOK:G]"" "RTN","XBKD1",29,0) S G="" "RTN","XBKD1",30,0) FGOK ; "RTN","XBKD1",31,0) Q "RTN","XBKD1",32,0) ; "RTN","XBKD1",33,0) END ; "RTN","XBKD1",34,0) Q "RTN","XBKD1",35,0) ; "RTN","XBKD1",36,0) TEMPLP ; "RTN","XBKD1",37,0) F TEMP="^DIE(","^DIBT(","^DIPT(" D TEMP "RTN","XBKD1",38,0) Q "RTN","XBKD1",39,0) ; "RTN","XBKD1",40,0) TEMP ; "RTN","XBKD1",41,0) S XBKDB="F"_XBKDFILE,XBKDA="" "RTN","XBKD1",42,0) TEMP1 ; "RTN","XBKD1",43,0) S @("XBKDA=$O("_TEMP_"XBKDB,XBKDA))") "RTN","XBKD1",44,0) G TEMPE:XBKDA="" "RTN","XBKD1",45,0) S DA="" "RTN","XBKD1",46,0) TEMP2 ; "RTN","XBKD1",47,0) S @("DA=$O("_TEMP_"XBKDB,XBKDA,DA))") "RTN","XBKD1",48,0) G TEMP1:DA="" "RTN","XBKD1",49,0) S DIE=TEMP,DR=".01" ;D ^DIE "RTN","XBKD1",50,0) W !,DIE,?8,DA,?12,XBKDB,?24,XBKDA "RTN","XBKD1",51,0) G TEMP2 "RTN","XBKD1",52,0) ; "RTN","XBKD1",53,0) TEMPE ; "RTN","XBKD1",54,0) KILL XBKDA,XBKDB "RTN","XBKD1",55,0) Q "RTN","XBKD1",56,0) ; "RTN","XBKD1",57,0) SB1 ; "RTN","XBKD1",58,0) S G="" "RTN","XBKD1",59,0) I X'?1"S ^"1UP.U1"(".N1",""B""".E "RTN","XBKD1",60,0) S G=$E($P(X,"""B""",1),3,999) "RTN","XBKD1",61,0) Q "RTN","XBKD1",62,0) ; "RTN","XBKD2") 0^101^B27090069 "RTN","XBKD2",1,0) XBKD2 ; IHS/ADC/GTH - CHECK DICTIONARY NAMES AND DATA GLOBALS ; [ 10/29/2002 7:42 AM ] "RTN","XBKD2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKD2",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBKD2",4,0) ; "RTN","XBKD2",5,0) ; Part of XBKD "RTN","XBKD2",6,0) ; "RTN","XBKD2",7,0) START ; "RTN","XBKD2",8,0) S (Y,XBKDUCI)="" "RTN","XBKD2",9,0) X:$D(^%ZOSF("UCI"))#2 ^("UCI") "RTN","XBKD2",10,0) ;I Y'="" S XBKDUCI="["""_$P(Y,",",1)_""""_$S($P(Y,",",2)'="":","""_$P(Y,",",2)_"""",1:"")_"]" ;IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBKD2",11,0) I Y'="" S XBKDUCI="["""_$P(Y,",",1)_""""_$S($P(Y,",",2)'=""&($$VERSION^%ZOSV(1)'["Cache"):","""_$P(Y,",",2)_"""",1:"")_"]" ;IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBKD2",12,0) W !!,"Now checking dictionary names and data globals." "RTN","XBKD2",13,0) S XBKDFILE="" "RTN","XBKD2",14,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" W !?5,"Checking ",XBKDFILE D XBKDNC "RTN","XBKD2",15,0) KILL XBKDANS,XBKDC,XBKDG,XBKDGG,XBKDGNM,XBKDGNR,XBKDNDD,XBKDNDIC,XBKDNTBL,XBKDX,XBKDY "RTN","XBKD2",16,0) Q "RTN","XBKD2",17,0) ; "RTN","XBKD2",18,0) XBKDNC ; "RTN","XBKD2",19,0) I '$D(^DIC(XBKDFILE)),'$D(^DD(XBKDFILE)) W !,*7,?10,"Not in ^DIC or ^DD. Removing from ^UTILITY(""XBDSET"")." KILL ^UTILITY("XBDSET",$J,XBKDFILE) Q "RTN","XBKD2",20,0) S XBKDNDIC=$G(^DIC(XBKDFILE,0)),XBKDNDIC=$P(XBKDNDIC,U,1) "RTN","XBKD2",21,0) D GCHK "RTN","XBKD2",22,0) I XBKDG["%" W !,*7,?10,"Data global for ",XBKDFILE," is a % global. Removing from ^UTILITY(""XBDSET"")." KILL ^UTILITY("XBDSET",$J,XBKDFILE) Q "RTN","XBKD2",23,0) S XBKDNDD=$O(^DD(XBKDFILE,0,"NM","")) "RTN","XBKD2",24,0) I XBKDNDIC=XBKDNDD,XBKDNDIC=XBKDGNM,XBKDFILE=XBKDGNR Q "RTN","XBKD2",25,0) I XBKDNDIC]"",XBKDNDIC=XBKDNDD G GNMCHK "RTN","XBKD2",26,0) I XBKDNDIC]"",XBKDNDD="" W !?10,"No name in ^DD. Using name in ^DIC." S XBKDNDD=XBKDNDIC,^DD(XBKDFILE,0,"NM",XBKDNDD)="" G GNMCHK "RTN","XBKD2",27,0) I XBKDNDIC="",XBKDNDD]"" W !?10,"No name in ^DIC. Using name in ^DD." S $P(^DIC(XBKDFILE,0),U,1)=XBKDNDD,XBKDNDIC=XBKDNDD G GNMCHK "RTN","XBKD2",28,0) I XBKDNDIC="",XBKDNDD="",XBKDGNM]"",XBKDFILE=XBKDGNR W !?10,"No name in ^DIC or ^DD. Using name in data global." S $P(^DIC(XBKDFILE,0),U,1)=XBKDGNM,^DD(XBKDFILE,0,"NM",XBKDGNM)="",(XBKDNDIC,XBKDNDD)=XBKDGNM Q "RTN","XBKD2",29,0) I XBKDNDIC]"",XBKDNDD]"",XBKDNDIC'=XBKDNDD W !?10,"Name in ^DIC and ^DD differ. Using name in ^DIC." KILL ^DD(XBKDFILE,0,"NM") S XBKDNDD=XBKDNDIC,^DD(XBKDFILE,0,"NM",XBKDNDD)="" G GNMCHK "RTN","XBKD2",30,0) W !?10,"Unable to deduce name. Searching DIC(""B"")." "RTN","XBKD2",31,0) D DICB "RTN","XBKD2",32,0) G:XBKDNDIC]"" GNMCHK "RTN","XBKD2",33,0) W !?10,"Unable to deduce name. Setting to 'NO NAME'" "RTN","XBKD2",34,0) S (XBKDNDIC,XBKDNDD)="NO NAME",$P(^DIC(XBKDFILE,0),U,1)=XBKDNDIC,^DD(XBKDFILE,0,"NM",XBKDNDD)="" "RTN","XBKD2",35,0) G GNMCHK "RTN","XBKD2",36,0) ; "RTN","XBKD2",37,0) GCHK ; CHECK DATA GLOBAL "RTN","XBKD2",38,0) S (XBKDGNM,XBKDGNR)="" "RTN","XBKD2",39,0) S XBKDGG=0,XBKDG=$G(^DIC(XBKDFILE,0,"GL")) "RTN","XBKD2",40,0) S:XBKDG?1"^"1U.UN1"(".UNP XBKDGG=1 "RTN","XBKD2",41,0) I XBKDG="" W !?10,"File ",XBKDFILE," has no data global specified in ^DIC." S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="?" Q "RTN","XBKD2",42,0) I 'XBKDGG W !?10,"File ",XBKDFILE," data global=",XBKDG," is invalid." S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="?" Q "RTN","XBKD2",43,0) S XBKDG="^"_XBKDUCI_$E(XBKDG,2,99),$P(^UTILITY("XBDSET",$J,XBKDFILE),U,3)=$E(XBKDG,2,99) "RTN","XBKD2",44,0) S XBKDX=$E(XBKDG,1,$L(XBKDG)-1)_$S($E(XBKDG,$L(XBKDG))=",":")",1:""),XBKDX=$D(@XBKDX) "RTN","XBKD2",45,0) I 'XBKDX W !?10,"Data global ",XBKDG," does not exist!" S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="?" Q "RTN","XBKD2",46,0) S XBKDY=$L(XBKDG),XBKDY=$E(XBKDG,1,XBKDY-1)_$E(")",$E(XBKDG,XBKDY)=","),XBKDY=$S(XBKDY[")":$E(XBKDY,1,$L(XBKDY)-1)_",0)",1:XBKDY_"(0)") "RTN","XBKD2",47,0) S XBKDX=$D(@XBKDY) "RTN","XBKD2",48,0) I XBKDX S XBKDGNM=@XBKDY,XBKDGNR=+$P(XBKDGNM,U,2),XBKDGNM=$P(XBKDGNM,U,1) S:'XBKDGNR XBKDGNR="" Q "RTN","XBKD2",49,0) I 'XBKDX W !?10,"File ",XBKDFILE," data global has entries but no 0th node.",!?12,"If global not being deleted, piece 3 and 4 must be reset!",!?12,"Creating 0th node." S @XBKDY="CREATED BY XBKD"_U_XBKDFILE "RTN","XBKD2",50,0) Q "RTN","XBKD2",51,0) ; "RTN","XBKD2",52,0) DICB ; CHECK DIC("B" "RTN","XBKD2",53,0) KILL XBKDNTBL "RTN","XBKD2",54,0) S (XBKDX,XBKDC)=0 "RTN","XBKD2",55,0) F XBKDL=0:0 S XBKDX=$O(^DIC("B",XBKDX)) Q:XBKDX="" I $D(^(XBKDX,XBKDFILE)) S XBKDC=XBKDC+1,XBKDNTBL(XBKDC)=XBKDX "RTN","XBKD2",56,0) Q:'XBKDC "RTN","XBKD2",57,0) I XBKDC=1 S XBKDANS=1 D NAMESET KILL XBKDNTBL Q "RTN","XBKD2",58,0) W !?12,"Multiple entries were found in ^DIC(""B""). Selecting first name",!?12," found. All other names will be removed." "RTN","XBKD2",59,0) W ! "RTN","XBKD2",60,0) S XBKDANS=1 "RTN","XBKD2",61,0) D NAMESET "RTN","XBKD2",62,0) KILL XBKDNTBL(XBKDANS) "RTN","XBKD2",63,0) W ! "RTN","XBKD2",64,0) S XBKDX="" "RTN","XBKD2",65,0) F XBKDL=0:0 S XBKDX=$O(XBKDNTBL(XBKDX)) Q:XBKDX="" W !?12,"Deleting ^DIC(""B"",""",XBKDNTBL(XBKDX),""",",XBKDFILE,")" KILL ^DIC("B",XBKDNTBL(XBKDX),XBKDFILE) "RTN","XBKD2",66,0) W ! "RTN","XBKD2",67,0) KILL XBKDNTBL "RTN","XBKD2",68,0) Q "RTN","XBKD2",69,0) NAMESET ; "RTN","XBKD2",70,0) W !?12,"Setting names to '",XBKDNTBL(XBKDANS),"'" "RTN","XBKD2",71,0) KILL ^DD(XBKDFILE,0,"NM") "RTN","XBKD2",72,0) S (XBKDNDIC,XBKDNDD)=XBKDNTBL(XBKDANS),$P(^DIC(XBKDFILE,0),U,1)=XBKDNDIC,^DD(XBKDFILE,0,"NM",XBKDNDD)="" "RTN","XBKD2",73,0) Q "RTN","XBKD2",74,0) ; "RTN","XBKD2",75,0) GNMCHK ; CHECK DATA GLOBAL NAME AGAINST ^DIC "RTN","XBKD2",76,0) Q:'XBKDGG "RTN","XBKD2",77,0) I XBKDGNM]""!(XBKDGNR),XBKDFILE'=XBKDGNR!(XBKDNDIC'=XBKDGNM) D GNMCHK2 "RTN","XBKD2",78,0) S XBKDX=XBKDG_"0)" "RTN","XBKD2",79,0) I XBKDGNM="",XBKDGNR="",$D(@XBKDX)#2 S $P(@XBKDX,U,1)=XBKDNDIC "RTN","XBKD2",80,0) Q "RTN","XBKD2",81,0) ; "RTN","XBKD2",82,0) GNMCHK2 ; DATA GLOBAL MISMATCH "RTN","XBKD2",83,0) W !?10,"Data global name and/or number do not match ^DIC. Data global will",!?12,"not be deleted!! " "RTN","XBKD2",84,0) S $P(^UTILITY("XBDSET",$J,XBKDFILE),U,1)="S",XBKDX=XBKDG_"0)="_@(XBKDG_"0)") "RTN","XBKD2",85,0) W $E(XBKDX,1,47) "RTN","XBKD2",86,0) Q "RTN","XBKD2",87,0) ; "RTN","XBKD3") 0^102^B9705991 "RTN","XBKD3",1,0) XBKD3 ; IHS/ADC/GTH - KILLS DICs and GLOBALS (PART 3) ; [ 02/07/97 3:02 PM ] "RTN","XBKD3",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKD3",3,0) ; "RTN","XBKD3",4,0) ; Part of XBKD "RTN","XBKD3",5,0) ; "RTN","XBKD3",6,0) ; Upon entry into this routine ^DIC(file #,0) must contain "RTN","XBKD3",7,0) ; the file name, and, if the data global is to be deleted "RTN","XBKD3",8,0) ; piece 3 of ^UTILITY("XBDSET",$J,file #) must be a valid "RTN","XBKD3",9,0) ; global reference. "RTN","XBKD3",10,0) ; "RTN","XBKD3",11,0) START ; "RTN","XBKD3",12,0) W !! "RTN","XBKD3",13,0) KILL ^UTILITY("XBKD",$J) "RTN","XBKD3",14,0) S (XBKDFILE,XBKDFLG)=0 "RTN","XBKD3",15,0) F XBKDL=0:0 S XBKDFILE=$O(^UTILITY("XBDSET",$J,XBKDFILE)) Q:XBKDFILE="" S XBKDDEL=$P(^(XBKDFILE),U,1),XBKDTMP=$P(^(XBKDFILE),U,2),XBKDG=$P(^(XBKDFILE),U,3) D KILL Q:XBKDFLG "RTN","XBKD3",16,0) Q "RTN","XBKD3",17,0) ; "RTN","XBKD3",18,0) KILL ; "RTN","XBKD3",19,0) S XBKDG="^"_$E(XBKDG,1,$L(XBKDG)-1)_$S($E(XBKDG,$L(XBKDG))=",":")",1:"") "RTN","XBKD3",20,0) S XBKDNDIC=$P(^DIC(XBKDFILE,0),U,1) "RTN","XBKD3",21,0) W XBKDFILE,?14,$P(^DIC(XBKDFILE,0),U,1)," " "RTN","XBKD3",22,0) I XBKDTMP'="D" D SAVE "RTN","XBKD3",23,0) KILL XBKDSFL "RTN","XBKD3",24,0) S XBKDC=1,XBKDSFL(XBKDC)=XBKDFILE "RTN","XBKD3",25,0) D SBTRACE "RTN","XBKD3",26,0) KILL XBKDC,XBKDI,XBKDSF,XBKDSFL "RTN","XBKD3",27,0) KILL ^DD("ACOMP",XBKDFILE) "RTN","XBKD3",28,0) KILL ^DIC(XBKDFILE,"%"),^("%A"),^("%D"),^DIC("B",XBKDNDIC,XBKDFILE) "RTN","XBKD3",29,0) I XBKDG'["DIC(",XBKDTMP="D" KILL ^DIC(XBKDFILE,0) "RTN","XBKD3",30,0) K:XBKDDEL="D" @XBKDG "RTN","XBKD3",31,0) I XBKDTMP="D" F DIK="^DIE(","^DIPT(","^DIBT(" W "." KILL @(DIK_"""F""_XBKDFILE)") F DA=.9:0 S DA=$O(@(DIK_"DA)")) Q:DA'>0 I $D(^(DA,0)) S %=$P(^(0),U,4) I %=""!'$D(^DD(+%)) W "." D ^DIK "RTN","XBKD3",32,0) W !! "RTN","XBKD3",33,0) Q "RTN","XBKD3",34,0) ; "RTN","XBKD3",35,0) SBTRACE ; Delete all Sub-Files. "RTN","XBKD3",36,0) F XBKDL=0:0 S XBKDI=$O(XBKDSFL("")) Q:XBKDI="" S XBKDSF=XBKDSFL(XBKDI) D SBTRACE2 S XBKDI=$O(XBKDSFL("")) W "." KILL ^DD(XBKDSFL(XBKDI)),XBKDSFL(XBKDI) "RTN","XBKD3",37,0) Q "RTN","XBKD3",38,0) ; "RTN","XBKD3",39,0) SBTRACE2 ; "RTN","XBKD3",40,0) S XBKDI=0 "RTN","XBKD3",41,0) F XBKDL=0:0 S XBKDI=$O(^DD(XBKDSF,"SB",XBKDI)) Q:XBKDI="" S XBKDC=XBKDC+1,XBKDSFL(XBKDC)=XBKDI "RTN","XBKD3",42,0) Q "RTN","XBKD3",43,0) ; "RTN","XBKD3",44,0) SAVE ; Save "PT", "TRB", and "ACOMP" node from ^DD. "RTN","XBKD3",45,0) S XBKDFLD="" "RTN","XBKD3",46,0) F XBKDL=0:0 S XBKDFLD=$O(^DD("ACOMP",XBKDFILE,XBKDFLD)) Q:XBKDFLD="" S XBKDFLE2="" F XBKDL=0:0 S XBKDFLE2=$O(^DD("ACOMP",XBKDFILE,XBKDFLD,XBKDFLE2)) Q:XBKDFLE2="" D SAVE2 "RTN","XBKD3",47,0) KILL ^DD(XBKDFILE,0,"PT",XBKDFILE),XBKDFLE2 "RTN","XBKD3",48,0) W "." "RTN","XBKD3",49,0) S FROM="^DD("_XBKDFILE_",0,""PT"",",TO="^UTILITY(""XBKD"",$J,"_XBKDFILE_",0,""PT""," "RTN","XBKD3",50,0) D ^XBGXFR "RTN","XBKD3",51,0) KILL ^DD(XBKDFILE,"TRB",XBKDFILE) "RTN","XBKD3",52,0) W "." "RTN","XBKD3",53,0) S FROM="^DD("_XBKDFILE_",""TRB"",",TO="^UTILITY(""XBKD"",$J,"_XBKDFILE_",""TRB""," "RTN","XBKD3",54,0) D ^XBGXFR "RTN","XBKD3",55,0) W "." "RTN","XBKD3",56,0) S FROM="^DD(""ACOMP"","_XBKDFILE_",",TO="^UTILITY(""XBKD"",$J,""ACOMP"","_XBKDFILE_"," "RTN","XBKD3",57,0) D ^XBGXFR "RTN","XBKD3",58,0) Q "RTN","XBKD3",59,0) ; "RTN","XBKD3",60,0) SAVE2 ; "RTN","XBKD3",61,0) I '$D(^DIC(XBKDFLE2))!(XBKDFILE=XBKDFLE2) W "." KILL ^DD("ACOMP",XBKDFILE,XBKDFLD,XBKDFLE2) "RTN","XBKD3",62,0) Q "RTN","XBKD3",63,0) ; "RTN","XBKERCLN") 0^103^B12352496 "RTN","XBKERCLN",1,0) XBKERCLN ; IHS/ADC/GTH - CLEAN OUT KERNEL NAMESPACE ITEMS PRIOR TO INSTALL ; [ 02/07/97 3:02 PM ] "RTN","XBKERCLN",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKERCLN",3,0) ; "RTN","XBKERCLN",4,0) ; This routine is a modified XBPKDEL for use specifically "RTN","XBKERCLN",5,0) ; to clean out KERNEL package items prior to new KERNEL "RTN","XBKERCLN",6,0) ; install. This routine does not delete any security keys. "RTN","XBKERCLN",7,0) ; "RTN","XBKERCLN",8,0) D ^XBKVAR,ASK "RTN","XBKERCLN",9,0) G:AUPKSTP EOJ "RTN","XBKERCLN",10,0) F AUPKNSP="XU","XQ","XM","ZT","ZE","ZI","ZR","ZS" D PKDEL "RTN","XBKERCLN",11,0) S %=1 "RTN","XBKERCLN",12,0) D ENASK^XQ3 ;CALL TO FIX OPTION POINTERS "RTN","XBKERCLN",13,0) G EOJ "RTN","XBKERCLN",14,0) ; "RTN","XBKERCLN",15,0) PKDEL ; "RTN","XBKERCLN",16,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" G EOJ "RTN","XBKERCLN",17,0) I '$D(AUPKNSP) W !,*7,"Namespace variable does not exist!" G EOJ "RTN","XBKERCLN",18,0) S U="^",DUZ(0)="@",AUPKQUIT=AUPKNSP_"{" "RTN","XBKERCLN",19,0) F AUPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D DELETE "RTN","XBKERCLN",20,0) Q "RTN","XBKERCLN",21,0) ; "RTN","XBKERCLN",22,0) ASK ;ASK USER IF WANTS TO CONTINUE "RTN","XBKERCLN",23,0) S AUPKSTP=0 "RTN","XBKERCLN",24,0) W !!,*7,"This routine will delete all options, sort,input,print templates,",!,"bulletins, functions, ",$S($D(AUPKEY):"help frames and security keys",1:"and help frames")," namespaced `XU,XQ,XM,ZT,ZE,ZI,ZR,ZS' " "RTN","XBKERCLN",25,0) W !,"that are currently in this UCI. " "RTN","XBKERCLN",26,0) W "Do you want to continue" "RTN","XBKERCLN",27,0) S %=1 "RTN","XBKERCLN",28,0) D YN^DICN "RTN","XBKERCLN",29,0) I %=0 W !!,"If you answer with a ""NO"" or a ""^"" I will stop this package deletion.",! G ASK "RTN","XBKERCLN",30,0) I %=2!(%=-1) S AUPKSTP=1 "RTN","XBKERCLN",31,0) W ! "RTN","XBKERCLN",32,0) Q "RTN","XBKERCLN",33,0) ; "RTN","XBKERCLN",34,0) DELETE ; "RTN","XBKERCLN",35,0) W !!,"Now deleting `",AUPKNSP,"' namespaced ",$P(@(AUPKGLO_"0)"),U),"S..." "RTN","XBKERCLN",36,0) S AUPKNSPC=AUPKNSP "RTN","XBKERCLN",37,0) I $D(@(AUPKGLO_"""B"",AUPKNSPC)")) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")),DIK=AUPKGLO D ^DIK KILL DIK,DA "RTN","XBKERCLN",38,0) F L=0:0 S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSPC)")) Q:AUPKNSPC=""!(AUPKNSPC]AUPKQUIT) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")) W !?3,AUPKNSPC S DIK=AUPKGLO D ^DIK KILL DIK,DA "RTN","XBKERCLN",39,0) Q "RTN","XBKERCLN",40,0) ; "RTN","XBKERCLN",41,0) LIST ; ENTRY POINT FOR LISTING NAMESPACED ITEMS "RTN","XBKERCLN",42,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q "RTN","XBKERCLN",43,0) S U="^",DUZ(0)="@" "RTN","XBKERCLN",44,0) W !!,"Utility to list all Kernel namespaced items in current UCI",! "RTN","XBKERCLN",45,0) D ^%ZIS "RTN","XBKERCLN",46,0) G:POP EOJ "RTN","XBKERCLN",47,0) U IO "RTN","XBKERCLN",48,0) F AUPKNSP="XU","XQ","XM","ZT","ZE","ZI","ZR","ZS" D LIST1 "RTN","XBKERCLN",49,0) D ^%ZISC "RTN","XBKERCLN",50,0) G EOJ "RTN","XBKERCLN",51,0) ; "RTN","XBKERCLN",52,0) LIST1 ; "RTN","XBKERCLN",53,0) W !!,"Listing of items in namespace ",AUPKNSP,! "RTN","XBKERCLN",54,0) W "--------------------------------------",! "RTN","XBKERCLN",55,0) S AUPKQUIT=AUPKNSP_"{" "RTN","XBKERCLN",56,0) S %=0 "RTN","XBKERCLN",57,0) F AUPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^DIC(19.1,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D LIST2 "RTN","XBKERCLN",58,0) Q "RTN","XBKERCLN",59,0) ; "RTN","XBKERCLN",60,0) LIST2 ; "RTN","XBKERCLN",61,0) S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSP)")) "RTN","XBKERCLN",62,0) I $P(AUPKNSPC,AUPKNSP)]"" W:% ! S %=0 W "NO ",$P(@(AUPKGLO_"0)"),"^",1),"S",! Q "RTN","XBKERCLN",63,0) S %=1 "RTN","XBKERCLN",64,0) W !,$P(@(AUPKGLO_"0)"),"^",1),"S",! "RTN","XBKERCLN",65,0) S AUPKNSPC=AUPKNSP "RTN","XBKERCLN",66,0) F L=0:0 S AUPKNSPC=$O(@(AUPKGLO_"""B"",AUPKNSPC)")) Q:AUPKNSPC=""!(AUPKNSPC]AUPKQUIT) S DA=$O(@(AUPKGLO_"""B"",AUPKNSPC,"""")")) W ?3,AUPKNSPC,! "RTN","XBKERCLN",67,0) Q "RTN","XBKERCLN",68,0) ; "RTN","XBKERCLN",69,0) EOJ ; "RTN","XBKERCLN",70,0) KILL AUPKGLO,AUPKEY,AUPKSTP,AUPKNSP,AUPKNSPC,AUPKQUIT,AUPKRUN,AUPKDOC "RTN","XBKERCLN",71,0) Q "RTN","XBKERCLN",72,0) ; "RTN","XBKIDS") 0^104^B9942611 "RTN","XBKIDS",1,0) XBKIDS ; IHS/ASDST/GTH - KIDS UTILITIES ; [ 10/29/2002 7:42 AM ] "RTN","XBKIDS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKIDS",3,0) ; "RTN","XBKIDS",4,0) ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBKIDS",5,0) ; "RTN","XBKIDS",6,0) ; -------------------- "RTN","XBKIDS",7,0) ; "RTN","XBKIDS",8,0) VCHK(XBPRE,XBVER,XBQUIT) ;PEP - For environment check routines. "RTN","XBKIDS",9,0) ; Pass "PREFIX","Version","XPDQUIT_value". "RTN","XBKIDS",10,0) ; E.g.: Q:'$$VCHK^XBKIDS("AG",5.4,2) "RTN","XBKIDS",11,0) ; "RTN","XBKIDS",12,0) NEW XBV "RTN","XBKIDS",13,0) S XBV=$$VERSION^XPDUTL(XBPRE) "RTN","XBKIDS",14,0) W !,$$CJ^XLFSTR("Need at least "_XBPRE_" v "_XBVER_"....."_XBPRE_" v "_XBV_" Present",IOM) "RTN","XBKIDS",15,0) I XBV0:XB_"""PAH"","_(+Y)_",",1:"PATCH NUMBER '"_$P(XBP,"*",3)_"' NOT FOUND IN PACKAGE FILE.") "RTN","XBKIDS",40,0) ; "RTN","XBKIDS",41,0) ; -------------------- "RTN","XBKIDS",42,0) ; "RTN","XBKIDS",43,0) ; OPTSAV() and OPTRES() are provided b/c if an option of type "menu" "RTN","XBKIDS",44,0) ; is included in a KIDS transport and install, the existing option "RTN","XBKIDS",45,0) ; is overwritten, thereby destroying any local modifications. "RTN","XBKIDS",46,0) ; "RTN","XBKIDS",47,0) ; Further, if an option of type "menu" is included in a KIDS transport "RTN","XBKIDS",48,0) ; and install, -all- the options on that option of type "menu" -must- "RTN","XBKIDS",49,0) ; be included in the KIDS transport, whether they are changed, or not. "RTN","XBKIDS",50,0) ; "RTN","XBKIDS",51,0) ; The value of XB2SUB is provided by the calling routine, and has no "RTN","XBKIDS",52,0) ; particular meaning. "RTN","XBKIDS",53,0) ; "RTN","XBKIDS",54,0) ; E.g.: D OPTSAV^XBKIDS("AGMENU","Cochise") "RTN","XBKIDS",55,0) ; D OPTRES^XBKIDS("AGMENU","Cochise") "RTN","XBKIDS",56,0) ; "RTN","XBKIDS",57,0) OPTSAV(XBM,XB2SUB) ;PEP - Save the menu portion of an option. "RTN","XBKIDS",58,0) I $D(^XTMP("XBKIDS",XB2SUB,"OPTSAV",XBM)) D BMES^XPDUTL("NOT SAVED. Option '"_XBM_"' has previously been saved.") Q "RTN","XBKIDS",59,0) I '$D(^XTMP("XBKIDS")) S ^XTMP("XBKIDS",0)=$$FMADD^XLFDT(DT,30)_U_DT_U_"XBKIDS - SAVE OPTION CONFIGURATIONS." "RTN","XBKIDS",60,0) NEW I,A "RTN","XBKIDS",61,0) S I=$O(^DIC(19,"B",XBM,0)) "RTN","XBKIDS",62,0) I 'I D BMES^XPDUTL("NOT SAVED. Option '"_XBM_"' not found in OPTION file.") Q "RTN","XBKIDS",63,0) S A=0 "RTN","XBKIDS",64,0) F S A=$O(^DIC(19,I,10,A)) Q:'A S ^XTMP("XBKIDS",XB2SUB,"OPTSAV",XBM,A)=$P(^DIC(19,+^DIC(19,I,10,A,0),0),U,1)_U_$P(^DIC(19,I,10,A,0),U,2,3) "RTN","XBKIDS",65,0) Q "RTN","XBKIDS",66,0) ; "RTN","XBKIDS",67,0) ; -------------------- "RTN","XBKIDS",68,0) ; "RTN","XBKIDS",69,0) OPTRES(XBM,XB2SUB) ; PEP - Restore the menu portion of an option. "RTN","XBKIDS",70,0) NEW XB,XBI "RTN","XBKIDS",71,0) I '$D(^XTMP("XBKIDS",XB2SUB,"OPTSAV",XBM)) D BMES^XPDUTL("FAILED. Option '"_XBM_"' was not previously saved.") Q "RTN","XBKIDS",72,0) S XB=0 "RTN","XBKIDS",73,0) F S XB=$O(^XTMP("XBKIDS",XB2SUB,"OPTSAV",XBM,XB)) Q:'XB S XBI=^(XB) I '$$ADD^XPDMENU(XBM,$P(XBI,U,1),$P(XBI,U,2),$P(XBI,U,3)) D BMES^XPDUTL("....FAILED to re-atch "_$P(XBI,U,1)_" to "_XBM_".") "RTN","XBKIDS",74,0) Q "RTN","XBKIDS",75,0) ; "RTN","XBKSET") 0^105^B220107 "RTN","XBKSET",1,0) XBKSET ; IHS/ADC/GTH - SET MINIMUM KERNEL VARIABLES ; [ 10/29/2002 7:42 AM ] "RTN","XBKSET",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKSET",3,0) ; "RTN","XBKSET",4,0) ; This routine is for programmers in direct mode only. It "RTN","XBKSET",5,0) ; should not be called within a routine. "RTN","XBKSET",6,0) ; "RTN","XBKSET",7,0) START ; "RTN","XBKSET",8,0) D ^XBKVAR "RTN","XBKSET",9,0) KERNEL ; "RTN","XBKSET",10,0) KILL ^XUTL("XQ",$J),^UTILITY($J) "RTN","XBKSET",11,0) S %ZIS="L",IOP="HOME" "RTN","XBKSET",12,0) D ^%ZIS "RTN","XBKSET",13,0) Q:POP "RTN","XBKSET",14,0) D SAVE^XUS1 ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBKSET",15,0) ; F X="DUZ","DUZ(0)","DUZ(2)","IO","IOBS","IOF","ION","IOM","IOS","IOSL","IOST","IOST(0)","IOXY" I $D(@X) S ^XUTL("XQ",$J,X)=@X ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBKSET",16,0) Q "RTN","XBKSET",17,0) ; "RTN","XBKTMP") 0^106^B108746 "RTN","XBKTMP",1,0) XBKTMP ; IHS/ADC/GTH - CLEAN ^TMP NODES FOR CURRENT JOB ; [ 02/07/97 3:02 PM ] "RTN","XBKTMP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKTMP",3,0) ; "RTN","XBKTMP",4,0) ; Called from the top, this routine KILLs entries in the "RTN","XBKTMP",5,0) ; ^TMP global that have $J as the first or second subscript. "RTN","XBKTMP",6,0) ; "RTN","XBKTMP",7,0) KILL ^TMP($J) "RTN","XBKTMP",8,0) NEW X "RTN","XBKTMP",9,0) S X="" "RTN","XBKTMP",10,0) F S X=$O(^TMP(X)) Q:X="" KILL ^TMP(X,$J) "RTN","XBKTMP",11,0) Q "RTN","XBKTMP",12,0) ; "RTN","XBKVAR") 0^107^B1307311 "RTN","XBKVAR",1,0) XBKVAR ; IHS/ADC/GTH - SET MINIMUM KERNEL VARIABLES ; [ 11/04/97 10:26 AM ] "RTN","XBKVAR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBKVAR",3,0) ; XB*3*5 IHS/ADC/GTH 10-31-97 Correct the setting of DUZ("AG"). "RTN","XBKVAR",4,0) ; "RTN","XBKVAR",5,0) START ; "RTN","XBKVAR",6,0) S U="^" "RTN","XBKVAR",7,0) I '$D(DUZ(2)),$D(^AUTTSITE(1,0)) S DUZ(2)=+^(0) "RTN","XBKVAR",8,0) I '$D(DUZ(2)),$D(^AUTTLOC("SITE")) S DUZ(2)=+^("SITE") "RTN","XBKVAR",9,0) ; I '$D(DUZ("AG")) S DUZ("AG")=$S($P($G(^XMB(1,0)),"^",8)]"":$P(^XMB(1,0),"^",8),1:"I") ; XB*3*5 IHS/ADC/GTH 10-31-97 Correct the setting of DUZ("AG"). "RTN","XBKVAR",10,0) I '$D(DUZ("AG")) S DUZ("AG")=$S($P($G(^XMB(1,1,0)),"^",8)]"":$P(^XMB(1,1,0),"^",8),1:"I") ; XB*3*5 IHS/ADC/GTH 10-31-97 Correct the setting of DUZ("AG"). "RTN","XBKVAR",11,0) S:'($D(DUZ)#2) DUZ=0 "RTN","XBKVAR",12,0) S:'($D(DUZ(0))#2) DUZ(0)="" "RTN","XBKVAR",13,0) S:'($D(DUZ(2))#2) DUZ(2)=0 "RTN","XBKVAR",14,0) I '$D(DT) S DT=($$HTFM^XLFDT($H)\1) "RTN","XBKVAR",15,0) S:'$D(DTIME) DTIME=999 "RTN","XBKVAR",16,0) KILL %,%H,%I "RTN","XBKVAR",17,0) Q "RTN","XBKVAR",18,0) ; "RTN","XBL") 0^108^B1439722 "RTN","XBL",1,0) XBL ; IHS/ADC/GTH - List Template Exporter ; [ 02/07/97 3:02 PM ] "RTN","XBL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBL",3,0) ; "RTN","XBL",4,0) W !,"'XB DISPLAY' List Template..." "RTN","XBL",5,0) S DA=$O(^SD(409.61,"B","XB DISPLAY",0)),DIK="^SD(409.61," "RTN","XBL",6,0) D ^DIK:DA "RTN","XBL",7,0) S DIC(0)="L",DIC="^SD(409.61,",X="XB DISPLAY" "RTN","XBL",8,0) KILL DO,DD D FILE^DICN "RTN","XBL",9,0) S VALM=+Y "RTN","XBL",10,0) I VALM>0 D "RTN","XBL",11,0) . S ^SD(409.61,VALM,0)="XB DISPLAY^1^^200^4^21^1^1^^XB DISPLAY^OUTPUT BROWSER^1^^1" "RTN","XBL",12,0) . S ^SD(409.61,VALM,1)="^VALM HIDDEN ACTIONS" "RTN","XBL",13,0) . S ^SD(409.61,VALM,"ARRAY")=" ^TMP(""XBLM"",$J,XBNODE)" "RTN","XBL",14,0) . S ^SD(409.61,VALM,"FNL")="D EXIT^XBLM" "RTN","XBL",15,0) . S ^SD(409.61,VALM,"HDR")="D HDR^XBLM" "RTN","XBL",16,0) . S ^SD(409.61,VALM,"HLP")="D HELP^XBLM" "RTN","XBL",17,0) . S ^SD(409.61,VALM,"INIT")="D INIT^XBLM" "RTN","XBL",18,0) . S DA=VALM,DIK="^SD(409.61," "RTN","XBL",19,0) . D IX1^DIK "RTN","XBL",20,0) . KILL DA,DIK "RTN","XBL",21,0) . W "Filed." "RTN","XBL",22,0) .Q "RTN","XBL",23,0) ; "RTN","XBL",24,0) KILL DIC,DIK,VALM,X,DA "RTN","XBL",25,0) Q "RTN","XBL",26,0) ; "RTN","XBLCALL") 0^109^B39192147 "RTN","XBLCALL",1,0) XBLCALL ; IHS/ADC/GTH - LIST CALLABLE SUBROUTINES ; [ 02/07/97 3:02 PM ] "RTN","XBLCALL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLCALL",3,0) ; "RTN","XBLCALL",4,0) ; This routine lists callable subroutines that are known to "RTN","XBLCALL",5,0) ; this routine. To add subroutines to this routine just add "RTN","XBLCALL",6,0) ; them to the end of this routine in same manner. "RTN","XBLCALL",7,0) ; "RTN","XBLCALL",8,0) START ; "RTN","XBLCALL",9,0) NEW I,X,Y "RTN","XBLCALL",10,0) F I=1:1 S X=$T(@("L")+I) Q:X="" W !,$P(X,";",3),$E("...............",1,15-$L($P(X,";",3))),$P(X,";",4,99) I '(I#20) Q:'($$QUIT) "RTN","XBLCALL",11,0) Q "RTN","XBLCALL",12,0) ; "RTN","XBLCALL",13,0) QUIT() ; "RTN","XBLCALL",14,0) NEW I,X,Y "RTN","XBLCALL",15,0) Q $$DIR^XBDIR("E") "RTN","XBLCALL",16,0) ; "RTN","XBLCALL",17,0) STARDATE(X) ; Return Stardate of FM date/time. "RTN","XBLCALL",18,0) I X'?7N.1".".6N Q -1 "RTN","XBLCALL",19,0) NEW Y "RTN","XBLCALL",20,0) S Y=$P(X,".",2),Y=+$E(Y,1,2)/24+(+$E(Y,3,4)/(60*24))+(+$E(Y,5,6)/(60*60*24)) "RTN","XBLCALL",21,0) Q $FN($E(X,3,7)+Y,"-",2) "RTN","XBLCALL",22,0) ; "RTN","XBLCALL",23,0) L ; "RTN","XBLCALL",24,0) ;;^XBCLS;Clears the screen "RTN","XBLCALL",25,0) ;;EP^XBCLM(STR);Lists numbered column headings over the passed string "RTN","XBLCALL",26,0) ;;^XBDAD0;Returns DA array for D0,D1, etc. or vice versa "RTN","XBLCALL",27,0) ;;KILL^XBDAD0;KILL D0, D1, ETC. "RTN","XBLCALL",28,0) ;;^XBDATE;Limits selected routines to those edited after given date "RTN","XBLCALL",29,0) ;;^XBDBQUE;Double Q'uing shell handler "RTN","XBLCALL",30,0) ;;^XBDIE;Exclusive NEW of Kernel vars for nesting DIE calls "RTN","XBLCALL",31,0) ;;^XBDIFF;Returns difference between two date/times "RTN","XBLCALL",32,0) ;;$$DIC^XBDIQ1(FN);Extrensic entry to return DIC from global "RTN","XBLCALL",33,0) ;;EN^XBDIQ1;Returns single entries "RTN","XBLCALL",34,0) ;;ENM^XBDIQ1;Returns multiple entries "RTN","XBLCALL",35,0) ;;ENP^XBDIQ1(DIC,DA,DR,DIQ,FMT);Param pass into EN "RTN","XBLCALL",36,0) ;;ENPM^XBDIQ1(DIC,DA,DR,DIQ,FMT);Param pass into EN "RTN","XBLCALL",37,0) ;;PARSE^XBDIQ1(DA);Parse DA literal into da array "RTN","XBLCALL",38,0) ;;$$VAL^XBDIQ1(DIC,DA,DR);Return a value for a field "RTN","XBLCALL",39,0) ;;$$VALI^XBDIQ1(DIC,DA,DR);Return internal value for a field "RTN","XBLCALL",40,0) ;;$$DIR^XBDIR();Standard interface to Reader "RTN","XBLCALL",41,0) ;;EN1^XBDSET;Return FileMan dictionaries "RTN","XBLCALL",42,0) ;;EN^XBENHANCE(NS);Print enhancements from PACKAGE given namespace "RTN","XBLCALL",43,0) ;;FLD^XBFDINFO(FILE,FIELD,ROOT);Return field info from dd "RTN","XBLCALL",44,0) ;;^XBFMK;Kills variables left around by FileMan "RTN","XBLCALL",45,0) ;;EN1^XBFRESET;Reset global(s), confirm with user "RTN","XBLCALL",46,0) ;;EN2^XBFRESET;Reset global(s), do not confirm with user "RTN","XBLCALL",47,0) ;;^XBGXFR;Copies global to another global "RTN","XBLCALL",48,0) ;;^XBGXREFS;Returns xrefs for file/subfile,field "RTN","XBLCALL",49,0) ;;$$C^XBFUNC(X,Y);Center X in field length Y/IOM/80. "RTN","XBLCALL",50,0) ;;$$CV^XBFUNC(N);Return current version for package with namespace N "RTN","XBLCALL",51,0) ;;$$DECFRAC^XBFUNC(DECIMAL VALUE);returns fraction equivilent "RTN","XBLCALL",52,0) ;;$$FNDPATRN^XBFUNC(STR,PAT);finds pattern in string "RTN","XBLCALL",53,0) ;;$$GDT^XBFUNC(JDT);Return Gregorian Date, given Julian Date. "RTN","XBLCALL",54,0) ;;$$GETPATRN^XBFUNC(STR,PAT);returns pattern from string "RTN","XBLCALL",55,0) ;;$$INTSET^XBFUNC(FILE,FIELD,EXTVAL);returns internal value "RTN","XBLCALL",56,0) ;;$$JDT^XBFUNC(FMDT);Return Julian Date, given FM date. "RTN","XBLCALL",57,0) ;;$$EXTSET^XBFUNC(FILE,FIELD,INTVAL);returns external value "RTN","XBLCALL",58,0) ;;$$LOC^XBFUNC;Return location name from file 4 based on DUZ(2). "RTN","XBLCALL",59,0) ;;$$USR^XBFUNC;Return name of current user for ^VA(200. "RTN","XBLCALL",60,0) ;;$$PROVCLS^XBFUNC1(PROV,FORM);Return Provider Class from New Person "RTN","XBLCALL",61,0) ;;$$PROVCLSC^XBFUNC1(PROV);Return Provider Class Code given New Person IEN "RTN","XBLCALL",62,0) ;;$$PCCPPINT^XBFUNC2(VISIT);Return primary provider ien from 200 "RTN","XBLCALL",63,0) ;;$$PCCPPN^XBFUNC2(VISIT);Return visit primary provider (NAME) "RTN","XBLCALL",64,0) ;;$$PCCPPI^XBFUNC2(VISIT);Return visit primary provider (INITIALS) "RTN","XBLCALL",65,0) ;;$$PCCPPCLS^XBFUNC2(VISIT,FORM);Return visit primary provider class (CODE) "RTN","XBLCALL",66,0) ;;$$PCCPPCLC^XBFUNC2(VISIT);Return visit primary provider class (CODE) "RTN","XBLCALL",67,0) ;;$$PCCPPAFF^XBFUNC2(VISIT,FORM);Return visit primary provider (affiliation) "RTN","XBLCALL",68,0) ;;^XBGSAVE;Generic global save for transmission globals "RTN","XBLCALL",69,0) ;;HELP^XBHELP(L,R,T);Display text beginning at label L of routine R "RTN","XBLCALL",70,0) ;;EN1^XBKD;Kill DICs and globals, info in vars "RTN","XBLCALL",71,0) ;;EN2^XBKD;Kill DICs and globals, info in ^UTILITY("XBDSET",$J) "RTN","XBLCALL",72,0) ;;^XBKERCLN;Clean out kernel namespace items prior to install "RTN","XBLCALL",73,0) ;;^XBKTMP;KILL nodes in ^TMP( that have $J as 1st or 2nd subscripts "RTN","XBLCALL",74,0) ;;^XBKVAR;Set minimum Kernel vars "RTN","XBLCALL",75,0) ;;ARRAY^XBLM(AR,HDR);Display array that has (...,n,0) structure "RTN","XBLCALL",76,0) ;;DIQ^XBLM(DIC,DA);Display DIC and DA after call to EN^DIQ "RTN","XBLCALL",77,0) ;;FILE^XBLM(DIR,FN);Read file into the TMP global for display "RTN","XBLCALL",78,0) ;;GUID^XBLM(ROU,Y);Give routine and target array for FM prints "RTN","XBLCALL",79,0) ;;GUIR^XBLM(ROU,Y);Give routine and target array "RTN","XBLCALL",80,0) ;;SFILE^XBLM;Select a host file for display "RTN","XBLCALL",81,0) ;;VIEWD^XBLM(ROU);Use ROU to print to a host file for viewing "RTN","XBLCALL",82,0) ;;VIEWR^XBLM(ROU,HDR);Use ROU to print to a host file for viewing "RTN","XBLCALL",83,0) ;;EN^XBLZRO;List 0th nodes of pre-selected list of FileMan files "RTN","XBLCALL",84,0) ;;MAIL^XBMAIL(NS,REF);Send mail msg to holders of NS* security key "RTN","XBLCALL",85,0) ;;EN^XBNEW(XBRET,XBNS);Nest Die calls, "TAG^ROUTINE:VAR;NSVAR*" "RTN","XBLCALL",86,0) ;;^XBOFF;Set reverse video off "RTN","XBLCALL",87,0) ;;^XBON;Set reverse video on "RTN","XBLCALL",88,0) ;;PFTV^XBPFTV(FILE,ENTRY,VALUE);Returns terminal value for pointer "RTN","XBLCALL",89,0) ;;^XBPKDEL;Delete parts of package, namespace in XBPKNSP "RTN","XBLCALL",90,0) ;;EN1^XBRESID;Clean up residuals in ^DD from XBRLO to XBRHI "RTN","XBLCALL",91,0) ;;EN^XBRPTL;Print routines down to first label "RTN","XBLCALL",92,0) ;;EN^XBSFGBL(SUBFILE,ref,FORM);Return global ref of file or sub-file. "RTN","XBLCALL",93,0) ;;^XBSITE;Ask user to select site to set DUZ(2) "RTN","XBLCALL",94,0) ;;SET^XBSITE;Request set of DUZ(2) from applications "RTN","XBLCALL",95,0) ;;^XBUPCASE;Upcases value in X "RTN","XBLCALL",96,0) ;;EN^XBVIDEO(X);Set video attribute in X, return cursor "RTN","XBLCALL",97,0) ;;EN^XBVK(NS);KILLS local variables in the passed namespace "RTN","XBLCALL",98,0) ;;^XBVL;List variables in the selected namespace "RTN","XBLCALL",99,0) ;;$$KILLOK^ZIBGCHAR(G);Allow kill of global G "RTN","XBLCALL",100,0) ;;$$KILLNO^ZIBGCHAR(G);Prevent kill'ing of global G "RTN","XBLCALL",101,0) ;;$$JOURN^ZIBGCHAR(G);Set Journaling to ALWAYS for global G "RTN","XBLCALL",102,0) ;;$$NOJOURN^ZIBGCHAR(G);Set Journaling for global G to NEVER "RTN","XBLCALL",103,0) ;;$$UCIJOURN^ZIBGCHAR(G);Journal global G when UCI is Journaled "RTN","XBLCALL",104,0) ;;$$ERR^ZIBGCHAR(#);Return cause of error # "RTN","XBLCALL",105,0) ;;$$Z^ZIBNSSV(ERR);Return values of Non-Standard ($Z) Special Variables "RTN","XBLCALL",106,0) ;;^ZIBRUN;Sets $T based on whether routine in X is running "RTN","XBLCALL",107,0) ;;$$RSEL^ZIBRSEL(NS,Y);Select a list or range of routines "RTN","XBLFAM") 0^110^B25168093 "RTN","XBLFAM",1,0) XBLFAM ;IHS/SET/GTH - LISTS FILE ATTRIBUTES FOR MODELING ; [ 04/18/2003 9:05 AM ] "RTN","XBLFAM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLFAM",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New routine. "RTN","XBLFAM",4,0) ; This routine lists the following file attributes, useful for "RTN","XBLFAM",5,0) ; moving to a spreadsheet, or other desktop ap, for database "RTN","XBLFAM",6,0) ; modeling activities: "RTN","XBLFAM",7,0) ; "RTN","XBLFAM",8,0) ; File #, File Name, Field #, Field Label, Field type, Desc/Help., "RTN","XBLFAM",9,0) ; Min Length, Max Length "RTN","XBLFAM",10,0) ; The output is one line of data per field, semi-colon delimited. "RTN","XBLFAM",11,0) ; "RTN","XBLFAM",12,0) ; NOTE: Fields marked for deletion with a "*" preceeding the label "RTN","XBLFAM",13,0) ; are -not- processed. "RTN","XBLFAM",14,0) ; "RTN","XBLFAM",15,0) ; Thanks to George T. Huggins for the original routine. "RTN","XBLFAM",16,0) ; "RTN","XBLFAM",17,0) START ; "RTN","XBLFAM",18,0) ; --- Display routine description. "RTN","XBLFAM",19,0) D HOME^%ZIS,DT^DICRW "RTN","XBLFAM",20,0) KILL ^UTILITY($J) "RTN","XBLFAM",21,0) S ^UTILITY($J,"XBLFAM")="" "RTN","XBLFAM",22,0) D EN^XBRPTL "RTN","XBLFAM",23,0) KILL ^UTILITY($J) "RTN","XBLFAM",24,0) ; "RTN","XBLFAM",25,0) ; --- Start processing. "RTN","XBLFAM",26,0) NEW QFLG "RTN","XBLFAM",27,0) S QFLG=0 "RTN","XBLFAM",28,0) ; "RTN","XBLFAM",29,0) ; --- Get file(s). "RTN","XBLFAM",30,0) D ^XBDSET "RTN","XBLFAM",31,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBLFAM",32,0) ; "RTN","XBLFAM",33,0) ; --- Select device. "RTN","XBLFAM",34,0) W ! "RTN","XBLFAM",35,0) S %ZIS="Q",ZTSAVE("^UTILITY(""XBDSET"",$J,")="" "RTN","XBLFAM",36,0) D EN^XUTMDEVQ("EN^XBLFAM","List Attributes for Modeling",.ZTSAVE,.%ZIS) "RTN","XBLFAM",37,0) D EN^XBVK("ZT") "RTN","XBLFAM",38,0) Q "RTN","XBLFAM",39,0) ; "RTN","XBLFAM",40,0) EN ;EP - From TaskMan. "RTN","XBLFAM",41,0) ; "RTN","XBLFAM",42,0) ; --- Main loop: thru selected file(s). "RTN","XBLFAM",43,0) NEW F,X "RTN","XBLFAM",44,0) ; "RTN","XBLFAM",45,0) ; F:File # "RTN","XBLFAM",46,0) ; "RTN","XBLFAM",47,0) S F=0 "RTN","XBLFAM",48,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D PAGE Q:QFLG D FIELDS(F) Q:QFLG "RTN","XBLFAM",49,0) D ^%ZISC "RTN","XBLFAM",50,0) Q "RTN","XBLFAM",51,0) ; --- End main loop. "RTN","XBLFAM",52,0) FIELDS(F) ; Process fields in File F. "RTN","XBLFAM",53,0) ; Field #, File #, File Name, Field Label, Field type, Desc/Help. "RTN","XBLFAM",54,0) NEW X,XB "RTN","XBLFAM",55,0) S X="" "RTN","XBLFAM",56,0) F XB=0:0 S XB=$O(^DD(F,XB)) Q:'(XB=+XB) D D:$Y>(IOSL-3) PAGE Q:QFLG "RTN","XBLFAM",57,0) . I $E($P($G(^DD(F,XB,0)),"^",1))="*" Q ; field is deprecated. "RTN","XBLFAM",58,0) . I $P(^DD(F,XB,0),"^",2) W $$OUTLINE,! D FIELDS(+$P(^DD(F,XB,0),"^",2)) Q ; Recurse sub-file. "RTN","XBLFAM",59,0) . W $$OUTLINE,! "RTN","XBLFAM",60,0) . Q "RTN","XBLFAM",61,0) Q "RTN","XBLFAM",62,0) ; ------------------------------------------------------- "RTN","XBLFAM",63,0) OUTLINE() ; "RTN","XBLFAM",64,0) ; File #, File Name, Field #, Field Label, Field type, Desc/Help., "RTN","XBLFAM",65,0) ; Min Length, Max Length "RTN","XBLFAM",66,0) Q F_";"_$$FNAME^XBFUNC(F)_";"_XB_";"_$P($G(^DD(F,XB,0)),"^",1)_";"_$$TYPE($P($G(^DD(F,XB,0)),"^",2))_";"_$$HP(F,XB)_$$DESC(F,XB)_$$TDESC(F,XB)_";"_$$MINL(F,XB)_";"_$$MAXL(F,XB)_";" "RTN","XBLFAM",67,0) ; ------------------------------------------------------- "RTN","XBLFAM",68,0) PAGE ; PAGE BREAK "RTN","XBLFAM",69,0) NEW F,G,N,X "RTN","XBLFAM",70,0) I IO=IO(0),$E(IOST,1,2)="C-" S QFLG='$$DIR^XBDIR("E") I 'QFLG W @IOF "RTN","XBLFAM",71,0) Q "RTN","XBLFAM",72,0) ; ------------------------------------------------------- "RTN","XBLFAM",73,0) MINL(N,F) ; Return minimum length "RTN","XBLFAM",74,0) NEW X "RTN","XBLFAM",75,0) S X=$P(^DD(N,F,0),"^",2) "RTN","XBLFAM",76,0) I X Q "-" "RTN","XBLFAM",77,0) I '(X["F") Q "-" "RTN","XBLFAM",78,0) S X=$P(^DD(N,F,0),"^",5,99) "RTN","XBLFAM",79,0) Q +$E(X,$F(X,"$L(X)<"),$L(X)) "RTN","XBLFAM",80,0) ; ------------------------------------------------------- "RTN","XBLFAM",81,0) MAXL(N,F) ; Return maximum length "RTN","XBLFAM",82,0) NEW X "RTN","XBLFAM",83,0) S X=$P(^DD(N,F,0),"^",2) "RTN","XBLFAM",84,0) I X Q "-" "RTN","XBLFAM",85,0) I '(X["F") Q "-" "RTN","XBLFAM",86,0) S X=$P(^DD(N,F,0),"^",5,99) "RTN","XBLFAM",87,0) Q +$E(X,$F(X,"$L(X)>"),$L(X)) "RTN","XBLFAM",88,0) ; ------------------------------------------------------- "RTN","XBLFAM",89,0) NUMBER(F) ;;.001;NUMBER "RTN","XBLFAM",90,0) Q F ; well, duh "RTN","XBLFAM",91,0) ; ------------------------------------------------------- "RTN","XBLFAM",92,0) LABEL(N,F) ;;.01;LABEL "RTN","XBLFAM",93,0) Q $P($G(^DD(N,F,0)),"^",1) "RTN","XBLFAM",94,0) ; ------------------------------------------------------- "RTN","XBLFAM",95,0) TITLE(N,F) ;;.1;TITLE "RTN","XBLFAM",96,0) Q $P($G(^DD(N,F,.1)),"^",1) "RTN","XBLFAM",97,0) ; ------------------------------------------------------- "RTN","XBLFAM",98,0) ;;.12;VARIABLE POINTER (multiple) "RTN","XBLFAM",99,0) ; ------------------------------------------------------- "RTN","XBLFAM",100,0) ;;.2;SPECIFIER "RTN","XBLFAM",101,0) ; ------------------------------------------------------- "RTN","XBLFAM",102,0) ;;.23;LENGTH "RTN","XBLFAM",103,0) ; ------------------------------------------------------- "RTN","XBLFAM",104,0) ;;.24;DECIMAL DEFAULT "RTN","XBLFAM",105,0) ; ------------------------------------------------------- "RTN","XBLFAM",106,0) TYPE(P) ;PEP;.25;TYPE "RTN","XBLFAM",107,0) ; Return TYPE of field. Input is the 2nd piece of the 0th node. "RTN","XBLFAM",108,0) I P Q "" "RTN","XBLFAM",109,0) NEW W "RTN","XBLFAM",110,0) F W="BOOLEAN","COMPUTED","FREE TEXT","SET","DATE","NUMBER","POINTER","WORD-PROCESSING","K","Z" I P[$E(W) Q "RTN","XBLFAM",111,0) I W="SET" S W=W_" <"_$TR($P($G(^DD(F,XB,0)),"^",3),";","|")_">" "RTN","XBLFAM",112,0) I W="POINTER" S W=W_" to "_$$FNAME^XBFUNC(+$P(P,"P",2))_" file" "RTN","XBLFAM",113,0) Q $S(W'="Z":W,1:"??") "RTN","XBLFAM",114,0) ; ------------------------------------------------------- "RTN","XBLFAM",115,0) ;;.26;COMPUTE ALGORITHM "RTN","XBLFAM",116,0) ; ------------------------------------------------------- "RTN","XBLFAM",117,0) ;;.27;SUB-FIELDS "RTN","XBLFAM",118,0) ; ------------------------------------------------------- "RTN","XBLFAM",119,0) ;;.28;MULTIPLE-VALUED "RTN","XBLFAM",120,0) ; ------------------------------------------------------- "RTN","XBLFAM",121,0) ;;.29;DEPTH OF SUB-FIELD "RTN","XBLFAM",122,0) ; ------------------------------------------------------- "RTN","XBLFAM",123,0) ;;.3;POINTER "RTN","XBLFAM",124,0) ; ------------------------------------------------------- "RTN","XBLFAM",125,0) GSL(N,F) ;;.4;GLOBAL SUBSCRIPT LOCATION "RTN","XBLFAM",126,0) Q 0 "RTN","XBLFAM",127,0) ; ------------------------------------------------------- "RTN","XBLFAM",128,0) IT(N,F) ;;.5;INPUT TRANSFORM "RTN","XBLFAM",129,0) Q $P($G(^DD(N,F,0)),"^",5,99) "RTN","XBLFAM",130,0) ; ------------------------------------------------------- "RTN","XBLFAM",131,0) ;;1;CROSS-REFERENCE (multiple) "RTN","XBLFAM",132,0) ; ------------------------------------------------------- "RTN","XBLFAM",133,0) AUDIT(N,F) ;;1.1;AUDIT "RTN","XBLFAM",134,0) Q $G(^DD(N,F,"AUDIT")) "RTN","XBLFAM",135,0) ; ------------------------------------------------------- "RTN","XBLFAM",136,0) ;;1.2;AUDIT CONDITION "RTN","XBLFAM",137,0) ; ------------------------------------------------------- "RTN","XBLFAM",138,0) OT(N,F) ;;2;OUTPUT TRANSFORM "RTN","XBLFAM",139,0) Q $G(^DD(N,F,2.1)) "RTN","XBLFAM",140,0) ; ------------------------------------------------------- "RTN","XBLFAM",141,0) HP(N,F) ;;3;'HELP'-PROMPT "RTN","XBLFAM",142,0) NEW X "RTN","XBLFAM",143,0) S X=$G(^DD(N,F,3)) "RTN","XBLFAM",144,0) I '$L(X) Q "" "RTN","XBLFAM",145,0) Q "HELP-PROMPT("_$G(^DD(N,F,3))_")" "RTN","XBLFAM",146,0) ; ------------------------------------------------------- "RTN","XBLFAM",147,0) XH(N,F) ;;4;XECUTABLE 'HELP' "RTN","XBLFAM",148,0) Q $G(^DD(N,F,4)) "RTN","XBLFAM",149,0) ; ------------------------------------------------------- "RTN","XBLFAM",150,0) RA(N,F) ;;8;READ ACCESS (OPTIONAL) "RTN","XBLFAM",151,0) Q $G(^DD(N,F,8)) "RTN","XBLFAM",152,0) ; ------------------------------------------------------- "RTN","XBLFAM",153,0) DA(N,F) ;;8.5;DELETE ACCESS (OPTIONAL) "RTN","XBLFAM",154,0) Q $G(^DD(N,F,8.5)) "RTN","XBLFAM",155,0) ; ------------------------------------------------------- "RTN","XBLFAM",156,0) WA(N,F) ;;9;WRITE ACCESS (OPTIONAL) "RTN","XBLFAM",157,0) Q $G(^DD(N,F,9)) "RTN","XBLFAM",158,0) ; ------------------------------------------------------- "RTN","XBLFAM",159,0) ;;9.01;COMPUTED FIELDS USED "RTN","XBLFAM",160,0) ; ------------------------------------------------------- "RTN","XBLFAM",161,0) SRC(N,F) ;;10;SOURCE "RTN","XBLFAM",162,0) Q $G(^DD(N,F,10)) "RTN","XBLFAM",163,0) ; ------------------------------------------------------- "RTN","XBLFAM",164,0) ;;11;DESTINATION (multiple) "RTN","XBLFAM",165,0) ; ------------------------------------------------------- "RTN","XBLFAM",166,0) ;;12;POINTER SCREEN "RTN","XBLFAM",167,0) ; ------------------------------------------------------- "RTN","XBLFAM",168,0) ;;12.1;CODE TO SET POINTER SCREEN "RTN","XBLFAM",169,0) ; ------------------------------------------------------- "RTN","XBLFAM",170,0) ;;12.2;EXPRESSION FOR POINTER SCREEN "RTN","XBLFAM",171,0) ; ------------------------------------------------------- "RTN","XBLFAM",172,0) ;;20;GROUP (multiple) "RTN","XBLFAM",173,0) ; ------------------------------------------------------- "RTN","XBLFAM",174,0) DESC(N,F) ;;21;DESCRIPTION (word-processing) "RTN","XBLFAM",175,0) ; Field DESCRIPTION and Help-Prompt. N=File, F=Field "RTN","XBLFAM",176,0) NEW X,XB "RTN","XBLFAM",177,0) S X="" "RTN","XBLFAM",178,0) F XB=0:0 S XB=$O(^DD(N,F,21,XB)) Q:'XB S X=X_$G(^(XB,0)) "RTN","XBLFAM",179,0) I '$L(X) Q "" "RTN","XBLFAM",180,0) Q "DESCRIPTION("_X_")" "RTN","XBLFAM",181,0) ; ------------------------------------------------------- "RTN","XBLFAM",182,0) TDESC(N,F) ;;23;TECHNICAL DESCRIPTION (word-processing) "RTN","XBLFAM",183,0) NEW X,XB "RTN","XBLFAM",184,0) S X="" "RTN","XBLFAM",185,0) F XB=0:0 S XB=$O(^DD(N,F,23,XB)) Q:'XB S X=X_$G(^(XB,0)) "RTN","XBLFAM",186,0) I '$L(X) Q "" "RTN","XBLFAM",187,0) Q "TECH_DESCRIPTION("_X_")" "RTN","XBLFAM",188,0) ; ------------------------------------------------------- "RTN","XBLFAM",189,0) DFLE(N,F) ;;50;DATE FIELD LAST EDITED "RTN","XBLFAM",190,0) Q $$FMTE^XLFDT($G(^DD(N,F,"DT"))) "RTN","XBLFAM",191,0) ; ------------------------------------------------------- "RTN","XBLFAM",192,0) ;;999;TRIGGERED-BY POINTER (multiple) "RTN","XBLFAM",193,0) ; ------------------------------------------------------- "RTN","XBLFAM",194,0) ; "RTN","XBLFD") 0^111^B5497221 "RTN","XBLFD",1,0) XBLFD ;IHS/SET/GTH - LISTS FILE DESCRIPTIONS ; [ 04/18/2003 9:05 AM ] "RTN","XBLFD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLFD",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New routine. "RTN","XBLFD",4,0) ; This routine lists the number, name, global, and, optionally, "RTN","XBLFD",5,0) ; description of the selected file(s). "RTN","XBLFD",6,0) ; "RTN","XBLFD",7,0) START ; "RTN","XBLFD",8,0) ; --- Display routine description. "RTN","XBLFD",9,0) D HOME^%ZIS,DT^DICRW "RTN","XBLFD",10,0) KILL ^UTILITY($J) "RTN","XBLFD",11,0) S ^UTILITY($J,"XBLFD")="" "RTN","XBLFD",12,0) D EN^XBRPTL "RTN","XBLFD",13,0) KILL ^UTILITY($J) "RTN","XBLFD",14,0) NEW QFLG,XBDESC "RTN","XBLFD",15,0) S QFLG=0 "RTN","XBLFD",16,0) ; --- Get file(s). "RTN","XBLFD",17,0) D ^XBDSET "RTN","XBLFD",18,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBLFD",19,0) ; --- Print DESCRIPTION flag. "RTN","XBLFD",20,0) S XBDESC=$$DIR^XBDIR("Y","Print file DESCRIPTION ","Y",$G(DTIME,500),"You can include the DESCRIPTION of the file in your list") "RTN","XBLFD",21,0) Q:Y="^" "RTN","XBLFD",22,0) I XBDESC NEW DIWL,DIWR,DIWF S DIWL=14,DIWR=74,DIWF="W" "RTN","XBLFD",23,0) ; --- Select device. "RTN","XBLFD",24,0) W ! "RTN","XBLFD",25,0) S %ZIS="Q",ZTSAVE("^UTILITY(""XBDSET"",$J,")="" "RTN","XBLFD",26,0) D EN^XUTMDEVQ("EN^XBLFD","List File Descriptions.",.ZTSAVE,.%ZIS) "RTN","XBLFD",27,0) D EN^XBVK("ZT") "RTN","XBLFD",28,0) Q "RTN","XBLFD",29,0) ; "RTN","XBLFD",30,0) EN ;PEP - List 0th node of pre-selected list of FileMan files. "RTN","XBLFD",31,0) ; IOF,IOSL must be set and U IO if appropriate. "RTN","XBLFD",32,0) I $D(IOF)#2,$D(IOSL)#2 "RTN","XBLFD",33,0) E Q "RTN","XBLFD",34,0) NEW F,G,N,X,QFLG "RTN","XBLFD",35,0) ; F:File #; G:Global; N:Zeroth "RTN","XBLFD",36,0) S QFLG=0 "RTN","XBLFD",37,0) D HEADER "RTN","XBLFD",38,0) S F=0 "RTN","XBLFD",39,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F S G=$$FGLOB^XBFUNC(F) I G'=-1 D LIST Q:QFLG "RTN","XBLFD",40,0) D ^%ZISC "RTN","XBLFD",41,0) Q "RTN","XBLFD",42,0) ; "RTN","XBLFD",43,0) LIST ; "RTN","XBLFD",44,0) D:$Y>(IOSL-3) PAGE "RTN","XBLFD",45,0) Q:QFLG "RTN","XBLFD",46,0) W F,?13,$$FNAME^XBFUNC(F),?60,G,! "RTN","XBLFD",47,0) I XBDESC D DESC(F) "RTN","XBLFD",48,0) Q "RTN","XBLFD",49,0) ; "RTN","XBLFD",50,0) DESC(F) ; Print file DESCRIPTION. "RTN","XBLFD",51,0) NEW XB "RTN","XBLFD",52,0) F XB=0:0 S XB=$O(^DIC(F,"%D",XB)) Q:'XB S X=$G(^(XB,0)) D ^DIWP I $Y>(IOSL-3) D PAGE Q:QFLG "RTN","XBLFD",53,0) Q:QFLG "RTN","XBLFD",54,0) D ^DIWW "RTN","XBLFD",55,0) Q "RTN","XBLFD",56,0) ; "RTN","XBLFD",57,0) PAGE ; PAGE BREAK "RTN","XBLFD",58,0) NEW F,G,N,X "RTN","XBLFD",59,0) I IO=IO(0),$E(IOST,1,2)="C-" S Y=$$DIR^XBDIR("E") S:$D(DIRUT)!($D(DUOUT)) QFLG=1 KILL DIRUT,DUOUT "RTN","XBLFD",60,0) Q:QFLG "RTN","XBLFD",61,0) D HEADER "RTN","XBLFD",62,0) Q "RTN","XBLFD",63,0) ; "RTN","XBLFD",64,0) HEADER ; PRINT HEADER "RTN","XBLFD",65,0) W @IOF,$$FMTE^XLFDT($$NOW^XLFDT),?34,"FILE DESCRIPTIONS" "RTN","XBLFD",66,0) X ^%ZOSF("UCI") "RTN","XBLFD",67,0) W ?65,$P(Y," ",1),!,$$REPEAT^XLFSTR("-",IOM),!,"NUMBER",?13,"FILE",?60,"GLOBAL",! "RTN","XBLFD",68,0) I XBDESC W ?13,"",! "RTN","XBLFD",69,0) W $$REPEAT^XLFSTR("-",IOM),!! "RTN","XBLFD",70,0) Q "RTN","XBLFD",71,0) ; "RTN","XBLFMD") 0^112^B6160303 "RTN","XBLFMD",1,0) XBLFMD ;IHS/SET/GTH - LISTS FIELDS MARKED FOR DELETION ; [ 10/29/2002 7:42 AM ] "RTN","XBLFMD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLFMD",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine. "RTN","XBLFMD",4,0) ; List fields in the selected files that are marked for deletion. "RTN","XBLFMD",5,0) ; Output is File#, File Name, Field#, Field Name, Date Of Edit "RTN","XBLFMD",6,0) START ; "RTN","XBLFMD",7,0) ; --- Display routine description. "RTN","XBLFMD",8,0) D HOME^%ZIS,DT^DICRW "RTN","XBLFMD",9,0) KILL ^UTILITY($J) "RTN","XBLFMD",10,0) S ^UTILITY($J,"XBLFMD")="" "RTN","XBLFMD",11,0) D EN^XBRPTL "RTN","XBLFMD",12,0) KILL ^UTILITY($J) "RTN","XBLFMD",13,0) NEW QFLG "RTN","XBLFMD",14,0) S QFLG=0 "RTN","XBLFMD",15,0) ; --- Get file(s). "RTN","XBLFMD",16,0) D ^XBDSET "RTN","XBLFMD",17,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBLFMD",18,0) D DEVICE "RTN","XBLFMD",19,0) Q:QFLG "RTN","XBLFMD",20,0) NEW F,X,XBUCI,XBDASH,XBTIME "RTN","XBLFMD",21,0) X ^%ZOSF("UCI") "RTN","XBLFMD",22,0) S XBUCI=Y,XBDASH=$$REPEAT^XLFSTR("-",IOM),XBTIME=$$FMTE^XLFDT($$NOW^XLFDT) "RTN","XBLFMD",23,0) ; F:File # "RTN","XBLFMD",24,0) S F=0 "RTN","XBLFMD",25,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D FIELDS(F) Q:QFLG "RTN","XBLFMD",26,0) D ^%ZISC "RTN","XBLFMD",27,0) Q "RTN","XBLFMD",28,0) ; "RTN","XBLFMD",29,0) FIELDS(F) ; Process fields in File F. "RTN","XBLFMD",30,0) ; Output is File#, Field#, Field Name, Date Of Edit "RTN","XBLFMD",31,0) NEW X,XB "RTN","XBLFMD",32,0) S X="" "RTN","XBLFMD",33,0) F XB=0:0 S XB=$O(^DD(F,XB)) Q:'(XB=+XB) D D:$Y>(IOSL-3) PAGE Q:QFLG "RTN","XBLFMD",34,0) . I $E($P($G(^DD(F,XB,0)),"^",1))="*" W $J(F,10),?12,$E($$FNAME^XBFUNC(F),1,20),?32,$J(XB,10),?44,$E($P($G(^DD(F,XB,0)),"^",1),1,24),?68,$$FMTE^XLFDT($G(^DD(F,XB,"DT"))),! "RTN","XBLFMD",35,0) . I $P(^DD(F,XB,0),"^",2) D FIELDS(+$P(^DD(F,XB,0),"^",2)) Q ; Recurse sub-file. "RTN","XBLFMD",36,0) .Q "RTN","XBLFMD",37,0) Q "RTN","XBLFMD",38,0) ; "RTN","XBLFMD",39,0) PAGE ; PAGE BREAK "RTN","XBLFMD",40,0) NEW F,G,N,X "RTN","XBLFMD",41,0) I IO=IO(0),$E(IOST,1,2)="C-" S QFLG='$$DIR^XBDIR("E") I QFLG Q "RTN","XBLFMD",42,0) W @IOF "RTN","XBLFMD",43,0) W !,"Fields Marked For Deletion in ",XBUCI," uci.",?(IOM-$L(XBTIME)),XBTIME "RTN","XBLFMD",44,0) W !,"File#",?12,"File Name",?32,"Field#",?44,"Field Name",?68,"Date Of Edit" "RTN","XBLFMD",45,0) W !,XBDASH,! "RTN","XBLFMD",46,0) Q "RTN","XBLFMD",47,0) ; "RTN","XBLFMD",48,0) DEVICE ; GET DEVICE (QUEUEING ALLOWED) "RTN","XBLFMD",49,0) W ! "RTN","XBLFMD",50,0) S %ZIS="Q" "RTN","XBLFMD",51,0) D ^%ZIS "RTN","XBLFMD",52,0) I POP S QFLG=1 KILL POP Q "RTN","XBLFMD",53,0) I $D(IO("Q")) D S QFLG=1 Q "RTN","XBLFMD",54,0) . S ZTRTN="EN^XBLFMD",ZTIO=ION,ZTDESC="List 0th nodes",ZTSAVE("^UTILITY(""XBDSET"",$J,")="" "RTN","XBLFMD",55,0) . D ^%ZTLOAD "RTN","XBLFMD",56,0) . W !!,$S($D(ZTSK):"Request queued!",1:"Request cancelled!") "RTN","XBLFMD",57,0) . D ^%ZISC "RTN","XBLFMD",58,0) . KILL ZTSK,IO("Q") "RTN","XBLFMD",59,0) . KILL ZTIO ; ^%ZTLOAD kills other ZT* variables, but not this one "RTN","XBLFMD",60,0) . Q "RTN","XBLFMD",61,0) U IO "RTN","XBLFMD",62,0) Q "RTN","XBLFMD",63,0) ; "RTN","XBLFSETS") 0^113^B12397617 "RTN","XBLFSETS",1,0) XBLFSETS ;IHS/SET/GTH - LISTS FILE SETS ; [ 04/18/2003 9:06 AM ] "RTN","XBLFSETS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLFSETS",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine. "RTN","XBLFSETS",4,0) ; This routine lists the following file information, useful for "RTN","XBLFSETS",5,0) ; moving to a spreadsheet, or other desktop ap, for database "RTN","XBLFSETS",6,0) ; Reference Terminology Modeling (RTM) activities: "RTN","XBLFSETS",7,0) ; CodeSetID;Acronym;Name;Requirement;Source;Information; "RTN","XBLFSETS",8,0) ; Note;DataType;MinSize;MaxSize;File #;Field # "RTN","XBLFSETS",9,0) ; The output is one line of data per field, semi-colon delimited. "RTN","XBLFSETS",10,0) ; Only fields of type SET are reported. Y/N fields are skipped. "RTN","XBLFSETS",11,0) ; (See routine for more info.) "RTN","XBLFSETS",12,0) MORE ; "RTN","XBLFSETS",13,0) ; CodeSetID: This is an identifier that is used to uniquely identify "RTN","XBLFSETS",14,0) ; the codeset. Some of these codeset ids are the formal "RTN","XBLFSETS",15,0) ; standard identifier such as "ICD 9-CM" or "ISO 3166"; "RTN","XBLFSETS",16,0) ; others have been assigned an unofficial codeset id. "RTN","XBLFSETS",17,0) ; Acronym: This is an abbreviated name for the codeset. "RTN","XBLFSETS",18,0) ; Name: This is the name of the codeset. "RTN","XBLFSETS",19,0) ; Requirement: This is an indicator that specifies the codeset is "RTN","XBLFSETS",20,0) ; required by regulation. An "H" denotes that the codeset "RTN","XBLFSETS",21,0) ; is required for HIPAA; an "O" denotes a requirement by "RTN","XBLFSETS",22,0) ; the Office of Management and Budget (OMB). "RTN","XBLFSETS",23,0) ; Source: This is the originating source of the codeset. "RTN","XBLFSETS",24,0) ; Information: This is information about the codeset or the location "RTN","XBLFSETS",25,0) ; of information about the codeset. "RTN","XBLFSETS",26,0) ; Note: This contains notes that may assist in locating, using, "RTN","XBLFSETS",27,0) ; documenting, etc., the codeset. "RTN","XBLFSETS",28,0) ; DateType: This is the datatype of the codeset. "RTN","XBLFSETS",29,0) ; MinSize: This is the maximum character size of the coded value. "RTN","XBLFSETS",30,0) ; MaxSize: This is the minimum character size of the coded value. "RTN","XBLFSETS",31,0) ; "RTN","XBLFSETS",32,0) START ; "RTN","XBLFSETS",33,0) ; --- Display routine description. "RTN","XBLFSETS",34,0) D HOME^%ZIS,DT^DICRW "RTN","XBLFSETS",35,0) KILL ^UTILITY($J) "RTN","XBLFSETS",36,0) S ^UTILITY($J,"XBLFSETS")="" "RTN","XBLFSETS",37,0) D EN^XBRPTL "RTN","XBLFSETS",38,0) KILL ^UTILITY($J) "RTN","XBLFSETS",39,0) ; --- Get file(s). "RTN","XBLFSETS",40,0) D ^XBDSET "RTN","XBLFSETS",41,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBLFSETS",42,0) S XBIHS=$$DIR^XBDIR("N^500:999:0","Enter the beginning CodeSet ID number",500,"The response must be a number") "RTN","XBLFSETS",43,0) Q:Y="^" "RTN","XBLFSETS",44,0) ; --- Select device. "RTN","XBLFSETS",45,0) W ! "RTN","XBLFSETS",46,0) S %ZIS="Q",ZTSAVE("^UTILITY(""XBDSET"",$J,")="",ZTSAVE("XBIHS")="" "RTN","XBLFSETS",47,0) D EN^XUTMDEVQ("EN^XBLFSETS","List File Sets",.ZTSAVE,.%ZIS) "RTN","XBLFSETS",48,0) D EN^XBVK("ZT") "RTN","XBLFSETS",49,0) Q "RTN","XBLFSETS",50,0) ; "RTN","XBLFSETS",51,0) EN ;EP - from TaskMan. "RTN","XBLFSETS",52,0) VARS ;;F,N,X,W;Single-char work vars. "RTN","XBLFSETS",53,0) ; F:File # "RTN","XBLFSETS",54,0) NEW XBQFLG,@($P($T(VARS),";",3)) "RTN","XBLFSETS",55,0) S (XBQFLG,F)=0 "RTN","XBLFSETS",56,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D PAGE Q:XBQFLG D FIELDS(F) Q:XBQFLG "RTN","XBLFSETS",57,0) D ^%ZISC "RTN","XBLFSETS",58,0) Q "RTN","XBLFSETS",59,0) ; "RTN","XBLFSETS",60,0) FIELDS(F) ; Process fields in File F. "RTN","XBLFSETS",61,0) NEW X,XB "RTN","XBLFSETS",62,0) S XB=0 "RTN","XBLFSETS",63,0) F S XB=$O(^DD(F,XB)) Q:'(XB=+XB) D D:$Y>(IOSL-3) PAGE Q:XBQFLG "RTN","XBLFSETS",64,0) . I $E($P($G(^DD(F,XB,0)),"^",1))="*" Q ; field is deprecated. "RTN","XBLFSETS",65,0) . I $P(^DD(F,XB,0),"^",2) D FIELDS($P(^(0),"^",2)) Q ; Recurse sub-file. "RTN","XBLFSETS",66,0) . S X=$$TYPE($P($G(^DD(F,XB,0)),"^",2)) "RTN","XBLFSETS",67,0) . I X'="SET" Q ; Process only SETs. "RTN","XBLFSETS",68,0) . I $P($$FINFO(F,XB),"<",2)="1:YES|0:NO|>" Q ; Skip Y/N fields. "RTN","XBLFSETS",69,0) . ; CodeSetID;Acronym;Name;Requirement;Source "RTN","XBLFSETS",70,0) . S XBIHS=XBIHS+1 "RTN","XBLFSETS",71,0) . W "IHS"_$J(XBIHS,3,0)_";;"_$P($G(^DD(F,XB,0)),"^",1)_";;;" "RTN","XBLFSETS",72,0) . ; Information;Note;DataType;MinSize;MaxSize;File #;Field # "RTN","XBLFSETS",73,0) . W $$DESC(F,XB)_";"_$$FINFO(F,XB)_";"_$$TYPE($P($G(^DD(F,XB,0)),"^",2))_";;;"_F_";"_XB_";" "RTN","XBLFSETS",74,0) . W ! "RTN","XBLFSETS",75,0) . Q "RTN","XBLFSETS",76,0) Q "RTN","XBLFSETS",77,0) ; "RTN","XBLFSETS",78,0) DESC(N,F) ; Field DESCRIPTION and Help-Prompt. N=File, F=Field "RTN","XBLFSETS",79,0) NEW X,XB "RTN","XBLFSETS",80,0) S X="" "RTN","XBLFSETS",81,0) S X="File Number "_N_", '"_$$FNAME^XBFUNC(N)_"', Field # "_F_", In Global "_$$FGLOB^XBFUNC(N)_", DESCRIPTION <" "RTN","XBLFSETS",82,0) F XB=0:0 S XB=$O(^DD(N,F,21,XB)) Q:'XB S X=X_$G(^(XB,0)) "RTN","XBLFSETS",83,0) S X=X_"> HELP-PROMPT <"_$G(^DD(N,F,3))_">" "RTN","XBLFSETS",84,0) Q X "RTN","XBLFSETS",85,0) ; "RTN","XBLFSETS",86,0) TYPE(P) ; Return TYPE of field. Input is the 2nd piece of the 0th node. "RTN","XBLFSETS",87,0) NEW W "RTN","XBLFSETS",88,0) F W="BOOLEAN","COMPUTED","FREE TEXT","SET","DATE","NUMBER","POINTER","K","Z" I P[$E(W) Q "RTN","XBLFSETS",89,0) Q $S(W'="Z":W,1:"?") "RTN","XBLFSETS",90,0) ; "RTN","XBLFSETS",91,0) FINFO(N,F) ; Return SET values, or Pointed-To. N=File, F=Field "RTN","XBLFSETS",92,0) NEW T "RTN","XBLFSETS",93,0) S T=$$TYPE($P(^DD(N,F,0),"^",2)) "RTN","XBLFSETS",94,0) I T="SET" Q "Values <"_$TR($P($G(^DD(N,F,0)),"^",3),";","|")_">" "RTN","XBLFSETS",95,0) I T="POINTER" Q " Points to "_$$FNAME^XBFUNC(+$P($P(^DD(N,F,0),"^",2),"P",2))_" file" "RTN","XBLFSETS",96,0) Q "?" "RTN","XBLFSETS",97,0) ; "RTN","XBLFSETS",98,0) PAGE ; PAGE BREAK "RTN","XBLFSETS",99,0) NEW F,G,N,X "RTN","XBLFSETS",100,0) I IO=IO(0),$E(IOST,1,2)="C-" S XBQFLG='$$DIR^XBDIR("E") I 'XBQFLG W @IOF "RTN","XBLFSETS",101,0) Q "RTN","XBLFSETS",102,0) ; "RTN","XBLM") 0^114^B47237069 "RTN","XBLM",1,0) XBLM ; IHS/ADC/GTH - LIST MANAGER API'S ; [ 09/30/2004 12:07 PM ] "RTN","XBLM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLM",3,0) ; XB*3*5,6 IHS/ADC/GTH 10-31-97 Use %ZIS to open HF vs $$OPEN^%ZISH "RTN","XBLM",4,0) ; XB*3*8 - IHS/ASDST/GTH 12-07-00 - Fix EOF bug in UNIX, timed READ. "RTN","XBLM",5,0) ; "RTN","XBLM",6,0) ; Documentation APIs for XBLM Generic Display. "RTN","XBLM",7,0) ; "RTN","XBLM",8,0) ; This utility uses the Veterans Administration List Manager "RTN","XBLM",9,0) ; (VALM). "RTN","XBLM",10,0) ; "RTN","XBLM",11,0) ; APIs "RTN","XBLM",12,0) ; "RTN","XBLM",13,0) ; FILE^XBLM("Directory","File Name") "RTN","XBLM",14,0) ; Displays file indicated. "RTN","XBLM",15,0) ; "RTN","XBLM",16,0) ; SFILE^XBLM "RTN","XBLM",17,0) ; Selection of host file for display. "RTN","XBLM",18,0) ; "RTN","XBLM",19,0) ; VIEWR^XBLM("TAG^ROUTINE","Header") "RTN","XBLM",20,0) ; Displays printout of the routine. (non - FM, using IO) "RTN","XBLM",21,0) ; "RTN","XBLM",22,0) ; VIEWD^XBLM("Tag^Routine","Header") "RTN","XBLM",23,0) ; Displays printout of the routine. (FM - using EN1^DIP) "RTN","XBLM",24,0) ; "RTN","XBLM",25,0) ; DIQ^XBLM("DIC","DA") "RTN","XBLM",26,0) ; Displays EN1^DIQ for the DIC,DA. "RTN","XBLM",27,0) ; "RTN","XBLM",28,0) ; ARRAY^XBLM("array(","Header") "RTN","XBLM",29,0) ; Displays the array(..,n,0) (%RCR notation) "RTN","XBLM",30,0) ; "RTN","XBLM",31,0) ; >>GUI<< "RTN","XBLM",32,0) ; "RTN","XBLM",33,0) ; GUIR^XBLM("TAG^ROUTINE","root(") "RTN","XBLM",34,0) ; Returns the hard coded output in the array specified. "RTN","XBLM",35,0) ; "(" not required. "RTN","XBLM",36,0) ; "RTN","XBLM",37,0) ; GUID^XBLM("TAG^ROUTINE","root(") "RTN","XBLM",38,0) ; Returns the output of the FM routine specified in the "RTN","XBLM",39,0) ; array specified. Most often the call is "EN1^DIP". "RTN","XBLM",40,0) ; "RTN","XBLM",41,0) ; S XBGUI=1,XBY="root(" D entry_point^XBLM "RTN","XBLM",42,0) ; The entry points sense these two variables and will "RTN","XBLM",43,0) ; put the output into the array specified. "RTN","XBLM",44,0) ; "RTN","XBLM",45,0) EN ;EP -- main entry point for XB DISPLAY "RTN","XBLM",46,0) D EN^VALM("XB DISPLAY") "RTN","XBLM",47,0) Q "RTN","XBLM",48,0) ; "RTN","XBLM",49,0) HDR ;EP -- header code "RTN","XBLM",50,0) I XBHDR]"" S VALMHDR(1)=XBHDR "RTN","XBLM",51,0) Q "RTN","XBLM",52,0) ; "RTN","XBLM",53,0) INIT ;EP -- init variables and list array "RTN","XBLM",54,0) MARKERS ; "RTN","XBLM",55,0) I $G(XBLMMARK) F I=10:10 Q:'$D(@VALMAR@(I)) D "RTN","XBLM",56,0) . F J=10:10:80 D CNTRL^VALM10(I,J,1,IORVON,IORVOFF) "RTN","XBLM",57,0) .Q "RTN","XBLM",58,0) KILL XBLMMARK "RTN","XBLM",59,0) S VALMCNT=$O(^TMP("XBLM",$J,XBNODE,""),-1) "RTN","XBLM",60,0) Q "RTN","XBLM",61,0) ; "RTN","XBLM",62,0) HELP ;EP -- help code "RTN","XBLM",63,0) S X="?" "RTN","XBLM",64,0) D DISP^XQORM1 "RTN","XBLM",65,0) W !! "RTN","XBLM",66,0) Q "RTN","XBLM",67,0) ; "RTN","XBLM",68,0) EXIT ;EP -- exit code "RTN","XBLM",69,0) KILL ^TMP("XBLM",$J,XBNODE) "RTN","XBLM",70,0) K ; "RTN","XBLM",71,0) KILL XBAR,XBDIR,XBFL,XBFN,XBHDR,XBI,XBROU,XBDIR "RTN","XBLM",72,0) I '$G(XQORS) D CLEAR^VALM1 "RTN","XBLM",73,0) K IOPAR,IOUPAR "RTN","XBLM",74,0) Q "RTN","XBLM",75,0) ; "RTN","XBLM",76,0) EXPND ;EP -- expand code "RTN","XBLM",77,0) Q "RTN","XBLM",78,0) ; "RTN","XBLM",79,0) FILE(XBDIR,XBFN) ;PEP - pull up a file into the TMP global for display "RTN","XBLM",80,0) ; or into an array for GUI (see GUIR and GUID entry points) "RTN","XBLM",81,0) I '$D(XBHDR) S XBHDR="" "RTN","XBLM",82,0) NEW Y,X,I,XBNODE "RTN","XBLM",83,0) S XBNODE=$G(XQORS)+1 "RTN","XBLM",84,0) ;S Y=$$OPEN^%ZISH(XBDIR,XBFN,"M") "RTN","XBLM",85,0) ;open hfs with zis "RTN","XBLM",86,0) D DF^%ZISH(.XBDIR) "RTN","XBLM",87,0) ; "RTN","XBLM",88,0) ; IHS/ADC/GTH XB*3*5 start of open HF change "RTN","XBLM",89,0) KILL %ZIS "RTN","XBLM",90,0) I ('$D(^%ZIS(1,"B","XBLM HF DEVICE")))!('$D(^%ZIS(2,"B","P-XBLM"))) D ^XBLMSET "RTN","XBLM",91,0) S IOP="XBLM HF DEVICE",%ZIS("HFSMODE")="R",%ZIS("HFSNAME")=XBDIR_XBFN "RTN","XBLM",92,0) D ^%ZIS "RTN","XBLM",93,0) I POP W !,*7,"CANNOT OPEN (OR ACCESS) FILE '",XBDIR,XBFN,"'." S Y=$$DIR^XBDIR("E") G EFILE "RTN","XBLM",94,0) KILL ^TMP("XBLM",$J,XBNODE) "RTN","XBLM",95,0) ; F I=1:1 U IO R X:DTIME S:($L(X)>250) X=$E(X,1,250) S X=$$STRIP(X) S ^TMP("XBLM",$J,XBNODE,I,0)=X Q:$$STATUS^%ZISH ; XB*3*8 "RTN","XBLM",96,0) F I=1:1 U IO R X S:($L(X)>250) X=$E(X,1,250) S X=$$STRIP(X) S ^TMP("XBLM",$J,XBNODE,I,0)=X Q:$$STATUS^%ZISH ; XB*3*8 - UNIX does not find EOF w/timed READ, writes to ^TMP(, and fills up journal space. "RTN","XBLM",97,0) D ^%ZISC "RTN","XBLM",98,0) ; IHS/ADC/GTH XB*3*5 END of open HF change "RTN","XBLM",99,0) ; "RTN","XBLM",100,0) I $G(XBGUI) D KILL ^TMP("XBLM",$J,XBNODE) Q "RTN","XBLM",101,0) . S I=0 "RTN","XBLM",102,0) . S XBY=$$OPENROOT(XBY) "RTN","XBLM",103,0) . F S I=$O(^TMP("XBLM",$J,XBNODE,I)) Q:'+I S XBZ=XBY_"I)",@XBZ=^TMP("XBLM",$J,XBNODE,I,0) "RTN","XBLM",104,0) .Q "RTN","XBLM",105,0) D EN^XBLM "RTN","XBLM",106,0) KILL ^TMP("XBLM",$J,XBNODE) "RTN","XBLM",107,0) EFILE ; "RTN","XBLM",108,0) Q "RTN","XBLM",109,0) ; "RTN","XBLM",110,0) SFILE ;PEP - Select a host file for display. "RTN","XBLM",111,0) OPEN ; "RTN","XBLM",112,0) S IOP="HOME" "RTN","XBLM",113,0) D ^%ZIS,DT^DICRW,^XBCLS "RTN","XBLM",114,0) W !!,"Select a Directory and File",!! "RTN","XBLM",115,0) S Y=$$PWD^%ZISH(.XBDIR),XBDIR=XBDIR(1) "RTN","XBLM",116,0) KILL DIR "RTN","XBLM",117,0) S DIR(0)="F^1:30",DIR("A")="Directory ",DIR("B")=XBDIR "RTN","XBLM",118,0) K XBDIR "RTN","XBLM",119,0) D ^DIR "RTN","XBLM",120,0) KILL DIR "RTN","XBLM",121,0) Q:$G(DTOUT) "RTN","XBLM",122,0) Q:Y["^" "RTN","XBLM",123,0) S XBDIR=Y "RTN","XBLM",124,0) FNAME ;PEP - Select a file (directory can be pre-loaded into XBDIR) "RTN","XBLM",125,0) KILL DIR "RTN","XBLM",126,0) FNAME1 ; "RTN","XBLM",127,0) S DIR(0)="FO^1:15",DIR("A")="File Name " "RTN","XBLM",128,0) D ^DIR "RTN","XBLM",129,0) KILL DIR "RTN","XBLM",130,0) Q:$G(DTOUT) "RTN","XBLM",131,0) G:Y["^" OPEN "RTN","XBLM",132,0) G:Y="" OPEN "RTN","XBLM",133,0) I Y?.N,$D(XBFL(Y)) S DIR("B")=XBFL(Y) G FNAME1 "RTN","XBLM",134,0) I Y["*" K XBFL S X=$$LIST^%ZISH(XBDIR,Y,.XBFL) D G FNAME "RTN","XBLM",135,0) . F XBI=1:1 Q:'$D(XBFL(XBI)) W !?5,XBI,?10,XBFL(XBI) I '(XBI#20) R X:DTIME "RTN","XBLM",136,0) .Q "RTN","XBLM",137,0) S XBFN=Y "RTN","XBLM",138,0) ;S X=$$OPEN^%ZISH(XBDIR,XBFN,"M") "RTN","XBLM",139,0) ;open hfs with zis "RTN","XBLM",140,0) D DF^%ZISH(.XBDIR) "RTN","XBLM",141,0) ; "RTN","XBLM",142,0) ; IHS/ADC/GTH XB*3*5 start of open HF change "RTN","XBLM",143,0) KILL %ZIS "RTN","XBLM",144,0) I ('$D(^%ZIS(1,"B","XBLM HF DEVICE")))!('$D(^%ZIS(2,"B","P-XBLM"))) D ^XBLMSET "RTN","XBLM",145,0) S IOP="XBLM HF DEVICE",%ZIS("HFSMODE")="R",%ZIS("HFSNAME")=XBDIR_XBFN "RTN","XBLM",146,0) D ^%ZIS "RTN","XBLM",147,0) ES ; "RTN","XBLM",148,0) I POP W !,"error on open of file ",XBDIR,XBFN,! S Y=$$DIR^XBDIR("E") Q:Y=1 G FNAME "RTN","XBLM",149,0) D ^%ZISC "RTN","XBLM",150,0) D FILE^XBLM(XBDIR,XBFN) "RTN","XBLM",151,0) K XBFN "RTN","XBLM",152,0) ESFILE ; "RTN","XBLM",153,0) G FNAME "RTN","XBLM",154,0) Q "RTN","XBLM",155,0) ; "RTN","XBLM",156,0) VIEWR(XBROU,XBHDR) ;PEP ** USING XBROU print to a host file for viewing "RTN","XBLM",157,0) I '$D(XBHDR) S XBHDR="" "RTN","XBLM",158,0) I +$G(IO(0)) U IO(0) D:'$G(XBGUI) WAIT^DICD "RTN","XBLM",159,0) S Y=$$PWD^%ZISH(.XBDIR) "RTN","XBLM",160,0) S XBDIR=XBDIR(1),XBFN="XB"_$J "RTN","XBLM",161,0) ;open hfs with zis "RTN","XBLM",162,0) D DF^%ZISH(.XBDIR) "RTN","XBLM",163,0) K %ZIS "RTN","XBLM",164,0) S XBIOM=IOM "RTN","XBLM",165,0) I ('$D(^%ZIS(1,"B","XBLM HF DEVICE")))!('$D(^%ZIS(2,"B","P-XBLM"))) D ^XBLMSET "RTN","XBLM",166,0) S IOP="XBLM HF DEVICE;"_IOM_";6000" "RTN","XBLM",167,0) S %ZIS("HFSMODE")="W",%ZIS("HFSNAME")=XBDIR_XBFN "RTN","XBLM",168,0) D ^%ZIS "RTN","XBLM",169,0) U IO "RTN","XBLM",170,0) K DX ;IHS/JDH 6/17/98 prevent if defined when DIQ is called "RTN","XBLM",171,0) D @XBROU "RTN","XBLM",172,0) D ^%ZISC,HOME^%ZIS "RTN","XBLM",173,0) D FILE^XBLM(XBDIR,XBFN) "RTN","XBLM",174,0) S X=$$DEL^%ZISH(XBDIR,XBFN) "RTN","XBLM",175,0) S IOM=XBIOM "RTN","XBLM",176,0) KILL XBDIR,XBFN,XBHDR,XBNODE,XBDIR,XBFN,XBIOM "RTN","XBLM",177,0) ; IHS/ADC/GTH XB*3*5 END of open HF change "RTN","XBLM",178,0) ; "RTN","XBLM",179,0) Q "RTN","XBLM",180,0) ; "RTN","XBLM",181,0) GUIR(XBROU,XBY) ;PEP - give routine and target array "RTN","XBLM",182,0) Q:$L(XBY)=0 "RTN","XBLM",183,0) ; "RTN","XBLM",184,0) S XBGUI=1 "RTN","XBLM",185,0) D VIEWR^XBLM(XBROU,"") "RTN","XBLM",186,0) KILL XBGUI,XBY "RTN","XBLM",187,0) Q "RTN","XBLM",188,0) ; "RTN","XBLM",189,0) GUID(XBROU,XBY) ;PEP give routine and target array for FM prints "RTN","XBLM",190,0) Q:$L(XBY)=0 "RTN","XBLM",191,0) S:XBY["(" XBY=$P(XBY,"(") "RTN","XBLM",192,0) S XBGUI=1 "RTN","XBLM",193,0) D VIEWD^XBLM(XBROU,"") "RTN","XBLM",194,0) KILL XBGUI,XBY "RTN","XBLM",195,0) Q "RTN","XBLM",196,0) ; "RTN","XBLM",197,0) VIEWD(XBROU,XBHDR) ;PEP ** USING XBROU print to a host file for viewing "RTN","XBLM",198,0) S:'$D(XBHDR) XBHDR="" "RTN","XBLM",199,0) I +$G(IO(0)) I '$G(XBGUI) U IO(0) D WAIT^DICD "RTN","XBLM",200,0) S XBFN="XB"_$J,Y=$$PWD^%ZISH(.XBDIR),XBDIR=XBDIR(1) "RTN","XBLM",201,0) ;S X=$$OPEN^%ZISH(XBDIR,XBFN,"W"),IOP=IO_";P-OTHER;"_IOM_";"_IOSL "RTN","XBLM",202,0) ;open hfs with zis "RTN","XBLM",203,0) D DF^%ZISH(.XBDIR) "RTN","XBLM",204,0) ; "RTN","XBLM",205,0) ; IHS/ADC/GTH XB*3*5 start of open HF change "RTN","XBLM",206,0) KILL %ZIS "RTN","XBLM",207,0) S XBIOM=IOM "RTN","XBLM",208,0) I ('$D(^%ZIS(1,"B","XBLM HF DEVICE")))!('$D(^%ZIS(2,"B","P-XBLM"))) D ^XBLMSET "RTN","XBLM",209,0) S IOP="XBLM HF DEVICE;"_IOM_";6000" "RTN","XBLM",210,0) S %ZIS("HFSMODE")="W",%ZIS("HFSNAME")=XBDIR_XBFN "RTN","XBLM",211,0) ;D ^%ZIS ;XBROU must open device, XB*3*10, dmj "RTN","XBLM",212,0) D @XBROU "RTN","XBLM",213,0) K DX ;IHS/JDH 6/17/98 prevent if defined when DIQ is called "RTN","XBLM",214,0) D ^%ZISC,HOME^%ZIS "RTN","XBLM",215,0) D FILE^XBLM(XBDIR,XBFN) "RTN","XBLM",216,0) S X=$$DEL^%ZISH(XBDIR,XBFN) "RTN","XBLM",217,0) S IOM=XBIOM "RTN","XBLM",218,0) KILL XBDIR,XBFN,XBNODE,XBDIR,XBFN,XBIOM "RTN","XBLM",219,0) ; IHS/ADC/GTH XB*3*5 END of open HF change "RTN","XBLM",220,0) ; "RTN","XBLM",221,0) Q "RTN","XBLM",222,0) ; "RTN","XBLM",223,0) DIQ(DIC,DA) ;PEP - Display DIC and DA after call to EN^DIQ "RTN","XBLM",224,0) S IOSTO=IOST,IOST="P-DEC",IOSLO=IOSL,IOSL=6000 "RTN","XBLM",225,0) I DIC=+DIC S DIC=$$DIC^XBDIQ1(DIC) "RTN","XBLM",226,0) I DA'=+DA D PARSE^XBDIQ1(DA) "RTN","XBLM",227,0) NEW DIQ,DR "RTN","XBLM",228,0) S DIQ(0)="C" "RTN","XBLM",229,0) D VIEWR^XBLM("EN^DIQ") "RTN","XBLM",230,0) S IOST=IOSTO "RTN","XBLM",231,0) KILL IOSTO "RTN","XBLM",232,0) S IOSL=IOSLO "RTN","XBLM",233,0) KILL IOSLO,XBNODE,XBDIR,XBFN "RTN","XBLM",234,0) Q "RTN","XBLM",235,0) ; "RTN","XBLM",236,0) ARRAY(XBAR,XBHDR) ;PEP Display an array that has (...,n,0) structure "RTN","XBLM",237,0) I '$D(XBHDR) S XBHDR="" "RTN","XBLM",238,0) NEW Y,X,I,XBNODE "RTN","XBLM",239,0) S XBNODE=$G(XQORS)+1 "RTN","XBLM",240,0) KILL ^TMP("XBLM",$J,XBNODE) "RTN","XBLM",241,0) S %X=XBAR,%Y="^TMP(""XBLM"","_$J_","_XBNODE_"," "RTN","XBLM",242,0) D %XY^%RCR,EN^XBLM "RTN","XBLM",243,0) KILL ^TMP("XBLM",$J,XBNODE),XBNODE,XBDIR,XBFN "RTN","XBLM",244,0) ARRAYE ; "RTN","XBLM",245,0) Q "RTN","XBLM",246,0) ; "RTN","XBLM",247,0) STRIP(Z) ;REMOVE CONTROLL CHARACTERS "RTN","XBLM",248,0) NEW I "RTN","XBLM",249,0) F I=1:1:$L(Z) I (32>$A($E(Z,I))) S Z=$E(Z,1,I-1)_" "_$E(Z,I+1,999) "RTN","XBLM",250,0) Q Z "RTN","XBLM",251,0) ; "RTN","XBLM",252,0) OPENROOT(XBY) ;EP - return OPen RooT form of XBY .. for %RCR use "RTN","XBLM",253,0) NEW L "RTN","XBLM",254,0) S L=$L(XBY) "RTN","XBLM",255,0) I XBY["(",$E(XBY,L)="," G CONT "RTN","XBLM",256,0) I XBY'["(" S XBY=XBY_"(" G CONT "RTN","XBLM",257,0) I XBY["(",$E(XBY,L)=")" S XBY=$E(XBY,1,L-1)_"," G CONT "RTN","XBLM",258,0) CONT ; "RTN","XBLM",259,0) Q XBY "RTN","XBLM",260,0) ; "RTN","XBLML") 0^115^B1345893 "RTN","XBLML",1,0) XBLML ; IHS/ADC/GTH - ENTER OR RESET XB DISPLAY IN LIST TEMPLATE FILE FOR LIST MANAGER ; [ 02/07/97 3:02 PM ] "RTN","XBLML",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLML",3,0) ; "RTN","XBLML",4,0) W !,"'XB DISPLAY' List Template..." "RTN","XBLML",5,0) S DA=$O(^SD(409.61,"B","XB DISPLAY",0)),DIK="^SD(409.61," "RTN","XBLML",6,0) D ^DIK:DA "RTN","XBLML",7,0) S DIC(0)="L",DIC="^SD(409.61,",X="XB DISPLAY" "RTN","XBLML",8,0) KILL DO,DD D FILE^DICN "RTN","XBLML",9,0) S VALM=+Y "RTN","XBLML",10,0) I VALM>0 D "RTN","XBLML",11,0) . S ^SD(409.61,VALM,0)="XB DISPLAY^2^^132^2^21^1^1^^^XB DISPLAY^1^^1" "RTN","XBLML",12,0) . S ^SD(409.61,VALM,1)="^VALM HIDDEN ACTIONS" "RTN","XBLML",13,0) . S ^SD(409.61,VALM,"ARRAY")=" ^TMP(""XBLM"",$J,XBNODE)" "RTN","XBLML",14,0) . S ^SD(409.61,VALM,"FNL")="D EXIT^XBLM" "RTN","XBLML",15,0) . S ^SD(409.61,VALM,"HDR")="D HDR^XBLM" "RTN","XBLML",16,0) . S ^SD(409.61,VALM,"HLP")="D HELP^XBLM" "RTN","XBLML",17,0) . S ^SD(409.61,VALM,"INIT")="D INIT^XBLM" "RTN","XBLML",18,0) . S DA=VALM,DIK="^SD(409.61," "RTN","XBLML",19,0) . D IX1^DIK "RTN","XBLML",20,0) . KILL DA,DIK "RTN","XBLML",21,0) . W "Filed." "RTN","XBLML",22,0) .Q "RTN","XBLML",23,0) ; "RTN","XBLML",24,0) KILL DIC,DIK,VALM,X,DA "RTN","XBLML",25,0) Q "RTN","XBLML",26,0) ; "RTN","XBLMP") 0^116^B665327 "RTN","XBLMP",1,0) XBLMP ; ; 16-MAY-1995 "RTN","XBLMP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLMP",3,0) ;; ; "RTN","XBLMP",4,0) EN ; -- main entry point for XB DISPLAY (PROTOCAL) "RTN","XBLMP",5,0) D EN^VALM("XB DISPLAY (PROTOCAL)") "RTN","XBLMP",6,0) Q "RTN","XBLMP",7,0) ; "RTN","XBLMP",8,0) HDR ; -- header code "RTN","XBLMP",9,0) S VALMHDR(1)="This is a test header for XB DISPLAY (PROTOCAL)." "RTN","XBLMP",10,0) S VALMHDR(2)="This is the second line" "RTN","XBLMP",11,0) Q "RTN","XBLMP",12,0) ; "RTN","XBLMP",13,0) INIT ; -- init variables and list array "RTN","XBLMP",14,0) F LINE=1:1:30 D SET^VALM10(LINE,LINE_" Line number "_LINE) "RTN","XBLMP",15,0) S VALMCNT=30 "RTN","XBLMP",16,0) Q "RTN","XBLMP",17,0) ; "RTN","XBLMP",18,0) HELP ; -- help code "RTN","XBLMP",19,0) S X="?" D DISP^XQORM1 W !! "RTN","XBLMP",20,0) Q "RTN","XBLMP",21,0) ; "RTN","XBLMP",22,0) EXIT ; -- exit code "RTN","XBLMP",23,0) Q "RTN","XBLMP",24,0) ; "RTN","XBLMP",25,0) EXPND ; -- expand code "RTN","XBLMP",26,0) Q "RTN","XBLMP",27,0) ; "RTN","XBLMSET") 0^117^B4594576 "RTN","XBLMSET",1,0) XBLMSET ;IHS/ADC/PDW - setup XBLM terminal subtype & XBLM HF DEVICE for XBLM [ 10/29/2002 7:42 AM ] "RTN","XBLMSET",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLMSET",3,0) ;; "RTN","XBLMSET",4,0) I '$D(DUZ) D ^XUP "RTN","XBLMSET",5,0) TERM ;SETUP TERMINAL SUBTYPE "P-XBLM" "RTN","XBLMSET",6,0) K DIC "RTN","XBLMSET",7,0) S DIC=$$DIC^XBDIQ1(3.2) "RTN","XBLMSET",8,0) S X="P-XBLM",DIC(0)="XL" "RTN","XBLMSET",9,0) D ^DIC "RTN","XBLMSET",10,0) I Y'>0 W !,"ERROR IN SELECTION OF TERMINAL SUBTYPE",! Q "RTN","XBLMSET",11,0) S DA=+Y "RTN","XBLMSET",12,0) D TERMDR "RTN","XBLMSET",13,0) S DIE=DIC D ^DIE "RTN","XBLMSET",14,0) S XBTERDA=DA "RTN","XBLMSET",15,0) ; "RTN","XBLMSET",16,0) DEV ; SETUP device "RTN","XBLMSET",17,0) K DIC "RTN","XBLMSET",18,0) S DIC=$$DIC^XBDIQ1(3.5) "RTN","XBLMSET",19,0) S X="XBLM HF DEVICE",DIC(0)="XL" D ^DIC "RTN","XBLMSET",20,0) I Y'>0 W !,"ERROR IN DEVICE SELECTION" Q "RTN","XBLMSET",21,0) S DA=+Y "RTN","XBLMSET",22,0) D DEVDR "RTN","XBLMSET",23,0) S DIE=$$DIC^XBDIQ1(3.5) "RTN","XBLMSET",24,0) D ^DIE "RTN","XBLMSET",25,0) S XBDEVDA=DA "RTN","XBLMSET",26,0) ;D DIQ^XBLM(3.2,XBTERDA) "RTN","XBLMSET",27,0) ;D DIQ^XBLM(3.5,XBDEVDA) "RTN","XBLMSET",28,0) Q "RTN","XBLMSET",29,0) TERMDR ;;EP "RTN","XBLMSET",30,0) ;;~.02///^S X="NO";~ "RTN","XBLMSET",31,0) ;;~1///^S X=255;~ "RTN","XBLMSET",32,0) ;;~2///^S X="#";~ "RTN","XBLMSET",33,0) ;;~3///3000;~ "RTN","XBLMSET",34,0) ;;~4///^S X="$C(8)";~ "RTN","XBLMSET",35,0) ;;~99///^S X="Host File for XBLM utility"~ "RTN","XBLMSET",36,0) ;;~END~ "RTN","XBLMSET",37,0) S DR="" "RTN","XBLMSET",38,0) F I=1:1 S X=$P($T(TERMDR+I),"~",2) Q:X["END" S DR=DR_X "RTN","XBLMSET",39,0) Q "RTN","XBLMSET",40,0) DEVDR ;; "RTN","XBLMSET",41,0) ;;~.02///^S X="HOST FILE FOR XBLM";~ "RTN","XBLMSET",42,0) ;;~1///^S X=$S($$VERSION^%ZOSV(1)["Cache for Windows":"C:\Tmp\Tmp.xblm",$$VERSION^%ZOSV(1)["Cache for UNIX":"/Tmp/Tmp.xblm",1:51);~ ; IHS/SET/GTH XB*3*9 10/29/2002 Originally: ;;~1///^S X=51;~ "RTN","XBLMSET",43,0) ;;~1.9///@;~ "RTN","XBLMSET",44,0) ;;~1.95///^S X="NO";~ "RTN","XBLMSET",45,0) ;;~2///^S X="HOST FILE SERVER";~ "RTN","XBLMSET",46,0) ;;~3///^S X="P-XBLM";~ "RTN","XBLMSET",47,0) ;;~4///^S X="NO";~ "RTN","XBLMSET",48,0) ;;~5///^S X="NO";~ "RTN","XBLMSET",49,0) ;;~5.1///^S X="NO";~ "RTN","XBLMSET",50,0) ;;~5.2///^S X="NO";~ "RTN","XBLMSET",51,0) ;;~11.2///^S X="YES";~ "RTN","XBLMSET",52,0) ;;~END~ "RTN","XBLMSET",53,0) S DR="" "RTN","XBLMSET",54,0) F I=1:1 S X=$P($T(DEVDR+I),"~",2) Q:X["END" S DR=DR_X "RTN","XBLMSET",55,0) Q "RTN","XBLUTL") 0^118^B3337247 "RTN","XBLUTL",1,0) XBLUTL ; IHS/ADC/GTH - LIST ^UTILITY FOR $J ; [ 10/29/2002 7:42 AM ] "RTN","XBLUTL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLUTL",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBLUTL",4,0) ; "RTN","XBLUTL",5,0) ; This routine lists all entries in the ^UTILITY global for "RTN","XBLUTL",6,0) ; the current $J where $J is the first or second subscript. "RTN","XBLUTL",7,0) ; "RTN","XBLUTL",8,0) ; This is most useful from programmer mode. If used thru the "RTN","XBLUTL",9,0) ; XB menu, ^UTILITY($J) is killed in ^XBKSET before this "RTN","XBLUTL",10,0) ; routine is run. "RTN","XBLUTL",11,0) ; "RTN","XBLUTL",12,0) START ; "RTN","XBLUTL",13,0) W @($S($D(IOF):IOF,1:"#")) "RTN","XBLUTL",14,0) X ^%ZOSF("UCI") "RTN","XBLUTL",15,0) ;W !,"^UTILITY nodes for job ",$J," in UCI ",Y,!;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBLUTL",16,0) W !,"^UTILITY nodes for job ",$J," in ",$S($$VERSION^%ZOSV(1)["Cache":"Namespace",1:"UCI")," ",Y,! ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBLUTL",17,0) S XBLUTL("QFLG")=0,XBLUTL("X")="^UTILITY($J,"""")" "RTN","XBLUTL",18,0) F S XBLUTL("X")=$Q(@XBLUTL("X")) Q:$P($P(XBLUTL("X"),"(",2),",")'=$J D LIST Q:XBLUTL("QFLG") "RTN","XBLUTL",19,0) S XBLUTL("Y")=" " "RTN","XBLUTL",20,0) F S XBLUTL("Y")=$O(^UTILITY(XBLUTL("Y"))) Q:XBLUTL("Y")="" I $D(^UTILITY(XBLUTL("Y"),$J)) D "RTN","XBLUTL",21,0) . S XBLUTL("X")="^UTILITY("""_XBLUTL("Y")_""","_$J_")",XBLUTL("Z")="1""^UTILITY("""""_XBLUTL("Y")_""""","_$J_"""1P.E" "RTN","XBLUTL",22,0) . D:$D(@(XBLUTL("X")))#2 LIST "RTN","XBLUTL",23,0) . Q:XBLUTL("QFLG") "RTN","XBLUTL",24,0) . F S XBLUTL("X")=$Q(@XBLUTL("X")) Q:XBLUTL("X")'?@XBLUTL("Z") D LIST Q:XBLUTL("QFLG") "RTN","XBLUTL",25,0) . Q "RTN","XBLUTL",26,0) KILL XBLUTL "RTN","XBLUTL",27,0) Q "RTN","XBLUTL",28,0) ; "RTN","XBLUTL",29,0) LIST ; "RTN","XBLUTL",30,0) I $Y>($S($D(IOSL):IOSL,1:24)-3) S Y=$$DIR^XBDIR("E"),XBLUTL("QFLG")='Y W:Y @($S($D(IOF):IOF,1:"#")) "RTN","XBLUTL",31,0) Q:XBLUTL("QFLG") "RTN","XBLUTL",32,0) W !,XBLUTL("X")," = ",@XBLUTL("X") "RTN","XBLUTL",33,0) Q "RTN","XBLUTL",34,0) ; "RTN","XBLZRO") 0^119^B5480309 "RTN","XBLZRO",1,0) XBLZRO ; IHS/ADC/GTH - LISTS 0TH NODES ; [ 02/07/97 3:02 PM ] "RTN","XBLZRO",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBLZRO",3,0) ; "RTN","XBLZRO",4,0) ; This routine lists the 0th nodes of FileMan files. "RTN","XBLZRO",5,0) ; "RTN","XBLZRO",6,0) START ; "RTN","XBLZRO",7,0) NEW QFLG "RTN","XBLZRO",8,0) S QFLG=0 "RTN","XBLZRO",9,0) W !,"^XBLZRO - This routine lists the 0th nodes of FileMan files." "RTN","XBLZRO",10,0) D ^XBDSET "RTN","XBLZRO",11,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBLZRO",12,0) D DEVICE "RTN","XBLZRO",13,0) I QFLG KILL QFLG Q "RTN","XBLZRO",14,0) EN ;PEP - List 0th node of pre-selected list of FileMan files. "RTN","XBLZRO",15,0) ; IOF,IOSL must be set and U IO if appropriate. "RTN","XBLZRO",16,0) I $D(IOF)#2,$D(IOSL)#2 "RTN","XBLZRO",17,0) E Q "RTN","XBLZRO",18,0) NEW F,G,N,X,QFLG "RTN","XBLZRO",19,0) S QFLG=0 "RTN","XBLZRO",20,0) D HEADER "RTN","XBLZRO",21,0) S F=0 "RTN","XBLZRO",22,0) F S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F I $D(^DIC(F,0,"GL")) S G=^("GL") D LIST Q:QFLG "RTN","XBLZRO",23,0) D ^%ZISC "RTN","XBLZRO",24,0) Q "RTN","XBLZRO",25,0) ; "RTN","XBLZRO",26,0) LIST ; "RTN","XBLZRO",27,0) S X=$L(G),X=$E(G,1,X-1)_$S($E(G,X)=",":",0)",1:"(0)") "RTN","XBLZRO",28,0) S N="" "RTN","XBLZRO",29,0) S:$D(@X) N=^(0) "RTN","XBLZRO",30,0) D:$Y>(IOSL-3) PAGE "RTN","XBLZRO",31,0) Q:QFLG "RTN","XBLZRO",32,0) W F,?15,X,?35,N,! "RTN","XBLZRO",33,0) Q "RTN","XBLZRO",34,0) ; "RTN","XBLZRO",35,0) PAGE ; PAGE BREAK "RTN","XBLZRO",36,0) NEW F,G,N,X "RTN","XBLZRO",37,0) I IO=IO(0),$E(IOST,1,2)="C-" S Y=$$DIR^XBDIR("E") S:$D(DIRUT)!($D(DUOUT)) QFLG=1 KILL DIRUT,DUOUT "RTN","XBLZRO",38,0) Q:QFLG "RTN","XBLZRO",39,0) D HEADER "RTN","XBLZRO",40,0) Q "RTN","XBLZRO",41,0) ; "RTN","XBLZRO",42,0) HEADER ; PRINT HEADER "RTN","XBLZRO",43,0) NEW TITLE,TM,HR,MIN,TME,UCI "RTN","XBLZRO",44,0) W:$D(IOF) @IOF "RTN","XBLZRO",45,0) S TITLE="FILE 0TH NODE LIST",TM=$P($H,",",2),HR=TM\3600,MIN=TM#3600\60 "RTN","XBLZRO",46,0) S:MIN<10 MIN="0"_MIN "RTN","XBLZRO",47,0) S TME=HR_":"_MIN "RTN","XBLZRO",48,0) I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y "RTN","XBLZRO",49,0) S Y=DT "RTN","XBLZRO",50,0) X ^DD("DD") "RTN","XBLZRO",51,0) W Y,"@",TME,?30,TITLE "RTN","XBLZRO",52,0) X ^%ZOSF("UCI") "RTN","XBLZRO",53,0) S UCI="UCI: "_$P(Y,",",1) "RTN","XBLZRO",54,0) W ?65,UCI,!,"FILE",?15,"GLOBAL",?35,"0TH NODE",!! "RTN","XBLZRO",55,0) Q "RTN","XBLZRO",56,0) ; "RTN","XBLZRO",57,0) DEVICE ; GET DEVICE (QUEUEING ALLOWED) "RTN","XBLZRO",58,0) W ! "RTN","XBLZRO",59,0) S %ZIS="Q" "RTN","XBLZRO",60,0) D ^%ZIS "RTN","XBLZRO",61,0) I POP S QFLG=1 KILL POP Q "RTN","XBLZRO",62,0) I $D(IO("Q")) D S QFLG=1 Q "RTN","XBLZRO",63,0) . S ZTRTN="EN^XBLZRO",ZTIO=ION,ZTDESC="List 0th nodes",ZTSAVE("^UTILITY(""XBDSET"",$J,")="" "RTN","XBLZRO",64,0) . D ^%ZTLOAD "RTN","XBLZRO",65,0) . W !!,$S($D(ZTSK):"Request queued!",1:"Request cancelled!") "RTN","XBLZRO",66,0) . D ^%ZISC "RTN","XBLZRO",67,0) . KILL ZTSK,IO("Q") "RTN","XBLZRO",68,0) . KILL ZTIO ; ^%ZTLOAD kills other ZT* variables, but not this one "RTN","XBLZRO",69,0) . Q "RTN","XBLZRO",70,0) U IO "RTN","XBLZRO",71,0) Q "RTN","XBLZRO",72,0) ; "RTN","XBMAIL") 0^120^B6998848 "RTN","XBMAIL",1,0) XBMAIL ; IHS/ADC/GTH - MAIL MESSAGE TO SECURITY KEY HOLDERS ; [ 02/07/97 3:02 PM ] "RTN","XBMAIL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBMAIL",3,0) ; "RTN","XBMAIL",4,0) ; This utility generates a mail message to everyone on the "RTN","XBMAIL",5,0) ; local machine that holds a security key according to the "RTN","XBMAIL",6,0) ; namespace, range, or single key provided in the parameter. "RTN","XBMAIL",7,0) ; The text of the mail messages must be provided by you, and "RTN","XBMAIL",8,0) ; passed to the utility as a line reference. The utility "RTN","XBMAIL",9,0) ; uses the first line after the line reference as the mail "RTN","XBMAIL",10,0) ; message subject, and subsequent lines as the body of the "RTN","XBMAIL",11,0) ; message, until a null string is encountered. This places "RTN","XBMAIL",12,0) ; an implicit limit on your mail messages to the maximum "RTN","XBMAIL",13,0) ; size of a routine. Suggested text would be to inform the "RTN","XBMAIL",14,0) ; users that a patch has been installed, and describe any "RTN","XBMAIL",15,0) ; changes in displays or functionality, or problems "RTN","XBMAIL",16,0) ; addressed, and provide a contact number for questions, "RTN","XBMAIL",17,0) ; e.g: "RTN","XBMAIL",18,0) ; ------------------------------------------------------------------ "RTN","XBMAIL",19,0) ; Please direct your questions or comments about RPMS software to: "RTN","XBMAIL",20,0) ; OIRM / DSD (Division of Systems Development) "RTN","XBMAIL",21,0) ; 5300 Homestead Road NE "RTN","XBMAIL",22,0) ; Albuquerque NM 87110 "RTN","XBMAIL",23,0) ; 505-837-4189 "RTN","XBMAIL",24,0) ; ------------------------------------------------------------------ "RTN","XBMAIL",25,0) ; "RTN","XBMAIL",26,0) ; Call examples are: "RTN","XBMAIL",27,0) ; "RTN","XBMAIL",28,0) ; D MAIL^XBMAIL("ACHS*","MSG^ACHSP56") "RTN","XBMAIL",29,0) ; D MAIL^XBMAIL("AG*,XUMGR-XUPROGMODE,APCDZMENU","LABEL^AGP5") "RTN","XBMAIL",30,0) ; "RTN","XBMAIL",31,0) ; The second example would deliver a mail message containing "RTN","XBMAIL",32,0) ; the text beginning at LABEL+2^AGP5, and continuing to the "RTN","XBMAIL",33,0) ; end of routine AGP5, to each local user that holds a "RTN","XBMAIL",34,0) ; security key in the AG namespace, in the range from XUMGR "RTN","XBMAIL",35,0) ; to XUPROGMODE (inclusive), and to holders of the APCDZMENU "RTN","XBMAIL",36,0) ; security key. "RTN","XBMAIL",37,0) ; "RTN","XBMAIL",38,0) ; If you are indicating a namespace, your namespace must end "RTN","XBMAIL",39,0) ; with a star ("*") character. "RTN","XBMAIL",40,0) ; "RTN","XBMAIL",41,0) ; If you are indicating a range of security keys, the "RTN","XBMAIL",42,0) ; beginning and ending keys must be separated with a dash "RTN","XBMAIL",43,0) ; ("-"). If the utility encounters a dash in a comma-piece "RTN","XBMAIL",44,0) ; of the first parameter, it will consider it to be "RTN","XBMAIL",45,0) ; range-indicated, and not part of the name of the key. "RTN","XBMAIL",46,0) ; Use caution not to begin or end with a key that has a dash "RTN","XBMAIL",47,0) ; in it's name. "RTN","XBMAIL",48,0) ; "RTN","XBMAIL",49,0) ; If a comma-piece does not contain a star or dash, a single "RTN","XBMAIL",50,0) ; key is assumed. "RTN","XBMAIL",51,0) ; "RTN","XBMAIL",52,0) ; The subject of the message is assumed to be the first line "RTN","XBMAIL",53,0) ; after LABEL^AGP5: "RTN","XBMAIL",54,0) ; LABEL ;EP - Mail msg text. "RTN","XBMAIL",55,0) ; ;;PATIENT REG, PATCH 5 CHANGES. "RTN","XBMAIL",56,0) ; "RTN","XBMAIL",57,0) ; The utility will return Y=0 if successful, and Y=-1 if not "RTN","XBMAIL",58,0) ; successful. The message "Message delivered." will be "RTN","XBMAIL",59,0) ; displayed if the routine is called interactively. "RTN","XBMAIL",60,0) ; "RTN","XBMAIL",61,0) ; "RTN","XBMAIL",62,0) Q "RTN","XBMAIL",63,0) ; "RTN","XBMAIL",64,0) MAIL(XBNS,XBREF) ;PEP - XBNS is namespace, XBREF is line reference. "RTN","XBMAIL",65,0) ; "RTN","XBMAIL",66,0) NEW XBLAB,XBRTN,XMSUB,XMDUZ,XMTEXT,XMY "RTN","XBMAIL",67,0) S XBLAB=$P(XBREF,U),XBRTN=$P(XBREF,U,2) "RTN","XBMAIL",68,0) I XBLAB=""!(XBRTN="") S Y=-1 Q ; Invalid label reference. "RTN","XBMAIL",69,0) I '$L($T(@XBLAB+1^@XBRTN)) S Y=-1 Q ; No text to send. "RTN","XBMAIL",70,0) S XMSUB=$P($T(@XBLAB+1^@XBRTN),";",3) "RTN","XBMAIL",71,0) KILL ^TMP("XBMAIL",$J) "RTN","XBMAIL",72,0) D WRITDESC,GETRECIP "RTN","XBMAIL",73,0) I '$D(XMY) S Y=-1 Q ; No recipients. "RTN","XBMAIL",74,0) S XMDUZ=$S($G(DUZ):DUZ,1:.5),XMTEXT="^TMP(""XBMAIL"",$J," "RTN","XBMAIL",75,0) D ^XMD "RTN","XBMAIL",76,0) KILL ^TMP("XBMAIL",$J) "RTN","XBMAIL",77,0) I '$D(ZTQUEUED) W !!,"Message delivered.",! "RTN","XBMAIL",78,0) S Y=0 "RTN","XBMAIL",79,0) Q "RTN","XBMAIL",80,0) ; "RTN","XBMAIL",81,0) GETRECIP ; "RTN","XBMAIL",82,0) NEW X,XBCTR,Y "RTN","XBMAIL",83,0) F XBCTR=1:1 S %=$P(XBNS,",",XBCTR) Q:%="" D "RTN","XBMAIL",84,0) . I %["*" D NS(%) Q "RTN","XBMAIL",85,0) . I %["-" D RANGE(%) Q "RTN","XBMAIL",86,0) . D SINGLE(%) "RTN","XBMAIL",87,0) .Q "RTN","XBMAIL",88,0) Q "RTN","XBMAIL",89,0) ; "RTN","XBMAIL",90,0) SINGLE(K) ; Get holders of a single key K. "RTN","XBMAIL",91,0) S Y=0 "RTN","XBMAIL",92,0) Q:'$D(^XUSEC(K)) "RTN","XBMAIL",93,0) F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)="" "RTN","XBMAIL",94,0) Q "RTN","XBMAIL",95,0) ; "RTN","XBMAIL",96,0) RANGE(R) ; Get holders of a range of keys. "RTN","XBMAIL",97,0) S X=$P(R,"-",1),R=$P(R,"-",2) "RTN","XBMAIL",98,0) D SINGLE(X) "RTN","XBMAIL",99,0) F S X=$O(^XUSEC(X)) Q:X=R!(X="") S Y=0 F S Y=$O(^XUSEC(X,Y)) Q:'Y S XMY(Y)="" "RTN","XBMAIL",100,0) D SINGLE(R) "RTN","XBMAIL",101,0) Q "RTN","XBMAIL",102,0) ; "RTN","XBMAIL",103,0) NS(N) ; Get holders of keys in namespace N. "RTN","XBMAIL",104,0) S (X,N)=$P(N,"*",1),Y=0 "RTN","XBMAIL",105,0) D SINGLE(X) "RTN","XBMAIL",106,0) F S X=$O(^XUSEC(X)) Q:'($E(X,1,$L(N))=N) S Y=0 F S Y=$O(^XUSEC(X,Y)) Q:'Y S XMY(Y)="" "RTN","XBMAIL",107,0) Q "RTN","XBMAIL",108,0) ; "RTN","XBMAIL",109,0) ; "RTN","XBMAIL",110,0) WRITDESC ; "RTN","XBMAIL",111,0) F %=2:1 S X=$P($T(@XBLAB+%^@XBRTN),";",3) Q:X="" S ^TMP("XBMAIL",$J,%)=X "RTN","XBMAIL",112,0) Q "RTN","XBMAIL",113,0) ; "RTN","XBNEW") 0^121^B4987918 "RTN","XBNEW",1,0) XBNEW(XBRET) ; IHS/ADC/GTH - NESTING OF DIE ; [ 10/29/2002 7:42 AM ] "RTN","XBNEW",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBNEW",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Unwinder problem with NEW'ing "RTN","XBNEW",4,0) ; "RTN","XBNEW",5,0) ; PROGRAMMERS: DO NOT USE THE FIRST LINE FOR ENTRY. "RTN","XBNEW",6,0) ; USE LABEL EN^XBNEW() FOR ENTRY. "RTN","XBNEW",7,0) ; "RTN","XBNEW",8,0) ; EN^XBNEW("TAG^ROUTINE","variable list") "RTN","XBNEW",9,0) ; "RTN","XBNEW",10,0) ; Variable list has the form "AGDFN;AGINS;AGP*". "RTN","XBNEW",11,0) ; Wild card * allowed. "RTN","XBNEW",12,0) ; "RTN","XBNEW",13,0) ; XBRET has the form "TAG^ROUTINE:VAR;NSVAR*" "RTN","XBNEW",14,0) ; "RTN","XBNEW",15,0) ; This allows for the nesting of die calls by "RTN","XBNEW",16,0) ; "RTN","XBNEW",17,0) ; 1. Building and executing an exclusive new from preselected "RTN","XBNEW",18,0) ; kernel variables and any local variables &/or name "RTN","XBNEW",19,0) ; spaces identified by the calling parameter. "RTN","XBNEW",20,0) ; "RTN","XBNEW",21,0) ; 2. After executing the new (....) XBNEW performs a DO call "RTN","XBNEW",22,0) ; to the program entry point identified by the calling "RTN","XBNEW",23,0) ; parameter. The entry point passed should build the "RTN","XBNEW",24,0) ; variables and execute the DIE call to be nested. "RTN","XBNEW",25,0) ; "RTN","XBNEW",26,0) ; 3. As XBNEW quits to return to the calling program it pops "RTN","XBNEW",27,0) ; the variable stack. "RTN","XBNEW",28,0) ; "RTN","XBNEW",29,0) ; "RTN","XBNEW",30,0) NEW XB,XBNS,XBN,XB,XBY,XBL,XBKVAR "RTN","XBNEW",31,0) G S "RTN","XBNEW",32,0) ; "RTN","XBNEW",33,0) EN(XBRT,XBNS) ;PEP XBRT=TAG^ROUTINE XBNS=varialbe list ";" with * allowed "RTN","XBNEW",34,0) NEW XB,XBN,XB,XBY,XBL,XBKVAR,XBRET "RTN","XBNEW",35,0) S XBRET=XBRT_":"_XBNS "RTN","XBNEW",36,0) S ; "RTN","XBNEW",37,0) I XBRET'[":" S XBRET=XBRET_":" "RTN","XBNEW",38,0) S XBN="XBRET",XBKVAR=$P($T(XBKVAR),";;",2),XBNS=$P(XBRET,":",2) "RTN","XBNEW",39,0) I XBNS="" G RETURN "RTN","XBNEW",40,0) F XBI=1:1 S (XB,XBY)=$P(XBNS,";",XBI) Q:XB="" D "RTN","XBNEW",41,0) . I XB'["*" S XBN=XBN_","_XB Q "RTN","XBNEW",42,0) . S (XB,XBY)=$P(XB,"*"),XBN=XBN_","_XB,XBL=$L(XB) "RTN","XBNEW",43,0) . F S XBY=$O(@XBY) Q:((XBY="")!(XB'=$E(XBY,1,XBL))) S XBN=XBN_","_XBY "RTN","XBNEW",44,0) .Q "RTN","XBNEW",45,0) RETURN ; "RTN","XBNEW",46,0) S XBN="("_XBN_","_XBKVAR_")",$P(XBRET,":",2)=XBN "RTN","XBNEW",47,0) NEW ; "RTN","XBNEW",48,0) NEW @($P(XBRET,":",2)) "RTN","XBNEW",49,0) D @($P(XBRET,":",1)) "RTN","XBNEW",50,0) Q "RTN","XBNEW",51,0) ; "RTN","XBNEW",52,0) END ;-------------------------------------------------------------- "RTN","XBNEW",53,0) ; the following taken from the variable list in KILL^XUSCLEAN from KERNEL "RTN","XBNEW",54,0) XBKVAR ;;DUZ,DTIME,DT,DISYS,IO,IOBS,IOF,IOM,ION,IOSL,IOST,IOT,IOS,IOXY,U,XRTL,%ZH0,XQVOL,XQY,XQY0,XQDIC,XQPSM,XQPT,XQAUDIT,XQXFLG,ZTSTOP,ZTQUEUED,ZTREQ,XQORS;; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBNEW",55,0) ;;DUZ,DTIME,DT,DISYS,IO,IOF,IOBS,IOM,ION,IOSL,IOST,IOT,IOS,IOXY,U,XRTL,ZTSTOP,ZTQUEUED,ZTREQ ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBNEW",56,0) ;-------------------------------------------------------------- "RTN","XBNEW",57,0) Q "RTN","XBNEW",58,0) ; "RTN","XBNODEL") 0^122^B3983142 "RTN","XBNODEL",1,0) XBNODEL ; IHS/ADC/GTH - PREVENT USER FROM DELETING ENTRIES ; [ 02/07/97 3:02 PM ] "RTN","XBNODEL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBNODEL",3,0) ; "RTN","XBNODEL",4,0) ; This routine sets FileMan dictionaries so users cannot "RTN","XBNODEL",5,0) ; delete entries. Protection is provided by SET'ing the "RTN","XBNODEL",6,0) ; "DEL" node of the .01 fields in the selected dd's to "RTN","XBNODEL",7,0) ; "I 1". "RTN","XBNODEL",8,0) ; "RTN","XBNODEL",9,0) START ; "RTN","XBNODEL",10,0) I $G(DUZ(0))'="@" W !,*7," Insufficient FileMan access. DUZ(0) is not ""@""." Q "RTN","XBNODEL",11,0) S U="^",IOP=$I "RTN","XBNODEL",12,0) D ^%ZIS "RTN","XBNODEL",13,0) W !!,"^XBNODEL - This program sets FileMan dictionaries so users cannot delete",!," entries." "RTN","XBNODEL",14,0) ; "RTN","XBNODEL",15,0) D ^XBDSET "RTN","XBNODEL",16,0) G:'$D(^UTILITY("XBDSET",$J)) EOJ "RTN","XBNODEL",17,0) ASK ; "RTN","XBNODEL",18,0) S XBNDASK=$$DIR^XBDIR("Y","Do you want to be asked before setting each file","Y","","",2) "RTN","XBNODEL",19,0) W ! "RTN","XBNODEL",20,0) S XBNDFILE="" "RTN","XBNODEL",21,0) F XBNDL=0:0 S XBNDFILE=$O(^UTILITY("XBDSET",$J,XBNDFILE)) Q:XBNDFILE="" D PROCESS "RTN","XBNODEL",22,0) G EOJ "RTN","XBNODEL",23,0) ; "RTN","XBNODEL",24,0) PROCESS ; "RTN","XBNODEL",25,0) S XBNDANS="Y" "RTN","XBNODEL",26,0) I $G(@("^DD("_XBNDFILE_",.01,""DEL"",.01,0)"))="I 1" W !,@("$P(^DIC("_XBNDFILE_",0),U,1)")," is already protected." Q "RTN","XBNODEL",27,0) W !,@("$P(^DIC("_XBNDFILE_",0),U,1)"),$S(XBNDASK:"..OK? Y// ",1:"") "RTN","XBNODEL",28,0) P2 ; "RTN","XBNODEL",29,0) I XBNDASK R XBNDANS:$G(DTIME,999) S:XBNDANS="" XBNDANS="Y" I "YyNn"'[$E(XBNDANS) D P2ERR G P2 "RTN","XBNODEL",30,0) I XBNDANS="Y" S @("^DD("_XBNDFILE_",.01,""DEL"",.01,0)")="I 1" W " Done" "RTN","XBNODEL",31,0) Q "RTN","XBNODEL",32,0) ; "RTN","XBNODEL",33,0) P2ERR ; "RTN","XBNODEL",34,0) W *7 "RTN","XBNODEL",35,0) F XBNDI=1:1:$L(XBNDANS) W @IOBS," ",@IOBS "RTN","XBNODEL",36,0) Q "RTN","XBNODEL",37,0) ; "RTN","XBNODEL",38,0) EOJ ; "RTN","XBNODEL",39,0) KILL ^UTILITY("XBDSET",$J) "RTN","XBNODEL",40,0) KILL XBNDANS,XBNDASK,XBNDFILE,XBNDI,XBNDL "RTN","XBNODEL",41,0) KILL BS,FF,RM,SL,SUB,XY "RTN","XBNODEL",42,0) Q "RTN","XBNODEL",43,0) ; "RTN","XBOFF") 0^123^B144923 "RTN","XBOFF",1,0) XBOFF ; IHS/ADC/GTH - SET REVERSE VIDEO OFF ; [ 02/07/97 3:02 PM ] "RTN","XBOFF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBOFF",3,0) ; "RTN","XBOFF",4,0) ; Original routine from IHS/OHPRD/EDE. 08-25-95 "RTN","XBOFF",5,0) ; "RTN","XBOFF",6,0) ; See also routine XBVIDEO. "RTN","XBOFF",7,0) ; "RTN","XBOFF",8,0) START ; "RTN","XBOFF",9,0) NEW %,X,IORVON,IORVOFF "RTN","XBOFF",10,0) I '$G(IOST(0)) D HOME^%ZIS "RTN","XBOFF",11,0) S X="IORVON;IORVOFF" "RTN","XBOFF",12,0) D ENDR^%ZISS "RTN","XBOFF",13,0) W IORVOFF "RTN","XBOFF",14,0) Q "RTN","XBOFF",15,0) ; "RTN","XBON") 0^124^B143109 "RTN","XBON",1,0) XBON ; IHS/ADC/GTH - SET REVERSE VIDEO ON ; [ 02/07/97 3:02 PM ] "RTN","XBON",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBON",3,0) ; "RTN","XBON",4,0) ; Original routine from IHS/OHPRD/EDE. 08-25-95 "RTN","XBON",5,0) ; "RTN","XBON",6,0) ; See also routine XBVIDEO. "RTN","XBON",7,0) ; "RTN","XBON",8,0) START ; "RTN","XBON",9,0) NEW %,X,IORVON,IORVOFF "RTN","XBON",10,0) I '$G(IOST(0)) D HOME^%ZIS "RTN","XBON",11,0) S X="IORVON;IORVOFF" "RTN","XBON",12,0) D ENDR^%ZISS "RTN","XBON",13,0) W IORVON "RTN","XBON",14,0) Q "RTN","XBON",15,0) ; "RTN","XBPATC") 0^125^B6167972 "RTN","XBPATC",1,0) XBPATC ; IHS/ADC/GTH - CHECK PATIENT GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","XBPATC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPATC",3,0) ; "RTN","XBPATC",4,0) ; $O thru the PATIENT and 3RD party globals looking for missing entries "RTN","XBPATC",5,0) ; "RTN","XBPATC",6,0) ; Thanks to Robert F. Dolan for the original routine. "RTN","XBPATC",7,0) ; "RTN","XBPATC",8,0) ST ; "RTN","XBPATC",9,0) W !,"I WILL $O THRU THE PATIENT GLOBALS LOOKING FOR UNEQUAL DFN" "RTN","XBPATC",10,0) W !,"AS UNEQUAL DFN ARE FOUND THE DFN WILL BE DISPLAYED" "RTN","XBPATC",11,0) W !,"YOU SHOULD USE A SLAVE PRINTER FOR THIS RUN, AS THE SCREEN WILL SCROLL AND YOU WILL LOSE NEEDED INFORMATION",! "RTN","XBPATC",12,0) Q:'$$DIR^XBDIR("E") "RTN","XBPATC",13,0) S (CNT,CNT1,CNT2,CNT3)=0,U="^" "RTN","XBPATC",14,0) W !,"LOOPING THROUGH THE IHS PATIENT GLOBAL",! "RTN","XBPATC",15,0) LOOP ; "RTN","XBPATC",16,0) S DFN=0 "RTN","XBPATC",17,0) F S DFN=$O(^AUPNPAT(DFN)) Q:DFN?.A W "I" D:'$D(^DPT(DFN)) PRT "RTN","XBPATC",18,0) LOOP1 ; "RTN","XBPATC",19,0) W !,"LOOPING THROUGH THE VA PATIENT GLOBAL",! "RTN","XBPATC",20,0) S DFN=0 "RTN","XBPATC",21,0) F S DFN=$O(^DPT(DFN)) Q:DFN?.A W "V" D:'$D(^AUPNPAT(DFN)) PRT1 "RTN","XBPATC",22,0) LOOP2 ; "RTN","XBPATC",23,0) W !,"LOOPING THROUGH THE MEDICARE GLOBAL",! "RTN","XBPATC",24,0) S DFN=0 "RTN","XBPATC",25,0) F S DFN=$O(^AUPNMCR(DFN)) Q:DFN?.A W "M" D:'$D(^AUPNPAT(DFN)) PRT2 "RTN","XBPATC",26,0) LOOP3 ; "RTN","XBPATC",27,0) W !,"LOOPING THROUGH THE MEDICAID GLOBAL",! "RTN","XBPATC",28,0) S (DFN,DA)=0 "RTN","XBPATC",29,0) F S DA=$O(^AUPNMCD(DA)) Q:DA?.A D "RTN","XBPATC",30,0) . S DFN=$P(^AUPNMCD(DA,0),U,1) "RTN","XBPATC",31,0) . W "D" "RTN","XBPATC",32,0) . I DFN="" D PRT3 Q "RTN","XBPATC",33,0) . D:'$D(^AUPNPAT(DFN)) PRT2 "RTN","XBPATC",34,0) .Q "RTN","XBPATC",35,0) LOOP4 ; "RTN","XBPATC",36,0) W !,"LOOPING THROUGH THE RAILROAD GLOBAL",! "RTN","XBPATC",37,0) S DFN=0 "RTN","XBPATC",38,0) F S DFN=$O(^AUPNRRE(DFN)) Q:DFN?.A W "R" D:'$D(^AUPNPAT(DFN)) PRT2 "RTN","XBPATC",39,0) LOOP5 ; "RTN","XBPATC",40,0) W !,"LOOPING THROUGH THE PRIVATE INSURANCE GLOBAL",! "RTN","XBPATC",41,0) S DFN=0 "RTN","XBPATC",42,0) F S DFN=$O(^AUPNPRVT(DFN)) Q:DFN?.A W "P" D:'$D(^AUPNPAT(DFN)) PRT2 "RTN","XBPATC",43,0) EXIT ; "RTN","XBPATC",44,0) W !!,"**E N D O F R U N **" "RTN","XBPATC",45,0) W !,"NUMBER OF DFN NOT IN DPT=",CNT "RTN","XBPATC",46,0) W !,"NUMBER OF DFN NOT IN AUPNPAT=",CNT1 "RTN","XBPATC",47,0) W !,"NUMBER OF 3RD PARTY DFN's NOT IN AUPNPAT=",CNT2 "RTN","XBPATC",48,0) W !,"NUMBER OF MEDICAID RECORDES WITH BAD DFN=",CNT3 "RTN","XBPATC",49,0) KILL CNT,CNT1,CNT2,CNT3,AZHDNUM "RTN","XBPATC",50,0) Q "RTN","XBPATC",51,0) ; "RTN","XBPATC",52,0) PRT ;PRINT FOR ENTRIES IN AUPNPAT NOT IN DPT "RTN","XBPATC",53,0) W !!,"ENTRY IN AUPNPAT NOT IN DPT, DFN=",DFN "RTN","XBPATC",54,0) S CNT=CNT+1 "RTN","XBPATC",55,0) Q "RTN","XBPATC",56,0) ; "RTN","XBPATC",57,0) PRT1 ;PRINT FOR ENTRIES IN DPT NOT IN AUPNPAT "RTN","XBPATC",58,0) W !!,"ENTRY IN DPT NOT IN AUPNPAT, DFN=",DFN "RTN","XBPATC",59,0) S CNT1=CNT1+1 "RTN","XBPATC",60,0) Q "RTN","XBPATC",61,0) PRT2 ;PRINT FOR ENTRIES IN 3RD PARTY FILES BUT NOT IN AUPNPAT "RTN","XBPATC",62,0) W !!,"ENTRY IN 3RD PARTY FILE NOT IN AUPNPAT, DFN=",DFN "RTN","XBPATC",63,0) S CNT2=CNT2+1 "RTN","XBPATC",64,0) Q "RTN","XBPATC",65,0) PRT3 ;PRINT FOR ENTRIES IN MEDICAID GLOBAL BUT NOT IN AUPNPAT OR POINTER NOT VALID "RTN","XBPATC",66,0) W !!,"ENTRY IN MEDICAID GLOBAL BUT DFN INVALID, DA=",DA,! "RTN","XBPATC",67,0) S CNT3=CNT3+1 "RTN","XBPATC",68,0) Q "RTN","XBPATC",69,0) ; "RTN","XBPATSE") 0^126^B44471422 "RTN","XBPATSE",1,0) XBPATSE ; IHS/ADC/GTH - SEARCH ROUTINES FOR PATCHES ; [ 10/29/2002 7:42 AM ] "RTN","XBPATSE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPATSE",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBPATSE",4,0) ; "RTN","XBPATSE",5,0) ; Search Routines for Patch Versions. "RTN","XBPATSE",6,0) ; "RTN","XBPATSE",7,0) ; Thanks to Ray A. Willie for the original routine. "RTN","XBPATSE",8,0) ; "RTN","XBPATSE",9,0) MAIN ; "RTN","XBPATSE",10,0) NEW XB,DUZ,IO,IOF,IOM,IOSL,IOBS,IOXY,IOST,DT,DTIME,POP,U,X,Y "RTN","XBPATSE",11,0) D INIT "RTN","XBPATSE",12,0) D:'$D(ZTQUEUED) "RTN","XBPATSE",13,0) . D RSEL "RTN","XBPATSE",14,0) . D:'XB("END") DEVICE "RTN","XBPATSE",15,0) .Q "RTN","XBPATSE",16,0) D:'XB("END") SRCH "RTN","XBPATSE",17,0) D:'XB("END") PRT "RTN","XBPATSE",18,0) D EXIT "RTN","XBPATSE",19,0) Q "RTN","XBPATSE",20,0) ; "RTN","XBPATSE",21,0) INIT ; "RTN","XBPATSE",22,0) S (XB("END"),XB("VER"),XB("PNBR"),XB("Q"))=0,XB("NAM")="" "RTN","XBPATSE",23,0) KILL ^TMP($J) "RTN","XBPATSE",24,0) D:'$D(ZTQUEUED) ^XBKVAR,DT^DICRW,HOME^%ZIS "RTN","XBPATSE",25,0) D NOW^%DTC "RTN","XBPATSE",26,0) S Y=% "RTN","XBPATSE",27,0) X ^DD("DD") "RTN","XBPATSE",28,0) S XB("DT")=Y "RTN","XBPATSE",29,0) X ^%ZOSF("UCI") "RTN","XBPATSE",30,0) S XB("UCI")=$P(Y,","),XB("VOL")=$P(Y,",",2) "RTN","XBPATSE",31,0) S XB("HD1")="R.P.M.S. PATCH SEARCH UTILITY Version: "_$P($T(+2),";",3) "RTN","XBPATSE",32,0) S XB("HD2")="UCI: "_XB("UCI")_" CPU: "_XB("VOL")_" "_XB("DT") "RTN","XBPATSE",33,0) Q "RTN","XBPATSE",34,0) ; "RTN","XBPATSE",35,0) RSEL ; "RTN","XBPATSE",36,0) D SCHDR "RTN","XBPATSE",37,0) X ^%ZOSF("RSEL") "RTN","XBPATSE",38,0) S XB("END")='$D(^UTILITY($J)) "RTN","XBPATSE",39,0) Q "RTN","XBPATSE",40,0) ; "RTN","XBPATSE",41,0) DEVICE ; "RTN","XBPATSE",42,0) NEW %ZIS "RTN","XBPATSE",43,0) S %ZIS="NMQ" "RTN","XBPATSE",44,0) D ^%ZIS "RTN","XBPATSE",45,0) S XB("END")=POP "RTN","XBPATSE",46,0) Q:XB("END") "RTN","XBPATSE",47,0) S XB("IOP")=ION_";"_IOST_$S($D(IO("DOC")):";"_IO("DOC"),1:";"_IOM_";"_IOSL) "RTN","XBPATSE",48,0) D:$D(IO("Q")) QUE "RTN","XBPATSE",49,0) Q "RTN","XBPATSE",50,0) ; "RTN","XBPATSE",51,0) QUE ; "RTN","XBPATSE",52,0) NEW ZTRTN,ZTIO,ZTDESC,ZTSAVE,ZTSK "RTN","XBPATSE",53,0) D:IO=IO(0)&($E(IOST,1,2)="C-")&($D(IO("Q"))#2) "RTN","XBPATSE",54,0) . W !,"Cannot Queue to HOME or CHARACTER Device",! "RTN","XBPATSE",55,0) . S XB("END")=1 "RTN","XBPATSE",56,0) .Q "RTN","XBPATSE",57,0) Q:XB("END") "RTN","XBPATSE",58,0) S ZTRTN="^"_$TR($P($T(+1),";")," ",""),ZTIO=XB("IOP"),ZTDESC=$P($T(+1),";",2) "RTN","XBPATSE",59,0) F Q:$E(ZTDESC)'=" " S ZTDESC=$E(ZTDESC,2,99) "RTN","XBPATSE",60,0) S ZTSAVE("^UTILITY($J,")="" "RTN","XBPATSE",61,0) D ^%ZTLOAD "RTN","XBPATSE",62,0) I '$D(ZTSK) W !,"TASK not Queued with Task Manager",! S XB("END")=1 "RTN","XBPATSE",63,0) Q:XB("END") "RTN","XBPATSE",64,0) S %H=ZTSK("D") "RTN","XBPATSE",65,0) D YX^%DTC "RTN","XBPATSE",66,0) W !,"TASK Queued with Task Manager: JOB # ",ZTSK," at ",Y,! "RTN","XBPATSE",67,0) D HOME^%ZIS "RTN","XBPATSE",68,0) S XB("END")=1 "RTN","XBPATSE",69,0) Q "RTN","XBPATSE",70,0) ; "RTN","XBPATSE",71,0) SRCH ; "RTN","XBPATSE",72,0) NEW XCNP,DIF "RTN","XBPATSE",73,0) D:'$D(ZTQUEUED) SCHDR "RTN","XBPATSE",74,0) S XB("NSP")="" "RTN","XBPATSE",75,0) F S XB("NSP")=$O(^DIC(9.4,"C",XB("NSP"))) Q:XB("NSP")="" D "RTN","XBPATSE",76,0) . S XB("EIN")=0,XB("EIN")=$O(^DIC(9.4,"C",XB("NSP"),XB("EIN"))) "RTN","XBPATSE",77,0) . S XB("NAM")=$P($G(^DIC(9.4,XB("EIN"),0)),U) "RTN","XBPATSE",78,0) . S XB("VER")=$G(^DIC(9.4,XB("EIN"),"VERSION"),0) "RTN","XBPATSE",79,0) . S XB("ROU")=XB("NSP") "RTN","XBPATSE",80,0) . S:$D(^UTILITY($J,XB("ROU"))) XB("ROU")=$O(^UTILITY($J,XB("ROU")),-1) "RTN","XBPATSE",81,0) . F XB("RKT")=0:1 S XB("ROU")=$O(^UTILITY($J,XB("ROU"))) Q:$E(XB("ROU"),1,$L(XB("NSP")))'=XB("NSP") D SRCH1 "RTN","XBPATSE",82,0) . D:XB("RKT")>0 SRCH2 "RTN","XBPATSE",83,0) .Q "RTN","XBPATSE",84,0) ;S XB("NSP")="~~",XB("ROU")="";IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPATSE",85,0) S XB("NSP")="~~",XB("ROU")=0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPATSE",86,0) F XB("RKT")=0:1 S XB("ROU")=$O(^UTILITY($J,XB("ROU"))) Q:XB("ROU")="" D "RTN","XBPATSE",87,0) . S XB("NAM")="",XB("VER")=0 "RTN","XBPATSE",88,0) . D SRCH1 "RTN","XBPATSE",89,0) .Q "RTN","XBPATSE",90,0) S XB("NAM")="%",XB("VER")=0 "RTN","XBPATSE",91,0) D:XB("RKT")>0 SRCH2 "RTN","XBPATSE",92,0) Q "RTN","XBPATSE",93,0) ; "RTN","XBPATSE",94,0) SRCH1 ; "RTN","XBPATSE",95,0) D:'$D(ZTQUEUED) "RTN","XBPATSE",96,0) . W:'(XB("RKT")#8) ! "RTN","XBPATSE",97,0) . W XB("ROU"),$J("",9-$L(XB("ROU"))) "RTN","XBPATSE",98,0) .Q "RTN","XBPATSE",99,0) S XCNP=0,DIF="^TMP("_$J_",""R"","""_XB("ROU")_""",",X=XB("ROU") "RTN","XBPATSE",100,0) X ^%ZOSF("TEST") "RTN","XBPATSE",101,0) Q:'$T "RTN","XBPATSE",102,0) X ^%ZOSF("LOAD") "RTN","XBPATSE",103,0) S XB("PPC")=$TR($P($G(^TMP($J,"R",XB("ROU"),2,0)),";",5),"*","") "RTN","XBPATSE",104,0) D:XB("PPC")]""&(XB("PPC")'=0) "RTN","XBPATSE",105,0) . S:XB("NAM")="" XB("NAM")=$P($G(^TMP($J,"R",XB("ROU"),2,0)),";",4) "RTN","XBPATSE",106,0) . S:XB("VER")=0 XB("VER")=$P($G(^TMP($J,"R",XB("ROU"),2,0)),";",3) "RTN","XBPATSE",107,0) . S XB("DESC")=$S($P($P($G(^TMP($J,"R",XB("ROU"),1,0)),";",2),"-",2,3)'="":$P($P($G(^TMP($J,"R",XB("ROU"),1,0)),";",2),"-",2,3),1:$P($G(^TMP($J,"R",XB("ROU"),1,0)),";",3)) "RTN","XBPATSE",108,0) . F Q:$E(XB("DESC"))'=" " S XB("DESC")=$E(XB("DESC"),2,99) "RTN","XBPATSE",109,0) . D:XB("VER")]""&(XB("NAM")]"") "RTN","XBPATSE",110,0) .. F XB("J")=1:1 S XB("PNR")=$P(XB("PPC"),",",XB("J")) Q:XB("PNR")="" D:XB("PNR")?1.4N "RTN","XBPATSE",111,0) ... S ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),XB("PNR"),XB("ROU"))=XB("DESC") "RTN","XBPATSE",112,0) ... S ^TMP($J,"P","P",XB("PNR"))="" "RTN","XBPATSE",113,0) ... S ^TMP($J,"P","R",XB("ROU"))="" "RTN","XBPATSE",114,0) KILL ^TMP($J,"R",XB("ROU")),^UTILITY($J,XB("ROU")) "RTN","XBPATSE",115,0) Q "RTN","XBPATSE",116,0) ; "RTN","XBPATSE",117,0) SRCH2 ; "RTN","XBPATSE",118,0) W:'$D(ZTQUEUED) !!?5,XB("RKT")," Routines Processed",!! "RTN","XBPATSE",119,0) S (XB("PNR"),XB("ROU"))="" "RTN","XBPATSE",120,0) F XB("PKT")=0:1 S XB("PNR")=$O(^TMP($J,"P","P",XB("PNR"))) Q:XB("PNR")="" "RTN","XBPATSE",121,0) F XB("PRK")=0:1 S XB("ROU")=$O(^TMP($J,"P","R",XB("ROU"))) Q:XB("ROU")="" "RTN","XBPATSE",122,0) KILL ^TMP($J,"P","P"),^TMP($J,"P","R") "RTN","XBPATSE",123,0) S ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.01)=XB("RKT") "RTN","XBPATSE",124,0) S ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.02)=XB("PKT") "RTN","XBPATSE",125,0) S ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.03)=XB("PRK") "RTN","XBPATSE",126,0) Q "RTN","XBPATSE",127,0) ; "RTN","XBPATSE",128,0) SCHDR ; "RTN","XBPATSE",129,0) W !,?IOM-$L(XB("HD1"))\2,XB("HD1"),!,?IOM-$L(XB("HD2"))\2,XB("HD2"),! "RTN","XBPATSE",130,0) Q "RTN","XBPATSE",131,0) ; "RTN","XBPATSE",132,0) PRT ; "RTN","XBPATSE",133,0) S XB("PAGE")=0,XB("NSP")="" "RTN","XBPATSE",134,0) D:'$D(ZTQUEUED) "RTN","XBPATSE",135,0) . S IOP=XB("IOP") "RTN","XBPATSE",136,0) . D ^%ZIS "RTN","XBPATSE",137,0) .Q "RTN","XBPATSE",138,0) U IO "RTN","XBPATSE",139,0) D HDR "RTN","XBPATSE",140,0) F S XB("NSP")=$O(^TMP($J,"P",XB("NSP"))) Q:XB("NSP")=""!(XB("END")) D "RTN","XBPATSE",141,0) . S XB("NAM")="" "RTN","XBPATSE",142,0) . F S XB("NAM")=$O(^TMP($J,"P",XB("NSP"),XB("NAM"))) Q:XB("NAM")=""!(XB("END")) D "RTN","XBPATSE",143,0) .. D:XB("NAM")="%" "RTN","XBPATSE",144,0) ... W !!,"****",?5,"ROUTINES THAT ARE NOT IN PACKAGE FILE NAME-SPACE" "RTN","XBPATSE",145,0) ... W !?5,^TMP($J,"P",XB("NSP"),"%",0,.01)," TOTAL ROUTINE(s): " "RTN","XBPATSE",146,0) ... W ^TMP($J,"P",XB("NSP"),"%",0,.02)," PATCHE(s) in " "RTN","XBPATSE",147,0) ... W ^TMP($J,"P",XB("NSP"),"%",0,.03)," ROUTINE(s)",! "RTN","XBPATSE",148,0) ... S XB("NAM")=$O(^TMP($J,"P",XB("NSP"),XB("NAM"))) "RTN","XBPATSE",149,0) .. S XB("END")=(XB("NAM")="") "RTN","XBPATSE",150,0) .. Q:XB("END") "RTN","XBPATSE",151,0) .. S XB("VER")=.5 "RTN","XBPATSE",152,0) .. F S XB("VER")=$O(^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"))) Q:XB("VER")=""!(XB("END")) D "RTN","XBPATSE",153,0) ... D:$Y+5>IOSL HDR "RTN","XBPATSE",154,0) ... Q:XB("END") "RTN","XBPATSE",155,0) ... W !!,XB("NSP"),?5,XB("NAM")," -- Version: ",XB("VER") "RTN","XBPATSE",156,0) ... D:XB("NSP")'="~~" "RTN","XBPATSE",157,0) .... W !?5,^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.01)," TOTAL ROUTINE(s): " "RTN","XBPATSE",158,0) .... W ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.02)," PATCHE(s) in " "RTN","XBPATSE",159,0) .... W ^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),.03)," ROUTINE(s)",! "RTN","XBPATSE",160,0) ... S XB("PNBR")=.5 "RTN","XBPATSE",161,0) ... F S XB("PNBR")=$O(^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),XB("PNBR"))) Q:XB("PNBR")=""!(XB("END")) D "RTN","XBPATSE",162,0) .... S XB("ROU")="" "RTN","XBPATSE",163,0) .... F S XB("ROU")=$O(^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),XB("PNBR"),XB("ROU"))) Q:XB("ROU")=""!(XB("END")) D "RTN","XBPATSE",164,0) ..... D:$Y+5>IOSL HDR "RTN","XBPATSE",165,0) ..... Q:XB("END") "RTN","XBPATSE",166,0) ..... W !,$J(XB("PNBR"),4),?5,XB("ROU"),?14,^TMP($J,"P",XB("NSP"),XB("NAM"),XB("VER"),XB("PNBR"),XB("ROU")) "RTN","XBPATSE",167,0) Q "RTN","XBPATSE",168,0) ; "RTN","XBPATSE",169,0) HDR ; "RTN","XBPATSE",170,0) NEW DIRUT,DUOUT "RTN","XBPATSE",171,0) D:XB("PAGE")&($E(IOST,1,2)="C-")&(IO=IO(0)) "RTN","XBPATSE",172,0) . S Y=$$DIR^XBDIR("E") "RTN","XBPATSE",173,0) . S:$D(DIRUT)!($D(DUOUT)) XB("END")=1 "RTN","XBPATSE",174,0) .Q "RTN","XBPATSE",175,0) Q:XB("END") "RTN","XBPATSE",176,0) HDR1 ; "RTN","XBPATSE",177,0) D:$D(IO("S"))&('XB("PAGE")) "RTN","XBPATSE",178,0) . S (DX,DY)=0 "RTN","XBPATSE",179,0) . X ^%ZOSF("XY") "RTN","XBPATSE",180,0) .Q "RTN","XBPATSE",181,0) W:$E(IOST,1,2)="C-"!(($E(IOST,1,2)'="C-")&(XB("PAGE"))) @IOF "RTN","XBPATSE",182,0) HDR2 ; "RTN","XBPATSE",183,0) S XB("PAGE")=XB("PAGE")+1 "RTN","XBPATSE",184,0) W !,?IOM-$L(XB("HD1"))\2,XB("HD1"),?(IOM-15),"PAGE: ",$J(XB("PAGE"),3) "RTN","XBPATSE",185,0) W !,?IOM-$L(XB("HD2"))\2,XB("HD2") "RTN","XBPATSE",186,0) W !,"PATCH" "RTN","XBPATSE",187,0) W !,"NMBR",?5,"ROUTINE",?14,"ROUTINE DESCRIPTION" "RTN","XBPATSE",188,0) W !,"==== ======== ",$$REPEAT^XLFSTR("=",IOM-19) "RTN","XBPATSE",189,0) Q "RTN","XBPATSE",190,0) ; "RTN","XBPATSE",191,0) EXIT ; "RTN","XBPATSE",192,0) D ^%ZISC "RTN","XBPATSE",193,0) KILL ^UTILITY($J),^TMP($J) "RTN","XBPATSE",194,0) Q "RTN","XBPATSE",195,0) ; "RTN","XBPFTV") 0^127^B751676 "RTN","XBPFTV",1,0) XBPFTV(F,E,V) ; IHS/ADC/GTH - RETURN POINTER FIELD TERMINAL VALUE ; [ 02/07/97 3:02 PM ] "RTN","XBPFTV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPFTV",3,0) ; "RTN","XBPFTV",4,0) ; NOTE TO PROGRAMMERS; Use entry point PFTV. Do not use "RTN","XBPFTV",5,0) ; the first line of this routine, as pending initiatives "RTN","XBPFTV",6,0) ; in MDC might make a formal list on the first line of a "RTN","XBPFTV",7,0) ; routine invalid. GTH 07-10-95 "RTN","XBPFTV",8,0) ; "RTN","XBPFTV",9,0) ; Given a file number, file entry number, and variable "RTN","XBPFTV",10,0) ; name into which the results will be placed, return the "RTN","XBPFTV",11,0) ; terminal value after following the pointer chain. "RTN","XBPFTV",12,0) ; "RTN","XBPFTV",13,0) ; U must exist and have a value of "^" "RTN","XBPFTV",14,0) ; "RTN","XBPFTV",15,0) ; Formal list: "RTN","XBPFTV",16,0) ; "RTN","XBPFTV",17,0) ; 1) F = file number (call by value) "RTN","XBPFTV",18,0) ; 2) E = file entry number (call by value) "RTN","XBPFTV",19,0) ; 3) V = variable for results (call by reference) "RTN","XBPFTV",20,0) ; "RTN","XBPFTV",21,0) ; Scratch vars: "RTN","XBPFTV",22,0) ; D = Flag, 1 = Done, 0 = continue "RTN","XBPFTV",23,0) ; G = Global for file F. "RTN","XBPFTV",24,0) ; "RTN","XBPFTV",25,0) ; *** NO ERROR CHECKING DONE *** "RTN","XBPFTV",26,0) ; "RTN","XBPFTV",27,0) G START "RTN","XBPFTV",28,0) ; "RTN","XBPFTV",29,0) ; The below PEP should be used in case the current movement to "RTN","XBPFTV",30,0) ; not allow a formal list of parameters on the first line of a "RTN","XBPFTV",31,0) ; routine passes thru MDC. "RTN","XBPFTV",32,0) ; "RTN","XBPFTV",33,0) PFTV(F,E,V) ;PEP - Return Pointer Field Terminal Value. "RTN","XBPFTV",34,0) ; "RTN","XBPFTV",35,0) START ; "RTN","XBPFTV",36,0) NEW D,G "RTN","XBPFTV",37,0) F D TRACE Q:D "RTN","XBPFTV",38,0) Q "RTN","XBPFTV",39,0) ; "RTN","XBPFTV",40,0) TRACE ; FOLLOW POINTER CHAIN "RTN","XBPFTV",41,0) S D=1,V=E "RTN","XBPFTV",42,0) Q:'E "RTN","XBPFTV",43,0) S G=^DIC(F,0,"GL") "RTN","XBPFTV",44,0) Q:'$D(@(G_E_",0)")) "RTN","XBPFTV",45,0) S V=$P(@(G_E_",0)"),U) "RTN","XBPFTV",46,0) Q:$P(^DD(F,.01,0),U,2)'["P" "RTN","XBPFTV",47,0) S F=+$P($P(^DD(F,.01,0),U,2),"P",2) "RTN","XBPFTV",48,0) Q:'$D(@(G_E_",0)")) "RTN","XBPFTV",49,0) S E=$P(@(G_E_",0)"),U) "RTN","XBPFTV",50,0) S D=0 "RTN","XBPFTV",51,0) Q "RTN","XBPFTV",52,0) ; "RTN","XBPKDEL") 0^128^B34190229 "RTN","XBPKDEL",1,0) XBPKDEL ; IHS/ADC/GTH - REMOVE OPTIONS, INPUT,SORT,PRINT TEMPLATES, HELP FRAMES, BULLETINS, FUNCTIONS, AND IF INDICATED, SECURITY KEYS FOR A PACKAGE ; [ 12/11/2000 3:13 PM ] "RTN","XBPKDEL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPKDEL",3,0) ; XB*3*8 - IHS/ASDST/GTH - 12-07-00 - Also delete Forms, Protocols, and List templates. Add support for routine XBPKDEL1. "RTN","XBPKDEL",4,0) ; "RTN","XBPKDEL",5,0) ; XBPKNSP must be set to the namespace, e.g. "AICD" if this "RTN","XBPKDEL",6,0) ; routine is called from a preinit. "RTN","XBPKDEL",7,0) ; "RTN","XBPKDEL",8,0) ; If you want security keys deleted, set XBPKEY=1 if this "RTN","XBPKDEL",9,0) ; routine is called from a preinit. "RTN","XBPKDEL",10,0) ; "RTN","XBPKDEL",11,0) ; Call LIST^XBPKDEL to list all namespaced options, "RTN","XBPKDEL",12,0) ; templates, etc. "RTN","XBPKDEL",13,0) ; "RTN","XBPKDEL",14,0) ; Call RUN^XBPKDEL to delete all namespaced options, "RTN","XBPKDEL",15,0) ; templates, etc. "RTN","XBPKDEL",16,0) ; "RTN","XBPKDEL",17,0) ; The RUN and LIST entry points are for programmer use and "RTN","XBPKDEL",18,0) ; are not to be called from a preinit. Preinit calls "RTN","XBPKDEL",19,0) ; XBPKDEL directly with variables set as indicated above. "RTN","XBPKDEL",20,0) ; "RTN","XBPKDEL",21,0) START ; "RTN","XBPKDEL",22,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q "RTN","XBPKDEL",23,0) I '$D(XBPKNSP) W !,*7,"Namespace variable does not exist!" Q "RTN","XBPKDEL",24,0) S U="^",DUZ(0)="@",XBPKQUIT=XBPKNSP_"{" "RTN","XBPKDEL",25,0) I $D(XBPKRUN) S XBPKDOC="This routine" "RTN","XBPKDEL",26,0) E S XBPKDOC="The preinit for this package" "RTN","XBPKDEL",27,0) D ASK "RTN","XBPKDEL",28,0) G:XBPKSTP A "RTN","XBPKDEL",29,0) ; F XBPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D DELETE ; XB*3*8 "RTN","XBPKDEL",30,0) F XBPKGLO="^DIBT(","^DIPT(","^SD(409.61,","^DIE(","^DIST(.403,","^DIC(19,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC"",","^ORD(101," D DELETE ; XB*3*8 "RTN","XBPKDEL",31,0) I $D(XBPKEY) S XBPKGLO="^DIC(19.1," D DELETE ;DELETE SECURITY KEYS WITH THIS NAMESPACE "RTN","XBPKDEL",32,0) W ! "RTN","XBPKDEL",33,0) S %=1 D ENASK^XQ3 ;CALL TO FIX OPTION POINTERS "RTN","XBPKDEL",34,0) W !,*7,"Be sure to give users a new primary menu option if one of the menu options",!,"deleted within this namespace had been used as a primary menu option." "RTN","XBPKDEL",35,0) A ; "RTN","XBPKDEL",36,0) D EOJ "RTN","XBPKDEL",37,0) Q "RTN","XBPKDEL",38,0) ; "RTN","XBPKDEL",39,0) ASK ;ASK USER IF WANTS TO CONTINUE "RTN","XBPKDEL",40,0) S XBPKSTP=0 "RTN","XBPKDEL",41,0) ; W !!,*7,XBPKDOC," will delete all options, sort, input," ; XB*3*8 "RTN","XBPKDEL",42,0) ; W !,"and print templates, bulletins, functions, " ; XB*3*8 "RTN","XBPKDEL",43,0) ; W $S($D(XBPKEY):"help frames and security keys",1:"and help frames") ; XB*3*8 "RTN","XBPKDEL",44,0) ; W !,"namespaced '",XBPKNSP,"' that are currently in this UCI. " ; XB*3*8 "RTN","XBPKDEL",45,0) ; XB*3*8 begin block "RTN","XBPKDEL",46,0) KILL ^UTILITY($J,"W") "RTN","XBPKDEL",47,0) NEW DIW,DIWL,DIWR,DIWF,DIWT "RTN","XBPKDEL",48,0) S DIWL=1,DIWR=(IOM-10),DIWF="W" "RTN","XBPKDEL",49,0) W !!,*7 "RTN","XBPKDEL",50,0) S X=XBPKDOC "RTN","XBPKDEL",51,0) D ^DIWP "RTN","XBPKDEL",52,0) S X="will delete all options, templates (sort, input, list, and print), forms, bulletins, functions, protocols, " "RTN","XBPKDEL",53,0) D ^DIWP "RTN","XBPKDEL",54,0) S X=$S($D(XBPKEY):"help frames and security keys",1:"and help frames")_" namespaced '"_XBPKNSP_"' that are currently in this UCI." "RTN","XBPKDEL",55,0) D ^DIWP,^DIWW "RTN","XBPKDEL",56,0) KILL ^UTILITY($J,"W") "RTN","XBPKDEL",57,0) ; XB*3*8 end block "RTN","XBPKDEL",58,0) W !,"Do you want to continue" "RTN","XBPKDEL",59,0) S %=1 "RTN","XBPKDEL",60,0) D YN^DICN "RTN","XBPKDEL",61,0) I %=0 W !!,"If you answer with a ""NO"" or a ""^"" I will stop package initialization.",! G ASK "RTN","XBPKDEL",62,0) I %=2!(%=-1) W:'$D(XBPKRUN) !!,*7,"Package initialization process stopped!" S XBPKSTP=1 KILL DIFQ ;KILLING DIFQ STOPS THE INITIALIZATION PROCESS "RTN","XBPKDEL",63,0) W ! "RTN","XBPKDEL",64,0) Q "RTN","XBPKDEL",65,0) ; "RTN","XBPKDEL",66,0) DELETE ; "RTN","XBPKDEL",67,0) W !!,"Now deleting `",XBPKNSP,"' namespaced ",$P(@(XBPKGLO_"0)"),U),"S..." "RTN","XBPKDEL",68,0) S XBPKNSPC=XBPKNSP "RTN","XBPKDEL",69,0) I $D(@(XBPKGLO_"""B"",XBPKNSPC)")) S DA=$O(@(XBPKGLO_"""B"",XBPKNSPC,"""")")),DIK=XBPKGLO D ^DIK KILL DIK,DA "RTN","XBPKDEL",70,0) ; F L=0:0 S XBPKNSPC=$O(@(XBPKGLO_"""B"",XBPKNSPC)")) Q:XBPKNSPC=""!(XBPKNSPC]XBPKQUIT) S DA=$O(@(XBPKGLO_"""B"",XBPKNSPC,"""")")) W !?3,XBPKNSPC S DIK=XBPKGLO D ^DIK KILL DIK,DA ; XB*3*8 "RTN","XBPKDEL",71,0) F L=0:0 S XBPKNSPC=$O(@(XBPKGLO_"""B"",XBPKNSPC)")) Q:XBPKNSPC=""!(XBPKNSPC]XBPKQUIT) S DA=$O(@(XBPKGLO_"""B"",XBPKNSPC,"""")")) W !?3,XBPKNSPC D S DIK=XBPKGLO D ^DIK KILL DIK,DA ; XB*3*8 "RTN","XBPKDEL",72,0) . ; XB*3*8 begin block "RTN","XBPKDEL",73,0) . ; Delete key from holders "RTN","XBPKDEL",74,0) . Q:XBPKGLO'="^DIC(19.1," "RTN","XBPKDEL",75,0) . S XBPKKIEN=DA "RTN","XBPKDEL",76,0) . NEW DA "RTN","XBPKDEL",77,0) . S XBPKHIEN=0 "RTN","XBPKDEL",78,0) . F S XBPKHIEN=$O(^XUSEC(XBPKNSPC,XBPKHIEN)) Q:'XBPKHIEN D "RTN","XBPKDEL",79,0) .. S DIE="^VA(200,XBPKHIEN,51,",DA(1)=XBPKHIEN,DA=XBPKKIEN,DR=".01///@" "RTN","XBPKDEL",80,0) .. D ^DIE "RTN","XBPKDEL",81,0) .. Q "RTN","XBPKDEL",82,0) . Q "RTN","XBPKDEL",83,0) ; XB*3*8 end block "RTN","XBPKDEL",84,0) Q "RTN","XBPKDEL",85,0) ; "RTN","XBPKDEL",86,0) LIST ; ENTRY POINT FOR LISTING NAMESPACED ITEMS "RTN","XBPKDEL",87,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q "RTN","XBPKDEL",88,0) S U="^",DUZ(0)="@" "RTN","XBPKDEL",89,0) W !!,"Utility to list all namespaced items in current UCI",! "RTN","XBPKDEL",90,0) D GETNSP "RTN","XBPKDEL",91,0) G:XBPKNSP["^"!("^"[XBPKNSP) EOJ "RTN","XBPKDEL",92,0) ; W !!,"Listing of items in namespace ",XBPKNSP,! ; XB*3*8 "RTN","XBPKDEL",93,0) W @IOF,!!,"Listing of items in namespace ",XBPKNSP,! ; XB*3*8 "RTN","XBPKDEL",94,0) W "--------------------------------------",! "RTN","XBPKDEL",95,0) S XBPKQUIT=XBPKNSP_"{",XBPKF=0 "RTN","XBPKDEL",96,0) ; F XBPKGLO="^DIBT(","^DIPT(","^DIE(","^DIC(19,","^DIC(19.1,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC""," D LIST2 ; XB*3*8 "RTN","XBPKDEL",97,0) F XBPKGLO="^DIBT(","^DIPT(","^SD(409.61,","^DIE(","^DIST(.403,","^DIC(19,","^DIC(19.1,","^XMB(3.6,","^DIC(9.2,","^DD(""FUNC"",","^ORD(101," D LIST2 ; XB*3*8 "RTN","XBPKDEL",98,0) G EOJ "RTN","XBPKDEL",99,0) ; "RTN","XBPKDEL",100,0) LIST2 ; "RTN","XBPKDEL",101,0) S XBPKNSPC=$O(@(XBPKGLO_"""B"",XBPKNSP)")) "RTN","XBPKDEL",102,0) I $P(XBPKNSPC,XBPKNSP)]"" W:XBPKF ! S XBPKF=0 W "NO ",$P(@(XBPKGLO_"0)"),"^",1),"S",! Q "RTN","XBPKDEL",103,0) S XBPKF=1 "RTN","XBPKDEL",104,0) W !,$P(@(XBPKGLO_"0)"),"^",1),"S",! "RTN","XBPKDEL",105,0) S XBPKNSPC=XBPKNSP "RTN","XBPKDEL",106,0) F Q:$D(DUOUT) S XBPKNSPC=$O(@(XBPKGLO_"""B"",XBPKNSPC)")) Q:XBPKNSPC=""!(XBPKNSPC]XBPKQUIT) S DA=$O(@(XBPKGLO_"""B"",XBPKNSPC,"""")")) W ?3,XBPKNSPC,! I $Y>(IOSL-5) D PAUSE "RTN","XBPKDEL",107,0) Q "RTN","XBPKDEL",108,0) ; "RTN","XBPKDEL",109,0) PAUSE ; Screen control for LIST "RTN","XBPKDEL",110,0) S Y=$$DIR^XBDIR("E") "RTN","XBPKDEL",111,0) ; W @IOF ; XB*3*8 "RTN","XBPKDEL",112,0) W @IOF,! ; XB*3*8 "RTN","XBPKDEL",113,0) Q "RTN","XBPKDEL",114,0) ; "RTN","XBPKDEL",115,0) RUN ; ENTRY POINT FOR ACQUIRING CONTROL ARGUMENTS AND DOING DELETIONS "RTN","XBPKDEL",116,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q "RTN","XBPKDEL",117,0) I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q "RTN","XBPKDEL",118,0) W !!,"Utility to delete all namespaced items in current UCI",! "RTN","XBPKDEL",119,0) D GETNSP "RTN","XBPKDEL",120,0) G:XBPKNSP["^"!("^"[XBPKNSP) EOJ "RTN","XBPKDEL",121,0) D GETKEY "RTN","XBPKDEL",122,0) I $D(XBPKEY),XBPKEY="^" G EOJ "RTN","XBPKDEL",123,0) S XBPKRUN="" "RTN","XBPKDEL",124,0) G XBPKDEL "RTN","XBPKDEL",125,0) ; "RTN","XBPKDEL",126,0) GETNSP ; CODE TO ACQUIRE NAMESPACE "RTN","XBPKDEL",127,0) R "Namespace to process: ",XBPKNSP:600,! "RTN","XBPKDEL",128,0) Q:("^"[XBPKNSP)!(XBPKNSP["^") "RTN","XBPKDEL",129,0) I XBPKNSP["?" W "Enter null line or '^' to quit.",! "RTN","XBPKDEL",130,0) I XBPKNSP'?1U1.7UN W "Namespace must begin with an upper-case letter and",!," consist only of upper-case letters and numbers",! G GETNSP "RTN","XBPKDEL",131,0) Q "RTN","XBPKDEL",132,0) ; "RTN","XBPKDEL",133,0) GETKEY ; CODE TO ACQUIRE SECURITY KEY FLAG "RTN","XBPKDEL",134,0) W "Do you want to delete security keys" "RTN","XBPKDEL",135,0) S %=1 "RTN","XBPKDEL",136,0) D YN^DICN "RTN","XBPKDEL",137,0) I %=0 W !!,"If you answer with a ""NO"" security keys will not be deleted.",! G ASK "RTN","XBPKDEL",138,0) I %=2!(%=-1) S:%=-1 XBPKEY="^" "RTN","XBPKDEL",139,0) E S XBPKEY="" "RTN","XBPKDEL",140,0) Q "RTN","XBPKDEL",141,0) ; "RTN","XBPKDEL",142,0) EOJ ;EP - Clean up after this routine or XBPKDEL1 ; XB*3*8 "RTN","XBPKDEL",143,0) ; KILL XBPKF,XBPKGLO,XBPKEY,XBPKSTP,XBPKNSP,XBPKNSPC,XBPKQUIT,XBPKRUN,XBPKDOC,DUOUT,DTOUT ; XB*3*8 "RTN","XBPKDEL",144,0) KILL XBPKF,XBPKGLO,XBPKHIEN,XBPKKIEN,XBPKEY,XBPKSTP,XBPKNSP,XBPKNSPC,XBPKQUIT,XBPKRUN,XBPKDOC,DUOUT,DTOUT ; XB*3*8 "RTN","XBPKDEL",145,0) Q "RTN","XBPKDEL",146,0) ; "RTN","XBPKDEL1") 0^129^B21342872 "RTN","XBPKDEL1",1,0) XBPKDEL1 ; IHS/ADC/GTH - DELETE RETIRED AND REPLACED PACKAGES ; [ 10/29/2002 7:42 AM ] "RTN","XBPKDEL1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPKDEL1",3,0) ; XB*3*8 - IHS/ASDST/GTH - 12-07-00 - New routine with patch 8. "RTN","XBPKDEL1",4,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Use $GLOBAL. "RTN","XBPKDEL1",5,0) ; "RTN","XBPKDEL1",6,0) ; DECERT subroutine processes a list of retired/replaced "RTN","XBPKDEL1",7,0) ; packages, and gives the user the opportunity to delete all "RTN","XBPKDEL1",8,0) ; the package components, the routines, and globals, in the "RTN","XBPKDEL1",9,0) ; namspace of the package. "RTN","XBPKDEL1",10,0) ; "RTN","XBPKDEL1",11,0) Q Q "RTN","XBPKDEL1",12,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",13,0) DECERT ;EP - Delete de-certified packages. "RTN","XBPKDEL1",14,0) I '$D(^DIC(0)) W !,*7,"Filemanager does not exist in this UCI!" Q "RTN","XBPKDEL1",15,0) I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q "RTN","XBPKDEL1",16,0) ; "RTN","XBPKDEL1",17,0) W @IOF,!!,"You'll be given the opportunity to delete the following packages,",!,"Routines, and Globals in the indicated namespace, in 3 steps." "RTN","XBPKDEL1",18,0) L1 ; "RTN","XBPKDEL1",19,0) W !,"NAMESPACE--DESCRIPTION----------------------------RTNS-----GBLS------" "RTN","XBPKDEL1",20,0) ; "RTN","XBPKDEL1",21,0) NEW C,G,L,R "RTN","XBPKDEL1",22,0) ; "RTN","XBPKDEL1",23,0) F C=1:1 S L=$T(KILLEM+C),L=$P(L,";",3) Q:L="###" D "RTN","XBPKDEL1",24,0) . W !,$P(L,"^",1),?11,$P(L,"^",2),?50,$J($$RSEL^ZIBRSEL($P(L,"^",1)_"*"),4),?59,$J($$CG($P(L,"^",1)),4) "RTN","XBPKDEL1",25,0) . I $Y>(IOSL-3),$$DIR^XBDIR("E","Press RETURN for the rest of the list") W @IOF "RTN","XBPKDEL1",26,0) .Q "RTN","XBPKDEL1",27,0) ; "RTN","XBPKDEL1",28,0) Q:$G(XBLIST) "RTN","XBPKDEL1",29,0) ; "RTN","XBPKDEL1",30,0) I '$$DIR^XBDIR("Y","Are you sure you want to continue","NO",$G(DTIME,300)) Q "RTN","XBPKDEL1",31,0) ; "RTN","XBPKDEL1",32,0) W !!,"There will be 3 steps:" "RTN","XBPKDEL1",33,0) W !?10,"1) Delete package via call to XBPKDEL;" "RTN","XBPKDEL1",34,0) W !?10,"2) Delete Routines (not asked if 0 routines);" "RTN","XBPKDEL1",35,0) W !?10,"3) Delete Globals (not asked if 0 globals)." "RTN","XBPKDEL1",36,0) W !,"Of course, your wisdom will be questioned if you do this w/o a full b/u...",! "RTN","XBPKDEL1",37,0) ; "RTN","XBPKDEL1",38,0) Q:'$$DIR^XBDIR("E") "RTN","XBPKDEL1",39,0) ; "RTN","XBPKDEL1",40,0) F C=1:1 S L=$T(KILLEM+C),L=$P(L,";",3) Q:L="###" D Q:$G(XBPKSTP) "RTN","XBPKDEL1",41,0) . W !!,$P(L,"^",1),?11,$P(L,"^",2) "RTN","XBPKDEL1",42,0) . S XBPKEY=1,XBPKNSP=$P(L,"^",1) "RTN","XBPKDEL1",43,0) . D DEL(XBPKNSP) "RTN","XBPKDEL1",44,0) . Q:$G(XBPKSTP) "RTN","XBPKDEL1",45,0) . D RTNS(XBPKNSP) "RTN","XBPKDEL1",46,0) . Q:$G(XBPKSTP) "RTN","XBPKDEL1",47,0) . D GBLS(XBPKNSP) "RTN","XBPKDEL1",48,0) . Q:$G(XBPKSTP) "RTN","XBPKDEL1",49,0) .Q "RTN","XBPKDEL1",50,0) ; "RTN","XBPKDEL1",51,0) D EOJ^XBPKDEL "RTN","XBPKDEL1",52,0) Q "RTN","XBPKDEL1",53,0) ; "RTN","XBPKDEL1",54,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",55,0) DEL(XBPKNSP) ; "RTN","XBPKDEL1",56,0) W !,"Deleting the ",XBPKNSP," package components via call to XBPKDEL" "RTN","XBPKDEL1",57,0) NEW C,G,L,R "RTN","XBPKDEL1",58,0) S XBPKRUN="" "RTN","XBPKDEL1",59,0) D ^XBPKDEL "RTN","XBPKDEL1",60,0) Q "RTN","XBPKDEL1",61,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",62,0) RTNS(XBPKNSP) ; "RTN","XBPKDEL1",63,0) NEW C,G,L,R,XB "RTN","XBPKDEL1",64,0) S XB=$$RSEL^ZIBRSEL(XBPKNSP_"*") "RTN","XBPKDEL1",65,0) Q:'XB "RTN","XBPKDEL1",66,0) I '$$DIR^XBDIR("Y","Delete "_XB_" routines in the "_XBPKNSP_" namespace","NO","","If you answer 'YES', the routines will be deleted") S:X=U XBPKSTP=1 Q "RTN","XBPKDEL1",67,0) W !,"Deleting ",XB," ",XBPKNSP," routines",! "RTN","XBPKDEL1",68,0) S X="" "RTN","XBPKDEL1",69,0) F S X=$O(^TMP("ZIBRSEL",$J,X)) Q:X="" W X,$J("",10-$L(X)) X ^%ZOSF("DEL") "RTN","XBPKDEL1",70,0) KILL ^TMP("ZIBRSEL",$J) "RTN","XBPKDEL1",71,0) Q "RTN","XBPKDEL1",72,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",73,0) GBLS(XBPKNSP) ; "RTN","XBPKDEL1",74,0) NEW C,G,L,R,XB "RTN","XBPKDEL1",75,0) S XB=$$CG(XBPKNSP) "RTN","XBPKDEL1",76,0) Q:'XB "RTN","XBPKDEL1",77,0) I '$$DIR^XBDIR("Y","Delete "_XB_" globals in the "_XBPKNSP_" namespace","NO","","If you answer 'YES', the globals will be deleted") S:X=U XBPKSTP=1 Q "RTN","XBPKDEL1",78,0) W !,"Kill'ing ",$$CG(XBPKNSP)," ",XBPKNSP," globals",! "RTN","XBPKDEL1",79,0) S G="^"_XBPKNSP,L=$L(XBPKNSP) "RTN","XBPKDEL1",80,0) ;I '$$KILLOK^ZIBGCHAR(G) KILL @G ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",81,0) I '$$KILLOK^ZIBGCHAR(XBPKNSP) KILL @G ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",82,0) ;F S G=$O(@G) Q:'($E(G,1,L)=XBPKNSP) S G="^"_G W G,$J("",10-$L(G)) D ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",83,0) F S G=$O(^$G(G)) Q:'($E(G,2,L+1)=XBPKNSP) W G,$J("",10-$L(G)) D ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",84,0) . I '$$KILLOK^ZIBGCHAR($E(G,2,$L(G))) KILL @G Q "RTN","XBPKDEL1",85,0) . W !,": ",$$ERR^ZIBGCHAR($$KILLOK^ZIBGCHAR($E(G,2,$L(G)))) "RTN","XBPKDEL1",86,0) .Q "RTN","XBPKDEL1",87,0) Q "RTN","XBPKDEL1",88,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",89,0) CG(N) ; Count the globals in the N namespace. "RTN","XBPKDEL1",90,0) NEW C,G,L,R "RTN","XBPKDEL1",91,0) S C=0,G="^"_N,L=$L(N) "RTN","XBPKDEL1",92,0) I $D(@G) S C=1 "RTN","XBPKDEL1",93,0) ;F S G=$O(@G) Q:'($E(G,1,L)=N) S G="^"_G,C=C+1 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",94,0) F S G=$O(^$G(G)) Q:'($E(G,2,L+1)=N) S C=C+1 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBPKDEL1",95,0) Q C "RTN","XBPKDEL1",96,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",97,0) LIST ;EP - List retired/replaced packages. "RTN","XBPKDEL1",98,0) NEW XBLIST "RTN","XBPKDEL1",99,0) S XBLIST=1 "RTN","XBPKDEL1",100,0) W @IOF "RTN","XBPKDEL1",101,0) D L1 "RTN","XBPKDEL1",102,0) Q "RTN","XBPKDEL1",103,0) ; ------------------------------------------------------------- "RTN","XBPKDEL1",104,0) KILLEM ; Add the packages to be deleted, below: Namespace^Description "RTN","XBPKDEL1",105,0) ;;AAPC^Ambulatory Patient Care Data Entry "RTN","XBPKDEL1",106,0) ;;ACI^Injury Report "RTN","XBPKDEL1",107,0) ;;ACHA^Community Health Nursing "RTN","XBPKDEL1",108,0) ;;ADB^Diabetic Tracking System "RTN","XBPKDEL1",109,0) ;;AMAL^Malpractice Claims "RTN","XBPKDEL1",110,0) ;;APCM^PCC Table Maintenance "RTN","XBPKDEL1",111,0) ;;AMCP^Women's Health/Pap Smear "RTN","XBPKDEL1",112,0) ;;AMR^Management Status "RTN","XBPKDEL1",113,0) ;;AMS^Management Referral "RTN","XBPKDEL1",114,0) ;;APCQ^PCC Quality Assurance "RTN","XBPKDEL1",115,0) ;;APCG^Family Genetic Linkage "RTN","XBPKDEL1",116,0) ;;APCR^PCC Register "RTN","XBPKDEL1",117,0) ;;APCS^PCC Surveillance "RTN","XBPKDEL1",118,0) ;;APCT^PCC Clinic Training "RTN","XBPKDEL1",119,0) ;;APHR^Physician Tracking "RTN","XBPKDEL1",120,0) ;;ATA^Original Time and Attendance "RTN","XBPKDEL1",121,0) ;;ALP^Mainframe to RPMS data insertion "RTN","XBPKDEL1",122,0) ;;BRB^Institutional Review Board "RTN","XBPKDEL1",123,0) ;;### "RTN","XBPKDEL1",124,0) ; "RTN","XBPKG") 0^130^B3951750 "RTN","XBPKG",1,0) XBPKG ;IHS/SET/GTH - MOVE FILES INTO PACKAGE ENTRY ; [ 04/18/2003 9:06 AM ] "RTN","XBPKG",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPKG",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine. "RTN","XBPKG",4,0) ; Move selected files into the selected entry in the PACKAGE "RTN","XBPKG",5,0) ; file. The entry in the PACKAGE file can then be DIFROM'd, and "RTN","XBPKG",6,0) ; the resulting routines searched for routine or global references "RTN","XBPKG",7,0) ; or lines of code of interest. "RTN","XBPKG",8,0) ; "RTN","XBPKG",9,0) ; The IENs in the PACKAGE multiple will be equal to the FILE number. "RTN","XBPKG",10,0) ; Data will not be included with files. "RTN","XBPKG",11,0) ; "RTN","XBPKG",12,0) ; User will be asked if all entries in the selected entry in PACKAGE "RTN","XBPKG",13,0) ; should be KILL'd before the move. If the FILE multiple is not "RTN","XBPKG",14,0) ; KILL'd, the selected files will be added (possibly overwrite) to "RTN","XBPKG",15,0) ; the existing entries in the FILE multiple. "RTN","XBPKG",16,0) ; "RTN","XBPKG",17,0) ; "RTN","XBPKG",18,0) START ; "RTN","XBPKG",19,0) W !,"Select the files that you want to copy into the entry in PACKAGE",! "RTN","XBPKG",20,0) D ^XBDSET "RTN","XBPKG",21,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBPKG",22,0) NEW DA "RTN","XBPKG",23,0) S DA=$$SELPKG "RTN","XBPKG",24,0) Q:+DA<1 "RTN","XBPKG",25,0) S X=$$ASKKILL($P(^DIC(9.4,DA,0),"^",1)) "RTN","XBPKG",26,0) Q:X="^" "RTN","XBPKG",27,0) I X KILL ^DIC(9.4,DA,4) "RTN","XBPKG",28,0) D MOVEFILS(DA) "RTN","XBPKG",29,0) D EOJ "RTN","XBPKG",30,0) Q "RTN","XBPKG",31,0) ; "RTN","XBPKG",32,0) ; "RTN","XBPKG",33,0) SELPKG() ;-- Select the entry in PACKAGE into which to move the files. "RTN","XBPKG",34,0) W !!,"Select the entry in PACKAGE into which to move the files" "RTN","XBPKG",35,0) NEW DIC "RTN","XBPKG",36,0) S DIC=9.4,DIC(0)="AEL" "RTN","XBPKG",37,0) D ^DIC "RTN","XBPKG",38,0) Q +Y "RTN","XBPKG",39,0) ; "RTN","XBPKG",40,0) ASKKILL(P) ;-- Ask the user if KILL multiple in PACKAGE prior to move. "RTN","XBPKG",41,0) Q $$DIR^XBDIR("Y","KILL the FILE multiple in PACKAGE for "_P,"N") "RTN","XBPKG",42,0) ; "RTN","XBPKG",43,0) MOVEFILS(DA) ;-- Move the selected files into the selected entry in PACKAGE. "RTN","XBPKG",44,0) Q:'(DA=+DA) "RTN","XBPKG",45,0) Q:'$D(^DIC(9.4,DA)) "RTN","XBPKG",46,0) NEW C,I "RTN","XBPKG",47,0) S (C,I)=0 "RTN","XBPKG",48,0) F S I=$O(^UTILITY("XBDSET",$J,I)) Q:'(I=+I) D "RTN","XBPKG",49,0) . S ^DIC(9.4,DA,4,I,0)=I "RTN","XBPKG",50,0) . S ^DIC(9.4,DA,4,I,222)="y^y^^n^^^n^m^y" "RTN","XBPKG",51,0) . S ^DIC(9.4,DA,4,"B",I,I)="" "RTN","XBPKG",52,0) . S C=C+1 "RTN","XBPKG",53,0) .Q "RTN","XBPKG",54,0) S ^DIC(9.4,DA,4,0)="^9.44PA^"_$O(^UTILITY("XBDSET",$J,99999999),-1)_"^"_C "RTN","XBPKG",55,0) W !!,C_" files set into Package "_$P(^DIC(9.4,DA,0),U)_".",! "RTN","XBPKG",56,0) Q "RTN","XBPKG",57,0) ; "RTN","XBPKG",58,0) EOJ ; "RTN","XBPKG",59,0) KILL XBDSC,XBDSFF,XBDSFILE,XBDSHI,XBDSL,XBDSLO,XBDSND,XBDSP,XBDSQ,XBDSTF,XBDSX "RTN","XBPKG",60,0) KILL DIC,DIR,DIRUT,DTOUT,DUOUT,X,Y "RTN","XBPKG",61,0) Q "RTN","XBPKG",62,0) ; "RTN","XBPOST") 0^131^B66404313 "RTN","XBPOST",1,0) XBPOST ; IHS/ADC/GTH - XB/ZIB INSTALLATION POSTINIT ; [ 02/07/97 3:02 PM ] "RTN","XBPOST",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPOST",3,0) ; "RTN","XBPOST",4,0) W !!,$$C^XBFUNC("Beginning XB/ZIB post-init at "_$$FMTE^XLFDT($$HTFM^XLFDT($H))_".") "RTN","XBPOST",5,0) ; "RTN","XBPOST",6,0) W !!,$$C^XBFUNC("Checking PROTOCOL file for XB entries") "RTN","XBPOST",7,0) ; "RTN","XBPOST",8,0) F XB="XB DISPLAY","XB NEXT SCREEN","XB PREVIOUS SCREEN","XB QUIT" I '$D(^ORD(101,"B",XB)) W *7,!,"You're missing option '",XB,"' from PROTOCOL." D "RTN","XBPOST",9,0) . I $$DIR^XBDIR("Y","Do you want to run XBONIT to add the option","Y","","Routine XBONIT will add the XB options to your PROTOCOL file","^D HELP^XBHELP(""ORD101"",""XBPOST"")","") D ^XBONIT "RTN","XBPOST",10,0) .Q "RTN","XBPOST",11,0) ; "RTN","XBPOST",12,0) ; "RTN","XBPOST",13,0) W !,$$C^XBFUNC("Delivering mail message to local programmers") "RTN","XBPOST",14,0) ; "RTN","XBPOST",15,0) D MAIL^XBMAIL("XUMGR-XUPROGMODE","DESC^XBPOST") "RTN","XBPOST",16,0) ; "RTN","XBPOST",17,0) I $$DIR^XBDIR("Y","Do you want to un-needed routines","N","","I'll delete the XB init routines, etc. (Except routine XBINIT)") D "RTN","XBPOST",18,0) . S X=$$RSEL^ZIBRSEL("XBINI*","^TMP(""XBPOST"",$J,") "RTN","XBPOST",19,0) . KILL ^TMP("XBPOST",$J,"XBINIT") "RTN","XBPOST",20,0) . I $D(^ORD(101,"B","XB DISPLAY")),$D(^("XB NEXT SCREEN")),$D(^("XB PREVIOUS SCREEN")),$D(^("XB QUIT")) S X=$$RSEL^ZIBRSEL("XBONI*","^TMP(""XBPOST"",$J,") "RTN","XBPOST",21,0) . S X="" "RTN","XBPOST",22,0) . F S X=$O(^TMP("XBPOST",$J,X)) Q:X="" X ^%ZOSF("DEL") W !,X,$E("...........",1,11-$L(X)),"" "RTN","XBPOST",23,0) . KILL ^TMP("XBPOST",$J) "RTN","XBPOST",24,0) .Q "RTN","XBPOST",25,0) ; "RTN","XBPOST",26,0) W !!,$$C^XBFUNC("You can print a Technical Manual thru the option") "RTN","XBPOST",27,0) W !,$$C^XBFUNC("on the 'MISCELLANEOUS' menu, or with DO ^XBTM.") "RTN","XBPOST",28,0) ; "RTN","XBPOST",29,0) NEW DIC "RTN","XBPOST",30,0) S DIC="^DIC(19,",DIC(0)="",X="ZIB REMOTE PATCH INSTALLATION" "RTN","XBPOST",31,0) D ^DIC "RTN","XBPOST",32,0) I Y<0 W !!,$$C^XBFUNC("You don't have the Remote Patch Installer (ZIBRPI) installed."),!,$$C^XBFUNC("See instructions/descriptions in routine ZIBRPI2.") "RTN","XBPOST",33,0) D HELP^XBHELP("MGR","XBPOST") "RTN","XBPOST",34,0) ; "RTN","XBPOST",35,0) D EN^XBVK("XB"),EN^XBVK("ZIB") "RTN","XBPOST",36,0) W !!,$$C^XBFUNC("XB/ZIB v 3.0 post-init complete at "_$$FMTE^XLFDT($$HTFM^XLFDT($H))_".") "RTN","XBPOST",37,0) Q "RTN","XBPOST",38,0) ; "RTN","XBPOST",39,0) ORD101 ; "RTN","XBPOST",40,0) ;;You're missing one of the XB options from your PROTOCOL file "RTN","XBPOST",41,0) ;;that's needed for the XB interface to the VA's list manager "RTN","XBPOST",42,0) ;;(VALM). If you answer "Y"es, routine ^XBONIT will be called, "RTN","XBPOST",43,0) ;;which will add (or overwrite) the following entries: "RTN","XBPOST",44,0) ;;"XB DISPLAY", "XB NEXT SCREEN", "XB PREVIOUS SCREEN", "XB QUIT". "RTN","XBPOST",45,0) ;;@;! "RTN","XBPOST",46,0) ;;If you answer "N"o, you can run the XBONIT routine later. If "RTN","XBPOST",47,0) ;;you don't run ^XBONIT, and are lacking the XB entries in your "RTN","XBPOST",48,0) ;;PROTOCOL file, you're XB interface to the list manager will be "RTN","XBPOST",49,0) ;;undetermined. "RTN","XBPOST",50,0) ;;### "RTN","XBPOST",51,0) ; "RTN","XBPOST",52,0) MGR ; "RTN","XBPOST",53,0) ;;Don't forget to copy, and rename, the following routines to the "RTN","XBPOST",54,0) ;;MGR uci: "RTN","XBPOST",55,0) ;; Routine Rename As "RTN","XBPOST",56,0) ;; -------- -------- "RTN","XBPOST",57,0) ;; XBCLS %XBCLS "RTN","XBPOST",58,0) ;; ZIBGD %ZIBGD "RTN","XBPOST",59,0) ;; ZIBRD %ZIBRD "RTN","XBPOST",60,0) ;; ZIBCLU0 %ZIBCLU0 "RTN","XBPOST",61,0) ;; ZIBZUCI %ZUCI "RTN","XBPOST",62,0) ;;### "RTN","XBPOST",63,0) ; "RTN","XBPOST",64,0) DESC ; "RTN","XBPOST",65,0) ;;XB/ZIB v 3.0, Installation Announcement. "RTN","XBPOST",66,0) ;; "RTN","XBPOST",67,0) ;;++++++++++++ XB/ZIB 3.0 Installation Announcement +++++++++++++++ "RTN","XBPOST",68,0) ;;+ This mail message has been delivered to all local + "RTN","XBPOST",69,0) ;;+ users that hold an XUMGR, XUPROG, or XUPROGMODE security key. + "RTN","XBPOST",70,0) ;;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "RTN","XBPOST",71,0) ;; "RTN","XBPOST",72,0) ;;Please direct your questions or comments about RPMS software to: "RTN","XBPOST",73,0) ;; OIRM / DSD (Division of Systems Development) "RTN","XBPOST",74,0) ;; 5300 Homestead Road NE "RTN","XBPOST",75,0) ;; Albuquerque NM 87110 "RTN","XBPOST",76,0) ;; 505-837-4189 "RTN","XBPOST",77,0) ;; "RTN","XBPOST",78,0) ;;----------------------------------------------------------------- "RTN","XBPOST",79,0) ;; "RTN","XBPOST",80,0) ;;(1) XBDIR - DIR INTERFACE. "RTN","XBPOST",81,0) ;;The purpose of routine XBDIR is to provide interface methodology "RTN","XBPOST",82,0) ;;for a call to ^DIR, to ensure correct handling of variables, and "RTN","XBPOST",83,0) ;;to provide for the expressiveness of an extrinsic function. There "RTN","XBPOST",84,0) ;;is no requirement to use the interface. "RTN","XBPOST",85,0) ;; "RTN","XBPOST",86,0) ;;----------------------------------------------------------------- "RTN","XBPOST",87,0) ;; "RTN","XBPOST",88,0) ;;(2) XBBPI - BUILD PRE-INIT ROUTINE. "RTN","XBPOST",89,0) ;;Implementation specific Z commands were replaced with equivalent "RTN","XBPOST",90,0) ;;^%ZOSF nodes. "RTN","XBPOST",91,0) ;; "RTN","XBPOST",92,0) ;;----------------------------------------------------------------- "RTN","XBPOST",93,0) ;; "RTN","XBPOST",94,0) ;;(3) XBHELP - DISPLAY HELP TEXT TO USER. "RTN","XBPOST",95,0) ;;Although this routine was specifically requested to provide the "RTN","XBPOST",96,0) ;;flexibility to display text to the user, it can be used at other "RTN","XBPOST",97,0) ;;times. "RTN","XBPOST",98,0) ;; "RTN","XBPOST",99,0) ;;----------------------------------------------------------------- "RTN","XBPOST",100,0) ;; "RTN","XBPOST",101,0) ;;(4) XBHFMAN - PRINT A MANUAL CONSISTING OF INFO FROM HELP FRAMES. "RTN","XBPOST",102,0) ;;This utility creates a "manual" consisting of information from the "RTN","XBPOST",103,0) ;;option tree of the selected application, and information contained "RTN","XBPOST",104,0) ;;in the option descriptions and help frames. "RTN","XBPOST",105,0) ;; "RTN","XBPOST",106,0) ;;----------------------------------------------------------------- "RTN","XBPOST",107,0) ;; "RTN","XBPOST",108,0) ;;(5) XBKTMP - CLEAN ^TMP(). "RTN","XBPOST",109,0) ;;This routine KILLs nodes in ^TMP( whose first or second subscripts "RTN","XBPOST",110,0) ;;are the current $J. "RTN","XBPOST",111,0) ;; "RTN","XBPOST",112,0) ;;----------------------------------------------------------------- "RTN","XBPOST",113,0) ;; "RTN","XBPOST",114,0) ;;(6) XBLCALL - LIST CALLABLE ROUTINES. "RTN","XBPOST",115,0) ;;The routine has been updated to list published entry points that "RTN","XBPOST",116,0) ;;are supported for calls from other applications. "RTN","XBPOST",117,0) ;; "RTN","XBPOST",118,0) ;;----------------------------------------------------------------- "RTN","XBPOST",119,0) ;; "RTN","XBPOST",120,0) ;;(7) XBLM - LIST MANAGER INTERFACE. "RTN","XBPOST",121,0) ;;Two entry points have been added for support of future GUI "RTN","XBPOST",122,0) ;;programming. "RTN","XBPOST",123,0) ;; "RTN","XBPOST",124,0) ;;----------------------------------------------------------------- "RTN","XBPOST",125,0) ;; "RTN","XBPOST",126,0) ;;(8) XBON/XBOFF - SET REVERSE VIDEO ON/OFF. "RTN","XBPOST",127,0) ;; "RTN","XBPOST",128,0) ;;----------------------------------------------------------------- "RTN","XBPOST",129,0) ;; "RTN","XBPOST",130,0) ;;(9) XBTM - PRINT XB/ZIB TECH MANUAL. "RTN","XBPOST",131,0) ;;This routine provides for the printing of a technical manual for "RTN","XBPOST",132,0) ;;the XB/ZIB routines. One or all chapters can be printed. The "RTN","XBPOST",133,0) ;;information comes from existing routines, and other attributes, "RTN","XBPOST",134,0) ;;on the local machine, and will reflect all local modifications. "RTN","XBPOST",135,0) ;;All entry points and published entry points (PEP) are listed. "RTN","XBPOST",136,0) ;; "RTN","XBPOST",137,0) ;;----------------------------------------------------------------- "RTN","XBPOST",138,0) ;; "RTN","XBPOST",139,0) ;;(10) XBVIDEO - SET/WRITE VARIOUS DEVICE ATTRIBUTES. "RTN","XBPOST",140,0) ;;Entry point EN provides access to creating, writing, and resetting "RTN","XBPOST",141,0) ;;cursor position for various device attributes, both supported by "RTN","XBPOST",142,0) ;;%ZISS, and not supported by %ZISS. See the routine for the "RTN","XBPOST",143,0) ;;variables. "RTN","XBPOST",144,0) ;; "RTN","XBPOST",145,0) ;;----------------------------------------------------------------- "RTN","XBPOST",146,0) ;; "RTN","XBPOST",147,0) ;;(11) XBVK - KILL LIST OF LOCAL VARIABLES. "RTN","XBPOST",148,0) ;;This routine calls an implementation specific routine which "RTN","XBPOST",149,0) ;;searches the symbol table and kills local variables within the "RTN","XBPOST",150,0) ;;namespace passed in the parameter. "RTN","XBPOST",151,0) ;; "RTN","XBPOST",152,0) ;;----------------------------------------------------------------- "RTN","XBPOST",153,0) ;; "RTN","XBPOST",154,0) ;;(12) XBVL - LIST LOCAL VARIABLES. "RTN","XBPOST",155,0) ;;This is an interactive utility which will provide programmers with "RTN","XBPOST",156,0) ;;the ability to list a subset, based on a selected namespace, of "RTN","XBPOST",157,0) ;;local variables. "RTN","XBPOST",158,0) ;; "RTN","XBPOST",159,0) ;;----------------------------------------------------------------- "RTN","XBPOST",160,0) ;; "RTN","XBPOST",161,0) ;;(13) ZIBERR - PROVIDE ACCESS TO THE SYSTEM ERROR VARIABLE. "RTN","XBPOST",162,0) ;;This provides access to implementation specific system variable to "RTN","XBPOST",163,0) ;;return the current error, if any. "RTN","XBPOST",164,0) ;; "RTN","XBPOST",165,0) ;;----------------------------------------------------------------- "RTN","XBPOST",166,0) ;; "RTN","XBPOST",167,0) ;;(14) ZIBGCHAR - MODIFY GLOBAL CHARACTERISTICS. "RTN","XBPOST",168,0) ;;Several entry points allow modification of implementation "RTN","XBPOST",169,0) ;;specific global characteristics. "RTN","XBPOST",170,0) ;; "RTN","XBPOST",171,0) ;;----------------------------------------------------------------- "RTN","XBPOST",172,0) ;; "RTN","XBPOST",173,0) ;;(15) ZIBNSSV - NON-STANDARD SYSTEM VARIABLES. "RTN","XBPOST",174,0) ;;This routine provides access to common non-standard system "RTN","XBPOST",175,0) ;;variables that are implementation specific. "RTN","XBPOST",176,0) ;; "RTN","XBPOST",177,0) ;;----------------------------------------------------------------- "RTN","XBPOST",178,0) ;; "RTN","XBPOST",179,0) ;;(16) ZIBTCP - PRINT TO REMOTE PRINTER THRU TCP. "RTN","XBPOST",180,0) ;; "RTN","XBPOST",181,0) ;;----------------------------------------------------------------- "RTN","XBPOST",182,0) ;; "RTN","XBPOST",183,0) ;;+++++++++++++ end of 3.0 Installation announcement ++++++++++++++ "RTN","XBPOST",184,0) ;;### "RTN","XBPOST",185,0) ; "RTN","XBPRE") 0^132^B4348281 "RTN","XBPRE",1,0) XBPRE ; IHS/ADC/GTH - PREINIT, CHK RQMNTS, ETC. ; [ 01/22/2001 11:54 AM ] "RTN","XBPRE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBPRE",3,0) ; XB*3*8 - IHS/ASDST/GTH Add KIDS check to suppress questions. "RTN","XBPRE",4,0) ; "RTN","XBPRE",5,0) I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY Q "RTN","XBPRE",6,0) ; "RTN","XBPRE",7,0) I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY Q "RTN","XBPRE",8,0) ; "RTN","XBPRE",9,0) S X=$P(^VA(200,DUZ,0),U) "RTN","XBPRE",10,0) W !!,$$C("Hello, "_$P(X,",",2)_" "_$P(X,",")),!!,$$C("Checking Environment for Version "_$P($T(+2),";",3)_" of XB/ZIB.") "RTN","XBPRE",11,0) ; "RTN","XBPRE",12,0) S X=$G(^DD("VERSION")) "RTN","XBPRE",13,0) W !!,$$C("Need at least FileMan 20.....FileMan "_X_" Present") "RTN","XBPRE",14,0) I X<20 D SORRY Q "RTN","XBPRE",15,0) ; "RTN","XBPRE",16,0) S X=$G(^DIC(9.4,$O(^DIC(9.4,"C","XU",0)),"VERSION")) "RTN","XBPRE",17,0) W !!,$$C("Need at least Kernel 7.....Kernel "_X_" Present") "RTN","XBPRE",18,0) I X<7 D SORRY Q "RTN","XBPRE",19,0) ; "RTN","XBPRE",20,0) S X=$S($L($T(STATUS^%ZISH)):"STATUS^%ZISH is Present",1:"") "RTN","XBPRE",21,0) W !!,$$C("Need Patch 25 to Kernel 7 (^%ZISH)....."_X) "RTN","XBPRE",22,0) I '$L($T(STATUS^%ZISH)) D SORRY Q "RTN","XBPRE",23,0) ; "RTN","XBPRE",24,0) NEW DA,DIC "RTN","XBPRE",25,0) S X="XB",DIC="^DIC(9.4,",DIC(0)="",D="C" "RTN","XBPRE",26,0) D IX^DIC "RTN","XBPRE",27,0) I Y<0,$D(^DIC(9.4,"C","XB")) D Q "RTN","XBPRE",28,0) . W !!,*7,*7,$$C("You Have More Than One Entry In The"),!,$$C("PACKAGE File with an ""XB"" prefix.") "RTN","XBPRE",29,0) . W !,$$C("One entry needs to be deleted.") "RTN","XBPRE",30,0) . W !,$$C("FIX IT! Before Proceeding."),!!,*7,*7,*7 "RTN","XBPRE",31,0) . D SORRY "RTN","XBPRE",32,0) . I $$DIR^XBDIR("E") "RTN","XBPRE",33,0) .Q "RTN","XBPRE",34,0) W !!,$$C("No 'XB' dups in PACKAGE file") "RTN","XBPRE",35,0) ; "RTN","XBPRE",36,0) W !!,$$C("ENVIRONMENT OK.") "RTN","XBPRE",37,0) I $D(DIFQ),'$$DIR^XBDIR("E","","","","","",2) KILL DIFQ "RTN","XBPRE",38,0) ; The following line prevents the "Disable Options..." and "Move ; XB*3*8 - IHS/ASDST/GTH "RTN","XBPRE",39,0) ; Routines..." questions from being asked during the install. ; XB*3*8 - IHS/ASDST/GTH "RTN","XBPRE",40,0) I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 ; XB*3*8 - IHS/ASDST/GTH "RTN","XBPRE",41,0) Q "RTN","XBPRE",42,0) ; "RTN","XBPRE",43,0) C(X,Y) ; Center X in field length Y/IOM/80. "RTN","XBPRE",44,0) Q $J("",$S($D(Y):Y,$G(IOM):IOM,1:80)-$L(X)\2)_X "RTN","XBPRE",45,0) ; "RTN","XBPRE",46,0) SORRY ; "RTN","XBPRE",47,0) KILL DIFQ "RTN","XBPRE",48,0) W *7,!,$$C("Sorry....") "RTN","XBPRE",49,0) Q "RTN","XBPRE",50,0) ; "RTN","XBRESID") 0^133^B6896206 "RTN","XBRESID",1,0) XBRESID ; IHS/ADC/GTH - CLEAN UP RESIDUAL ENTRIES IN ^DD ; [ 02/07/97 3:02 PM ] "RTN","XBRESID",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRESID",3,0) ; "RTN","XBRESID",4,0) ; This routine deletes residual entries in ^DD by a range of "RTN","XBRESID",5,0) ; dictionary numbers. A residual entry is one that has no "RTN","XBRESID",6,0) ; parent. The process is reiterative, so an entry who has a "RTN","XBRESID",7,0) ; parent in ^DD, but the parent is deleted because it has no "RTN","XBRESID",8,0) ; parent, will also be deleted. The parent of an entry in "RTN","XBRESID",9,0) ; ^DD is defined as another entry in ^DD for sub-files, and "RTN","XBRESID",10,0) ; an entry in ^DIC for primary files. "RTN","XBRESID",11,0) ; "RTN","XBRESID",12,0) ; The range of dictionary numbers is inclusive but residual "RTN","XBRESID",13,0) ; entries for the high file number will not be deleted at "RTN","XBRESID",14,0) ; the sub-file level. This is because sub-files are numbered "RTN","XBRESID",15,0) ; with the primary file number with decimal numbers appended. "RTN","XBRESID",16,0) ; The terminating check is ^DD entry greater than high file "RTN","XBRESID",17,0) ; number specified, so by definition all sub-files for the "RTN","XBRESID",18,0) ; high number are greater than the high number. "RTN","XBRESID",19,0) ; "RTN","XBRESID",20,0) ; This routine can be called by another routine by setting "RTN","XBRESID",21,0) ; XBRLO and XBRHI and then D EN1^XBRESID. "RTN","XBRESID",22,0) ; "RTN","XBRESID",23,0) START ; "RTN","XBRESID",24,0) W !!,"This program deletes residual entries in ^DD by a range of dictionary numbers.",!! "RTN","XBRESID",25,0) ; "RTN","XBRESID",26,0) LO ; "RTN","XBRESID",27,0) R !,"Enter low dictionary number: ",XBRLO:$G(DTIME,999) "RTN","XBRESID",28,0) Q:XBRLO'=+XBRLO "RTN","XBRESID",29,0) HI ; "RTN","XBRESID",30,0) R !,"Enter high dictionary number: ",XBRHI:$G(DTIME,999) "RTN","XBRESID",31,0) Q:XBRHI'=+XBRHI!(XBRHI'>XBRLO) "RTN","XBRESID",32,0) ; "RTN","XBRESID",33,0) EN1 ;PEP - Clean residual entries in ^DD(. Hi/Lo file numbers must be set. "RTN","XBRESID",34,0) I $D(XBRLO),$D(XBRHI),XBRLO=+XBRLO,XBRHI=+XBRHI,XBRHI>XBRLO,XBRLO'<2 G RESID "RTN","XBRESID",35,0) W !!,"XBRLO and/or XBRHI missing or invalid!" "RTN","XBRESID",36,0) G EOJ "RTN","XBRESID",37,0) ; "RTN","XBRESID",38,0) RESID ; "RTN","XBRESID",39,0) W !!,"Now checking for residual ^DD entries within range.",! "RTN","XBRESID",40,0) LOOP ; "RTN","XBRESID",41,0) KILL ^TMP("XBRESID",$J) "RTN","XBRESID",42,0) S XBRFILE=(XBRLO-.00000001) "RTN","XBRESID",43,0) F XBRL=0:0 S XBRFILE=$O(^DD(XBRFILE)) Q:XBRFILE>XBRHI!(XBRFILE'=+XBRFILE) D CHK "RTN","XBRESID",44,0) S XBRFILE=0 "RTN","XBRESID",45,0) F XBRL=0:0 S XBRFILE=$O(^TMP("XBRESID",$J,XBRFILE)) Q:XBRFILE="" I ^(XBRFILE),$D(^TMP("XBRESID",$J,^TMP("XBRESID",$J,XBRFILE)))!($D(^DIC(^TMP("XBRESID",$J,XBRFILE)))) S ^TMP("XBRESID",$J,XBRFILE)="I" "RTN","XBRESID",46,0) S (XBRFILE,XBRY)=0 "RTN","XBRESID",47,0) F XBRL=0:0 S XBRFILE=$O(^TMP("XBRESID",$J,XBRFILE)) Q:XBRFILE="" I ^TMP("XBRESID",$J,XBRFILE)'="I" S XBRY=1 W !,XBRFILE KILL ^DD(XBRFILE) "RTN","XBRESID",48,0) G:XBRY LOOP "RTN","XBRESID",49,0) G EOJ "RTN","XBRESID",50,0) ; "RTN","XBRESID",51,0) CHK ; "RTN","XBRESID",52,0) W "." "RTN","XBRESID",53,0) Q:$D(^DIC(XBRFILE)) "RTN","XBRESID",54,0) I $D(^DD(XBRFILE,0,"UP")),^("UP")]"",(^("UP")XBRHI)) Q "RTN","XBRESID",55,0) S ^TMP("XBRESID",$J,XBRFILE)=$G(^DD(XBRFILE,0,"UP")) "RTN","XBRESID",56,0) Q "RTN","XBRESID",57,0) ; "RTN","XBRESID",58,0) EOJ ; "RTN","XBRESID",59,0) D ^XBKTMP "RTN","XBRESID",60,0) KILL XBRFILE,XBRHI,XBRL,XBRLO,XBRY "RTN","XBRESID",61,0) Q "RTN","XBRESID",62,0) ; "RTN","XBRESTL1") 0^134^B3075102 "RTN","XBRESTL1",1,0) XBRESTL1 ; acc/ohprd - routine to restore 1st line of routines from save file ; "RTN","XBRESTL1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRESTL1",3,0) ; "RTN","XBRESTL1",4,0) W !!,"-- ROUTINE TO RESTORE 1ST LINE OF ROUTINES FROM %RS FILE --",! "RTN","XBRESTL1",5,0) W "CAUTION: THIS ROUTINE KILLS ALL VARIABLES, IS NOT NAMESPACED.",! "RTN","XBRESTL1",6,0) R "ABORT HERE (^ OR CTL-C) OR PRESS RETURN TO CONTINUE: ",%:$S($D(DTIME):DTIME,1:999),! I %="^" W "-- aborted.",! G OUT "RTN","XBRESTL1",7,0) W ! "RTN","XBRESTL1",8,0) K "RTN","XBRESTL1",9,0) GETFN R "Name of %RS-format save file: ",FN:$S($D(DTIME):DTIME,1:999),! G:"^"[FN EXIT "RTN","XBRESTL1",10,0) I FN["?" W "(Enter the name of a unix file containing routines which was produced by %RS)",! G GETFN "RTN","XBRESTL1",11,0) D GETHFS E W "-- couldn't get HFS device!",! G EXIT "RTN","XBRESTL1",12,0) U DEV "RTN","XBRESTL1",13,0) R L1,L2 "RTN","XBRESTL1",14,0) U 0 "RTN","XBRESTL1",15,0) W "Header lines from %RS file:",!,?2,L1,!,?2,L2,! "RTN","XBRESTL1",16,0) R "OK to proceed: N// ",%:$S($D(DTIME):DTIME,1:999),! S %=$E(%_"N") I "Yy"'[% W "-- aborted.",! G OUT "RTN","XBRESTL1",17,0) F NR=1:1 D GETR Q:RN="" W:NR=1 "Routines repaired:",! W ?2,$J(NR,3),": ",RL1,! D FIXL1 "RTN","XBRESTL1",18,0) C DEV "RTN","XBRESTL1",19,0) EXIT W "Bye.",! "RTN","XBRESTL1",20,0) OUT K "RTN","XBRESTL1",21,0) Q "RTN","XBRESTL1",22,0) GETHFS ; "RTN","XBRESTL1",23,0) F DEV=51:1:54 O DEV:(FN:"R"):1 Q:$T "RTN","XBRESTL1",24,0) E S DEV=0 "RTN","XBRESTL1",25,0) Q "RTN","XBRESTL1",26,0) GETR ; "RTN","XBRESTL1",27,0) U DEV "RTN","XBRESTL1",28,0) R RN Q:RN="" "RTN","XBRESTL1",29,0) R RL1 "RTN","XBRESTL1",30,0) F R RL Q:RL="" "RTN","XBRESTL1",31,0) U 0 "RTN","XBRESTL1",32,0) Q "RTN","XBRESTL1",33,0) FIXL1 ; "RTN","XBRESTL1",34,0) X "ZL @RN ZR +1 ZI RL1 ZS @RN" "RTN","XBRESTL1",35,0) Q "RTN","XBRLL") 0^135^B2193304 "RTN","XBRLL",1,0) XBRLL ; IHS/ADC/GTH - LIST ROUTINE LINES WITH LENGTHS ; [ 02/07/97 3:02 PM ] "RTN","XBRLL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRLL",3,0) ; "RTN","XBRLL",4,0) ; This routine lists a single routine line by line noting "RTN","XBRLL",5,0) ; the length of the line plus the cumulative character count. "RTN","XBRLL",6,0) ; "RTN","XBRLL",7,0) START ; "RTN","XBRLL",8,0) NEW DIF,X,XCNP "RTN","XBRLL",9,0) S X=$$DIR^XBDIR("FO^1:8","Enter routine name") "RTN","XBRLL",10,0) Q:$D(DIRUT) "RTN","XBRLL",11,0) X ^%ZOSF("TEST") "RTN","XBRLL",12,0) Q:'$T "RTN","XBRLL",13,0) KILL ^TMP("XBRLL",$J) "RTN","XBRLL",14,0) S DIF="^TMP(""XBRLL"",$J,",XCNP=0 "RTN","XBRLL",15,0) X ^%ZOSF("LOAD") "RTN","XBRLL",16,0) D ^%ZIS "RTN","XBRLL",17,0) Q:POP "RTN","XBRLL",18,0) U IO "RTN","XBRLL",19,0) W !!,"....[LINE NUMBER/LENGTH OF THIS LINE/CUMULATIVE NUMBER OF CHARACTERS]",!! "RTN","XBRLL",20,0) S (%2,%1)=0 "RTN","XBRLL",21,0) F %I=1:1 S %X=$G(^TMP("XBRLL",$J,%I,0)) Q:%X="" W ! S %Y=$P(%X," "),%Z=$E(%X,$L(%Y)+2,255),%2=%2+$L(%X)+2,%1=$S(%Y="":%1+1,1:0) S:%1>0 %Y=" +"_%1 S %Y=%Y_$J("",8-$L(%Y)) W %Y," ",%Z," [+",%I,"/",$L(%X),"/",%2,"]" "RTN","XBRLL",22,0) KILL %1,%2,%N,%X,%Y,%Z,%I "RTN","XBRLL",23,0) W !! "RTN","XBRLL",24,0) KILL DIRUT,DTOUT,DUOUT,I,Y "RTN","XBRLL",25,0) D ^%ZISC "RTN","XBRLL",26,0) Q "RTN","XBRLL",27,0) ; "RTN","XBRPRTBD") 0^136^B15232 "RTN","XBRPRTBD",1,0) XBRPRTBD ; IHS/ADC/GTH - ROUTINE PRINT ; [ 02/07/97 3:02 PM ] "RTN","XBRPRTBD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRPRTBD",3,0) ; "RTN","XBRPRTBD",4,0) ; This functionality has been moved to ZIBRPTRD because "RTN","XBRPRTBD",5,0) ; of the use of non-standard $Z special variables. "RTN","XBRPRTBD",6,0) ; The below GO is provided for backwards compatibility. "RTN","XBRPRTBD",7,0) G ^ZIBRPRTD "RTN","XBRPRTBD",8,0) ; "RTN","XBRPTL") 0^137^B2628239 "RTN","XBRPTL",1,0) XBRPTL ; IHS/ADC/GTH - PRINT ROUTINE TO FIRST LABEL ; [ 10/29/2002 7:42 AM ] "RTN","XBRPTL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRPTL",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBRPTL",4,0) ; "RTN","XBRPTL",5,0) ; This routine prints selected routines down to the first "RTN","XBRPTL",6,0) ; label. "RTN","XBRPTL",7,0) ; "RTN","XBRPTL",8,0) START ; "RTN","XBRPTL",9,0) KILL ^UTILITY($J) "RTN","XBRPTL",10,0) X ^%ZOSF("RSEL") "RTN","XBRPTL",11,0) D ^%ZIS "RTN","XBRPTL",12,0) PRINT ; "RTN","XBRPTL",13,0) KILL ^TMP("XBRPTL",$J) "RTN","XBRPTL",14,0) NEW %,I,L,R,X,Y "RTN","XBRPTL",15,0) U IO "RTN","XBRPTL",16,0) W @IOF "RTN","XBRPTL",17,0) ;S XBRPTLQ=0,R="";IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBRPTL",18,0) S XBRPTLQ=0,R=0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBRPTL",19,0) F L=0:0 KILL XBRPTL Q:XBRPTLQ S R=$O(^UTILITY($J,R)) Q:R="" D "RTN","XBRPTL",20,0) . S DIF="^TMP(""XBRPTL"",$J,",XCNP=0,X=R "RTN","XBRPTL",21,0) . X ^%ZOSF("LOAD") "RTN","XBRPTL",22,0) . S XBRPTL(1)=^TMP("XBRPTL",$J,1,0) "RTN","XBRPTL",23,0) . F I=2:1 S Y=$G(^TMP("XBRPTL",$J,I,0)) Q:(Y="")!($E(Y,1,2)'=" ;") S XBRPTL(I)=Y "RTN","XBRPTL",24,0) . S I=I-1 "RTN","XBRPTL",25,0) . D TOP "RTN","XBRPTL",26,0) . W !!! "RTN","XBRPTL",27,0) . I $D(XBRPTL) F %=1:1:I W XBRPTL(%),! I IO=IO(0)&($E(IOST,1,2)="C-")&($Y>(IOSL-4)) D PAGE S:$D(DUOUT) %=I,XBRPTLQ=1 "RTN","XBRPTL",28,0) .Q "RTN","XBRPTL",29,0) ; "RTN","XBRPTL",30,0) KILL DTOUT,DUOUT,XBRPTLQ "RTN","XBRPTL",31,0) KILL ^UTILITY($J) "RTN","XBRPTL",32,0) I IO'=IO(0)!($E(IOST,1,2)="P-") W @IOF D:'$D(XBRPTLE) ^%ZISC "RTN","XBRPTL",33,0) KILL DIF,XBRPTLE,XCNP "RTN","XBRPTL",34,0) KILL ^TMP("XBRPTL",$J) "RTN","XBRPTL",35,0) Q "RTN","XBRPTL",36,0) ; "RTN","XBRPTL",37,0) TOP ; "RTN","XBRPTL",38,0) I IO'=IO(0)!($E(IOST,1,2)="P-") W:$Y+I+3>IOSL @IOF "RTN","XBRPTL",39,0) Q "RTN","XBRPTL",40,0) ; "RTN","XBRPTL",41,0) PAGE ; "RTN","XBRPTL",42,0) NEW %,I,X "RTN","XBRPTL",43,0) S Y=$$DIR^XBDIR("E") "RTN","XBRPTL",44,0) W:'$D(DUOUT) @IOF "RTN","XBRPTL",45,0) Q "RTN","XBRPTL",46,0) ; "RTN","XBRPTL",47,0) EN ;PEP - Print routines down to first label. "RTN","XBRPTL",48,0) S XBRPTLE=1 "RTN","XBRPTL",49,0) D PRINT "RTN","XBRPTL",50,0) KILL XBRPTLE "RTN","XBRPTL",51,0) Q "RTN","XBRPTL",52,0) ; "RTN","XBRSBD") 0^138^B30959901 "RTN","XBRSBD",1,0) XBRSBD ;IHS-OIRM-DSD/THL;ADAPTATION OF %RS TO SELECT ROUTINES EDITED AFTER SPECIFIED DATE; "RTN","XBRSBD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRSBD",3,0) ; "RTN","XBRSBD",4,0) ; This routine saves selected routines edited after a given date "RTN","XBRSBD",5,0) ; "RTN","XBRSBD",6,0) START ; "RTN","XBRSBD",7,0) S $ZT="ERR^%RS",%SEQ=1 K %SBP "RTN","XBRSBD",8,0) W !?10,$P($P($ZV,","),"-")," - Routine Save Utility" "RTN","XBRSBD",9,0) O 63::0 E U 0 W !,"Waiting for device 63" O 63 "RTN","XBRSBD",10,0) SDEV D OUT^%SDEV I $D(QUIT) C 63 K %SEQ Q "RTN","XBRSBD",11,0) S QUIT=0,%SBP=%DEV>58&(%DEV<63),%TAP=%DEV>46&(%DEV<51) "RTN","XBRSBD",12,0) S %TAPV=$S('%TAP:0,1:$ZB(%DEVMODE,"_",1)["V") G:'%TAP SIZE "RTN","XBRSBD",13,0) ;U %DEV I @(%MTON_"=0") U 0 W *7,!,"Tape is not ready" C %DEV G SDEV "RTN","XBRSBD",14,0) ;I @%MTWLK U 0 W *7,!,"Tape is write protected" C %DEV G SDEV "RTN","XBRSBD",15,0) U 0 G RCMT "RTN","XBRSBD",16,0) SIZE I %SBP S %SIZE=1024*#10000 G RCMT "RTN","XBRSBD",17,0) R !,"Enter size of save medium (if applicable): ",%SIZE:$S($D(DTIME):DTIME,1:999) S:%SIZE="" %SIZE=1024*#10000 G SDEV:"^"=%SIZE,EXIT:%SIZE="^Q"!(%SIZE="^q") "RTN","XBRSBD",18,0) I %SIZE?1N.N1A S %SIZE=$P(%SIZE,"K"),%SIZE=$P(%SIZE,"k") "RTN","XBRSBD",19,0) I %SIZE?1N.N,%SIZE>0 S %SIZE=%SIZE*1024 G RCMT "RTN","XBRSBD",20,0) I %SIZE'?1"?".E W " ??" G SIZE "RTN","XBRSBD",21,0) W !!,"If using removeable disks or tape for save, enter the number of 1k blocks which",!,"each disk will hold. As each disk becomes full, you will be asked to",!,"replace it with an empty one." "RTN","XBRSBD",22,0) W !!,"If not using removeable media, press ",! G SIZE "RTN","XBRSBD",23,0) ; "RTN","XBRSBD",24,0) RCMT R !,"Enter comment for dump header : ",%CMT:$S($D(DTIME):DTIME,1:999) G SDEV:%CMT="^",CNT1:%CMT'="?" "RTN","XBRSBD",25,0) W !,"The comment will be displayed with the date and time before the routines",!,"are restored." G RCMT "RTN","XBRSBD",26,0) CNT1 K QUIT D INT^%RSEL I $D(QUIT) W !,"No routines selected" G EXIT "RTN","XBRSBD",27,0) S XBTYPE="SAVE" D ^XBDATE ;ADDED TO SPECIFY A DATE AND SCREEN OUT ROUTINES EDITED SINCE SPECIFIED DATE "RTN","XBRSBD",28,0) I $D(QUIT) W !,"No routines will be saved." H 2 G EXIT "RTN","XBRSBD",29,0) D:%TAP %SET^%MTCHK "RTN","XBRSBD",30,0) S QUIT=0,%NEXT="D NEXTVOL^%RS Q:QUIT ZL @%RN" "RTN","XBRSBD",31,0) I '%TAP S %ZPRINT="ZR S %S=$S ZL @%RN X:%S-$S>(%SIZE-$ZB-10) %NEXT Q:QUIT U %DEV W %RN,! S:'%SBP&$ZC!($ZA<0&%SBP) QUIT=2 Q:QUIT F %X=1:1 S %J=$T(+%X) W %J,! Q:%J=""""" "RTN","XBRSBD",32,0) E I '%TAPV S %ZPRINT="ZL @%RN U %DEV W %RN,! S:$ZC QUIT=2 Q:QUIT P" "RTN","XBRSBD",33,0) E S %ZPRINT="ZL @%RN U %DEV W %RN S:$ZC QUIT=2 Q:QUIT F %X=1:1 S %J=$T(+%X) W %J Q:%J=""""" "RTN","XBRSBD",34,0) D INT^%T,INT^%D "RTN","XBRSBD",35,0) W !!,"Saving ...",! "RTN","XBRSBD",36,0) U %DEV W:'%DEV ! W %TIM1_" "_%DAT1 W:'%TAPV ! W %CMT W:'%TAPV ! "RTN","XBRSBD",37,0) S %RN="" "RTN","XBRSBD",38,0) F %I=1:1 S %RN=$O(^UTILITY($J,%RN)) Q:%RN=""!QUIT U 0 W ?%I-1#8*10,%RN W:(%I#8)=0 ! U %DEV D PCODE Q:QUIT I PCODE X %ZPRINT Q:QUIT I %TAP,@%MTEOT D NEXTTAPE Q:QUIT "RTN","XBRSBD",39,0) I QUIT=2 U 0 W !!,"End of file reached, last portion of save may be corrupted! Terminating save." "RTN","XBRSBD",40,0) E U %DEV W:'%TAPV !! W:%TAPV "","" "RTN","XBRSBD",41,0) U 0 W !!,"Done. " "RTN","XBRSBD",42,0) QUIT I '$D(%SBP) K %SEQ Q "RTN","XBRSBD",43,0) I %SBP,QUIT<2 U %DEV S %BN=$ZA U 0 W "Last block used was ",%BN,"." "RTN","XBRSBD",44,0) EXIT C 63 U 0 I $D(%DEV),%DEV'=$I,+%DEV C %DEV I $G(%DEVTYPE)="HFS",$ZA=-1 W !!,"Cannot write end of file. Last part of save may be corrupted." "RTN","XBRSBD",45,0) I $D(%TAP) D:%TAP %KILL^%MTCHK "RTN","XBRSBD",46,0) K %DEV,%RN,%BN,%I,%J,%CMT,%TIM,%TIM1,%DAT,%DAT1,%NEXT,%SEQ,%FN,%S,%SIZE,%SBP,%TAP,%X,%ZA,%ZPRINT,QUIT,%TAPV "RTN","XBRSBD",47,0) K XBDAT,RTN "RTN","XBRSBD",48,0) Q "RTN","XBRSBD",49,0) PCODE ; Test for pcode only routine "RTN","XBRSBD",50,0) I %DEV<47!(%DEV>62) S PCODE=1 Q "RTN","XBRSBD",51,0) S PCODE=$ZBN(^ (%RN)) I PCODE=0 U 0 W !,%RN," does not exist" Q "RTN","XBRSBD",52,0) V PCODE I $V(17,0,1)=0 S PCODE=1 Q ; not a pcode routine "RTN","XBRSBD",53,0) G:%TAP PC10 "RTN","XBRSBD",54,0) S %S=1056 F %K=0:0 S %K=$V(1012,0,4) Q:%K=0 V %K S %S=%S+1024 ;1056=1024+32, 32 byte cushion left for rtn name, etc. "RTN","XBRSBD",55,0) I %S>(%SIZE-$ZB) X %NEXT Q:QUIT "RTN","XBRSBD",56,0) PC10 V PCODE U %DEV W %RN_":"_$V(17,0,1) W:'%TAPV ! I $ZC S QUIT=2 Q "RTN","XBRSBD",57,0) U:%DEV>58&(%DEV<63) %DEV:(::::"V") "RTN","XBRSBD",58,0) F PCODE=PCODE:0 W $V(0,0,1024,1) S PCODE=$V(1012,0,4) Q:PCODE=0 V PCODE ;I %TAP,@%MTEOT D NEXTTAPE U %DEV Q:QUIT "RTN","XBRSBD",59,0) I $ZC S QUIT=2 "RTN","XBRSBD",60,0) U:%DEV>58&(%DEV<63) %DEV:(::::"S") Q "RTN","XBRSBD",61,0) ERR I $F($ZE,"") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2 "RTN","XBRSBD",62,0) ZQ "RTN","XBRSBD",63,0) NEXTVOL ; "RTN","XBRSBD",64,0) S %SEQ=%SEQ+1 U %DEV W "*EOF*",! C %DEV "RTN","XBRSBD",65,0) U 0 W !,"Sequence #",%SEQ-1," is full, if using removeable media, please put in the next one" "RTN","XBRSBD",66,0) NEXTVOL1 ; "RTN","XBRSBD",67,0) R !,"Enter 'GO' to proceed: ",%X:$S($D(DTIME):DTIME,1:999) W ! "RTN","XBRSBD",68,0) I %X="?" W !!,"Remove sequence #",%SEQ-1,", and put the next disk or tape into the drive. If you are",!,"not using removeable media, you should abort this save by typing 'control C';",!,"your save will still be good up to this point." G NEXTVOL1 "RTN","XBRSBD",69,0) I %X'="GO" W " ??" G NEXTVOL1 "RTN","XBRSBD",70,0) O %DEV:(%FN:"W") U %DEV I $ZA U 0 W !,"Cannot access ",%FN," please correct" G NEXTVOL1 "RTN","XBRSBD",71,0) W "DISK#",%SEQ,! S %X=$ZC "RTN","XBRSBD",72,0) U 0 I %X W !,"Cannot write to ",%FN," please correct" G NEXTVOL1 "RTN","XBRSBD",73,0) S QUIT=0 Q "RTN","XBRSBD",74,0) NEXTTAPE ; "RTN","XBRSBD",75,0) U 0 W !,"Tape sequence number ",%SEQ," is full. Last routine was ",%RN,"." "RTN","XBRSBD",76,0) W !,"After this tape rewinds, mount the next tape.",! "RTN","XBRSBD",77,0) S %SEQ=%SEQ+1 U %DEV W "*EOF*" W:'%TAPV ! W *9 "RTN","XBRSBD",78,0) NT0 U %DEV W *16 U 0 "RTN","XBRSBD",79,0) NT1 W !,"Enter 'GO' when tape sequence number ",%SEQ R " is ready: ",%X:$S($D(DTIME):DTIME,1:999) "RTN","XBRSBD",80,0) I %X="?" W !,"Mount the next tape (sequence number ",%SEQ,") and enter 'GO' when it is ready.",!,"Or enter '^' to abort the save.",! G NT1 "RTN","XBRSBD",81,0) I %X["^" S QUIT=1 Q "RTN","XBRSBD",82,0) I %X'="GO",%X'="go" W *7," ??" G NT1 "RTN","XBRSBD",83,0) U %DEV W *10 I @(%MTON_"=0") U 0 W *7,!,"Tape is not ready" G NT1 "RTN","XBRSBD",84,0) I @%MTWLK U 0 W *7,!,"Tape is write protected" G NT0 "RTN","XBRSBD",85,0) W %TIM1_" "_%DAT1_" (sequence "_%SEQ_")" W:'%TAPV ! W %CMT W:'%TAPV ! "RTN","XBRSBD",86,0) U 0 W !!,"Saving ...",! S QUIT=0 Q "RTN","XBRSELM") 0^139^B22704603 "RTN","XBRSELM",1,0) %RSEL ;DJM;ROUTINE SELECTOR; "RTN","XBRSELM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRSELM",3,0) ;COPYRIGHT MICRONETICS DESIGN CORP. @1985 "RTN","XBRSELM",4,0) ;IHS/THL MODIFIED TO ALLOW ROUTINE SELECTION BY DATE LAST EDITED "RTN","XBRSELM",5,0) S $ZT="ERROR^%RSEL" "RTN","XBRSELM",6,0) INT ; "RTN","XBRSELM",7,0) N %P,%RN,%RS,%RSN,FIRST,LAST,X S %RSN=0 "RTN","XBRSELM",8,0) L0 ; "RTN","XBRSELM",9,0) R !!,"Routine selector: ",%RS:$S($D(DTIME):DTIME,1:999) "RTN","XBRSELM",10,0) I %RS="."!(%RS=" "),%RSN=0 D LIST S %RSN=1 G L0 "RTN","XBRSELM",11,0) I %RS="^L"!(%RS="^l") D:%RSN LIST G L0 "RTN","XBRSELM",12,0) I %RS="^"!(%RS="^Q")!(%RS="^q") K ^UTILITY($J) G EXIT "RTN","XBRSELM",13,0) I %RS="" K:%RSN=0 ^UTILITY($J) G EXIT "RTN","XBRSELM",14,0) I %RS="^D"!(%RS="^d") D DISPLAY G L0 "RTN","XBRSELM",15,0) I %RS="?" D HELP G L0 "RTN","XBRSELM",16,0) L1 ; "RTN","XBRSELM",17,0) I %RSN=0 K ^UTILITY($J) S %RSN=1 "RTN","XBRSELM",18,0) G:$E(%RS)="-" DEL "RTN","XBRSELM",19,0) S %P=$$%SRCHPAT^%SRCHPAT(%RS) "RTN","XBRSELM",20,0) I $D(FIRST)=0 W *7," ...Invalid routine name selection criteria, Specify '?' for help" G L0 "RTN","XBRSELM",21,0) S %RN=0,X=FIRST D:FIRST'="" "RTN","XBRSELM",22,0) .Q:$D(^ (X))=0 Q:X]LAST X %P S:$T %RN=%RN+1,^UTILITY($J,FIRST)="" "RTN","XBRSELM",23,0) F S X=$O(^ (X)) Q:X=""!(X]LAST) X %P S:$T %RN=%RN+1,^UTILITY($J,X)="" "RTN","XBRSELM",24,0) W !!,?10,%RN," routine",$S(%RN=1:"",1:"s")," selected." W:%RN=0 *7 "RTN","XBRSELM",25,0) G L0 "RTN","XBRSELM",26,0) DEL ; "RTN","XBRSELM",27,0) S %P=$$%SRCHPAT^%SRCHPAT($E(%RS,2,$L(%RS))),%RN=0 "RTN","XBRSELM",28,0) I $D(FIRST)=0 W *7," ...Invalid routine name selection criteria, Specify '?' for help" G L0 "RTN","XBRSELM",29,0) S %RN=0,X=FIRST D:FIRST'="" "RTN","XBRSELM",30,0) .Q:$D(^UTILITY($J,X))=0 Q:X]LAST X %P I $T S %RN=%RN+1 K ^UTILITY($J,X) "RTN","XBRSELM",31,0) F S X=$O(^UTILITY($J,X)) Q:X=""!(X]LAST) X %P I $T S %RN=%RN+1 K ^UTILITY($J,X) "RTN","XBRSELM",32,0) W !!,?10,%RN," routine",$S(%RN=1:"",1:"s")," de-selected." W:%RN=0 *7 "RTN","XBRSELM",33,0) G L0 "RTN","XBRSELM",34,0) DOTS W $E("..............................",1,24-$X) Q "RTN","XBRSELM",35,0) EXIT ; "RTN","XBRSELM",36,0) IHS1 I $D(^UTILITY($J)) D DATE I $D(XB) X XB W !!?10,%RN," routines edited after ",XBDAT D OUT ;IHS/THL ALLOWS SELECTION OF ROUTINES BY DATE LAST EDITED "RTN","XBRSELM",37,0) S:'$D(^UTILITY($J)) QUIT="" Q "RTN","XBRSELM",38,0) LIST ; "RTN","XBRSELM",39,0) I $D(^UTILITY($J))<10 W !,"No routines selected" Q "RTN","XBRSELM",40,0) W !! S %RN=0,%RS=-1 F X=1:1 S %RS=$N(^UTILITY($J,%RS)) Q:%RS<0 W:'(X-1#8) ! W ?(X-1)#8*10,%RS S %RN=%RN+1 "RTN","XBRSELM",41,0) W !!,?10,%RN," routine",$S(%RN=1:"",1:"s")," selected so far.",! "RTN","XBRSELM",42,0) Q "RTN","XBRSELM",43,0) DISPLAY ; "RTN","XBRSELM",44,0) W !! S %RN=0,%RS="" F X=1:1 S %RS=$O(^ (%RS)) Q:%RS="" W:'(X-1#8) ! W ?(X-1)#8*10,%RS S %RN=%RN+1 "RTN","XBRSELM",45,0) W !!,?10,%RN," routine",$S(%RN=1:"",1:"s"),"." "RTN","XBRSELM",46,0) Q "RTN","XBRSELM",47,0) ERROR ; "RTN","XBRSELM",48,0) I $F($ZE,"") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2 "RTN","XBRSELM",49,0) ZQ "RTN","XBRSELM",50,0) HELP ; "RTN","XBRSELM",51,0) W !,"Respond with routine selection criteria.",!,"Valid responses:" "RTN","XBRSELM",52,0) W !?5,"Routine name" D DOTS W "Eg: ABC" "RTN","XBRSELM",53,0) W !?5,"Routine range" D DOTS W "Eg: AAA-HZZZ" "RTN","XBRSELM",54,0) W !?5,"Routine pattern" D DOTS W "Eg: PROG? PRG*AA A*C?D *XYZ ?" "RTN","XBRSELM",55,0) W !?24,"Where '?' matches any single character," "RTN","XBRSELM",56,0) W !?24,"and '*' matches zero or more characters" "RTN","XBRSELM",57,0) W !?5,"All routines" D DOTS W " * (selects ALL routines)" "RTN","XBRSELM",58,0) W !,"Precede any of the above with a '-' to unselect previously selected routines." "RTN","XBRSELM",59,0) W:%RSN=0 !,"Enter '.' or ' ' to retain previously selected range(s)." "RTN","XBRSELM",60,0) W !,"Enter '^L' for display of previously selected routines." "RTN","XBRSELM",61,0) W !,"Enter '^D' to display all routine names." "RTN","XBRSELM",62,0) W !,"Enter '^' or '^Q' to exit." "RTN","XBRSELM",63,0) Q "RTN","XBRSELM",64,0) DATE ;IHS/THL ALLOWS SELECTION OF ROUTINES BY DATE LAST EDITED "RTN","XBRSELM",65,0) R !!,"Screen ROUTINES by date last edited? NO// ",X:300 Q:'$T "RTN","XBRSELM",66,0) I "^N"[$E(X)!(X="") W !!,"No date selected." Q "RTN","XBRSELM",67,0) I "^Y?N"'[$E(X)!("?"[$E(X)) W !!,"Type 'Y'es to select ROUTINES edited on or after a specified date.",!,"Type '^' or strike to continue without selecting by date." G DATE "RTN","XBRSELM",68,0) I X'="" D Q "RTN","XBRSELM",69,0) .S %DN=$H "RTN","XBRSELM",70,0) .D ^%DO "RTN","XBRSELM",71,0) .S %DT("B")=%DS,%DT="AEQ",%DT("A")="ROUTINES last edited on or after: " "RTN","XBRSELM",72,0) .W ! D ^%DT "RTN","XBRSELM",73,0) .I Y<1 D OUT Q "RTN","XBRSELM",74,0) .S XBX=$T(XBX),XBX=$P(XBX,";;",2) "RTN","XBRSELM",75,0) .X XBX "RTN","XBRSELM",76,0) .S (XBDAT,%DS)=Y D ^%DI "RTN","XBRSELM",77,0) .D:%DN&'$D(%ER) "RTN","XBRSELM",78,0) ..S DN1=%DN "RTN","XBRSELM",79,0) ..S XB=$T(XB),XB=$P(XB,";;",2) "RTN","XBRSELM",80,0) ..S XB1=$T(XB1),XB1=$P(XB1,";;",2) "RTN","XBRSELM",81,0) .D:$D(%ER) OUT "RTN","XBRSELM",82,0) Q "RTN","XBRSELM",83,0) XB ;;S %RN=0,(RTN,%DN)="" F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" ZL @RTN X XB1 D:%DS?1.2N1"/"1.2N1"/"2N ^%DI K:$D(%ER)!'%DN!(%DN<(DN1)) ^UTILITY($J,RTN) K %ER I %DN>(DN1-1) D ^%DO W !,RTN,?10,"last edited on ",%DS S %RN=%RN+1 "RTN","XBRSELM",84,0) XB1 ;;S X=$T(@RTN),X=$P($P(X,";",2,99)," ",2,99) F I=1:1:$L(X," ") S %DS=$P(X," ",I) Q:%DS?1.2N1"/"1.2N1"/"2N "RTN","XBRSELM",85,0) XBX ;;S:Y Y=$S($E(Y,4,5):$P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC","^",+$E(Y,4,5))_" ",1:"")_$S($E(Y,6,7):+$E(Y,6,7)_",",1:"")_($E(Y,1,3)+1700) "RTN","XBRSELM",86,0) OUT K %DT,XB,XB1,%RN,XBX,DN1,RTN,X,Y,%DA,%DN,%DS,I,XBDAT Q "RTN","XBRSIZ") 0^140^B2786246 "RTN","XBRSIZ",1,0) XBRSIZ ; IHS/ADC/GTH - List routine names and sizes w/overall total. ; [ 02/07/97 3:02 PM ] "RTN","XBRSIZ",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRSIZ",3,0) ; "RTN","XBRSIZ",4,0) ; List routine names, sizes, and total bytes. "RTN","XBRSIZ",5,0) ; "RTN","XBRSIZ",6,0) START ; "RTN","XBRSIZ",7,0) W !!,"XBRSIZ - List routine names, sizes, and total bytes.",! "RTN","XBRSIZ",8,0) X ^%ZOSF("RSEL") "RTN","XBRSIZ",9,0) G EXIT:$O(^UTILITY($J,""))="" "RTN","XBRSIZ",10,0) D ^%ZIS "RTN","XBRSIZ",11,0) G EXIT:POP "RTN","XBRSIZ",12,0) KILL ^TMP("XBRSIZ",$J) "RTN","XBRSIZ",13,0) S (A,%R)=0 "RTN","XBRSIZ",14,0) X "F I=1:1 S A=$O(^UTILITY($J,A)),T=0 Q:'$L(A) ZL @A S %R=%R+1 F J=1:1 S ^TMP(""XBRSIZ"",$J,""CRF"",I,J)=$T(+J),T=T+$L($T(+J))+2 I $T(+J+1)="""" S ^TMP(""XBRSIZ"",$J,""CRF1"",I,0)=A_""^""_T Q" "RTN","XBRSIZ",15,0) KILL %R,A,I,J "RTN","XBRSIZ",16,0) PRT ; "RTN","XBRSIZ",17,0) U IO "RTN","XBRSIZ",18,0) W @IOF "RTN","XBRSIZ",19,0) W !!?10,"XBRSIZ - LIST ROUTINE SIZES of " "RTN","XBRSIZ",20,0) X ^%ZOSF("UCI") "RTN","XBRSIZ",21,0) W Y,", ",$$HTE^XLFDT($H),!!?24,"ROUTINE",?36,"SIZE",! "RTN","XBRSIZ",22,0) S SIZT=0 "RTN","XBRSIZ",23,0) F %I=1:1 Q:'$D(^TMP("XBRSIZ",$J,"CRF1",%I,0)) S Y=^(0) W !?24,$P(Y,"^"),?34,$J($P(Y,"^",2),6) S SIZT=SIZT+$P(Y,"^",2) "RTN","XBRSIZ",24,0) W !!?24,"TOTAL",?34,$J(SIZT,6) "RTN","XBRSIZ",25,0) W !!?24,%I-1," ROUTINE" W:%I-1>1 "S" "RTN","XBRSIZ",26,0) KILL %I,J,N,S,SIZT,T,V,W,X,Y,Z "RTN","XBRSIZ",27,0) EXIT ; "RTN","XBRSIZ",28,0) KILL ^TMP("XBRSIZ",$J),I,X "RTN","XBRSIZ",29,0) D ^%ZISC "RTN","XBRSIZ",30,0) Q "RTN","XBRSIZ",31,0) ; "RTN","XBRSRCH") 0^141^B3715477 "RTN","XBRSRCH",1,0) XBRSRCH ; IHS/ADC/GTH - SEARCH DD FOR CALLED ROUTINES ; [ 02/07/97 3:02 PM ] "RTN","XBRSRCH",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRSRCH",3,0) ; "RTN","XBRSRCH",4,0) ; This routine searches a dictionary for called routines, "RTN","XBRSRCH",5,0) ; excluding %DT*, DIC, DIK, and DIQ. "RTN","XBRSRCH",6,0) ; "RTN","XBRSRCH",7,0) START ; "RTN","XBRSRCH",8,0) W !,"This routine searches dictionaries for called routines, excluding %DT*, DIC,",!," DIK, and DIQ.",! "RTN","XBRSRCH",9,0) S U="^" "RTN","XBRSRCH",10,0) R !,"[D]etail or [L]ist only: L//",X:$G(DTIME,999) "RTN","XBRSRCH",11,0) S:X'="D" XBRSRCH("NO DETAIL")=1 "RTN","XBRSRCH",12,0) ; could be a little friendlier "RTN","XBRSRCH",13,0) W ! "RTN","XBRSRCH",14,0) D ^XBDSET "RTN","XBRSRCH",15,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBRSRCH",16,0) S XBRSRCH("QFLG")=0,XBRSRCH("FILE")=0 "RTN","XBRSRCH",17,0) F XBRSRCH("L")=0:0 S XBRSRCH("FILE")=$O(^UTILITY("XBDSET",$J,XBRSRCH("FILE"))) Q:XBRSRCH("FILE")="" D CHECK Q:XBRSRCH("QFLG") "RTN","XBRSRCH",18,0) KILL XBRSRCH,^UTILITY("XBDSET",$J) "RTN","XBRSRCH",19,0) Q "RTN","XBRSRCH",20,0) ; "RTN","XBRSRCH",21,0) CHECK ; CHECK FILES UNTIL ALL DONE "RTN","XBRSRCH",22,0) W !!,"Searching ",$P(^DIC(XBRSRCH("FILE"),0),"^",1)," file (",XBRSRCH("FILE"),")" "RTN","XBRSRCH",23,0) KILL ^UTILITY("XBRSRCH",$J) "RTN","XBRSRCH",24,0) W !!,"INPUT TRANSFORMS",! "RTN","XBRSRCH",25,0) S XBSINP("FILE")=XBRSRCH("FILE") "RTN","XBRSRCH",26,0) D EN^XBRSRCH2 "RTN","XBRSRCH",27,0) W !!,"OUTPUT TRANSFORMS",! "RTN","XBRSRCH",28,0) S XBSOUT("FILE")=XBRSRCH("FILE") "RTN","XBRSRCH",29,0) D EN^XBRSRCH3 "RTN","XBRSRCH",30,0) W !!,"CROSS-REFERENCES",! "RTN","XBRSRCH",31,0) S XBSXREF("FILE")=XBRSRCH("FILE") "RTN","XBRSRCH",32,0) D EN^XBRSRCH4 "RTN","XBRSRCH",33,0) W !!,"MISCELLANEOUS ^DD ENTRIES",! "RTN","XBRSRCH",34,0) S XBSM("FILE")=XBRSRCH("FILE") "RTN","XBRSRCH",35,0) D EN^XBRSRCH5 "RTN","XBRSRCH",36,0) W ! "RTN","XBRSRCH",37,0) D LIST "RTN","XBRSRCH",38,0) D EOJ "RTN","XBRSRCH",39,0) Q "RTN","XBRSRCH",40,0) ; "RTN","XBRSRCH",41,0) LIST ; LIST ROUTINE NAMES "RTN","XBRSRCH",42,0) Q:'$D(^UTILITY("XBRSRCH",$J)) "RTN","XBRSRCH",43,0) W !!,"Sorted list of routines found:",! "RTN","XBRSRCH",44,0) S X="" "RTN","XBRSRCH",45,0) F XBRSRCH("L")=0:0 S X=$O(^UTILITY("XBRSRCH",$J,X)) Q:X="" W !,"^",X "RTN","XBRSRCH",46,0) W ! "RTN","XBRSRCH",47,0) Q "RTN","XBRSRCH",48,0) ; "RTN","XBRSRCH",49,0) EOJ ; "RTN","XBRSRCH",50,0) KILL ^UTILITY("XBRSRCH",$J),X,Y,DIC "RTN","XBRSRCH",51,0) Q "RTN","XBRSRCH",52,0) ; "RTN","XBRSRCH1") 0^142^B567775 "RTN","XBRSRCH1",1,0) XBRSRCH1 ; IHS/ADC/GTH - COMMON CHECK LOGIC ; [ 02/07/97 3:02 PM ] "RTN","XBRSRCH1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRSRCH1",3,0) ; "RTN","XBRSRCH1",4,0) ; Part of XBRSRCH "RTN","XBRSRCH1",5,0) ; "RTN","XBRSRCH1",6,0) CHECK ; EXCLUDE ^%DT,^DIC,^DIK,^DIQ, AND GLOBALS "RTN","XBRSRCH1",7,0) Q:Y="" "RTN","XBRSRCH1",8,0) Q:$E(Y)="""" "RTN","XBRSRCH1",9,0) Q:$E(Y,1,3)="%DT" "RTN","XBRSRCH1",10,0) Q:$E(Y,1,3)="DIC" "RTN","XBRSRCH1",11,0) Q:$E(Y,1,3)="DIK" "RTN","XBRSRCH1",12,0) Q:$E(Y,1,3)="DIQ" "RTN","XBRSRCH1",13,0) S X0=$F(Y,")"),X1=$F(Y,"("),X2=$F(Y," ") "RTN","XBRSRCH1",14,0) S:'X0 X0=999 "RTN","XBRSRCH1",15,0) S:'X1 X1=999 "RTN","XBRSRCH1",16,0) S:'X2 X2=888 "RTN","XBRSRCH1",17,0) Q:X0" "RTN","XBRXREF",90,0) S (DA,DCNT)=0 "RTN","XBRXREF",91,0) D CNT^DIK1 "RTN","XBRXREF",92,0) Q "RTN","XBRXREF",93,0) ; "RTN","XBRXREF",94,0) EOJ ; EOJ HOUSEKEEPING "RTN","XBRXREF",95,0) I 'XBRXREF("QFLG") D NOW^%DTC S Y=% X ^DD("DD") W !!,"Finished run at ",$P(Y,"@",2) "RTN","XBRXREF",96,0) KILL XBRXREF,%,%H,%I,DA,DCNT,DIC,DIK,X,Y,^TMP("XBRXREF",$J),^UTILITY("DIK",$J) "RTN","XBRXREF",97,0) Q "RTN","XBRXREF",98,0) ; "RTN","XBRXREF2") 0^148^B21464797 "RTN","XBRXREF2",1,0) XBRXREF2 ; IHS/ADC/GTH - INITIALIZATION ROUTINES FOR DRIVER ; [ 02/07/97 3:02 PM ] "RTN","XBRXREF2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBRXREF2",3,0) ; "RTN","XBRXREF2",4,0) ; Part of XBRXREF "RTN","XBRXREF2",5,0) ; "RTN","XBRXREF2",6,0) START ; "RTN","XBRXREF2",7,0) W !!,"Invalid entry point!",! "RTN","XBRXREF2",8,0) S XBRXREF("QFLG")=99 "RTN","XBRXREF2",9,0) Q "RTN","XBRXREF2",10,0) ; "RTN","XBRXREF2",11,0) INIT ;EP - INITIALIZATION "RTN","XBRXREF2",12,0) S U="^" "RTN","XBRXREF2",13,0) W !!,"RE-INDEX selected cross-references.",! "RTN","XBRXREF2",14,0) S XBRXREF("QFLG")=0 "RTN","XBRXREF2",15,0) KILL ^TMP("XBRXREF",$J) "RTN","XBRXREF2",16,0) Q "RTN","XBRXREF2",17,0) ; "RTN","XBRXREF2",18,0) GETFILE ;EP - GET FILE TO BE RE-XREFED "RTN","XBRXREF2",19,0) S DIC="^DIC(",DIC(0)="AEMQ" "RTN","XBRXREF2",20,0) D ^DIC "RTN","XBRXREF2",21,0) KILL DIC "RTN","XBRXREF2",22,0) I Y<0 S XBRXREF("QFLG")=1 Q "RTN","XBRXREF2",23,0) S XBRXREF("FILE")=+Y "RTN","XBRXREF2",24,0) S XBRXREF("GBL")=^DIC(XBRXREF("FILE"),0,"GL") "RTN","XBRXREF2",25,0) Q "RTN","XBRXREF2",26,0) ; "RTN","XBRXREF2",27,0) BLDXRT ;EP - BUILD XREF TABLE "RTN","XBRXREF2",28,0) F XBRXREF("L")=0:0 D GETFIELD Q:XBRXREF("FIELD")="" "RTN","XBRXREF2",29,0) S:'$O(^TMP("XBRXREF",$J,"")) XBRXREF("QFLG")=1 "RTN","XBRXREF2",30,0) Q "RTN","XBRXREF2",31,0) ; "RTN","XBRXREF2",32,0) GETFIELD ; GET FIELD TO XREF "RTN","XBRXREF2",33,0) W ! "RTN","XBRXREF2",34,0) S XBRXREF("FIELD")="" "RTN","XBRXREF2",35,0) S DIC="^DD("_XBRXREF("FILE")_",",DIC(0)="AEMQ" "RTN","XBRXREF2",36,0) D ^DIC "RTN","XBRXREF2",37,0) KILL DIC "RTN","XBRXREF2",38,0) Q:Y<0 "RTN","XBRXREF2",39,0) S XBRXREF("FIELD")=+Y "RTN","XBRXREF2",40,0) S X=$P(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),0),U,4) "RTN","XBRXREF2",41,0) S XBRXREF("NODE")=$P(X,";",1) "RTN","XBRXREF2",42,0) S XBRXREF("PIECE")=$P(X,";",2) "RTN","XBRXREF2",43,0) I XBRXREF("PIECE")=0 D GFRCR Q "RTN","XBRXREF2",44,0) I XBRXREF("NODE")=" " W !!,"Computed fields do not have xrefs." Q "RTN","XBRXREF2",45,0) I $D(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1)),$O(^(1,0)) D XREFS Q "RTN","XBRXREF2",46,0) W !!,"This field has no xrefs!" "RTN","XBRXREF2",47,0) Q "RTN","XBRXREF2",48,0) ; "RTN","XBRXREF2",49,0) GFRCR ; GET FIELD RECURSION "RTN","XBRXREF2",50,0) S XBRXREF("SAVE FILE")=XBRXREF("FILE"),XBRXREF("SAVE FIELD")=XBRXREF("FIELD") "RTN","XBRXREF2",51,0) F Y="XBRXREF" S %RCR(Y)="" "RTN","XBRXREF2",52,0) S XBRXREF("FILE")=+$P(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),0),U,2) "RTN","XBRXREF2",53,0) S %RCR="RECURSE^XBRXREF2" "RTN","XBRXREF2",54,0) D STORLIST^%RCR "RTN","XBRXREF2",55,0) S XBRXREF("FILE")=XBRXREF("SAVE FILE"),XBRXREF("FIELD")=XBRXREF("SAVE FIELD") "RTN","XBRXREF2",56,0) Q "RTN","XBRXREF2",57,0) ; "RTN","XBRXREF2",58,0) RECURSE ; "RTN","XBRXREF2",59,0) F XBRXREF("L")=0:0 D GETFIELD Q:XBRXREF("FIELD")="" "RTN","XBRXREF2",60,0) Q "RTN","XBRXREF2",61,0) ; "RTN","XBRXREF2",62,0) XREFS ; DISPLAY XREFS FOR FIELD "RTN","XBRXREF2",63,0) W !,"This field has the following xrefs. Select by number:" "RTN","XBRXREF2",64,0) S XBRXREF("XREF")=0 "RTN","XBRXREF2",65,0) F XBRXREF("L")=0:0 S XBRXREF("XREF")=$O(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1,XBRXREF("XREF"))) Q:XBRXREF("XREF")="" D XREFS2 "RTN","XBRXREF2",66,0) F XBRXREF("L")=0:0 D GETXREF Q:XBRXREF("XREF")="" "RTN","XBRXREF2",67,0) Q "RTN","XBRXREF2",68,0) ; "RTN","XBRXREF2",69,0) XREFS2 ; DISPLAY XREFS "RTN","XBRXREF2",70,0) S X=$P(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1,XBRXREF("XREF"),0),U,2) "RTN","XBRXREF2",71,0) S Y="" "RTN","XBRXREF2",72,0) S:X="" Y="TRIGGER" "RTN","XBRXREF2",73,0) I Y="",'$F(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1,XBRXREF("XREF"),1),"("""_X_"""") S Y="SUB-FILE LEVEL" "RTN","XBRXREF2",74,0) W !,XBRXREF("XREF"),?10,X,?20,Y "RTN","XBRXREF2",75,0) Q "RTN","XBRXREF2",76,0) ; "RTN","XBRXREF2",77,0) GETXREF ; GET XREFS FROM FIELD "RTN","XBRXREF2",78,0) W ! "RTN","XBRXREF2",79,0) S XBRXREF("XREF")="" "RTN","XBRXREF2",80,0) S DIC="^DD("_XBRXREF("FILE")_","_XBRXREF("FIELD")_",1,",DIC(0)="AEMQ" "RTN","XBRXREF2",81,0) D ^DIC "RTN","XBRXREF2",82,0) Q:Y<0 "RTN","XBRXREF2",83,0) S XBRXREF("XREF")=+Y "RTN","XBRXREF2",84,0) D INFOSAVE "RTN","XBRXREF2",85,0) Q "RTN","XBRXREF2",86,0) ; "RTN","XBRXREF2",87,0) INFOSAVE ; GET XREF/NODE/PIECE INFO AND SAVE "RTN","XBRXREF2",88,0) S X=$P(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1,XBRXREF("XREF"),0),U,2) "RTN","XBRXREF2",89,0) I X="" W !!,*7,"Sorry, I don't do TRIGGERS!" Q "RTN","XBRXREF2",90,0) I '$F(^DD(XBRXREF("FILE"),XBRXREF("FIELD"),1,XBRXREF("XREF"),1),"("""_X_"""") W !!,*7,"Sorry, I only do xrefs at the file level!" Q "RTN","XBRXREF2",91,0) S ^TMP("XBRXREF",$J,XBRXREF("FILE"),XBRXREF("FIELD"),XBRXREF("XREF"))=X "RTN","XBRXREF2",92,0) Q "RTN","XBRXREF2",93,0) ; "RTN","XBRXREF2",94,0) CONFIRM ;EP - GET USER CONFIRMATION "RTN","XBRXREF2",95,0) W !!,"The ",$P(^DIC(XBRXREF("FILE"),0),U,1)," file contains ",$P(@(XBRXREF("GBL")_"0)"),U,4)," entries. The following xrefs will be",!,"killed and reset by the specified file or sub-file, and field:",! "RTN","XBRXREF2",96,0) S XBRXREF("FILE")="" "RTN","XBRXREF2",97,0) F XBRXREF("L")=0:0 S XBRXREF("FILE")=$O(^TMP("XBRXREF",$J,XBRXREF("FILE"))) Q:XBRXREF("FILE")="" D CONFIRM2 "RTN","XBRXREF2",98,0) R !!,"Do you want to continue (Y/N) Y//",X:$G(DTIME,999) "RTN","XBRXREF2",99,0) S:"Yy"'[$E(X) XBRXREF("QFLG")=1 "RTN","XBRXREF2",100,0) Q "RTN","XBRXREF2",101,0) ; "RTN","XBRXREF2",102,0) CONFIRM2 ; "RTN","XBRXREF2",103,0) S XBRXREF("FIELD")="" "RTN","XBRXREF2",104,0) F XBRXREF("L")=0:0 S XBRXREF("FIELD")=$O(^TMP("XBRXREF",$J,XBRXREF("FILE"),XBRXREF("FIELD"))) Q:XBRXREF("FIELD")="" D CONFIRM3 "RTN","XBRXREF2",105,0) Q "RTN","XBRXREF2",106,0) ; "RTN","XBRXREF2",107,0) CONFIRM3 ; "RTN","XBRXREF2",108,0) S XBRXREF("XREF")="" "RTN","XBRXREF2",109,0) F XBRXREF("L")=0:0 S XBRXREF("XREF")=$O(^TMP("XBRXREF",$J,XBRXREF("FILE"),XBRXREF("FIELD"),XBRXREF("XREF"))) Q:XBRXREF("XREF")="" W !,XBRXREF("FILE"),?15,XBRXREF("FIELD"),?25,^(XBRXREF("XREF")) "RTN","XBRXREF2",110,0) Q "RTN","XBRXREF2",111,0) ; "RTN","XBSAN") 0^149^B841163410 "RTN","XBSAN",1,0) XBSAN ;IHS/ITSC/LAB/FJE;SANITIZE RPMS DATABASE; [ 01/29/2004 11:10 AM ] "RTN","XBSAN",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSAN",3,0) W !,"This routine sanitizes and deletes RPMS data. To use you must type: D START^XBSAN",!! "RTN","XBSAN",4,0) Q "RTN","XBSAN",5,0) START ; "RTN","XBSAN",6,0) S (XBDUZ,XBDEL,XBPAT,XBPHR,XBBH,XBCHR,XBPOS,XB3PB,XBAR,XBLAB,XBMMDEL,XBAUDEL,XBNCDEL)=0 "RTN","XBSAN",7,0) K ^XTMP("SAN") "RTN","XBSAN",8,0) S ^XTMP("SAN","LASTDFN")=0 "RTN","XBSAN",9,0) W !,"This routine will first sanitize AND randomize the NEW PERSON file in the RPMS database." "RTN","XBSAN",10,0) S DIR(0)="Y",DIR("A")="Do you want to convert the new person data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",11,0) S:Y=1 XBDUZ=1 "RTN","XBSAN",12,0) W !,"This routine will then REMOVE/DELETE UNNEEDED PATIENT DATA in the RPMS database." "RTN","XBSAN",13,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",14,0) S:Y=1 XBDEL=1 "RTN","XBSAN",15,0) W !!,"This routine will then sanitize the PATIENT FILES of a RPMS database." "RTN","XBSAN",16,0) S DIR(0)="Y",DIR("A")="Do you want to convert the patient data",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",17,0) S:Y=1 XBPAT=1 "RTN","XBSAN",18,0) W !!,"This routine will then sanitize the POLICY HOLDER FILE of a RPMS database." "RTN","XBSAN",19,0) S DIR(0)="Y",DIR("A")="Do you want to convert the POLICY HOLDER data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",20,0) S:Y=1 XBPHR=1 "RTN","XBSAN",21,0) W !!,"This routine will then delete SENSITIVE CHR DATA from a RPMS database." "RTN","XBSAN",22,0) S DIR(0)="Y",DIR("A")="Do you want to delete this CHR patient data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",23,0) S:Y=1 XBCHR=1 "RTN","XBSAN",24,0) W !!,"This routine will then delete SENSITIVE BH VERSION 3.0 COMPLIANT DATA from a RPMS database." "RTN","XBSAN",25,0) S DIR(0)="Y",DIR("A")="Do you want to delete this CHR patient data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",26,0) S:Y=1 XBBH=1 "RTN","XBSAN",27,0) W !,"This routine will then REMOVE/DELETE UNNEEDED POS DATA in the RPMS database." "RTN","XBSAN",28,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",29,0) S:Y=1 XBPOS=1 "RTN","XBSAN",30,0) W !,"This routine will then REMOVE/DELETE UNNEEDED 3PB DATA in the RPMS database." "RTN","XBSAN",31,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",32,0) S:Y=1 XB3PB=1 "RTN","XBSAN",33,0) W !,"This routine will then REMOVE/DELETE UNNEEDED AR DATA in the RPMS database." "RTN","XBSAN",34,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",35,0) S:Y=1 XBAR=1 "RTN","XBSAN",36,0) W !,"This routine will then REMOVE/DELETE UNNEEDED LAB DATA in the RPMS database." "RTN","XBSAN",37,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",38,0) S:Y=1 XBLAB=1 "RTN","XBSAN",39,0) W !,"This routine will then REMOVE/DELETE MAILMAN MESSAGES in the RPMS database." "RTN","XBSAN",40,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",41,0) S:Y=1 XBMMDEL=1 "RTN","XBSAN",42,0) W !,"This routine will then REMOVE/DELETE AUDIT DATA in the RPMS database." "RTN","XBSAN",43,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",44,0) S:Y=1 XBAUDEL=1 "RTN","XBSAN",45,0) W !,"This routine will then REMOVE/DELETE NAME COMPONENTS in the RPMS database." "RTN","XBSAN",46,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",47,0) S:Y=1 XBNCDEL=1 "RTN","XBSAN",48,0) W !,"All failed fileman update data can be found in: ^XTMP(""SAN"",""FAILURE"", GLOBAL" "RTN","XBSAN",49,0) W !,"?? display usually means that there was a fileman update failure" "RTN","XBSAN",50,0) W !,"If a hard error like an UNDEFINED occurs during the Patient scrambling," "RTN","XBSAN",51,0) W !," you can restart at the next patient by typing: RESTART^XBSAN " "RTN","XBSAN",52,0) W !,"This routine does not purge HL7, or ARMS data." "RTN","XBSAN",53,0) W !,"When finished...don't forget to manually address the above and RENAME Institutions",!! "RTN","XBSAN",54,0) W !!,"This routine is about to scramble the RPMS database." "RTN","XBSAN",55,0) S DIR(0)="Y",DIR("A")="Last chance: Do you want your RPMS data SANITIZED?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSAN",56,0) Q:Y'=1 "RTN","XBSAN",57,0) D ^XBKVAR "RTN","XBSAN",58,0) W !,"Collecting random names" D CLEAN "RTN","XBSAN",59,0) I XBDUZ W !,"SCRAMBLING FILE 200" D DUZ "RTN","XBSAN",60,0) I XBDEL W !,"DELETING PAT INFO" D PATDEL "RTN","XBSAN",61,0) RESTART ;WILL RESTART PAT SCRAMBLE IF HARD ERROR OCCURS "RTN","XBSAN",62,0) I $G(^XTMP("SAN","LASTDFN"))>0 S ^XTMP("SAN","FAILURE","PATDFN",^XTMP("SAN","LASTDFN"))="" "RTN","XBSAN",63,0) I XBPAT W !,"SCRAMBLING PAT FILE" D PAT "RTN","XBSAN",64,0) I XBPHR W !,"SCRAMBLING POLICY FILE" D PHR "RTN","XBSAN",65,0) I XBCHR W !,"SCRAMBLING CHR FILE" D CHR "RTN","XBSAN",66,0) I XBBH W !,"DELETING BH INFO" D BH "RTN","XBSAN",67,0) I XBPOS W !,"DELETING POS INFO" D POSDEL "RTN","XBSAN",68,0) I XB3PB W !,"SCRAMBLING 3PB FILE" D TPB "RTN","XBSAN",69,0) I XBAR W !,"SCRAMBLING AR FILE" D AR "RTN","XBSAN",70,0) I XBLAB W !,"SCRAMBLING LAB FILES" D LAB "RTN","XBSAN",71,0) I XBMMDEL W !,"DELETING MAILMAN MESSAGES" D MMDEL "RTN","XBSAN",72,0) I XBAUDEL W !,"DELETING AUDIT DATA" D AUDEL "RTN","XBSAN",73,0) I XBNCDEL W !,"DELETING NAME COMPONENTS" D NCDEL "RTN","XBSAN",74,0) D PAT2 "RTN","XBSAN",75,0) S ^XTMP("SAN","PROCESS","XBSAN")="FINISHED" "RTN","XBSAN",76,0) W !,"FINISHED" "RTN","XBSAN",77,0) D LISTE "RTN","XBSAN",78,0) D EOJ "RTN","XBSAN",79,0) Q "RTN","XBSAN",80,0) ; "RTN","XBSAN",81,0) PAT D ^XBKVAR "RTN","XBSAN",82,0) S XBCHART=100000 "RTN","XBSAN",83,0) S DFN=+$G(^XTMP("SAN","LASTDFN")) I DFN W !,"RESTARTING PATIENT SCRAMBLE AFTER "_DFN,! "RTN","XBSAN",84,0) F S DFN=$O(^DPT(DFN)) Q:DFN'=+DFN D PROCPAT "RTN","XBSAN",85,0) S ^XTMP("SAN","PROCESS","PAT")="FINISHED" "RTN","XBSAN",86,0) Q "RTN","XBSAN",87,0) ; "RTN","XBSAN",88,0) PAT2 D ^XBKVAR "RTN","XBSAN",89,0) S XBCHART=100000 "RTN","XBSAN",90,0) W !,"RETRYING FAILED PATIENTS",! "RTN","XBSAN",91,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATNAME",DFN)) Q:DFN'=+DFN D "RTN","XBSAN",92,0) .S Y=DFN D ^AUPNPAT "RTN","XBSAN",93,0) .S XBSCR=$S(AUPNSEX="M":3,1:2) "RTN","XBSAN",94,0) .D FNAME "RTN","XBSAN",95,0) .D LNAME "RTN","XBSAN",96,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSAN",97,0) .S DA=DFN,DIE="^DPT(",DR=".01///"_XBNAME D ^DIE "RTN","XBSAN",98,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNAME2",DFN)="" W !,$P(^DPT(DFN,0),U,1)," ",XBNAME "RTN","XBSAN",99,0) .D ^XBFMK "RTN","XBSAN",100,0) S ^XTMP("SAN","PROCESS","PAT")="FINISHED" "RTN","XBSAN",101,0) Q "RTN","XBSAN",102,0) CHR ; "RTN","XBSAN",103,0) S X=0 F S X=$O(^BCHR(X)) Q:X'=+X K ^BCHR(X,51),^BCHR(X,61),^BCHR(X,71) "RTN","XBSAN",104,0) S ^XTMP("SAN","PROCESS","CHR")="FINISHED" "RTN","XBSAN",105,0) Q "RTN","XBSAN",106,0) BH ;version 3.0 compliant only "RTN","XBSAN",107,0) S X=0 F S X=$O(^AMHREC(X)) Q:X'=+X K ^AMHREC(X,31),^AMHREC(X,81),^AMHREC(X,21) "RTN","XBSAN",108,0) S X=0 F S X=$O(^AMHPTXP(X)) Q:X'=+X K ^AMHPTXP(X,18) "RTN","XBSAN",109,0) S ^XTMP("SAN","PROCESS","BH")="FINISHED" "RTN","XBSAN",110,0) Q "RTN","XBSAN",111,0) PHR ; "RTN","XBSAN",112,0) ;policy holders not pointing to a patient "RTN","XBSAN",113,0) S XBP=0 F S XBP=$O(^AUPN3PPH(XBP)) Q:XBP'=+XBP D "RTN","XBSAN",114,0) .Q:$P(^AUPN3PPH(XBP,0),U,2) ;already converted "RTN","XBSAN",115,0) .S XBS=$P(^AUPN3PPH(XBP,0),U,8) I XBS="" S XBS="M" "RTN","XBSAN",116,0) .S XBSCR=$S(XBS="M":3,1:2) "RTN","XBSAN",117,0) .D FNAME "RTN","XBSAN",118,0) .D LNAME "RTN","XBSAN",119,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSAN",120,0) .D PHNR "RTN","XBSAN",121,0) .S XBPHN="555-777-"_XBPHN "RTN","XBSAN",122,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".01///"_XBNAME_";.14///"_XBPHN D ^DIE "RTN","XBSAN",123,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYPHONE",DFN)="" "RTN","XBSAN",124,0) .D ^XBFMK "RTN","XBSAN",125,0) .D SSNR "RTN","XBSAN",126,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".04///"_XBSSN D ^DIE "RTN","XBSAN",127,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYSSN",DFN)="" "RTN","XBSAN",128,0) .D ^XBFMK "RTN","XBSAN",129,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",130,0) .S $P(^AUPN3PPH(XBP,0),U,9)=XBADDR "RTN","XBSAN",131,0) .S XBD=$P(^AUPN3PPH(XBP,0),U,19) I XBD]"" S XBD=$$FMADD^XLFDT(XBD,-33) "RTN","XBSAN",132,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".19///"_XBD D ^DIE "RTN","XBSAN",133,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYDOB",DA)="" "RTN","XBSAN",134,0) .D ^XBFMK "RTN","XBSAN",135,0) S ^XTMP("SAN","PROCESS","POLICY")="FINISHED" "RTN","XBSAN",136,0) Q "RTN","XBSAN",137,0) PROCPAT ; "RTN","XBSAN",138,0) S ^XTMP("SAN","LASTDFN")=DFN "RTN","XBSAN",139,0) I '(DFN#5000) W !,"."_DFN_"." "RTN","XBSAN",140,0) D ^XBFMK "RTN","XBSAN",141,0) S Y=DFN D ^AUPNPAT "RTN","XBSAN",142,0) D F201 "RTN","XBSAN",143,0) D F203 ;subtract 33 days from dob "RTN","XBSAN",144,0) D F209 "RTN","XBSAN",145,0) D F2111 "RTN","XBSAN",146,0) D F2131 "RTN","XBSAN",147,0) D F2132 "RTN","XBSAN",148,0) D F2211 "RTN","XBSAN",149,0) D F2212 "RTN","XBSAN",150,0) D F2213 "RTN","XBSAN",151,0) D F2219 "RTN","XBSAN",152,0) D F22401 "RTN","XBSAN",153,0) D F22402 "RTN","XBSAN",154,0) D F22403 "RTN","XBSAN",155,0) D OTHNAME "RTN","XBSAN",156,0) D TEN ;tribal enrollment number "RTN","XBSAN",157,0) D BRTH "RTN","XBSAN",158,0) D DTH "RTN","XBSAN",159,0) D PN "RTN","XBSAN",160,0) D EMPL "RTN","XBSAN",161,0) D NKR "RTN","XBSAN",162,0) D ECR "RTN","XBSAN",163,0) D XBCHART "RTN","XBSAN",164,0) D INSURE "RTN","XBSAN",165,0) D POLICY "RTN","XBSAN",166,0) Q "RTN","XBSAN",167,0) EOJ ; "RTN","XBSAN",168,0) D EN^XBVK("XB") "RTN","XBSAN",169,0) K DFN,XBH,OTDFN,XBB,AUPNSEX,X,X2,XB3PB,XBAR,XBAUDEL "RTN","XBSAN",170,0) K DA,DIE,DIK,DIR,DR,DUZSSN,I,XBA,XBADDR,XBADL1 "RTN","XBSAN",171,0) K XBBH,XBC,XBCHART,XBCHR,XBD,XBDAD,XBDEANUM,XBDEL,XBDFIRST,XBDLAST,XBDNAME "RTN","XBSAN",172,0) K XBDOB,XBDUZ,XBFIRST,XBFNAME,XBH,XBLAB,XBLNAME,XBMDFN,XBMMDEL,XBMOM "RTN","XBSAN",173,0) K XBNAME,XBNCDEL,XBNOK,XBNOKADL,XBP,XBPAT,XBPHN,XBPHR,XBPOS,XBS "RTN","XBSAN",174,0) K XBSCR,XBSEX,XBSSN,XBTEN,XBVAL,XBVANUM,XBX,Y,Z "RTN","XBSAN",175,0) W !,"If all data appears correct and you have chaecked failures, kill the ^XTMP(""SAN"") global",!! "RTN","XBSAN",176,0) Q "RTN","XBSAN",177,0) NKR ; "RTN","XBSAN",178,0) I $P($G(^AUPNPAT(DFN,28)),U,2)]"" S DA=DFN,DIE="^AUPNPAT(",DR="2802///`"_$O(^AUTTRLSH("B","MOTHER",0)) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATNKR",DFN)="" "RTN","XBSAN",179,0) D ^XBFMK "RTN","XBSAN",180,0) Q "RTN","XBSAN",181,0) ECR ; "RTN","XBSAN",182,0) I $P($G(^AUPNPAT(DFN,31)),U,2)]"" S DA=DFN,DIE="^AUPNPAT(",DR="3102///`"_$O(^AUTTRLSH("B","MOTHER",0)) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATECR",DFN)="" "RTN","XBSAN",183,0) D ^XBFMK "RTN","XBSAN",184,0) Q "RTN","XBSAN",185,0) EMPL ;employer .19 "RTN","XBSAN",186,0) I $P($G(^AUPNPAT(DFN,0)),U,19)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".19///FIRST AMERICAN BANK" D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATEMP",DFN)="" "RTN","XBSAN",187,0) D ^XBFMK "RTN","XBSAN",188,0) Q "RTN","XBSAN",189,0) PN ; "RTN","XBSAN",190,0) I $P($G(^AUPNPAT(DFN,0)),U,31)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".31///"_$P(^DPT(DFN,0),U) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATPN",DFN)="" "RTN","XBSAN",191,0) D ^XBFMK "RTN","XBSAN",192,0) Q "RTN","XBSAN",193,0) TEN ; "RTN","XBSAN",194,0) S XBTEN="TN - "_DFN "RTN","XBSAN",195,0) I $P($G(^AUPNPAT(DFN,0)),U,7)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".07///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATTEN",DFN)="" "RTN","XBSAN",196,0) D ^XBFMK "RTN","XBSAN",197,0) Q "RTN","XBSAN",198,0) BRTH ; "RTN","XBSAN",199,0) I $P($G(^AUPNPAT(DFN,11)),U,5)]"" S XBTEN=$E(DFN_"000000",1,7),DA=DFN,DIE="^AUPNPAT(",DR="1105///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATBIRTH",DFN)="" "RTN","XBSAN",200,0) D ^XBFMK "RTN","XBSAN",201,0) Q "RTN","XBSAN",202,0) DTH ; "RTN","XBSAN",203,0) I $P($G(^AUPNPAT(DFN,11)),U,16)]"" S XBTEN=$E("D"_DFN_"00000",1,7),DA=DFN,DIE="^AUPNPAT(",DR="1105///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATDEATH",DFN)="" "RTN","XBSAN",204,0) D ^XBFMK "RTN","XBSAN",205,0) Q "RTN","XBSAN",206,0) F201 ; "RTN","XBSAN",207,0) S XBSCR=$S(AUPNSEX="M":3,1:2) "RTN","XBSAN",208,0) D FNAME "RTN","XBSAN",209,0) D LNAME "RTN","XBSAN",210,0) S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSAN",211,0) S DA=DFN,DIE="^DPT(",DR=".01///"_XBNAME D ^DIE "RTN","XBSAN",212,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATNAME",DFN)="" "RTN","XBSAN",213,0) D ^XBFMK "RTN","XBSAN",214,0) Q "RTN","XBSAN",215,0) FNAME ; "RTN","XBSAN",216,0) I XBSCR=3 S X=^XTMP("SAN",$J,"FIRSTM") D R S XBFNAME=^XTMP("SAN",$J,"FIRSTM",X) Q "RTN","XBSAN",217,0) S X=^XTMP("SAN",$J,"FIRSTF") D R S XBFNAME=^XTMP("SAN",$J,"FIRSTF",X) "RTN","XBSAN",218,0) Q "RTN","XBSAN",219,0) LNAME ; "RTN","XBSAN",220,0) S X=^XTMP("SAN",$J,"LAST") D R S XBLNAME=^XTMP("SAN",$J,"LAST",X) "RTN","XBSAN",221,0) Q "RTN","XBSAN",222,0) F203 ;dob "RTN","XBSAN",223,0) S XBDOB=$P(^DPT(DFN,0),U,3) "RTN","XBSAN",224,0) I XBDOB="" Q "RTN","XBSAN",225,0) S XBDOB=$$FMADD^XLFDT(XBDOB,-33) "RTN","XBSAN",226,0) S DIE="^DPT(",DA=DFN,DR=".03///"_XBDOB D ^DIE "RTN","XBSAN",227,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATDOB",DFN)="" "RTN","XBSAN",228,0) D ^XBFMK "RTN","XBSAN",229,0) Q "RTN","XBSAN",230,0) F2211 ;nok/emergency contact name "RTN","XBSAN",231,0) S XBSCR=2 D FNAME S XBNOK=XBLNAME_","_XBFNAME "RTN","XBSAN",232,0) I $P($G(^DPT(DFN,.21)),U,1)]"" D "RTN","XBSAN",233,0) .D ^XBFMK "RTN","XBSAN",234,0) .S DIE="^DPT(",DR=".211///"_XBNOK,DA=DFN D ^DIE "RTN","XBSAN",235,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNOK",DFN)="" "RTN","XBSAN",236,0) .D ^XBFMK "RTN","XBSAN",237,0) I $P($G(^DPT(DFN,.33)),U,1)]"" D "RTN","XBSAN",238,0) .S DIE="^DPT(",DR=".331///"_XBNOK,DA=DFN D ^DIE "RTN","XBSAN",239,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATECN",DFN)="" "RTN","XBSAN",240,0) .D ^XBFMK "RTN","XBSAN",241,0) Q "RTN","XBSAN",242,0) F2212 ; "RTN","XBSAN",243,0) D ^XBFMK "RTN","XBSAN",244,0) I $P($G(^DPT(DFN,.21)),U,2)]"" D "RTN","XBSAN",245,0) .S DA=DFN,DIE="^DPT(",DR=".212///MOTHER" D ^DIE "RTN","XBSAN",246,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNOKMOTHER",DFN)="" "RTN","XBSAN",247,0) .D ^XBFMK "RTN","XBSAN",248,0) I $P($G(^DPT(DFN,.33)),U,2)]"" D "RTN","XBSAN",249,0) .S DA=DFN,DIE="^DPT(",DR=".332///"_"MOTHER" D ^DIE "RTN","XBSAN",250,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATECNMOTHER",DFN)="" "RTN","XBSAN",251,0) .D ^XBFMK "RTN","XBSAN",252,0) Q "RTN","XBSAN",253,0) F22401 ;father's name "RTN","XBSAN",254,0) I $P($G(^DPT(DFN,.24)),U,1)="" Q "RTN","XBSAN",255,0) S XBSCR=3 D FNAME S XBDAD=XBLNAME_","_XBFNAME "RTN","XBSAN",256,0) S DIE="^DPT(",DR=".2401///"_XBDAD,DA=DFN D ^DIE "RTN","XBSAN",257,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATFATHER",DFN)="" "RTN","XBSAN",258,0) D ^XBFMK "RTN","XBSAN",259,0) Q "RTN","XBSAN",260,0) F22402 ;mother's name "RTN","XBSAN",261,0) S XBSCR=2 D FNAME S XBMOM=XBLNAME_","_XBFNAME "RTN","XBSAN",262,0) I $P($G(^DPT(DFN,.24)),U,2)="" Q "RTN","XBSAN",263,0) S DIE="^DPT(",DR=".2402///"_XBMOM,DA=DFN D ^DIE "RTN","XBSAN",264,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMOTHER",DFN)="" "RTN","XBSAN",265,0) D ^XBFMK "RTN","XBSAN",266,0) Q "RTN","XBSAN",267,0) F22403 ;mother's maiden name "RTN","XBSAN",268,0) D LNAME "RTN","XBSAN",269,0) S XBMMN=XBLNAME_","_$P(XBMOM,",",2) "RTN","XBSAN",270,0) I $P($G(^DPT(DFN,.24)),U,3)="" Q "RTN","XBSAN",271,0) S DIE="^DPT(",DR=".2403///"_XBMMN,DA=DFN D ^DIE "RTN","XBSAN",272,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMOTHMAIDNAM",DFN)="" "RTN","XBSAN",273,0) D ^XBFMK "RTN","XBSAN",274,0) Q "RTN","XBSAN",275,0) OTHNAME ; "RTN","XBSAN",276,0) S OTDFN=0 F S OTDFN=$O(^DPT(DFN,.01,OTDFN)) Q:OTDFN'=+OTDFN D "RTN","XBSAN",277,0) .D LNAME "RTN","XBSAN",278,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSAN",279,0) .S DA=OTDFN,DIE="^DPT("_DFN_",.01,",DA(1)=DFN,DR=".01///"_XBNAME D ^DIE "RTN","XBSAN",280,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATOTHRNAME",DFN)="" "RTN","XBSAN",281,0) .D ^XBFMK "RTN","XBSAN",282,0) Q "RTN","XBSAN",283,0) F2111 ; "RTN","XBSAN",284,0) I $P($G(^DPT(DFN,.11)),U,1)]"" D "RTN","XBSAN",285,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",286,0) .S DIE="^DPT(",DR=".111///"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",287,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESS",DFN)="" "RTN","XBSAN",288,0) .D ^XBFMK "RTN","XBSAN",289,0) .S $P(^DPT(DFN,.11),U,2)="" ;addr 2nd line "RTN","XBSAN",290,0) .S $P(^DPT(DFN,.11),U,3)="" ;addr 3rd line "RTN","XBSAN",291,0) Q "RTN","XBSAN",292,0) F2213 ; "RTN","XBSAN",293,0) I $P($G(^DPT(DFN,.21)),U,3)]"" D "RTN","XBSAN",294,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",295,0) .S DIE="^DPT(",DR=".213///"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",296,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL11",DFN)="" "RTN","XBSAN",297,0) .D ^XBFMK "RTN","XBSAN",298,0) I $P($G(^DPT(DFN,.33)),U,3)]"" D "RTN","XBSAN",299,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",300,0) .S DIE="^DPT(",DR=".333.//"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",301,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL111",DFN)="" "RTN","XBSAN",302,0) .D ^XBFMK "RTN","XBSAN",303,0) Q "RTN","XBSAN",304,0) POLICY ; "RTN","XBSAN",305,0) ;loop through policy holder "RTN","XBSAN",306,0) ;if has patient pointer use patient name and address and "RTN","XBSAN",307,0) D ^XBFMK "RTN","XBSAN",308,0) S XBP=$O(^AUPN3PPH("C",DFN,0)) "RTN","XBSAN",309,0) I 'XBP K XBP Q "RTN","XBSAN",310,0) S XBTEN=$P($G(^DPT(DFN,.11)),U,1) "RTN","XBSAN",311,0) S DA=XBP,DIE="^AUPN3PPH(",DR=".01///"_XBNAME_";.04///"_XBSSN_";.09///"_XBTEN_";.11///@;.13///@;.14///@;.19///"_XBDOB D ^DIE "RTN","XBSAN",312,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATPOLICY",DA)="" "RTN","XBSAN",313,0) D ^XBFMK "RTN","XBSAN",314,0) Q "RTN","XBSAN",315,0) INSURE ; "RTN","XBSAN",316,0) D MCR,PI,MCD,RR "RTN","XBSAN",317,0) Q "RTN","XBSAN",318,0) MCR ; "RTN","XBSAN",319,0) ;MEDICARE "RTN","XBSAN",320,0) Q:'$D(^AUPNMCR(DFN)) "RTN","XBSAN",321,0) S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",322,0) S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",323,0) S XBDLAST=XBDLAST_","_XBDFIRST "RTN","XBSAN",324,0) D SSNR "RTN","XBSAN",325,0) S DIE="^AUPNMCR(",DA=DFN,DR=".03///"_XBSSN_";.14///"_XBDLAST_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3) D ^DIE "RTN","XBSAN",326,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMEDICARE",DFN)="" "RTN","XBSAN",327,0) D ^XBFMK "RTN","XBSAN",328,0) Q "RTN","XBSAN",329,0) PI ; "RTN","XBSAN",330,0) Q:'$D(^AUPNPRVT(DFN)) "RTN","XBSAN",331,0) Q:'$D(^AUPNPRVT(DFN,11)) "RTN","XBSAN",332,0) S XBMDFN=0 F S XBMDFN=$O(^AUPNPRVT(DFN,11,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSAN",333,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,2)=XBSSN "RTN","XBSAN",334,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,4)=XBNAME "RTN","XBSAN",335,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,12)="" "RTN","XBSAN",336,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,14)="" "RTN","XBSAN",337,0) Q "RTN","XBSAN",338,0) ; "RTN","XBSAN",339,0) RR ; "RTN","XBSAN",340,0) Q:'$D(^AUPNRRE(DFN)) "RTN","XBSAN",341,0) S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",342,0) S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",343,0) S XBDLAST=XBDLAST_","_XBDFIRST "RTN","XBSAN",344,0) D SSNR "RTN","XBSAN",345,0) S DIE="^AUPNRRE(",DA=DFN,DR=".04///"_XBSSN_";.14///"_XBDLAST_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3) D ^DIE "RTN","XBSAN",346,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATRAILROAD",DFN)="" "RTN","XBSAN",347,0) D ^XBFMK "RTN","XBSAN",348,0) Q "RTN","XBSAN",349,0) MCD ; "RTN","XBSAN",350,0) S XBMDFN=0 F S XBMDFN=$O(^AUPNMCD("B",DFN,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSAN",351,0) .S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",352,0) .S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",353,0) .S DIE="^AUPNMCD(",DA=XBMDFN,DR=".05///@;.12///@;.13///@" D ^DIE "RTN","XBSAN",354,0) .D ^XBFMK "RTN","XBSAN",355,0) .S XBDNAME=XBDLAST_","_XBDFIRST "RTN","XBSAN",356,0) .D SSNR "RTN","XBSAN",357,0) .S DIE="^AUPNMCD(",DA=XBMDFN,DR=".03///"_XBSSN_";.14///"_XBDNAME_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3)_";.05///"_$P(^DPT(DFN,0),U,1) D ^DIE "RTN","XBSAN",358,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATMEDICAID",DA)="" "RTN","XBSAN",359,0) .D ^XBFMK "RTN","XBSAN",360,0) Q "RTN","XBSAN",361,0) XBCHART ; "RTN","XBSAN",362,0) S XBH=0 F S XBH=$O(^AUPNPAT(DFN,41,XBH)) Q:XBH'=+XBH S XBCHART=XBCHART+1 D "RTN","XBSAN",363,0) .S DA=XBH,DIE="^AUPNPAT("_DFN_",41,",DA(1)=DFN,DR=".02///"_XBCHART D ^DIE "RTN","XBSAN",364,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATCHART",DFN)="" "RTN","XBSAN",365,0) .D ^XBFMK "RTN","XBSAN",366,0) Q "RTN","XBSAN",367,0) F209 ; "RTN","XBSAN",368,0) I $P($G(^DPT(DFN,0)),U,9)="" Q "RTN","XBSAN",369,0) D SSNR "RTN","XBSAN",370,0) S DIE="^DPT(",DA=DFN,DR=".09///"_XBSSN D ^DIE "RTN","XBSAN",371,0) I $D(Y) S DA=DFN,DIE="^DPT(",DR=".09///@" D ^DIE "RTN","XBSAN",372,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATSSN",DFN)="" "RTN","XBSAN",373,0) D ^XBFMK "RTN","XBSAN",374,0) Q "RTN","XBSAN",375,0) F2219 ;nok phone "RTN","XBSAN",376,0) I $P($G(^DPT(DFN,.21)),U,9)]"" D PHNR D ;S $P(^DPT(DFN,.21),U,9)="555-888-"_XBPHN "RTN","XBSAN",377,0) .S XBPHN="555-888-"_XBPHN "RTN","XBSAN",378,0) .S DIE="^DPT(",DA=DFN,DR=".219///"_XBPHN D ^DIE "RTN","XBSAN",379,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE",DFN)="" "RTN","XBSAN",380,0) .D ^XBFMK "RTN","XBSAN",381,0) I $P($G(^DPT(DFN,.33)),U,9)]"" D PHNR D ;S $P(^DPT(DFN,.33),U,9)="555-888-"_XBPHN "RTN","XBSAN",382,0) .S XBPHN="555-888-"_XBPHN "RTN","XBSAN",383,0) .S DIE="^DPT(",DA=DFN,DR=".339///"_XBPHN D ^DIE "RTN","XBSAN",384,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE1",DFN)="" "RTN","XBSAN",385,0) .D ^XBFMK "RTN","XBSAN",386,0) Q "RTN","XBSAN",387,0) F2131 ; "RTN","XBSAN",388,0) I $P($G(^DPT(DFN,.13)),U,1)]"" D PHNR D "RTN","XBSAN",389,0) .S XBPHN="555-555-"_XBPHN "RTN","XBSAN",390,0) .S DIE="^DPT(",DA=DFN,DR=".131///"_XBPHN D ^DIE "RTN","XBSAN",391,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE2",DFN)="" "RTN","XBSAN",392,0) .D ^XBFMK "RTN","XBSAN",393,0) Q "RTN","XBSAN",394,0) F2132 ; "RTN","XBSAN",395,0) Q:$P($G(^DPT(DFN,.13)),U,2)="" ;no office phone "RTN","XBSAN",396,0) D PHNR S XBPHN="555-999-"_XBPHN "RTN","XBSAN",397,0) S DIE="^DPT(",DA=DFN,DR=".132///"_XBPHN D ^DIE "RTN","XBSAN",398,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE3",DFN)="" "RTN","XBSAN",399,0) D ^XBFMK "RTN","XBSAN",400,0) Q "RTN","XBSAN",401,0) ; "RTN","XBSAN",402,0) DELP ;delete patients with no visits "RTN","XBSAN",403,0) ;S XBCNT=0,XBP=0 F S XBP=$O(^DPT(XBP)) Q:XBP'=+XBP D "RTN","XBSAN",404,0) ;.Q:$D(^AUPNVSIT("AC",XBP)) "RTN","XBSAN",405,0) ;.S DA=XBP,DIK="^DPT(" D ^DIK "RTN","XBSAN",406,0) ;.S DA=XBP,DIK="^AUPNPAT(" D ^DIK "RTN","XBSAN",407,0) ;.W DA,":" S XBCNT=XBCNT+1 "RTN","XBSAN",408,0) ;.Q "RTN","XBSAN",409,0) ;W !,XBCNT "RTN","XBSAN",410,0) ;Q "RTN","XBSAN",411,0) CLEAN ; "RTN","XBSAN",412,0) K ^XTMP("SAN",$J,"FIRSTM") "RTN","XBSAN",413,0) K ^XTMP("SAN",$J,"FIRSTF") "RTN","XBSAN",414,0) K ^XTMP("SAN",$J,"ADL1") "RTN","XBSAN",415,0) K ^XTMP("SAN",$J,"NOKADL") "RTN","XBSAN",416,0) K ^XTMP("SAN","FAILURE") "RTN","XBSAN",417,0) K ^XTMP("SAN",$J,"DLAST") "RTN","XBSAN",418,0) K ^XTMP("SAN",$J,"DFIRST") "RTN","XBSAN",419,0) K ^XTMP("SAN","PROCESS","DUZ") "RTN","XBSAN",420,0) K ^XTMP("SAN","DUZFAILURE") "RTN","XBSAN",421,0) D ^XBKVAR "RTN","XBSAN",422,0) S (XBC(1),XBC(2))=0,XBX=1 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSAN",423,0) .S XBNAME=$P($G(^VA(200,XBX,0)),U,1) "RTN","XBSAN",424,0) .S XBLAST=$P(XBNAME,",",1) S:'$L(XBLAST) XBLAST="MOUSE" "RTN","XBSAN",425,0) .S XBFIRST=$P(XBNAME,",",2) S:'$L(XBFIRST) XBFIRST="MICKEY"_+XBX "RTN","XBSAN",426,0) .S XBC(1)=XBC(1)+1,^XTMP("SAN",$J,"DLAST")=XBC(1),^XTMP("SAN",$J,"DLAST",XBC(1))=XBLAST "RTN","XBSAN",427,0) .S XBC(2)=XBC(2)+1,^XTMP("SAN",$J,"DFIRST")=XBC(2),^XTMP("SAN",$J,"DFIRST",XBC(2))=XBFIRST "RTN","XBSAN",428,0) D ^XBKVAR "RTN","XBSAN",429,0) F I=1:1:5 S XBC(I)=0 "RTN","XBSAN",430,0) S Y=0 F S Y=$O(^DPT(Y)) Q:+Y=0 D "RTN","XBSAN",431,0) .S XBVAL=$G(^DPT(Y,0)) "RTN","XBSAN",432,0) .S XBNAME=$P(XBVAL,U,1) "RTN","XBSAN",433,0) .S XBLAST=$P(XBNAME,",",1) "RTN","XBSAN",434,0) .S XBFIRST=$P(XBNAME,",",2) "RTN","XBSAN",435,0) .S XBSEX=$P(XBVAL,U,2) "RTN","XBSAN",436,0) .S XBADL1=$P($G(^DPT(Y,.11)),U,1) "RTN","XBSAN",437,0) .S XBNOKADL=$P($G(^DPT(Y,.33)),U,3) "RTN","XBSAN",438,0) SET .S XBC(1)=XBC(1)+1,^XTMP("SAN",$J,"LAST")=XBC(1),^XTMP("SAN",$J,"LAST",XBC(1))=XBLAST "RTN","XBSAN",439,0) .I $L(XBSEX) S:XBSEX="M" XBC(2)=XBC(2)+1,^XTMP("SAN",$J,"FIRSTM")=XBC(2),^XTMP("SAN",$J,"FIRSTM",XBC(2))=XBFIRST "RTN","XBSAN",440,0) .I $L(XBSEX) S:XBSEX="F" XBC(3)=XBC(3)+1,^XTMP("SAN",$J,"FIRSTF")=XBC(3),^XTMP("SAN",$J,"FIRSTF",XBC(3))=XBFIRST "RTN","XBSAN",441,0) .I $L(XBADL1) S XBC(5)=XBC(5)+1,^XTMP("SAN",$J,"ADL1")=XBC(5),^XTMP("SAN",$J,"ADL1",XBC(5))=XBADL1 "RTN","XBSAN",442,0) .I $L(XBNOKADL) S XBC(5)=XBC(5)+1,^XTMP("SAN",$J,"ADL1")=XBC(5),^XTMP("SAN",$J,"ADL1",XBC(5))=XBNOKADL "RTN","XBSAN",443,0) Q "RTN","XBSAN",444,0) R S X2=$R(X) I X2=0 G R "RTN","XBSAN",445,0) S X=X2 "RTN","XBSAN",446,0) Q "RTN","XBSAN",447,0) ; "RTN","XBSAN",448,0) DUZ ;SCRAMBLES USER NAMES "RTN","XBSAN",449,0) K ^XTMP("SAN","FAILURE","DUZ") "RTN","XBSAN",450,0) K ^XTMP("SAN","FAILURE","DUZA") "RTN","XBSAN",451,0) DUZA D ^XBFMK "RTN","XBSAN",452,0) S XBX=1 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSAN",453,0) .S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",454,0) .S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",455,0) .D DUZSSN "RTN","XBSAN",456,0) .;W !,$P(^VA(200,XBX,0),"^",1)," ",XBLAST," ",XBFIRST,$P($G(^VA(200,XBX,1)),"^",9)," ",DUZSSN "RTN","XBSAN",457,0) .I DUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST_";9///"_DUZSSN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZ",XBX)="" "RTN","XBSAN",458,0) .I 'DUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZ",XBX)="" "RTN","XBSAN",459,0) .S DA=XBX,DIE=200,DR=";1///"_$E(XBLAST,1,3)_";13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZINITIALS",XBX)="" "RTN","XBSAN",460,0) .S XBVANUM=1000000+XBX "RTN","XBSAN",461,0) .S XBDEANUM=2000000+XBX "RTN","XBSAN",462,0) .S DA=XBX,DIE=200,DR=";53.2///"_XBDEANUM_";53.3///"_XBVANUM D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZDEAVA",XBX)="" "RTN","XBSAN",463,0) .D ^XBFMK "RTN","XBSAN",464,0) S ^XTMP("SAN","PROCESS","DUZ")="FINISHED" "RTN","XBSAN",465,0) Q "RTN","XBSAN",466,0) DUZSSN ;CHANGES SSN FOR USER FILE "RTN","XBSAN",467,0) S DUZSSN=$P($G(^VA(200,XBX,1)),"^",9) "RTN","XBSAN",468,0) I DUZSSN D DUZSSNR S DUZSSN=XBSSN "RTN","XBSAN",469,0) Q "RTN","XBSAN",470,0) DUZSSNR ;FIND RANDOM SSN "RTN","XBSAN",471,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSAN",472,0) I $D(^VA(200,"SSN",XBSSN)) G DUZSSNR "RTN","XBSAN",473,0) Q "RTN","XBSAN",474,0) ALLSSN ;ADDS SSN TO EVERY PATIENT "RTN","XBSAN",475,0) D ^XBFMK "RTN","XBSAN",476,0) S XBX=0 F S XBX=$O(^DPT(XBX)) Q:+XBX=0 D "RTN","XBSAN",477,0) .Q:$L($P($G(^DPT(XBX,0)),"^",9)) "RTN","XBSAN",478,0) .D SSNR "RTN","XBSAN",479,0) .S DA=XBX,DIE=2,DR=".09///"_XBSSN D ^DIE K DIE,DA "RTN","XBSAN",480,0) .D ^XBFMK "RTN","XBSAN",481,0) S ^XTMP("SAN","PROCESS","SSN-ALL")="FINISHED" "RTN","XBSAN",482,0) Q "RTN","XBSAN",483,0) SSNR ;FIND RANDOM SSN "RTN","XBSAN",484,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSAN",485,0) I $D(^DPT("SSN",XBSSN)) G SSNR "RTN","XBSAN",486,0) Q "RTN","XBSAN",487,0) PHNR ;FIND RANDOM PHONE "RTN","XBSAN",488,0) F S XBPHN=$R(9999) Q:XBPHN>1000&(XBPHN<9999) "RTN","XBSAN",489,0) Q "RTN","XBSAN",490,0) ; "RTN","XBSAN",491,0) PATDEL ; "RTN","XBSAN",492,0) S DFN=0 F S DFN=$O(^DPT(DFN)) Q:DFN'=+DFN D "RTN","XBSAN",493,0) .I $P($G(^DPT(DFN,0)),U,10)]"" S DA=DFN,DIE=2,DR=".091///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL091",DFN)="" D ^XBFMK "RTN","XBSAN",494,0) .I $P($G(^DPT(DFN,.101)),U,1)]"" S DA=DFN,DIE=2,DR=".101///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL101",DFN)="" D ^XBFMK "RTN","XBSAN",495,0) .I $P($G(^DPT(DFN,.111)),U,1)]"" S DA=DFN,DIE=2,DR=".1181///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1181",DFN)="" D ^XBFMK "RTN","XBSAN",496,0) .I $P($G(^DPT(DFN,.111)),U,2)]"" S DA=DFN,DIE=2,DR=".1182///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1182",DFN)="" D ^XBFMK "RTN","XBSAN",497,0) .I $P($G(^DPT(DFN,.111)),U,3)]"" S DA=DFN,DIE=2,DR=".1183///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1183",DFN)="" D ^XBFMK "RTN","XBSAN",498,0) .I $P($G(^DPT(DFN,.111)),U,4)]"" S DA=DFN,DIE=2,DR=".1184///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1184",DFN)="" D ^XBFMK "RTN","XBSAN",499,0) .I $P($G(^DPT(DFN,.111)),U,5)]"" S DA=DFN,DIE=2,DR=".1185///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1185",DFN)="" D ^XBFMK "RTN","XBSAN",500,0) .I $P($G(^DPT(DFN,.111)),U,6)]"" S DA=DFN,DIE=2,DR=".1186///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1186",DFN)="" D ^XBFMK "RTN","XBSAN",501,0) .I $P($G(^DPT(DFN,.111)),U,7)]"" S DA=DFN,DIE=2,DR=".1187///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1187",DFN)="" D ^XBFMK "RTN","XBSAN",502,0) .I $P($G(^DPT(DFN,.12)),U,1)]"" S DA=DFN,DIE=2,DR=".121///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL121",DFN)="" D ^XBFMK "RTN","XBSAN",503,0) .I $P($G(^DPT(DFN,.12)),U,2)]"" S DA=DFN,DIE=2,DR=".122///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL122",DFN)="" D ^XBFMK "RTN","XBSAN",504,0) .I $P($G(^DPT(DFN,.12)),U,3)]"" S DA=DFN,DIE=2,DR=".123///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL123",DFN)="" D ^XBFMK "RTN","XBSAN",505,0) .I $P($G(^DPT(DFN,.12)),U,4)]"" S DA=DFN,DIE=2,DR=".124///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL124",DFN)="" D ^XBFMK "RTN","XBSAN",506,0) .I $P($G(^DPT(DFN,.12)),U,5)]"" S DA=DFN,DIE=2,DR=".125///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL125",DFN)="" D ^XBFMK "RTN","XBSAN",507,0) .I $P($G(^DPT(DFN,.12)),U,6)]"" S DA=DFN,DIE=2,DR=".126///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL126",DFN)="" D ^XBFMK "RTN","XBSAN",508,0) .I $P($G(^DPT(DFN,.12)),U,7)]"" S DA=DFN,DIE=2,DR=".127///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL127",DFN)="" D ^XBFMK "RTN","XBSAN",509,0) .I $P($G(^DPT(DFN,.121)),U,1)]"" S DA=DFN,DIE=2,DR=".1211///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1211",DFN)="" D ^XBFMK "RTN","XBSAN",510,0) .I $P($G(^DPT(DFN,.121)),U,2)]"" S DA=DFN,DIE=2,DR=".1212///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1212",DFN)="" D ^XBFMK "RTN","XBSAN",511,0) .I $P($G(^DPT(DFN,.121)),U,3)]"" S DA=DFN,DIE=2,DR=".1213///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1213",DFN)="" D ^XBFMK "RTN","XBSAN",512,0) .I $P($G(^DPT(DFN,.121)),U,4)]"" S DA=DFN,DIE=2,DR=".1214///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1214",DFN)="" D ^XBFMK "RTN","XBSAN",513,0) .I $P($G(^DPT(DFN,.121)),U,5)]"" S DA=DFN,DIE=2,DR=".1215///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1215",DFN)="" D ^XBFMK "RTN","XBSAN",514,0) .I $P($G(^DPT(DFN,.121)),U,6)]"" S DA=DFN,DIE=2,DR=".1216///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1216",DFN)="" D ^XBFMK "RTN","XBSAN",515,0) .I $P($G(^DPT(DFN,.121)),U,7)]"" S DA=DFN,DIE=2,DR=".1217///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1217",DFN)="" D ^XBFMK "RTN","XBSAN",516,0) .I $P($G(^DPT(DFN,.121)),U,8)]"" S DA=DFN,DIE=2,DR=".1218///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1218",DFN)="" D ^XBFMK "RTN","XBSAN",517,0) .I $P($G(^DPT(DFN,.121)),U,10)]"" S DA=DFN,DIE=2,DR=".1219///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1219",DFN)="" D ^XBFMK "RTN","XBSAN",518,0) .I $P($G(^DPT(DFN,.111)),U,1)]"" S DA=DFN,DIE=2,DR=".1181///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1181",DFN)="" D ^XBFMK "RTN","XBSAN",519,0) .I $P($G(^DPT(DFN,.13)),U,3)]"" S DA=DFN,DIE=2,DR=".133///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL133",DFN)="" D ^XBFMK "RTN","XBSAN",520,0) .I $P($G(^DPT(DFN,.13)),U,4)]"" S DA=DFN,DIE=2,DR=".134///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL134",DFN)="" D ^XBFMK "RTN","XBSAN",521,0) .I $P($G(^AUPNPAT(DFN,3)),U,2)]"" S DA=DFN,DIE="AUPNPAT(",DR=".32///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL32",DFN)="" D ^XBFMK "RTN","XBSAN",522,0) .I $P($G(^AUPNPAT(DFN,11)),U,18)]"" S DA=DFN,DIE="AUPNPAT(",DR="1118///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1118",DFN)="" D ^XBFMK "RTN","XBSAN",523,0) .I $P($G(^AUPNPAT(DFN,26)),U,2)]"" S DA=DFN,DIE="AUPNPAT(",DR="2602///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL2602",DFN)="" D ^XBFMK "RTN","XBSAN",524,0) .I $P($G(^AUPNPAT(DFN,26)),U,5)]"" S DA=DFN,DIE="AUPNPAT(",DR="2605///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL2605",DFN)="" D ^XBFMK "RTN","XBSAN",525,0) .I $P($G(^AUPNPAT(DFN,99999999)),U,1)]"" S DA=DFN,DIE="AUPNPAT(",DR="99999999///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL99999999",DFN)="" D ^XBFMK "RTN","XBSAN",526,0) .F X=12:1:15 K ^AUPNPAT(DFN,X) "RTN","XBSAN",527,0) .K ^AUPNPAT(DFN,42) "RTN","XBSAN",528,0) S ^XTMP("SAN","PROCESS","PATDELETEDATA")="FINISHED" "RTN","XBSAN",529,0) Q "RTN","XBSAN",530,0) POSDEL ; "RTN","XBSAN",531,0) S XBX=0 F S XBX=$O(^ABSPC(XBX)) Q:+XBX=0 D "RTN","XBSAN",532,0) .S DA=XBX,DIK="^ABSPC(" D ^DIK,^XBFMK "RTN","XBSAN",533,0) S XBX=0 F S XBX=$O(^ABSPR(XBX)) Q:+XBX=0 D "RTN","XBSAN",534,0) .S DA=XBX,DIK="^ABSPR(" D ^DIK,^XBFMK "RTN","XBSAN",535,0) S DA=1,DIE="ABSP(9002313.56,",DR=".01///OUTPATIENT SITE;.02///12345;.03///456789;.05///123456789;.06///987654" "RTN","XBSAN",536,0) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","POSDELETE",DA)="" D ^XBFMK "RTN","XBSAN",537,0) K ^ABSP(9002313.56,1,"ADDR") "RTN","XBSAN",538,0) K ^ABSP(9002313.56,1,"INSURER-ASSIGNED #") "RTN","XBSAN",539,0) K ^ABSP(9002313.56,1,"OPSITE") "RTN","XBSAN",540,0) S ^XTMP("SAN","PROCESS","POSDEL")="FINNISHED" "RTN","XBSAN",541,0) Q "RTN","XBSAN",542,0) AR ; "RTN","XBSAN",543,0) D ^XBFMK S U="^",XBA=0 F S XBA=$O(^BARBL(XBA)) Q:+XBA=0 D "RTN","XBSAN",544,0) .S XBB=0 F S XBB=$O(^BARBL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",545,0) ..I $P($G(^BARBL(XBA,XBB,0)),U,12)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="12///@" D ^DIE,^XBFMK "RTN","XBSAN",546,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,5)]"" D "RTN","XBSAN",547,0) ...D SSNR S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="105///"_XBSSN D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR105",DA)="" D ^XBFMK "RTN","XBSAN",548,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,6)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="106///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR106",DA)="" D ^XBFMK "RTN","XBSAN",549,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,7)]"" D "RTN","XBSAN",550,0) ...D SSNR S XBTEN=$E(XBSSN,1,5),DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="107///"_XBTEN D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR107E",DA)="" D ^XBFMK "RTN","XBSAN",551,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,16)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="116///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR116",DA)="" D ^XBFMK "RTN","XBSAN",552,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,3)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="203///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR203",DA)="" D ^XBFMK "RTN","XBSAN",553,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,4)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="204///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR204",DA)="" D ^XBFMK "RTN","XBSAN",554,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,16)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="216///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR216",DA)="" D ^XBFMK "RTN","XBSAN",555,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,17)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="217///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR217",DA)="" D ^XBFMK "RTN","XBSAN",556,0) ..S DUZ(2)=XBA K ^BARBL(DUZ(2),XBB,10),^BARBL(DUZ(2),XBB,5),^BARBL(DUZ(2),XBB,6) "RTN","XBSAN",557,0) ..I $P($G(^BARBL(XBA,XBB,7)),U,1)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="701///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR701",DA)="" D ^XBFMK "RTN","XBSAN",558,0) ..I $P($G(^BARBL(XBA,XBB,7)),U,2)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="702///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR702",DA)="" D ^XBFMK "RTN","XBSAN",559,0) S ^XTMP("SAN","PROCESS","AR-BILL")="FINISHED" "RTN","XBSAN",560,0) S XBA=0 F S XBA=$O(^BARCOL(XBA)) Q:+XBA=0 D "RTN","XBSAN",561,0) .S XBB=0 F S XBB=$O(^BARCOL(XBA,XBB)) Q:+XBB=0 K ^BARTR(XBA,XBB,10) "RTN","XBSAN",562,0) S ^XTMP("SAN","PROCESS","AR-TRAN")="FINISHED" "RTN","XBSAN",563,0) S XBA=0 F S XBA=$O(^BARCOL(XBA)) Q:+XBA=0 D "RTN","XBSAN",564,0) .S XBB=0 F S XBB=$O(^BARCOL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",565,0) ..S XBC=0 F S XBC=$O(^BARCOL(XBA,XBB,"1",XBC)) Q:+XBC=0 D "RTN","XBSAN",566,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,12)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="12///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL12",DA)="" D ^XBFMK "RTN","XBSAN",567,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,13)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="13///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL13",DA)="" D ^XBFMK "RTN","XBSAN",568,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,14)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="14///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL14",DA)="" D ^XBFMK "RTN","XBSAN",569,0) ...K ^BARCOL(XBA,XBB,"1",XBC,5) "RTN","XBSAN",570,0) S ^XTMP("SAN","PROCESS","AR-COLL")="FINISHED" "RTN","XBSAN",571,0) S XBA=0 F S XBA=$O(^BAREDI("I",XBA)) Q:+XBA=0 D "RTN","XBSAN",572,0) .S XBB=0 F S XBB=$O(^BAREDI("I",XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",573,0) ..S DIK="^BAREDI(""I"",XBA,",DA=XBB,DUZ(2)=XBA=XBA D ^DIK,^XBFMK "RTN","XBSAN",574,0) S ^XTMP("SAN","PROCESS","AR-EDIIMP")="FINISHED" "RTN","XBSAN",575,0) S XBA=0 F S XBA=$O(^BAREDI("C",XBA)) Q:+XBA=0 D "RTN","XBSAN",576,0) .S XBB=0 F S XBB=$O(^BAREDI("C",XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",577,0) ..I $P($G(^BAREDI("C",XBA,XBB,0)),U,3)]"" S DIE="^BAREDI(""C"",XBA,XBB,",DA=XBB,DUZ(2)=XBA,DR=".03///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","BAREDI03",DA)="" D ^XBFMK "RTN","XBSAN",578,0) S ^XTMP("SAN","PROCESS","AR-EDIC")="FINISHED" "RTN","XBSAN",579,0) S XBA=0 F S XBB=$O(^BAR835(XBA)) Q:+XBA=0 D "RTN","XBSAN",580,0) .I $P($G(^BAR835(XBA,1)),U,1)]"" S DIE="^BAR835,",DA=XBA,DR=".11///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR11",DA)="" D ^XBFMK "RTN","XBSAN",581,0) S ^XTMP("SAN","PROCESS","AR-EDI835")="FINISHED" "RTN","XBSAN",582,0) Q "RTN","XBSAN",583,0) TPB ;3RD PARTY BILLING "RTN","XBSAN",584,0) D ^XBFMK "RTN","XBSAN",585,0) S U="^",XBA=0 F S XBA=$O(^ABMDCLM(XBA)) Q:+XBA=0 D "RTN","XBSAN",586,0) .S XBB=0 F S XBB=$O(^ABMDCLM(XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",587,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,8)),U,8)) D "RTN","XBSAN",588,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",589,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",590,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".88///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM88",DA)="" D ^XBFMK "RTN","XBSAN",591,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,8)),U,11)) D "RTN","XBSAN",592,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".885///"_(100000+DA) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM885",DA)="" D ^XBFMK "RTN","XBSAN",593,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,9)),U,12)) D "RTN","XBSAN",594,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",595,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",596,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".912///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM912",DA)="" D ^XBFMK "RTN","XBSAN",597,0) S ^XTMP("SAN","PROCESS","3P-CLAIM")="FINISHED" "RTN","XBSAN",598,0) S XBA=0 F S XBA=$O(^ABMDBILL(XBA)) Q:+XBA=0 D "RTN","XBSAN",599,0) .S XBB=0 F S XBB=$O(^ABMDBILL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSAN",600,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,8)),U,8)) D "RTN","XBSAN",601,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",602,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",603,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".88///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM88",DA)="" D ^XBFMK "RTN","XBSAN",604,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,8)),U,11)) D "RTN","XBSAN",605,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".885///"_(200000+DA) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM885",DA)="" D ^XBFMK "RTN","XBSAN",606,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,9)),U,12)) D "RTN","XBSAN",607,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",608,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",609,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".912///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM912",DA)="" D ^XBFMK "RTN","XBSAN",610,0) S ^XTMP("SAN","PROCESS","3P-BILL")="FINISHED" "RTN","XBSAN",611,0) Q "RTN","XBSAN",612,0) LAB ; "RTN","XBSAN",613,0) S X=0 F S X=$O(^LR(X)) Q:X'=+X D "RTN","XBSAN",614,0) .S Y=0 F S Y=$O(^LR(X,"CH",Y)) Q:Y'=+Y D "RTN","XBSAN",615,0) ..I $D(^LR(X,"CH",Y,1)) S Z=$P(^LR(X,"CH",Y,1,0),U,1,2) K ^LR(X,"CH",Y,1) S ^LR(X,"CH",Y,1,0)=Z "RTN","XBSAN",616,0) .S Y=0 F S Y=$O(^LR(X,"MI",Y)) Q:Y'=+Y D "RTN","XBSAN",617,0) ..I $D(^LR(X,"MI",Y,4)) S Z=$P(^LR(X,"MI",Y,4,0),U,1,2) K ^LR(X,"MI",Y,4) S ^LR(X,"MI",Y,4,0)=Z "RTN","XBSAN",618,0) ..I $D(^LR(X,"MI",Y,19)) S Z=$P(^LR(X,"MI",Y,19,0),U,1,2) K ^LR(X,"MI",Y,19) S ^LR(X,"MI",Y,19,0)=Z "RTN","XBSAN",619,0) ..I $D(^LR(X,"MI",Y,20)) S Z=$P(^LR(X,"MI",Y,20,0),U,1,2) K ^LR(X,"MI",Y,20) S ^LR(X,"MI",Y,20,0)=Z "RTN","XBSAN",620,0) ..I $D(^LR(X,"MI",Y,21)) S Z=$P(^LR(X,"MI",Y,21,0),U,1,2) K ^LR(X,"MI",Y,21) S ^LR(X,"MI",Y,21,0)=Z "RTN","XBSAN",621,0) ..I $D(^LR(X,"MI",Y,22)) S Z=$P(^LR(X,"MI",Y,22,0),U,1,2) K ^LR(X,"MI",Y,22) S ^LR(X,"MI",Y,22,0)=Z "RTN","XBSAN",622,0) ..I $D(^LR(X,"MI",Y,23)) S Z=$P(^LR(X,"MI",Y,23,0),U,1,2) K ^LR(X,"MI",Y,23) S ^LR(X,"MI",Y,23,0)=Z "RTN","XBSAN",623,0) ..K ^LR(X,"MI",Y,99) "RTN","XBSAN",624,0) S X=0 F S X=$O(^LRO(69,X)) Q:X'=+X D "RTN","XBSAN",625,0) .I $D(^LRO(69,X,1,"AL")) K ^LRO(69,X,1,"AL") "RTN","XBSAN",626,0) .I $D(^LRO(69,X,1,"AP")) K ^LRO(69,X,1,"AP") "RTN","XBSAN",627,0) .I $D(^LRO(69,X,1,"AR")) K ^LRO(69,X,1,"AR") "RTN","XBSAN",628,0) S X=$P(^BLRTXLOG(0),U,1,2) K ^BLRTXLOG S ^BLRTXLOG(0)=X "RTN","XBSAN",629,0) S ^XTMP("SAN","PROCESS","LAB")="FINISHED" "RTN","XBSAN",630,0) D ^LROC "RTN","XBSAN",631,0) Q "RTN","XBSAN",632,0) LISTE ; "RTN","XBSAN",633,0) W !,"Listed below are the nodes and number of records that did not" "RTN","XBSAN",634,0) W !,"update properly. At the end of the sanitization, the records" "RTN","XBSAN",635,0) W !,"for Patient Name failures are rerun. PATNAME2 nodes represent" "RTN","XBSAN",636,0) W !,"Patient Names that should be manually changed with fileman." "RTN","XBSAN",637,0) W !,"XTMP(""SAN"",""PROCESS"") nodes:" "RTN","XBSAN",638,0) W !,"XTMP(""SAN"",""FAILURE"") nodes:" "RTN","XBSAN",639,0) S X="" F S X=$O(^XTMP("SAN","FAILURE",X)) Q:X="" D "RTN","XBSAN",640,0) .S (Y,Z)=0 F S Y=$O(^XTMP("SAN","FAILURE",X,Y)) Q:+Y=0 D "RTN","XBSAN",641,0) ..S Z=Z+1 "RTN","XBSAN",642,0) .W !,"Failure: "_X_" "_Z "RTN","XBSAN",643,0) W !,"FINISHED" Q "RTN","XBSAN",644,0) LISTD ; "RTN","XBSAN",645,0) W !,"Listed below are the processes completed." "RTN","XBSAN",646,0) W !,"XTMP(""SAN"",""PROCESS"") nodes:" "RTN","XBSAN",647,0) S X="" F S X=$O(^XTMP("SAN","PROCESS",X)) Q:X="" D "RTN","XBSAN",648,0) .W !,"Process: "_X "RTN","XBSAN",649,0) W !,"FINISHED" Q "RTN","XBSAN",650,0) MCDE ; "RTN","XBSAN",651,0) S DFN=0 F S DFN=$O(^AUPNMCD("B",DFN)) Q:+DFN=0 D "RTN","XBSAN",652,0) .S XBMDFN=0 F S XBMDFN=$O(^AUPNMCD("B",DFN,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSAN",653,0) ..S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSAN",654,0) ..S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSAN",655,0) ..S DIE="^AUPNMCD(",DA=XBMDFN,DR=".05///@;.12///@;.13///@" D ^DIE "RTN","XBSAN",656,0) ..I $D(Y) S ^XTMP("SAN","FAILURE","PATMCDEA",DA)="" "RTN","XBSAN",657,0) ..D ^XBFMK "RTN","XBSAN",658,0) ..S XBDNAME=XBDLAST_","_XBDFIRST "RTN","XBSAN",659,0) ..D SSNR "RTN","XBSAN",660,0) ..S DIE="^AUPNMCD(",DA=XBMDFN,DR=".03///"_XBSSN_";.14///"_XBDNAME_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3)_";.05///"_$P(^DPT(DFN,0),U,1) D ^DIE "RTN","XBSAN",661,0) ..I $D(Y) S ^XTMP("SAN","FAILURE","PATMCDEB",DA)="" "RTN","XBSAN",662,0) ..D ^XBFMK "RTN","XBSAN",663,0) S ^XTMP("SAN","PROCESS","MCD")="FINISHED" "RTN","XBSAN",664,0) Q "RTN","XBSAN",665,0) MMDEL ;DELETES MAILMAN MESSAGES "RTN","XBSAN",666,0) K ^XMB(3.9) "RTN","XBSAN",667,0) S ^XMB(3.9,0)="MESSAGE^3.9s^0^0" "RTN","XBSAN",668,0) Q "RTN","XBSAN",669,0) AUDEL ;DELETES AUDIT FILE "RTN","XBSAN",670,0) K ^DIA "RTN","XBSAN",671,0) S ^DIA(0)="AUDIT^1.1|" "RTN","XBSAN",672,0) Q "RTN","XBSAN",673,0) NCDEL ;DELETES NAME COMPONENTS FILE "RTN","XBSAN",674,0) K ^VA(20) "RTN","XBSAN",675,0) S ^VA(20,0)="NAME COMPONENTS^20IA^^" "RTN","XBSAN",676,0) Q "RTN","XBSAN",677,0) STU ;SETS STUDENT NAMES "RTN","XBSAN",678,0) K ^XTMP("SAN","FAILURE","STU") "RTN","XBSAN",679,0) K ^XTMP("SAN","FAILURE","STUA") "RTN","XBSAN",680,0) STUA D ^XBFMK "RTN","XBSAN",681,0) S XBX=50 F S XBX=$O(^VA(200,XBX)) Q:+XBX>76 D "RTN","XBSAN",682,0) .S XBLAST=$E("ABCDEFGHIJKLMNOPQRSTUVWXYZ",XBX-50,XBX-50)_"STUDENT" "RTN","XBSAN",683,0) .S XBFIRST="USER" "RTN","XBSAN",684,0) .S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STU",XBX)="" "RTN","XBSAN",685,0) .S DA=XBX,DIE=200,DR="1///"_$E(XBLAST,1,2)_"U;13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUINITIALS",XBX)="" "RTN","XBSAN",686,0) .S DA=XBX,DIE=200,DR="201///`29" D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUMENU",XBX)="" "RTN","XBSAN",687,0) .D ^XBFMK "RTN","XBSAN",688,0) W !,"FINISHED" "RTN","XBSAN",689,0) Q "RTN","XBSAN",690,0) FJADD1 ; "RTN","XBSAN",691,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATADDRESS",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.11)),U,1)]"" D "RTN","XBSAN",692,0) .S XBADDR=DFN_" SMITH STREET" "RTN","XBSAN",693,0) .S DIE="^DPT(",DR=".111///"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",694,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSFJ",DFN)="" "RTN","XBSAN",695,0) .D ^XBFMK "RTN","XBSAN",696,0) .S $P(^DPT(DFN,.11),U,2)="" ;addr 2nd line "RTN","XBSAN",697,0) .S $P(^DPT(DFN,.11),U,3)="" ;addr 3rd line "RTN","XBSAN",698,0) Q "RTN","XBSAN",699,0) A2213 ; "RTN","XBSAN",700,0) I $P($G(^DPT(DFN,.21)),U,3)]"" D "RTN","XBSAN",701,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",702,0) .S DIE="^DPT(",DR=".213///"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",703,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL11",DFN)="" "RTN","XBSAN",704,0) .D ^XBFMK "RTN","XBSAN",705,0) I $P($G(^DPT(DFN,.33)),U,3)]"" D "RTN","XBSAN",706,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSAN",707,0) .S DIE="^DPT(",DR=".333.//"_XBADDR,DA=DFN D ^DIE "RTN","XBSAN",708,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL111",DFN)="" "RTN","XBSAN",709,0) .D ^XBFMK "RTN","XBSAN",710,0) Q "RTN","XBSAN",711,0) A2219 ;nok phone "RTN","XBSAN",712,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATPHONE",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.21)),U,9)]"" D "RTN","XBSAN",713,0) .S $P(^DPT(DFN,.21),U,9)="555-888-"_$E(DFN_"9999",1,4) "RTN","XBSAN",714,0) Q "RTN","XBSAN",715,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATPHONE1",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.33)),U,9)]"" D "RTN","XBSAN",716,0) .S $P(^DPT(DFN,.33),U,9)="555-888-"_$E(DFN_"9999",1,4) "RTN","XBSAN",717,0) Q "RTN","XBSANP") 0^150^B842421475 "RTN","XBSANP",1,0) XBSANP ;IHS/ITSC/LAB/FJE;SANITIZE RPMS DATABASE; [ 01/29/2004 11:10 AM ] "RTN","XBSANP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSANP",3,0) W !,"This routine sanitizes and deletes RPMS data. To use you must type: D START^XBSAN",!! "RTN","XBSANP",4,0) Q "RTN","XBSANP",5,0) START ; "RTN","XBSANP",6,0) S (XBDUZ,XBDEL,XBPAT,XBPHR,XBBH,XBCHR,XBPOS,XB3PB,XBAR,XBLAB,XBMMDEL,XBAUDEL,XBNCDEL)=0 "RTN","XBSANP",7,0) K ^XTMP("SAN") "RTN","XBSANP",8,0) S ^XTMP("SAN","LASTDFN")=0 "RTN","XBSANP",9,0) ;W !,"This routine will first sanitize AND randomize the NEW PERSON file in the RPMS database." "RTN","XBSANP",10,0) ;S DIR(0)="Y",DIR("A")="Do you want to convert the new person data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",11,0) ;S:Y=1 XBDUZ=1 "RTN","XBSANP",12,0) W !,"This routine will then REMOVE/DELETE UNNEEDED PATIENT DATA in the RPMS database." "RTN","XBSANP",13,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",14,0) S:Y=1 XBDEL=1 "RTN","XBSANP",15,0) W !!,"This routine will then sanitize the PATIENT FILES of a RPMS database." "RTN","XBSANP",16,0) S DIR(0)="Y",DIR("A")="Do you want to convert the patient data",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",17,0) S:Y=1 XBPAT=1 "RTN","XBSANP",18,0) W !!,"This routine will then sanitize the POLICY HOLDER FILE of a RPMS database." "RTN","XBSANP",19,0) S DIR(0)="Y",DIR("A")="Do you want to convert the POLICY HOLDER data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",20,0) S:Y=1 XBPHR=1 "RTN","XBSANP",21,0) W !!,"This routine will then delete SENSITIVE CHR DATA from a RPMS database." "RTN","XBSANP",22,0) S DIR(0)="Y",DIR("A")="Do you want to delete this CHR patient data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",23,0) S:Y=1 XBCHR=1 "RTN","XBSANP",24,0) W !!,"This routine will then delete SENSITIVE BH VERSION 3.0 COMPLIANT DATA from a RPMS database." "RTN","XBSANP",25,0) S DIR(0)="Y",DIR("A")="Do you want to delete this CHR patient data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",26,0) S:Y=1 XBBH=1 "RTN","XBSANP",27,0) W !,"This routine will then REMOVE/DELETE UNNEEDED POS DATA in the RPMS database." "RTN","XBSANP",28,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",29,0) S:Y=1 XBPOS=1 "RTN","XBSANP",30,0) W !,"This routine will then REMOVE/DELETE UNNEEDED 3PB DATA in the RPMS database." "RTN","XBSANP",31,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",32,0) S:Y=1 XB3PB=1 "RTN","XBSANP",33,0) W !,"This routine will then REMOVE/DELETE UNNEEDED AR DATA in the RPMS database." "RTN","XBSANP",34,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",35,0) S:Y=1 XBAR=1 "RTN","XBSANP",36,0) W !,"This routine will then REMOVE/DELETE UNNEEDED LAB DATA in the RPMS database." "RTN","XBSANP",37,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",38,0) S:Y=1 XBLAB=1 "RTN","XBSANP",39,0) W !,"This routine will then REMOVE/DELETE MAILMAN MESSAGES in the RPMS database." "RTN","XBSANP",40,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",41,0) S:Y=1 XBMMDEL=1 "RTN","XBSANP",42,0) W !,"This routine will then REMOVE/DELETE AUDIT DATA in the RPMS database." "RTN","XBSANP",43,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",44,0) S:Y=1 XBAUDEL=1 "RTN","XBSANP",45,0) W !,"This routine will then REMOVE/DELETE NAME COMPONENTS in the RPMS database." "RTN","XBSANP",46,0) S DIR(0)="Y",DIR("A")="Do you want this data deleted?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",47,0) S:Y=1 XBNCDEL=1 "RTN","XBSANP",48,0) W !,"All failed fileman update data can be found in: ^XTMP(""SAN"",""FAILURE"", GLOBAL" "RTN","XBSANP",49,0) W !,"?? display usually means that there was a fileman update failure" "RTN","XBSANP",50,0) W !,"If a hard error like an UNDEFINED occurs during the Patient scrambling," "RTN","XBSANP",51,0) W !," you can restart at the next patient by typing: RESTART^XBSAN " "RTN","XBSANP",52,0) W !,"This routine does not purge HL7, or ARMS data." "RTN","XBSANP",53,0) W !,"When finished...don't forget to manually address the above and RENAME Institutions",!! "RTN","XBSANP",54,0) W !!,"This routine is about to scramble the RPMS database." "RTN","XBSANP",55,0) S DIR(0)="Y",DIR("A")="Last chance: Do you want your RPMS data SANITIZED?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANP",56,0) Q:Y'=1 "RTN","XBSANP",57,0) D ^XBKVAR "RTN","XBSANP",58,0) W !,"Collecting random names" D CLEAN "RTN","XBSANP",59,0) I XBDUZ W !,"SCRAMBLING FILE 200" D DUZ "RTN","XBSANP",60,0) I XBDEL W !,"DELETING PAT INFO" D PATDEL "RTN","XBSANP",61,0) RESTART ;WILL RESTART PAT SCRAMBLE IF HARD ERROR OCCURS "RTN","XBSANP",62,0) I $G(^XTMP("SAN","LASTDFN"))>0 S ^XTMP("SAN","FAILURE","PATDFN",^XTMP("SAN","LASTDFN"))="" "RTN","XBSANP",63,0) I XBPAT W !,"SCRAMBLING PAT FILE" D PAT "RTN","XBSANP",64,0) I XBPHR W !,"SCRAMBLING POLICY FILE" D PHR "RTN","XBSANP",65,0) I XBCHR W !,"SCRAMBLING CHR FILE" D CHR "RTN","XBSANP",66,0) I XBBH W !,"DELETING BH INFO" D BH "RTN","XBSANP",67,0) I XBPOS W !,"DELETING POS INFO" D POSDEL "RTN","XBSANP",68,0) I XB3PB W !,"SCRAMBLING 3PB FILE" D TPB "RTN","XBSANP",69,0) I XBAR W !,"SCRAMBLING AR FILE" D AR "RTN","XBSANP",70,0) I XBLAB W !,"SCRAMBLING LAB FILES" D LAB "RTN","XBSANP",71,0) I XBMMDEL W !,"DELETING MAILMAN MESSAGES" D MMDEL "RTN","XBSANP",72,0) I XBAUDEL W !,"DELETING AUDIT DATA" D AUDEL "RTN","XBSANP",73,0) I XBNCDEL W !,"DELETING NAME COMPONENTS" D NCDEL "RTN","XBSANP",74,0) D PAT2 "RTN","XBSANP",75,0) S ^XTMP("SAN","PROCESS","XBSAN")="FINISHED" "RTN","XBSANP",76,0) W !,"FINISHED" "RTN","XBSANP",77,0) D LISTE "RTN","XBSANP",78,0) D EOJ "RTN","XBSANP",79,0) Q "RTN","XBSANP",80,0) ; "RTN","XBSANP",81,0) PAT D ^XBKVAR "RTN","XBSANP",82,0) S XBCHART=100000 "RTN","XBSANP",83,0) S DFN=+$G(^XTMP("SAN","LASTDFN")) I DFN W !,"RESTARTING PATIENT SCRAMBLE AFTER "_DFN,! "RTN","XBSANP",84,0) F S DFN=$O(^DPT(DFN)) Q:DFN'=+DFN D PROCPAT "RTN","XBSANP",85,0) S ^XTMP("SAN","PROCESS","PAT")="FINISHED" "RTN","XBSANP",86,0) Q "RTN","XBSANP",87,0) ; "RTN","XBSANP",88,0) PAT2 D ^XBKVAR "RTN","XBSANP",89,0) S XBCHART=100000 "RTN","XBSANP",90,0) W !,"RETRYING FAILED PATIENTS",! "RTN","XBSANP",91,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATNAME",DFN)) Q:DFN'=+DFN D "RTN","XBSANP",92,0) .S Y=DFN D ^AUPNPAT "RTN","XBSANP",93,0) .S XBSCR=$S(AUPNSEX="M":3,1:2) "RTN","XBSANP",94,0) .D FNAME "RTN","XBSANP",95,0) .D LNAME "RTN","XBSANP",96,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSANP",97,0) .S DA=DFN,DIE="^DPT(",DR=".01///"_XBNAME D ^DIE "RTN","XBSANP",98,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNAME2",DFN)="" W !,$P(^DPT(DFN,0),U,1)," ",XBNAME "RTN","XBSANP",99,0) .D ^XBFMK "RTN","XBSANP",100,0) S ^XTMP("SAN","PROCESS","PAT")="FINISHED" "RTN","XBSANP",101,0) Q "RTN","XBSANP",102,0) CHR ; "RTN","XBSANP",103,0) S X=0 F S X=$O(^BCHR(X)) Q:X'=+X K ^BCHR(X,51),^BCHR(X,61),^BCHR(X,71) "RTN","XBSANP",104,0) S ^XTMP("SAN","PROCESS","CHR")="FINISHED" "RTN","XBSANP",105,0) Q "RTN","XBSANP",106,0) BH ;version 3.0 compliant only "RTN","XBSANP",107,0) S X=0 F S X=$O(^AMHREC(X)) Q:X'=+X K ^AMHREC(X,31),^AMHREC(X,81),^AMHREC(X,21) "RTN","XBSANP",108,0) S X=0 F S X=$O(^AMHPTXP(X)) Q:X'=+X K ^AMHPTXP(X,18) "RTN","XBSANP",109,0) S ^XTMP("SAN","PROCESS","BH")="FINISHED" "RTN","XBSANP",110,0) Q "RTN","XBSANP",111,0) PHR ; "RTN","XBSANP",112,0) ;policy holders not pointing to a patient "RTN","XBSANP",113,0) S XBP=0 F S XBP=$O(^AUPN3PPH(XBP)) Q:XBP'=+XBP D "RTN","XBSANP",114,0) .Q:$P(^AUPN3PPH(XBP,0),U,2) ;already converted "RTN","XBSANP",115,0) .S XBS=$P(^AUPN3PPH(XBP,0),U,8) I XBS="" S XBS="M" "RTN","XBSANP",116,0) .S XBSCR=$S(XBS="M":3,1:2) "RTN","XBSANP",117,0) .D FNAME "RTN","XBSANP",118,0) .D LNAME "RTN","XBSANP",119,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSANP",120,0) .D PHNR "RTN","XBSANP",121,0) .S XBPHN="555-777-"_XBPHN "RTN","XBSANP",122,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".01///"_XBNAME_";.14///"_XBPHN D ^DIE "RTN","XBSANP",123,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYPHONE",DFN)="" "RTN","XBSANP",124,0) .D ^XBFMK "RTN","XBSANP",125,0) .D SSNR "RTN","XBSANP",126,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".04///"_XBSSN D ^DIE "RTN","XBSANP",127,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYSSN",DFN)="" "RTN","XBSANP",128,0) .D ^XBFMK "RTN","XBSANP",129,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",130,0) .S $P(^AUPN3PPH(XBP,0),U,9)=XBADDR "RTN","XBSANP",131,0) .S XBD=$P(^AUPN3PPH(XBP,0),U,19) I XBD]"" S XBD=$$FMADD^XLFDT(XBD,-33) "RTN","XBSANP",132,0) .S DA=XBP,DIE="^AUPN3PPH(",DR=".19///"_XBD D ^DIE "RTN","XBSANP",133,0) .I $D(Y) S ^XTMP("SAN","FAILURE","POLICYDOB",DA)="" "RTN","XBSANP",134,0) .D ^XBFMK "RTN","XBSANP",135,0) S ^XTMP("SAN","PROCESS","POLICY")="FINISHED" "RTN","XBSANP",136,0) Q "RTN","XBSANP",137,0) PROCPAT ; "RTN","XBSANP",138,0) S ^XTMP("SAN","LASTDFN")=DFN "RTN","XBSANP",139,0) I '(DFN#5000) W !,"."_DFN_"." "RTN","XBSANP",140,0) D ^XBFMK "RTN","XBSANP",141,0) S Y=DFN D ^AUPNPAT "RTN","XBSANP",142,0) D F201 "RTN","XBSANP",143,0) D F203 ;subtract 33 days from dob "RTN","XBSANP",144,0) D F209 "RTN","XBSANP",145,0) D F2111 "RTN","XBSANP",146,0) D F2131 "RTN","XBSANP",147,0) D F2132 "RTN","XBSANP",148,0) D F2211 "RTN","XBSANP",149,0) D F2212 "RTN","XBSANP",150,0) D F2213 "RTN","XBSANP",151,0) D F2219 "RTN","XBSANP",152,0) D F22401 "RTN","XBSANP",153,0) D F22402 "RTN","XBSANP",154,0) D F22403 "RTN","XBSANP",155,0) D OTHNAME "RTN","XBSANP",156,0) D TEN ;tribal enrollment number "RTN","XBSANP",157,0) D BRTH "RTN","XBSANP",158,0) D DTH "RTN","XBSANP",159,0) D PN "RTN","XBSANP",160,0) D EMPL "RTN","XBSANP",161,0) D NKR "RTN","XBSANP",162,0) D ECR "RTN","XBSANP",163,0) D XBCHART "RTN","XBSANP",164,0) D INSURE "RTN","XBSANP",165,0) D POLICY "RTN","XBSANP",166,0) Q "RTN","XBSANP",167,0) EOJ ; "RTN","XBSANP",168,0) D EN^XBVK("XB") "RTN","XBSANP",169,0) K DFN,XBH,OTDFN,XBB,AUPNSEX,X,X2,XB3PB,XBAR,XBAUDEL "RTN","XBSANP",170,0) K DA,DIE,DIK,DIR,DR,DUZSSN,I,XBA,XBADDR,XBADL1 "RTN","XBSANP",171,0) K XBBH,XBC,XBCHART,XBCHR,XBD,XBDAD,XBDEANUM,XBDEL,XBDFIRST,XBDLAST,XBDNAME "RTN","XBSANP",172,0) K XBDOB,XBDUZ,XBFIRST,XBFNAME,XBH,XBLAB,XBLNAME,XBMDFN,XBMMDEL,XBMOM "RTN","XBSANP",173,0) K XBNAME,XBNCDEL,XBNOK,XBNOKADL,XBP,XBPAT,XBPHN,XBPHR,XBPOS,XBS "RTN","XBSANP",174,0) K XBSCR,XBSEX,XBSSN,XBTEN,XBVAL,XBVANUM,XBX,Y,Z "RTN","XBSANP",175,0) W !,"If all data appears correct and you have chaecked failures, kill the ^XTMP(""SAN"") global",!! "RTN","XBSANP",176,0) Q "RTN","XBSANP",177,0) NKR ; "RTN","XBSANP",178,0) I $P($G(^AUPNPAT(DFN,28)),U,2)]"" S DA=DFN,DIE="^AUPNPAT(",DR="2802///`"_$O(^AUTTRLSH("B","MOTHER",0)) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATNKR",DFN)="" "RTN","XBSANP",179,0) D ^XBFMK "RTN","XBSANP",180,0) Q "RTN","XBSANP",181,0) ECR ; "RTN","XBSANP",182,0) I $P($G(^AUPNPAT(DFN,31)),U,2)]"" S DA=DFN,DIE="^AUPNPAT(",DR="3102///`"_$O(^AUTTRLSH("B","MOTHER",0)) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATECR",DFN)="" "RTN","XBSANP",183,0) D ^XBFMK "RTN","XBSANP",184,0) Q "RTN","XBSANP",185,0) EMPL ;employer .19 "RTN","XBSANP",186,0) I $P($G(^AUPNPAT(DFN,0)),U,19)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".19///FIRST AMERICAN BANK" D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATEMP",DFN)="" "RTN","XBSANP",187,0) D ^XBFMK "RTN","XBSANP",188,0) Q "RTN","XBSANP",189,0) PN ; "RTN","XBSANP",190,0) I $P($G(^AUPNPAT(DFN,0)),U,31)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".31///"_$P(^DPT(DFN,0),U) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATPN",DFN)="" "RTN","XBSANP",191,0) D ^XBFMK "RTN","XBSANP",192,0) Q "RTN","XBSANP",193,0) TEN ; "RTN","XBSANP",194,0) S XBTEN="TN - "_DFN "RTN","XBSANP",195,0) I $P($G(^AUPNPAT(DFN,0)),U,7)]"" S DA=DFN,DIE="^AUPNPAT(",DR=".07///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATTEN",DFN)="" "RTN","XBSANP",196,0) D ^XBFMK "RTN","XBSANP",197,0) Q "RTN","XBSANP",198,0) BRTH ; "RTN","XBSANP",199,0) I $P($G(^AUPNPAT(DFN,11)),U,5)]"" S XBTEN=$E(DFN_"000000",1,7),DA=DFN,DIE="^AUPNPAT(",DR="1105///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATBIRTH",DFN)="" "RTN","XBSANP",200,0) D ^XBFMK "RTN","XBSANP",201,0) Q "RTN","XBSANP",202,0) DTH ; "RTN","XBSANP",203,0) I $P($G(^AUPNPAT(DFN,11)),U,16)]"" S XBTEN=$E("D"_DFN_"00000",1,7),DA=DFN,DIE="^AUPNPAT(",DR="1105///"_XBTEN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","PATDEATH",DFN)="" "RTN","XBSANP",204,0) D ^XBFMK "RTN","XBSANP",205,0) Q "RTN","XBSANP",206,0) F201 ; "RTN","XBSANP",207,0) S XBSCR=$S(AUPNSEX="M":3,1:2) "RTN","XBSANP",208,0) D FNAME "RTN","XBSANP",209,0) D LNAME "RTN","XBSANP",210,0) S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSANP",211,0) S DA=DFN,DIE="^DPT(",DR=".01///"_XBNAME D ^DIE "RTN","XBSANP",212,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATNAME",DFN)="" "RTN","XBSANP",213,0) D ^XBFMK "RTN","XBSANP",214,0) Q "RTN","XBSANP",215,0) FNAME ; "RTN","XBSANP",216,0) I XBSCR=3 S X=^XTMP("SAN",$J,"FIRSTM") D R S XBFNAME=^XTMP("SAN",$J,"FIRSTM",X) Q "RTN","XBSANP",217,0) S X=^XTMP("SAN",$J,"FIRSTF") D R S XBFNAME=^XTMP("SAN",$J,"FIRSTF",X) "RTN","XBSANP",218,0) Q "RTN","XBSANP",219,0) LNAME ; "RTN","XBSANP",220,0) S X=^XTMP("SAN",$J,"LAST") D R S XBLNAME=^XTMP("SAN",$J,"LAST",X) "RTN","XBSANP",221,0) Q "RTN","XBSANP",222,0) F203 ;dob "RTN","XBSANP",223,0) S XBDOB=$P(^DPT(DFN,0),U,3) "RTN","XBSANP",224,0) I XBDOB="" Q "RTN","XBSANP",225,0) S XBDOB=$$FMADD^XLFDT(XBDOB,-33) "RTN","XBSANP",226,0) S DIE="^DPT(",DA=DFN,DR=".03///"_XBDOB D ^DIE "RTN","XBSANP",227,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATDOB",DFN)="" "RTN","XBSANP",228,0) D ^XBFMK "RTN","XBSANP",229,0) Q "RTN","XBSANP",230,0) F2211 ;nok/emergency contact name "RTN","XBSANP",231,0) S XBSCR=2 D FNAME S XBNOK=XBLNAME_","_XBFNAME "RTN","XBSANP",232,0) I $P($G(^DPT(DFN,.21)),U,1)]"" D "RTN","XBSANP",233,0) .D ^XBFMK "RTN","XBSANP",234,0) .S DIE="^DPT(",DR=".211///"_XBNOK,DA=DFN D ^DIE "RTN","XBSANP",235,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNOK",DFN)="" "RTN","XBSANP",236,0) .D ^XBFMK "RTN","XBSANP",237,0) I $P($G(^DPT(DFN,.33)),U,1)]"" D "RTN","XBSANP",238,0) .S DIE="^DPT(",DR=".331///"_XBNOK,DA=DFN D ^DIE "RTN","XBSANP",239,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATECN",DFN)="" "RTN","XBSANP",240,0) .D ^XBFMK "RTN","XBSANP",241,0) Q "RTN","XBSANP",242,0) F2212 ; "RTN","XBSANP",243,0) D ^XBFMK "RTN","XBSANP",244,0) I $P($G(^DPT(DFN,.21)),U,2)]"" D "RTN","XBSANP",245,0) .S DA=DFN,DIE="^DPT(",DR=".212///MOTHER" D ^DIE "RTN","XBSANP",246,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATNOKMOTHER",DFN)="" "RTN","XBSANP",247,0) .D ^XBFMK "RTN","XBSANP",248,0) I $P($G(^DPT(DFN,.33)),U,2)]"" D "RTN","XBSANP",249,0) .S DA=DFN,DIE="^DPT(",DR=".332///"_"MOTHER" D ^DIE "RTN","XBSANP",250,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATECNMOTHER",DFN)="" "RTN","XBSANP",251,0) .D ^XBFMK "RTN","XBSANP",252,0) Q "RTN","XBSANP",253,0) F22401 ;father's name "RTN","XBSANP",254,0) I $P($G(^DPT(DFN,.24)),U,1)="" Q "RTN","XBSANP",255,0) S XBSCR=3 D FNAME S XBDAD=XBLNAME_","_XBFNAME "RTN","XBSANP",256,0) S DIE="^DPT(",DR=".2401///"_XBDAD,DA=DFN D ^DIE "RTN","XBSANP",257,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATFATHER",DFN)="" "RTN","XBSANP",258,0) D ^XBFMK "RTN","XBSANP",259,0) Q "RTN","XBSANP",260,0) F22402 ;mother's name "RTN","XBSANP",261,0) S XBSCR=2 D FNAME S XBMOM=XBLNAME_","_XBFNAME "RTN","XBSANP",262,0) I $P($G(^DPT(DFN,.24)),U,2)="" Q "RTN","XBSANP",263,0) S DIE="^DPT(",DR=".2402///"_XBMOM,DA=DFN D ^DIE "RTN","XBSANP",264,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMOTHER",DFN)="" "RTN","XBSANP",265,0) D ^XBFMK "RTN","XBSANP",266,0) Q "RTN","XBSANP",267,0) F22403 ;mother's maiden name "RTN","XBSANP",268,0) D LNAME "RTN","XBSANP",269,0) S XBMMN=XBLNAME_","_$P(XBMOM,",",2) "RTN","XBSANP",270,0) I $P($G(^DPT(DFN,.24)),U,3)="" Q "RTN","XBSANP",271,0) S DIE="^DPT(",DR=".2403///"_XBMMN,DA=DFN D ^DIE "RTN","XBSANP",272,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMOTHMAIDNAM",DFN)="" "RTN","XBSANP",273,0) D ^XBFMK "RTN","XBSANP",274,0) Q "RTN","XBSANP",275,0) OTHNAME ; "RTN","XBSANP",276,0) S OTDFN=0 F S OTDFN=$O(^DPT(DFN,.01,OTDFN)) Q:OTDFN'=+OTDFN D "RTN","XBSANP",277,0) .D LNAME "RTN","XBSANP",278,0) .S XBNAME=XBLNAME_","_XBFNAME "RTN","XBSANP",279,0) .S DA=OTDFN,DIE="^DPT("_DFN_",.01,",DA(1)=DFN,DR=".01///"_XBNAME D ^DIE "RTN","XBSANP",280,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATOTHRNAME",DFN)="" "RTN","XBSANP",281,0) .D ^XBFMK "RTN","XBSANP",282,0) Q "RTN","XBSANP",283,0) F2111 ; "RTN","XBSANP",284,0) I $P($G(^DPT(DFN,.11)),U,1)]"" D "RTN","XBSANP",285,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",286,0) .S DIE="^DPT(",DR=".111///"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",287,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESS",DFN)="" "RTN","XBSANP",288,0) .D ^XBFMK "RTN","XBSANP",289,0) .S $P(^DPT(DFN,.11),U,2)="" ;addr 2nd line "RTN","XBSANP",290,0) .S $P(^DPT(DFN,.11),U,3)="" ;addr 3rd line "RTN","XBSANP",291,0) Q "RTN","XBSANP",292,0) F2213 ; "RTN","XBSANP",293,0) I $P($G(^DPT(DFN,.21)),U,3)]"" D "RTN","XBSANP",294,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",295,0) .S DIE="^DPT(",DR=".213///"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",296,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL11",DFN)="" "RTN","XBSANP",297,0) .D ^XBFMK "RTN","XBSANP",298,0) I $P($G(^DPT(DFN,.33)),U,3)]"" D "RTN","XBSANP",299,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",300,0) .S DIE="^DPT(",DR=".333.//"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",301,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL111",DFN)="" "RTN","XBSANP",302,0) .D ^XBFMK "RTN","XBSANP",303,0) Q "RTN","XBSANP",304,0) POLICY ; "RTN","XBSANP",305,0) ;loop through policy holder "RTN","XBSANP",306,0) ;if has patient pointer use patient name and address and "RTN","XBSANP",307,0) D ^XBFMK "RTN","XBSANP",308,0) S XBP=$O(^AUPN3PPH("C",DFN,0)) "RTN","XBSANP",309,0) I 'XBP K XBP Q "RTN","XBSANP",310,0) S XBTEN=$P($G(^DPT(DFN,.11)),U,1) "RTN","XBSANP",311,0) S DA=XBP,DIE="^AUPN3PPH(",DR=".01///"_XBNAME_";.04///"_XBSSN_";.09///"_XBTEN_";.11///@;.13///@;.14///@;.19///"_XBDOB D ^DIE "RTN","XBSANP",312,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATPOLICY",DA)="" "RTN","XBSANP",313,0) D ^XBFMK "RTN","XBSANP",314,0) Q "RTN","XBSANP",315,0) INSURE ; "RTN","XBSANP",316,0) D MCR,PI,MCD,RR "RTN","XBSANP",317,0) Q "RTN","XBSANP",318,0) MCR ; "RTN","XBSANP",319,0) ;MEDICARE "RTN","XBSANP",320,0) Q:'$D(^AUPNMCR(DFN)) "RTN","XBSANP",321,0) S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",322,0) S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",323,0) S XBDLAST=XBDLAST_","_XBDFIRST "RTN","XBSANP",324,0) D SSNR "RTN","XBSANP",325,0) S DIE="^AUPNMCR(",DA=DFN,DR=".03///"_XBSSN_";.14///"_XBDLAST_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3) D ^DIE "RTN","XBSANP",326,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATMEDICARE",DFN)="" "RTN","XBSANP",327,0) D ^XBFMK "RTN","XBSANP",328,0) Q "RTN","XBSANP",329,0) PI ; "RTN","XBSANP",330,0) Q:'$D(^AUPNPRVT(DFN)) "RTN","XBSANP",331,0) Q:'$D(^AUPNPRVT(DFN,11)) "RTN","XBSANP",332,0) S XBMDFN=0 F S XBMDFN=$O(^AUPNPRVT(DFN,11,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSANP",333,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,2)=XBSSN "RTN","XBSANP",334,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,4)=XBNAME "RTN","XBSANP",335,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,12)="" "RTN","XBSANP",336,0) .S $P(^AUPNPRVT(DFN,11,XBMDFN,0),U,14)="" "RTN","XBSANP",337,0) Q "RTN","XBSANP",338,0) ; "RTN","XBSANP",339,0) RR ; "RTN","XBSANP",340,0) Q:'$D(^AUPNRRE(DFN)) "RTN","XBSANP",341,0) S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",342,0) S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",343,0) S XBDLAST=XBDLAST_","_XBDFIRST "RTN","XBSANP",344,0) D SSNR "RTN","XBSANP",345,0) S DIE="^AUPNRRE(",DA=DFN,DR=".04///"_XBSSN_";.14///"_XBDLAST_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3) D ^DIE "RTN","XBSANP",346,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATRAILROAD",DFN)="" "RTN","XBSANP",347,0) D ^XBFMK "RTN","XBSANP",348,0) Q "RTN","XBSANP",349,0) MCD ; "RTN","XBSANP",350,0) S XBMDFN=0 F S XBMDFN=$O(^AUPNMCD("B",DFN,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSANP",351,0) .S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",352,0) .S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",353,0) .S DIE="^AUPNMCD(",DA=XBMDFN,DR=".05///@;.12///@;.13///@" D ^DIE "RTN","XBSANP",354,0) .D ^XBFMK "RTN","XBSANP",355,0) .S XBDNAME=XBDLAST_","_XBDFIRST "RTN","XBSANP",356,0) .D SSNR "RTN","XBSANP",357,0) .S DIE="^AUPNMCD(",DA=XBMDFN,DR=".03///"_XBSSN_";.14///"_XBDNAME_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3)_";.05///"_$P(^DPT(DFN,0),U,1) D ^DIE "RTN","XBSANP",358,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATMEDICAID",DA)="" "RTN","XBSANP",359,0) .D ^XBFMK "RTN","XBSANP",360,0) Q "RTN","XBSANP",361,0) XBCHART ; "RTN","XBSANP",362,0) S XBH=0 F S XBH=$O(^AUPNPAT(DFN,41,XBH)) Q:XBH'=+XBH S XBCHART=XBCHART+1 D "RTN","XBSANP",363,0) .S DA=XBH,DIE="^AUPNPAT("_DFN_",41,",DA(1)=DFN,DR=".02///"_XBCHART D ^DIE "RTN","XBSANP",364,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATCHART",DFN)="" "RTN","XBSANP",365,0) .D ^XBFMK "RTN","XBSANP",366,0) Q "RTN","XBSANP",367,0) F209 ; "RTN","XBSANP",368,0) I $P($G(^DPT(DFN,0)),U,9)="" Q "RTN","XBSANP",369,0) D SSNR "RTN","XBSANP",370,0) S DIE="^DPT(",DA=DFN,DR=".09///"_XBSSN D ^DIE "RTN","XBSANP",371,0) I $D(Y) S DA=DFN,DIE="^DPT(",DR=".09///@" D ^DIE "RTN","XBSANP",372,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATSSN",DFN)="" "RTN","XBSANP",373,0) D ^XBFMK "RTN","XBSANP",374,0) Q "RTN","XBSANP",375,0) F2219 ;nok phone "RTN","XBSANP",376,0) I $P($G(^DPT(DFN,.21)),U,9)]"" D PHNR D ;S $P(^DPT(DFN,.21),U,9)="555-888-"_XBPHN "RTN","XBSANP",377,0) .S XBPHN="555-888-"_XBPHN "RTN","XBSANP",378,0) .S DIE="^DPT(",DA=DFN,DR=".219///"_XBPHN D ^DIE "RTN","XBSANP",379,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE",DFN)="" "RTN","XBSANP",380,0) .D ^XBFMK "RTN","XBSANP",381,0) I $P($G(^DPT(DFN,.33)),U,9)]"" D PHNR D ;S $P(^DPT(DFN,.33),U,9)="555-888-"_XBPHN "RTN","XBSANP",382,0) .S XBPHN="555-888-"_XBPHN "RTN","XBSANP",383,0) .S DIE="^DPT(",DA=DFN,DR=".339///"_XBPHN D ^DIE "RTN","XBSANP",384,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE1",DFN)="" "RTN","XBSANP",385,0) .D ^XBFMK "RTN","XBSANP",386,0) Q "RTN","XBSANP",387,0) F2131 ; "RTN","XBSANP",388,0) I $P($G(^DPT(DFN,.13)),U,1)]"" D PHNR D "RTN","XBSANP",389,0) .S XBPHN="555-555-"_XBPHN "RTN","XBSANP",390,0) .S DIE="^DPT(",DA=DFN,DR=".131///"_XBPHN D ^DIE "RTN","XBSANP",391,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE2",DFN)="" "RTN","XBSANP",392,0) .D ^XBFMK "RTN","XBSANP",393,0) Q "RTN","XBSANP",394,0) F2132 ; "RTN","XBSANP",395,0) Q:$P($G(^DPT(DFN,.13)),U,2)="" ;no office phone "RTN","XBSANP",396,0) D PHNR S XBPHN="555-999-"_XBPHN "RTN","XBSANP",397,0) S DIE="^DPT(",DA=DFN,DR=".132///"_XBPHN D ^DIE "RTN","XBSANP",398,0) I $D(Y) S ^XTMP("SAN","FAILURE","PATPHONE3",DFN)="" "RTN","XBSANP",399,0) D ^XBFMK "RTN","XBSANP",400,0) Q "RTN","XBSANP",401,0) ; "RTN","XBSANP",402,0) DELP ;delete patients with no visits "RTN","XBSANP",403,0) ;S XBCNT=0,XBP=0 F S XBP=$O(^DPT(XBP)) Q:XBP'=+XBP D "RTN","XBSANP",404,0) ;.Q:$D(^AUPNVSIT("AC",XBP)) "RTN","XBSANP",405,0) ;.S DA=XBP,DIK="^DPT(" D ^DIK "RTN","XBSANP",406,0) ;.S DA=XBP,DIK="^AUPNPAT(" D ^DIK "RTN","XBSANP",407,0) ;.W DA,":" S XBCNT=XBCNT+1 "RTN","XBSANP",408,0) ;.Q "RTN","XBSANP",409,0) ;W !,XBCNT "RTN","XBSANP",410,0) ;Q "RTN","XBSANP",411,0) CLEAN ; "RTN","XBSANP",412,0) K ^XTMP("SAN",$J,"FIRSTM") "RTN","XBSANP",413,0) K ^XTMP("SAN",$J,"FIRSTF") "RTN","XBSANP",414,0) K ^XTMP("SAN",$J,"ADL1") "RTN","XBSANP",415,0) K ^XTMP("SAN",$J,"NOKADL") "RTN","XBSANP",416,0) K ^XTMP("SAN","FAILURE") "RTN","XBSANP",417,0) K ^XTMP("SAN",$J,"DLAST") "RTN","XBSANP",418,0) K ^XTMP("SAN",$J,"DFIRST") "RTN","XBSANP",419,0) K ^XTMP("SAN","PROCESS","DUZ") "RTN","XBSANP",420,0) K ^XTMP("SAN","DUZFAILURE") "RTN","XBSANP",421,0) D ^XBKVAR "RTN","XBSANP",422,0) S (XBC(1),XBC(2))=0,XBX=1 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANP",423,0) .S XBNAME=$P($G(^VA(200,XBX,0)),U,1) "RTN","XBSANP",424,0) .S XBLAST=$P(XBNAME,",",1) S:'$L(XBLAST) XBLAST="MOUSE" "RTN","XBSANP",425,0) .S XBFIRST=$P(XBNAME,",",2) S:'$L(XBFIRST) XBFIRST="MICKEY"_+XBX "RTN","XBSANP",426,0) .S XBC(1)=XBC(1)+1,^XTMP("SAN",$J,"DLAST")=XBC(1),^XTMP("SAN",$J,"DLAST",XBC(1))=XBLAST "RTN","XBSANP",427,0) .S XBC(2)=XBC(2)+1,^XTMP("SAN",$J,"DFIRST")=XBC(2),^XTMP("SAN",$J,"DFIRST",XBC(2))=XBFIRST "RTN","XBSANP",428,0) D ^XBKVAR "RTN","XBSANP",429,0) F I=1:1:5 S XBC(I)=0 "RTN","XBSANP",430,0) S Y=0 F S Y=$O(^DPT(Y)) Q:+Y=0 D "RTN","XBSANP",431,0) .S XBVAL=$G(^DPT(Y,0)) "RTN","XBSANP",432,0) .S XBNAME=$P(XBVAL,U,1) "RTN","XBSANP",433,0) .S XBLAST=$P(XBNAME,",",1) "RTN","XBSANP",434,0) .S XBFIRST=$P(XBNAME,",",2) "RTN","XBSANP",435,0) .S XBSEX=$P(XBVAL,U,2) "RTN","XBSANP",436,0) .S XBADL1=$P($G(^DPT(Y,.11)),U,1) "RTN","XBSANP",437,0) .S XBNOKADL=$P($G(^DPT(Y,.33)),U,3) "RTN","XBSANP",438,0) SET .S XBC(1)=XBC(1)+1,^XTMP("SAN",$J,"LAST")=XBC(1),^XTMP("SAN",$J,"LAST",XBC(1))=XBLAST "RTN","XBSANP",439,0) .I $L(XBSEX) S:XBSEX="M" XBC(2)=XBC(2)+1,^XTMP("SAN",$J,"FIRSTM")=XBC(2),^XTMP("SAN",$J,"FIRSTM",XBC(2))=XBFIRST "RTN","XBSANP",440,0) .I $L(XBSEX) S:XBSEX="F" XBC(3)=XBC(3)+1,^XTMP("SAN",$J,"FIRSTF")=XBC(3),^XTMP("SAN",$J,"FIRSTF",XBC(3))=XBFIRST "RTN","XBSANP",441,0) .I $L(XBADL1) S XBC(5)=XBC(5)+1,^XTMP("SAN",$J,"ADL1")=XBC(5),^XTMP("SAN",$J,"ADL1",XBC(5))=XBADL1 "RTN","XBSANP",442,0) .I $L(XBNOKADL) S XBC(5)=XBC(5)+1,^XTMP("SAN",$J,"ADL1")=XBC(5),^XTMP("SAN",$J,"ADL1",XBC(5))=XBNOKADL "RTN","XBSANP",443,0) Q "RTN","XBSANP",444,0) R S X2=$R(X) I X2=0 G R "RTN","XBSANP",445,0) S X=X2 "RTN","XBSANP",446,0) Q "RTN","XBSANP",447,0) ; "RTN","XBSANP",448,0) DUZ ;SCRAMBLES USER NAMES "RTN","XBSANP",449,0) K ^XTMP("SAN","FAILURE","DUZ") "RTN","XBSANP",450,0) K ^XTMP("SAN","FAILURE","DUZA") "RTN","XBSANP",451,0) DUZA D ^XBFMK "RTN","XBSANP",452,0) S XBX=1 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANP",453,0) .S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",454,0) .S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",455,0) .D DUZSSN "RTN","XBSANP",456,0) .;W !,$P(^VA(200,XBX,0),"^",1)," ",XBLAST," ",XBFIRST,$P($G(^VA(200,XBX,1)),"^",9)," ",DUZSSN "RTN","XBSANP",457,0) .I DUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST_";9///"_DUZSSN D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZ",XBX)="" "RTN","XBSANP",458,0) .I 'DUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZ",XBX)="" "RTN","XBSANP",459,0) .S DA=XBX,DIE=200,DR=";1///"_$E(XBLAST,1,3)_";13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZINITIALS",XBX)="" "RTN","XBSANP",460,0) .S XBVANUM=1000000+XBX "RTN","XBSANP",461,0) .S XBDEANUM=2000000+XBX "RTN","XBSANP",462,0) .S DA=XBX,DIE=200,DR=";53.2///"_XBDEANUM_";53.3///"_XBVANUM D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","DUZDEAVA",XBX)="" "RTN","XBSANP",463,0) .D ^XBFMK "RTN","XBSANP",464,0) S ^XTMP("SAN","PROCESS","DUZ")="FINISHED" "RTN","XBSANP",465,0) Q "RTN","XBSANP",466,0) DUZSSN ;CHANGES SSN FOR USER FILE "RTN","XBSANP",467,0) S DUZSSN=$P($G(^VA(200,XBX,1)),"^",9) "RTN","XBSANP",468,0) I DUZSSN D DUZSSNR S DUZSSN=XBSSN "RTN","XBSANP",469,0) Q "RTN","XBSANP",470,0) DUZSSNR ;FIND RANDOM SSN "RTN","XBSANP",471,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSANP",472,0) I $D(^VA(200,"SSN",XBSSN)) G DUZSSNR "RTN","XBSANP",473,0) Q "RTN","XBSANP",474,0) ALLSSN ;ADDS SSN TO EVERY PATIENT "RTN","XBSANP",475,0) D ^XBFMK "RTN","XBSANP",476,0) S XBX=0 F S XBX=$O(^DPT(XBX)) Q:+XBX=0 D "RTN","XBSANP",477,0) .Q:$L($P($G(^DPT(XBX,0)),"^",9)) "RTN","XBSANP",478,0) .D SSNR "RTN","XBSANP",479,0) .S DA=XBX,DIE=2,DR=".09///"_XBSSN D ^DIE K DIE,DA "RTN","XBSANP",480,0) .D ^XBFMK "RTN","XBSANP",481,0) S ^XTMP("SAN","PROCESS","SSN-ALL")="FINISHED" "RTN","XBSANP",482,0) Q "RTN","XBSANP",483,0) SSNR ;FIND RANDOM SSN "RTN","XBSANP",484,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSANP",485,0) I $D(^DPT("SSN",XBSSN)) G SSNR "RTN","XBSANP",486,0) I XBSSN>698999999&(XBSSN<729000001) G SSNR "RTN","XBSANP",487,0) Q "RTN","XBSANP",488,0) PHNR ;FIND RANDOM PHONE "RTN","XBSANP",489,0) F S XBPHN=$R(9999) Q:XBPHN>1000&(XBPHN<9999) "RTN","XBSANP",490,0) Q "RTN","XBSANP",491,0) ; "RTN","XBSANP",492,0) PATDEL ; "RTN","XBSANP",493,0) S DFN=0 F S DFN=$O(^DPT(DFN)) Q:DFN'=+DFN D "RTN","XBSANP",494,0) .I $P($G(^DPT(DFN,0)),U,10)]"" S DA=DFN,DIE=2,DR=".091///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL091",DFN)="" D ^XBFMK "RTN","XBSANP",495,0) .I $P($G(^DPT(DFN,.101)),U,1)]"" S DA=DFN,DIE=2,DR=".101///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL101",DFN)="" D ^XBFMK "RTN","XBSANP",496,0) .I $P($G(^DPT(DFN,.111)),U,1)]"" S DA=DFN,DIE=2,DR=".1181///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1181",DFN)="" D ^XBFMK "RTN","XBSANP",497,0) .I $P($G(^DPT(DFN,.111)),U,2)]"" S DA=DFN,DIE=2,DR=".1182///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1182",DFN)="" D ^XBFMK "RTN","XBSANP",498,0) .I $P($G(^DPT(DFN,.111)),U,3)]"" S DA=DFN,DIE=2,DR=".1183///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1183",DFN)="" D ^XBFMK "RTN","XBSANP",499,0) .I $P($G(^DPT(DFN,.111)),U,4)]"" S DA=DFN,DIE=2,DR=".1184///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1184",DFN)="" D ^XBFMK "RTN","XBSANP",500,0) .I $P($G(^DPT(DFN,.111)),U,5)]"" S DA=DFN,DIE=2,DR=".1185///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1185",DFN)="" D ^XBFMK "RTN","XBSANP",501,0) .I $P($G(^DPT(DFN,.111)),U,6)]"" S DA=DFN,DIE=2,DR=".1186///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1186",DFN)="" D ^XBFMK "RTN","XBSANP",502,0) .I $P($G(^DPT(DFN,.111)),U,7)]"" S DA=DFN,DIE=2,DR=".1187///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1187",DFN)="" D ^XBFMK "RTN","XBSANP",503,0) .I $P($G(^DPT(DFN,.12)),U,1)]"" S DA=DFN,DIE=2,DR=".121///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL121",DFN)="" D ^XBFMK "RTN","XBSANP",504,0) .I $P($G(^DPT(DFN,.12)),U,2)]"" S DA=DFN,DIE=2,DR=".122///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL122",DFN)="" D ^XBFMK "RTN","XBSANP",505,0) .I $P($G(^DPT(DFN,.12)),U,3)]"" S DA=DFN,DIE=2,DR=".123///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL123",DFN)="" D ^XBFMK "RTN","XBSANP",506,0) .I $P($G(^DPT(DFN,.12)),U,4)]"" S DA=DFN,DIE=2,DR=".124///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL124",DFN)="" D ^XBFMK "RTN","XBSANP",507,0) .I $P($G(^DPT(DFN,.12)),U,5)]"" S DA=DFN,DIE=2,DR=".125///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL125",DFN)="" D ^XBFMK "RTN","XBSANP",508,0) .I $P($G(^DPT(DFN,.12)),U,6)]"" S DA=DFN,DIE=2,DR=".126///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL126",DFN)="" D ^XBFMK "RTN","XBSANP",509,0) .I $P($G(^DPT(DFN,.12)),U,7)]"" S DA=DFN,DIE=2,DR=".127///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL127",DFN)="" D ^XBFMK "RTN","XBSANP",510,0) .I $P($G(^DPT(DFN,.121)),U,1)]"" S DA=DFN,DIE=2,DR=".1211///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1211",DFN)="" D ^XBFMK "RTN","XBSANP",511,0) .I $P($G(^DPT(DFN,.121)),U,2)]"" S DA=DFN,DIE=2,DR=".1212///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1212",DFN)="" D ^XBFMK "RTN","XBSANP",512,0) .I $P($G(^DPT(DFN,.121)),U,3)]"" S DA=DFN,DIE=2,DR=".1213///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1213",DFN)="" D ^XBFMK "RTN","XBSANP",513,0) .I $P($G(^DPT(DFN,.121)),U,4)]"" S DA=DFN,DIE=2,DR=".1214///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1214",DFN)="" D ^XBFMK "RTN","XBSANP",514,0) .I $P($G(^DPT(DFN,.121)),U,5)]"" S DA=DFN,DIE=2,DR=".1215///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PAT1215",DFN)="" D ^XBFMK "RTN","XBSANP",515,0) .I $P($G(^DPT(DFN,.121)),U,6)]"" S DA=DFN,DIE=2,DR=".1216///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1216",DFN)="" D ^XBFMK "RTN","XBSANP",516,0) .I $P($G(^DPT(DFN,.121)),U,7)]"" S DA=DFN,DIE=2,DR=".1217///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1217",DFN)="" D ^XBFMK "RTN","XBSANP",517,0) .I $P($G(^DPT(DFN,.121)),U,8)]"" S DA=DFN,DIE=2,DR=".1218///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1218",DFN)="" D ^XBFMK "RTN","XBSANP",518,0) .I $P($G(^DPT(DFN,.121)),U,10)]"" S DA=DFN,DIE=2,DR=".1219///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1219",DFN)="" D ^XBFMK "RTN","XBSANP",519,0) .I $P($G(^DPT(DFN,.111)),U,1)]"" S DA=DFN,DIE=2,DR=".1181///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1181",DFN)="" D ^XBFMK "RTN","XBSANP",520,0) .I $P($G(^DPT(DFN,.13)),U,3)]"" S DA=DFN,DIE=2,DR=".133///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL133",DFN)="" D ^XBFMK "RTN","XBSANP",521,0) .I $P($G(^DPT(DFN,.13)),U,4)]"" S DA=DFN,DIE=2,DR=".134///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL134",DFN)="" D ^XBFMK "RTN","XBSANP",522,0) .I $P($G(^AUPNPAT(DFN,3)),U,2)]"" S DA=DFN,DIE="AUPNPAT(",DR=".32///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL32",DFN)="" D ^XBFMK "RTN","XBSANP",523,0) .I $P($G(^AUPNPAT(DFN,11)),U,18)]"" S DA=DFN,DIE="AUPNPAT(",DR="1118///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL1118",DFN)="" D ^XBFMK "RTN","XBSANP",524,0) .I $P($G(^AUPNPAT(DFN,26)),U,2)]"" S DA=DFN,DIE="AUPNPAT(",DR="2602///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL2602",DFN)="" D ^XBFMK "RTN","XBSANP",525,0) .I $P($G(^AUPNPAT(DFN,26)),U,5)]"" S DA=DFN,DIE="AUPNPAT(",DR="2605///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL2605",DFN)="" D ^XBFMK "RTN","XBSANP",526,0) .I $P($G(^AUPNPAT(DFN,99999999)),U,1)]"" S DA=DFN,DIE="AUPNPAT(",DR="99999999///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","PATDEL99999999",DFN)="" D ^XBFMK "RTN","XBSANP",527,0) .F X=12:1:15 K ^AUPNPAT(DFN,X) "RTN","XBSANP",528,0) .K ^AUPNPAT(DFN,42) "RTN","XBSANP",529,0) S ^XTMP("SAN","PROCESS","PATDELETEDATA")="FINISHED" "RTN","XBSANP",530,0) Q "RTN","XBSANP",531,0) POSDEL ; "RTN","XBSANP",532,0) S XBX=0 F S XBX=$O(^ABSPC(XBX)) Q:+XBX=0 D "RTN","XBSANP",533,0) .S DA=XBX,DIK="^ABSPC(" D ^DIK,^XBFMK "RTN","XBSANP",534,0) S XBX=0 F S XBX=$O(^ABSPR(XBX)) Q:+XBX=0 D "RTN","XBSANP",535,0) .S DA=XBX,DIK="^ABSPR(" D ^DIK,^XBFMK "RTN","XBSANP",536,0) S DA=1,DIE="ABSP(9002313.56,",DR=".01///OUTPATIENT SITE;.02///12345;.03///456789;.05///123456789;.06///987654" "RTN","XBSANP",537,0) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","POSDELETE",DA)="" D ^XBFMK "RTN","XBSANP",538,0) K ^ABSP(9002313.56,1,"ADDR") "RTN","XBSANP",539,0) K ^ABSP(9002313.56,1,"INSURER-ASSIGNED #") "RTN","XBSANP",540,0) K ^ABSP(9002313.56,1,"OPSITE") "RTN","XBSANP",541,0) S ^XTMP("SAN","PROCESS","POSDEL")="FINNISHED" "RTN","XBSANP",542,0) Q "RTN","XBSANP",543,0) AR ; "RTN","XBSANP",544,0) D ^XBFMK S U="^",XBA=0 F S XBA=$O(^BARBL(XBA)) Q:+XBA=0 D "RTN","XBSANP",545,0) .S XBB=0 F S XBB=$O(^BARBL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",546,0) ..I $P($G(^BARBL(XBA,XBB,0)),U,12)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="12///@" D ^DIE,^XBFMK "RTN","XBSANP",547,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,5)]"" D "RTN","XBSANP",548,0) ...D SSNR S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="105///"_XBSSN D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR105",DA)="" D ^XBFMK "RTN","XBSANP",549,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,6)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="106///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR106",DA)="" D ^XBFMK "RTN","XBSANP",550,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,7)]"" D "RTN","XBSANP",551,0) ...D SSNR S XBTEN=$E(XBSSN,1,5),DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="107///"_XBTEN D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR107E",DA)="" D ^XBFMK "RTN","XBSANP",552,0) ..I $P($G(^BARBL(XBA,XBB,1)),U,16)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="116///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR116",DA)="" D ^XBFMK "RTN","XBSANP",553,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,3)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="203///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR203",DA)="" D ^XBFMK "RTN","XBSANP",554,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,4)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="204///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR204",DA)="" D ^XBFMK "RTN","XBSANP",555,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,16)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="216///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR216",DA)="" D ^XBFMK "RTN","XBSANP",556,0) ..I $P($G(^BARBL(XBA,XBB,2)),U,17)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="217///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR217",DA)="" D ^XBFMK "RTN","XBSANP",557,0) ..S DUZ(2)=XBA K ^BARBL(DUZ(2),XBB,10),^BARBL(DUZ(2),XBB,5),^BARBL(DUZ(2),XBB,6) "RTN","XBSANP",558,0) ..I $P($G(^BARBL(XBA,XBB,7)),U,1)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="701///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR701",DA)="" D ^XBFMK "RTN","XBSANP",559,0) ..I $P($G(^BARBL(XBA,XBB,7)),U,2)]"" S DA=XBB,DIE="90050.01",DUZ(2)=XBA,DR="702///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR702",DA)="" D ^XBFMK "RTN","XBSANP",560,0) S ^XTMP("SAN","PROCESS","AR-BILL")="FINISHED" "RTN","XBSANP",561,0) S XBA=0 F S XBA=$O(^BARCOL(XBA)) Q:+XBA=0 D "RTN","XBSANP",562,0) .S XBB=0 F S XBB=$O(^BARCOL(XBA,XBB)) Q:+XBB=0 K ^BARTR(XBA,XBB,10) "RTN","XBSANP",563,0) S ^XTMP("SAN","PROCESS","AR-TRAN")="FINISHED" "RTN","XBSANP",564,0) S XBA=0 F S XBA=$O(^BARCOL(XBA)) Q:+XBA=0 D "RTN","XBSANP",565,0) .S XBB=0 F S XBB=$O(^BARCOL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",566,0) ..S XBC=0 F S XBC=$O(^BARCOL(XBA,XBB,"1",XBC)) Q:+XBC=0 D "RTN","XBSANP",567,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,12)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="12///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL12",DA)="" D ^XBFMK "RTN","XBSANP",568,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,13)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="13///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL13",DA)="" D ^XBFMK "RTN","XBSANP",569,0) ...I $P($G(^BARCOL(XBA,XBB,1,XBC,0)),U,14)]"" S DIE="^BARCOL(XBA,XBB,1,",DA=XBC,DA(1)=XBB,DUZ(2)=XBA,DR="14///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ARCOL14",DA)="" D ^XBFMK "RTN","XBSANP",570,0) ...K ^BARCOL(XBA,XBB,"1",XBC,5) "RTN","XBSANP",571,0) S ^XTMP("SAN","PROCESS","AR-COLL")="FINISHED" "RTN","XBSANP",572,0) S XBA=0 F S XBA=$O(^BAREDI("I",XBA)) Q:+XBA=0 D "RTN","XBSANP",573,0) .S XBB=0 F S XBB=$O(^BAREDI("I",XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",574,0) ..S DIK="^BAREDI(""I"",XBA,",DA=XBB,DUZ(2)=XBA=XBA D ^DIK,^XBFMK "RTN","XBSANP",575,0) S ^XTMP("SAN","PROCESS","AR-EDIIMP")="FINISHED" "RTN","XBSANP",576,0) S XBA=0 F S XBA=$O(^BAREDI("C",XBA)) Q:+XBA=0 D "RTN","XBSANP",577,0) .S XBB=0 F S XBB=$O(^BAREDI("C",XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",578,0) ..I $P($G(^BAREDI("C",XBA,XBB,0)),U,3)]"" S DIE="^BAREDI(""C"",XBA,XBB,",DA=XBB,DUZ(2)=XBA,DR=".03///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","BAREDI03",DA)="" D ^XBFMK "RTN","XBSANP",579,0) S ^XTMP("SAN","PROCESS","AR-EDIC")="FINISHED" "RTN","XBSANP",580,0) S XBA=0 F S XBB=$O(^BAR835(XBA)) Q:+XBA=0 D "RTN","XBSANP",581,0) .I $P($G(^BAR835(XBA,1)),U,1)]"" S DIE="^BAR835,",DA=XBA,DR=".11///@" D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","AR11",DA)="" D ^XBFMK "RTN","XBSANP",582,0) S ^XTMP("SAN","PROCESS","AR-EDI835")="FINISHED" "RTN","XBSANP",583,0) Q "RTN","XBSANP",584,0) TPB ;3RD PARTY BILLING "RTN","XBSANP",585,0) D ^XBFMK "RTN","XBSANP",586,0) S U="^",XBA=0 F S XBA=$O(^ABMDCLM(XBA)) Q:+XBA=0 D "RTN","XBSANP",587,0) .S XBB=0 F S XBB=$O(^ABMDCLM(XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",588,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,8)),U,8)) D "RTN","XBSANP",589,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",590,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",591,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".88///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM88",DA)="" D ^XBFMK "RTN","XBSANP",592,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,8)),U,11)) D "RTN","XBSANP",593,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".885///"_(100000+DA) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM885",DA)="" D ^XBFMK "RTN","XBSANP",594,0) ..I $L($P($G(^ABMDCLM(XBA,XBB,9)),U,12)) D "RTN","XBSANP",595,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",596,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",597,0) ...S DA=XBB,DIE="9002274.3",DUZ(2)=XBA,DR=".912///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM912",DA)="" D ^XBFMK "RTN","XBSANP",598,0) S ^XTMP("SAN","PROCESS","3P-CLAIM")="FINISHED" "RTN","XBSANP",599,0) S XBA=0 F S XBA=$O(^ABMDBILL(XBA)) Q:+XBA=0 D "RTN","XBSANP",600,0) .S XBB=0 F S XBB=$O(^ABMDBILL(XBA,XBB)) Q:+XBB=0 D "RTN","XBSANP",601,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,8)),U,8)) D "RTN","XBSANP",602,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",603,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",604,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".88///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM88",DA)="" D ^XBFMK "RTN","XBSANP",605,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,8)),U,11)) D "RTN","XBSANP",606,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".885///"_(200000+DA) D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM885",DA)="" D ^XBFMK "RTN","XBSANP",607,0) ..I $L($P($G(^ABMDBILL(XBA,XBB,9)),U,12)) D "RTN","XBSANP",608,0) ...S X=^XTMP("SAN",$J,"DLAST") D R S XBLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",609,0) ...S X=^XTMP("SAN",$J,"DFIRST") D R S XBFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",610,0) ...S DA=XBB,DIE="9002274.4",DUZ(2)=XBA,DR=".912///"_XBLAST_","_XBFIRST D ^DIE S:$D(Y) ^XTMP("SAN","FAILURE","ABM912",DA)="" D ^XBFMK "RTN","XBSANP",611,0) S ^XTMP("SAN","PROCESS","3P-BILL")="FINISHED" "RTN","XBSANP",612,0) Q "RTN","XBSANP",613,0) LAB ; "RTN","XBSANP",614,0) S X=0 F S X=$O(^LR(X)) Q:X'=+X D "RTN","XBSANP",615,0) .S Y=0 F S Y=$O(^LR(X,"CH",Y)) Q:Y'=+Y D "RTN","XBSANP",616,0) ..I $D(^LR(X,"CH",Y,1)) S Z=$P(^LR(X,"CH",Y,1,0),U,1,2) K ^LR(X,"CH",Y,1) S ^LR(X,"CH",Y,1,0)=Z "RTN","XBSANP",617,0) .S Y=0 F S Y=$O(^LR(X,"MI",Y)) Q:Y'=+Y D "RTN","XBSANP",618,0) ..I $D(^LR(X,"MI",Y,4)) S Z=$P(^LR(X,"MI",Y,4,0),U,1,2) K ^LR(X,"MI",Y,4) S ^LR(X,"MI",Y,4,0)=Z "RTN","XBSANP",619,0) ..I $D(^LR(X,"MI",Y,19)) S Z=$P(^LR(X,"MI",Y,19,0),U,1,2) K ^LR(X,"MI",Y,19) S ^LR(X,"MI",Y,19,0)=Z "RTN","XBSANP",620,0) ..I $D(^LR(X,"MI",Y,20)) S Z=$P(^LR(X,"MI",Y,20,0),U,1,2) K ^LR(X,"MI",Y,20) S ^LR(X,"MI",Y,20,0)=Z "RTN","XBSANP",621,0) ..I $D(^LR(X,"MI",Y,21)) S Z=$P(^LR(X,"MI",Y,21,0),U,1,2) K ^LR(X,"MI",Y,21) S ^LR(X,"MI",Y,21,0)=Z "RTN","XBSANP",622,0) ..I $D(^LR(X,"MI",Y,22)) S Z=$P(^LR(X,"MI",Y,22,0),U,1,2) K ^LR(X,"MI",Y,22) S ^LR(X,"MI",Y,22,0)=Z "RTN","XBSANP",623,0) ..I $D(^LR(X,"MI",Y,23)) S Z=$P(^LR(X,"MI",Y,23,0),U,1,2) K ^LR(X,"MI",Y,23) S ^LR(X,"MI",Y,23,0)=Z "RTN","XBSANP",624,0) ..K ^LR(X,"MI",Y,99) "RTN","XBSANP",625,0) S X=0 F S X=$O(^LRO(69,X)) Q:X'=+X D "RTN","XBSANP",626,0) .I $D(^LRO(69,X,1,"AL")) K ^LRO(69,X,1,"AL") "RTN","XBSANP",627,0) .I $D(^LRO(69,X,1,"AP")) K ^LRO(69,X,1,"AP") "RTN","XBSANP",628,0) .I $D(^LRO(69,X,1,"AR")) K ^LRO(69,X,1,"AR") "RTN","XBSANP",629,0) S X=$P(^BLRTXLOG(0),U,1,2) K ^BLRTXLOG S ^BLRTXLOG(0)=X "RTN","XBSANP",630,0) S ^XTMP("SAN","PROCESS","LAB")="FINISHED" "RTN","XBSANP",631,0) D ^LROC "RTN","XBSANP",632,0) Q "RTN","XBSANP",633,0) LISTE ; "RTN","XBSANP",634,0) W !,"Listed below are the nodes and number of records that did not" "RTN","XBSANP",635,0) W !,"update properly. At the end of the sanitization, the records" "RTN","XBSANP",636,0) W !,"for Patient Name failures are rerun. PATNAME2 nodes represent" "RTN","XBSANP",637,0) W !,"Patient Names that should be manually changed with fileman." "RTN","XBSANP",638,0) W !,"XTMP(""SAN"",""PROCESS"") nodes:" "RTN","XBSANP",639,0) W !,"XTMP(""SAN"",""FAILURE"") nodes:" "RTN","XBSANP",640,0) S X="" F S X=$O(^XTMP("SAN","FAILURE",X)) Q:X="" D "RTN","XBSANP",641,0) .S (Y,Z)=0 F S Y=$O(^XTMP("SAN","FAILURE",X,Y)) Q:+Y=0 D "RTN","XBSANP",642,0) ..S Z=Z+1 "RTN","XBSANP",643,0) .W !,"Failure: "_X_" "_Z "RTN","XBSANP",644,0) W !,"FINISHED" Q "RTN","XBSANP",645,0) LISTD ; "RTN","XBSANP",646,0) W !,"Listed below are the processes completed." "RTN","XBSANP",647,0) W !,"XTMP(""SAN"",""PROCESS"") nodes:" "RTN","XBSANP",648,0) S X="" F S X=$O(^XTMP("SAN","PROCESS",X)) Q:X="" D "RTN","XBSANP",649,0) .W !,"Process: "_X "RTN","XBSANP",650,0) W !,"FINISHED" Q "RTN","XBSANP",651,0) MCDE ; "RTN","XBSANP",652,0) S DFN=0 F S DFN=$O(^AUPNMCD("B",DFN)) Q:+DFN=0 D "RTN","XBSANP",653,0) .S XBMDFN=0 F S XBMDFN=$O(^AUPNMCD("B",DFN,XBMDFN)) Q:XBMDFN'=+XBMDFN D "RTN","XBSANP",654,0) ..S X=^XTMP("SAN",$J,"DLAST") D R S XBDLAST=^XTMP("SAN",$J,"DLAST",X) "RTN","XBSANP",655,0) ..S X=^XTMP("SAN",$J,"DFIRST") D R S XBDFIRST=^XTMP("SAN",$J,"DFIRST",X) "RTN","XBSANP",656,0) ..S DIE="^AUPNMCD(",DA=XBMDFN,DR=".05///@;.12///@;.13///@" D ^DIE "RTN","XBSANP",657,0) ..I $D(Y) S ^XTMP("SAN","FAILURE","PATMCDEA",DA)="" "RTN","XBSANP",658,0) ..D ^XBFMK "RTN","XBSANP",659,0) ..S XBDNAME=XBDLAST_","_XBDFIRST "RTN","XBSANP",660,0) ..D SSNR "RTN","XBSANP",661,0) ..S DIE="^AUPNMCD(",DA=XBMDFN,DR=".03///"_XBSSN_";.14///"_XBDNAME_";2101///"_$P(^DPT(DFN,0),U,1)_";2102///"_$P(^DPT(DFN,0),U,3)_";.05///"_$P(^DPT(DFN,0),U,1) D ^DIE "RTN","XBSANP",662,0) ..I $D(Y) S ^XTMP("SAN","FAILURE","PATMCDEB",DA)="" "RTN","XBSANP",663,0) ..D ^XBFMK "RTN","XBSANP",664,0) S ^XTMP("SAN","PROCESS","MCD")="FINISHED" "RTN","XBSANP",665,0) Q "RTN","XBSANP",666,0) MMDEL ;DELETES MAILMAN MESSAGES "RTN","XBSANP",667,0) K ^XMB(3.9) "RTN","XBSANP",668,0) S ^XMB(3.9,0)="MESSAGE^3.9s^0^0" "RTN","XBSANP",669,0) Q "RTN","XBSANP",670,0) AUDEL ;DELETES AUDIT FILE "RTN","XBSANP",671,0) K ^DIA "RTN","XBSANP",672,0) S ^DIA(0)="AUDIT^1.1|" "RTN","XBSANP",673,0) Q "RTN","XBSANP",674,0) NCDEL ;DELETES NAME COMPONENTS FILE "RTN","XBSANP",675,0) K ^VA(20) "RTN","XBSANP",676,0) S ^VA(20,0)="NAME COMPONENTS^20IA^^" "RTN","XBSANP",677,0) Q "RTN","XBSANP",678,0) STU ;SETS STUDENT NAMES "RTN","XBSANP",679,0) K ^XTMP("SAN","FAILURE","STU") "RTN","XBSANP",680,0) K ^XTMP("SAN","FAILURE","STUA") "RTN","XBSANP",681,0) STUA D ^XBFMK "RTN","XBSANP",682,0) S XBX=50 F S XBX=$O(^VA(200,XBX)) Q:+XBX>76 D "RTN","XBSANP",683,0) .S XBLAST=$E("ABCDEFGHIJKLMNOPQRSTUVWXYZ",XBX-50,XBX-50)_"STUDENT" "RTN","XBSANP",684,0) .S XBFIRST="USER" "RTN","XBSANP",685,0) .S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STU",XBX)="" "RTN","XBSANP",686,0) .S DA=XBX,DIE=200,DR="1///"_$E(XBLAST,1,2)_"U;13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUINITIALS",XBX)="" "RTN","XBSANP",687,0) .S DA=XBX,DIE=200,DR="201///`29" D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUMENU",XBX)="" "RTN","XBSANP",688,0) .D ^XBFMK "RTN","XBSANP",689,0) W !,"FINISHED" "RTN","XBSANP",690,0) Q "RTN","XBSANP",691,0) FJADD1 ; "RTN","XBSANP",692,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATADDRESS",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.11)),U,1)]"" D "RTN","XBSANP",693,0) .S XBADDR=DFN_" SMITH STREET" "RTN","XBSANP",694,0) .S DIE="^DPT(",DR=".111///"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",695,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSFJ",DFN)="" "RTN","XBSANP",696,0) .D ^XBFMK "RTN","XBSANP",697,0) .S $P(^DPT(DFN,.11),U,2)="" ;addr 2nd line "RTN","XBSANP",698,0) .S $P(^DPT(DFN,.11),U,3)="" ;addr 3rd line "RTN","XBSANP",699,0) Q "RTN","XBSANP",700,0) A2213 ; "RTN","XBSANP",701,0) I $P($G(^DPT(DFN,.21)),U,3)]"" D "RTN","XBSANP",702,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",703,0) .S DIE="^DPT(",DR=".213///"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",704,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL11",DFN)="" "RTN","XBSANP",705,0) .D ^XBFMK "RTN","XBSANP",706,0) I $P($G(^DPT(DFN,.33)),U,3)]"" D "RTN","XBSANP",707,0) .S X=^XTMP("SAN",$J,"ADL1") D R S XBADDR=^XTMP("SAN",$J,"ADL1",X) "RTN","XBSANP",708,0) .S DIE="^DPT(",DR=".333.//"_XBADDR,DA=DFN D ^DIE "RTN","XBSANP",709,0) .I $D(Y) S ^XTMP("SAN","FAILURE","PATADDRESSL111",DFN)="" "RTN","XBSANP",710,0) .D ^XBFMK "RTN","XBSANP",711,0) Q "RTN","XBSANP",712,0) A2219 ;nok phone "RTN","XBSANP",713,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATPHONE",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.21)),U,9)]"" D "RTN","XBSANP",714,0) .S $P(^DPT(DFN,.21),U,9)="555-888-"_$E(DFN_"9999",1,4) "RTN","XBSANP",715,0) Q "RTN","XBSANP",716,0) S DFN=0 F S DFN=$O(^XTMP("SAN","FAILURE","PATPHONE1",DFN)) Q:+DFN=0 I $P($G(^DPT(DFN,.33)),U,9)]"" D "RTN","XBSANP",717,0) .S $P(^DPT(DFN,.33),U,9)="555-888-"_$E(DFN_"9999",1,4) "RTN","XBSANP",718,0) Q "RTN","XBSANU") 0^151^B56800399 "RTN","XBSANU",1,0) XBSANU ;IHS/ITSC/LAB/FJE;SANITIZE RPMS DATABASE; [ 01/29/2005 11:10 AM ] "RTN","XBSANU",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSANU",3,0) W !,"This routine sanitizes and deletes RPMS New Person file data. To use you must type: D START^XBSANU" "RTN","XBSANU",4,0) W !,"For help and an explanation of this utility type D HELP^XBSANU",!! "RTN","XBSANU",5,0) Q "RTN","XBSANU",6,0) START ; "RTN","XBSANU",7,0) S (XBDUZ,XBDEL,XBPAT,XBPHR,XBBH,XBCHR,XBPOS,XB3PB,XBAR,XBLAB,XBMMDEL,XBAUDEL,XBNCDEL)=0 "RTN","XBSANU",8,0) K ^XTMP("SAN") "RTN","XBSANU",9,0) S ^XTMP("SAN","LASTDFN")=0 "RTN","XBSANU",10,0) W !,"This routine will sanitize AND randomize the NEW PERSON file in the RPMS database." "RTN","XBSANU",11,0) S DIR(0)="Y",DIR("A")="Do you want to convert the new person data?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANU",12,0) S:Y=1 XBDUZ=1 "RTN","XBSANU",13,0) W !,"All failed fileman update data can be found in: ^XTMP(""SAN"",""DUZFAILURE"", GLOBAL" "RTN","XBSANU",14,0) W !,"?? display usually means that there was a fileman update failure" "RTN","XBSANU",15,0) W !,"If a hard error like an UNDEFINED occurs during the scrambling," "RTN","XBSANU",16,0) W !," you can restart at the next patient by typing: RESTART^XBSANU " "RTN","XBSANU",17,0) W !,"When finished...don't forget to manually address the failures" "RTN","XBSANU",18,0) W !,"D LIST^XBSANU will list the errors",!! "RTN","XBSANU",19,0) W !!,"This routine is about to scramble the RPMS database." "RTN","XBSANU",20,0) S DIR(0)="Y",DIR("A")="Last chance: Do you want your RPMS NEW PERSON file data SANITIZED?",DIR("B")="N" KILL DA D ^DIR KILL DIR "RTN","XBSANU",21,0) Q:Y'=1 "RTN","XBSANU",22,0) D ^XBKVAR "RTN","XBSANU",23,0) W !,"Collecting random names" D CLEAN "RTN","XBSANU",24,0) FJE ; "RTN","XBSANU",25,0) I XBDUZ W !,"SCRAMBLING FILE 200" D DUZ "RTN","XBSANU",26,0) S ^XTMP("SAN","DUZPROCESS","XBSAN")="FINISHED" "RTN","XBSANU",27,0) W !,"FINISHED" "RTN","XBSANU",28,0) D LIST "RTN","XBSANU",29,0) D EOJ "RTN","XBSANU",30,0) Q "RTN","XBSANU",31,0) ; "RTN","XBSANU",32,0) EOJ ; "RTN","XBSANU",33,0) D EN^XBVK("XB") "RTN","XBSANU",34,0) K DFN,XBH,OTDFN,XBB,AUPNSEX,X,X2,XB3PB,XBAR,XBAUDEL "RTN","XBSANU",35,0) K DA,DIE,DIK,DIR,DR,XBDUZSSN,I,XBA,XBADDR,XBADL1 "RTN","XBSANU",36,0) K XBBH,XBC,XBCHART,XBCHR,XBD,XBDAD,XBDEANUM,XBDEL,XBDFIRST,XBDLAST,XBDNAME "RTN","XBSANU",37,0) K XBDOB,XBDUZ,XBFIRST,XBFNAME,XBH,XBLAB,XBLNAME,XBMDFN,XBMMDEL,XBMOM "RTN","XBSANU",38,0) K XBNAME,XBNCDEL,XBNOK,XBNOKADL,XBP,XBPAT,XBPHN,XBPHR,XBPOS,XBS "RTN","XBSANU",39,0) K XBSCR,XBSEX,XBSSN,XBTEN,XBVAL,XBVANUM,XBX,Y,Z "RTN","XBSANU",40,0) W !,"If all data appears correct and you have chaecked failures, kill the ^XTMP(""SAN"") global",!! "RTN","XBSANU",41,0) Q "RTN","XBSANU",42,0) ; "RTN","XBSANU",43,0) CLEAN ; "RTN","XBSANU",44,0) K ^XTMP("SAN","DLAST") "RTN","XBSANU",45,0) K ^XTMP("SAN","DFIRST") "RTN","XBSANU",46,0) K ^XTMP("SAN","PROCESS","DUZ") "RTN","XBSANU",47,0) K ^XTMP("SAN","DUZFAILURE") "RTN","XBSANU",48,0) D ^XBKVAR "RTN","XBSANU",49,0) S (XBC(1),XBC(2))=0,XBX=1 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANU",50,0) .S XBNAME=$P($G(^VA(200,XBX,0)),U,1) "RTN","XBSANU",51,0) .S XBLAST=$P(XBNAME,",",1) S:'$L(XBLAST) XBLAST="MOUSE" S:$L(XBLAST)<3 XBLAST=XBLAST_"AAA" "RTN","XBSANU",52,0) .S XBFIRST=$P(XBNAME,",",2) S:'$L(XBFIRST) XBFIRST="MICKEY"_+XBX "RTN","XBSANU",53,0) .S XBC(1)=XBC(1)+1,^XTMP("SAN","DLAST")=XBC(1),^XTMP("SAN","DLAST",XBC(1))=XBLAST "RTN","XBSANU",54,0) .S XBC(2)=XBC(2)+1,^XTMP("SAN","DFIRST")=XBC(2),^XTMP("SAN","DFIRST",XBC(2))=XBFIRST "RTN","XBSANU",55,0) Q "RTN","XBSANU",56,0) R S X2=$R(X) I X2=0 G R "RTN","XBSANU",57,0) S X=X2 "RTN","XBSANU",58,0) Q "RTN","XBSANU",59,0) ; "RTN","XBSANU",60,0) DUZ ;SCRAMBLES USER NAMES "RTN","XBSANU",61,0) D ^XBFMK "RTN","XBSANU",62,0) I '$D(^XTMP("SAN","LASTDUZ")) S ^XTMP("SAN","LASTDUZ")=1 "RTN","XBSANU",63,0) S XBX=+^XTMP("SAN","LASTDUZ") "RTN","XBSANU",64,0) F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANU",65,0) .S DA=XBX,DIE=200,DR="53.2///@" D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZDEA",XBX)="" "RTN","XBSANU",66,0) .D ^XBFMK "RTN","XBSANU",67,0) RESTART ;RESTARTS IF HARD FAILURE WITH DUZ (COMMON BECAUSE OF 3,6,16 PROBLEMS) "RTN","XBSANU",68,0) S XBX=+^XTMP("SAN","LASTDUZ") "RTN","XBSANU",69,0) F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANU",70,0) .S ^XTMP("SAN","LASTDUZ")=XBX "RTN","XBSANU",71,0) .S X=^XTMP("SAN","DLAST") D R S XBLAST=^XTMP("SAN","DLAST",X) "RTN","XBSANU",72,0) .S X=^XTMP("SAN","DFIRST") D R S XBFIRST=^XTMP("SAN","DFIRST",X) "RTN","XBSANU",73,0) .D DUZSSN "RTN","XBSANU",74,0) .I XBDUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST_";9///"_XBDUZSSN D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZ IEN FAILURE",XBX)="" "RTN","XBSANU",75,0) .I 'XBDUZSSN S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZ IEN FAILURE",XBX)="" "RTN","XBSANU",76,0) .S DA=XBX,DIE=200,DR="1///"_$E(XBLAST,1,3)_";13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZINITIALS",XBX)="" "RTN","XBSANU",77,0) .S XBVANUM=1000000+XBX "RTN","XBSANU",78,0) .S XBDEANUM=200000+XBX "RTN","XBSANU",79,0) .S XBDEAIL=$E(XBLAST,1) "RTN","XBSANU",80,0) .S XBDEAN=$E(XBDEANUM,1)+$E(XBDEANUM,3)+$E(XBDEANUM,5)+(2*($E(XBDEANUM,2)+$E(XBDEANUM,4)+$E(XBDEANUM,6))) "RTN","XBSANU",81,0) .S XBDEAN=XBDEAN#10 "RTN","XBSANU",82,0) .S XBDEA="A"_XBDEAIL_XBDEANUM_XBDEAN "RTN","XBSANU",83,0) .S DA=XBX,DIE=200,DR="53.2///"_XBDEA D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZDEA",XBX)="" "RTN","XBSANU",84,0) .D ^XBFMK "RTN","XBSANU",85,0) .S DA=XBX,DIE=200,DR="53.3///"_XBVANUM D ^DIE I $D(Y) S ^XTMP("SAN","DUZFAILURE","DUZVA",XBX)="" "RTN","XBSANU",86,0) .D ^XBFMK "RTN","XBSANU",87,0) S ^XTMP("SAN","DUZPROCESS","DUZ")="FINISHED" "RTN","XBSANU",88,0) Q "RTN","XBSANU",89,0) DUZSSN ;CHANGES SSN FOR USER FILE "RTN","XBSANU",90,0) S XBDUZSSN=$P($G(^VA(200,XBX,1)),"^",9) "RTN","XBSANU",91,0) I XBDUZSSN D DUZSSNR S XBDUZSSN=XBSSN "RTN","XBSANU",92,0) Q "RTN","XBSANU",93,0) DUZSSNR ;FIND RANDOM SSN "RTN","XBSANU",94,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSANU",95,0) I $D(^VA(200,"SSN",XBSSN)) G DUZSSNR "RTN","XBSANU",96,0) Q "RTN","XBSANU",97,0) ALLSSN ;ADDS SSN TO EVERY DUZ "RTN","XBSANU",98,0) D ^XBFMK "RTN","XBSANU",99,0) S XBX=0 F S XBX=$O(^VA(200,XBX)) Q:+XBX=0 D "RTN","XBSANU",100,0) .Q:$L($P($G(^VA(200,XBX,0)),"^",9)) "RTN","XBSANU",101,0) .D SSNR "RTN","XBSANU",102,0) .S DA=XBX,DIE=200,DR=".09///"_XBSSN D ^DIE K DIE,DA "RTN","XBSANU",103,0) .D ^XBFMK "RTN","XBSANU",104,0) S ^XTMP("SAN","DUZPROCESS","DUZ SSN-ALL")="FINISHED" "RTN","XBSANU",105,0) Q "RTN","XBSANU",106,0) SSNR ;FIND RANDOM SSN "RTN","XBSANU",107,0) F S XBSSN=$R(999999999) Q:XBSSN>100000000&(XBSSN<800000000) "RTN","XBSANU",108,0) I $D(^VA(200,"SSN",XBSSN)) G SSNR "RTN","XBSANU",109,0) Q "RTN","XBSANU",110,0) ; "RTN","XBSANU",111,0) LIST ; "RTN","XBSANU",112,0) W !,"Listed below are the nodes and number of records that did not" "RTN","XBSANU",113,0) W !,"update properly." "RTN","XBSANU",114,0) W !,"XTMP(""SAN"",""DUZFAILURE"") nodes:" "RTN","XBSANU",115,0) S X="" F S X=$O(^XTMP("SAN","DUZFAILURE",X)) Q:X="" D "RTN","XBSANU",116,0) .S (Y,Z)=0 F S Y=$O(^XTMP("SAN","DUZFAILURE",X,Y)) Q:+Y=0 D "RTN","XBSANU",117,0) ..S Z=Z+1 "RTN","XBSANU",118,0) .W !,"Failure: "_X_" "_Z "RTN","XBSANU",119,0) W !,"FINISHED" "RTN","XBSANU",120,0) LISTD ; "RTN","XBSANU",121,0) W !,"Listed below are the processes completed." "RTN","XBSANU",122,0) W !,"XTMP(""SAN"",""PROCESS"") nodes:" "RTN","XBSANU",123,0) S X="" F S X=$O(^XTMP("SAN","PROCESS",X)) Q:X="" D "RTN","XBSANU",124,0) .W !,"Process: "_X "RTN","XBSANU",125,0) W !,"FINISHED" Q "RTN","XBSANU",126,0) STU ;SETS STUDENT NAMES "RTN","XBSANU",127,0) K ^XTMP("SAN","DUZFAILURE","STU") "RTN","XBSANU",128,0) K ^XTMP("SAN","DUZFAILURE","STUA") "RTN","XBSANU",129,0) STUA D ^XBFMK "RTN","XBSANU",130,0) S XBX=50 F S XBX=$O(^VA(200,XBX)) Q:+XBX>76 D "RTN","XBSANU",131,0) .S XBLAST=$E("ABCDEFGHIJKLMNOPQRSTUVWXYZ",XBX-50,XBX-50)_"STUDENT" "RTN","XBSANU",132,0) .S XBFIRST="USER" "RTN","XBSANU",133,0) .S DA=XBX,DIE=200,DR=".01///"_XBLAST_","_XBFIRST D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STU",XBX)="" "RTN","XBSANU",134,0) .S DA=XBX,DIE=200,DR="1///"_$E(XBLAST,1,2)_"U;13///"_$E(XBLAST,1,8) D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUINITIALS",XBX)="" "RTN","XBSANU",135,0) .S DA=XBX,DIE=200,DR="201///`29" D ^DIE I $D(Y) S ^XTMP("SAN","FAILURE","STUMENU",XBX)="" "RTN","XBSANU",136,0) .D ^XBFMK "RTN","XBSANU",137,0) W !,"FINISHED" "RTN","XBSANU",138,0) Q "RTN","XBSANU",139,0) HELP ; "RTN","XBSANU",140,0) W !,"Notes for sanitizing file 200." "RTN","XBSANU",141,0) W !,"START^XBSANU will start the sanitizing. The last names and first names" "RTN","XBSANU",142,0) W !,"of file 200 are captured and then randomly combined to form a new name" "RTN","XBSANU",143,0) W !,"If the user has a SSN regestered then that number is also ramdomized." "RTN","XBSANU",144,0) W !,"The internal entry is added to 1000000 to create the VA number and" "RTN","XBSANU",145,0) W !,"2000000 is added to make the DEA number" "RTN","XBSANU",146,0) W !,"The first three letters of the last name make up the initials and" "RTN","XBSANU",147,0) W !,"the first eight characters of the last name make up the nick name." "RTN","XBSANU",148,0) W !,"To fix hard errors you should look at the following:" "RTN","XBSANU",149,0) W !,"File 200 (^VA(200,IEN,0)) piece 16 points to file 16 (^DIC(16)). If" "RTN","XBSANU",150,0) W !,"^DIC(16,pointer,0) does not exist, you will get a hard error. File 16" "RTN","XBSANU",151,0) W !,"and file 6 (^DIC(6)) are generally dinumed and in file 16 the " "RTN","XBSANU",152,0) W !,"^DIC(16,pointer,""A6"" and ""A3"" point to file 6 and 3 (^DIC(3))" "RTN","XBSANU",153,0) W !,"respectfully. If either is missing you will get an error. File 3's IEN" "RTN","XBSANU",154,0) W !,"generally is dinumed to file 200.",!! "RTN","XBSANU",155,0) W !,"You can run this utility over and over without problems. The result is" "RTN","XBSANU",156,0) W !,"randomized again. User IEN 1 remains as ADAM,ADAM and is unchanged" "RTN","XBSANU",157,0) W !,"LIST^XBSANU will list the errors found" "RTN","XBSANU",158,0) W !,"ALLSSN^XBSANU will add a random SSN to all file 200 users" "RTN","XBSANU",159,0) W !,"STU^XBSANU will create 26 student accounts starting with ASTUDENT,USER" "RTN","XBSANU",160,0) W !,"and ending with ZSTUDENT,USER for IENS 51-76." "RTN","XBSANU",161,0) Q "RTN","XBSAUD") 0^152^B1093004 "RTN","XBSAUD",1,0) XBSAUD ; IHS/ADC/GTH - SET AUDIT AT FILE LEVEL ; [ 02/07/97 3:02 PM ] "RTN","XBSAUD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSAUD",3,0) ; "RTN","XBSAUD",4,0) ; This routine sets 'audit' on at the file level for "RTN","XBSAUD",5,0) ; selected files "RTN","XBSAUD",6,0) ; "RTN","XBSAUD",7,0) START ; "RTN","XBSAUD",8,0) W !!,"^XBSAUD - This routine sets 'audit' at the file level." "RTN","XBSAUD",9,0) D ^XBDSET "RTN","XBSAUD",10,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBSAUD",11,0) NEW F,G,P "RTN","XBSAUD",12,0) S Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'audit' ON or OFF?","ON") "RTN","XBSAUD",13,0) Q:$D(DUOUT)!$D(DTOUT) "RTN","XBSAUD",14,0) S Y=Y-1 "RTN","XBSAUD",15,0) W ! "RTN","XBSAUD",16,0) F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D "RTN","XBSAUD",17,0) . S G=^DIC(F,0,"GL") "RTN","XBSAUD",18,0) . S P=$P(@(G_"0)"),"^",2) "RTN","XBSAUD",19,0) . I Y S P=$P(P,"a",1)_$P(P,"a",2) I 1 "RTN","XBSAUD",20,0) . E S P=P_$S(P'["a":"a",1:"") "RTN","XBSAUD",21,0) . S $P(@(G_"0)"),"^",2)=P "RTN","XBSAUD",22,0) . W !,F," set ",$S(Y:"off",1:"on") "RTN","XBSAUD",23,0) .Q "RTN","XBSAUD",24,0) D EOJ "RTN","XBSAUD",25,0) Q "RTN","XBSAUD",26,0) ; "RTN","XBSAUD",27,0) EOJ ; "RTN","XBSAUD",28,0) KILL X,Y,^UTILITY("XBDSET",$J) "RTN","XBSAUD",29,0) Q "RTN","XBSAUD",30,0) ; "RTN","XBSAUTH") 0^153^B8949848 "RTN","XBSAUTH",1,0) XBSAUTH ; IHS/ADC/GTH - SET AUTHORITIES ; [ 02/07/97 3:02 PM ] "RTN","XBSAUTH",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSAUTH",3,0) ; "RTN","XBSAUTH",4,0) ; This routine sets FileMan dictionary authorities: "RTN","XBSAUTH",5,0) ; "AUDIT" "DD" "DEL" "LAYGO" "RD" "WR" "RTN","XBSAUTH",6,0) ; "RTN","XBSAUTH",7,0) START ; "RTN","XBSAUTH",8,0) I $G(DUZ(0))'="@" W !,*7," Insufficient FileMan access. DUZ(0) is not ""@""." Q "RTN","XBSAUTH",9,0) S U="^",IOP=$I "RTN","XBSAUTH",10,0) D ^%ZIS "RTN","XBSAUTH",11,0) W !!,"^XBSAUTH - This program sets FileMan dictionary authorities." "RTN","XBSAUTH",12,0) D ^XBDSET "RTN","XBSAUTH",13,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBSAUTH",14,0) ASK ; "RTN","XBSAUTH",15,0) W !!,"Do you want to be asked before setting each file? (Y/N) Y// " "RTN","XBSAUTH",16,0) R XBSAASK:$G(DTIME,999) "RTN","XBSAUTH",17,0) S:XBSAASK="" XBSAASK="Y" "RTN","XBSAUTH",18,0) S XBSAASK=$E(XBSAASK) "RTN","XBSAUTH",19,0) I "YyNn"'[XBSAASK W *7 G ASK "RTN","XBSAUTH",20,0) S XBSAASK=$S("Yy"[XBSAASK:1,1:0) "RTN","XBSAUTH",21,0) W !!,"To delete a particular authority enter '@@'",! "RTN","XBSAUTH",22,0) S XBSAF=0 "RTN","XBSAUTH",23,0) KILL XBSA "RTN","XBSAUTH",24,0) F XBSAX="AUDIT","DD","DEL","LAYGO","RD","WR" D GETAUTH "RTN","XBSAUTH",25,0) I 'XBSAF W !!,"Bye" Q "RTN","XBSAUTH",26,0) W !!,"I am going to set the following authorities:",! "RTN","XBSAUTH",27,0) F XBSAX="AUDIT","DD","DEL","LAYGO","RD","WR" D:@("XBSA("""_XBSAX_""")")'="" PRTAUTH "RTN","XBSAUTH",28,0) ASK2 ; "RTN","XBSAUTH",29,0) W !!,"Do you want to continue? (Y/N) N// " "RTN","XBSAUTH",30,0) R XBSAX:$G(DTIME,999) "RTN","XBSAUTH",31,0) S:XBSAX="" XBSAX="N" "RTN","XBSAUTH",32,0) S XBSAX=$E(XBSAX) "RTN","XBSAUTH",33,0) I "YyNn"'[XBSAX W *7 G ASK2 "RTN","XBSAUTH",34,0) G:"Yy"'[XBSAX EOJ "RTN","XBSAUTH",35,0) W ! "RTN","XBSAUTH",36,0) S XBSAFILE="" "RTN","XBSAUTH",37,0) F XBSAL=0:0 S XBSAFILE=$O(^UTILITY("XBDSET",$J,XBSAFILE)) Q:XBSAFILE="" D PROCESS "RTN","XBSAUTH",38,0) G EOJ "RTN","XBSAUTH",39,0) ; "RTN","XBSAUTH",40,0) GETAUTH ; GET DICTIONARY AUTHORITIES "RTN","XBSAUTH",41,0) W !,"Enter ",XBSAX," authority: " "RTN","XBSAUTH",42,0) R @("XBSA("""_XBSAX_""")") "RTN","XBSAUTH",43,0) S:@("XBSA("""_XBSAX_""")")'="" XBSAF=1 "RTN","XBSAUTH",44,0) Q "RTN","XBSAUTH",45,0) ; "RTN","XBSAUTH",46,0) PRTAUTH ; PRINT DICTIONARY AUTHORITIES "RTN","XBSAUTH",47,0) W !,XBSAX,?6," to """,@("XBSA("""_XBSAX_""")"),"""" "RTN","XBSAUTH",48,0) Q "RTN","XBSAUTH",49,0) ; "RTN","XBSAUTH",50,0) PROCESS ; "RTN","XBSAUTH",51,0) S XBSAANS="Y" "RTN","XBSAUTH",52,0) W !,@("$P(^DIC("_XBSAFILE_",0),U,1)") "RTN","XBSAUTH",53,0) I XBSAASK W !?4,"Current authorities are: " D W "..OK? Y// " "RTN","XBSAUTH",54,0) . F XBSAX="AUDIT","DD","DEL","LAYGO","RD","WR" I $D(@("^DIC("_XBSAFILE_",0,"""_XBSAX_""")")),@("^("""_XBSAX_""")")'="" W ?31,XBSAX,?38,@("^("""_XBSAX_""")"),! "RTN","XBSAUTH",55,0) . Q "RTN","XBSAUTH",56,0) P2 ; "RTN","XBSAUTH",57,0) I XBSAASK R XBSAANS:$G(DTIME,999) S:XBSAANS="" XBSAANS="Y" S XBSAANS=$E(XBSAANS) I "YyNn"'[XBSAANS D P2ERR G P2 "RTN","XBSAUTH",58,0) I "Yy"[XBSAANS D P2SETS Q "RTN","XBSAUTH",59,0) W " Skipping" "RTN","XBSAUTH",60,0) Q "RTN","XBSAUTH",61,0) ; "RTN","XBSAUTH",62,0) P2SETS ; "RTN","XBSAUTH",63,0) NEW X "RTN","XBSAUTH",64,0) F X="AUDIT","DD","DEL","LAYGO","RD","WR" S:XBSA(X)]"" @("^DIC("_XBSAFILE_",0,"""_X_""")")=XBSA(X) KILL:XBSA(X)="@@" @("^DIC("_XBSAFILE_",0,"""_X_""")") "RTN","XBSAUTH",65,0) Q "RTN","XBSAUTH",66,0) ; "RTN","XBSAUTH",67,0) P2ERR ; "RTN","XBSAUTH",68,0) W *7 "RTN","XBSAUTH",69,0) F %=1:1:$L(XBSAANS) W @IOBS," ",@IOBS "RTN","XBSAUTH",70,0) Q "RTN","XBSAUTH",71,0) ; "RTN","XBSAUTH",72,0) EOJ ; "RTN","XBSAUTH",73,0) KILL ^UTILITY("XBDSET",$J),XBSA,XBSAANS,XBSAASK,XBSAF,XBSAFILE,XBSAI,XBSAL,XBSAX "RTN","XBSAUTH",74,0) Q "RTN","XBSAUTH",75,0) ; "RTN","XBSDDAUD") 0^154^B3675705 "RTN","XBSDDAUD",1,0) XBSDDAUD ;IHS/SET/GTH - SET DICTIONARY AUDIT(S) ; [ 10/29/2002 7:42 AM ] "RTN","XBSDDAUD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSDDAUD",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine. "RTN","XBSDDAUD",4,0) ; This routine allows you to toggle the dictionary (dd) audit "RTN","XBSDDAUD",5,0) ; flag for selected files. The global location for dictionary "RTN","XBSDDAUD",6,0) ; audit is: ^DD(FILE,0,"DDA") "RTN","XBSDDAUD",7,0) ; If the valuey is "Y", dd audit is on. Any other value, or the "RTN","XBSDDAUD",8,0) ; absence of the node, means dd audit is off. "RTN","XBSDDAUD",9,0) ; "RTN","XBSDDAUD",10,0) START ; "RTN","XBSDDAUD",11,0) W !!,"^XBSDDAUD - This routine toggles the data dictionary audit flag(s)." "RTN","XBSDDAUD",12,0) D ^XBDSET "RTN","XBSDDAUD",13,0) Q:'$D(^UTILITY("XBDSET",$J)) "RTN","XBSDDAUD",14,0) D DEV "RTN","XBSDDAUD",15,0) Q:POP "RTN","XBSDDAUD",16,0) D DISP "RTN","XBSDDAUD",17,0) Q:'$$DIR^XBDIR("Y","Proceed to toggling dd audit for file(s)","N") "RTN","XBSDDAUD",18,0) D SET "RTN","XBSDDAUD",19,0) KILL X,Y,^UTILITY("XBDSET",$J) "RTN","XBSDDAUD",20,0) Q "RTN","XBSDDAUD",21,0) ; "RTN","XBSDDAUD",22,0) DISP ; Display current dd audit values for file(s). "RTN","XBSDDAUD",23,0) NEW F,G,P "RTN","XBSDDAUD",24,0) W !,"File #",?15,"File Name",?50,"Global",?65,"dd Audit On/Off" "RTN","XBSDDAUD",25,0) F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D "RTN","XBSDDAUD",26,0) . S G=$G(^DIC(F,0,"GL")) "RTN","XBSDDAUD",27,0) . S P=$G(^DD(F,0,"DDA")) "RTN","XBSDDAUD",28,0) . W !,F,?15,$$FNAME^XBFUNC(F),?50,G,?65,$S(P="Y":"on",1:"off") "RTN","XBSDDAUD",29,0) .Q "RTN","XBSDDAUD",30,0) ; "RTN","XBSDDAUD",31,0) Q "RTN","XBSDDAUD",32,0) ; "RTN","XBSDDAUD",33,0) DEV ; Select device for report. "RTN","XBSDDAUD",34,0) W ! "RTN","XBSDDAUD",35,0) S %=$$PB "RTN","XBSDDAUD",36,0) I %=U!$D(DTOUT)!$D(DUOUT) Q "RTN","XBSDDAUD",37,0) I %="B" D VIEWR^XBLM("DISP^XBSDDAUD"),EN^XBVK("VALM") Q "RTN","XBSDDAUD",38,0) D ^%ZIS "RTN","XBSDDAUD",39,0) Q "RTN","XBSDDAUD",40,0) ; "RTN","XBSDDAUD",41,0) PB() ; "RTN","XBSDDAUD",42,0) Q $$DIR^XBDIR("SO^P:PRINT Output;B:BROWSE Output on Screen","Do you want to ","PRINT","","","",2) "RTN","XBSDDAUD",43,0) ; "RTN","XBSDDAUD",44,0) SET ; Set DDA for the file(s). "RTN","XBSDDAUD",45,0) NEW F,G,P,Y "RTN","XBSDDAUD",46,0) S Y=$$DIR^XBDIR("S^1:ON;2:OFF","Set 'dd audit' ON or OFF?","OFF") "RTN","XBSDDAUD",47,0) Q:$D(DUOUT)!$D(DTOUT) "RTN","XBSDDAUD",48,0) S Y=$S(Y=1:"Y",1:"") "RTN","XBSDDAUD",49,0) W ! "RTN","XBSDDAUD",50,0) F F=0:0 S F=$O(^UTILITY("XBDSET",$J,F)) Q:F'=+F D "RTN","XBSDDAUD",51,0) . Q:'$D(^DD(F)) "RTN","XBSDDAUD",52,0) . S ^DD(F,0,"DDA")=Y "RTN","XBSDDAUD",53,0) . W !,F," set ",$S(Y="Y":"on",1:"off") "RTN","XBSDDAUD",54,0) .Q "RTN","XBSDDAUD",55,0) ; "RTN","XBSDDAUD",56,0) Q "RTN","XBSDDAUD",57,0) ; "RTN","XBSFGBL") 0^155^B2051189 "RTN","XBSFGBL",1,0) XBSFGBL(S,G,F) ; IHS/ADC/GTH - RETURN SUBFILE GLOBAL REFERENCE ; [ 02/07/97 3:02 PM ] "RTN","XBSFGBL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSFGBL",3,0) ; "RTN","XBSFGBL",4,0) ; NOTE TO PROGRAMMERS; Use entry point EN. Do not use the "RTN","XBSFGBL",5,0) ; first line of this routine, as pending initiatives in MDC "RTN","XBSFGBL",6,0) ; might make a formal list on the first line of a routine "RTN","XBSFGBL",7,0) ; invalid. GTH 07-10-95 "RTN","XBSFGBL",8,0) ; "RTN","XBSFGBL",9,0) ; Given a file or subfile number and global reference form, "RTN","XBSFGBL",10,0) ; this routine will return the global reference in the form "RTN","XBSFGBL",11,0) ; specified. "RTN","XBSFGBL",12,0) ; "RTN","XBSFGBL",13,0) ; F (form) is optional but if passed should equal 1 or 2. "RTN","XBSFGBL",14,0) ; If F is not passed the default form will be 1. "RTN","XBSFGBL",15,0) ; "RTN","XBSFGBL",16,0) ; F = 1 will be in the form ^GLOBAL(DA(2),11,DA(1),11,DA, "RTN","XBSFGBL",17,0) ; F = 2 will be in the form ^GLOBAL(D0,11,D1,11,D2, "RTN","XBSFGBL",18,0) ; "RTN","XBSFGBL",19,0) ; Formal list: "RTN","XBSFGBL",20,0) ; "RTN","XBSFGBL",21,0) ; 1) S = subfile number (call by value) "RTN","XBSFGBL",22,0) ; 2) G = global reference (call by reference) "RTN","XBSFGBL",23,0) ; 3) F = global reference form (call by value) "RTN","XBSFGBL",24,0) ; "RTN","XBSFGBL",25,0) ; *** NO ERROR CHECKING DONE *** "RTN","XBSFGBL",26,0) ; "RTN","XBSFGBL",27,0) START ; "RTN","XBSFGBL",28,0) ; D = Field "RTN","XBSFGBL",29,0) ; I = Counter "RTN","XBSFGBL",30,0) ; L = Level "RTN","XBSFGBL",31,0) ; N = Node "RTN","XBSFGBL",32,0) ; P = Parent "RTN","XBSFGBL",33,0) ; "RTN","XBSFGBL",34,0) NEW D,I,L,N,P "RTN","XBSFGBL",35,0) ; "RTN","XBSFGBL",36,0) S G="",L=1 "RTN","XBSFGBL",37,0) I '$D(^DD(S,0,"UP")) D NOPARENT Q "RTN","XBSFGBL",38,0) D BACKUP "RTN","XBSFGBL",39,0) S G=^DIC(P,0,"GL") "RTN","XBSFGBL",40,0) I $G(F)=2 D S G=G_"D"_(I+1)_"," I 1 "RTN","XBSFGBL",41,0) . F I=0:1 S G=G_"D"_I_","_N(99-L)_",",L=L-1 Q:L=0 "RTN","XBSFGBL",42,0) . Q "RTN","XBSFGBL",43,0) E D S G=G_"DA," "RTN","XBSFGBL",44,0) . F L=L:-1:0 Q:L=0 S G=G_"DA("_L_"),"_N(99-L)_"," "RTN","XBSFGBL",45,0) . Q "RTN","XBSFGBL",46,0) Q "RTN","XBSFGBL",47,0) ; "RTN","XBSFGBL",48,0) BACKUP ; BACKUP TREE "RTN","XBSFGBL",49,0) S P=^DD(S,0,"UP") "RTN","XBSFGBL",50,0) S D=$O(^DD(P,"SB",S,"")) "RTN","XBSFGBL",51,0) S N(99-L)=$P($P(^DD(P,D,0),"^",4),";",1) "RTN","XBSFGBL",52,0) S:N(99-L)'=+N(99-L) N(99-L)=""""_N(99-L)_"""" "RTN","XBSFGBL",53,0) I $D(^DD(P,0,"UP")) S S=P,L=L+1 D BACKUP "RTN","XBSFGBL",54,0) Q "RTN","XBSFGBL",55,0) ; "RTN","XBSFGBL",56,0) NOPARENT ; for no parent "RTN","XBSFGBL",57,0) S G=^DIC(S,0,"GL") "RTN","XBSFGBL",58,0) I $G(F)=2 S G=G_"D0" I 1 "RTN","XBSFGBL",59,0) E S G=G_"DA," "RTN","XBSFGBL",60,0) Q "RTN","XBSFGBL",61,0) ; "RTN","XBSFGBL",62,0) DIC(S) ;PEP - Extrinsic entry to return root global from FILE number "RTN","XBSFGBL",63,0) NEW G "RTN","XBSFGBL",64,0) D EN(S,.G) "RTN","XBSFGBL",65,0) S G=$P(G,"DA,") "RTN","XBSFGBL",66,0) Q G "RTN","XBSFGBL",67,0) ; "RTN","XBSFGBL",68,0) EN(S,G,F) ;PEP - RETURN SUBFILE GLOBAL REFERENCE "RTN","XBSFGBL",69,0) G START "RTN","XBSFGBL",70,0) ;-------------------- "RTN","XBSIC") 0^156^B20923740 "RTN","XBSIC",1,0) XBSIC ;IHS/SET/GTH - LIST ID,SP,FD NODES ON SELECTED FILES ; [ 12/05/2002 4:28 PM ] "RTN","XBSIC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSIC",3,0) ;IHS/SET/GTH XB*3*9 10/29/2002 New Routine. "RTN","XBSIC",4,0) ; This routine lists the IDENTIFIERS, SPECIFIERS, and "RTN","XBSIC",5,0) ; CONDITIONALS from selected files. "RTN","XBSIC",6,0) ; "RTN","XBSIC",7,0) ; Thanks to E. Don Enos for the original routine in Sep 1997. "RTN","XBSIC",8,0) ; "RTN","XBSIC",9,0) START ; "RTN","XBSIC",10,0) D INIT "RTN","XBSIC",11,0) Q:XBQFLG "RTN","XBSIC",12,0) D DBQUE "RTN","XBSIC",13,0) Q "RTN","XBSIC",14,0) ; "RTN","XBSIC",15,0) INIT ; INITIALIZATION "RTN","XBSIC",16,0) D EN^XBVK("XB") "RTN","XBSIC",17,0) S (XBBT)=$H,XBJOB=$J "RTN","XBSIC",18,0) S XBQFLG=1 "RTN","XBSIC",19,0) I '$G(DUZ(2)) W !!,"Your DUZ(2) is not set!",!! Q "RTN","XBSIC",20,0) I '$G(^AUTTLOC(DUZ(2),0)) W !!,"The site specified in your DUZ(2) does not exist!",!! Q "RTN","XBSIC",21,0) KILL ^XTMP("XBSIC",XBJOB) "RTN","XBSIC",22,0) D ^XBKVAR "RTN","XBSIC",23,0) D ^XBDSET ; get files to check "RTN","XBSIC",24,0) I '$O(^UTILITY("XBDSET",XBJOB,0)) Q ; quit if no files selected "RTN","XBSIC",25,0) S XBQFLG=0 "RTN","XBSIC",26,0) Q "RTN","XBSIC",27,0) ; "RTN","XBSIC",28,0) DBQUE ; call to XBDBQUE "RTN","XBSIC",29,0) W ! "RTN","XBSIC",30,0) S DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen",DIR("A")="Do you wish to",DIR("B")="P" "RTN","XBSIC",31,0) KILL DA "RTN","XBSIC",32,0) D ^DIR "RTN","XBSIC",33,0) KILL DIR "RTN","XBSIC",34,0) Q:$D(DIRUT) "RTN","XBSIC",35,0) I Y="B" D BROWSE Q "RTN","XBSIC",36,0) S XBRP="LIST^XBSIC",XBRC="FILES^XBSIC",XBRX="EOJ^XBSIC",XBNS="XB" "RTN","XBSIC",37,0) D ^XBDBQUE "RTN","XBSIC",38,0) Q "RTN","XBSIC",39,0) ; "RTN","XBSIC",40,0) BROWSE ; "RTN","XBSIC",41,0) S XBRP="VIEWR^XBLM(""LIST^XBSIC"")" "RTN","XBSIC",42,0) S XBRC="FILES^XBSIC",XBRX="EOJ^XBSIC",XBIOP=0 "RTN","XBSIC",43,0) D ^XBDBQUE "RTN","XBSIC",44,0) Q "RTN","XBSIC",45,0) ; "RTN","XBSIC",46,0) FILES ; PROCESS ALL FILES "RTN","XBSIC",47,0) S XBFILE=0 "RTN","XBSIC",48,0) F S XBFILE=$O(^UTILITY("XBDSET",XBJOB,XBFILE)) Q:'XBFILE D FILE(XBFILE) Q:XBQFLG "RTN","XBSIC",49,0) Q "RTN","XBSIC",50,0) ; "RTN","XBSIC",51,0) FILE(XBFILE) ; PROCESS ONE FILE (CALLED RECURSIVELY) "RTN","XBSIC",52,0) NEW L,V,W,X,Y "RTN","XBSIC",53,0) I '$D(ZTQUEUED),'$D(IO("S")),$E(IOST,1,2)="C-" W "." "RTN","XBSIC",54,0) S ^XTMP("XBSIC",XBJOB,XBFILE,"!")="" ; file marker "RTN","XBSIC",55,0) F X="FD","ID","SP" D "RTN","XBSIC",56,0) . I '$D(^DD(XBFILE,0,X)) Q ; quit if no node "RTN","XBSIC",57,0) . I X="ID",'$O(^DD(XBFILE,0,X,0)) Q ; quit if no real identifier "RTN","XBSIC",58,0) . S Y=0 "RTN","XBSIC",59,0) . F S Y=$O(^DD(XBFILE,0,X,Y)) Q:Y="" I Y D "RTN","XBSIC",60,0) .. S V=$G(^DD(XBFILE,0,X,Y)) ; get value & set $ZR "RTN","XBSIC",61,0) .. I X="SP" S W=$S(V'="":"="_V,1:"") D SET Q "RTN","XBSIC",62,0) .. I X="ID" S W="" D SET Q "RTN","XBSIC",63,0) .. S L="" "RTN","XBSIC",64,0) .. F S L=$O(^DD(XBFILE,0,X,Y,L)) Q:L="" D "RTN","XBSIC",65,0) ... S V=$G(^DD(XBFILE,0,X,Y,L)) ; get value & set $ZR "RTN","XBSIC",66,0) ... S W="="_V D SET "RTN","XBSIC",67,0) ... Q "RTN","XBSIC",68,0) .. Q "RTN","XBSIC",69,0) . Q "RTN","XBSIC",70,0) ;I $P($G(^DD(XBFILE,.01,0)),U,2)["P" S X=^(0) D RECURSE ;ptr chain "RTN","XBSIC",71,0) I $P($G(^DD(XBFILE,.01,0)),U,2)["P" S X=^(0) I '(XBFILE=+$P($P(X,U,2),"P",2)) D FILE(+$P($P(X,U,2),"P",2)) "RTN","XBSIC",72,0) Q "RTN","XBSIC",73,0) Q:$G(RECURSE) ; quit if recursing "RTN","XBSIC",74,0) S XBFLD=.01 "RTN","XBSIC",75,0) F S XBFLD=$O(^DD(XBFILE,XBFLD)) Q:'XBFLD I $D(^(XBFLD,0)) S X=^(0) D "RTN","XBSIC",76,0) . Q:$P(X,U,2)'["P" ; quit if not pointer "RTN","XBSIC",77,0) . D RECURSE "RTN","XBSIC",78,0) . Q "RTN","XBSIC",79,0) Q "RTN","XBSIC",80,0) ; "RTN","XBSIC",81,0) SET ; SET ONE LINE "RTN","XBSIC",82,0) S ^XTMP("XBSIC",XBJOB,XBFILE,$$LGR^%ZOSV_W)="" "RTN","XBSIC",83,0) Q "RTN","XBSIC",84,0) ; "RTN","XBSIC",85,0) RECURSE ; RECURSE FOR FILES BEING POINTED TO "RTN","XBSIC",86,0) Q:XBFILE=+$P($P(X,U,2),"P",2) ; quit if self reference "RTN","XBSIC",87,0) NEW XBFILE,RECURSE "RTN","XBSIC",88,0) S RECURSE=1 "RTN","XBSIC",89,0) S XBFILE=+$P($P(X,U,2),"P",2) "RTN","XBSIC",90,0) D FILE "RTN","XBSIC",91,0) Q "RTN","XBSIC",92,0) ; "RTN","XBSIC",93,0) LIST ; LIST OUTPUT "RTN","XBSIC",94,0) U IO "RTN","XBSIC",95,0) D HEAD "RTN","XBSIC",96,0) S XBFILE=0 "RTN","XBSIC",97,0) F S XBFILE=$O(^XTMP("XBSIC",XBJOB,XBFILE)) Q:'XBFILE D Q:XBQFLG "RTN","XBSIC",98,0) . D F Q:XBQFLG "RTN","XBSIC",99,0) . W !,?4,XBFILE_" ("_$P($G(^DIC(XBFILE,0)),U)_")",! "RTN","XBSIC",100,0) . S XBDEV="" "RTN","XBSIC",101,0) . F S XBDEV=$O(^XTMP("XBSIC",XBJOB,XBFILE,XBDEV)) Q:XBDEV="" D WRITE Q:XBQFLG "RTN","XBSIC",102,0) . Q "RTN","XBSIC",103,0) Q "RTN","XBSIC",104,0) ; "RTN","XBSIC",105,0) WRITE ; WRITE ONE LINE "RTN","XBSIC",106,0) Q:XBDEV="!" ; quit if file marker "RTN","XBSIC",107,0) D F "RTN","XBSIC",108,0) Q:XBQFLG "RTN","XBSIC",109,0) W XBDEV,! "RTN","XBSIC",110,0) Q "RTN","XBSIC",111,0) ; "RTN","XBSIC",112,0) F ;Form feed "RTN","XBSIC",113,0) I ($Y+4)>IOSL D "RTN","XBSIC",114,0) . I '$D(ZTQUEUED),'$D(IO("S")),$E(IOST,1,2)'="P-" D PAUSE S:$D(DIRUT) XBQFLG=1 "RTN","XBSIC",115,0) . Q:XBQFLG "RTN","XBSIC",116,0) . W @IOF "RTN","XBSIC",117,0) . D HEAD "RTN","XBSIC",118,0) . Q "RTN","XBSIC",119,0) Q "RTN","XBSIC",120,0) ; "RTN","XBSIC",121,0) PAUSE ; PAUSE FOR USER "RTN","XBSIC",122,0) Q:$E(IOST)'="C" "RTN","XBSIC",123,0) Q:$D(ZTQUEUED)!'(IOT="TRM")!$D(IO("S")) "RTN","XBSIC",124,0) S DIR(0)="E",DIR("A")="Press any key to continue" "RTN","XBSIC",125,0) KILL DIRUT "RTN","XBSIC",126,0) D ^DIR "RTN","XBSIC",127,0) KILL DIR "RTN","XBSIC",128,0) Q "RTN","XBSIC",129,0) ; "RTN","XBSIC",130,0) HEAD ; WRITE HEADER "RTN","XBSIC",131,0) I '$D(ZTQUEUED),'$D(IO("S")),$E(IOST,1,2)="C-" W @IOF "RTN","XBSIC",132,0) S XBPG=$G(XBPG)+1 "RTN","XBSIC",133,0) W " ID/SP/FD REPORT run at ",$P(^AUTTLOC(DUZ(2),0),U,2)," on ",$$FMTE^XLFDT(DT),?75,$J(XBPG,5),! "RTN","XBSIC",134,0) W $$REPEAT^XLFSTR("=",80),! "RTN","XBSIC",135,0) Q "RTN","XBSIC",136,0) ; "RTN","XBSIC",137,0) Q Q "RTN","XBSIC",138,0) ; "RTN","XBSIC",139,0) EOJ ; "RTN","XBSIC",140,0) S XBET=$H,XBTS=(86400*($P(XBET,",")-$P(XBBT,",")))+($P(XBET,",",2)-$P(XBBT,",",2)),XBH=+$P(XBTS/3600,"."),XBTS=XBTS-(XBH*3600),XBM=+$P(XBTS/60,"."),XBTS=XBTS-(XBM*60),XBS=XBTS "RTN","XBSIC",141,0) W !!,"RUN TIME (H.M.S): "_XBH_"."_XBM_"."_XBS,! "RTN","XBSIC",142,0) KILL ^XTMP("XBSIC",XBJOB) "RTN","XBSIC",143,0) KILL ^UTILITY("XBDSET",XBJOB) "RTN","XBSIC",144,0) D EN^XBVK("XB") "RTN","XBSIC",145,0) Q "RTN","XBSIC",146,0) ; "RTN","XBSITE") 0^157^B3208049 "RTN","XBSITE",1,0) XBSITE ; IHS/ADC/GTH - SET "DUZ(2)" ; [ 02/07/97 3:02 PM ] "RTN","XBSITE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSITE",3,0) ; "RTN","XBSITE",4,0) L1 ; "RTN","XBSITE",5,0) KILL DIC "RTN","XBSITE",6,0) G:$D(DUZ)=0!($D(DUZ)=10) ERRMSG "RTN","XBSITE",7,0) I ('$D(^DIC(3,DUZ,0))),('$D(^VA(200,DUZ,0))) G ERRMSG "RTN","XBSITE",8,0) I ('$D(^DIC(3,DUZ,2,0))),('$D(^VA(200,DUZ,2,0))) G ERRMSG1 "RTN","XBSITE",9,0) I +DUZ(2)>0 S DIC("B")=$P(^DIC(4,DUZ(2),0),"^",1) G B1 "RTN","XBSITE",10,0) S DIC("B")="Site set to zero (0) for Universal" "RTN","XBSITE",11,0) B1 ; "RTN","XBSITE",12,0) W !! "RTN","XBSITE",13,0) D ASK "RTN","XBSITE",14,0) S SITENUM=DUZ(2) "RTN","XBSITE",15,0) KILL DIC("A"),DIC("B"),DA,DR,Y "RTN","XBSITE",16,0) Q "RTN","XBSITE",17,0) ; "RTN","XBSITE",18,0) ASK ; "RTN","XBSITE",19,0) S DIC="^DIC(3,DUZ,2,",DIC("A")="Enter your facility's name: ",DIC(0)="QAEM" "RTN","XBSITE",20,0) I $D(^VA(200,DUZ,2,0)) S DIC="^VA(200,DUZ,2," "RTN","XBSITE",21,0) D ^DIC "RTN","XBSITE",22,0) G:X["?" ASK "RTN","XBSITE",23,0) I X="^",$D(DIC("B")) W !,*7,"The default facility remains ",DIC("B"),!! Q "RTN","XBSITE",24,0) S DUZ(2)=+Y "RTN","XBSITE",25,0) I DUZ(2)<1 S DUZ(2)=$P(^AUTTSITE(1,0),U,1) W !,*7,"The default facility has been set to ",$P(^DIC(4,DUZ(2),0),"^",1),!! "RTN","XBSITE",26,0) S SITENUM=DUZ(2) "RTN","XBSITE",27,0) Q "RTN","XBSITE",28,0) ; "RTN","XBSITE",29,0) SET ;PEP - Request Set of DUZ(2) from applications. "RTN","XBSITE",30,0) G L1 "RTN","XBSITE",31,0) ; "RTN","XBSITE",32,0) ERRMSG ; "RTN","XBSITE",33,0) W !!,"USER not set in DUZ - use KERNEL!" "RTN","XBSITE",34,0) Q "RTN","XBSITE",35,0) ; "RTN","XBSITE",36,0) ERRMSG1 ; "RTN","XBSITE",37,0) W !!,"No Divisions (facilities) set in USER file!" "RTN","XBSITE",38,0) Q "RTN","XBSITE",39,0) ; "RTN","XBSITE",40,0) ERRMSG2 ; "RTN","XBSITE",41,0) W !!,"That facility is not included in your Divisions field in the USER file!" "RTN","XBSITE",42,0) Q "RTN","XBSITE",43,0) ; "RTN","XBSUMBLD") 0^158^B15194366 "RTN","XBSUMBLD",1,0) XBSUMBLD ; IHS/ADC/GTH - ROUTINE INTEGRITY CHECK GENERATOR ; [ 10/29/2002 7:42 AM ] "RTN","XBSUMBLD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBSUMBLD",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBSUMBLD",4,0) ; "RTN","XBSUMBLD",5,0) ; This routine requests the user to select a set of routines and "RTN","XBSUMBLD",6,0) ; generates an integrity checking routine for the selected routines. "RTN","XBSUMBLD",7,0) ; The user is asked to enter the name of the generated routine. "RTN","XBSUMBLD",8,0) ; "RTN","XBSUMBLD",9,0) ; The VA's equivalent routine is XTSUMBLD, which will also create "RTN","XBSUMBLD",10,0) ; integrity checking routine(s). "RTN","XBSUMBLD",11,0) ; "RTN","XBSUMBLD",12,0) START ; "RTN","XBSUMBLD",13,0) W !,"NOTE: The VA's equivalent routine is XTSUMBLD, which" "RTN","XBSUMBLD",14,0) W !," will also create integrity checking routine(s).",!! "RTN","XBSUMBLD",15,0) Q:'$$DIR^XBDIR("E") "RTN","XBSUMBLD",16,0) NEW BYTE,COUNT,QUIT,RTDATE,RTN,RTNAME,VERSION "RTN","XBSUMBLD",17,0) KILL ^UTILITY($J),^TMP("XBSUMBLD",$J) "RTN","XBSUMBLD",18,0) D ^XBKVAR "RTN","XBSUMBLD",19,0) X ^%ZOSF("RSEL") "RTN","XBSUMBLD",20,0) I $O(^UTILITY($J,""))="" D EOJ Q "RTN","XBSUMBLD",21,0) S RTNAME=$$DIR^XBDIR("F^5:8^K:X'?1U.U X","Enter name of routine to be generated: ","","","Example: APCDINTG") "RTN","XBSUMBLD",22,0) I $D(DIRUT) D EOJ Q "RTN","XBSUMBLD",23,0) D CHECKRTN "RTN","XBSUMBLD",24,0) I 'Y D EOJ Q "RTN","XBSUMBLD",25,0) S VERSION=" ;;"_$$DIR^XBDIR("F^1:5^K:'(X?1.2N!(X?1.2N1"".""1.2N)) X","Enter version number","","","Must be n or n.n where the length of n is 1-2") "RTN","XBSUMBLD",26,0) I $D(DIRUT) D EOJ Q "RTN","XBSUMBLD",27,0) S VERSION=VERSION_";"_$$DIR^XBDIR("FO^2:30","Enter package name") "RTN","XBSUMBLD",28,0) I $D(DTOUT)!($D(DUOUT)) D EOJ Q "RTN","XBSUMBLD",29,0) ; begin Y2K fix block "RTN","XBSUMBLD",30,0) ;S Y=$$DIR^XBDIR("D","Enter date","TODAY") "RTN","XBSUMBLD",31,0) S Y=$$DIR^XBDIR("D^::E","Enter date","TODAY") ;Y2000 "RTN","XBSUMBLD",32,0) ; end Y2K fix block "RTN","XBSUMBLD",33,0) I $D(DIRUT) D EOJ Q "RTN","XBSUMBLD",34,0) D DD^%DT "RTN","XBSUMBLD",35,0) S RTDATE=Y,VERSION=VERSION_";;"_Y "RTN","XBSUMBLD",36,0) F %=1:1:11 S X=$P($T(@("LINE"_%)),";;",2,99),@("XBSUMBLD("_%_")=X") "RTN","XBSUMBLD",37,0) F %=1:1:3 S X=$P($T(@("CODE"_%)),";;",2,99),@("XBSUMBLD(""CODE"_%_""")=X") "RTN","XBSUMBLD",38,0) KILL %,X,Y "RTN","XBSUMBLD",39,0) X XBSUMBLD(1) "RTN","XBSUMBLD",40,0) Q "RTN","XBSUMBLD",41,0) ; "RTN","XBSUMBLD",42,0) CHECKRTN ; "RTN","XBSUMBLD",43,0) S Y=1,X=RTNAME "RTN","XBSUMBLD",44,0) X ^%ZOSF("TEST") "RTN","XBSUMBLD",45,0) E Q "RTN","XBSUMBLD",46,0) S Y=$$DIR^XBDIR("YO","Routine already exists. Want to recreate it","NO") "RTN","XBSUMBLD",47,0) I $D(DIRUT) S Y=0 "RTN","XBSUMBLD",48,0) Q "RTN","XBSUMBLD",49,0) ; "RTN","XBSUMBLD",50,0) EOJ ; "RTN","XBSUMBLD",51,0) KILL %,DTOUT,DUOUT,DIRUT,DIROUT,X,XBSUMBLD,Y,^UTILITY($J) "RTN","XBSUMBLD",52,0) Q "RTN","XBSUMBLD",53,0) ;IHS/SET/GTH XB*3*9 10/29/2002 LINE2 mod'd seed of RTN from "" to 0. "RTN","XBSUMBLD",54,0) ; The only good thing I can say about the following is that it works. "RTN","XBSUMBLD",55,0) LINE1 ;;X XBSUMBLD(2),XBSUMBLD(6),XBSUMBLD(11) "RTN","XBSUMBLD",56,0) LINE2 ;;S RTN=0 F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN S (BYTE,COUNT)=0 S X=$T(+1),X=$P(X," [ ",1) X XBSUMBLD(4),XBSUMBLD(3),XBSUMBLD(5) "RTN","XBSUMBLD",57,0) LINE3 ;;F I=2:1 S X=$T(+I) Q:X="" X XBSUMBLD(4) "RTN","XBSUMBLD",58,0) LINE4 ;;F J=1:1 S Y=$E(X,J) Q:Y="" S BYTE=BYTE+1,COUNT=COUNT+$A(Y) "RTN","XBSUMBLD",59,0) LINE5 ;;S ^TMP("XBSUMBLD",$J,RTN)=BYTE_"^"_COUNT "RTN","XBSUMBLD",60,0) LINE6 ;;ZR S X=RTNAME_" ;INTEGRITY CHECKER;"_RTDATE ZI X ZI VERSION ZI " ;" ZI "START ;" ZI " NEW BYTE,COUNT,RTN" ZI " K ^UTILITY($J)" X XBSUMBLD(7),XBSUMBLD(8),XBSUMBLD(9),XBSUMBLD(10) ZS @RTNAME "RTN","XBSUMBLD",61,0) LINE7 ;;F I=1:1:3 S V="CODE"_I S Z=XBSUMBLD(V) Q:Z="" ZI Z "RTN","XBSUMBLD",62,0) LINE8 ;;ZI " Q" ZI " ;" ZI "LINE1 ;;X XBSUMBLD(2),XBSUMBLD(6)" F I=2:1:4 S Z="LINE"_I_" ;;"_XBSUMBLD(I) ZI Z "RTN","XBSUMBLD",63,0) LINE9 ;;ZI "LINE5 ;;S B=$P(^UTILITY($J,RTN),""^"",1),C=$P(^(RTN),""^"",2) I B'=BYTE!(C'=COUNT) W "" has been modified""" ZI "LINE6 ;;K XBSUMBLD,B,C,I,J,R,X,Y" ZI " ;" ZI "LIST ;" "RTN","XBSUMBLD",64,0) LINE10 ;;S RTN="" F S RTN=$O(^TMP("XBSUMBLD",$J,RTN)) Q:RTN="" S Z=^(RTN),Z=" ;;"_RTN_"^"_Z ZI Z "RTN","XBSUMBLD",65,0) LINE11 ;;K %,XBSUMBLD,DTOUT,DUOUT,DIRUT,DIROUT,I,J,V,X,Y,Z,^UTILITY($J),^TMP("XBSUMBLD",$J) "RTN","XBSUMBLD",66,0) CODE1 ;; F I=1:1 S X=$T(LIST+I) Q:X="" S X=$P(X,";;",2),R=$P(X,"^",1),B=$P(X,"^",2),C=$P(X,"^",3),^UTILITY($J,R)=B_"^"_C "RTN","XBSUMBLD",67,0) CODE2 ;; F I=1:1:6 S X=$P($T(@("LINE"_I)),";;",2,99),@("XBSUMBLD("_I_")=X") "RTN","XBSUMBLD",68,0) CODE3 ;; X XBSUMBLD(1) "RTN","XBTM") 0^159^B26975333 "RTN","XBTM",1,0) XBTM ; IHS/ADC/GTH - TECH MANUAL : MAIN ; [ 02/07/97 3:02 PM ] "RTN","XBTM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM",3,0) ; "RTN","XBTM",4,0) ; This routine, and subsequent routines in the XBTM* "RTN","XBTM",5,0) ; namespace, produce a technical manual from information "RTN","XBTM",6,0) ; contained in the package. The manual is approximately 80 "RTN","XBTM",7,0) ; pages. All, or individual chapters can be printed. "RTN","XBTM",8,0) ; "RTN","XBTM",9,0) D HOME^%ZIS,DT^DICRW "RTN","XBTM",10,0) NEW DIR,XBSEL "RTN","XBTM",11,0) SEL ; "RTN","XBTM",12,0) S XBSEL=$$DIR^XBDIR("S^1:only one chapter;A:All chapters","Print 1 chapter, or all? 1/A","1") "RTN","XBTM",13,0) S:$D(DUOUT) DIRUT=1 "RTN","XBTM",14,0) Q:$D(DIRUT) "RTN","XBTM",15,0) I XBSEL S XBSEL=$$DIR^XBDIR("N^1:15:0","Which chapter?","","","","^D CHAPS^XBTM") S:$D(DUOUT) DIRUT=1 "RTN","XBTM",16,0) Q:$D(DIRUT) "RTN","XBTM",17,0) DEV ; "RTN","XBTM",18,0) S %ZIS="OPQ" "RTN","XBTM",19,0) D ^%ZIS "RTN","XBTM",20,0) I POP S IOP=$I D ^%ZIS G K "RTN","XBTM",21,0) G:'$D(IO("Q")) START "RTN","XBTM",22,0) KILL IO("Q") "RTN","XBTM",23,0) I $D(IO("S"))!($E(IOST)'="P") W *7,!,"Please queue to system printers." D ^%ZISC G DEV "RTN","XBTM",24,0) S ZTRTN="START^XBTM",ZTDESC="TECHNICAL MANUAL.",ZTIO=ION_";"_IOST_";"_IOM_";"_IOSL,ZTSAVE("XBSEL")="" "RTN","XBTM",25,0) D ^%ZTLOAD "RTN","XBTM",26,0) G:'$D(ZTSK) DEV "RTN","XBTM",27,0) K ; "RTN","XBTM",28,0) KILL XB,ZTSK "RTN","XBTM",29,0) D ^%ZISC "RTN","XBTM",30,0) G END "RTN","XBTM",31,0) ; "RTN","XBTM",32,0) START ;EP - TaskMan. "RTN","XBTM",33,0) NEW DIWL,DIWR,DIWF,XBBM,XBCONT,XBSAVX,XBTM,XBTITL,XBPG,XBHDR,XBHDRE,XBHDRO,XBDASH "RTN","XBTM",34,0) D ^XBKTMP "RTN","XBTM",35,0) S DIWL=10,DIWR=74,DIWF="W",XBBM=IOSL-5,XBTM=6,XBTITL="IHS/VA UTILITIES TECHNICAL MANUAL",XBPG=0,XBHDR="Index",(XBHDRE,XBHDRO)="",XBDASH="",$P(XBDASH,"-",81)="",XBDASH=$E(XBDASH,DIWL,DIWR) "RTN","XBTM",36,0) U IO "RTN","XBTM",37,0) I 'XBSEL D ^XBTMI S DIWF="WN" D ^XBTMTI W @IOF S DIWF="W" D ^XBTMPR W @IOF "RTN","XBTM",38,0) BODY ; "RTN","XBTM",39,0) S (XBCONT,XBHDR,XBPG)=0 "RTN","XBTM",40,0) KILL ^TMP("XBTM-CONTENTS",$J) "RTN","XBTM",41,0) I XBSEL S XBCHAP=XBSEL D MAKEHDRS,TOF Q:$D(DUOUT) D HDR(XBCHAP),@("^XBTM"_XBCHAP) G END "RTN","XBTM",42,0) F XBCHAP=1:1:15 D MAKEHDRS,TOF Q:$D(DUOUT) D HDR(XBCHAP),@("^XBTM"_XBCHAP) "RTN","XBTM",43,0) ; "RTN","XBTM",44,0) INDEX ; "RTN","XBTM",45,0) S XBHDR="Index" "RTN","XBTM",46,0) D TOF "RTN","XBTM",47,0) G:$D(DUOUT) HAT "RTN","XBTM",48,0) W !!! "RTN","XBTM",49,0) S X="|NOWRAP||SETTAB(""C"")||TAB|INDEX" "RTN","XBTM",50,0) D ^DIWP,^DIWW "RTN","XBTM",51,0) W !!! "RTN","XBTM",52,0) D CONT("INDEX^^"_XBPG) "RTN","XBTM",53,0) S (XB,XBCONT)="",$P(XBCONT,".",81)="" "RTN","XBTM",54,0) F S XB=$O(^TMP("XBTM-INDEX",$J,XB)) Q:XB="" Q:$D(DUOUT) S X="" D "RTN","XBTM",55,0) .F XBX=0:0 S XBX=$O(^TMP("XBTM-INDEX",$J,XB,XBX)) Q:$D(DUOUT) S X=X_XBX_"," I '$O(^(XBX)) D Q "RTN","XBTM",56,0) ..S X=XB_$E(XBCONT,1,DIWR-DIWL-$L(XB)-$L(X))_$E(X,1,$L(X)-1) "RTN","XBTM",57,0) ..S XBSAVX=X "RTN","XBTM",58,0) ..F S X=$E(XBSAVX,1,DIWR-DIWL),XBSAVX=$E(XBSAVX,DIWR-DIWL+1,$L(XBSAVX)) Q:'$L(X) D TOF:$Y>XBBM Q:$D(DUOUT) D ^DIWP "RTN","XBTM",59,0) ..Q "RTN","XBTM",60,0) .Q "RTN","XBTM",61,0) D ^DIWW,PAUSE^XB "RTN","XBTM",62,0) G:$D(DUOUT) HAT "RTN","XBTM",63,0) ; "RTN","XBTM",64,0) CONTENTS ; "RTN","XBTM",65,0) W @IOF,!!!!! "RTN","XBTM",66,0) S X="|SETTAB(""C"")||TAB|CONTENTS" "RTN","XBTM",67,0) D ^DIWP,^DIWW "RTN","XBTM",68,0) W !! "RTN","XBTM",69,0) S XB=0 "RTN","XBTM",70,0) F S XB=$O(^TMP("XBTM-CONTENTS",$J,XB)) Q:'+XB S X=^(XB),X=$P(X,U)_" "_$P(X,U,2)_$E(XBCONT,1,DIWR-DIWL-$L(X)+1)_$P(X,U,3) D TOF:$Y>XBBM Q:$D(DUOUT) D ^DIWP "RTN","XBTM",71,0) G:$D(DUOUT) HAT "RTN","XBTM",72,0) D ^DIWW,PAUSE^XB "RTN","XBTM",73,0) G:$D(DUOUT) HAT "RTN","XBTM",74,0) END ; "RTN","XBTM",75,0) D PAUSE^XB "RTN","XBTM",76,0) G:$D(DUOUT) HAT "RTN","XBTM",77,0) W @IOF "RTN","XBTM",78,0) HAT ; "RTN","XBTM",79,0) D ^%ZISC "RTN","XBTM",80,0) KILL XB,XBBM,XBCHAP,XBCONT,XBODD,XBHDR,XBIEN,XBPARA,XBPG,XBROOT,XBTITL,XBTM,XBX,XBY,DIC,DIWF,DIWL,DIWR "RTN","XBTM",81,0) D ^XBKTMP "RTN","XBTM",82,0) Q "RTN","XBTM",83,0) ; "RTN","XBTM",84,0) TEXT(XBLAB) ; "RTN","XBTM",85,0) F XB=1:1 S X=$P($T(@XBLAB+XB),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM",86,0) Q:$D(DUOUT) "RTN","XBTM",87,0) D ^DIWW "RTN","XBTM",88,0) Q "RTN","XBTM",89,0) ; "RTN","XBTM",90,0) PR(X) ;EP "RTN","XBTM",91,0) I X="|TOP|" D TOF Q "RTN","XBTM",92,0) D INDX(X),^DIWP,TOF:$Y>XBBM "RTN","XBTM",93,0) Q "RTN","XBTM",94,0) ; "RTN","XBTM",95,0) INDX(X) ; "RTN","XBTM",96,0) Q:'$D(XBPG) "RTN","XBTM",97,0) S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ") "RTN","XBTM",98,0) S %="" "RTN","XBTM",99,0) F S %=$O(^TMP("XBTM-I",$J,%)) Q:'$L(%) I $F(X,%) S ^TMP("XBTM-INDEX",$J,%,XBPG)="" "RTN","XBTM",100,0) Q "RTN","XBTM",101,0) ; "RTN","XBTM",102,0) HDR(XB) ; "RTN","XBTM",103,0) F X="|SETTAB(""C"")||TAB|Chapter "_XB,"|SETTAB(""C"")||TAB|"_$P($T(@XB),";",3) D ^DIWP "RTN","XBTM",104,0) W !! "RTN","XBTM",105,0) D CONT(XB_U_$P($T(@XB),";",3)_U_XBPG) "RTN","XBTM",106,0) Q "RTN","XBTM",107,0) ; "RTN","XBTM",108,0) TOF ;EP "RTN","XBTM",109,0) F Q:$Y>XBBM W ! "RTN","XBTM",110,0) I XBPG>0 W !?(DIWL-1),XBDASH,!,?$S(XBODD:DIWR-$L(XBTITL),1:DIWL-1),XBTITL "RTN","XBTM",111,0) D PAUSE^XB "RTN","XBTM",112,0) Q:$D(DUOUT) "RTN","XBTM",113,0) W @IOF "RTN","XBTM",114,0) S XBPG=XBPG+1,XBODD=XBPG#2 "RTN","XBTM",115,0) F Q:$Y=(XBTM-2) W ! "RTN","XBTM",116,0) W ?$S(XBODD:DIWR-$L("Page "_XBPG),1:DIWL-1),"Page ",XBPG "RTN","XBTM",117,0) I '(XBHDR="Index") W !?DIWL-1,$S(XBODD:XBHDRO,1:XBHDRE) "RTN","XBTM",118,0) W !?(DIWL-1),XBDASH,!! "RTN","XBTM",119,0) Q "RTN","XBTM",120,0) ; "RTN","XBTM",121,0) MAKEHDRS ; "RTN","XBTM",122,0) S (XBHDRE,XBHDRO)=$P($T(@XBCHAP),";",3) "RTN","XBTM",123,0) S XBHDRO=XBHDRO_$J("",DIWR-DIWL-$L(XBHDRO)-$L("Chapter "_XBCHAP)+1)_"Chapter "_XBCHAP "RTN","XBTM",124,0) S XBHDRE="Chapter "_XBCHAP_$J("",DIWR-DIWL-$L(XBHDRE)-$L("Chapter "_XBCHAP)+1)_XBHDRE "RTN","XBTM",125,0) Q "RTN","XBTM",126,0) ; "RTN","XBTM",127,0) CONT(X) ; "RTN","XBTM",128,0) S XBCONT=XBCONT+1,^TMP("XBTM-CONTENTS",$J,XBCONT)=X "RTN","XBTM",129,0) Q "RTN","XBTM",130,0) ; "RTN","XBTM",131,0) CHAPS ;EP - From DIR "RTN","XBTM",132,0) F %=1:1:15 W !?3,$J(%,2),". ",$P($T(@%),";",3) "RTN","XBTM",133,0) Q "RTN","XBTM",134,0) 1 ;;Facility Parameters "RTN","XBTM",135,0) 2 ;;Area Office Parameters "RTN","XBTM",136,0) 3 ;;Security Keys "RTN","XBTM",137,0) 4 ;;Options "RTN","XBTM",138,0) 5 ;;Fields in Files "RTN","XBTM",139,0) 6 ;;Archiving and Purging "RTN","XBTM",140,0) 7 ;;Callable Routines "RTN","XBTM",141,0) 8 ;;External Relations "RTN","XBTM",142,0) 9 ;;Internal Relations "RTN","XBTM",143,0) 10 ;;How to Generate On-Line Documentation "RTN","XBTM",144,0) 11 ;;Glossary "RTN","XBTM",145,0) 12 ;;System Requirements "RTN","XBTM",146,0) 13 ;;Installation notes "RTN","XBTM",147,0) 14 ;;Enhancements "RTN","XBTM",148,0) 15 ;;KILL of Unsubscripted Globals "RTN","XBTM1") 0^160^B515926 "RTN","XBTM1",1,0) XBTM1 ; IHS/ADC/GTH - TECH MANUAL : Facility Parameters ; [ 02/07/97 3:02 PM ] "RTN","XBTM1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM1",3,0) ; "RTN","XBTM1",4,0) NEW A,B,C "RTN","XBTM1",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM1",6,0) Q:$D(DUOUT) "RTN","XBTM1",7,0) D DIWW "RTN","XBTM1",8,0) Q "RTN","XBTM1",9,0) ; "RTN","XBTM1",10,0) DIWW NEW A,B,C D ^DIWW Q "RTN","XBTM1",11,0) PR(X) NEW A,B,C D PR^XBTM(X) Q "RTN","XBTM1",12,0) ;;There are no facility parameters for this package. "RTN","XBTM1",13,0) ;;|SETTAB("C")||TAB| "RTN","XBTM1",14,0) ;;|SETTAB("C")||TAB| "RTN","XBTM1",15,0) ;;### "RTN","XBTM1",16,0) ; "RTN","XBTM10") 0^161^B1882262 "RTN","XBTM10",1,0) XBTM10 ; IHS/ADC/GTH - TECH MANUAL : ONLINE DOC ; [ 02/07/97 3:02 PM ] "RTN","XBTM10",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM10",3,0) ; "RTN","XBTM10",4,0) NEW A "RTN","XBTM10",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM10",6,0) Q:$D(DUOUT) "RTN","XBTM10",7,0) D ^DIWW "RTN","XBTM10",8,0) Q "RTN","XBTM10",9,0) ; "RTN","XBTM10",10,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM10",11,0) ;;The package "RTN","XBTM10",12,0) ;;documentation presented in this manual is extensive and should "RTN","XBTM10",13,0) ;;provide most site managers, ISC staff members, and developers "RTN","XBTM10",14,0) ;;with sufficient information. "RTN","XBTM10",15,0) ;;|SETTAB("C")||TAB| "RTN","XBTM10",16,0) ;;This manual can be generated from programmer mode by DO'ing "RTN","XBTM10",17,0) ;;^XBTM. This is a cpu-intensive routine. Please q to TaskMan "RTN","XBTM10",18,0) ;;to run after hours, and expect approximately 150 pages of output. "RTN","XBTM10",19,0) ;;|SETTAB("C")||TAB| "RTN","XBTM10",20,0) ;;|SETTAB("C")||TAB| "RTN","XBTM10",21,0) ;;### "RTN","XBTM11") 0^162^B729789 "RTN","XBTM11",1,0) XBTM11 ; IHS/ADC/GTH - TECH MANUAL : GLOSSARY ; [ 02/07/97 3:02 PM ] "RTN","XBTM11",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM11",3,0) ; "RTN","XBTM11",4,0) NEW A "RTN","XBTM11",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM11",6,0) Q:$D(DUOUT) "RTN","XBTM11",7,0) D ^DIWW "RTN","XBTM11",8,0) Q "RTN","XBTM11",9,0) ; "RTN","XBTM11",10,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM11",11,0) ;;Please refer to the IHS Programming Standards And Conventions "RTN","XBTM11",12,0) ;;(SAC) for a list of terms relevant to programming. "RTN","XBTM11",13,0) ;;|SETTAB("C")||TAB| "RTN","XBTM11",14,0) ;;|SETTAB("C")||TAB| "RTN","XBTM11",15,0) ;;### "RTN","XBTM12") 0^163^B432952 "RTN","XBTM12",1,0) XBTM12 ; IHS/ADC/GTH - TECH MANUAL : SYSTEM REQUIREMENTS ; [ 02/07/97 3:02 PM ] "RTN","XBTM12",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM12",3,0) ; "RTN","XBTM12",4,0) NEW A,B,C,I "RTN","XBTM12",5,0) S A=$O(^DIC(9.4,"C","XB",0)),B=$O(^DIC(9.4,A,22,"B",^DIC(9.4,A,"VERSION"),0)) "RTN","XBTM12",6,0) S %=0 "RTN","XBTM12",7,0) F S %=$O(^DIC(9.4,A,22,B,"S",%)) Q:'% D PR(^(%,0)) Q:$D(DUOUT) "RTN","XBTM12",8,0) Q:$D(DUOUT) "RTN","XBTM12",9,0) D ^DIWW "RTN","XBTM12",10,0) Q "RTN","XBTM12",11,0) ; "RTN","XBTM12",12,0) PR(X) NEW %,A,B,C,I D PR^XBTM(X) Q "RTN","XBTM12",13,0) ; "RTN","XBTM13") 0^164^B418563 "RTN","XBTM13",1,0) XBTM13 ; IHS/ADC/GTH - TECH MANUAL : INSTALL NOTES ; [ 02/07/97 3:02 PM ] "RTN","XBTM13",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM13",3,0) ; "RTN","XBTM13",4,0) NEW A,B "RTN","XBTM13",5,0) S A=$O(^DIC(9.4,"C","XB",0)),B=$O(^DIC(9.4,A,22,"B",^DIC(9.4,A,"VERSION"),0)) "RTN","XBTM13",6,0) S %=0 "RTN","XBTM13",7,0) F S %=$O(^DIC(9.4,A,22,B,"I",%)) Q:'% D PR(^(%,0)) Q:$D(DUOUT) "RTN","XBTM13",8,0) Q:$D(DUOUT) "RTN","XBTM13",9,0) D ^DIWW "RTN","XBTM13",10,0) Q "RTN","XBTM13",11,0) ; "RTN","XBTM13",12,0) PR(X) NEW %,A,B D PR^XBTM(X) Q "RTN","XBTM13",13,0) ; "RTN","XBTM14") 0^165^B411389 "RTN","XBTM14",1,0) XBTM14 ; IHS/ADC/GTH - TECH MANUAL : ENHANCEMENTS ; [ 02/07/97 3:02 PM ] "RTN","XBTM14",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM14",3,0) ; "RTN","XBTM14",4,0) NEW A,B "RTN","XBTM14",5,0) S A=$O(^DIC(9.4,"C","XB",0)),B=$O(^DIC(9.4,A,22,"B",^DIC(9.4,A,"VERSION"),0)) "RTN","XBTM14",6,0) S %=0 "RTN","XBTM14",7,0) F S %=$O(^DIC(9.4,A,22,B,1,%)) Q:'% D PR(^(%,0)) Q:$D(DUOUT) "RTN","XBTM14",8,0) Q:$D(DUOUT) "RTN","XBTM14",9,0) D ^DIWW "RTN","XBTM14",10,0) Q "RTN","XBTM14",11,0) ; "RTN","XBTM14",12,0) PR(X) NEW %,A,B D PR^XBTM(X) Q "RTN","XBTM14",13,0) ; "RTN","XBTM15") 0^166^B864972 "RTN","XBTM15",1,0) XBTM15 ; IHS/ADC/GTH - TECH MANUAL : KILL UNSUBSCRIPTED GLOBALS; [ 02/07/97 3:02 PM ] "RTN","XBTM15",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM15",3,0) ; "RTN","XBTM15",4,0) NEW A "RTN","XBTM15",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM15",6,0) Q:$D(DUOUT) "RTN","XBTM15",7,0) D ^DIWW "RTN","XBTM15",8,0) Q "RTN","XBTM15",9,0) ; "RTN","XBTM15",10,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM15",11,0) ;;|SETTAB("C")||TAB| "RTN","XBTM15",12,0) ;;|SETTAB("C")||TAB| "RTN","XBTM15",13,0) ;;|SETTAB("C")||TAB|Unsubscripted Globals, KILL'd in the package. "RTN","XBTM15",14,0) ;;|SETTAB("C")||TAB| "RTN","XBTM15",15,0) ;;|SETTAB("C")||TAB| "RTN","XBTM15",16,0) ;; Routine Line Global "RTN","XBTM15",17,0) ;; ----------------- ------------------ ---------------- "RTN","XBTM15",18,0) ;;### "RTN","XBTM2") 0^167^B490435 "RTN","XBTM2",1,0) XBTM2 ; IHS/ADC/GTH - TECH MANUAL : AREA OFFICE PARAMETERS; [ 02/07/97 3:02 PM ] "RTN","XBTM2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM2",3,0) ; "RTN","XBTM2",4,0) NEW A "RTN","XBTM2",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM2",6,0) KILL A "RTN","XBTM2",7,0) Q:$D(DUOUT) "RTN","XBTM2",8,0) D ^DIWW "RTN","XBTM2",9,0) Q "RTN","XBTM2",10,0) ; "RTN","XBTM2",11,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM2",12,0) ;;There are no Area Office parameters for this package. "RTN","XBTM2",13,0) ;;|SETTAB("C")||TAB| "RTN","XBTM2",14,0) ;;|SETTAB("C")||TAB| "RTN","XBTM2",15,0) ;;### "RTN","XBTM2",16,0) ; "RTN","XBTM3") 0^168^B1704387 "RTN","XBTM3",1,0) XBTM3 ; IHS/ADC/GTH - TECH MANUAL : SECURITY KEYS ; [ 02/07/97 3:02 PM ] "RTN","XBTM3",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM3",3,0) ; "RTN","XBTM3",4,0) NEW A,B,C "RTN","XBTM3",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM3",6,0) Q:$D(DUOUT) "RTN","XBTM3",7,0) D ^DIWW "RTN","XBTM3",8,0) F A="XAz","ZIBz" D SK(A) Q:$D(DUOUT) "RTN","XBTM3",9,0) Q "RTN","XBTM3",10,0) ; "RTN","XBTM3",11,0) SK(A) ; Print info on security keys for namespace A. "RTN","XBTM3",12,0) F S A=$O(^DIC(19.1,"B",A)) Q:'($E(A,1,4)="XB") S B=$O(^(A,0)) D "RTN","XBTM3",13,0) . S DIWF="WN" "RTN","XBTM3",14,0) . D PR("|_|"_$P(^DIC(19.1,B,0),U)_"|_|") "RTN","XBTM3",15,0) . Q:$D(DUOUT) "RTN","XBTM3",16,0) . I '$O(^DIC(19,"AOL",A,0)) D PR(" --> KEY NOT USED <--") I 1 "RTN","XBTM3",17,0) . E S C=0 F S C=$O(^DIC(19,"AOL",A,C)) Q:'C D PR("Locks "_$P(^DIC(19,C,0),U)_", '"_$P(^DIC(19,C,0),U,2)_"'.") "RTN","XBTM3",18,0) . Q:$D(DUOUT) "RTN","XBTM3",19,0) . S DIWF="W" "RTN","XBTM3",20,0) . D PR("DESCRIPTION: ") "RTN","XBTM3",21,0) . Q:$D(DUOUT) "RTN","XBTM3",22,0) . S C=0 "RTN","XBTM3",23,0) . F S C=$O(^DIC(19.1,B,1,C)) Q:'C D PR(^(C,0)) "RTN","XBTM3",24,0) . Q:$D(DUOUT) "RTN","XBTM3",25,0) . D ^DIWW "RTN","XBTM3",26,0) . W ! "RTN","XBTM3",27,0) .Q "RTN","XBTM3",28,0) D ^DIWW "RTN","XBTM3",29,0) Q "RTN","XBTM3",30,0) ; "RTN","XBTM3",31,0) PR(X) NEW A,B,C D PR^XBTM(X) Q "RTN","XBTM3",32,0) ;;|SETTAB("C")||TAB| "RTN","XBTM3",33,0) ;;|SETTAB("C")||TAB| "RTN","XBTM3",34,0) ;;### "RTN","XBTM4") 0^169^B6781984 "RTN","XBTM4",1,0) XBTM4 ; IHS/ADC/GTH - TECH MANUAL : OPTIONS ; [ 02/07/97 3:02 PM ] "RTN","XBTM4",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM4",3,0) ; "RTN","XBTM4",4,0) NEW A,B,C,T,XB "RTN","XBTM4",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM4",6,0) Q:$D(DUOUT) "RTN","XBTM4",7,0) D ^DIWW "RTN","XBTM4",8,0) S T=$P(^DD(19,4,0),U,3) "RTN","XBTM4",9,0) F %=1:1 Q:'$L($P(T,";",%)) S T($P($P(T,";",%),":"))=$P($P(T,";",%),":",2) "RTN","XBTM4",10,0) S XB="XB" "RTN","XBTM4",11,0) D OP("XAz") "RTN","XBTM4",12,0) S XB="ZIB" "RTN","XBTM4",13,0) D OP("ZIAz") "RTN","XBTM4",14,0) Q "RTN","XBTM4",15,0) ; "RTN","XBTM4",16,0) OP(A) ; Print info on options in namespace A. "RTN","XBTM4",17,0) F S A=$O(^DIC(19,"B",A)) Q:'($E(A,1,$L(XB))=XB) S B=$O(^(A,0)) D "RTN","XBTM4",18,0) . D PR("|_|"_$P(^DIC(19,B,0),U)_"|_|"_$S('$D(^DIC(19,"AD",B)):" ** no parents **",1:"")),^DIWW "RTN","XBTM4",19,0) . Q:$D(DUOUT) "RTN","XBTM4",20,0) . D PR("TYPE: "_T($P(^DIC(19,B,0),U,4))),^DIWW "RTN","XBTM4",21,0) . Q:$D(DUOUT) "RTN","XBTM4",22,0) . D PR("TEXT: "_$P(^DIC(19,B,0),U,2)),^DIWW "RTN","XBTM4",23,0) . Q:$D(DUOUT) "RTN","XBTM4",24,0) . I $L($P(^DIC(19,B,0),U,6)) D PR("LOCK: "_$P(^(0),U,6)),^DIWW "RTN","XBTM4",25,0) . I $L($G(^DIC(19,B,20))) D PR("ENTRY ACTION: "_^DIC(19,B,20)),^DIWW "RTN","XBTM4",26,0) . I $L($G(^DIC(19,B,15))) D PR("EXIT ACTION : "_^DIC(19,B,15)),^DIWW "RTN","XBTM4",27,0) . D PR("DESCRIPTION : ") "RTN","XBTM4",28,0) . Q:$D(DUOUT) "RTN","XBTM4",29,0) . S C=0 "RTN","XBTM4",30,0) . F S C=$O(^DIC(19,B,1,C)) Q:'C D PR(^(C,0)) Q:$D(DUOUT) "RTN","XBTM4",31,0) . Q:$D(DUOUT) "RTN","XBTM4",32,0) . D ^DIWW "RTN","XBTM4",33,0) . F C=30:1:36,50,51,60:1:69,69.1:.1:69.3,71:1:73,79:1:82 I $L($G(^DIC(19,B,C))) D PR($P(^DD(19,C,0),U)_": "_^DIC(19,B,C)),^DIWW Q:$D(DUOUT) "RTN","XBTM4",34,0) . Q:$D(DUOUT) "RTN","XBTM4",35,0) . W ! "RTN","XBTM4",36,0) .Q "RTN","XBTM4",37,0) Q:$D(DUOUT) "RTN","XBTM4",38,0) D ^DIWW "RTN","XBTM4",39,0) Q "RTN","XBTM4",40,0) ; "RTN","XBTM4",41,0) PR(X) NEW A,B,C,T,XB D PR^XBTM(X) Q "RTN","XBTM4",42,0) ;;There are no options distributed with the package. "RTN","XBTM4",43,0) ;;|SETTAB("C")||TAB| "RTN","XBTM4",44,0) ;;There is one option associated with the Remote Patch "RTN","XBTM4",45,0) ;;Installer (ZIBRPI), which is used to schedule the task. "RTN","XBTM4",46,0) ;;That option is installed by ZIBRPI when the local facility "RTN","XBTM4",47,0) ;;installs it. "RTN","XBTM4",48,0) ;;|SETTAB("C")||TAB| "RTN","XBTM4",49,0) ;;If you have Remote Error Reporting (ZIBRER) installed, there "RTN","XBTM4",50,0) ;;will be options in that namespace. "RTN","XBTM4",51,0) ;;|SETTAB("C")||TAB| "RTN","XBTM4",52,0) ;;Any other XB or ZIB listed option "RTN","XBTM4",53,0) ;;will have been created on your local machine. "RTN","XBTM4",54,0) ;;|SETTAB("C")||TAB| "RTN","XBTM4",55,0) ;;|SETTAB("C")||TAB| "RTN","XBTM4",56,0) ;;### "RTN","XBTM5") 0^170^B4587756 "RTN","XBTM5",1,0) XBTM5 ; IHS/ADC/GTH - TECH MANUAL : FIELDS IN THE FILES ; [ 02/07/97 3:02 PM ] "RTN","XBTM5",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM5",3,0) ; "RTN","XBTM5",4,0) NEW A,B,C,I,J "RTN","XBTM5",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM5",6,0) Q:$D(DUOUT) "RTN","XBTM5",7,0) D ^DIWW "RTN","XBTM5",8,0) KILL ^TMP("XBTM-FIF",$J) "RTN","XBTM5",9,0) S DIWF="WN" "RTN","XBTM5",10,0) D PR($J("",5)_"These are the files in the package:") "RTN","XBTM5",11,0) Q:$D(DUOUT) "RTN","XBTM5",12,0) D ALPHA "RTN","XBTM5",13,0) D PR($J("",5)),PR($J("",5)),PR($J("",5)_"These are the alphabetized fields in the files :") "RTN","XBTM5",14,0) Q:$D(DUOUT) "RTN","XBTM5",15,0) S DIWF="W",(A,B,I,J)="" "RTN","XBTM5",16,0) F S A=$O(^TMP("XBTM-FIF",$J,A)) Q:A="" S B=$O(^(A,0)),I=$O(^(B,0)) D Q:$D(DUOUT) "RTN","XBTM5",17,0) . D PR(A_$E($J("",40),1,(40-$L(A)))_B_$E($J("",12),1,(12-$L(B)))_I),^DIWW "RTN","XBTM5",18,0) . S J=J+1 "RTN","XBTM5",19,0) .Q "RTN","XBTM5",20,0) Q:$D(DUOUT) "RTN","XBTM5",21,0) D PR($J("",5)),PR($J("",5)),PR($J("",3)_"There are "_+J_" fields in the package files.") "RTN","XBTM5",22,0) Q:$D(DUOUT) "RTN","XBTM5",23,0) D ^DIWW "RTN","XBTM5",24,0) Q "RTN","XBTM5",25,0) ; "RTN","XBTM5",26,0) PR(X) NEW %,A,B,C,I,J D PR^XBTM(X) Q "RTN","XBTM5",27,0) ;;No files are distributed with this package. Any fields listed, "RTN","XBTM5",28,0) ;;below, will have been created locally. The list will be "RTN","XBTM5",29,0) ;;an alphabetical list of fields in the package's files. "RTN","XBTM5",30,0) ;;|SETTAB("C")||TAB| "RTN","XBTM5",31,0) ;;|SETTAB("C")||TAB| "RTN","XBTM5",32,0) ;;### "RTN","XBTM5",33,0) ; "RTN","XBTM5",34,0) ALPHA ; "RTN","XBTM5",35,0) NEW XBFLD,XBPIEN "RTN","XBTM5",36,0) S XBPIEN=$O(^DIC(9.4,"C","XB",0)) "RTN","XBTM5",37,0) S %=0 "RTN","XBTM5",38,0) F S %=$O(^DIC(9.4,XBPIEN,4,"B",%)) Q:'% D PR(%_$E(" ",1,(12-$L(%)))_$O(^DD(%,0,"NM",""))) Q:$D(DUOUT) D FLD "RTN","XBTM5",39,0) Q "RTN","XBTM5",40,0) ; "RTN","XBTM5",41,0) FLD ; "RTN","XBTM5",42,0) S XBFLD=0 "RTN","XBTM5",43,0) F S XBFLD=$O(^DD(%,XBFLD)) Q:'XBFLD D "RTN","XBTM5",44,0) .I +$P(^DD(%,XBFLD,0),U,2) S XB=+$P(^(0),U,2) D Q "RTN","XBTM5",45,0) ..NEW %,XBFLD "RTN","XBTM5",46,0) ..S %=XB "RTN","XBTM5",47,0) ..D FLD "RTN","XBTM5",48,0) ..Q "RTN","XBTM5",49,0) .S ^TMP("XBTM-FIF",$J,$P(^DD(%,XBFLD,0),U),%,XBFLD)="" "RTN","XBTM5",50,0) .Q "RTN","XBTM5",51,0) Q "RTN","XBTM5",52,0) ; "RTN","XBTM6") 0^171^B607339 "RTN","XBTM6",1,0) XBTM6 ; IHS/ADC/GTH - TECH MANUAL : ARCHIVING & PURGING ; [ 02/07/97 3:02 PM ] "RTN","XBTM6",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM6",3,0) ; "RTN","XBTM6",4,0) NEW A "RTN","XBTM6",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM6",6,0) Q:$D(DUOUT) "RTN","XBTM6",7,0) D ^DIWW "RTN","XBTM6",8,0) Q "RTN","XBTM6",9,0) ; "RTN","XBTM6",10,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM6",11,0) ;;At the present time there are no "RTN","XBTM6",12,0) ;;archiving and/or purging capabilities with this package. "RTN","XBTM6",13,0) ;;|SETTAB("C")||TAB| "RTN","XBTM6",14,0) ;;|SETTAB("C")||TAB| "RTN","XBTM6",15,0) ;;### "RTN","XBTM7") 0^172^B7172724 "RTN","XBTM7",1,0) XBTM7 ; IHS/ADC/GTH - TECH MANUAL : ROUTINES ; [ 02/07/97 3:02 PM ] "RTN","XBTM7",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM7",3,0) ; "RTN","XBTM7",4,0) NEW A "RTN","XBTM7",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM7",6,0) Q:$D(DUOUT) "RTN","XBTM7",7,0) D ^DIWW "RTN","XBTM7",8,0) KILL ^TMP("XBTM-RTN",$J) "RTN","XBTM7",9,0) NEW A,B "RTN","XBTM7",10,0) S DIWF="WN" "RTN","XBTM7",11,0) D PR("Routines & sub-routines in namespace :"),PR(" "),PR(" ") "RTN","XBTM7",12,0) Q:$D(DUOUT) "RTN","XBTM7",13,0) S %=$$RSEL^ZIBRSEL("XB*","^TMP(""XB"",$J,") "RTN","XBTM7",14,0) S %=$$RSEL^ZIBRSEL("ZIB*","^TMP(""XB"",$J,") "RTN","XBTM7",15,0) S %="" "RTN","XBTM7",16,0) F S %=$O(^TMP("XB",$J,%)) Q:%="" Q:$D(DUOUT) D "RTN","XBTM7",17,0) . D PR($E("|_|"_%_"|_| "_$P($T(+1^@%)," ",2,99),1,(DIWR-DIWL+7))) "RTN","XBTM7",18,0) . Q:$D(DUOUT) "RTN","XBTM7",19,0) . S B=$T(+1^@%) "RTN","XBTM7",20,0) . I B["; GENERATED FROM "!(B["; DRIVER FOR")!(B["; COMPILED XREF") S ^TMP("XBTM-RTN",$J,"C",%)=B "RTN","XBTM7",21,0) . F A=3:1 S B=$T(+A^@%) Q:B=""!('($E(B,1,2)=" ;")) D PR(" "_$E(B,1,(DIWR-DIWL-2))) Q:$D(DUOUT) "RTN","XBTM7",22,0) . Q:$D(DUOUT) "RTN","XBTM7",23,0) . F A=3:1 S B=$T(+A^@%) Q:B="" I '($E(B)=" ") D PR(" "_$E(B,1,(DIWR-DIWL-2))) I B[";EP"!(B["ENTRY POINT") S ^TMP("XBTM-RTN",$J,%,$P(B," "))=$P(B," ",2,999) Q:$D(DUOUT) "RTN","XBTM7",24,0) . Q:$D(DUOUT) "RTN","XBTM7",25,0) . D PR(" ") "RTN","XBTM7",26,0) .Q "RTN","XBTM7",27,0) ; "RTN","XBTM7",28,0) D PR("|TOP|"),PR(" "),PR("Documented entry points:"),PR(" ") "RTN","XBTM7",29,0) Q:$D(DUOUT) "RTN","XBTM7",30,0) S (A,B)="" "RTN","XBTM7",31,0) F S A=$O(^TMP("XBTM-RTN",$J,A)) Q:A=""!(A="C") Q:$D(DUOUT) F S B=$O(^TMP("XBTM-RTN",$J,A,B)) Q:B="" D PR($E(B_U_A_" : "_^(B),1,(DIWR-DIWL))) Q:$D(DUOUT) "RTN","XBTM7",32,0) Q:$D(DUOUT) "RTN","XBTM7",33,0) ; "RTN","XBTM7",34,0) D PR(" "),PR(" "),PR("Compiled/Generated routines:"),PR(" ") "RTN","XBTM7",35,0) Q:$D(DUOUT) "RTN","XBTM7",36,0) S A="" "RTN","XBTM7",37,0) F S A=$O(^TMP("XBTM-RTN",$J,"C",A)) Q:A="" D PR($E(^(A),1,(DIWR-DIWL))) Q:$D(DUOUT) "RTN","XBTM7",38,0) Q:$D(DUOUT) "RTN","XBTM7",39,0) ; "RTN","XBTM7",40,0) KILL ^TMP("XBTM-RTN",$J) "RTN","XBTM7",41,0) S DIWF="W" "RTN","XBTM7",42,0) Q "RTN","XBTM7",43,0) ; "RTN","XBTM7",44,0) PR(X) NEW %,A,B D PR^XBTM(X) Q "RTN","XBTM7",45,0) ;;These are the routine descriptions, which are usually contained "RTN","XBTM7",46,0) ;;in the commented lines prior to the first label or executable "RTN","XBTM7",47,0) ;;line. "RTN","XBTM7",48,0) ;;|SETTAB("C")||TAB| "RTN","XBTM7",49,0) ;;Each line label is also listed. The internally documented "RTN","XBTM7",50,0) ;;entry points (" ;EP") are listed. "RTN","XBTM7",51,0) ;;|SETTAB("C")||TAB| "RTN","XBTM7",52,0) ;;|SETTAB("C")||TAB| "RTN","XBTM7",53,0) ;;### "RTN","XBTM8") 0^173^B4845502 "RTN","XBTM8",1,0) XBTM8 ; IHS/ADC/GTH - TECH MANUAL : EXTERNAL RELATIONS ; [ 02/07/97 3:02 PM ] "RTN","XBTM8",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM8",3,0) ; "RTN","XBTM8",4,0) NEW A "RTN","XBTM8",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM8",6,0) Q:$D(DUOUT) "RTN","XBTM8",7,0) D ^DIWW "RTN","XBTM8",8,0) KILL ^TMP("XBTM8",$J) "RTN","XBTM8",9,0) NEW A,B "RTN","XBTM8",10,0) S DIWF="WN" "RTN","XBTM8",11,0) S %=$$RSEL^ZIBRSEL("XB*","^TMP(""XB"",$J,") "RTN","XBTM8",12,0) S %=$$RSEL^ZIBRSEL("ZIB*","^TMP(""XB"",$J,") "RTN","XBTM8",13,0) ; "RTN","XBTM8",14,0) S %="" "RTN","XBTM8",15,0) F S %=$O(^TMP("XB",$J,%)) Q:%="" D "RTN","XBTM8",16,0) .S B=$T(+1^@%) "RTN","XBTM8",17,0) .F A=3:1 S B=$T(+A^@%) Q:B="" I '($E(B)=" ") I B[";PEP" S ^TMP("XBTM8",$J,%,$P(B," "))=$P(B," ",2,999) "RTN","XBTM8",18,0) .Q "RTN","XBTM8",19,0) ; "RTN","XBTM8",20,0) F %=1:1 S B=$T(L+%^XBLCALL),A=$P(B,";",3) Q:B="" I $E(A)=U S A=$E(A,2,99),^TMP("XBTM8",$J,A,A)=$P(B,";",4,999) "RTN","XBTM8",21,0) D PR("|TOP|"),PR(" "),PR("Published entry points and supported routines:"),PR(" ") "RTN","XBTM8",22,0) Q:$D(DUOUT) "RTN","XBTM8",23,0) S (A,B)="" "RTN","XBTM8",24,0) F S A=$O(^TMP("XBTM8",$J,A)) Q:A="" Q:$D(DUOUT) F S B=$O(^TMP("XBTM8",$J,A,B)) Q:B="" D PR($E($S(A=B:"",1:$P(B,"(",1))_U_A_$S($L($P(B,"(",2)):"(",1:"")_$P(B,"(",2)_" : "_^(B),1,(DIWR-DIWL))) Q:$D(DUOUT) "RTN","XBTM8",25,0) ; "RTN","XBTM8",26,0) KILL ^TMP("XBTM8",$J) "RTN","XBTM8",27,0) Q:$D(DUOUT) "RTN","XBTM8",28,0) S DIWF="W" "RTN","XBTM8",29,0) Q "RTN","XBTM8",30,0) ; "RTN","XBTM8",31,0) PR(X) NEW %,A,B D PR^XBTM(X) Q "RTN","XBTM8",32,0) ;;There are several published entry points that may be called "RTN","XBTM8",33,0) ;;from other packages. Some XB/ZIB routines were programmed to be "RTN","XBTM8",34,0) ;;available to call from the top of the routine, and are so noted in "RTN","XBTM8",35,0) ;;the routine. "RTN","XBTM8",36,0) ;;|SETTAB("C")||TAB| "RTN","XBTM8",37,0) ;;|SETTAB("C")||TAB| "RTN","XBTM8",38,0) ;;### "RTN","XBTM9") 0^174^B1149656 "RTN","XBTM9",1,0) XBTM9 ; IHS/ADC/GTH - TECH MANUAL : INTERNAL RELATIONS ; [ 02/07/97 3:02 PM ] "RTN","XBTM9",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTM9",3,0) ; "RTN","XBTM9",4,0) NEW A "RTN","XBTM9",5,0) F A=1:1 S X=$P($T(PR+A),";;",2) Q:X="###" D PR(X) Q:$D(DUOUT) "RTN","XBTM9",6,0) Q:$D(DUOUT) "RTN","XBTM9",7,0) D ^DIWW "RTN","XBTM9",8,0) Q "RTN","XBTM9",9,0) ; "RTN","XBTM9",10,0) PR(X) NEW A D PR^XBTM(X) Q "RTN","XBTM9",11,0) ;;XB/ZIB contains routines and entry points that are for use "RTN","XBTM9",12,0) ;;both interactively by programmers, and as calls from applications. "RTN","XBTM9",13,0) ;;The XB menu can be accessed from programmer mode thru routine XB, "RTN","XBTM9",14,0) ;;i.e., DO ^XB. "RTN","XBTM9",15,0) ;;|SETTAB("C")||TAB| "RTN","XBTM9",16,0) ;;|SETTAB("C")||TAB| "RTN","XBTM9",17,0) ;;### "RTN","XBTMI") 0^175^B3077215 "RTN","XBTMI",1,0) XBTMI ; IHS/ADC/GTH - TECH MANUAL : INDEXED WORDS; [ 02/07/97 3:02 PM ] "RTN","XBTMI",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTMI",3,0) ; "RTN","XBTMI",4,0) KILL ^TMP("XBTM-I",$J) "RTN","XBTMI",5,0) NEW A,I "RTN","XBTMI",6,0) D ALPHA "RTN","XBTMI",7,0) F %=19,19.1 S A="XAz" F S A=$O(^DIC(%,"B",A)) Q:'($E(A,1,2)="XB") S ^TMP("XBTM-I",$J,A)="" "RTN","XBTMI",8,0) F %=19,19.1 S A="ZIAz" F S A=$O(^DIC(%,"B",A)) Q:'($E(A,1,3)="ZIB") S ^TMP("XBTM-I",$J,A)="" "RTN","XBTMI",9,0) F %=1:1 S A=$P($T(1+%),";;",2) Q:A="" S ^TMP("XBTM-I",$J,A)="" "RTN","XBTMI",10,0) KILL ^TMP("XBTMI",$J) "RTN","XBTMI",11,0) S %=$$RSEL^ZIBRSEL("XB*","^TMP(""XBTMI"",$J,"),%=$$RSEL^ZIBRSEL("ZIB*","^TMP(""XBTMI"",$J,") "RTN","XBTMI",12,0) S %="" "RTN","XBTMI",13,0) F S %=$O(^TMP("XBTMI",$J,%)) Q:%="" S ^TMP("XBTM-I",$J,%)="" F I=3:1 S A=$T(+I^@%) Q:A="" I $L($P(A," ")),A[";EP"!(A["ENTRY POINT")!(A[";PEP") S ^TMP("XBTM-I",$J,$P(A," ")_U_%)="" "RTN","XBTMI",14,0) KILL ^TMP("XBTMI",$J) "RTN","XBTMI",15,0) Q "RTN","XBTMI",16,0) ; "RTN","XBTMI",17,0) ALPHA ; "RTN","XBTMI",18,0) NEW XBFLD,XBPIEN "RTN","XBTMI",19,0) S XBPIEN=$O(^DIC(9.4,"C","XB",0)) "RTN","XBTMI",20,0) S %=0 "RTN","XBTMI",21,0) F S %=$O(^DIC(9.4,XBPIEN,4,"B",%)) Q:'% D FLD "RTN","XBTMI",22,0) Q "RTN","XBTMI",23,0) ; "RTN","XBTMI",24,0) FLD ; "RTN","XBTMI",25,0) S XBFLD=0 "RTN","XBTMI",26,0) F S XBFLD=$O(^DD(%,XBFLD)) Q:'XBFLD D "RTN","XBTMI",27,0) .I +$P(^DD(%,XBFLD,0),U,2) S XB=+$P(^(0),U,2) D Q "RTN","XBTMI",28,0) ..NEW %,XBFLD S %=XB D FLD "RTN","XBTMI",29,0) ..Q "RTN","XBTMI",30,0) .S ^TMP("XBTM-I",$J,$P(^DD(%,XBFLD,0),U))="" "RTN","XBTMI",31,0) .Q "RTN","XBTMI",32,0) Q "RTN","XBTMI",33,0) ; "RTN","XBTMI",34,0) 1 ;; "RTN","XBTMI",35,0) ;;CONTROL "RTN","XBTMI",36,0) ;;GUI "RTN","XBTMI",37,0) ;;LIST "RTN","XBTMI",38,0) ;;STANDARDS "RTN","XBTMI",39,0) ;;VIDEO "RTN","XBTMPR") 0^176^B5888460 "RTN","XBTMPR",1,0) XBTMPR ; IHS/ADC/GTH - TECH MANUAL : PREFACE ; [ 02/07/97 3:02 PM ] "RTN","XBTMPR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTMPR",3,0) ; "RTN","XBTMPR",4,0) NEW XBCTR "RTN","XBTMPR",5,0) F XBCTR=1:1 S X=$P($T(PREFACE+XBCTR),";;",2) Q:X="" D PR^XBTM(X) "RTN","XBTMPR",6,0) D ^DIWW "RTN","XBTMPR",7,0) Q "RTN","XBTMPR",8,0) ; "RTN","XBTMPR",9,0) PREFACE ;; "RTN","XBTMPR",10,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",11,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",12,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",13,0) ;;|SETTAB("C")||TAB|PREFACE "RTN","XBTMPR",14,0) ;; "RTN","XBTMPR",15,0) ;;This document is designed primarily for RPMS application "RTN","XBTMPR",16,0) ;;programmers. Area and site IRM personnel can find this "RTN","XBTMPR",17,0) ;;document helpful in understanding how the XB/ZIB utility "RTN","XBTMPR",18,0) ;;routines operate. "RTN","XBTMPR",19,0) ;; "RTN","XBTMPR",20,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",21,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",22,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",23,0) ;;|SETTAB("C")||TAB|INTRODUCTION "RTN","XBTMPR",24,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",25,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",26,0) ;;The IHS/VA UTILITIES are in the XB "RTN","XBTMPR",27,0) ;;namespace, for routines that are not MUMPS "RTN","XBTMPR",28,0) ;;implementation specific. Routines that are implementation specific "RTN","XBTMPR",29,0) ;;will be in the ZIB namespace. "RTN","XBTMPR",30,0) ;; "RTN","XBTMPR",31,0) ;;Programmer tools are available from programmer mode thru the "RTN","XBTMPR",32,0) ;;menu-driver routine XB. "RTN","XBTMPR",33,0) ;; "RTN","XBTMPR",34,0) ;;There are no files associated with this package. "RTN","XBTMPR",35,0) ;; "RTN","XBTMPR",36,0) ;;To aid in your reading the routines, if required, the following "RTN","XBTMPR",37,0) ;;style guidelines have been followed in most of the routines. "RTN","XBTMPR",38,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",39,0) ;; (1) all NEW and KILL commands are not abbreviated; "RTN","XBTMPR",40,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",41,0) ;; (2) only one command scope per line; "RTN","XBTMPR",42,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",43,0) ;; (3) unconditional GOs/QUITs are followed by a comment line; "RTN","XBTMPR",44,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",45,0) ;; (4) lines with labels have no executable code; "RTN","XBTMPR",46,0) ;;|SETTAB("C")||TAB| "RTN","XBTMPR",47,0) ;;|SETTAB("C")||TAB| "RTN","XBTMTI") 0^177^B3185919 "RTN","XBTMTI",1,0) XBTMTI ; IHS/ADC/GTH - TECH MANUAL : TITLE PAGE ; [ 02/07/97 3:02 PM ] "RTN","XBTMTI",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTMTI",3,0) ; "RTN","XBTMTI",4,0) NEW XBCTR "RTN","XBTMTI",5,0) F XBCTR=1:1 S X=$P($T(TITLE+XBCTR),";;",2) Q:X="" D PR^XBTM(X) "RTN","XBTMTI",6,0) D ^DIWW "RTN","XBTMTI",7,0) Q "RTN","XBTMTI",8,0) ; "RTN","XBTMTI",9,0) TITLE ;; "RTN","XBTMTI",10,0) ;; "RTN","XBTMTI",11,0) ;; "RTN","XBTMTI",12,0) ;; "RTN","XBTMTI",13,0) ;;|SETTAB("C")||TAB| "RTN","XBTMTI",14,0) ;;|SETTAB("C")||TAB|*********************************************************** "RTN","XBTMTI",15,0) ;; "RTN","XBTMTI",16,0) ;; "RTN","XBTMTI",17,0) ;; "RTN","XBTMTI",18,0) ;; "RTN","XBTMTI",19,0) ;; "RTN","XBTMTI",20,0) ;;|SETTAB("C")||TAB|RESOURCE AND PATIENT MANAGEMENT SYSTEM "RTN","XBTMTI",21,0) ;;|SETTAB("C")||TAB|(RPMS) "RTN","XBTMTI",22,0) ;; "RTN","XBTMTI",23,0) ;; "RTN","XBTMTI",24,0) ;; "RTN","XBTMTI",25,0) ;; "RTN","XBTMTI",26,0) ;; "RTN","XBTMTI",27,0) ;;|SETTAB("C")||TAB|TECHNICAL MANUAL "RTN","XBTMTI",28,0) ;; "RTN","XBTMTI",29,0) ;; "RTN","XBTMTI",30,0) ;; "RTN","XBTMTI",31,0) ;; "RTN","XBTMTI",32,0) ;; "RTN","XBTMTI",33,0) ;;|SETTAB("C")||TAB|IHS/VA UTILITIES "RTN","XBTMTI",34,0) ;;|SETTAB("C")||TAB|XB/ZIB "RTN","XBTMTI",35,0) ;; "RTN","XBTMTI",36,0) ;; "RTN","XBTMTI",37,0) ;; "RTN","XBTMTI",38,0) ;; "RTN","XBTMTI",39,0) ;; "RTN","XBTMTI",40,0) ;;|SETTAB("C")||TAB|Version 3.0 "RTN","XBTMTI",41,0) ;; "RTN","XBTMTI",42,0) ;; "RTN","XBTMTI",43,0) ;; "RTN","XBTMTI",44,0) ;; "RTN","XBTMTI",45,0) ;; "RTN","XBTMTI",46,0) ;; "RTN","XBTMTI",47,0) ;; "RTN","XBTMTI",48,0) ;; "RTN","XBTMTI",49,0) ;; "RTN","XBTMTI",50,0) ;;|SETTAB("C")||TAB|April 30, 1996 "RTN","XBTMTI",51,0) ;; "RTN","XBTMTI",52,0) ;; "RTN","XBTMTI",53,0) ;; "RTN","XBTMTI",54,0) ;; "RTN","XBTMTI",55,0) ;; "RTN","XBTMTI",56,0) ;;|SETTAB("C")||TAB|Office of Information Resource Management "RTN","XBTMTI",57,0) ;;|SETTAB("C")||TAB|Indian Health Service "RTN","XBTMTI",58,0) ;;|SETTAB("C")||TAB|Albuquerque, New Mexico "RTN","XBTMTI",59,0) ;; "RTN","XBTMTI",60,0) ;; "RTN","XBTMTI",61,0) ;; "RTN","XBTMTI",62,0) ;; "RTN","XBTMTI",63,0) ;; "RTN","XBTMTI",64,0) ;;|SETTAB("C")||TAB|*********************************************************** "RTN","XBTRK") 0^178^B1926712 "RTN","XBTRK",1,0) XBTRK ;IHS/ASDST/GTH - GET SITE PACKAGE INFO ; [ 10/29/2002 7:42 AM ] "RTN","XBTRK",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBTRK",3,0) ; "RTN","XBTRK",4,0) ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBTRK",5,0) ; "RTN","XBTRK",6,0) ; Thanks to Don Jackson and Carlos Cordova for the original routine. "RTN","XBTRK",7,0) ; June 6, 2001. "RTN","XBTRK",8,0) ; "RTN","XBTRK",9,0) ; This routine counts the number of patched routines in each namespace "RTN","XBTRK",10,0) ; in each entry in the PACKAGE file, and, if run in foreground, only "RTN","XBTRK",11,0) ; delivers a mail message with the results to all local programmers. "RTN","XBTRK",12,0) ; "RTN","XBTRK",13,0) ; If Q'd thru option "XB PACKAGE TRACKING", in addition to the mail "RTN","XBTRK",14,0) ; message getting generated, a file is sent to the system id(s) "RTN","XBTRK",15,0) ; specified on the 2nd page of the TaskMan option scheduling function, "RTN","XBTRK",16,0) ; with the id(s) set into variable XBSYSID(n), where "n" is a numeric "RTN","XBTRK",17,0) ; subscript. "RTN","XBTRK",18,0) ; "RTN","XBTRK",19,0) ; The option, "XB PACKAGE TRACKING", is recommended to run every 30 "RTN","XBTRK",20,0) ; days, and is atch'd to the Site Manager's menu, "XUSITEMGR", as a "RTN","XBTRK",21,0) ; protection against deletion by the Kernel's dangling-option cleanup "RTN","XBTRK",22,0) ; process. "RTN","XBTRK",23,0) ; "RTN","XBTRK",24,0) ; The format of the data global transmitted to the System(s) is: "RTN","XBTRK",25,0) ; CV^namespace^name^version^#routines^patch "RTN","XBTRK",26,0) ; where "CV" means "Current Version" on that machine. If the "RTN","XBTRK",27,0) ; first piece is "PV", the info on that node means the the version "RTN","XBTRK",28,0) ; of the routines was a "Previous Version". This assumes there are "RTN","XBTRK",29,0) ; no 'future' versions. "RTN","XBTRK",30,0) ; "RTN","XBTRK",31,0) START ;EP - From TaskMan. "RTN","XBTRK",32,0) ; "RTN","XBTRK",33,0) I '$D(ZTQUEUED) D Q:'$$DIR^XBDIR("Y","Proceed","N",$S($G(DTIME):DTIME,1:300),"If you answer 'Y', we'll go ahead and run this") W ! "RTN","XBTRK",34,0) . D ^XBKVAR "RTN","XBTRK",35,0) . S ^UTILITY($J,"XBTRK")="" "RTN","XBTRK",36,0) . D EN^XBRPTL "RTN","XBTRK",37,0) .Q "RTN","XBTRK",38,0) ; "RTN","XBTRK",39,0) KILL ^XBPKDATA ; KILL of unsubscripted work global. "RTN","XBTRK",40,0) KILL ^TMP("XBTRK",$J),^TMP("XBTRK XMD",$J) "RTN","XBTRK",41,0) ; "RTN","XBTRK",42,0) ; Process every entry in the PACKAGE file that has a PREFIX value. "RTN","XBTRK",43,0) ; "RTN","XBTRK",44,0) NEW XBI,XBN "RTN","XBTRK",45,0) S XBI=0 "RTN","XBTRK",46,0) F S XBI=$O(^DIC(9.4,XBI)) Q:'XBI D "RTN","XBTRK",47,0) . S XBN=$P($G(^DIC(9.4,XBI,0)),U,2) "RTN","XBUPCASE") 0^179^B30215 "RTN","XBUPCASE",1,0) XBUPCASE ; IHS/ADC/GTH - UPCASE VALUE IN X ; [ 02/07/97 3:02 PM ] "RTN","XBUPCASE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBUPCASE",3,0) ; "RTN","XBUPCASE",4,0) ; Upcase value in X "RTN","XBUPCASE",5,0) ; "RTN","XBUPCASE",6,0) START ; "RTN","XBUPCASE",7,0) S X=$$UP^XLFSTR(X) "RTN","XBUPCASE",8,0) Q "RTN","XBUPCASE",9,0) ; "RTN","XBUTL") 0^180^B1192881 "RTN","XBUTL",1,0) XBUTL ;IHS/ITSC/CLS - XB MISCELLANEOUS UTILITIES [ 10/06/2005 9:59 AM ] "RTN","XBUTL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBUTL",3,0) ; "RTN","XBUTL",4,0) LINK(P,C) ;link protocols child to parent "RTN","XBUTL",5,0) ;Input: P-Parent protocol "RTN","XBUTL",6,0) ; C-Child protocol "RTN","XBUTL",7,0) N IENARY,PIEN,AIEN,FDA,ERR "RTN","XBUTL",8,0) Q:'$L(P)!('$L(C)) "RTN","XBUTL",9,0) S IENARY(1)=$$FIND1^DIC(101,"","",P) "RTN","XBUTL",10,0) S AIEN=$$FIND1^DIC(101,"","",C) "RTN","XBUTL",11,0) Q:'IENARY(1)!'AIEN "RTN","XBUTL",12,0) S FDA(101.01,"?+2,"_IENARY(1)_",",.01)=AIEN "RTN","XBUTL",13,0) D UPDATE^DIE("S","FDA","IENARY","ERR") "RTN","XBUTL",14,0) ;I $G(ERR("DIERR",1)) W ! ZW ERR ;IHS/CIA/PLS for debugging use "RTN","XBUTL",15,0) Q "RTN","XBUTL",16,0) LUHN(X) ;calulate check digit, Luhn formula for NPI "RTN","XBUTL",17,0) ;x=10 digit number "RTN","XBUTL",18,0) I '+X S X=0 Q X "RTN","XBUTL",19,0) I $E(X,1,5)=80840 D "RTN","XBUTL",20,0) .S X=$E(X,6,15) "RTN","XBUTL",21,0) S XBSTRING="" "RTN","XBUTL",22,0) I X'?10N S X=0 Q X "RTN","XBUTL",23,0) S XBCD=$E(X,10) "RTN","XBUTL",24,0) F I=1:1:9 D "RTN","XBUTL",25,0) .I (I#2) D "RTN","XBUTL",26,0) ..S XBSTRING=XBSTRING_($E(X,I)*2) "RTN","XBUTL",27,0) .I '(I#2) D "RTN","XBUTL",28,0) ..S XBSTRING=XBSTRING_$E(X,I) "RTN","XBUTL",29,0) S XBTOT=0 "RTN","XBUTL",30,0) F I=1:1:$L(XBSTRING) D "RTN","XBUTL",31,0) .S XBTOT=XBTOT+$E(XBSTRING,I) "RTN","XBUTL",32,0) S XBTOT=XBTOT+24 "RTN","XBUTL",33,0) S XBTOT=1000-XBTOT "RTN","XBUTL",34,0) S X=$E(XBTOT,$L(XBTOT)) "RTN","XBUTL",35,0) I X'=XBCD S X=0 Q X "RTN","XBUTL",36,0) S X=1 Q X "RTN","XBVCH") 0^181^B18686034 "RTN","XBVCH",1,0) XBVCH ; IHS/ADC/GTH - CHANGE VARIABLE NAMES ; [ 02/07/97 3:02 PM ] "RTN","XBVCH",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVCH",3,0) ; "RTN","XBVCH",4,0) ; Thanks to Paul Wesley, DSD/OIRM, for the original routine. "RTN","XBVCH",5,0) ; "RTN","XBVCH",6,0) I '$D(IOST(0)) D HOME^%ZIS "RTN","XBVCH",7,0) S XBJ=$J "RTN","XBVCH",8,0) D EXIT^XBVCH "RTN","XBVCH",9,0) S XBJ=$J "RTN","XBVCH",10,0) S X="IORVON;IORVOFF;IOUON;IOUOFF;IOINHI;IOINORM;IOAWM0;IOAWM1" "RTN","XBVCH",11,0) D ENDR^%ZISS "RTN","XBVCH",12,0) S XBD(0)=IOUON,XBD(1)=IOUOFF,XBD(2)=IORVON,XBD(3)=IORVOFF,XBD(4)=IORVON,XBD(5)=IORVOFF,XBD(6)=IOAWM0,XBD(7)=IOAWM1,XBXY=IOXY "RTN","XBVCH",13,0) D KILL^%ZISS "RTN","XBVCH",14,0) S XBP=" #&'()*+,'-/<=>@\_?;:[]!""" "RTN","XBVCH",15,0) S XBS=" #&'()*+,'-/<=>@\_?;:[]!""" "RTN","XBVCH",16,0) KILL DIR "RTN","XBVCH",17,0) S DIR(0)="Y",DIR("B")="Y",DIR("A")="Do you have a %INDEX Summary in a Host File to work with ? " "RTN","XBVCH",18,0) D ^DIR "RTN","XBVCH",19,0) KILL DIR "RTN","XBVCH",20,0) D:Y=1 ^XBVCHV "RTN","XBVCH",21,0) START ; "RTN","XBVCH",22,0) KILL XBV0,XBV1,XBV2 "RTN","XBVCH",23,0) V0 ; "RTN","XBVCH",24,0) KILL DIR "RTN","XBVCH",25,0) S DIR(0)="F:0,8",DIR("A")="Old Variable ? or '^' to exit " "RTN","XBVCH",26,0) I $G(XBFILE) S DIR("A")=DIR("A")_" or '|' to see variables " "RTN","XBVCH",27,0) D ^DIR "RTN","XBVCH",28,0) KILL DIR "RTN","XBVCH",29,0) G:(Y="^") EXIT "RTN","XBVCH",30,0) I Y["|",$G(XBFILE) S XBV="" D SHOVAR G V0 "RTN","XBVCH",31,0) I $G(XBFILE),'$D(^XBVROU(XBJ,"V",Y)) W *7 G V0 "RTN","XBVCH",32,0) S XBV0=Y "RTN","XBVCH",33,0) V1 ; "RTN","XBVCH",34,0) KILL DIR "RTN","XBVCH",35,0) S DIR(0)="F:0,8",DIR("A")="New Variable ? or '^' to exit " "RTN","XBVCH",36,0) D ^DIR "RTN","XBVCH",37,0) KILL DIR "RTN","XBVCH",38,0) G:(Y="^") V0 "RTN","XBVCH",39,0) S XBV1=Y "RTN","XBVCH",40,0) I $G(XBFILE),$D(^XBVROU(XBJ,"V",XBV1)) W *7,!!,"FYI >> ",XBV1," << Already Exits" KILL DIR S DIR(0)="E" D ^DIR I Y'>0 G V1 "RTN","XBVCH",41,0) I $D(^XBVROU(XBJ,"NV",XBV1)) W *7,!!,"FYI >> ",XBV1," << is a >>NEW VARIABLE<" KILL DIR S DIR(0)="E" D ^DIR I Y'>0 G V1 "RTN","XBVCH",42,0) ; "RTN","XBVCH",43,0) V2 ; "RTN","XBVCH",44,0) S XBV1L=$L(XBV1) "RTN","XBVCH",45,0) I $E(XBV1,XBV1L)=")" S XBV2=$E(XBV1,1,XBV1L-1)_"," "RTN","XBVCH",46,0) SELROU ; "RTN","XBVCH",47,0) I '$G(XBFILE) X ^%ZOSF("RSEL") S %X="^UTILITY(XBJ,",%Y="^XBVROU(XBJ,""R""," D %XY^%RCR "RTN","XBVCH",48,0) I $G(XBFILE) F XBVI=1:1 Q:'$D(^XBVROU(XBJ,"V",XBV0,XBVI)) S XBVRM=^(XBVI) D "RTN","XBVCH",49,0) . I XBVRM'["," S ^XBVROU(XBJ,"R",XBVRM)="" Q "RTN","XBVCH",50,0) . F XBVJ=1:1 S XBVR=$P(XBVRM,",",XBVJ) Q:XBVR="" S ^XBVROU(XBJ,"R",XBVR)="" "RTN","XBVCH",51,0) .Q "RTN","XBVCH",52,0) ; "RTN","XBVCH",53,0) ;---------------------------------------- "RTN","XBVCH",54,0) ; "RTN","XBVCH",55,0) PROCESS ; "RTN","XBVCH",56,0) D ^XBVCH1 "RTN","XBVCH",57,0) G START "RTN","XBVCH",58,0) ; "RTN","XBVCH",59,0) ;-------------------- "RTN","XBVCH",60,0) ; "RTN","XBVCH",61,0) SHOVAR ; "RTN","XBVCH",62,0) D ^XBCLS "RTN","XBVCH",63,0) S XBVAR="" "RTN","XBVCH",64,0) F XBI=0:1 S XBVAR=$O(^XBVROU(XBJ,"V",XBVAR)) Q:XBVAR="" D:'(XBI#120) PAGE Q:X="^" W:'(XBI#6) ! W ?((XBI#6)*10),XBVAR "RTN","XBVCH",65,0) Q "RTN","XBVCH",66,0) ; "RTN","XBVCH",67,0) PAGE ; "RTN","XBVCH",68,0) Q:XBI=0 "RTN","XBVCH",69,0) KILL DIR "RTN","XBVCH",70,0) S DIR(0)="E" "RTN","XBVCH",71,0) D ^DIR "RTN","XBVCH",72,0) Q "RTN","XBVCH",73,0) ; "RTN","XBVCH",74,0) ;---------------------- "RTN","XBVCH",75,0) EXIT ;EP - Paginat, print, kill, quit. "RTN","XBVCH",76,0) D ^XBCLS "RTN","XBVCH",77,0) I $D(^XBVROU("PRT",XBJ,"VCHG")) D PRINT "RTN","XBVCH",78,0) KILL ^XBVROU(XBJ),^UTILITY(XBJ) "RTN","XBVCH",79,0) I '$D(ZTQUEUED) KILL ^XBVROU("PRT",XBJ) "RTN","XBVCH",80,0) D EN^XBVK("XB") "RTN","XBVCH",81,0) Q "RTN","XBVCH",82,0) ; "RTN","XBVCH",83,0) PRINT ;print variables and routines changed "RTN","XBVCH",84,0) ; "RTN","XBVCH",85,0) KILL XBRC,XBRP,XBRX "RTN","XBVCH",86,0) W !,"Changes were made and a Summary is available",!! "RTN","XBVCH",87,0) S XBRP="PRINT1^XBVCH",XBNS="XB*" "RTN","XBVCH",88,0) D ^XBDBQUE "RTN","XBVCH",89,0) Q "RTN","XBVCH",90,0) ; "RTN","XBVCH",91,0) PRINT1 ; Continue print "RTN","XBVCH",92,0) S:'$D(XBJ) XBJ=$J "RTN","XBVCH",93,0) S XBPG("HDR")="VARIABLES/ROUTINES CHANGED" "RTN","XBVCH",94,0) D XBHDR "RTN","XBVCH",95,0) S XBSUB="" "RTN","XBVCH",96,0) F S XBSUB=$O(^XBVROU("PRT",XBJ,"VCHG",XBSUB)) Q:XBSUB="" D "RTN","XBVCH",97,0) . U IO "RTN","XBVCH",98,0) . W !!?5,XBSUB "RTN","XBVCH",99,0) . S XBROU="" "RTN","XBVCH",100,0) . F XBC=2:1 S XBROU=$O(^XBVROU("PRT",XBJ,"VCHG",XBSUB,XBROU)) Q:XBROU="" D XBPG D "RTN","XBVCH",101,0) .. U IO "RTN","XBVCH",102,0) .. W ?(10*XBC),XBROU "RTN","XBVCH",103,0) .. I (XBC+2)>(IOM\10) S XBC=0 W ! D XBPG "RTN","XBVCH",104,0) ..Q "RTN","XBVCH",105,0) .Q "RTN","XBVCH",106,0) S XBROU="" "RTN","XBVCH",107,0) F S XBROU=$O(^XBVROU("PRT",XBJ,"RCHG",XBROU)) Q:XBROU="" D XBPG D "RTN","XBVCH",108,0) . U IO "RTN","XBVCH",109,0) . W !!?5,XBROU "RTN","XBVCH",110,0) . S XBSUB="" "RTN","XBVCH",111,0) . F XBC=2:1 S XBSUB=$O(^XBVROU("PRT",XBJ,"RCHG",XBROU,XBSUB)) Q:XBSUB="" D "RTN","XBVCH",112,0) .. U IO "RTN","XBVCH",113,0) .. W ?(20*XBC),XBSUB "RTN","XBVCH",114,0) .. I (XBC+2)>(IOM\20) S XBC=0 W ! D XBPG "RTN","XBVCH",115,0) ..Q "RTN","XBVCH",116,0) .Q "RTN","XBVCH",117,0) Q "RTN","XBVCH",118,0) ; "RTN","XBVCH",119,0) XBPG ;EP PAGE CONTROLLER "RTN","XBVCH",120,0) ; this utility uses variables XBPG("HDR"),XBPG("DT"),XBPG("LINE"),XBPG("PG") ; kill variables by D EXBPG "RTN","XBVCH",121,0) ; "RTN","XBVCH",122,0) Q:($Y<(IOSL-4))!($G(DUOUT)) "RTN","XBVCH",123,0) S XBPG("PG")=$G(XBPG("PG"))+1 "RTN","XBVCH",124,0) I $E(IOST)="C" S Y=$$DIR^XBDIR("E") Q:($G(DIROUT)!$G(DUOUT)!$G(DTOUT)) "RTN","XBVCH",125,0) XBHDR ;EP write page header "RTN","XBVCH",126,0) W:$Y @IOF "RTN","XBVCH",127,0) W ! "RTN","XBVCH",128,0) Q:'$D(XBPG("HDR")) "RTN","XBVCH",129,0) S:'$D(XBPG("LINE")) $P(XBPG("LINE"),"-",IOM-2)="" "RTN","XBVCH",130,0) S:'$D(XBPG("PG")) XBPG("PG")=1 "RTN","XBVCH",131,0) I '$D(XBPG("DT")) S %H=$H D YX^%DTC S XBPG("DT")=Y "RTN","XBVCH",132,0) U IO "RTN","XBVCH",133,0) W ?(IOM-40-$L(XBPG("HDR"))/2),XBPG("HDR"),?(IOM-40),XBPG("DT"),?(IOM-10),"PAGE: ",XBPG("PG"),!,XBPG("LINE") "RTN","XBVCH",134,0) XBHD ;EP Write column header / message "RTN","XBVCH",135,0) W !! "RTN","XBVCH",136,0) Q "RTN","XBVCH",137,0) ; "RTN","XBVCH",138,0) EXBPG ; "RTN","XBVCH",139,0) KILL XBPG("LINE"),XBPG("PG"),XBPG("HDR"),XBPG("DT") "RTN","XBVCH",140,0) Q "RTN","XBVCH",141,0) ; "RTN","XBVCH1") 0^182^B39538847 "RTN","XBVCH1",1,0) XBVCH1 ; IHS/ADC/GTH - CONTINUE VARIABLE CHANGER ; [ 10/29/2002 7:42 AM ] "RTN","XBVCH1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVCH1",3,0) ; "RTN","XBVCH1",4,0) ; Thanks to Paul Wesley, DSD/OIRM, for the original routine. "RTN","XBVCH1",5,0) ; "RTN","XBVCH1",6,0) PROCESS ; "RTN","XBVCH1",7,0) S XBL=$L(XBV0),XBOUT=0 "RTN","XBVCH1",8,0) S X=0 "RTN","XBVCH1",9,0) X ^%ZOSF("RM") "RTN","XBVCH1",10,0) S (XBROU,XBRM)="" "RTN","XBVCH1",11,0) F S XBROU=$O(^XBVROU(XBJ,"R",XBROU)) Q:XBROU="" S XBRM=XBRM_XBROU_"," "RTN","XBVCH1",12,0) S XBROU="" "RTN","XBVCH1",13,0) F S XBROU=$O(^XBVROU(XBJ,"R",XBROU)) Q:XBROU="" D Q:$G(XBOUT) "RTN","XBVCH1",14,0) . S X=XBROU "RTN","XBVCH1",15,0) . X ^%ZOSF("TEST") "RTN","XBVCH1",16,0) . E D ^XBCLS W !!,X," NOT FOUND",! KILL DIR S DIR(0)="E" D ^DIR S:(Y=0) XBOUT=1 Q "RTN","XBVCH1",17,0) . S X=XBROU,DIF="^XBVROU(XBJ,""R"","""_XBROU_""",",(XCNP,%N)=0 "RTN","XBVCH1",18,0) . X ^%ZOSF("LOAD") "RTN","XBVCH1",19,0) . I ^XBVROU(XBJ,"R",XBROU,1,0)["GENERATED FROM" W !,^(0),! KILL DIR S DIR(0)="E" D ^DIR D ^XBCLS Q "RTN","XBVCH1",20,0) . S XBLN=0,XBEDIT=0 "RTN","XBVCH1",21,0) . F S XBLN=$O(^XBVROU(XBJ,"R",XBROU,XBLN)) Q:XBLN="" S XBLIN=^(XBLN,0) D LIN Q:$G(XBOUT) "RTN","XBVCH1",22,0) . I XBEDIT D SAVE "RTN","XBVCH1",23,0) . KILL ^XBVROU(XBJ,"R",XBROU) "RTN","XBVCH1",24,0) .Q "RTN","XBVCH1",25,0) Q "RTN","XBVCH1",26,0) ; "RTN","XBVCH1",27,0) DISPROU ;display routine list "RTN","XBVCH1",28,0) S DX=1,DY=22 "RTN","XBVCH1",29,0) X XBXY "RTN","XBVCH1",30,0) S XBRD="" "RTN","XBVCH1",31,0) F XBRI=1:1 S XBRD=$P(XBRM,",",XBRI) Q:XBRD="" W:'(XBRI-1#8) ! S XBRC=(10*(XBRI-1#8)) W ?XBRC W:XBRD=XBROU "|" W XBRD W:XBRD=XBROU "|" "RTN","XBVCH1",32,0) Q "RTN","XBVCH1",33,0) ; "RTN","XBVCH1",34,0) ;-------------------------------------- "RTN","XBVCH1",35,0) ; "RTN","XBVCH1",36,0) LIN ;PROCESS LINE FROM TOP "RTN","XBVCH1",37,0) S XBLIN0=XBLIN,XBVX=XBV0 "RTN","XBVCH1",38,0) Q:XBLIN0'[XBV0 "RTN","XBVCH1",39,0) D SCAN0,CHKMK "RTN","XBVCH1",40,0) I '$G(XBMK),$L(XBV0)=1 Q ;skip when single character variable "RTN","XBVCH1",41,0) I '$G(XBMK) KILL XBEDLIN D EDIT,CHKMK Q:'$G(XBMK) Q:$G(XBOUT) "RTN","XBVCH1",42,0) D ACCEPT "RTN","XBVCH1",43,0) Q "RTN","XBVCH1",44,0) ; "RTN","XBVCH1",45,0) SCAN0 ; "RTN","XBVCH1",46,0) S XBLINX=XBLIN0,XBVX=XBV0 "RTN","XBVCH1",47,0) D SCAN,UPT "RTN","XBVCH1",48,0) Q "RTN","XBVCH1",49,0) ; "RTN","XBVCH1",50,0) SCAN1 ; "RTN","XBVCH1",51,0) S XBLINX=XBLIN1,XBVX=XBV1 "RTN","XBVCH1",52,0) D SCAN "RTN","XBVCH1",53,0) Q "RTN","XBVCH1",54,0) ; "RTN","XBVCH1",55,0) DISP0 ; "RTN","XBVCH1",56,0) S XBVX=XBV0,XBLINX=XBLIN0 "RTN","XBVCH1",57,0) D ^XBCLS,DISPLAY "RTN","XBVCH1",58,0) Q "RTN","XBVCH1",59,0) ; "RTN","XBVCH1",60,0) DISP1 ; "RTN","XBVCH1",61,0) S XBVX=XBV1,XBLINX=XBLIN1 "RTN","XBVCH1",62,0) D DISPLAY "RTN","XBVCH1",63,0) Q "RTN","XBVCH1",64,0) ; "RTN","XBVCH1",65,0) SCAN ; "RTN","XBVCH1",66,0) KILL XB,XBT,XBMK "RTN","XBVCH1",67,0) S XBL=$L(XBVX) "RTN","XBVCH1",68,0) F XBI=1:1 S XB(XBI)=$F(XBLINX,XBVX,$G(XB(XBI-1))+1)-XBL Q:XB(XBI)'>0 D "RTN","XBVCH1",69,0) . S XB(XBI,"M")=0,XB(XBI,0)=XB(XBI) "RTN","XBVCH1",70,0) . I XBP[$E(XBLINX,XB(XBI)-1),XBS[$E(XBLINX,XB(XBI)+XBL) S XB(XBI,"M")=1 "RTN","XBVCH1",71,0) . S XB("B",XB(XBI))=XBI,XB("E",XB(XBI)+XBL-1)=XBI "RTN","XBVCH1",72,0) . S XB(XBI,"E")=XB(XBI)+XBL-1 "RTN","XBVCH1",73,0) .Q "RTN","XBVCH1",74,0) KILL XB(XBI) "RTN","XBVCH1",75,0) CHKMK ; "RTN","XBVCH1",76,0) I XBVX=XBV0 KILL XBMK S XBJM="" F S XBJM=$O(XB(XBJM)) Q:XBJM="" I $G(XB(XBJM,"M")) W *7 S XBMK=1 "RTN","XBVCH1",77,0) KILL XBJM "RTN","XBVCH1",78,0) Q "RTN","XBVCH1",79,0) ; "RTN","XBVCH1",80,0) EDIT ; "RTN","XBVCH1",81,0) D DISP0 "RTN","XBVCH1",82,0) S DX=1,DY=13 "RTN","XBVCH1",83,0) X XBXY "RTN","XBVCH1",84,0) R "TAB/T/SPC/CR/R/N/%/^/? :",*X:DTIME "RTN","XBVCH1",85,0) S X=$C(X) "RTN","XBVCH1",86,0) I X="T" D UPT G EDIT "RTN","XBVCH1",87,0) I $A(X)=9 D UPT G EDIT "RTN","XBVCH1",88,0) I X=" " S XB(XBT,"M")=XB(XBT,"M")+1#2 D UPT G EDIT "RTN","XBVCH1",89,0) I X="R" S XBLN=0 KILL XBMK Q "RTN","XBVCH1",90,0) I X="N" S XBLN=999 KILL XBMK Q "RTN","XBVCH1",91,0) ; I X="%" D ^XBNEW("%EDIT^XBVCH1:XBJ;XBROU") S XBLN=0 KILL XBMK Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVCH1",92,0) I X="%" D EN^XBNEW("%EDIT^XBVCH1","XBJ;XBROU") S XBLN=0 KILL XBMK Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVCH1",93,0) I X="^" S XBOUT=1 KILL XBMK Q "RTN","XBVCH1",94,0) KILL XBMK "RTN","XBVCH1",95,0) S XBJM="" "RTN","XBVCH1",96,0) F S XBJM=$O(XB(XBJM)) Q:XBJM="" I $G(XB(XBJM,"M")) W *7 S XBMK=1 "RTN","XBVCH1",97,0) KILL XBJM "RTN","XBVCH1",98,0) I $A(X)=13 Q "RTN","XBVCH1",99,0) D ^XBCLS "RTN","XBVCH1",100,0) W !!! "RTN","XBVCH1",101,0) W !?5,"'X' Set changes" "RTN","XBVCH1",102,0) W !?5,"'Tab' or 'T' Move to next marker" "RTN","XBVCH1",103,0) W !?5,"'Space bar' Toggel marker and move to next" "RTN","XBVCH1",104,0) W !?5,"'CR' Skip to next line" "RTN","XBVCH1",105,0) W !?5,"'R' Restart the current Routine" "RTN","XBVCH1",106,0) W !?5,"'%' %E Edit Routine" "RTN","XBVCH1",107,0) W !?5,"'N' Next Routine" "RTN","XBVCH1",108,0) W !?5,"'^' Exit" "RTN","XBVCH1",109,0) KILL DIR "RTN","XBVCH1",110,0) S DIR(0)="E" "RTN","XBVCH1",111,0) D ^DIR "RTN","XBVCH1",112,0) G EDIT "RTN","XBVCH1",113,0) ; "RTN","XBVCH1",114,0) DISPLAY ; display line "RTN","XBVCH1",115,0) ; XB(XBI,0)=POS XB("B",POS)=XBI XB("E",POS)=XBI XB(XBI,"M")=MARK (0 OR 1) "RTN","XBVCH1",116,0) ; XBD(0) =underline-on,XBD(1)=Bold on,XBD(2)=Underline Off,XBD(3)=Bold Off,XBD("RVON")=RVON,XBD("RVOFF")=RVOFF "RTN","XBVCH1",117,0) D:(XBVX=XBV0) ^XBCLS ;displaying current line "RTN","XBVCH1",118,0) D:XBVX=XBV0 DISPROU "RTN","XBVCH1",119,0) S DX=0,DY=0 "RTN","XBVCH1",120,0) X XBXY "RTN","XBVCH1",121,0) W ?5,"routine ",XBROU,?35,"line ",XBLN,!! "RTN","XBVCH1",122,0) I XBVX=XBV1 W ! ;displaying new line "RTN","XBVCH1",123,0) W XBD(6) "RTN","XBVCH1",124,0) F XBI=1:1:$L(XBLINX) D "RTN","XBVCH1",125,0) . I '(XBI#80) W !!! "RTN","XBVCH1",126,0) . I $D(XB("B",XBI)) W XBD(XB(XB("B",XBI),"M")*2) "RTN","XBVCH1",127,0) . W $E(XBLINX,XBI) "RTN","XBVCH1",128,0) . I $D(XB("E",XBI)) W XBD(XB(XB("E",XBI),"M")*2+1) "RTN","XBVCH1",129,0) .Q "RTN","XBVCH1",130,0) W XBD(7) "RTN","XBVCH1",131,0) Q:(XBVX=XBV1) ;no tab marker when displaying new line "RTN","XBVCH1",132,0) TAB ; "RTN","XBVCH1",133,0) S DY=+3,DX=XB(XBT,0)#80-1,DY=DY+(XB(XBT,0)\80*3) "RTN","XBVCH1",134,0) S:DY>8 DX=DX+1 "RTN","XBVCH1",135,0) TAB1 ; "RTN","XBVCH1",136,0) X XBXY "RTN","XBVCH1",137,0) W XBD(2),"|",XBD(3) "RTN","XBVCH1",138,0) Q "RTN","XBVCH1",139,0) ; "RTN","XBVCH1",140,0) UPT ; SET TAB "RTN","XBVCH1",141,0) S XBT=$G(XBT),XBT=$O(XB(XBT)) "RTN","XBVCH1",142,0) I XBT'>0 S XBT=0 G UPT "RTN","XBVCH1",143,0) KILL XB("T") "RTN","XBVCH1",144,0) S XB("T",XB(XBT,0))="" "RTN","XBVCH1",145,0) Q "RTN","XBVCH1",146,0) ; "RTN","XBVCH1",147,0) BLDLIN1 ; "RTN","XBVCH1",148,0) S XBLIN0=XBLIN,XBSUB=XBV0_":"_XBV1,XBLIN1="" "RTN","XBVCH1",149,0) F XBI=1:1 Q:'$D(XB(XBI)) S XBLIN1=XBLIN1_$E(XBLIN,$G(XB(XBI-1,"E"))+1,XB(XBI,0)-1)_$S(XB(XBI,"M"):XBV1,1:XBV0) "RTN","XBVCH1",150,0) S XBI=XBI-1 "RTN","XBVCH1",151,0) S XBLIN1=XBLIN1_$E(XBLIN,XB(XBI,"E")+1,999) "RTN","XBVCH1",152,0) Q "RTN","XBVCH1",153,0) ; "RTN","XBVCH1",154,0) ACCEPT ; "RTN","XBVCH1",155,0) D DISP0,BLDLIN1,SCAN1,DISP1 "RTN","XBVCH1",156,0) KILL DIR "RTN","XBVCH1",157,0) S DIR(0)="S^Y:ACCEPT;E:EDIT;S:SKIP;N:NEXT ROUTINE;Q:QUIT",DIR("B")="Y" "RTN","XBVCH1",158,0) S X=$P(XBLINX," ",2,999) "RTN","XBVCH1",159,0) F Q:$E(X)'=" " S X=$E(X,2,999) "RTN","XBVCH1",160,0) F Q:$E(X)'="." S X=$E(X,2,999) "RTN","XBVCH1",161,0) D ^DIM "RTN","XBVCH1",162,0) I '$D(X) W *7,!,XBD(2),"FM DIM checker does not like this line !",XBD(3),!,XBD(2),XBLINX,XBD(3),! S DIR("B")="E" "RTN","XBVCH1",163,0) D ^DIR "RTN","XBVCH1",164,0) KILL DIR "RTN","XBVCH1",165,0) I Y="N" S XBLN=999 Q "RTN","XBVCH1",166,0) I Y="S" Q "RTN","XBVCH1",167,0) I Y="E" D SCAN0,EDIT,CHKMK G:$G(XBMK) ACCEPT Q "RTN","XBVCH1",168,0) I Y="Q" S XBOUT=1 Q "RTN","XBVCH1",169,0) I Y'="Y" G ACCEPT "RTN","XBVCH1",170,0) S XBEDIT=1 ; set edit markers "RTN","XBVCH1",171,0) S XBLIN=XBLIN1,^XBVROU(XBJ,"R",XBROU,XBLN,0)=XBLIN ;set new line "RTN","XBVCH1",172,0) Q "RTN","XBVCH1",173,0) ; "RTN","XBVCH1",174,0) %EDIT ; USE %E EDITOR "RTN","XBVCH1",175,0) X "ZL @XBROU X ^%E" "RTN","XBVCH1",176,0) KILL ^XBVROU(XBJ,"R",XBROU) "RTN","XBVCH1",177,0) S X=XBROU,DIF="^XBVROU(XBJ,""R"","""_XBROU_""",",(XCNP,%N)=0 "RTN","XBVCH1",178,0) X ^%ZOSF("LOAD") "RTN","XBVCH1",179,0) S XBLIN=0 "RTN","XBVCH1",180,0) Q "RTN","XBVCH1",181,0) ; "RTN","XBVCH1",182,0) SAVE ; SAVE NEW ROUTINE TO DISK "RTN","XBVCH1",183,0) D ^XBCLS "RTN","XBVCH1",184,0) X ^%ZOSF("UCI") "RTN","XBVCH1",185,0) I Y["DEV," W !,"you are in DEV .. NO CHANGES" H 2 Q "RTN","XBVCH1",186,0) I Y["PRD," W !,"you are in PRD .. NO CHANGES" H 2 Q "RTN","XBVCH1",187,0) KILL DIR "RTN","XBVCH1",188,0) S DIR(0)="Y",DIR("A")=XBROU_" has been changed. Save with Changes ?",DIR("B")="Y" "RTN","XBVCH1",189,0) D ^DIR "RTN","XBVCH1",190,0) KILL DIR "RTN","XBVCH1",191,0) I 'Y W !?5,XBROU," NOT CHANGED" H 3 D ^XBCLS Q "RTN","XBVCH1",192,0) W !?5,XBROU,"is being saved with changes",! "RTN","XBVCH1",193,0) S XBSAV1="ZR",XBSAV2="F XBI=1:1 S XBX=$G(^XBVROU(XBJ,""R"",XBROU,XBI,0)) Q:'$L(XBX) ZI XBX",XBSAV3="ZS @XBROU" "RTN","XBVCH1",194,0) X "X XBSAV1,XBSAV2,XBSAV3" "RTN","XBVCH1",195,0) S ^XBVROU("PRT",$J,"VCHG",XBSUB,XBROU)="" "RTN","XBVCH1",196,0) S ^XBVROU("PRT",$J,"RCHG",XBROU,XBSUB)="" "RTN","XBVCH1",197,0) S ^XBVROU(XBJ,"NV",XBV1)="" "RTN","XBVCH1",198,0) W !?5,XBROU,"SAVED WITH CHANGES" H 2 "RTN","XBVCH1",199,0) Q "RTN","XBVCH1",200,0) ; "RTN","XBVCHV") 0^183^B4275480 "RTN","XBVCHV",1,0) XBVCHV ; IHS/ADC/GTH - PULL IN VARIABLES AND ROUTINES FROM A %INDEX ; [ 02/07/97 3:02 PM ] "RTN","XBVCHV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVCHV",3,0) ; "RTN","XBVCHV",4,0) ; Thanks to Paul Wesley, DSD/OIRM, for the original routine. "RTN","XBVCHV",5,0) ; "RTN","XBVCHV",6,0) OPEN ; "RTN","XBVCHV",7,0) D DT^DICRW "RTN","XBVCHV",8,0) D ^XBCLS "RTN","XBVCHV",9,0) W !!,"Select a %INDEX Summary that was put to disk",! "RTN","XBVCHV",10,0) KILL DIR "RTN","XBVCHV",11,0) S DIR(0)="F^1:30",DIR("A")="Directory ",DIR("B")="/usr/mumps/" "RTN","XBVCHV",12,0) D ^DIR "RTN","XBVCHV",13,0) KILL DIR "RTN","XBVCHV",14,0) Q:Y["^" "RTN","XBVCHV",15,0) S XBDIR=Y "RTN","XBVCHV",16,0) FNAME ; "RTN","XBVCHV",17,0) KILL DIR "RTN","XBVCHV",18,0) FNAME1 ; "RTN","XBVCHV",19,0) S DIR(0)="F^1:15",DIR("A")="File Name " "RTN","XBVCHV",20,0) D ^DIR "RTN","XBVCHV",21,0) KILL DIR "RTN","XBVCHV",22,0) G:Y["^" OPEN "RTN","XBVCHV",23,0) I Y?.N,$D(XBFL(Y)) S DIR("B")=XBFL(Y) G FNAME1 "RTN","XBVCHV",24,0) I Y["*" KILL XBFL S X=$$LIST^%ZISH(XBDIR,Y,.XBFL) D G FNAME "RTN","XBVCHV",25,0) . F XBI=1:1 Q:'$D(XBFL(XBI)) W !?5,XBI,?10,XBFL(XBI) "RTN","XBVCHV",26,0) .Q "RTN","XBVCHV",27,0) S XBFN=Y,X=$$OPEN^%ZISH(XBDIR,XBFN,"R") "RTN","XBVCHV",28,0) ES ; "RTN","XBVCHV",29,0) I X W !,"error on open of file ",XBDIR,XBFN,! KILL DIR S DIR(0)="E" D ^DIRQ:Y=1 G FNAME "RTN","XBVCHV",30,0) S XBJ=$J,XBVRLC=0 "RTN","XBVCHV",31,0) KILL ^XBVROU(XBJ,"V") "RTN","XBVCHV",32,0) W !,"Looking for 'Indexed Routines:' ",! "RTN","XBVCHV",33,0) READ ; "RTN","XBVCHV",34,0) F XBI=1:1:20 U IO R X:DTIME U IO(0) W "." I X["Indexed Routines:" S XBOK=1 W !,"Found ! ... continuing" Q "RTN","XBVCHV",35,0) I '$G(XBOK) KILL DIR "RTN","XBVCHV",36,0) F XBI=1:1 U IO R X:DTIME Q:X["Local V" "RTN","XBVCHV",37,0) F XBI=1:1 U IO R X:DTIME Q:X["Global " D "RTN","XBVCHV",38,0) . Q:$L(X)<17 "RTN","XBVCHV",39,0) . Q:$E(X,17)=" " "RTN","XBVCHV",40,0) . I X[$C(13) S X=$P(X,$C(13)) "RTN","XBVCHV",41,0) . S XBVARL=$G(XBVAR) "RTN","XBVCHV",42,0) . I $E(X,4)'=" " S XBVAR="" F XBI=4:1 S XBX=$E(X,XBI) Q:" ("[XBX S XBVAR=XBVAR_XBX "RTN","XBVCHV",43,0) . I XBVAR'=XBVARL S XBVRLC=0 "RTN","XBVCHV",44,0) . S XBR=$E(X,17,999),XBR=$TR(XBR,"*!","") "RTN","XBVCHV",45,0) . S XBVRLC=XBVRLC+1,^XBVROU(XBJ,"V",XBVAR,XBVRLC)=XBR "RTN","XBVCHV",46,0) .Q "RTN","XBVCHV",47,0) D ^%ZISC "RTN","XBVCHV",48,0) S XBFILE=1 "RTN","XBVCHV",49,0) Q "RTN","XBVCHV",50,0) ; "RTN","XBVDF") 0^184^B4449120 "RTN","XBVDF",1,0) XBVDF ; IHS/ASDST/DMJ - VIDEO DISPLAY FEATURES ; [ 10/07/2004 3:00 PM ] "RTN","XBVDF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVDF",3,0) EN(X) ;EP "RTN","XBVDF",4,0) I X="" Q X "RTN","XBVDF",5,0) I '$L($T(@X)) S X="" Q X "RTN","XBVDF",6,0) S XB1("X")=$X "RTN","XBVDF",7,0) I '$G(IOST(0)) S IOP=0 D ^%ZIS "RTN","XBVDF",8,0) I '$D(XBVDF(+IOST(0),X)) D "RTN","XBVDF",9,0) .S XB1("LN")=$T(@X),XB1(1)=$P(XB1("LN"),";;",2),XB1(2)=$P(XB1("LN"),";;",3),XB1(3)=$P(XB1("LN"),";;",4) "RTN","XBVDF",10,0) .S XBVDF(+IOST(0),X)=$P($G(^%ZIS(2,+IOST(0),XB1(1))),"^",XB1(2),XB1(3)) "RTN","XBVDF",11,0) .I XBVDF(+IOST(0),X)="" S XBVDF(+IOST(0),X)="*0" "RTN","XBVDF",12,0) W @XBVDF(+IOST(0),X) "RTN","XBVDF",13,0) S $X=XB1("X") "RTN","XBVDF",14,0) S X="" "RTN","XBVDF",15,0) K XB1 "RTN","XBVDF",16,0) Q X "RTN","XBVDF",17,0) ;GLOBAL LOCATIONS TO FOLLOW "RTN","XBVDF",18,0) HIN ;;7;;1;;1;;HI INTENSITY ON "RTN","XBVDF",19,0) HIX ;;7;;2;;2;;HI INTENSITY OFF "RTN","XBVDF",20,0) RVN ;;5;;4;;4;;REVERSE VIDEO ON "RTN","XBVDF",21,0) RVX ;;5;;5;;5;;REVERSE VIDEO OFF "RTN","XBVDF",22,0) ULN ;;6;;4;;4;;UNDERLINE ON "RTN","XBVDF",23,0) ULX ;;6;;5;;5;;UNDERLINE OFF "RTN","XBVDF",24,0) DTP ;;17;;1;;1;;DOUBLE HIGH TOP HALF "RTN","XBVDF",25,0) DTB ;;17;;2;;2;;DOUBLE HIGH BOTTOM HALF "RTN","XBVDF",26,0) BLN ;;5;;8;;8;;BLINK ON "RTN","XBVDF",27,0) BLX ;;5;;9;;9;;BLINK OFF "RTN","XBVDF",28,0) CUP ;;8;;1;;1;;CURSOR UP "RTN","XBVDF",29,0) IOF ;;1;;2;;2;;FORM FEED/CLEAR SCREEN "RTN","XBVDF",30,0) 10 ;;5;;1;;1;;TEN PITCH "RTN","XBVDF",31,0) 12 ;;5;;2;;2;;TWELVE PITCH "RTN","XBVDF",32,0) 16 ;;12.1;;1;;250;;SIXTEEN PITCH "RTN","XBVDF",33,0) BKF ;;CLRBKF;;1;;1;;BLACK FOREGROUND "RTN","XBVDF",34,0) BKB ;;CLRBKB;;1;;1;;BLACK BACKGROUND "RTN","XBVDF",35,0) REF ;;CLRREF;;1;;1;;RED FOREGROUND "RTN","XBVDF",36,0) REB ;;CLRREB;;1;;1;;RED BACKGROUND "RTN","XBVDF",37,0) GRF ;;CLRGRF;;1;;1;;GREEN FOREGROUND "RTN","XBVDF",38,0) GRB ;;CLRGRB;;1;;1;;GREEN BACKGROUND "RTN","XBVDF",39,0) YEF ;;CLRYEF;;1;;1;;YELLOW FOREGROUND "RTN","XBVDF",40,0) YEB ;;CLRYEB;;1;;1;;YELLOW BACKGROUND "RTN","XBVDF",41,0) BLF ;;CLRBLF;;1;;1;;BLUE FOREGROUND "RTN","XBVDF",42,0) BLB ;;CLRBLB;;1;;1;;BLUE BACKGROUND "RTN","XBVDF",43,0) MGF ;;CLRMGF;;1;;1;;MAGENTA FOREGROUND "RTN","XBVDF",44,0) MGB ;;CLRMGB;;1;;1;;MAGENTA BACKGROUND "RTN","XBVDF",45,0) CYF ;;CLRCYF;;1;;1;;CYAN FOREGROUND "RTN","XBVDF",46,0) CYB ;;CLRCYB;;1;;1;;CYAN BACKGROUND "RTN","XBVDF",47,0) WHF ;;CLRWHF;;1;;1;;WHITE FOREGROUND "RTN","XBVDF",48,0) WHB ;;CLRWHB;;1;;1;;WHITE BACKGROUND "RTN","XBVDF",49,0) CLR ;;6;;1;;1;;RESET "RTN","XBVDF",50,0) HOM ;;5;;3;;3;;HOME CURSOR "RTN","XBVIDEO") 0^185^B7083827 "RTN","XBVIDEO",1,0) XBVIDEO ; IHS/ADC/GTH - SET VIDEO ATTRIBUTES ; [ 02/07/97 3:02 PM ] "RTN","XBVIDEO",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVIDEO",3,0) ; "RTN","XBVIDEO",4,0) ; Thanks to Don Jackson, DSD/OIRM, for the original routine. "RTN","XBVIDEO",5,0) ; "RTN","XBVIDEO",6,0) ; Set various video attributes. $X is saved and the cursor "RTN","XBVIDEO",7,0) ; is returned to it's original position thru X IOXY (except "RTN","XBVIDEO",8,0) ; certain attributes). "RTN","XBVIDEO",9,0) ; "RTN","XBVIDEO",10,0) ; In addition to the attributes supported by ENDR^%ZISS, "RTN","XBVIDEO",11,0) ; some color attributes are supported, and other mnemonics "RTN","XBVIDEO",12,0) ; to provide for backward compatibility. "RTN","XBVIDEO",13,0) ; "RTN","XBVIDEO",14,0) ; "RTN","XBVIDEO",15,0) Q "RTN","XBVIDEO",16,0) ; "RTN","XBVIDEO",17,0) EN(XB) ;PEP - Set video attribute in XB. E.g. D EN^XBVIDEO("IOBOFF"). "RTN","XBVIDEO",18,0) ; "RTN","XBVIDEO",19,0) Q:'$L($G(XB)) "RTN","XBVIDEO",20,0) Q:$D(ZTQUEUED) "RTN","XBVIDEO",21,0) ; "RTN","XBVIDEO",22,0) NEW DX,DY,XBXY "RTN","XBVIDEO",23,0) S DX=$X,DY=$Y,XBXY=0 "RTN","XBVIDEO",24,0) ; "RTN","XBVIDEO",25,0) I '$G(IOST(0)) D HOME^%ZIS "RTN","XBVIDEO",26,0) U IO(0) "RTN","XBVIDEO",27,0) ; "RTN","XBVIDEO",28,0) I $L($T(@XB)),$L($P($T(@XB),";;",6)) S XBXY=$P($T(@XB),";;",7),XB=$P($T(@XB),";;",6) "RTN","XBVIDEO",29,0) I $L($T(@XB^%ZISS)) S X=XB D ENDR^%ZISS W @XB X:XBXY IOXY U IO Q "RTN","XBVIDEO",30,0) ; "RTN","XBVIDEO",31,0) I '$L($T(@XB)) U IO Q "RTN","XBVIDEO",32,0) ; "RTN","XBVIDEO",33,0) S XB("LN")=$T(@XB),XB(1)=$P(XB("LN"),";;",2),XB(2)=$P(XB("LN"),";;",3),XB(3)=$P(XB("LN"),";;",4) "RTN","XBVIDEO",34,0) S XB=$P($G(^%ZIS(2,+IOST(0),XB(1))),"^",XB(2),XB(3)) "RTN","XBVIDEO",35,0) I XB="" S XB="*0" "RTN","XBVIDEO",36,0) W @XB "RTN","XBVIDEO",37,0) X:XBXY IOXY "RTN","XBVIDEO",38,0) U IO "RTN","XBVIDEO",39,0) Q "RTN","XBVIDEO",40,0) ; "RTN","XBVIDEO",41,0) ; Global locations for mnenomics and colors supported by %ZISS. "RTN","XBVIDEO",42,0) ; "RTN","XBVIDEO",43,0) ;;;;;;;;;;;; "RTN","XBVIDEO",44,0) ; "RTN","XBVIDEO",45,0) 10 ;;5;;1;;1;;TEN PITCH;;IOPTCH10;;1 "RTN","XBVIDEO",46,0) 12 ;;5;;2;;2;;TWELVE PITCH;;IOPTCH12;;1 "RTN","XBVIDEO",47,0) 16 ;;12.1;;1;;250;;SIXTEEN PITCH;;IOPTCH16;;1 "RTN","XBVIDEO",48,0) BLF ;;5;;9;;9;;BLINK OFF;;IOBOFF;;1 "RTN","XBVIDEO",49,0) BLN ;;5;;8;;8;;BLINK ON;;IOBON;;1 "RTN","XBVIDEO",50,0) CLR ;;6;;1;;1;;RESET;;IORESET;;1 "RTN","XBVIDEO",51,0) CUP ;;8;;1;;1;;CURSOR UP;;IOCUU;;0 "RTN","XBVIDEO",52,0) DTB ;;17;;2;;2;;DOUBLE HIGH BOTTOM HALF;;IODHLB;;0 "RTN","XBVIDEO",53,0) DTP ;;17;;1;;1;;DOUBLE HIGH TOP HALF;;IODHLT;;0 "RTN","XBVIDEO",54,0) HIF ;;7;;2;;2;;HI INTENSITY OFF;;IOINORM;;1 "RTN","XBVIDEO",55,0) HIN ;;7;;1;;1;;HI INTENSITY ON;;IOINHI;;1 "RTN","XBVIDEO",56,0) HOM ;;5;;3;;3;;HOME CURSOR;;IOHOME;;0 "RTN","XBVIDEO",57,0) IOF ;;1;;2;;2;;FORM FEED/CLEAR SCREEN;;;;0 "RTN","XBVIDEO",58,0) RVF ;;5;;5;;5;;REVERSE VIDEO OFF;;IORVOFF;;1 "RTN","XBVIDEO",59,0) RVN ;;5;;4;;4;;REVERSE VIDEO ON;;IORVON;;1 "RTN","XBVIDEO",60,0) ULF ;;6;;5;;5;;UNDERLINE OFF;;IOUOFF;;1 "RTN","XBVIDEO",61,0) ULN ;;6;;4;;4;;UNDERLINE ON;;IOUON;;1 "RTN","XBVIDEO",62,0) ; "RTN","XBVIDEO",63,0) ; Global locations for mnenomics and colors UN-supported by %ZISS. "RTN","XBVIDEO",64,0) ;;;;;;;;;;<>;; "RTN","XBVIDEO",65,0) CYB ;;C;;3;;3;;CYAN BACKGROUND;;;;1 "RTN","XBVIDEO",66,0) GRF ;;C;;1;;1;;GREEN FOREGROUND;;;;1 "RTN","XBVIDEO",67,0) REB ;;C;;5;;5;;RED BACKGROUND;;;;1 "RTN","XBVIDEO",68,0) WHF ;;C;;4;;4;;WHITE FOREGROUND;;;;1 "RTN","XBVIDEO",69,0) YEF ;;C;;2;;2;;YELLOW FOREGROUND;;;;1 "RTN","XBVIDEO",70,0) ; "RTN","XBVK") 0^186^B2582562 "RTN","XBVK",1,0) XBVK ; IHS/ADC/GTH - LOCAL VARIABLE KILLER FRONT END ; [ 10/29/2002 7:42 AM ] "RTN","XBVK",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVK",3,0) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent INDIR on NT systems. "RTN","XBVK",4,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 NT and Cache' mods. "RTN","XBVK",5,0) ; "RTN","XBVK",6,0) ; This is the front end for killing local variables in the "RTN","XBVK",7,0) ; namespaced parameter. Implementation specific routines "RTN","XBVK",8,0) ; are called from this routine. Those routines are in the "RTN","XBVK",9,0) ; ZIBVK* namespace. "RTN","XBVK",10,0) ; "RTN","XBVK",11,0) ; This routine is intended to be called by applications "RTN","XBVK",12,0) ; that are thru executing, in order to KILL any remaining "RTN","XBVK",13,0) ; namespaced local variables. E.g., D EN^XBVK("AG") will "RTN","XBVK",14,0) ; KILL any local variables that exist in the AG namespace. "RTN","XBVK",15,0) ; "RTN","XBVK",16,0) ; Notice that if called in background, and the OS is not "RTN","XBVK",17,0) ; supported, the routine will quit, unpleasantly. If your "RTN","XBVK",18,0) ; implementation is other than what is supported, below, "RTN","XBVK",19,0) ; and your vendor has implemented all Type A extensions to "RTN","XBVK",20,0) ; the 1990 ANSI M standard, you can safely remove the two "RTN","XBVK",21,0) ; lines that check for OS, and use the existing call to "RTN","XBVK",22,0) ; the MSM-specific routine. "RTN","XBVK",23,0) ; "RTN","XBVK",24,0) Q "RTN","XBVK",25,0) ; "RTN","XBVK",26,0) EN(XBVK) ;PEP - Kill vars in namespace of parameter variable. "RTN","XBVK",27,0) ; "RTN","XBVK",28,0) ; I '$L($T(@$P(^%ZOSF("OS"),"-",1))) W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"-",1),"' NOT SUPPORTED." Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent INDIR on NT systems. "RTN","XBVK",29,0) ; I $P(^%ZOSF("OS"),"^",1)'["MSM" W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"^",1),"' NOT SUPPORTED." Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent INDIR on NT systems. ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVK",30,0) I $P(^%ZOSF("OS"),"^",1)'["MSM",$P(^%ZOSF("OS"),"^",1)'["OpenM" W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"^",1),"' NOT SUPPORTED." Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent INDIR on NT systems. ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVK",31,0) ; G @$P(^%ZOSF("OS"),"-",1) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent INDIR on NT systems. "RTN","XBVK",32,0) I $P(^%ZOSF("OS"),"^",1)["OpenM" D EN^ZIBVKCA(XBVK) Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVK",33,0) ; "RTN","XBVK",34,0) MSM ; Micronetics Standard MUMPS. "RTN","XBVK",35,0) D EN^ZIBVKMSM(XBVK) "RTN","XBVK",36,0) Q "RTN","XBVK",37,0) ; "RTN","XBVL") 0^187^B1662546 "RTN","XBVL",1,0) XBVL ; IHS/ADC/GTH - LOCAL VARIABLE LISTER FRONT END ; [ 10/29/2002 7:42 AM ] "RTN","XBVL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVL",3,0) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","XBVL",4,0) ; XB*3*9 IHS/SET/GTH 06/05/2002 Cache' mods. "RTN","XBVL",5,0) ; "RTN","XBVL",6,0) ; This is the front end for listing local variables. "RTN","XBVL",7,0) ; Implementation specific routines are called from this "RTN","XBVL",8,0) ; routine. Those routines are in the ZIBVL* namespace. "RTN","XBVL",9,0) ; "RTN","XBVL",10,0) ; I '$L($T(@$P(^%ZOSF("OS"),"-",1))) W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"-",1),"' NOT SUPPORTED." Q ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","XBVL",11,0) ; G @$P(^%ZOSF("OS"),"-",1) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","XBVL",12,0) I ($$VERSION^%ZOSV(1)["Cache")!($$VERSION^%ZOSV(1)["MSM") G ^ZIBVL ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVL",13,0) ; I $P(^%ZOSF("OS"),"^",1)["MSM" G MSM ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","XBVL",14,0) W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"^",1),"' NOT SUPPORTED." ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","XBVL",15,0) Q ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","XBVL",16,0) ; "RTN","XBVL",17,0) MSM ; Micronetics Standard MUMPS. "RTN","XBVL",18,0) G ^ZIBVLMSM "RTN","XBVL",19,0) ; "RTN","XBVL",20,0) MESSAGE ;EP - Tell user of limitations. "RTN","XBVL",21,0) W !!?5,"DO routine ^XBVL from programmer mode." "RTN","XBVL",22,0) W !?5,"Not all local variables are available thru the XB menu.",!! "RTN","XBVL",23,0) Q "RTN","XBVL",24,0) ; "RTN","XBVLINE") 0^188^B11221599 "RTN","XBVLINE",1,0) XBVLINE ; IHS/ADC/GTH - SET LINE TWO OF SELECTED ROUTINES ; [ 10/29/2002 7:42 AM ] "RTN","XBVLINE",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBVLINE",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","XBVLINE",4,0) ; "RTN","XBVLINE",5,0) ; This routine asks user to select a set of routines, asks "RTN","XBVLINE",6,0) ; the user for the version number, package, and the date, "RTN","XBVLINE",7,0) ; and sets the second line of each routine. "RTN","XBVLINE",8,0) ; "RTN","XBVLINE",9,0) ; The form of the version line will be as follows: "RTN","XBVLINE",10,0) ; "RTN","XBVLINE",11,0) ;;n;package name;patch level;date E.G. "RTN","XBVLINE",12,0) ;;1.1;PCC DATA ENTRY;**1,2**;Sep 9, 1989 "RTN","XBVLINE",13,0) ; "RTN","XBVLINE",14,0) START ; "RTN","XBVLINE",15,0) NEW ASK,QUIT,RTN "RTN","XBVLINE",16,0) KILL ^UTILITY($J) "RTN","XBVLINE",17,0) D ^XBKVAR "RTN","XBVLINE",18,0) X ^%ZOSF("RSEL") "RTN","XBVLINE",19,0) I $D(^UTILITY($J,"XBVLINE")) W !,"Can't do ^XBVLINE. Deleting." KILL ^UTILITY($J,"XBVLINE") "RTN","XBVLINE",20,0) I $D(^UTILITY($J,"XB")) W !,"Can't do ^XB. Deleting." KILL ^UTILITY($J,"XB") "RTN","XBVLINE",21,0) I $O(^UTILITY($J,""))="" D EOJ Q "RTN","XBVLINE",22,0) S XBVLINE=" ;;"_$$DIR^XBDIR("F^1:5^K:'(X?1.3N!(X?1.3N.1""."".2N.1A.2N)) X","Enter version number","","","Must be n or n.n or n.nAn where the length of n is 1-3 and A is an alpha character") "RTN","XBVLINE",23,0) I $D(DIRUT) D EOJ Q "RTN","XBVLINE",24,0) S XBVLINE=XBVLINE_";"_$$DIR^XBDIR("FO^2:30","Enter package name") "RTN","XBVLINE",25,0) I $D(DIRUT) D EOJ Q "RTN","XBVLINE",26,0) S X=$$DIR^XBDIR("FO^0:20","Enter patch level") "RTN","XBVLINE",27,0) I $D(DUOUT)!$D(DTOUT) D EOJ Q "RTN","XBVLINE",28,0) S XBVLINE=XBVLINE_$S(X="":";",1:";**"_X_"**") "RTN","XBVLINE",29,0) ;begin Y2K fix block "RTN","XBVLINE",30,0) ;S Y=$$DIR^XBDIR("D","Enter date","TODAY") "RTN","XBVLINE",31,0) S Y=$$DIR^XBDIR("D^::E","Enter date","TODAY") "RTN","XBVLINE",32,0) ; end Y2K fix block "RTN","XBVLINE",33,0) I $D(DIRUT) D EOJ Q "RTN","XBVLINE",34,0) D DD^%DT "RTN","XBVLINE",35,0) S XBVLINE=XBVLINE_";"_Y "RTN","XBVLINE",36,0) S ASK=$$DIR^XBDIR("YO","Do you want to be asked ok for each routine","NO","","If you say 'YES' you will be asked if it is ok before each routine is modified.") "RTN","XBVLINE",37,0) I $D(DIRUT) D EOJ Q "RTN","XBVLINE",38,0) F %=1:1:6 S X=$P($T(@("LINE"_%)),";;",2),@("XBVLINE("_%_")=X") "RTN","XBVLINE",39,0) KILL %,X,Y "RTN","XBVLINE",40,0) X XBVLINE(1) "RTN","XBVLINE",41,0) Q "RTN","XBVLINE",42,0) ; "RTN","XBVLINE",43,0) EOJ ; "RTN","XBVLINE",44,0) KILL %,X,Y,XBVLINE,^UTILITY($J),DTOUT,DUOUT,DIRUT,DIROUT "RTN","XBVLINE",45,0) Q "RTN","XBVLINE",46,0) ;IHS/SET/GTH XB*3*9 10/29/2002 Mod'd LINE2 to seed RTN with 0 vs "". "RTN","XBVLINE",47,0) LINE1 ;;X XBVLINE(2),XBVLINE(5) "RTN","XBVLINE",48,0) LINE2 ;;S QUIT=0,RTN=0 F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" W !,RTN ZL @RTN X XBVLINE(6) ZR @Y ZI X S X=$T(+2),Z=$P(X," ")_XBVLINE X XBVLINE(3):'ASK,XBVLINE(4):ASK Q:QUIT I X ZI Z:+1 ZS "RTN","XBVLINE",49,0) LINE3 ;;S X=$P(X," ",2,99),X=X?1.2";".1"V"1.N.E ZR:X +2 S X=1 "RTN","XBVLINE",50,0) LINE4 ;;W !,X S DIR(0)="S^R:Replace;I:Insert;S:Skip",DIR("B")="R",DIR("?")="Replace the line; Insert before the line; Skip the routine" D ^DIR K DIR ZL @RTN ZR:Y="R" +2 S:$D(DIRUT) Y="S",QUIT=1 S X=Y'="S" "RTN","XBVLINE",51,0) LINE5 ;;K %,XBVLINE,DTOUT,DUOUT,DIRUT,DIROUT,X,Y,Z,^UTILITY($J) "RTN","XBVLINE",52,0) LINE6 ;;S X=$T(+1),X=$P(X,"["),Y=$L(X,";") S Y=$P(X,$S(X?1.8U1"(".E:"(",1:" "),1) "RTN","XBX12R") 0^189^B2474267 "RTN","XBX12R",1,0) XBX12R ;IHS/ASDST/DMJ - READ X12 FILE [ 08/10/2004 12:13 PM ] "RTN","XBX12R",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBX12R",3,0) START ;start "RTN","XBX12R",4,0) D LOAD "RTN","XBX12R",5,0) D ^%ZISC "RTN","XBX12R",6,0) D VIEW "RTN","XBX12R",7,0) F D V2 Q:$G(XB12QUIT) "RTN","XBX12R",8,0) K ^TMP($J,"XB12") "RTN","XBX12R",9,0) K XB12QUIT,XB12CTR,XB12REC "RTN","XBX12R",10,0) Q "RTN","XBX12R",11,0) LOAD ;load file into global "RTN","XBX12R",12,0) W !!,"Load File",! "RTN","XBX12R",13,0) S %ZIS("B")="HFS" "RTN","XBX12R",14,0) D ^%ZIS "RTN","XBX12R",15,0) Q:POP "RTN","XBX12R",16,0) K ^TMP($J,"XB12") "RTN","XBX12R",17,0) S XB12REC="" "RTN","XBX12R",18,0) S XB12CTR=0 "RTN","XBX12R",19,0) S XB12CTR2=0 "RTN","XBX12R",20,0) S XB12DLM="" "RTN","XBX12R",21,0) F D Q:$$STATUS^%ZISH "RTN","XBX12R",22,0) .U IO R X#1 "RTN","XBX12R",23,0) .Q:$$STATUS^%ZISH "RTN","XBX12R",24,0) .S XB12CTR2=XB12CTR2+1 "RTN","XBX12R",25,0) .I XB12CTR2=106 S XB12DLM=X "RTN","XBX12R",26,0) .I X=XB12DLM D FILE Q "RTN","XBX12R",27,0) .S XB12REC=XB12REC_X "RTN","XBX12R",28,0) Q "RTN","XBX12R",29,0) FILE ;file "RTN","XBX12R",30,0) S XB12CTR=XB12CTR+1 "RTN","XBX12R",31,0) S ^TMP($J,"XB12",XB12CTR)=XB12REC "RTN","XBX12R",32,0) S XB12REC="" "RTN","XBX12R",33,0) Q "RTN","XBX12R",34,0) VIEW ;view "RTN","XBX12R",35,0) S DA=0 "RTN","XBX12R",36,0) F S DA=$O(^TMP($J,"XB12",DA)) Q:'DA D "RTN","XBX12R",37,0) .S XB12CTR=DA "RTN","XBX12R",38,0) W !,XB12CTR," segments loaded.",! "RTN","XBX12R",39,0) Q "RTN","XBX12R",40,0) V2 ;view continued "RTN","XBX12R",41,0) W ! "RTN","XBX12R",42,0) S DIR(0)="LOC^1:"_XB12CTR "RTN","XBX12R",43,0) S DIR("A")="View lines" "RTN","XBX12R",44,0) D ^DIR K DIR "RTN","XBX12R",45,0) I Y["^" S XB12QUIT=1 Q "RTN","XBX12R",46,0) I Y="" S Y="1-"_XB12CTR "RTN","XBX12R",47,0) S XB12FR=+$P(Y,"-",1) "RTN","XBX12R",48,0) S XB12TO=+$P(Y,"-",2) "RTN","XBX12R",49,0) S:'XB12TO XB12TO=XB12FR "RTN","XBX12R",50,0) W @IOF "RTN","XBX12R",51,0) F I=XB12FR:1:XB12TO D Q:$G(XB12QUIT) "RTN","XBX12R",52,0) .I $Y+4>IOSL D "RTN","XBX12R",53,0) ..S DIR(0)="E" D ^DIR K DIR "RTN","XBX12R",54,0) ..I X["^" S XB12QUIT=1 "RTN","XBX12R",55,0) ..W @IOF "RTN","XBX12R",56,0) .Q:$G(XB12QUIT) "RTN","XBX12R",57,0) .W ! "RTN","XBX12R",58,0) .W "(",I,") " "RTN","XBX12R",59,0) .W ^TMP($J,"XB12",I) "RTN","XBX12R",60,0) Q "RTN","XBXTSS") 0^190^B1066241 "RTN","XBXTSS",1,0) XBXTSS ;OHPRD-TUCSON/BRJ;EXTRACT AND TABLE SUBSCRIPTS "RTN","XBXTSS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","XBXTSS",3,0) ; X=SUBSCRIPT LIST ENCLOSED IN PARENTHESES PASSED BY CALLER "RTN","XBXTSS",4,0) ; Y IS RETURNED AS: "RTN","XBXTSS",5,0) ; Y=0 X VALUE NOT A PROPER SUBSCRIPT FORMAT "RTN","XBXTSS",6,0) ; OR (SOME KIND OF ERROR ENCOUNTERED) "RTN","XBXTSS",7,0) ; Y=n n=NUMBER OF SUBSCRIPTS IN X "RTN","XBXTSS",8,0) ; Y(n)=value ARRAY OF SUBSCRIPTS "RTN","XBXTSS",9,0) ; n=SUBSCRIPT POSITION "RTN","XBXTSS",10,0) ; value=SUBSCRIPT VALUE "RTN","XBXTSS",11,0) EN ; ENTRY "RTN","XBXTSS",12,0) S $ZT="ZT" ; SET ERROR TRAP IN CASE OF BAD VALUE IN X "RTN","XBXTSS",13,0) K ^XBXTSS,Y ; REMOVE POSSIBLE GARBAGE "RTN","XBXTSS",14,0) S @("^XBXTSS"_X)="" ; SET DUMMY GLOBAL NODE "RTN","XBXTSS",15,0) ; USE NAKED REFERENCE TO HOP DOWN SUBSCRIPTS AND STACK THEM IN Y "RTN","XBXTSS",16,0) S XBSS=$O(^XBXTSS("")) ; GET FIRST SUBSCRIPT - SET NAKED FOR NEXT LINE "RTN","XBXTSS",17,0) F Y=1:1 S Y(Y)=XBSS,XBSS=$O(^(XBSS,"")) Q:XBSS="" ;STACK SUBSCRIPTS IN Y(Y) "RTN","XBXTSS",18,0) K XBSS,^XBXTSS ; CLEANUP "RTN","XBXTSS",19,0) Q ; RETURN TO CALLER "RTN","XBXTSS",20,0) ZT ; TRAP ERRORS RETURN Y=0 "RTN","XBXTSS",21,0) S $ZE="",$ZT="" "RTN","XBXTSS",22,0) K Y "RTN","XBXTSS",23,0) S Y=0 ; RETURN ERROR TO CALLER "RTN","XBXTSS",24,0) Q "RTN","ZIBCKPKG") 0^191^B33866093 "RTN","ZIBCKPKG",1,0) ZIBCKPKG ; IHS/ADC/GTH - CHECK UCI FOR PACKAGE CONTENT ; [ 10/29/2002 7:42 AM ] "RTN","ZIBCKPKG",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBCKPKG",3,0) ; "RTN","ZIBCKPKG",4,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Change MSM systax to use $ROUTINE. "RTN","ZIBCKPKG",5,0) D INIT "RTN","ZIBCKPKG",6,0) S XBQUEST=1 D ASKIT G:XBQ=U EXIT S XBINPR=XBQ "RTN","ZIBCKPKG",7,0) S XBQUEST=2 D ASKIT G:XBQ=U EXIT S XBLC=XBQ "RTN","ZIBCKPKG",8,0) S XBQUEST=3 D ASKIT G:XBQ=U EXIT S XBLNPR=XBQ "RTN","ZIBCKPKG",9,0) ; "RTN","ZIBCKPKG",10,0) ZIS ; SELECT DEVICE "RTN","ZIBCKPKG",11,0) KILL ZTSK,IOP,%ZIS "RTN","ZIBCKPKG",12,0) S %ZIS="PQM" "RTN","ZIBCKPKG",13,0) D ^%ZIS "RTN","ZIBCKPKG",14,0) G:POP EXIT "RTN","ZIBCKPKG",15,0) G:$D(IO("Q")) QUE "RTN","ZIBCKPKG",16,0) NOQUE ; "RTN","ZIBCKPKG",17,0) U IO "RTN","ZIBCKPKG",18,0) D EN "RTN","ZIBCKPKG",19,0) D ^%ZISC "RTN","ZIBCKPKG",20,0) G EXIT "RTN","ZIBCKPKG",21,0) ; "RTN","ZIBCKPKG",22,0) QUE ; "RTN","ZIBCKPKG",23,0) KILL ZTSAVE "RTN","ZIBCKPKG",24,0) F %="XBINPR","XBLNPR","XBLC" S ZTSAVE(%)="" "RTN","ZIBCKPKG",25,0) S ZTRTN="EN^ZIBCKPKG",ZTDESC="SCAN UCI FOR PACKAGES",ZTIO=IO,ZTDTH=0 "RTN","ZIBCKPKG",26,0) D ^%ZTLOAD "RTN","ZIBCKPKG",27,0) KILL ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK "RTN","ZIBCKPKG",28,0) EXIT ; "RTN","ZIBCKPKG",29,0) D KILLS "RTN","ZIBCKPKG",30,0) Q "RTN","ZIBCKPKG",31,0) ; "RTN","ZIBCKPKG",32,0) EN1 ; ENTRY FOR SILENT OPERATION "RTN","ZIBCKPKG",33,0) D INIT "RTN","ZIBCKPKG",34,0) S (XBINPR,XBLC)=1 "RTN","ZIBCKPKG",35,0) G EN "RTN","ZIBCKPKG",36,0) ; "RTN","ZIBCKPKG",37,0) INIT ; INITIALIZATION "RTN","ZIBCKPKG",38,0) S U="^" "RTN","ZIBCKPKG",39,0) S:'$D(DTIME) DTIME=300 "RTN","ZIBCKPKG",40,0) Q "RTN","ZIBCKPKG",41,0) ; "RTN","ZIBCKPKG",42,0) EN ; COMMON INTERNAL ENTRY "RTN","ZIBCKPKG",43,0) S XBQUIT=0 "RTN","ZIBCKPKG",44,0) KILL ^UTILITY($J,"ZIBCKPKG") "RTN","ZIBCKPKG",45,0) D SCAN "RTN","ZIBCKPKG",46,0) Q:XBQUIT "RTN","ZIBCKPKG",47,0) D:XBLNPR SHOWNPR "RTN","ZIBCKPKG",48,0) D:XBLC SHOWLC "RTN","ZIBCKPKG",49,0) I $D(IOST),$D(IOF),$E(IOST,1,2)="P-" W @IOF "RTN","ZIBCKPKG",50,0) SET:$D(ZTQUEUED) ZTREQ="@" "RTN","ZIBCKPKG",51,0) KILLS ; "RTN","ZIBCKPKG",52,0) KILL XBINPR,XBRNPR,XBLNPR,XBLC,XBQUIT,XBR,XBR2,XBPF,XBI,XBJ,XBP,XBQ,XBCNT,XBQUEST "RTN","ZIBCKPKG",53,0) KILL ^UTILITY($J,"ZIBCKPKG"),ZTSK "RTN","ZIBCKPKG",54,0) Q "RTN","ZIBCKPKG",55,0) ; "RTN","ZIBCKPKG",56,0) SCAN ; "RTN","ZIBCKPKG",57,0) X ^%ZOSF("UCI") "RTN","ZIBCKPKG",58,0) W "- - - PACKAGE SCAN OF UCI ",Y,$S($D(^DD("SITE")):" ON "_^("SITE"),1:"")," - - -",!! "RTN","ZIBCKPKG",59,0) ; S XBR=$O(^ ("%zzzzzzz")) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",60,0) S XBR=$O(^$R("%zzzzzzz")) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",61,0) F Q:XBR="" Q:XBR?1L.E D CHKPKG Q:XBQUIT "RTN","ZIBCKPKG",62,0) Q:XBQUIT "RTN","ZIBCKPKG",63,0) F Q:XBR="" D GETNXT "RTN","ZIBCKPKG",64,0) Q "RTN","ZIBCKPKG",65,0) ; "RTN","ZIBCKPKG",66,0) CHKPKG ; CHECK FOR PACKAGE "RTN","ZIBCKPKG",67,0) S XBPF=$E(XBR,1,4) "RTN","ZIBCKPKG",68,0) F XBI=$L(XBPF):-1:0 S XBPF=$E(XBPF,1,XBI) Q:XBPF="" S XBP=$O(^DIC(9.4,"C",XBPF,0)) Q:XBP "RTN","ZIBCKPKG",69,0) I XBPF="" D NOTPKG Q "RTN","ZIBCKPKG",70,0) W XBPF,?4," - ",$P(^DIC(9.4,XBP,0),U,1) "RTN","ZIBCKPKG",71,0) S XBRNPR=0 "RTN","ZIBCKPKG",72,0) D SKIP "RTN","ZIBCKPKG",73,0) W " (",XBCNT,")",! "RTN","ZIBCKPKG",74,0) Q "RTN","ZIBCKPKG",75,0) ; "RTN","ZIBCKPKG",76,0) NOTPKG ; "RTN","ZIBCKPKG",77,0) I XBINPR S ^UTILITY($J,"ZIBCKPKG",2,XBR)="" S XBPF="" D GETNXT Q "RTN","ZIBCKPKG",78,0) F W XBR R " -- Package prefix? ",XBPF:DTIME S:'$T XBPF=U Q:XBPF[U D GETPKG Q:XBPF'="-" "RTN","ZIBCKPKG",79,0) I XBPF[U S XBQUIT=1 Q "RTN","ZIBCKPKG",80,0) W ! "RTN","ZIBCKPKG",81,0) I XBPF="" D GETNXT Q "RTN","ZIBCKPKG",82,0) S XBI=$L(XBPF),XBRNPR=1 "RTN","ZIBCKPKG",83,0) D SKIP "RTN","ZIBCKPKG",84,0) W " ",XBCNT," ROUTINES SKIPPED.",! "RTN","ZIBCKPKG",85,0) Q "RTN","ZIBCKPKG",86,0) ; "RTN","ZIBCKPKG",87,0) GETPKG ; "RTN","ZIBCKPKG",88,0) I XBPF?1."?" S XBQUEST=4 D DSPHLP W ! S XBPF="-" Q "RTN","ZIBCKPKG",89,0) I XBPF?1."?"1.E D DSPLY S XBPF="-" Q "RTN","ZIBCKPKG",90,0) Q:XBPF'?.E1CL.E&($L(XBPF)<5) "RTN","ZIBCKPKG",91,0) W " -- Package id must be upper case, length 1-4",! "RTN","ZIBCKPKG",92,0) S XBPF="-" "RTN","ZIBCKPKG",93,0) Q "RTN","ZIBCKPKG",94,0) ; "RTN","ZIBCKPKG",95,0) SKIP ; "RTN","ZIBCKPKG",96,0) F XBCNT=1:1 S:XBRNPR ^UTILITY($J,"ZIBCKPKG",2,XBR)="" D GETNXT Q:$E(XBR,1,XBI)'=XBPF "RTN","ZIBCKPKG",97,0) Q "RTN","ZIBCKPKG",98,0) ; "RTN","ZIBCKPKG",99,0) GETNXT ; "RTN","ZIBCKPKG",100,0) S:XBR?.E1L.E ^UTILITY($J,"ZIBCKPKG",1,XBR)="" "RTN","ZIBCKPKG",101,0) ; S XBR=$O(^ (XBR)) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",102,0) S XBR=$O(^$R(XBR)) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",103,0) Q "RTN","ZIBCKPKG",104,0) ; "RTN","ZIBCKPKG",105,0) DSPLY ; "RTN","ZIBCKPKG",106,0) S (XBPF,XBR2)=$E(XBPF,2,$L(XBPF)) "RTN","ZIBCKPKG",107,0) W ! "RTN","ZIBCKPKG",108,0) S XBJ=0 "RTN","ZIBCKPKG",109,0) S X=XBR2 "RTN","ZIBCKPKG",110,0) X ^%ZOSF("TEST") "RTN","ZIBCKPKG",111,0) I S XBJ=1 W !,XBR2 "RTN","ZIBCKPKG",112,0) ; F XBJ=XBJ:1 S XBR2=$O(^ (XBR2)) Q:$E(XBR2,1,$L(XBPF))'=XBPF W:XBJ#8=0 ! W ?XBJ#8*10,XBR2 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",113,0) F XBJ=XBJ:1 S XBR2=$O(^$R(XBR2)) Q:$E(XBR2,1,$L(XBPF))'=XBPF W:XBJ#8=0 ! W ?XBJ#8*10,XBR2 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBCKPKG",114,0) W:$X ! "RTN","ZIBCKPKG",115,0) W ! "RTN","ZIBCKPKG",116,0) Q "RTN","ZIBCKPKG",117,0) ; "RTN","ZIBCKPKG",118,0) SHOWNPR ; "RTN","ZIBCKPKG",119,0) Q:'$D(^UTILITY($J,"ZIBCKPKG",2)) "RTN","ZIBCKPKG",120,0) W !!,"Non-package routines:",! "RTN","ZIBCKPKG",121,0) S XBR2="" "RTN","ZIBCKPKG",122,0) F XBJ=0:1 S XBR2=$O(^UTILITY($J,"ZIBCKPKG",2,XBR2)) Q:XBR2="" W:XBJ#8=0 ! W ?XBJ#8*10,XBR2 "RTN","ZIBCKPKG",123,0) W ! "RTN","ZIBCKPKG",124,0) Q "RTN","ZIBCKPKG",125,0) ; "RTN","ZIBCKPKG",126,0) SHOWLC ; "RTN","ZIBCKPKG",127,0) Q:'$D(^UTILITY($J,"ZIBCKPKG",1)) "RTN","ZIBCKPKG",128,0) W !!,"Routine names containing lower case letters:",! "RTN","ZIBCKPKG",129,0) S XBR2="" "RTN","ZIBCKPKG",130,0) F XBJ=0:1 S XBR2=$O(^UTILITY($J,"ZIBCKPKG",1,XBR2)) Q:XBR2="" W:XBJ#8=0 ! W ?XBJ#8*10,XBR2 "RTN","ZIBCKPKG",131,0) W ! "RTN","ZIBCKPKG",132,0) Q "RTN","ZIBCKPKG",133,0) ; "RTN","ZIBCKPKG",134,0) ASKIT ; ASK A YES/NO QUESTION "RTN","ZIBCKPKG",135,0) KILL XBQ "RTN","ZIBCKPKG",136,0) S %=$T(@XBQUEST),XBQ("Q")=$P(%,";;",2),XBQ("D")=$P(%,";;",3) "RTN","ZIBCKPKG",137,0) ASKIT2 ; "RTN","ZIBCKPKG",138,0) W !,XBQ("Q")," ",XBQ("D"),"// " "RTN","ZIBCKPKG",139,0) R XBQ:DTIME "RTN","ZIBCKPKG",140,0) S:'$T XBQ=U "RTN","ZIBCKPKG",141,0) I XBQ="" S XBQ=XBQ("D") W XBQ "RTN","ZIBCKPKG",142,0) S XBQ("R")=XBQ,XBQ="" "RTN","ZIBCKPKG",143,0) I XBQ("R")[U S XBQ=U "RTN","ZIBCKPKG",144,0) I $P("YES",XBQ("R"))="" S XBQ=1 "RTN","ZIBCKPKG",145,0) I $P("yes",XBQ("R"))="" S XBQ=1 "RTN","ZIBCKPKG",146,0) I $P("NO",XBQ("R"))="" S XBQ=0 "RTN","ZIBCKPKG",147,0) I $P("no",XBQ("R"))="" S XBQ=0 "RTN","ZIBCKPKG",148,0) I XBQ]"" W ! Q "RTN","ZIBCKPKG",149,0) W !,"-- Please answer YES or NO" "RTN","ZIBCKPKG",150,0) D DSPHLP "RTN","ZIBCKPKG",151,0) G ASKIT "RTN","ZIBCKPKG",152,0) ; "RTN","ZIBCKPKG",153,0) DSPHLP ; "RTN","ZIBCKPKG",154,0) F XBI=1:1 S %=$T(@XBQUEST+XBI) Q:%="" Q:$P(%," ")]"" W !,"-- ",$P(%,";;",2) "RTN","ZIBCKPKG",155,0) W ! "RTN","ZIBCKPKG",156,0) KILL % "RTN","ZIBCKPKG",157,0) Q "RTN","ZIBCKPKG",158,0) ; "RTN","ZIBCKPKG",159,0) QUEST ; "RTN","ZIBCKPKG",160,0) ; "RTN","ZIBCKPKG",161,0) 1 ;;Ignore non-package routines?;;YES "RTN","ZIBCKPKG",162,0) ;;Responding NO will cause you to be asked if a routine for which "RTN","ZIBCKPKG",163,0) ;;a namespace cannot be identified in the package file can be "RTN","ZIBCKPKG",164,0) ;;considered part of a "psuedo-package" with which a namespace can "RTN","ZIBCKPKG",165,0) ;;be associated. "RTN","ZIBCKPKG",166,0) 2 ;;Display routine names containing lower case letters?;;YES "RTN","ZIBCKPKG",167,0) ;;Responding YES will cause a tabular listing to be produced "RTN","ZIBCKPKG",168,0) ;;displaying all routine names which contain a lower case letter. "RTN","ZIBCKPKG",169,0) 3 ;;Display names of non-package routines?;;YES "RTN","ZIBCKPKG",170,0) ;;Responding YES will cause a tabular listing to be produced "RTN","ZIBCKPKG",171,0) ;;displaying the names of all routines which were not found "RTN","ZIBCKPKG",172,0) ;;to be part of a package. "RTN","ZIBCKPKG",173,0) 4 ;; "RTN","ZIBCKPKG",174,0) ;;If you enter a namespace, routines will be processed as though a "RTN","ZIBCKPKG",175,0) ;;formal package association was made. "RTN","ZIBCLU") 0^192^B1192724 "RTN","ZIBCLU",1,0) ZIBCLU ; IHS/ADC/GTH - GENERAL PURPOSE CLEAN UP UTILITY GLOBALS - DRIVER TO GET UCI ; [ 02/07/97 3:02 PM ] "RTN","ZIBCLU",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBCLU",3,0) ; "RTN","ZIBCLU",4,0) ;THIS ROUTINE WILL INITIATE A JOB RUNNING ^%ZIBCLU0 IN EACH UCI "RTN","ZIBCLU",5,0) ;AND THEN WAIT 5 SECONDS TO ELAPSE BEFORE GETTING THE NEXT UCI "RTN","ZIBCLU",6,0) ;SKIP THE UCI THIS TASK IS IN AND THEN RUN ^%ZIBCLU0 HERE "RTN","ZIBCLU",7,0) ; - %ZIBCLU0 WILL REMOVE ALL DANGLING ^UTILITY,^XUTL,^ZUT ENTRIES "RTN","ZIBCLU",8,0) ;THIS ROUTINE IS USUALLY STARTED VIA TASKMAN BY SCHEDULING "RTN","ZIBCLU",9,0) ;THE -ZIBCLU- OPTION WHICH RUNS THIS ROUTINE "RTN","ZIBCLU",10,0) ; "RTN","ZIBCLU",11,0) ;DSM ONLY - $ZU(ZIBI) RETURNS ERROR AT END OF UCI LIST "RTN","ZIBCLU",12,0) ;MSM ONLY - $ZU(ZIBI) RETURNS -NULL- VALUE AT END OF UCI LIST "RTN","ZIBCLU",13,0) ; "RTN","ZIBCLU",14,0) W !,*7,"Entry not permitted here!" "RTN","ZIBCLU",15,0) Q "RTN","ZIBCLU",16,0) ; "RTN","ZIBCLU",17,0) EN ; "RTN","ZIBCLU",18,0) S X="%ZIBCLU0" "RTN","ZIBCLU",19,0) D RCHK^XB "RTN","ZIBCLU",20,0) I $G(XBFAIL) W:'$D(ZTQUEUED) !,"Cannot proceed because ^%ZIBCLU0 is not in MGR" Q "RTN","ZIBCLU",21,0) S $ZT="ZT^ZIBCLU" "RTN","ZIBCLU",22,0) F ZIBI=1:1 S ZIBUCI=$ZU(ZIBI) Q:ZIBUCI="" I ZIBUCI'=$ZU(0) J ^%ZIBCLU0[ZIBUCI] H 5 "RTN","ZIBCLU",23,0) D ^%ZIBCLU0 ; CLEAN UP THIS UCI "RTN","ZIBCLU",24,0) ZT ;END OF UCI LIST "RTN","ZIBCLU",25,0) I $ZV?1"DSM".E&($ZE'?1"".E) D ^%ET "RTN","ZIBCLU",26,0) S $ZT="" "RTN","ZIBCLU",27,0) KILL XBFAIL,ZIBI,ZIBUCI "RTN","ZIBCLU",28,0) Q "RTN","ZIBCLU",29,0) ; "RTN","ZIBCLU0") 0^193^B9097382 "RTN","ZIBCLU0",1,0) %ZIBCLU0 ; IHS/ADC/GTH - GENERAL PURPOSE CLEAN UP UTILITY GLOBALS ; [ 02/07/97 3:02 PM ] "RTN","ZIBCLU0",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBCLU0",3,0) EN ; "RTN","ZIBCLU0",4,0) Q:'($ZV?1"MSM".E!($ZV?1"DSM".E)) ; Only works for MSM or DSM. "RTN","ZIBCLU0",5,0) S ZIBOS=$ZV ; Set operating system. "RTN","ZIBCLU0",6,0) D @$S(ZIBOS?1"DSM".E:"DSM",1:"MSM") ; Active JOB lookup per operating system. "RTN","ZIBCLU0",7,0) D XUT ; Cleanup the ^XUTL global. "RTN","ZIBCLU0",8,0) F ZIBGR="^ZUT(","^UTILITY(" D GO ; Check the ^ZUT and ^UTILITY globals for nodes to be removed. "RTN","ZIBCLU0",9,0) D OUT ; KILL off variables and exit gracefully. "RTN","ZIBCLU0",10,0) Q "RTN","ZIBCLU0",11,0) ; "RTN","ZIBCLU0",12,0) MSM ; MSM specific look up of active JOBs. "RTN","ZIBCLU0",13,0) S $ZT="MER^%ZIBCLU0" "RTN","ZIBCLU0",14,0) V 44:$J:$ZB($V(44,$J,2),1,7):2 "RTN","ZIBCLU0",15,0) S ZIBST=$V(44),ZIBSTA=$V(ZIBST+8,-3,2)+ZIBST,ZIBMXJ=$V($V(ZIBST+284),-3,4),ZIBPT=$V(3*4+ZIBSTA) "RTN","ZIBCLU0",16,0) ; Build active JOB table (ZIBJT). "RTN","ZIBCLU0",17,0) F ZIBJ=1:1:ZIBMXJ S:$V(ZIBJ*4+ZIBPT) ZIBJT(ZIBJ)=$ZU(($V(2,ZIBJ,2)#32),($V(2,ZIBJ,2)\32)) "RTN","ZIBCLU0",18,0) Q "RTN","ZIBCLU0",19,0) ; "RTN","ZIBCLU0",20,0) MER ;EP - MSM error trap. "RTN","ZIBCLU0",21,0) V 44:$J:$ZB($V(44,$J,2),#FFFE,1):2 "RTN","ZIBCLU0",22,0) ZQ "RTN","ZIBCLU0",23,0) ; "RTN","ZIBCLU0",24,0) DSM ; DSM specific look up of active JOBs. "RTN","ZIBCLU0",25,0) S ZIBST=$V(44),ZIBSJT=$V(ZIBST+4) "RTN","ZIBCLU0",26,0) ; Build active JOB table (ZIBJT). "RTN","ZIBCLU0",27,0) F ZIBI=ZIBSJT+2:2:ZIBSJT+126 I $V(ZIBI+1),$V(ZIBI+1)'=244 S ZIBJ=ZIBI-ZIBSJT\2 S:ZIBJ]"" ZIBJT(ZIBJ)=$ZU(($V(149,ZIBJ)#32),($V(149,ZIBJ)\32)) "RTN","ZIBCLU0",28,0) S ZIBJT($J)=$ZU(0) ; Put this JOB and UCI in the JOB table. "RTN","ZIBCLU0",29,0) KILL ZIBSJT "RTN","ZIBCLU0",30,0) Q "RTN","ZIBCLU0",31,0) ; "RTN","ZIBCLU0",32,0) XUT ; Clenaup ^XUTL in MGR separate from other UCIs. "RTN","ZIBCLU0",33,0) I $ZU(0)?1"MGR".E D "RTN","ZIBCLU0",34,0) . S ZIBJ="" "RTN","ZIBCLU0",35,0) . F S ZIBJ=$O(^XUTL("XQ",ZIBJ)) Q:ZIBJ="" KILL:'$D(ZIBJT(ZIBJ)) ^(ZIBJ) "RTN","ZIBCLU0",36,0) E D "RTN","ZIBCLU0",37,0) .S ZIBJ="" "RTN","ZIBCLU0",38,0) .S ZIBK=1 ; Set KILL flag ON - Set OFF if other JOBs active in this UCI "RTN","ZIBCLU0",39,0) .F S ZIBJ=$O(ZIBJT(ZIBJ)) Q:ZIBJ="" S:ZIBJ'=$J&(ZIBJT(ZIBJ)=$ZU(0)) ZIBK=0 "RTN","ZIBCLU0",40,0) .I ZIBK S ZIBX="" F S ZIBX=$O(^XUTL(ZIBX)) Q:ZIBX="" KILL ^(ZIBX) "RTN","ZIBCLU0",41,0) Q "RTN","ZIBCLU0",42,0) ; "RTN","ZIBCLU0",43,0) GO ; $O down ^ZUT or ^UTILITY looking for (jobnbr OR (namespace,jobnbr "RTN","ZIBCLU0",44,0) S ZIBX1="" "RTN","ZIBCLU0",45,0) F S (ZIBA,ZIBJ,ZIBX1)=$O(@(ZIBGR_""""_ZIBX1_""")")) Q:ZIBX1="" D @$S(ZIBX1?1N.N:"N1",1:"N2") "RTN","ZIBCLU0",46,0) GOQ ; "RTN","ZIBCLU0",47,0) Q "RTN","ZIBCLU0",48,0) ; "RTN","ZIBCLU0",49,0) N1 ; Check first subscript value and remove if its a dangling node. "RTN","ZIBCLU0",50,0) I ZIBOS?1"MSM".E,ZIBX1="%ER" D N2 G N1Q "RTN","ZIBCLU0",51,0) D RM "RTN","ZIBCLU0",52,0) N1Q ; "RTN","ZIBCLU0",53,0) Q "RTN","ZIBCLU0",54,0) ; "RTN","ZIBCLU0",55,0) N2 ; Process second node if first is non-numeric or ^UTILITY("%ER" for MSM "RTN","ZIBCLU0",56,0) S ZIBX2="",ZIBA1=""""_ZIBA_"""" "RTN","ZIBCLU0",57,0) F ZIBI=1:1 S ZIBRM=1,ZIBX2=$O(@(ZIBGR_""""_ZIBX1_""","""_ZIBX2_""")")) D D:ZIBRM RM Q:ZIBX2="" "RTN","ZIBCLU0",58,0) .I ZIBOS?1"MSM".E,ZIBX1="%ER",($P($H,",")-ZIBX2)<7 S ZIBRM=0 Q "RTN","ZIBCLU0",59,0) .I ZIBX2]"" S ZIBA=ZIBA1_","""_ZIBX2_"""",ZIBJ=ZIBX2 "RTN","ZIBCLU0",60,0) KILL ZIBRM "RTN","ZIBCLU0",61,0) Q "RTN","ZIBCLU0",62,0) ; "RTN","ZIBCLU0",63,0) RM ; Remove dangling ^UTILITY node. "RTN","ZIBCLU0",64,0) ; If not in active JOB table '$D(ZIBJT(ZIBJ)) "RTN","ZIBCLU0",65,0) ; Or if an active JOB and not this UCI $D(ZIBJT(ZIBJ) & ZIBJT(ZIBJ)'=$Z(0) "RTN","ZIBCLU0",66,0) ; Or if an active JOB and this UCI, but the same $J as this JOB. "RTN","ZIBCLU0",67,0) I $D(ZIBJT(ZIBJ)),ZIBJT(ZIBJ)=$ZU(0),$J'=ZIBJ G RMQ "RTN","ZIBCLU0",68,0) KILL @(ZIBGR_ZIBA_")") ; Remove dangling ^ZUT or ^UTILITY node. "RTN","ZIBCLU0",69,0) RMQ ; "RTN","ZIBCLU0",70,0) Q "RTN","ZIBCLU0",71,0) ; "RTN","ZIBCLU0",72,0) OUT ; "RTN","ZIBCLU0",73,0) KILL ZIBOS,ZIBA,ZIBA1,ZIBX1,ZIBX2,ZIBST,ZIBJT,ZIBJM,ZIBJI,ZIBJ,ZIBQ,ZIBGR,ZIBSTA,ZIBMXJ,ZIBPT,ZIBK "RTN","ZIBCLU0",74,0) I $ZV?1"MSM".E V 44:$J:$ZB($V(44,$J,2),#FFFE,1):2 "RTN","ZIBCLU0",75,0) Q "RTN","ZIBCLU0",76,0) ; "RTN","ZIBDR") 0^194^B3415538 "RTN","ZIBDR",1,0) ZIBDR ; IHS/ADC/GTH - SAVES DIR STRING TO EDITORS ; [ 10/29/2002 7:42 AM ] "RTN","ZIBDR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBDR",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBDR",4,0) ; "RTN","ZIBDR",5,0) ; The string is stored in the "Temp" storage area for the "RTN","ZIBDR",6,0) ; screen and line editors for the current device. "RTN","ZIBDR",7,0) ; "RTN","ZIBDR",8,0) SAVE(ZIBDIR) ;EP - Save string in editor global locations. "RTN","ZIBDR",9,0) ; I ^%ZOSF("OS")'["MSM" D OSNO^XB Q ; Only supports Micronetics. ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",10,0) I ^%ZOSF("OS")'["MSM",'(^%ZOSF("OS")["OpenM") D OSNO^XB Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",11,0) I $$VERSION^%ZOSV(1)["MSM" D Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",12,0) . W !!!,"Saving the following line of code in",!,"^%ZUT($I,""Temp"") for the ^%E editor,",!,"and ^ZUT($I,""Temp"") for the ^% editor:",!,ZIBDIR ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",13,0) . KILL ^%ZUT($I,"Temp") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",14,0) . S ^%ZUT($I,"Temp",1)=ZIBDIR,^%ZUT($I,"Temp",0)="Temporary storage" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",15,0) .Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",16,0) ;W !!!,"Saving the following line of code in",!,"^%ZUT($I,""Temp"") for the ^%E editor,",!,"and ^ZUT($I,""Temp"") for the ^% editor:",!,ZIBDIR ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",17,0) W !!!,"Saving the following line of code in",!,"^ZUT($I,""Temp"") for the ^% editor:",!,ZIBDIR ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",18,0) ; KILL ^%ZUT($I,"Temp") S ^%ZUT($I,"Temp",1)=ZIBDIR,^%ZUT($I,"Temp",0)="Temporary storage" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBDR",19,0) KILL ^ZUT($I,"Temp") S ^ZUT($I,"Temp",1)=ZIBDIR,^ZUT($I,"Temp",0)="Temporary storage" "RTN","ZIBDR",20,0) Q "RTN","ZIBDR",21,0) ; "RTN","ZIBER") 0^195^B17895023 "RTN","ZIBER",1,0) ZIBER ;BFH;MSM ERROR REPORT; [ 07/17/91 12:19 PM ] "RTN","ZIBER",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBER",3,0) ;COPYRIGHT MICRONETICS DESIGN CORP @1982 "RTN","ZIBER",4,0) S $ZT="ERROR^ZIBER",%DEV=$I "RTN","ZIBER",5,0) W !?10,$P($P($ZV,","),"-")," - Error Report Utility" "RTN","ZIBER",6,0) I '$D(^UTILITY("%ER")) W !!,"NO ERRORS HAVE BEEN LOGGED" G EXIT "RTN","ZIBER",7,0) D ^%GUCI K %,%UCN "RTN","ZIBER",8,0) G PACKAGE "RTN","ZIBER",9,0) OPT I $D(%AZ("PACKAGE")) K %AZ G PACKAGE "RTN","ZIBER",10,0) U 0 W !!,?5,"1 - Display errors",!,?5,"2 - Print errors",!,?5,"3 - Erase errors",!,?5,"4 - Summarize errors" "RTN","ZIBER",11,0) R !!,"Enter option: ",%X G EXIT:"^Q"=%X!("^"[%X) "RTN","ZIBER",12,0) I %X="?" S %XQF="7,8,9,6,3,4" D QUE^ZIBER1 G OPT "RTN","ZIBER",13,0) I $E("Display",1,$L(%X))=%X W $E("Display",$L(%X)+1,99) S %SUM=0 G DAT "RTN","ZIBER",14,0) I %X=1 W " - Display" S %SUM=0 G DAT "RTN","ZIBER",15,0) I $E("Print",1,$L(%X))=%X W $E("Print",$L(%X)+1,99) G PRINT^ZIBER1 "RTN","ZIBER",16,0) I %X=2 W " - Print" G PRINT^ZIBER1 "RTN","ZIBER",17,0) I $E("Erase",1,$L(%X))=%X W $E("Erase",$L(%X)+1,99) G DELETE^ZIBER1 "RTN","ZIBER",18,0) I %X=3 W " - Erase" G DELETE^ZIBER1 "RTN","ZIBER",19,0) I $E("Summarize",1,$L(%X))=%X W $E("Summarize",$L(%X)+1,99) G DAT1 "RTN","ZIBER",20,0) I %X=4 W " - Summarize" G DAT1 "RTN","ZIBER",21,0) W *7," ..Invalid" G OPT "RTN","ZIBER",22,0) ; "RTN","ZIBER",23,0) PACKAGE W ! K DIC S DIC(0)="QEAM",DIC=9.4 D ^DIC G EXIT:Y<1!$D(DTOUT)!$D(DUOUT) S %AZ("PACKAGE")=$P(^DIC(9.4,+Y,0),U,2) D ^%GUCI K %,%UCN G DAT1 "RTN","ZIBER",24,0) ; "RTN","ZIBER",25,0) DAT S %DIS=1,FLG=0 R !!,"Enter date > ",%X G OPT:"^"[%X,EXIT:%X="^Q",DINFO:%X="?" D DCHK^ZIBER1 G DAT:%QF,NE "RTN","ZIBER",26,0) ; "RTN","ZIBER",27,0) DAT1 S %DEL=0,%DIS=0,%SUM=1 ;ENTRY POINT TO SUMMARIZE ERRORS "RTN","ZIBER",28,0) G DAT^ZIBER1 "RTN","ZIBER",29,0) DINFO S %J=$N(^UTILITY("%ER",-1)) I %J<0 W !!,"No errors have been logged for this UCI" G EXIT "RTN","ZIBER",30,0) W !!,"Errors have been logged for the following days: " "RTN","ZIBER",31,0) F %J=$N(^UTILITY("%ER",-1)):0 Q:%J<0 S %I=%J W "T",$P(",-",",",%I<+$H+1) W:+$H-%I +$H-%I,"," S %J=$N(^(%J)) "RTN","ZIBER",32,0) S %XQF="1,2,11" D QUE^ZIBER1 G DAT "RTN","ZIBER",33,0) DINFO1 S %J=$N(^UTILITY("%ER",-1)) I %J<0 W !!,"No errors have been logged for this UCI" G EXIT "RTN","ZIBER",34,0) W !!,"Errors have been logged for the following days: " "RTN","ZIBER",35,0) F %J=$N(^UTILITY("%ER",-1)):0 Q:%J<0 S %I=%J W "T",$P(",-",",",%I<+$H+1) W:+$H-%I +$H-%I,"," S %J=$N(^(%J)) "RTN","ZIBER",36,0) S %XQF="1,2,11,12,20" D QUE^ZIBER1 G DAT1:%SUM,DAT^ZIBER1 "RTN","ZIBER",37,0) NE S %NE=$D(^UTILITY("%ER",%DAT,0)) I '%NE D E1 G DAT1:%SUM,DAT "RTN","ZIBER",38,0) S %NE=^(0) D E1 "RTN","ZIBER",39,0) ERR K %LIST R !!,"Error # > ",%X G DAT:"^"[%X,EXIT:%X="^Q" I %X="^L" G:%NE>0 LIST D E1 G ERR "RTN","ZIBER",40,0) I %X="?" D E1 S %XQF="1,2,14,18" D QUE^ZIBER1 G ERR "RTN","ZIBER",41,0) I %X'?1N.N!(%X>%NE) W *7," ..Invalid" G ERR "RTN","ZIBER",42,0) S %NUM=%X "RTN","ZIBER",43,0) I '$D(^UTILITY("%ER",%DAT,%NUM,0)) W !!,"Error not on file" G ERR "RTN","ZIBER",44,0) WRT R !!,"Symbol > ",%X G ERR:"^"[%X,EXIT:%X="^Q",PMODE:%X="^S" "RTN","ZIBER",45,0) I %X="?" S %XQF="1,2,13,10,15,16" D QUE^ZIBER1 G WRT "RTN","ZIBER",46,0) S %FND=1,%Q=0 I %X="^L" S %SYM="" G WF^ZIBER1 "RTN","ZIBER",47,0) S %SYM=%X G WF^ZIBER1 "RTN","ZIBER",48,0) E1 S %A=%NE S:'%A %A="NO" W !,%A," ERROR" W:%A'=1 "S" W " LOGGED ON ",$ZD(%DAT) Q "RTN","ZIBER",49,0) E2 W !!,"No errors logged between ",$ZD(%DAT)," and " "RTN","ZIBER",50,0) S %DAT=%D2 W $ZD(%DAT) Q "RTN","ZIBER",51,0) EXIT U 0 S $ZT="" C:%DEV'=$I %DEV "RTN","ZIBER",52,0) KILL K %A,%B,%CASE,%D,%D1,%D2,%DAT,%DEL,%DEV,%DIS,%DUM,%FND,%I,%J,%K,%L,%M,%LIST,%NE,%NE1,%NUM,%PG,%Q,%QF,%RDTE,%RTME,%SYM,%TAG,%UCI,%SUM,%X,%XQF,%Y,%Z,FLG,X,%AZ Q "RTN","ZIBER",53,0) LIST S %LIST=1,%J=0,FLG=0 W ! S $Y=0 "RTN","ZIBER",54,0) L1 S %J=%J+1 G:%J>%NE ERR "RTN","ZIBER",55,0) I $D(%AZ("PACKAGE")) S %AZ("P")=%J D TMD2^ZIBER1 I '%AZ("PHIT") S %J=%J-1 G L1 "RTN","ZIBER",56,0) I $D(^UTILITY("%ER",%DAT,%J,0)) D:$Y>20 NPAGE^ZIBER1 G:FLG=1 ERR W %J,") ",^(0),!! G L1 "RTN","ZIBER",57,0) LIST1 S %LIST=1,%J=0 W ! "RTN","ZIBER",58,0) L2 S %J=%J+1 Q:%J>%NE "RTN","ZIBER",59,0) I $D(%AZ("PACKAGE")) S %AZ("P")=%J D TMD2^ZIBER1 I '%AZ("PHIT") S %J=%J-1 G L2 "RTN","ZIBER",60,0) I $D(^UTILITY("%ER",%DAT,%J,0)) W %J,") ",^(0),!! G L2 "RTN","ZIBER",61,0) PMODE S %(1)=%DAT,%(2)=%NUM K (%) F %=$N(^(100)):0 Q:%<0!(%>1E5) D SET S %=$N(^(%)) "RTN","ZIBER",62,0) W !!,"Symbols have been set into this partition",!!,"You are exiting this utility" K % W !!,"Error defined as: ",^(0) S $ZT="" S:$D(^(7)) %=$P(^(7),"=",2) I $D(%) I %'="" I $D(@%) "RTN","ZIBER",63,0) K % Q "RTN","ZIBER",64,0) SET ; "RTN","ZIBER",65,0) I ^(%)'?1";".E S @($P(^(%),"=",1))=$P(^(%),"=",2,999) Q "RTN","ZIBER",66,0) I $D(^(1E8+99-%))<10 S @($P($E(^(%),2,999),"=",1))=^(1E8+99-%) Q "RTN","ZIBER",67,0) S %(3)="" F %(4)=1:1 Q:'$D(^UTILITY("%ER",%(1),%(2),1E8+99-%,%(4))) S %(3)=%(3)_^(%(4)) "RTN","ZIBER",68,0) S @($P($E(^UTILITY("%ER",%(1),%(2),%),2,999),"=",1))=%(3) "RTN","ZIBER",69,0) Q "RTN","ZIBER",70,0) ERROR U 0 "RTN","ZIBER",71,0) I $F($ZE,"") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2 "RTN","ZIBER",72,0) ZQ "RTN","ZIBERCD") 0^196^B7257303 "RTN","ZIBERCD",1,0) ZIBERCD ;DJM;DISPLAY ERROR CODE DEFINITIONS;[ 8/13/89 4:00 PM ] "RTN","ZIBERCD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBERCD",3,0) ; COPYRIGHT MICRONETICS DESIGN CORP @1990 "RTN","ZIBERCD",4,0) S $ZT="ERR^ZIBERCD" "RTN","ZIBERCD",5,0) W !?10,$P($P($ZV,","),"-")," - Error Code Description Utility" "RTN","ZIBERCD",6,0) N EC,EXP,I "RTN","ZIBERCD",7,0) CODE ; "RTN","ZIBERCD",8,0) W !!,"Error code: " R EC G:EC="^Q"!(EC="^q")!("^"[EC) EXIT "RTN","ZIBERCD",9,0) G MM:EC?1.N1":"1.N,ZV:EC?1.N,TXT:EC?1"<"5U1">",DISP:EC?5U "RTN","ZIBERCD",10,0) W !,*7,?5,"Enter error code in following format:" "RTN","ZIBERCD",11,0) W !,?7,"major:minor",?28,"Example: 4:1" "RTN","ZIBERCD",12,0) W !,?7,"",?28,"Example: " "RTN","ZIBERCD",13,0) W !,?7,"nnn",?28,"Error code from $ZVERIFY(), ex: 21" "RTN","ZIBERCD",14,0) G CODE "RTN","ZIBERCD",15,0) MM ;major:minor "RTN","ZIBERCD",16,0) S EC=$P(EC,":")_$P(EC,":",2) G DISP "RTN","ZIBERCD",17,0) ZV ;$ZV "RTN","ZIBERCD",18,0) S EC=99_EC G DISP "RTN","ZIBERCD",19,0) TXT ; "RTN","ZIBERCD",20,0) S EC=$E(EC,2,6) "RTN","ZIBERCD",21,0) DISP ; "RTN","ZIBERCD",22,0) S EXP=$T(@EC) I EXP="" W *7," ... no such error code on file" G CODE "RTN","ZIBERCD",23,0) W !,?5,$P(EXP,";",2,99) "RTN","ZIBERCD",24,0) F I=1:1 S EXP=$T(@EC+I) Q:EXP=""!($P(EXP," ")'="") W !,?5,$P(EXP,";",2,99) "RTN","ZIBERCD",25,0) G CODE "RTN","ZIBERCD",26,0) EXIT ; "RTN","ZIBERCD",27,0) Q "RTN","ZIBERCD",28,0) ERR ; "RTN","ZIBERCD",29,0) I $F($ZE,"") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2 "RTN","ZIBERCD",30,0) ZQ "RTN","ZIBERCD",31,0) ;error codes "RTN","ZIBERCD",32,0) 21 ; missing parenthesis "RTN","ZIBERCD",33,0) 22 ; missing or bad colon "RTN","ZIBERCD",34,0) 23 ; missing or bad equal "RTN","ZIBERCD",35,0) 24 ; missing or bad local variable "RTN","ZIBERCD",36,0) 25 ; missing or bad global variable "RTN","ZIBERCD",37,0) 26 ; missing or bad function "RTN","ZIBERCD",38,0) 27 ; missing or bad routine name "RTN","ZIBERCD",39,0) 28 ; missing or bad routine label "RTN","ZIBERCD",40,0) 29 ; missing or bad routine displacement "RTN","ZIBERCD",41,0) 210 ; indirect argument error "RTN","ZIBERCD",42,0) 211 ; argument condition error "RTN","ZIBERCD",43,0) 212 ; bad argument delimiter "RTN","ZIBERCD",44,0) 213 ; bad command "RTN","ZIBERCD",45,0) 30 ; bad special variable name "RTN","ZIBERCD",46,0) 31 ; bad system function "RTN","ZIBERCD",47,0) 32 ; bad local variable name "RTN","ZIBERCD",48,0) 33 ; bad global variable "RTN","ZIBERCD",49,0) 34 ; bad string constant "RTN","ZIBERCD",50,0) 35 ; bad numeric constant "RTN","ZIBERCD",51,0) 36 ; unbalanced parenthesis "RTN","ZIBERCD",52,0) 37 ; invalid systax in term "RTN","ZIBERCD",53,0) 38 ; bad operator "RTN","ZIBERCD",54,0) 39 ; bad delimiter "RTN","ZIBERCD",55,0) 40 ; undefined local variable "RTN","ZIBERCD",56,0) 41 ; undefined global variable "RTN","ZIBERCD",57,0) 42 ; undefined routine label "RTN","ZIBERCD",58,0) 43 ; undefined routine name "RTN","ZIBERCD",59,0) 44 ; bad naked reference "RTN","ZIBERCD",60,0) 45 ; non-existant device "RTN","ZIBERCD",61,0) 46 ; unsubscripted local reference required "RTN","ZIBERCD",62,0) 47 ; variable reference required.. no expressions "RTN","ZIBERCD",63,0) 48 ; zload/zremove command not inside of execute string "RTN","ZIBERCD",64,0) 49 ; undefined uci reference "RTN","ZIBERCD",65,0) 410 ; insertion of null line is illegal "RTN","ZIBERCD",66,0) 411 ; unknown data type "RTN","ZIBERCD",67,0) 412 ; missing parameter "RTN","ZIBERCD",68,0) 413 ; undefined system reference "RTN","ZIBERCD",69,0) 414 ; global access protection violation "RTN","ZIBERCD",70,0) 415 ; VIEW command restriction "RTN","ZIBERCD",71,0) 416 ; ZCALL error "RTN","ZIBERCD",72,0) 417 ; Formal List not entered via DO command "RTN","ZIBERCD",73,0) 418 ; QUIT with argument inside FOR scope "RTN","ZIBERCD",74,0) 419 ; QUIT with argument, but routine not extrinsic "RTN","ZIBERCD",75,0) 420 ; argumentless QUIT, but routine was extrinsic "RTN","ZIBERCD",76,0) 421 ; end of extrinsic subroutine encountered without QUIT parm "RTN","ZIBERCD",77,0) 422 ; label requires a Formal List "RTN","ZIBERCD",78,0) 423 ; Actual List contains more parms than Formal List "RTN","ZIBERCD",79,0) 424 ; Formal List parameter is subscripted variable "RTN","ZIBERCD",80,0) 425 ; duplicate variable name in Formal List "RTN","ZIBERCD",81,0) 426 ; passing a value by reference in JOB command not allowed "RTN","ZIBERCD",82,0) 50 ; string exceeded maximum length "RTN","ZIBERCD",83,0) ; 4092 for locals, 255 for globals "RTN","ZIBERCD",84,0) 51 ; select function error (all elements evaluated to FALSE) "RTN","ZIBERCD",85,0) 52 ; attempt to divide by zero "RTN","ZIBERCD",86,0) 53 ; negative number where only zero or positive values allowed "RTN","ZIBERCD",87,0) 54 ; maximum number "RTN","ZIBERCD",88,0) 55 ; attempt to access a non-opened device "RTN","ZIBERCD",89,0) 56 ; maximum memory "RTN","ZIBERCD",90,0) 57 ; string value required "RTN","ZIBERCD",91,0) 58 ; name indirection resulted in null value "RTN","ZIBERCD",92,0) 59 ; name indirection resolved into more than pure variable name "RTN","ZIBERCD",93,0) ; ex: SET X=@Y where Y="ABC+2" (the '+2' is illegal) "RTN","ZIBERCD",94,0) 510 ; selected partition not active ($VIEW) "RTN","ZIBERCD",95,0) 511 ; invalid VIEW/$VIEW() parameter "RTN","ZIBERCD",96,0) 512 ; function parameter out of range "RTN","ZIBERCD",97,0) 513 ; subscript contains $C(0), or is null, or total global reference "RTN","ZIBERCD",98,0) ; exceeds 255 characters (including delimiters) "RTN","ZIBERCD",99,0) 514 ; attempt to read/write file when file not opened for that access "RTN","ZIBERCD",100,0) ; ex: writing to a file that is opened for input "RTN","ZIBERCD",101,0) ; reading from a file that is opened for output "RTN","ZIBERCD",102,0) ; reading from a file that is opened for input but was not found "RTN","ZIBERCD",103,0) ; during open processing ($ZA/$ZB indicate if file was found) "RTN","ZIBERCD",104,0) 515 ; invalid kanji or compressed shiftjis char "RTN","ZIBERCD",105,0) 516 ; not allowed to write to block 0 "RTN","ZIBERCD",106,0) 517 ; invalid use of shared mode on VIEW buffer "RTN","ZIBERCD",107,0) 60 ; break key depressed "RTN","ZIBERCD",108,0) 61 ; attempt to exceed partition size limit set at 'logon' time "RTN","ZIBERCD",109,0) 62 ; halt command executed "RTN","ZIBERCD",110,0) 63 ; lock table full "RTN","ZIBERCD",111,0) 64 ; BREAK command detected "RTN","ZIBERCD",112,0) 65 ; expression stack overflowed (expression too complex or operands of "RTN","ZIBERCD",113,0) ; string operations too long) "RTN","ZIBERCD",114,0) 66 ; system stack overflow (DO/XECUTE/INDIRECTION nesting is too deep) "RTN","ZIBERCD",115,0) 67 ; old pcode.. need to ZLOAD and ZSAVE (run the %RELOAD utility) "RTN","ZIBERCD",116,0) 68 ; ddp error "RTN","ZIBERCD",117,0) ; can be caused by: SET X="XECUTE X" X X "RTN","ZIBERCD",118,0) 69 ; reserved for DDP internal use "RTN","ZIBERCD",119,0) 610 ; DDP database access inhibited "RTN","ZIBERCD",120,0) 611 ; MUMPS to MUMPS communication failure "RTN","ZIBERCD",121,0) 612 ; I/O error on terminal operation "RTN","ZIBERCD",122,0) 613 ; I/O error on magnetic tape operation "RTN","ZIBERCD",123,0) 614 ; pcode too long to fit in one block "RTN","ZIBERCD",124,0) 615 ; ZQUIT error "RTN","ZIBERCD",125,0) 616 ; DDP circuit disabled "RTN","ZIBERCD",126,0) 71 ; bad block type in global directory block "RTN","ZIBERCD",127,0) 72 ; bad block type in pointer block "RTN","ZIBERCD",128,0) 73 ; bad block type in global data block "RTN","ZIBERCD",129,0) 74 ; bad block type in extended global data block "RTN","ZIBERCD",130,0) 75 ; bad block type in routine directory block "RTN","ZIBERCD",131,0) 76 ; bad block type in routine header block "RTN","ZIBERCD",132,0) 77 ; bad block type in routine block "RTN","ZIBERCD",133,0) 78 ; bad block type in map block "RTN","ZIBERCD",134,0) 79 ; bad block type in journal block "RTN","ZIBERCD",135,0) 710 ; bad block type in sequential-block-processor block "RTN","ZIBERCD",136,0) 711 ; hardware i/o error (unable to read/write database block) "RTN","ZIBERCD",137,0) 712 ; disk full (if this occurs on a SET of a global variable, you MUST "RTN","ZIBERCD",138,0) ; use ^VALIDATE in Manager's UCI to validate the global since it "RTN","ZIBERCD",139,0) ; is likely that the global has become corrupt since the SET did "RTN","ZIBERCD",140,0) ; not complete normally (you may need to use ^DBFIX to correct) "RTN","ZIBERCD",141,0) 713 ; mismatch of block number id in block header "RTN","ZIBERCD",142,0) 714 ; global data/pointer block 'string+key' is too long, proper "RTN","ZIBERCD",143,0) ; block split can't be performed "RTN","ZIBERCD",144,0) 715 ; unable to open database "RTN","ZIBERCD",145,0) 716 ; block being freed already marked as free "RTN","ZIBERCD",146,0) ; use ^VALIDATE and ^DBFIX in manager's UCI to correct problem "RTN","ZIBERCD",147,0) 717 ; invalid block number to driver "RTN","ZIBERCD",148,0) BKERR ; BREAK command was executed "RTN","ZIBERCD",149,0) CMMND ; illegal or undefined command "RTN","ZIBERCD",150,0) CLOBR ; zload/zremove command not inside execute statement "RTN","ZIBERCD",151,0) DDPER ; ddp error "RTN","ZIBERCD",152,0) DIVER ; attempt to divide by zero "RTN","ZIBERCD",153,0) DKFUL ; all space on the disk has been exhausted "RTN","ZIBERCD",154,0) DKHER ; disk physical i/o error (can't read/write a block in database) "RTN","ZIBERCD",155,0) DKSER ; incorrect block type in block header (ex: reading in a 'data' "RTN","ZIBERCD",156,0) ; block but header in block indicates a 'directory' block) "RTN","ZIBERCD",157,0) ; use ^VALIDATE and ^DBFIX in manager's UCI to correct problem "RTN","ZIBERCD",158,0) DPARM ; invalid use of parameter passing "RTN","ZIBERCD",159,0) DSCON ; telephone associated with the device has been disconnected "RTN","ZIBERCD",160,0) FUNCT ; illegal or undefined function "RTN","ZIBERCD",161,0) INDER ; invalid use of the indirection operator "RTN","ZIBERCD",162,0) INRPT ; control-c or 'break' key detected "RTN","ZIBERCD",163,0) ISYNT ; invalid syntax of a line being ZINERTed into a routine "RTN","ZIBERCD",164,0) LINER ; reference made to a non-existent label "RTN","ZIBERCD",165,0) MAPER ; blk being freed already marked as free "RTN","ZIBERCD",166,0) MINUS ; positive number was expected "RTN","ZIBERCD",167,0) MODER ; read/write to file when incorrect read/write mode "RTN","ZIBERCD",168,0) MSMCX ; in memory communication path between tasks has been interrupted "RTN","ZIBERCD",169,0) MTERR ; magnetic tape Inpt/Output error "RTN","ZIBERCD",170,0) MXNUM ; number is greater than maximum allowed "RTN","ZIBERCD",171,0) MXMEM ; invalid memory specification in VIEW cmnd "RTN","ZIBERCD",172,0) MXSTR ; string exceeds maximum length "RTN","ZIBERCD",173,0) NAKED ; naked reference is invalid "RTN","ZIBERCD",174,0) NODEV ; attempt to open an undefined device "RTN","ZIBERCD",175,0) NOMEM ; attempt to access a nonexistant or protected memory location "RTN","ZIBERCD",176,0) NOPEN ; attempt to use an unopened device "RTN","ZIBERCD",177,0) NOPGM ; routine not found in directory "RTN","ZIBERCD",178,0) NOSYS ; reference to a non-existent volume group through extended global notation "RTN","ZIBERCD",179,0) NOUCI ; reference to a non-existent UCI through extended global notation "RTN","ZIBERCD",180,0) PCERR ; invalid post-conditioned "RTN","ZIBERCD",181,0) PGMOV ; no memory left in partition "RTN","ZIBERCD",182,0) PLDER ; old pcode.. need to ZLOAD and ZSAVE (run the %RELOAD utility) "RTN","ZIBERCD",183,0) SBSCR ; invalid subscript specfication "RTN","ZIBERCD",184,0) SYNTX ; invalid syntax in expression, command, etc "RTN","ZIBERCD",185,0) SYSTM ; system error (should not occur) "RTN","ZIBERCD",186,0) UNDEF ; local or global reference is undefined "RTN","ZIBERCD",187,0) PROT ; access protection violation "RTN","ZIBERCD",188,0) SBSCR ; invalid subscript in a local or global variable "RTN","ZIBERCD",189,0) STKOV ; system stack has overflowed due to nested indirection, program loop, etc. "RTN","ZIBERCD",190,0) SYNTX ; a syntax error has been encountered by the interperter "RTN","ZIBERCD",191,0) SYSTM ; an internal MUMPS error, shutdown system and reboot "RTN","ZIBERCD",192,0) VWERR ; invalid use of the shared VIEW buffer mode "RTN","ZIBERCD",193,0) ZCERR ; old pcode.. need to ZLOAD and ZSAVE "RTN","ZIBERCD",194,0) ZLZSV ; old pcode.. need to ZLOAD and ZSAVE "RTN","ZIBERCD",195,0) BADCH ; invalid kanji/shiftjis character "RTN","ZIBERCD",196,0) 99 ; buffer validation error codes "RTN","ZIBERCD",197,0) 991 ; unknown block type "RTN","ZIBERCD",198,0) 992 ; unknown data type in block "RTN","ZIBERCD",199,0) 993 ; block type mis-match of descendent block "RTN","ZIBERCD",200,0) 994 ; block not marked allocated in map block "RTN","ZIBERCD",201,0) 995 ; right hand link doesnt match next downlink of ptr "RTN","ZIBERCD",202,0) 996 ; block number field in block is incorrect "RTN","ZIBERCD",203,0) 9910 ; non-zero common count for leading key in blk "RTN","ZIBERCD",204,0) 9911 ; zero length unique part of key "RTN","ZIBERCD",205,0) 9912 ; common > common+unique of previous key "RTN","ZIBERCD",206,0) 9920 ; length of leading key doesnt match expected value "RTN","ZIBERCD",207,0) 9921 ; leading key doesnt match expected value "RTN","ZIBERCD",208,0) 9930 ; keys not in ascending order "RTN","ZIBERCD",209,0) 9931 ; key not higher than high key in subtree "RTN","ZIBERCD",210,0) 9940 ; hdrnext() inconsistent with actual end "RTN","ZIBERCD",211,0) 9950 ; zero pointer to lower level "RTN","ZIBERCD",212,0) 9951 ; cyclic loop in pointer block(s) "RTN","ZIBERCD",213,0) 9952 ; cyclic loop in right link of routine blocks "RTN","ZIBERCD",214,0) 9960 ; incorrect offset to first free slot in map block "RTN","ZIBERCD",215,0) 9961 ; incorrect free count in map block "RTN","ZIBERCD",216,0) 9963 ; map block in illegal location (valid: 1, 513, ... 512*n+1) "RTN","ZIBERCD",217,0) 9964 ; map block not allocated to SYSTEM "RTN","ZIBFIND") 0^197^B8523829 "RTN","ZIBFIND",1,0) ZIBFIND ; IHS/ADC/GTH - FIND MSM BLOCKS WITH CONTAIN SPECIFIC GLOBAL ; [ 10/29/2002 7:42 AM ] "RTN","ZIBFIND",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBFIND",3,0) ; "RTN","ZIBFIND",4,0) ; Thanks to Ross Leatham, AAO, and Mark Delaney, DSM, for the "RTN","ZIBFIND",5,0) ; original routine. "RTN","ZIBFIND",6,0) ; "RTN","ZIBFIND",7,0) ; MSM-specific utility for finding blocks which contain a "RTN","ZIBFIND",8,0) ; specific GBL. "RTN","ZIBFIND",9,0) ; "RTN","ZIBFIND",10,0) ; ZIBCC=common count, ZIBUC=unique count "RTN","ZIBFIND",11,0) ; ZIBCHAR=string of characters "RTN","ZIBFIND",12,0) ; "RTN","ZIBFIND",13,0) ;S X="ERR^ZIBFIND",@^%ZOSF("TRAP") K X "RTN","ZIBFIND",14,0) ; "RTN","ZIBFIND",15,0) I '(^%ZOSF("OS")["MSM") D OSNO^XB Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFIND",16,0) S ZIBOSET=-1 "RTN","ZIBFIND",17,0) GETINFO ; "RTN","ZIBFIND",18,0) KILL ZIBVN,ZIBGREF,ZIBTYPE "RTN","ZIBFIND",19,0) D GETVOL^%VGUTIL "RTN","ZIBFIND",20,0) S:VGVOL=1 ZIBVN=0 "RTN","ZIBFIND",21,0) I VGVOL>1 R !,"What Volume Number are you looking in? ",ZIBVN:30 "RTN","ZIBFIND",22,0) G END:"^"[ZIBVN "RTN","ZIBFIND",23,0) S ZIBLBLK=$P(VGVOL(ZIBVN),"^",4) "RTN","ZIBFIND",24,0) ASK1 ; "RTN","ZIBFIND",25,0) S ZIBN=1 "RTN","ZIBFIND",26,0) F R !,"Enter GLOBAL to search for: ^",ZIBGREF:30 Q:"^"[ZIBGREF S ZIBGREF(ZIBN)=ZIBGREF,ZIBN=ZIBN+1 "RTN","ZIBFIND",27,0) G END:ZIBGREF="^" "RTN","ZIBFIND",28,0) S ZIBTYPE="234" "RTN","ZIBFIND",29,0) O 63::0 "RTN","ZIBFIND",30,0) I '$T W !,"VIEW BUFFER IN USE- SORRY" Q "RTN","ZIBFIND",31,0) KILL ^TMP("ZIBFIND",$J) "RTN","ZIBFIND",32,0) V 0:"DB/"_ZIBVN ;get the actual block number at start of volume "RTN","ZIBFIND",33,0) S ZIBBBLK=$V(1016,0,4),ZIBEBLK=ZIBBBLK+ZIBLBLK-1 "RTN","ZIBFIND",34,0) ASK2 ; "RTN","ZIBFIND",35,0) W !,"Enter beginning actual block to search from <",ZIBBBLK,"> " "RTN","ZIBFIND",36,0) R X:30 "RTN","ZIBFIND",37,0) G ASK2:X'?.N,END:X["^"!(X>ZIBLBLK) "RTN","ZIBFIND",38,0) S:X]"" ZIBBBLK=X "RTN","ZIBFIND",39,0) S ZIBOSET=ZIBBBLK-1 "RTN","ZIBFIND",40,0) ASK3 ; "RTN","ZIBFIND",41,0) W !,"Enter last actual block to search to <",ZIBEBLK,"> " "RTN","ZIBFIND",42,0) R X:30 "RTN","ZIBFIND",43,0) G ASK3:X'?.N,END:X["^"!(XZIBFF2 D SHOWF3($P(^[ZIBFUCI]DIC(ZIBFF1,0),U),^[ZIBFUCI]DIC(ZIBFF1,0,"GL")) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFMD",102,0) W:$X ! "RTN","ZIBFMD",103,0) S X="",@^%ZOSF("TRAP") "RTN","ZIBFMD",104,0) Q "RTN","ZIBFMD",105,0) ; "RTN","ZIBFMD",106,0) NODIC ; "RTN","ZIBFMD",107,0) W ?15,"--",?30,"Cannot access ^DIC (protection)",! "RTN","ZIBFMD",108,0) Q "RTN","ZIBFMD",109,0) ; "RTN","ZIBFMD",110,0) SHOWF3(X,Y) ;IHS/SET/GTH XB*3*9 10/29/2002 Added parameter "Y". "RTN","ZIBFMD",111,0) ;W ?15,ZIBFF1,?30,X,! ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFMD",112,0) W ?15,ZIBFF1,?30,X,?45,Y,! ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFMD",113,0) Q "RTN","ZIBFMD",114,0) ; "RTN","ZIBFMD",115,0) EXIT ; "RTN","ZIBFMD",116,0) ;KILL X,ZIBFI,ZIBFUCI,ZIBFNAME,ZIBFNUM,ZIBFHDR,ZIBFF1,ZIBFF2,ZIBFTDY,%I,%H,DTOUT,DUOUT,^TMP("ZIBFMD",$J) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFMD",117,0) KILL X,ZIBFI,ZIBFUCI,ZIBGBL,ZIBFNAME,ZIBFNUM,ZIBFHDR,ZIBFF1,ZIBFF2,ZIBFTDY,%I,%H,DTOUT,DUOUT,^TMP("ZIBFMD",$J) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFMD",118,0) S:$D(ZTQUEUED) ZTREQ="@" "RTN","ZIBFMD",119,0) Q "RTN","ZIBFMD",120,0) ; "RTN","ZIBFMD",121,0) ERR ; "RTN","ZIBFMD",122,0) I $ZE'["" W $ZE,! Q "RTN","ZIBFMD",123,0) G SUMM "RTN","ZIBFMD",124,0) ; "RTN","ZIBFR") 0^199^B11168634 "RTN","ZIBFR",1,0) ZIBFR ; IHS/ADC/GTH - LIST UCI'S FOR A GIVEN ROUTINE ; [ 10/29/2002 7:42 AM ] "RTN","ZIBFR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBFR",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBFR",4,0) ; "RTN","ZIBFR",5,0) ; Given a routine name, this routine searches all UCIs and "RTN","ZIBFR",6,0) ; reports the first line of the selected routine to the user. "RTN","ZIBFR",7,0) ; "RTN","ZIBFR",8,0) EN ; "RTN","ZIBFR",9,0) ;Q:'($ZV?1"MSM".E!($ZV?1"DSM".E)) ; Only works for MSM or DSM.;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",10,0) S %=$$VERSION^%ZOSV(1) I '(%["Cache"),'(%["MSM") Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",11,0) R !,"Please enter full routine name to locate: ",%ZIB("RTN NAME"):$G(DTIME,300),! "RTN","ZIBFR",12,0) ; G:"^"[%ZIB("RTN NAME") EX ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",13,0) G:"^"[%ZIB("RTN NAME") EXIT ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",14,0) S:%ZIB("RTN NAME")["^" %ZIB("RTN NAME")=$P(%ZIB("RTN NAME"),"^",2) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",15,0) S %ZIB("OP SYS")=$ZV ; Set operating system. "RTN","ZIBFR",16,0) I %ZIB("OP SYS")["Cache" G CACHE ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",17,0) S %ZIB("CURR UCI NBR")=$P($ZU($P($ZU(0),","),$P($ZU(0),",",2)),",") ; Save current UCI nbr. "RTN","ZIBFR",18,0) S %ZIB("CURR VOL NBR")=$P($ZU($P($ZU(0),","),$P($ZU(0),",",2)),",",2) ; Save current VOL nbr. "RTN","ZIBFR",19,0) ; S:%ZIB("RTN NAME")["^" %ZIB("RTN NAME")=$P(%ZIB("RTN NAME"),"^",2) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",20,0) D ; Loop until last UCI of last VOLUME SET. "RTN","ZIBFR",21,0) . S $ZT="ZT" ; Set error trap for DSM . "RTN","ZIBFR",22,0) . F %ZIB("VOL NBR")=0:1 Q:$ZU(1,%ZIB("VOL NBR"))!($ZU(1,%ZIB("VOL NBR"))="") D "RTN","ZIBFR",23,0) .. S $ZT="ZT" ; Set error trap for DSM . "RTN","ZIBFR",24,0) .. F %ZIB("UCI NBR")=1:1 Q:$ZU(%ZIB("UCI NBR"),%ZIB("VOL NBR"))!($ZU(%ZIB("UCI NBR"),%ZIB("VOL NBR"))="") D "RTN","ZIBFR",25,0) ... Q:$E(%ZIB("RTN NAME"))="%"&(%ZIB("UCI NBR")'=1) ; MGR routine. "RTN","ZIBFR",26,0) ... I %ZIB("OP SYS")?1"MSM".E D "RTN","ZIBFR",27,0) .... V 2:$J:%ZIB("VOL NBR")*32+%ZIB("UCI NBR"):2 ; MSM switch to next UCI. "RTN","ZIBFR",28,0) ... E V 148:$J:$V(148,$J)#256+(%ZIB("VOL NBR")*32+%ZIB("UCI NBR"))*256 ; DSM switch to next UCI. "RTN","ZIBFR",29,0) ... S X=%ZIB("RTN NAME") "RTN","ZIBFR",30,0) ... X ^%ZOSF("TEST") "RTN","ZIBFR",31,0) ... I D "RTN","ZIBFR",32,0) .... X "ZL @%ZIB(""RTN NAME"") S %ZIB(""RTN FIRST LINE"")=$T(+1)" "RTN","ZIBFR",33,0) .... W !!,$ZU(0),?10,"Routine - ",%ZIB("RTN NAME")," - was last saved on ",$P($P(%ZIB("RTN FIRST LINE"),"[",2),"]") "RTN","ZIBFR",34,0) .... W !,%ZIB("RTN FIRST LINE") ; Display first line of routine. "RTN","ZIBFR",35,0) I %ZIB("OP SYS")?1"MSM".E V 2:$J:%ZIB("CURR VOL NBR")*32+%ZIB("CURR UCI NBR"):2 ; Return to current UCI MSM. "RTN","ZIBFR",36,0) E V 148:$J:$V(148,$J)#256+(%ZIB("CURR VOL NBR")*32+%ZIB("CURR UCI NBR"))*256) ; Return to current UCI DSM. "RTN","ZIBFR",37,0) EXIT ;IHS/SET/GTH XB*3*9 10/29/2002 Label EX changed to EXIT. "RTN","ZIBFR",38,0) KILL %ZIB "RTN","ZIBFR",39,0) ENQ ; "RTN","ZIBFR",40,0) Q "RTN","ZIBFR",41,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",42,0) CACHE ; "RTN","ZIBFR",43,0) S $ZT="BACK^%ETN" "RTN","ZIBFR",44,0) S %ZIB("CURR NSP")=$ZU(5) "RTN","ZIBFR",45,0) F I=1:1:$ZU(90,0) S ZIBLIST($ZU(90,2,0,I))="" "RTN","ZIBFR",46,0) S ZIBFUCI="" F S ZIBFUCI=$O(ZIBLIST(ZIBFUCI)) Q:ZIBFUCI="" D "RTN","ZIBFR",47,0) .I $ZU(5,ZIBFUCI) "RTN","ZIBFR",48,0) .S X=%ZIB("RTN NAME") "RTN","ZIBFR",49,0) .X "I X?1(1""%"",1A).7AN,$D(^$R(X))" "RTN","ZIBFR",50,0) .I D "RTN","ZIBFR",51,0) ..X "ZL @%ZIB(""RTN NAME"") S %ZIB(""RTN FIRST LINE"")=$T(+1),%ZIB(""RTN SECOND LINE"")=$T(+2)" "RTN","ZIBFR",52,0) ..W !!,$ZU(5),?10,"Routine - ",%ZIB("RTN NAME")," - was last compiled on ",$$CDATE(%ZIB("RTN NAME")) "RTN","ZIBFR",53,0) ..W !,%ZIB("RTN FIRST LINE") ; Display first line of routine. "RTN","ZIBFR",54,0) ..W !,%ZIB("RTN SECOND LINE"),! ; Display second line "RTN","ZIBFR",55,0) I $ZU(5,%ZIB("CURR NSP")) ; Go back to original Namespace "RTN","ZIBFR",56,0) D EN^XBVK("ZIB") "RTN","ZIBFR",57,0) KILL I,X "RTN","ZIBFR",58,0) G EXIT "RTN","ZIBFR",59,0) ; "RTN","ZIBFR",60,0) CDATE(%ZIBRTN) ; retrieve date of last edit on Cache only "RTN","ZIBFR",61,0) Q $$DATE^%R(%ZIBRTN_".INT",1) "RTN","ZIBFR",62,0) ; "RTN","ZIBFR",63,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBFR",64,0) ZT ; ERROR TRAP "RTN","ZIBFR",65,0) Q:$ZE[" err. "RTN","ZIBGCHAR",4,0) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",5,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBGCHAR",6,0) ; XB*3*10 IHS/ITSC/DMJ 8/19/2004 Bad global name. "RTN","ZIBGCHAR",7,0) ; "RTN","ZIBGCHAR",8,0) ; Not all capabilities of the implementation-specific global "RTN","ZIBGCHAR",9,0) ; characteristics routines are reflected in this routine. "RTN","ZIBGCHAR",10,0) ; "RTN","ZIBGCHAR",11,0) ; The argument for each entry point is the unsubscripted "RTN","ZIBGCHAR",12,0) ; name of the global whose characteristics you want to "RTN","ZIBGCHAR",13,0) ; change, with NO leading circumflex. "RTN","ZIBGCHAR",14,0) ; "RTN","ZIBGCHAR",15,0) ; If the call is successful, 0 is returned. "RTN","ZIBGCHAR",16,0) ; "RTN","ZIBGCHAR",17,0) ; If the call is not successful, a positive integer is "RTN","ZIBGCHAR",18,0) ; returned, and the cause can be retrieved at the ERR() "RTN","ZIBGCHAR",19,0) ; entry point. "RTN","ZIBGCHAR",20,0) ; "RTN","ZIBGCHAR",21,0) ; E.g's: "RTN","ZIBGCHAR",22,0) ; S %=$$NOJOURN^ZIBGCHAR("AUTTSITE") "RTN","ZIBGCHAR",23,0) ; I % W !,$$ERR^ZIBGCHAR(%) "RTN","ZIBGCHAR",24,0) ; "RTN","ZIBGCHAR",25,0) Q "RTN","ZIBGCHAR",26,0) ; "RTN","ZIBGCHAR",27,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",28,0) KILL(ZIBGLOB) ;PEP - Kill global or global referenced at the top level "RTN","ZIBGCHAR",29,0) NEW QF,X "RTN","ZIBGCHAR",30,0) I '$L($G(ZIBGLOB)) Q 1 "RTN","ZIBGCHAR",31,0) I ZIBGLOB'["," D Q QF ; just one global to kill "RTN","ZIBGCHAR",32,0) . S QF=$$PROCESS("D","N") "RTN","ZIBGCHAR",33,0) . I QF Q "RTN","ZIBGCHAR",34,0) . KILL @("^"_ZIBGLOB) "RTN","ZIBGCHAR",35,0) . I $$VERSION^%ZOSV(1)["Cache" S X=$ZU(68,28,1) ;disallow kill again "RTN","ZIBGCHAR",36,0) .Q "RTN","ZIBGCHAR",37,0) ;multiple globals to kill, comma delimited string like "gbl1,gbl2,gbl3" "RTN","ZIBGCHAR",38,0) F X=1:1:$L(ZIBGLOB,",") S ZIBGLOB(X)=$P(ZIBGLOB,",",X) "RTN","ZIBGCHAR",39,0) F X=1:1:$L(ZIBGLOB,",") D Q:QF "RTN","ZIBGCHAR",40,0) . S QF=$$KILLOK(ZIBGLOB(X)) "RTN","ZIBGCHAR",41,0) . I QF Q "RTN","ZIBGCHAR",42,0) . KILL @("^"_ZIBGLOB(X)),ZIBGLOB(X) "RTN","ZIBGCHAR",43,0) .Q "RTN","ZIBGCHAR",44,0) I $$VERSION^%ZOSV(1)["Cache" S X=$ZU(68,28,1) ;disallow kill again "RTN","ZIBGCHAR",45,0) Q QF "RTN","ZIBGCHAR",46,0) ; "RTN","ZIBGCHAR",47,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",48,0) KILLOK(ZIBGLOB) ;PEP - Allow kill of global. "RTN","ZIBGCHAR",49,0) Q $$PROCESS("D","N") "RTN","ZIBGCHAR",50,0) ; "RTN","ZIBGCHAR",51,0) KILLNO(ZIBGLOB) ;PEP - Prevent kill'ing of global. "RTN","ZIBGCHAR",52,0) Q $$PROCESS("D","Y") "RTN","ZIBGCHAR",53,0) ; "RTN","ZIBGCHAR",54,0) JOURN(ZIBGLOB) ;PEP - Set Journaling to ALWAYS. "RTN","ZIBGCHAR",55,0) Q $$PROCESS("J","A") "RTN","ZIBGCHAR",56,0) ; "RTN","ZIBGCHAR",57,0) NOJOURN(ZIBGLOB) ;PEP - Set Journaling for global to NEVER. "RTN","ZIBGCHAR",58,0) Q $$PROCESS("J","N") "RTN","ZIBGCHAR",59,0) ; "RTN","ZIBGCHAR",60,0) UCIJOURN(ZIBGLOB) ;PEP - Journal when UCI is Journaled. "RTN","ZIBGCHAR",61,0) Q $$PROCESS("J","U") "RTN","ZIBGCHAR",62,0) ; "RTN","ZIBGCHAR",63,0) PROCESS(ZIBFLAG,ZIBVAL) ; "RTN","ZIBGCHAR",64,0) I '$L($G(ZIBGLOB)) Q 1 "RTN","ZIBGCHAR",65,0) ;I '(ZIBGLOB?1.8U) Q 5;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",66,0) ;I '(ZIBGLOB?1.8U!(ZIBGLOB?1"%"1.7U)) Q 5 ;Cache needs to SET % globals;IHS/SET/GTH XB*3*9 10/29/2002 XB*3*10 next line will do the job "RTN","ZIBGCHAR",67,0) I '$D(@("^"_ZIBGLOB)) Q 2 "RTN","ZIBGCHAR",68,0) ; NEW O ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBGCHAR",69,0) ; S O=$P(^%ZOSF("OS"),"-",1) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBGCHAR",70,0) ; I '$L($T(@O)) Q 3 ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBGCHAR",71,0) ; G @O ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBGCHAR",72,0) ; I $P(^%ZOSF("OS"),"^",1)["MSM" G MSM ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBGCHAR",73,0) I $$VERSION^%ZOSV(1)["Cache" Q $$CACHE(ZIBFLAG,ZIBGLOB,ZIBVAL) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",74,0) I $P(^%ZOSF("OS"),"^",1)'["MSM" Q 3 ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",75,0) D MSM "RTN","ZIBGCHAR",76,0) I '$D(ZTQUEUED) D HOME^%ZIS U IO(0) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",77,0) Q 0 ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",78,0) ; Q 3 ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",79,0) ; "RTN","ZIBGCHAR",80,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",81,0) CACHE(ZIBFLAG,ZIBGLOB,ZIBVAL) ;PEP - allow/prevent kill or enable/disable journaling on Cache "RTN","ZIBGCHAR",82,0) ;TASSC/MFD added subroutine to mimic portions of %GCH that Cache can do "RTN","ZIBGCHAR",83,0) ; -Patterned after CALL subroutine of MSM's %GCH but an extrinsic "RTN","ZIBGCHAR",84,0) ; -Less options than MSM- journaling is either on or off for a global "RTN","ZIBGCHAR",85,0) ; as there is no Journal entire UCI option "RTN","ZIBGCHAR",86,0) ; -Allowing top-level kill is by process not by global specification "RTN","ZIBGCHAR",87,0) ; -If the call is successful, 0 is returned. "RTN","ZIBGCHAR",88,0) ; "RTN","ZIBGCHAR",89,0) ; ZIBGLOB = global reference, no leading ^ "RTN","ZIBGCHAR",90,0) ; ZIBFLAG can be "J" or "D"- J is for journaling on or off, D is for "RTN","ZIBGCHAR",91,0) ; allowing top kill or not "RTN","ZIBGCHAR",92,0) ; ZIBVAL = for Journaling- E, A or U for enable, D, N or null for disable "RTN","ZIBGCHAR",93,0) ; for Prev kill- Y to prevent kill, N to allow kill "RTN","ZIBGCHAR",94,0) ; "RTN","ZIBGCHAR",95,0) I '(ZIBGLOB?1.8AN!(ZIBGLOB?1"%"1.7AN)) Q 5 ; XB*3*10 allow lower case "RTN","ZIBGCHAR",96,0) I '$D(@("^"_ZIBGLOB)) Q 2 "RTN","ZIBGCHAR",97,0) I ZIBFLAG="D",ZIBVAL="N" NEW X S X=$ZU(68,28,0) Q 0 ;don't prevent top-level kill for the process "RTN","ZIBGCHAR",98,0) I ZIBFLAG="D",ZIBVAL="Y" NEW X S X=$ZU(68,28,1) Q 0 ;prevent top-level kill for the process "RTN","ZIBGCHAR",99,0) I ZIBFLAG="J" NEW ZIBRC D "RTN","ZIBGCHAR",100,0) .S ZIBVAL=$S(ZIBVAL="E":4,ZIBVAL="A":4,ZIBVAL="U":4,ZIBVAL="N":0,ZIBVAL="D":0,ZIBVAL="":0,1:1) "RTN","ZIBGCHAR",101,0) .I ZIBVAL'=1 S ZIBRC=$$SetJournalType^%DM("",ZIBGLOB,ZIBVAL) "RTN","ZIBGCHAR",102,0) .Q "RTN","ZIBGCHAR",103,0) I ZIBRC=1 Q 0 ;Cache returns a 1 if successful "RTN","ZIBGCHAR",104,0) Q 1 ; any other condition is bad so quit 1 "RTN","ZIBGCHAR",105,0) ; "RTN","ZIBGCHAR",106,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHAR",107,0) MSM ; Micronetics Standard MUMPS. "RTN","ZIBGCHAR",108,0) I '$L($T(CALL^%GCH)) Q 4 "RTN","ZIBGCHAR",109,0) S:$D(ZTQUEUED) CALL="" ; Tell ^%GCH not to talk if errors. "RTN","ZIBGCHAR",110,0) KILL O "RTN","ZIBGCHAR",111,0) NEW (ZIBFLAG,ZIBGLOB,ZIBVAL) ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",112,0) D CALL^%GCH(ZIBFLAG,ZIBGLOB,ZIBVAL) "RTN","ZIBGCHAR",113,0) KILL CALL "RTN","ZIBGCHAR",114,0) ; Q 0 ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",115,0) Q ; XB*3*5 IHS/ADC/GTH 10-31-97 Prevent errors in return from ^%GCH. "RTN","ZIBGCHAR",116,0) ; "RTN","ZIBGCHAR",117,0) ERR(Z) ;PEP - Return cause of error. "RTN","ZIBGCHAR",118,0) Q $P($T(@Z),";;",2) "RTN","ZIBGCHAR",119,0) 1 ;;NO GLOBAL SPECIFIED IN PARAMETER "RTN","ZIBGCHAR",120,0) 2 ;;GLOBAL DOES NOT EXIST "RTN","ZIBGCHAR",121,0) 3 ;;OPERATING SYSTEM NOT SUPPORTED "RTN","ZIBGCHAR",122,0) 4 ;;WRONG VERSION OF MSM'S ^%GCH "RTN","ZIBGCHAR",123,0) 5 ;;BAD GLOBAL NAME "RTN","ZIBGCHAR",124,0) ; "RTN","ZIBGCHAR",125,0) ; "RTN","ZIBGCHAR",126,0) TEST ; "RTN","ZIBGCHAR",127,0) NEW AZHB,AZHB1 "RTN","ZIBGCHAR",128,0) F AZHBCTR=1:1 S AZHB=$P($T(DATA+AZHBCTR),";",3) Q:AZHB="###" D T1(AZHB),T2(AZHB) "RTN","ZIBGCHAR",129,0) Q "RTN","ZIBGCHAR",130,0) ; "RTN","ZIBGCHAR",131,0) T1(AZHB) ; "RTN","ZIBGCHAR",132,0) W !,"No Journaling For '",AZHB,"'" "RTN","ZIBGCHAR",133,0) S AZHB1=$$NOJOURN(AZHB) "RTN","ZIBGCHAR",134,0) W ?28," : ",AZHB1 "RTN","ZIBGCHAR",135,0) I AZHB1 W " : ",$$ERR(AZHB1) "RTN","ZIBGCHAR",136,0) E W " : " "RTN","ZIBGCHAR",137,0) Q "RTN","ZIBGCHAR",138,0) ; "RTN","ZIBGCHAR",139,0) T2(AZHB) ; "RTN","ZIBGCHAR",140,0) W !,"No Killing For '",AZHB,"'" "RTN","ZIBGCHAR",141,0) S AZHB1=$$KILLNO(AZHB) "RTN","ZIBGCHAR",142,0) W ?28," : ",AZHB1 "RTN","ZIBGCHAR",143,0) I AZHB1 W " : ",$$ERR(AZHB1) "RTN","ZIBGCHAR",144,0) E W " : " "RTN","ZIBGCHAR",145,0) Q "RTN","ZIBGCHAR",146,0) ; "RTN","ZIBGCHAR",147,0) DATA ; "RTN","ZIBGCHAR",148,0) ;; "RTN","ZIBGCHAR",149,0) ;;FREDDATA "RTN","ZIBGCHAR",150,0) ;;ACHSDATA "RTN","ZIBGCHAR",151,0) ;;AUTTSITE "RTN","ZIBGCHAR",152,0) ;;^AUTTLOC "RTN","ZIBGCHAR",153,0) ;;jen "RTN","ZIBGCHAR",154,0) ;;44 "RTN","ZIBGCHAR",155,0) ;;DIC(4, "RTN","ZIBGCHAR",156,0) ;;### "RTN","ZIBGCHR") 0^201^B33985608 "RTN","ZIBGCHR",1,0) ZIBGCHR ; IHS/ADC/GTH - SEARCH FOR CONTROL CHAR. IN GLOBALS ; [ 10/29/2002 7:42 AM ] "RTN","ZIBGCHR",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBGCHR",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBGCHR",4,0) ; "RTN","ZIBGCHR",5,0) %GLCHR ;SEARCH FOR CONTROL CHAR. IN GLOBALS [ 04/15/85 9:13 AM ] "RTN","ZIBGCHR",6,0) %ST ; "RTN","ZIBGCHR",7,0) S %DEF=0,%TRM=$I,%TMO=60 ;,$ZE="%ERR^%GL" "RTN","ZIBGCHR",8,0) %STL ; "RTN","ZIBGCHR",9,0) I $D(%IOD) C:%IOD'=%TRM %IOD "RTN","ZIBGCHR",10,0) S %QTY=2 "RTN","ZIBGCHR",11,0) D ^%ZIS "RTN","ZIBGCHR",12,0) G:'$D(IO) %END "RTN","ZIBGCHR",13,0) S %DEF=IO,%PAG=IOSL-4 "RTN","ZIBGCHR",14,0) ;I "SC^LP^TRM"'[%DTY!(%DTY="") W !?5,"Improper device selection.",!?5,"Must choose a terminal, a printer, or the system console." G %ST "RTN","ZIBGCHR",15,0) %SCR ; "RTN","ZIBGCHR",16,0) S %LN=132 "RTN","ZIBGCHR",17,0) ;S:IOT="TRM" %LN=80 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",18,0) S:IOT["TRM" %LN=80 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",19,0) ;I IOT'="TRM" S %SC=0,%DCC=2 G %DO ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",20,0) I IOT'["TRM" S %SC=0,%DCC=2 G %DO ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",21,0) IHS1 ; "RTN","ZIBGCHR",22,0) S %SC=0,%DCC=2,TGL=0 "RTN","ZIBGCHR",23,0) G %DO "RTN","ZIBGCHR",24,0) ; "RTN","ZIBGCHR",25,0) ; -- UNreachable code follows (?) GTH 07-06-95 "RTN","ZIBGCHR",26,0) R !,"Scroll ? ",%SC:%TMO "RTN","ZIBGCHR",27,0) G:%SC="?" %Q1 "RTN","ZIBGCHR",28,0) G:%SC="^"!('$T) %STL "RTN","ZIBGCHR",29,0) G:%SC="^Q" %END "RTN","ZIBGCHR",30,0) S:%SC="" %SC="N" "RTN","ZIBGCHR",31,0) I "Y^N"'[$E(%SC) W " 'Y' or 'N'" G %SCR "RTN","ZIBGCHR",32,0) S %SC=($E(%SC)="Y"),%PAG=20 "RTN","ZIBGCHR",33,0) %PAG ; "RTN","ZIBGCHR",34,0) G:'%SC %ASKC "RTN","ZIBGCHR",35,0) W !,"Lines/Page <",%PAG R "> ",%X:%TMO "RTN","ZIBGCHR",36,0) G:%X="^"!('$T) %SCR "RTN","ZIBGCHR",37,0) G:%X="^Q" %END "RTN","ZIBGCHR",38,0) S:%X="" %X=%PAG "RTN","ZIBGCHR",39,0) I %X'?1N.N!(%X<1) G %Q2 "RTN","ZIBGCHR",40,0) S %PAG=%X "RTN","ZIBGCHR",41,0) %ASKC ; "RTN","ZIBGCHR",42,0) R !,"Do you want to display control characters ? ",%X:%TMO "RTN","ZIBGCHR",43,0) G:%X="?" %Q3 "RTN","ZIBGCHR",44,0) G:%X="^Q" %END "RTN","ZIBGCHR",45,0) S:%X="" %X="NO" "RTN","ZIBGCHR",46,0) I %X="^"!('$T) G:%SC %PAG G:%DTY'="TRM" %STL G %SCR "RTN","ZIBGCHR",47,0) I "Y^N"'[$E(%X) W " 'Y' or 'N'" G %ASKC "RTN","ZIBGCHR",48,0) I $E(%X)="N" S %DCC=0 G %DO "RTN","ZIBGCHR",49,0) %OPT ; "RTN","ZIBGCHR",50,0) W !,"Specify one of the following:",!?5,"1. Line display",!?5,"2. Block display (with ASCII codes)" "RTN","ZIBGCHR",51,0) %OPT1 ; "RTN","ZIBGCHR",52,0) R !,"Display type <1> ",%X:%TMO "RTN","ZIBGCHR",53,0) G:%X="?" %HELP "RTN","ZIBGCHR",54,0) G:%X="^"!('$T) %ASKC "RTN","ZIBGCHR",55,0) G:%X="^Q" %END "RTN","ZIBGCHR",56,0) S:%X="" %X=1 "RTN","ZIBGCHR",57,0) I %X'=1,%X'=2 G %OPT "RTN","ZIBGCHR",58,0) S %DCC=%X "RTN","ZIBGCHR",59,0) %DO ; "RTN","ZIBGCHR",60,0) D %START "RTN","ZIBGCHR",61,0) C:IO'=%TRM IO "RTN","ZIBGCHR",62,0) G %END "RTN","ZIBGCHR",63,0) ; "RTN","ZIBGCHR",64,0) %START ; "RTN","ZIBGCHR",65,0) S %NCR=%LN-5,%BAR="\" "RTN","ZIBGCHR",66,0) ;D ^%GSEL ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",67,0) I $ZV["MSM" D ^%GSEL ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",68,0) I $ZV["Cache" D ^%GSET ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",69,0) S (%GL,%GN)="",%LIN=0 "RTN","ZIBGCHR",70,0) ;I $ZS(^UTILITY($J,%GL))="" Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",71,0) I $O(^UTILITY($J,%GL))="" Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",72,0) U IO "RTN","ZIBGCHR",73,0) D %GET "RTN","ZIBGCHR",74,0) S %LC=1 "RTN","ZIBGCHR",75,0) D %LIN "RTN","ZIBGCHR",76,0) W # "RTN","ZIBGCHR",77,0) U IO "RTN","ZIBGCHR",78,0) G %START "RTN","ZIBGCHR",79,0) ; "RTN","ZIBGCHR",80,0) %GET ; "RTN","ZIBGCHR",81,0) KILL %DX,%CK,FLG "RTN","ZIBGCHR",82,0) ;S %GN=$ZS(^UTILITY($J,%GN)) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",83,0) S %GN=$O(^UTILITY($J,%GN)) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",84,0) Q:%GN="" "RTN","ZIBGCHR",85,0) S GLREF=^UTILITY($J,%GN) "RTN","ZIBGCHR",86,0) I GLREF="" S %CK="" G %WT "RTN","ZIBGCHR",87,0) D %START^%GL1 "RTN","ZIBGCHR",88,0) Q "RTN","ZIBGCHR",89,0) ; "RTN","ZIBGCHR",90,0) %WT ; "RTN","ZIBGCHR",91,0) S %GL="^"_%GN "RTN","ZIBGCHR",92,0) S %LC=2 "RTN","ZIBGCHR",93,0) D %LIN "RTN","ZIBGCHR",94,0) W %GL "RTN","ZIBGCHR",95,0) I $D(@%GL)#2 S IN=@%GL I IN]"" W " = " D %OUT "RTN","ZIBGCHR",96,0) S %LC=1 "RTN","ZIBGCHR",97,0) D %LIN "RTN","ZIBGCHR",98,0) S %GL=%GL_"("""")" "RTN","ZIBGCHR",99,0) %NEXT ; "RTN","ZIBGCHR",100,0) ;S %GL=$ZN(@%GL) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",101,0) S %GL=$Q(@%GL) ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",102,0) ;G:%GL=-1 IHS3 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",103,0) G:%GL="" IHS3 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGCHR",104,0) S IN=@%GL "RTN","ZIBGCHR",105,0) I IN?.E1C.E S TGL=TGL+1 W %GL," = " D %OUT "RTN","ZIBGCHR",106,0) IHS2 ; "RTN","ZIBGCHR",107,0) G %NEXT "RTN","ZIBGCHR",108,0) ; "RTN","ZIBGCHR",109,0) IHS3 ; "RTN","ZIBGCHR",110,0) U IO "RTN","ZIBGCHR",111,0) W !!,"TOTAL CORRUPT GLOBALS FOUND: ",TGL "RTN","ZIBGCHR",112,0) D PAUSE^XB "RTN","ZIBGCHR",113,0) S TGL=0 "RTN","ZIBGCHR",114,0) G %GET "RTN","ZIBGCHR",115,0) ; "RTN","ZIBGCHR",116,0) %OUT ; "RTN","ZIBGCHR",117,0) I '(IN?.E1C.E) G %OUT1 "RTN","ZIBGCHR",118,0) D:%DCC=1 %DSP1 "RTN","ZIBGCHR",119,0) D:%DCC=2 %DSP2 "RTN","ZIBGCHR",120,0) %OUT1 ; "RTN","ZIBGCHR",121,0) S %LC=1 "RTN","ZIBGCHR",122,0) D %LIN "RTN","ZIBGCHR",123,0) Q "RTN","ZIBGCHR",124,0) ; "RTN","ZIBGCHR",125,0) %DSP1 ; "RTN","ZIBGCHR",126,0) F I=1:1:$L(IN) S %CHR=$E(IN,I) D %WRT "RTN","ZIBGCHR",127,0) Q "RTN","ZIBGCHR",128,0) ; "RTN","ZIBGCHR",129,0) %WRT ; "RTN","ZIBGCHR",130,0) I $A(%CHR)<32 W %BAR Q "RTN","ZIBGCHR",131,0) I $A(%CHR)=92 W "\\" Q "RTN","ZIBGCHR",132,0) W %CHR "RTN","ZIBGCHR",133,0) Q "RTN","ZIBGCHR",134,0) ; "RTN","ZIBGCHR",135,0) %DSP2 ; "RTN","ZIBGCHR",136,0) F I=1:1:4 S A(I)="" "RTN","ZIBGCHR",137,0) F I=1:1:$L(IN) S %CHR=$E(IN,I) D:$A(%CHR)<32 %CTL D:$A(%CHR)'<32 %NML "RTN","ZIBGCHR",138,0) S %FCR=1,%NLN=($L(IN)-1)\%NCR+1 "RTN","ZIBGCHR",139,0) F I=1:1:%NLN S %LCR=%FCR+%NCR-1 D %LST "RTN","ZIBGCHR",140,0) Q "RTN","ZIBGCHR",141,0) ; "RTN","ZIBGCHR",142,0) %CTL ; "RTN","ZIBGCHR",143,0) S A(1)=A(1)_%BAR "RTN","ZIBGCHR",144,0) D %FIXO "RTN","ZIBGCHR",145,0) F K=2:1:4 S A(K)=A(K)_$E(%ASCII,K-1) "RTN","ZIBGCHR",146,0) Q "RTN","ZIBGCHR",147,0) ; "RTN","ZIBGCHR",148,0) %NML ; "RTN","ZIBGCHR",149,0) S A(1)=A(1)_%CHR "RTN","ZIBGCHR",150,0) D %FIXO "RTN","ZIBGCHR",151,0) F K=2:1:4 S A(K)=A(K)_$E(%ASCII,K-1) "RTN","ZIBGCHR",152,0) Q "RTN","ZIBGCHR",153,0) ; "RTN","ZIBGCHR",154,0) %FIXO ; "RTN","ZIBGCHR",155,0) S %ALN=3-$L($A(%CHR)),%ASCII=$A(%CHR) "RTN","ZIBGCHR",156,0) F M=1:1:%ALN S %ASCII="0"_%ASCII "RTN","ZIBGCHR",157,0) KILL %ALN "RTN","ZIBGCHR",158,0) Q "RTN","ZIBGCHR",159,0) ; "RTN","ZIBGCHR",160,0) %LST ; "RTN","ZIBGCHR",161,0) I $D(%SC) D:%LIN+4>%PAG %SC "RTN","ZIBGCHR",162,0) F %J=1:1:4 S %LC=1 D %LIN W ?3,$E(A(%J),%FCR,%LCR) "RTN","ZIBGCHR",163,0) S %LC=1 "RTN","ZIBGCHR",164,0) D %LIN "RTN","ZIBGCHR",165,0) S %FCR=%LCR+1 "RTN","ZIBGCHR",166,0) Q "RTN","ZIBGCHR",167,0) ; "RTN","ZIBGCHR",168,0) %LIN ; "RTN","ZIBGCHR",169,0) I $D(%SC) D:%LIN+%LC>%PAG %SC S %LIN=%LIN+%LC "RTN","ZIBGCHR",170,0) F %K=1:1:%LC W ! "RTN","ZIBGCHR",171,0) Q "RTN","ZIBGCHR",172,0) ; "RTN","ZIBGCHR",173,0) %SC ; "RTN","ZIBGCHR",174,0) U 0 "RTN","ZIBGCHR",175,0) R !,"Type to continue",%X:60 "RTN","ZIBGCHR",176,0) S:'$T %X="^" "RTN","ZIBGCHR",177,0) U IO "RTN","ZIBGCHR",178,0) S %LIN=0 "RTN","ZIBGCHR",179,0) Q "RTN","ZIBGCHR",180,0) ; "RTN","ZIBGCHR",181,0) %HELP ; "RTN","ZIBGCHR",182,0) W !!?5,"Enter '1' to display control characters as ""\""." "RTN","ZIBGCHR",183,0) W !?5,"Enter '2' to also display the ASCII code below each character." "RTN","ZIBGCHR",184,0) W !?8,"Example: ^AA(""1"",""3"",""5"") =" "RTN","ZIBGCHR",185,0) W !?22,"AB\C\\DEF",!?22,"000000000",!?22,"661612667",!?22,"562773890" "RTN","ZIBGCHR",186,0) D %EX "RTN","ZIBGCHR",187,0) G %OPT1 "RTN","ZIBGCHR",188,0) ; "RTN","ZIBGCHR",189,0) %Q1 ; "RTN","ZIBGCHR",190,0) W !?5,"Enter Y(ES) to specify the number of lines to be displayed per page" "RTN","ZIBGCHR",191,0) W !?8,"or N(O) to have a continuous display." "RTN","ZIBGCHR",192,0) D %EX "RTN","ZIBGCHR",193,0) G %SCR "RTN","ZIBGCHR",194,0) ; "RTN","ZIBGCHR",195,0) %Q2 ; "RTN","ZIBGCHR",196,0) W !?5,"Enter the number of lines to be displayed per page." "RTN","ZIBGCHR",197,0) W !?5,"(Should not exceed 20 lines per page for video terminals.)" "RTN","ZIBGCHR",198,0) D %EX "RTN","ZIBGCHR",199,0) G %PAG "RTN","ZIBGCHR",200,0) ; "RTN","ZIBGCHR",201,0) %Q3 ; "RTN","ZIBGCHR",202,0) W !?5,"Enter Y(ES) for special treatment of control characters upon output.",!?5,"Otherwise enter N(O)." "RTN","ZIBGCHR",203,0) D %EX "RTN","ZIBGCHR",204,0) G %ASKC "RTN","ZIBGCHR",205,0) ; "RTN","ZIBGCHR",206,0) %EX ; "RTN","ZIBGCHR",207,0) W !?5,"Enter ^ to return to the previous question,",!?8,"or ^Q to exit the routine." "RTN","ZIBGCHR",208,0) Q "RTN","ZIBGCHR",209,0) ; "RTN","ZIBGCHR",210,0) %ERR ; "RTN","ZIBGCHR",211,0) U 0 "RTN","ZIBGCHR",212,0) I $ZE?1"" "RTN","ZIBGSVED",71,0) F L=1:1:150 U IO X ^%ZOSF("MTBOT") G:Y GOODREW U IO(0) W "." H 2 "RTN","ZIBGSVED",72,0) S XBFLG=-1,XBFLG(1)="Tape not rewound" "RTN","ZIBGSVED",73,0) U IO(0) "RTN","ZIBGSVED",74,0) W !!,XBFLG(1),*7 "RTN","ZIBGSVED",75,0) G CLOSE "RTN","ZIBGSVED",76,0) ; "RTN","ZIBGSVED",77,0) GOODREW ; "RTN","ZIBGSVED",78,0) U IO(0) "RTN","ZIBGSVED",79,0) W !!,"Remove the tape... Press RETURN when Ready:" "RTN","ZIBGSVED",80,0) R X:DTIME "RTN","ZIBGSVED",81,0) CLOSE ; "RTN","ZIBGSVED",82,0) D ^%ZISC "RTN","ZIBGSVED",83,0) U IO(0) "RTN","ZIBGSVED",84,0) END ; "RTN","ZIBGSVED",85,0) KILL XBMSG,%MT "RTN","ZIBGSVED",86,0) Q "RTN","ZIBGSVED",87,0) ; "RTN","ZIBGSVED",88,0) SAVEDSM ; "RTN","ZIBGSVED",89,0) W XBDT "RTN","ZIBGSVED",90,0) W:XBPAR'["V" ! "RTN","ZIBGSVED",91,0) W XBTLE "RTN","ZIBGSVED",92,0) W:XBPAR'["V" ! "RTN","ZIBGSVED",93,0) S X=XBGL_XBF_")" "RTN","ZIBGSVED",94,0) F S X=$Q(@X) Q:X="" Q:(XBE]"")&($P($P(X,"(",2),",")>XBE) S Y=X S:$E(Y,2)="[" Y=U_$P(Y,"]",2,999) W Y W:XBPAR'["V" ! W @X W:XBPAR'["V" ! "RTN","ZIBGSVED",95,0) W "**END**" W:XBPAR'["V" ! "RTN","ZIBGSVED",96,0) W "**END**" W:XBPAR'["V" ! "RTN","ZIBGSVED",97,0) Q "RTN","ZIBGSVED",98,0) ; "RTN","ZIBGSVEM") 0^204^B35986084 "RTN","ZIBGSVEM",1,0) ZIBGSVEM ; IHS/ADC/GTH - SAVE GLOBAL TO MSM UNIX ; [ 09/14/2004 4:57 PM ] "RTN","ZIBGSVEM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBGSVEM",3,0) ; "RTN","ZIBGSVEM",4,0) ;I ^%ZOSF("OS")["PC"!(^%ZOSF("OS")["Windows NT")!($P($G(^AUTTSITE(1,0)),U,21)=2) G ^ZIBGSVEP ;COMMENTED OUT AND REPLACE BY NEXT LINE - AEF/08/08/03 "RTN","ZIBGSVEM",5,0) I $$VERSION^%ZOSV(1)["Windows" G ^ZIBGSVEP ;XB*3*10 TASSC/MFD 8/15/03 "RTN","ZIBGSVEM",6,0) G:$D(XBMED) NOSELT "RTN","ZIBGSVEM",7,0) ASK ; "RTN","ZIBGSVEM",8,0) R !!,"Copy transaction file to ('^' TO EXIT WITHOUT SAVING)",!!?10,"[T]ape, [C]artridge, [D]iskette, or [F]ile F// ",XBMED:DTIME "RTN","ZIBGSVEM",9,0) S XBMED=$$UP^XLFSTR($E(XBMED_"F")) "RTN","ZIBGSVEM",10,0) I U[XBMED S XBFLG(1)="Job Terminated by Operator at Device Select",XBFLG=-1 G END "RTN","ZIBGSVEM",11,0) G HELP:"?"[XBMED,ASK:'("CDFT"[XBMED) "RTN","ZIBGSVEM",12,0) NOSELT ; "RTN","ZIBGSVEM",13,0) S (IO,XBZDEV)=XBIO "RTN","ZIBGSVEM",14,0) D TAPE:"T"[XBMED,CART:"C"[XBMED,DISK:"D"[XBMED,UNIX:"F"[XBMED "RTN","ZIBGSVEM",15,0) Q "RTN","ZIBGSVEM",16,0) ; "RTN","ZIBGSVEM",17,0) HELP ; "RTN","ZIBGSVEM",18,0) W !!,"This option saves the ' ",XBNAR," ",XBGL,"' transaction file to either a tape,",!,"a floppy diskette, or a Unix file. The default is to a unix file",!,"in the ",XBUF," directory." "RTN","ZIBGSVEM",19,0) W !,"Enter either a ""C"" for tape cartridge, a ""T"" for 9-track tape, a ""D"" for floppy disk, or an ""F"" for Unix file." "RTN","ZIBGSVEM",20,0) G ASK "RTN","ZIBGSVEM",21,0) ; "RTN","ZIBGSVEM",22,0) DISK ; ----- Transfer TX Global to floppy disk. "RTN","ZIBGSVEM",23,0) U IO(0) "RTN","ZIBGSVEM",24,0) W !!,"Mount a FORMATTED Floppy Diskette, 'WRITE ENABLED' ",*7,!,"Press RETURN When Ready or ""^"" to Exit WITHOUT SAVING " "RTN","ZIBGSVEM",25,0) R X:DTIME "RTN","ZIBGSVEM",26,0) I X[U!('$T) S XBFLG(1)="Job Aborted by Operator During Floppy Mount",XBFLG=-1 G END "RTN","ZIBGSVEM",27,0) I $$OPEN^%ZISH("/dev/","fd0","W") S XBERRMSG="Floppy Disk" G ERRMESS "RTN","ZIBGSVEM",28,0) U IO "RTN","ZIBGSVEM",29,0) I $$STATUS^%ZISH U IO(0) W !!,"Please",*7 G DISK "RTN","ZIBGSVEM",30,0) U IO(0) "RTN","ZIBGSVEM",31,0) W !,"Please Standby - Copying Data to Floppy",! "RTN","ZIBGSVEM",32,0) U IO "RTN","ZIBGSVEM",33,0) D SAVEMSM "RTN","ZIBGSVEM",34,0) D ^%ZISC "RTN","ZIBGSVEM",35,0) U IO(0) "RTN","ZIBGSVEM",36,0) R !!,"Remove the Floppy... Press RETURN when Ready:",X:DTIME "RTN","ZIBGSVEM",37,0) G END "RTN","ZIBGSVEM",38,0) ; "RTN","ZIBGSVEM",39,0) UNIX ; ----- Transfer TX Global to unix file. "RTN","ZIBGSVEM",40,0) S XBPRE=$E(XBGL,2,5),XBASUFAC=$S('$D(XBSUFAC):$P(^AUTTLOC(DUZ(2),0),U,10),1:XBSUFAC) "RTN","ZIBGSVEM",41,0) S XBFN=$S('$D(XBFN):XBPRE_XBASUFAC_"."_XBCARTNO,1:XBFN) "RTN","ZIBGSVEM",42,0) S XBTEMPFN=XBUF_"/"_XBFN "RTN","ZIBGSVEM",43,0) S XBPAFN=XBTEMPFN "RTN","ZIBGSVEM",44,0) S %=$$OPEN^%ZISH(XBUF_"/",XBFN,"W") "RTN","ZIBGSVEM",45,0) I % S XBERRMSG=$S(%=1:"All Host File Servers Busy!",1:"UNIX File") G ERRMESS "RTN","ZIBGSVEM",46,0) I '$D(ZTQUEUED) U IO(0) W !,"Please Standby - Copying Data to UNIX File ",XBTEMPFN,! "RTN","ZIBGSVEM",47,0) S X=$$JOBWAIT^%HOSTCMD("chmod 666 "_XBUF_"/"_XBFN) "RTN","ZIBGSVEM",48,0) U IO "RTN","ZIBGSVEM",49,0) D SAVEMSM "RTN","ZIBGSVEM",50,0) G CLOSE "RTN","ZIBGSVEM",51,0) ; "RTN","ZIBGSVEM",52,0) TAPE ; "RTN","ZIBGSVEM",53,0) S XBDEV="rmt0",XBMSG="9-Track" "RTN","ZIBGSVEM",54,0) G TAPETST "RTN","ZIBGSVEM",55,0) CART ; "RTN","ZIBGSVEM",56,0) S XBDEV="rct",XBMSG="Cartridge" "RTN","ZIBGSVEM",57,0) ; "RTN","ZIBGSVEM",58,0) TAPETST ; ----- Transfer global to cartridge or 9-track. "RTN","ZIBGSVEM",59,0) W !,"Do you want to test the ",XBMSG," DRIVE? (Y/N) Y//" "RTN","ZIBGSVEM",60,0) R Y:DTIME "RTN","ZIBGSVEM",61,0) S Y=$E(Y_"Y") "RTN","ZIBGSVEM",62,0) I "Yy"[Y D TAPETEST G:$D(XBFLG) CLOSE I Y[U S XBFLG(1)="Job Aborted by Operator During Tape Test",XBFLG=-1 G END "RTN","ZIBGSVEM",63,0) S ; "RTN","ZIBGSVEM",64,0) U IO(0) "RTN","ZIBGSVEM",65,0) W !!,"Mount ",XBMSG," Tape, 'WRITE ENABLED' ",*7 "RTN","ZIBGSVEM",66,0) R !,"Press RETURN When Ready - ""^"" to Exit ",X:DTIME "RTN","ZIBGSVEM",67,0) I X[U S XBFLG(1)="Job Terminated By Operator at Mount Message",XBFLG=-1 G CLOSE "RTN","ZIBGSVEM",68,0) MAGOPEN ; "RTN","ZIBGSVEM",69,0) I $$OPEN^%ZISH("/dev/",XBDEV,"W") S XBERRMSG="Magtape Device" G ERRMESS "RTN","ZIBGSVEM",70,0) U IO "RTN","ZIBGSVEM",71,0) I $$STATUS^%ZISH U IO(0) W !!,"Please",*7 G S "RTN","ZIBGSVEM",72,0) U IO(0) "RTN","ZIBGSVEM",73,0) W !,"Please Standby - Copying Data to Tape",! "RTN","ZIBGSVEM",74,0) U IO "RTN","ZIBGSVEM",75,0) D SAVEMSM "RTN","ZIBGSVEM",76,0) G EXIT "RTN","ZIBGSVEM",77,0) ; "RTN","ZIBGSVEM",78,0) SW ; "RTN","ZIBGSVEM",79,0) U IO(0) "RTN","ZIBGSVEM",80,0) W *7,!!," The Tape Is WRITE PROTECTED. Please Remove The Tape," "RTN","ZIBGSVEM",81,0) W !," And Re-position The Write Protect/Enable Switch.",!," " "RTN","ZIBGSVEM",82,0) G MAGOPEN "RTN","ZIBGSVEM",83,0) ; "RTN","ZIBGSVEM",84,0) ERRMESS ; "RTN","ZIBGSVEM",85,0) S XBFLG(1)=XBERRMSG_" Not Available",XBFLG=-1 "RTN","ZIBGSVEM",86,0) I '$D(ZTQUEUED) U IO(0) W !,XBFLG(1) "RTN","ZIBGSVEM",87,0) G END "RTN","ZIBGSVEM",88,0) ; "RTN","ZIBGSVEM",89,0) EXIT ; "RTN","ZIBGSVEM",90,0) D ^%ZISC "RTN","ZIBGSVEM",91,0) U IO(0) "RTN","ZIBGSVEM",92,0) W !!,"Rewinding tape. ." "RTN","ZIBGSVEM",93,0) H 2 "RTN","ZIBGSVEM",94,0) W !!,"Remove the tape... Press RETURN when Ready:" "RTN","ZIBGSVEM",95,0) R X:DTIME "RTN","ZIBGSVEM",96,0) G END "RTN","ZIBGSVEM",97,0) ; "RTN","ZIBGSVEM",98,0) CLOSE ; "RTN","ZIBGSVEM",99,0) D ^%ZISC "RTN","ZIBGSVEM",100,0) END ; "RTN","ZIBGSVEM",101,0) I XBMED="F",'$D(XBFLG),XBQ="Y" D UUCPQ "RTN","ZIBGSVEM",102,0) D HOME^%ZIS "RTN","ZIBGSVEM",103,0) KILL XBPRE,XBASUFAC,XBOUTDAT,XBINDATA,XBDEV,XBMSG,XBERRMSG,XBTEMPFN,XBZDEV "RTN","ZIBGSVEM",104,0) Q "RTN","ZIBGSVEM",105,0) ; "RTN","ZIBGSVEM",106,0) TAPETEST ; "RTN","ZIBGSVEM",107,0) U IO(0) "RTN","ZIBGSVEM",108,0) W !!,"TAPE TEST...Mount ",XBMSG," Tape, 'WRITE ENABLED' ",*7 "RTN","ZIBGSVEM",109,0) R !,"TAPE TEST...Press RETURN When Ready - ""^"" to Exit ",X:DTIME "RTN","ZIBGSVEM",110,0) I X[U S XBFLG(1)="Job Aborted by Operator during Tape Test",XBFLG=-1 Q "RTN","ZIBGSVEM",111,0) W !,"TAPE TEST...Opening tape drive." "RTN","ZIBGSVEM",112,0) H 1 "RTN","ZIBGSVEM",113,0) I $$OPEN^%ZISH("/dev/",XBDEV,"W") G TESTERR "RTN","ZIBGSVEM",114,0) U IO "RTN","ZIBGSVEM",115,0) I $$STATUS^%ZISH U IO(0) W !!,"Please",*7 G TAPETEST "RTN","ZIBGSVEM",116,0) U IO(0) "RTN","ZIBGSVEM",117,0) W !,"TAPE TEST...Tape drive opened.",!,"TAPE TEST...Writing test data to tape." "RTN","ZIBGSVEM",118,0) H 1 "RTN","ZIBGSVEM",119,0) WRITE ; "RTN","ZIBGSVEM",120,0) S XBOUTDAT="TEST DATA RECORD WRITTEN TO TAPE ON "_XBDT "RTN","ZIBGSVEM",121,0) U IO "RTN","ZIBGSVEM",122,0) W XBOUTDAT,!,"**",!,"**",!! "RTN","ZIBGSVEM",123,0) U IO(0) "RTN","ZIBGSVEM",124,0) W !,"TAPE TEST...Data written." "RTN","ZIBGSVEM",125,0) D ^%ZISC "RTN","ZIBGSVEM",126,0) H 6 "RTN","ZIBGSVEM",127,0) U IO(0) "RTN","ZIBGSVEM",128,0) W !,"TAPE TEST...Reading test data from tape.",! "RTN","ZIBGSVEM",129,0) H 1 "RTN","ZIBGSVEM",130,0) I $$OPEN^%ZISH("/dev/",XBDEV,"R") G TESTERR "RTN","ZIBGSVEM",131,0) U IO "RTN","ZIBGSVEM",132,0) R XBINDATA:DTIME "RTN","ZIBGSVEM",133,0) D ^%ZISC "RTN","ZIBGSVEM",134,0) U IO(0) "RTN","ZIBGSVEM",135,0) W !,"WROTE : '",XBOUTDAT,"'",!," READ : '",XBINDATA,"'" "RTN","ZIBGSVEM",136,0) I XBINDATA=XBOUTDAT W !,"TAPE TEST...Successful." "RTN","ZIBGSVEM",137,0) E W !,"TAPE TEST...FAILED...$#@!" S XBFLG(1)="Tape Test Failed During Testing",XBFLG=-1 "RTN","ZIBGSVEM",138,0) Q "RTN","ZIBGSVEM",139,0) ; "RTN","ZIBGSVEM",140,0) TESTERR ; "RTN","ZIBGSVEM",141,0) S XBFLG(1)="Device Not Available During Tape Testing",XBFLG=-1 "RTN","ZIBGSVEM",142,0) U IO(0) "RTN","ZIBGSVEM",143,0) W !,*7,XBFLG(1),*7 "RTN","ZIBGSVEM",144,0) Q "RTN","ZIBGSVEM",145,0) ; "RTN","ZIBGSVEM",146,0) UUCPQ ;EP - auto queue to uucp subroutine, must have system id in RPMS SITE file ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGSVEM",147,0) I $$JOBWAIT^%HOSTCMD("/usr/bin/sendto "_XBQTO_" "_XBUF_"/"_XBFN) S XBFLG=-1,XBFLG(1)="Queue of File to uucp Failed" "RTN","ZIBGSVEM",148,0) E W:'$D(ZTQUEUED) !,"Export file ",XBUF,"/",XBFN," queued up to be sent to ",XBQTO,"...",! "RTN","ZIBGSVEM",149,0) Q "RTN","ZIBGSVEM",150,0) ; "RTN","ZIBGSVEM",151,0) SAVEMSM ;EP - $QUERY thru global, write to output. "RTN","ZIBGSVEM",152,0) K XBQUIT "RTN","ZIBGSVEM",153,0) I '$G(XBFLT) W XBDT,!,XBTLE,! "RTN","ZIBGSVEM",154,0) S X=XBGL_XBF_")" "RTN","ZIBGSVEM",155,0) F D Q:$G(XBQUIT) "RTN","ZIBGSVEM",156,0) .S X=$Q(@X) "RTN","ZIBGSVEM",157,0) .I X="" S XBQUIT=1 Q "RTN","ZIBGSVEM",158,0) .S Y=$P($P($P(X,")",1),"(",2),",",1) "RTN","ZIBGSVEM",159,0) .I XBE=+XBE,Y'=+Y S XBQUIT=1 Q "RTN","ZIBGSVEM",160,0) .I ($L(XBE)&($$FOLLOW(Y,XBE))) S XBQUIT=1 Q "RTN","ZIBGSVEM",161,0) .I $D(XBCON)&('(Y=+Y)) S XBQUIT=1 Q "RTN","ZIBGSVEM",162,0) .S Y=X "RTN","ZIBGSVEM",163,0) .S:$E(Y,2)="[" Y=U_$P(Y,"]",2,999) "RTN","ZIBGSVEM",164,0) .W:'$G(XBFLT) Y,! "RTN","ZIBGSVEM",165,0) .W @X,! "RTN","ZIBGSVEM",166,0) I '$G(XBFLT) W "**",!,"**",!! "RTN","ZIBGSVEM",167,0) K XBQUIT "RTN","ZIBGSVEM",168,0) Q "RTN","ZIBGSVEM",169,0) ; "RTN","ZIBGSVEM",170,0) FOLLOW(Y,XBE) ; If Y follows XBE return 1. Else return 0. "RTN","ZIBGSVEM",171,0) N Z "RTN","ZIBGSVEM",172,0) I '(Y=+Y) D "RTN","ZIBGSVEM",173,0) .S Z=(Y]XBE) "RTN","ZIBGSVEM",174,0) I Y=+Y D "RTN","ZIBGSVEM",175,0) .S Z=(Y>XBE) "RTN","ZIBGSVEM",176,0) Q Z "RTN","ZIBGSVEM",177,0) ; "RTN","ZIBGSVEP") 0^205^B13215982 "RTN","ZIBGSVEP",1,0) ZIBGSVEP ; IHS/ADC/GTH - SAVE GLOBAL TO DOS MEDIA ; [ 07/21/2005 3:22 PM ] "RTN","ZIBGSVEP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBGSVEP",3,0) ; XB*3*8 - IHS/ASDST/GTH - 12-07-00 - Protect U IO(0) and WRITE's in background. "RTN","ZIBGSVEP",4,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache', NT, and system mods. "RTN","ZIBGSVEP",5,0) ; "RTN","ZIBGSVEP",6,0) ;S XBUF=$S($P($G(^AUTTSITE(1,1)),U,2)]"":$P(^AUTTSITE(1,1),U,2),1:"C:\EXPORT") ;LINE COMMENTED OUT AND REPLACED BY NEXT LINE - AEF/08/08/03 "RTN","ZIBGSVEP",7,0) ;S:'$G(XBUF) XBUF=$S($P($G(^AUTTSITE(1,1)),U,2)]"":$P(^AUTTSITE(1,1),U,2),1:"C:\EXPORT") ;XB*3*10 "RTN","ZIBGSVEP",8,0) G:$D(XBMED) NOSELT "RTN","ZIBGSVEP",9,0) ASK ; "RTN","ZIBGSVEP",10,0) R !!,"Copy transaction file to ('^' TO EXIT WITHOUT SAVING)",!!?10,"[D]iskette, or [F]ile F// ",XBMED:DTIME "RTN","ZIBGSVEP",11,0) S XBMED=$$UP^XLFSTR($E(XBMED_"F")) "RTN","ZIBGSVEP",12,0) I U[XBMED S XBFLG(1)="Job Terminated by Operator at Device Select",XBFLG=-1 G END "RTN","ZIBGSVEP",13,0) G HELP:"?"[XBMED,ASK:"DF"'[XBMED "RTN","ZIBGSVEP",14,0) NOSELT ; "RTN","ZIBGSVEP",15,0) S IO=XBIO "RTN","ZIBGSVEP",16,0) D DISK:"D"[XBMED,DOS:"F"[XBMED "RTN","ZIBGSVEP",17,0) Q "RTN","ZIBGSVEP",18,0) ; "RTN","ZIBGSVEP",19,0) HELP ; "RTN","ZIBGSVEP",20,0) W !!,"This option saves the ' ",XBNAR," ",XBGL,"' transaction file to either a floppy",!,"diskette, or a Dos file on the Hard Disk. The default is to a Dos file",!,"in the ",XBUF," directory." "RTN","ZIBGSVEP",21,0) W !,"Enter either a ""D"" for floppy disk, or an ""F"" for Dos file." "RTN","ZIBGSVEP",22,0) G ASK "RTN","ZIBGSVEP",23,0) ; "RTN","ZIBGSVEP",24,0) DISK ;TRANSFER TX GLOBAL TO FLOPPY DISK "RTN","ZIBGSVEP",25,0) F R !,"Select the drive (A,B,C): B//",Y:DTIME S Y=$$UP^XLFSTR($E(Y_"B")) Q:"ABC"[Y W:'(U[Y) " ??" I U[Y!('$T) S XBFLG(1)="Abort at drive select",XBFLG=-1 G END "RTN","ZIBGSVEP",26,0) S XBUF=Y_":" "RTN","ZIBGSVEP",27,0) W !!,"Insert a FORMATTED Floppy Diskette into drive '",XBUF,"', 'WRITE ENABLED' ",*7,!,"Press RETURN When Ready or ""^"" to Exit WITHOUT SAVING " "RTN","ZIBGSVEP",28,0) R X:DTIME "RTN","ZIBGSVEP",29,0) I X[U!('$T) S XBFLG(1)="Job Aborted by Operator During Floppy Mount",XBFLG=-1 G END "RTN","ZIBGSVEP",30,0) DOS ;TRANSFER TX GLOBAL TO DOS FILE. "RTN","ZIBGSVEP",31,0) I '$D(ZTQUEUED) U IO(0) W !!,"DOS File Being Created' ",*7 "RTN","ZIBGSVEP",32,0) I '$D(XBFN) D "RTN","ZIBGSVEP",33,0) .; if you're on NT put the full location code to be compatible with "RTN","ZIBGSVEP",34,0) .; area unix boxes "RTN","ZIBGSVEP",35,0) .;I ^%ZOSF("OS")["Windows NT" S X2=$E(DT,1,3)_"0101",X1=DT D ^%DTC S X=X+1,XBFN=$E(XBGL,2,5)_$P(^AUTTLOC(DUZ(2),0),U,10)_"."_X Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGSVEP",36,0) .I ^%ZOSF("OS")["NT" S X2=$E(DT,1,3)_"0101",X1=DT D ^%DTC S X=X+1,XBFN=$E(XBGL,2,5)_$P(^AUTTLOC(DUZ(2),0),U,10)_"."_X Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGSVEP",37,0) .S X2=$E(DT,1,3)_"0101",X1=DT D ^%DTC S X=X+1,XBFN=$E(XBGL,2,5)_$E($P(^AUTTLOC(DUZ(2),0),U,10),3,6)_"."_X "RTN","ZIBGSVEP",38,0) S XBPAFN=XBUF_"\"_XBFN "RTN","ZIBGSVEP",39,0) I $$OPEN^%ZISH(XBUF_"\",XBFN,"W") S XBERRMSG="DOS File" G ERRMESS "RTN","ZIBGSVEP",40,0) ; U IO(0) ; XB*3*8 "RTN","ZIBGSVEP",41,0) I '$D(ZTQUEUED) U IO(0) ; XB*3*8 "RTN","ZIBGSVEP",42,0) ; W !,"Please Standby - Copying Data to DOS File ",XBUF,"\",XBFN ; XB*3*8 "RTN","ZIBGSVEP",43,0) I '$D(ZTQUEUED) W !,"Please Standby - Copying Data to DOS File ",XBUF,"\",XBFN ; XB*3*8 "RTN","ZIBGSVEP",44,0) U IO "RTN","ZIBGSVEP",45,0) D SAVEMSM^ZIBGSVEM "RTN","ZIBGSVEP",46,0) G END "RTN","ZIBGSVEP",47,0) ; "RTN","ZIBGSVEP",48,0) UUCPQ ;EP - auto queue to sendto and ftp, must have system id in RPMS SITE file ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGSVEP",49,0) I $$JOBWAIT^%HOSTCMD("sendto "_XBQTO_" "_XBUF_"\"_XBFN) S XBFLG=-1,XBFLG(1)="Queue of File to uucp Failed" "RTN","ZIBGSVEP",50,0) ; E W:'$D(ZTQUEUED) !,"Export file ",XBUF,"/",XBFN," queued up to be sent to ",XBQTO,"...",! ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBGSVEP",51,0) ;E W:'$D(ZTQUEUED) !,"Export file ",XBUF,"\",XBFN," queued up to be sent to ",XBQTO,"...",! ; IHS/SET/GTH XB*3*9 10/29/2002 ;LINE COMMENTED OUT AND REPLACED BY NEXT LINE - AEF/08/08/03 "RTN","ZIBGSVEP",52,0) E I '$D(ZTQUEUED) U IO(0) W !!,"Export file ",XBUF,"\",XBFN," queued up to be sent to ",XBQTO,"...",! ;XB*3*10 "RTN","ZIBGSVEP",53,0) Q "RTN","ZIBGSVEP",54,0) ; "RTN","ZIBGSVEP",55,0) ERRMESS ; "RTN","ZIBGSVEP",56,0) S XBFLG(1)=XBERRMSG_" Not Available",XBFLG=-1 "RTN","ZIBGSVEP",57,0) ; U IO(0) ; XB*3*8 "RTN","ZIBGSVEP",58,0) ; W !,XBFLG(1) ; XB*3*8 "RTN","ZIBGSVEP",59,0) I '$D(ZTQUEUED) U IO(0) W !,XBFLG(1) ; XB*3*8 "RTN","ZIBGSVEP",60,0) END ; "RTN","ZIBGSVEP",61,0) ; I '$D(AUFLG),$P(^AUTTSITE(1,0),"^",14)]"" D UUCPQ ;IHS/MFD added line ; XB*3*8 "RTN","ZIBGSVEP",62,0) I '$D(XBFLG),XBQ="Y" D UUCPQ ; XB*3*8 "RTN","ZIBGSVEP",63,0) D ^%ZISC,HOME^%ZIS "RTN","ZIBGSVEP",64,0) KILL XBERRMSG "RTN","ZIBGSVEP",65,0) Q "RTN","ZIBNSSV") 0^206^B3627616 "RTN","ZIBNSSV",1,0) ZIBNSSV ; IHS/ADC/GTH - NONSTANDARD SPECIAL VARIABLES ; [ 10/29/2002 7:42 AM ] "RTN","ZIBNSSV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBNSSV",3,0) ; XB*3*8 - IHS/ASDST/GTH - Correct parsing for MSM Windows. "RTN","ZIBNSSV",4,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBNSSV",5,0) ; "RTN","ZIBNSSV",6,0) ; Return Non-Standard ($Z) Special Variables. "RTN","ZIBNSSV",7,0) ; "RTN","ZIBNSSV",8,0) ; E.g.: "RTN","ZIBNSSV",9,0) ; W $$Z^ZIBNSSV("ERROR") "RTN","ZIBNSSV",10,0) ; will write the contents of the error message most recently "RTN","ZIBNSSV",11,0) ; produced by the OS. "RTN","ZIBNSSV",12,0) ; "RTN","ZIBNSSV",13,0) ; These are the variables supported: "RTN","ZIBNSSV",14,0) ; "RTN","ZIBNSSV",15,0) ; ERROR : Text of error message most recently produced. "RTN","ZIBNSSV",16,0) ; LEVEL : Number of the current nesting level. "RTN","ZIBNSSV",17,0) ; NAME : Name of routine currently loaded in memory. "RTN","ZIBNSSV",18,0) ; ORDER : Data value of the next global node that follows "RTN","ZIBNSSV",19,0) ; the current global reference. "RTN","ZIBNSSV",20,0) ; TRAP : Line label and routine name of the program that "RTN","ZIBNSSV",21,0) ; is to receive control when an error occurs. "RTN","ZIBNSSV",22,0) ; VERSION : Name and release of M implementation. "RTN","ZIBNSSV",23,0) ; "RTN","ZIBNSSV",24,0) Z(NSSV) ;PEP - Return Non-Standard ($Z) Special Variables. "RTN","ZIBNSSV",25,0) I '$L($G(NSSV)) Q "NONSTANDARD SPECIAL VAR NOT SPECIFIED." "RTN","ZIBNSSV",26,0) I '$F("ERROR^LEVEL^NAME^ORDER^TRAP^VERSION",NSSV) Q "NONSTANDARD SPECIAL VAR '"_NSSV_"' NOT SUPPORTED." "RTN","ZIBNSSV",27,0) NEW O "RTN","ZIBNSSV",28,0) ; S O=$P($G(^%ZOSF("OS")),"-",1) ; XB*3*8 - IHS/ASDST/GTH "RTN","ZIBNSSV",29,0) ;S O=$S($P($G(^%ZOSF("OS")),"^",1)["MSM":"MSM",1:"") ; XB*3*8 - IHS/ASDST/GTH;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBNSSV",30,0) S O=$S($P($G(^%ZOSF("OS")),"^",1)["MSM":"MSM",^%ZOSF("OS")["OpenM":"CACHE",1:"") ; XB*3*8 - IHS/ASDST/GTH ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBNSSV",31,0) ;I '$L($T(@(O))) Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBNSSV",32,0) I '$L(O) Q "OPERATING SYSTEM '"_^%ZOSF("OS")_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBNSSV",33,0) G @(O) "RTN","ZIBNSSV",34,0) ; "RTN","ZIBNSSV",35,0) MSM ; Micronetics specific Non-Standard Special Variables. "RTN","ZIBNSSV",36,0) NEW MSMSV "RTN","ZIBNSSV",37,0) S MSMSV="MSMZ"_$E(NSSV) "RTN","ZIBNSSV",38,0) I '$L($T(@MSMSV)) Q "Micronetics VALUE FOR '"_NSSV_"' NOT SUPPORTED." "RTN","ZIBNSSV",39,0) G @(MSMSV) "RTN","ZIBNSSV",40,0) ; "RTN","ZIBNSSV",41,0) MSMZE Q $ZE "RTN","ZIBNSSV",42,0) MSMZL Q $ZL "RTN","ZIBNSSV",43,0) MSMZN Q $ZN "RTN","ZIBNSSV",44,0) MSMZO Q $ZO "RTN","ZIBNSSV",45,0) MSMZR() ;PEP - MSM's last global reference. "RTN","ZIBNSSV",46,0) ; Going thru the "Z" entry point will re-set the global reference! "RTN","ZIBNSSV",47,0) Q $ZR "RTN","ZIBNSSV",48,0) MSMZT Q $ZT "RTN","ZIBNSSV",49,0) MSMZV Q $ZV "RTN","ZIBNSSV",50,0) ; "RTN","ZIBNSSV",51,0) ;Begin New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBNSSV",52,0) CACHE ; "RTN","ZIBNSSV",53,0) NEW % "RTN","ZIBNSSV",54,0) S %="CACHEZ"_$E(NSSV) "RTN","ZIBNSSV",55,0) I '$L($T(@%)) Q "Cache' VALUE FOR '"_NSSV_"' NOT SUPPORTED." "RTN","ZIBNSSV",56,0) G @(%) "RTN","ZIBNSSV",57,0) ; "RTN","ZIBNSSV",58,0) CACHEZE Q $ZE "RTN","ZIBNSSV",59,0) CACHEZN Q $ZN "RTN","ZIBNSSV",60,0) CACHEZO Q $ZO "RTN","ZIBNSSV",61,0) CACHEZT Q $ZT "RTN","ZIBNSSV",62,0) CACHEZV Q $ZV "RTN","ZIBNSSV",63,0) ;End New Code;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBPKGF") 0^207^B23500682 "RTN","ZIBPKGF",1,0) ZIBPKGF ; IHS/ADC/GTH - INSTALLATION STATUS REPORT ; [ 02/07/97 3:02 PM ] "RTN","ZIBPKGF",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBPKGF",3,0) ; "RTN","ZIBPKGF",4,0) W !!,"EXECUTION UNAUTHORIZED.",! "RTN","ZIBPKGF",5,0) Q "RTN","ZIBPKGF",6,0) ; "RTN","ZIBPKGF",7,0) Q2 ;EP - From DIR "RTN","ZIBPKGF",8,0) W ! F %=2:1:7 W $P($T(Q2+%),";;",2),! "RTN","ZIBPKGF",9,0) ;; This utility reads thru the PACKAGE file for versions and "RTN","ZIBPKGF",10,0) ;; dates of installed packages, writes the info to a file, "RTN","ZIBPKGF",11,0) ;; and uucp's the file to the area machine and/or a central "RTN","ZIBPKGF",12,0) ;; machine, probably cmbsyb. The info sent to cmbsyb will "RTN","ZIBPKGF",13,0) ;; be copied to MailMan for auto processing into the "RTN","ZIBPKGF",14,0) ;; Application Implementation Status options. "RTN","ZIBPKGF",15,0) Q "RTN","ZIBPKGF",16,0) ; "RTN","ZIBPKGF",17,0) ; cmbsyb Any Timeplex 9600 .30-30 n:--n:--n: uucpb word: 10sne1 "RTN","ZIBPKGF",18,0) ; cmbsyb Any ACU 2400 FTS-505-262-6166 n:--n:--n: uucpb word: 10sne1 "RTN","ZIBPKGF",19,0) ; dpssyg Any Timeplex 9600 .00-15 n:--n:--n: uucpdps word: uucpdps "RTN","ZIBPKGF",20,0) ; dpssyg Any ACU2400 FTS-505-262-6250 n:--n:--n: uucpdps word: uucpdps "RTN","ZIBPKGF",21,0) ; "RTN","ZIBPKGF",22,0) OPT ;EP - Set option in OPTION file. "RTN","ZIBPKGF",23,0) I $P(^%ZOSF("OS"),"^")'="MSM-UNIX" W !!,"SORRY. MSM-UNIX only.",! Q "RTN","ZIBPKGF",24,0) I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q "RTN","ZIBPKGF",25,0) D HOME^%ZIS,DT^DICRW,00:'$L($P(^AUTTSITE(1,0),U,14)),Q2 "RTN","ZIBPKGF",26,0) NEW DA,DIC,DIE,DIR,DR "RTN","ZIBPKGF",27,0) S Y=1,%="Enter a number to choose the systems to which you want this report sent" "RTN","ZIBPKGF",28,0) I $L($P(^AUTTSITE(1,0),U,14)) S DIR(0)="N^1:3:0",DIR("A")="Send reports to (1) "_$P($T(SYTM),";;",2)_" (2) "_$P(^(0),U,14)_" or (3) both",DIR("B")=3,DIR("?")=%,DIR("??")="^D Q2^ZIBPKGF" D ^DIR Q:$D(DIRUT) "RTN","ZIBPKGF",29,0) S DIC="^DIC(19,",DIC(0)="",X="ZIB INSTALLATION STATUS REPORT",DIC("DR")="1///Installation Status Report;4///R;20///I "_Y_";25///START^ZIBPKGF;200///T@2110;202///25D" "RTN","ZIBPKGF",30,0) I $D(^DIC(19,"B",X)) S DIE=DIC,DA=$O(^DIC(19,"B",X,0)),DR="20///I "_Y D ^DIE I 1 "RTN","ZIBPKGF",31,0) E KILL DD,DO D FILE^DICN "RTN","ZIBPKGF",32,0) W !!,"Done." "RTN","ZIBPKGF",33,0) Q "RTN","ZIBPKGF",34,0) ; "RTN","ZIBPKGF",35,0) START ;EP - From TaskMan. "RTN","ZIBPKGF",36,0) ; A = Area System Name "RTN","ZIBPKGF",37,0) ; D = Date Package Installed "RTN","ZIBPKGF",38,0) ; F = File Name "RTN","ZIBPKGF",39,0) ; I = HFS Name "RTN","ZIBPKGF",40,0) ; L = Location ASUFAC "RTN","ZIBPKGF",41,0) ; M = System Name to Receive all Reports "RTN","ZIBPKGF",42,0) ; P = Package Prefix "RTN","ZIBPKGF",43,0) ; R = Directory "RTN","ZIBPKGF",44,0) ; S = Short Description of Package "RTN","ZIBPKGF",45,0) ; S(1) = 1st Subscript in PACKAGE "RTN","ZIBPKGF",46,0) ; S(2) = 22 node Subscript in PACKAGE "RTN","ZIBPKGF",47,0) ; V = Version of Package "RTN","ZIBPKGF",48,0) ; "RTN","ZIBPKGF",49,0) NEW %ZIS,A,D,DA,DIC,F,I,J,L,M,N,P,R,S,V "RTN","ZIBPKGF",50,0) ; "RTN","ZIBPKGF",51,0) S R="/usr/spool/uucppublic/",L=$P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,10) "RTN","ZIBPKGF",52,0) F I=0:0 S I=$O(^%ZIS(1,I)) Q:'I I ^(I,"TYPE")="HFS" S IOP=$P(^%ZIS(1,I,0),U) D ZIS Q:'POP "RTN","ZIBPKGF",53,0) Q:POP!('I) "RTN","ZIBPKGF",54,0) S I=$P(^%ZIS(1,I,0),U) "RTN","ZIBPKGF",55,0) KILL ^TMP($J) "RTN","ZIBPKGF",56,0) ; "RTN","ZIBPKGF",57,0) ; rm xmit files over 2 weeks old. "RTN","ZIBPKGF",58,0) ; "RTN","ZIBPKGF",59,0) S X=$$JOBWAIT^%HOSTCMD("ls -l "_R_"pkg"_L_".* > /usr/mumps/zibpkg.wrk"),IOP=I,%ZIS("IOPAR")="(""/usr/mumps/zibpkg.wrk"":""R"")" "RTN","ZIBPKGF",60,0) D ZIS,JDT "RTN","ZIBPKGF",61,0) U IO "RTN","ZIBPKGF",62,0) F R %:300 Q:%="" S %=$P(%,"/",5),X=+$P(%,".",2) I %?1"pkg"6N1"."3N,L=$E(%,4,9),((+X>+J)!(+X<(+J-14))) S X=$$JOBWAIT^%HOSTCMD("rm "_R_%) "RTN","ZIBPKGF",63,0) S X=$$JOBWAIT^%HOSTCMD("rm /usr/mumps/zibpkg.wrk") "RTN","ZIBPKGF",64,0) ; Initialize namespace, systems, and frequency. "RTN","ZIBPKGF",65,0) S %=+$P(^DIC(19,$O(^DIC(19,"B","ZIB INSTALLATION STATUS REPORT",0)),20)," ",2) "RTN","ZIBPKGF",66,0) I %>1 S A=$P(^AUTTSITE(1,0),U,14) "RTN","ZIBPKGF",67,0) I '(%=2) S M=$P($T(SYTM),";;",2) "RTN","ZIBPKGF",68,0) ; "RTN","ZIBPKGF",69,0) S F="/usr/spool/uucppublic/pkg"_L_"."_J,IOP=I,%ZIS("IOPAR")="("""_F_""":""W"")" "RTN","ZIBPKGF",70,0) D ZIS "RTN","ZIBPKGF",71,0) U IO "RTN","ZIBPKGF",72,0) S P="" "RTN","ZIBPKGF",73,0) MAIN ; "RTN","ZIBPKGF",74,0) F S P=$O(^DIC(9.4,"C",P)) Q:P="" D W L,U,P,U,S,U,V,U,D,! "RTN","ZIBPKGF",75,0) .S (S,V,D)="error",S(1)=$O(^DIC(9.4,"C",P,0)) "RTN","ZIBPKGF",76,0) .Q:'S(1) "RTN","ZIBPKGF",77,0) .S S=$P(^DIC(9.4,S(1),0),U,3) "RTN","ZIBPKGF",78,0) .S:S="" S="error" "RTN","ZIBPKGF",79,0) .Q:'$D(^DIC(9.4,S(1),"VERSION")) "RTN","ZIBPKGF",80,0) .S V=^DIC(9.4,S(1),"VERSION") "RTN","ZIBPKGF",81,0) .I '$L(V) S V="error" Q "RTN","ZIBPKGF",82,0) .S S(2)=$O(^DIC(9.4,S(1),22,"B",V,0)) "RTN","ZIBPKGF",83,0) .Q:'S(2) "RTN","ZIBPKGF",84,0) .S D=$P(^DIC(9.4,S(1),22,S(2),0),U,3) "RTN","ZIBPKGF",85,0) .Q "RTN","ZIBPKGF",86,0) ENDMAIN ; "RTN","ZIBPKGF",87,0) S IOP=I,%ZIS("IOPAR")="(""zib.wrk"")" "RTN","ZIBPKGF",88,0) D ZIS,ZISC "RTN","ZIBPKGF",89,0) S X=$$JOBWAIT^%HOSTCMD("rm zib.wrk") "RTN","ZIBPKGF",90,0) I $D(M) S X=$$JOBWAIT^%HOSTCMD("uucp -r "_F_" "_M_"!~") "RTN","ZIBPKGF",91,0) I $D(A) S X=$$JOBWAIT^%HOSTCMD("uucp -r -nroot "_F_" "_A_"!~") "RTN","ZIBPKGF",92,0) S ZTREQ="@" "RTN","ZIBPKGF",93,0) Q ; "RTN","ZIBPKGF",94,0) Q "RTN","ZIBPKGF",95,0) ; "RTN","ZIBPKGF",96,0) JDT NEW X1,X2 S X2=$E(DT,1,3)_"0101",X1=DT D ^%DTC S X=X+1,X="00"_X,J=$E(X,$L(X)-2,$L(X)) Q "RTN","ZIBPKGF",97,0) SYTM ;;cmbsyb "RTN","ZIBPKGF",98,0) ZIS NEW A,D,F,I,J,L,M,P,R,S,V D ^%ZIS Q "RTN","ZIBPKGF",99,0) ZISC NEW A,D,F,I,J,L,M,P,R,S,V D ^%ZISC Q "RTN","ZIBPKGF",100,0) 10 ;;abr-ab "RTN","ZIBPKGF",101,0) 11 ;;bji-ao "RTN","ZIBPKGF",102,0) 20 ;;albisc "RTN","ZIBPKGF",103,0) 30 ;;akarea "RTN","ZIBPKGF",104,0) 40 ;;bilcsy "RTN","ZIBPKGF",105,0) 50 ;;okc-ao "RTN","ZIBPKGF",106,0) 51 ;;nsa-oa "RTN","ZIBPKGF",107,0) 60 ;;phx-ao "RTN","ZIBPKGF",108,0) 61 ;;cao-as "RTN","ZIBPKGF",109,0) 70 ;;pordps "RTN","ZIBPKGF",110,0) 80 ;;nav-aa "RTN","ZIBPKGF",111,0) 00 ;;tucdev "RTN","ZIBPKGF",112,0) NEW DIE,DR,DA "RTN","ZIBPKGF",113,0) S DR="W $J("""",IOM-$L(%)\2)_%,!!" "RTN","ZIBPKGF",114,0) S DA=$P($T(@($P(^AUTTAREA($P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,4),0),U,2))),";;",2) "RTN","ZIBPKGF",115,0) W ! "RTN","ZIBPKGF",116,0) F %="A system id for your area computer does not exist in the RPMS SITE file.","Based on your area code, it should probably be '"_DA_"'.","Please enter an area system id into the RPMS SITE file, now.","(Calling DIE for you)." X DR "RTN","ZIBPKGF",117,0) S DIE="^AUTTSITE(",DR=".14//"_DA,DA=1 "RTN","ZIBPKGF",118,0) D ^DIE "RTN","ZIBPKGF",119,0) Q "RTN","ZIBPKGF",120,0) ; "RTN","ZIBPKGP") 0^208^B21579540 "RTN","ZIBPKGP",1,0) ZIBPKGP ; IHS/ADC/GTH - PROCESS IMPLEMENTATION STATUS FILES ; [ 02/07/97 3:02 PM ] "RTN","ZIBPKGP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBPKGP",3,0) ; "RTN","ZIBPKGP",4,0) Q "RTN","ZIBPKGP",5,0) ; "RTN","ZIBPKGP",6,0) OPT ; Set option in OPTION file. "RTN","ZIBPKGP",7,0) I $P(^%ZOSF("OS"),"^")'="MSM-UNIX" W !!,"SORRY. MSM-UNIX only.",! Q "RTN","ZIBPKGP",8,0) I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q "RTN","ZIBPKGP",9,0) NEW DA,DIC,DIE,DR "RTN","ZIBPKGP",10,0) D HOME^%ZIS,DT^DICRW "RTN","ZIBPKGP",11,0) S X="ZIB IMPLEMENTATION STATUS",DR="W $J("""",IOM-$L(%)\2)_%,!!" "RTN","ZIBPKGP",12,0) W ! "RTN","ZIBPKGP",13,0) F %="Option '"_X_"' will be placed","in the OPTION file for daily processing, beginning tomorrow morning","at 0530 AM. You can change the frequency/time of scheduling by","using the TaskMan option thru the Kernel." X DR "RTN","ZIBPKGP",14,0) S DIC="^DIC(19,",DIC(0)="",DIC("DR")="1///ZIB Implementation Status;4///R;25///IN^ZIBPKGP;200///T+1@0530;202///1D" "RTN","ZIBPKGP",15,0) I $D(^DIC(19,"B",$E(X,1,30))) S DIE=DIC,DA=$O(^DIC(19,"B",$E(X,1,30),0)),DR=DIC("DR") D DIE I 1 "RTN","ZIBPKGP",16,0) E KILL DD,DO D FILE "RTN","ZIBPKGP",17,0) W !!,"Done.",! "RTN","ZIBPKGP",18,0) Q "RTN","ZIBPKGP",19,0) ; "RTN","ZIBPKGP",20,0) IN ;EP - From TaskMan. "RTN","ZIBPKGP",21,0) ; A = Date of Installation "RTN","ZIBPKGP",22,0) ; D = Directory "RTN","ZIBPKGP",23,0) ; F = File "RTN","ZIBPKGP",24,0) ; L = ASUFAC Code "RTN","ZIBPKGP",25,0) ; P = Package Prefix "RTN","ZIBPKGP",26,0) ; S = Short Description of Package "RTN","ZIBPKGP",27,0) ; S(1) = 1st Subscript of ^DIZ(8009545 (Facility) "RTN","ZIBPKGP",28,0) ; S(2) = 2nd Subscript of ^DIZ(8009545 (Package) "RTN","ZIBPKGP",29,0) ; T = Patch "RTN","ZIBPKGP",30,0) ; V = Version "RTN","ZIBPKGP",31,0) ; Z = Line of Input "RTN","ZIBPKGP",32,0) ; Read in status files from remote site and place in FM file. "RTN","ZIBPKGP",33,0) ; "RTN","ZIBPKGP",34,0) NEW A,D,F,L,P,S,T,V,XMB,XMTEXT,Z "RTN","ZIBPKGP",35,0) S X=$$JOBWAIT^%HOSTCMD("ls -l /usr/spool/uucppublic/pkg* > zibpkg.wrk ; ls -l /usr/spool/uucppublic/rpi* >> zibpkg.wrk") "RTN","ZIBPKGP",36,0) F A=0:0 S A=$O(^%ZIS(1,A)) Q:'A I ^(A,"TYPE")="HFS" S IOP=$P(^%ZIS(1,A,0),U),%ZIS("IOPAR")="(""zibpkg.wrk"":""R"")" D ZIS Q:'POP "RTN","ZIBPKGP",37,0) Q:POP!('A) "RTN","ZIBPKGP",38,0) KILL ^TMP($J) "RTN","ZIBPKGP",39,0) U IO "RTN","ZIBPKGP",40,0) F R %:300 Q:%="" S %=$P(%,"/",5) S:%?1"pkg"6N1"."3N ^TMP($J,"PKG",%)="" S:%?1"rpi"6N1"."3N ^TMP($J,"RPI",%)="" "RTN","ZIBPKGP",41,0) S F="",D="/usr/spool/uucppublic/" "RTN","ZIBPKGP",42,0) MAIN ; "RTN","ZIBPKGP",43,0) PKG ; "RTN","ZIBPKGP",44,0) F S F=$O(^TMP($J,"PKG",F)) Q:F="" U IO:(D_F) D "RTN","ZIBPKGP",45,0) . F R Z:300 Q:(Z="")!(Z'?6N1"^"1U1.3UN1"^".E) D "RTN","ZIBPKGP",46,0) .. S L=$P(Z,U),P=$P(Z,U,2),S=$P(Z,U,3),V=$P(Z,U,4),A=$P(Z,U,5) "RTN","ZIBPKGP",47,0) .. S:S="" S="error" "RTN","ZIBPKGP",48,0) .. D FAC "RTN","ZIBPKGP",49,0) .. S DA=S(2),DIE="^DIZ(8009545,"_S(1)_",1,",DR="1////"_V_";2////P;3////"_A "RTN","ZIBPKGP",50,0) .. D DIE "RTN","ZIBPKGP",51,0) .. S ^TMP($J,"PKG",F)=L "RTN","ZIBPKGP",52,0) ..Q "RTN","ZIBPKGP",53,0) . S X=$$JOBWAIT^%HOSTCMD("rm "_D_F) "RTN","ZIBPKGP",54,0) .Q "RTN","ZIBPKGP",55,0) ; "RTN","ZIBPKGP",56,0) RPI ; "RTN","ZIBPKGP",57,0) F S F=$O(^TMP($J,"RPI",F)) Q:F="" U IO:(D_F) D "RTN","ZIBPKGP",58,0) . F R Z:300 Q:(Z="")!(Z'?6N1"^"2.4L1".v"1.2N1"."1.2N.1A.2N1"p"1.3N1"^".E) I $P(Z,U,3)="INSTALLED" D "RTN","ZIBPKGP",59,0) .. S L=$P(Z,U),T=$P(Z,U,2),A=$P(Z,U,4),P=$P(T,"."),V=$P($P(T,".v",2),"p"),T=$P($P(T,".v",2),"p",2) "RTN","ZIBPKGP",60,0) .. F XMB="P","V" S X=@XMB X ^DD("FUNC",$O(^DD("FUNC","B","UPPERCASE",0)),1) S @XMB=X "RTN","ZIBPKGP",61,0) .. S S=P "RTN","ZIBPKGP",62,0) .. D FAC "RTN","ZIBPKGP",63,0) .. S DA(2)=S(1),DA(1)=S(2),DA=T "RTN","ZIBPKGP",64,0) .. I '$D(^DIZ(8009545,DA(2),1,DA(1),1,0)) S ^(0)="^8009545.03^^" "RTN","ZIBPKGP",65,0) .. I '$D(^DIZ(8009545,DA(2),1,DA(1),1,DA)) S (X,DINUM)=DA,DIC="^DIZ(8009545,"_DA(2)_",1,"_DA(1)_",1,",DIC(0)="",DIC("DR")="1///"_A_";2///"_$P(Z,U,2) D FILE KILL DINUM I 1 "RTN","ZIBPKGP",66,0) .. E S DIE="^DIZ(8009545,"_DA(2)_",1,"_DA(1)_",1,"_DA_",",DR="1///"_A_";2///"_$P(Z,U,2) D DIE "RTN","ZIBPKGP",67,0) .. S ^TMP($J,"RPI",F)=L "RTN","ZIBPKGP",68,0) ..Q "RTN","ZIBPKGP",69,0) . S X=$$JOBWAIT^%HOSTCMD("rm "_D_F) "RTN","ZIBPKGP",70,0) .Q "RTN","ZIBPKGP",71,0) ; "RTN","ZIBPKGP",72,0) ENDMAIN ; "RTN","ZIBPKGP",73,0) D ZISC "RTN","ZIBPKGP",74,0) S X=$$JOBWAIT^%HOSTCMD("rm zibpkg.wrk") "RTN","ZIBPKGP",75,0) ; ^TMP($J,"PKG",file)=facility "RTN","ZIBPKGP",76,0) S F="",%=0 "RTN","ZIBPKGP",77,0) F S F=$O(^TMP($J,"PKG",F)) Q:F="" S %=%+1,XMTEXT(%)=" Application status received from "_^(F) "RTN","ZIBPKGP",78,0) S F="" "RTN","ZIBPKGP",79,0) F S F=$O(^TMP($J,"RPI",F)) Q:F="" I $L(^(F)) S %=%+1,XMTEXT(%)=" Patch application received from "_^(F) "RTN","ZIBPKGP",80,0) I $L($O(^TMP($J,"PKG",""))) S XMB="ZIB PKG",XMTEXT="XMTEXT(" D XMB "RTN","ZIBPKGP",81,0) KILL ^TMP($J) "RTN","ZIBPKGP",82,0) Q ; "RTN","ZIBPKGP",83,0) Q "RTN","ZIBPKGP",84,0) ; "RTN","ZIBPKGP",85,0) FAC ; "RTN","ZIBPKGP",86,0) I '$D(^DIZ(8009545,"B",$O(^AUTTLOC("C",L,0)))) S X=$O(^AUTTLOC("C",L,0)),DIC="^DIZ(8009545,",DIC(0)="" D FILE S S(1)=+Y I 1 "RTN","ZIBPKGP",87,0) E S S(1)=$O(^DIZ(8009545,"B",$O(^AUTTLOC("C",L,0)),0)) "RTN","ZIBPKGP",88,0) I '$D(^DIZ(8009545,S(1),1,0)) S ^(0)="^8009545.02PA^^" "RTN","ZIBPKGP",89,0) I '$D(^DIC(9.4,"C",P)) S X=S,DIC="^DIC(9.4,",DIC(0)="",DIC("DR")="1///"_P_";2///"_S D FILE S S(2)=+Y I 1 "RTN","ZIBPKGP",90,0) E S S(2)=$O(^DIC(9.4,"C",P,0)) "RTN","ZIBPKGP",91,0) I '$D(^DIZ(8009545,S(1),1,"B",S(2))) S X=S(2),DA(1)=S(1),DIC="^DIZ(8009545,"_S(1)_",1,",DIC(0)="" D FILE S S(2)=+Y I 1 "RTN","ZIBPKGP",92,0) E S S(2)=$O(^DIZ(8009545,S(1),1,"B",S(2),0)) "RTN","ZIBPKGP",93,0) Q "RTN","ZIBPKGP",94,0) ; "RTN","ZIBPKGP",95,0) FILE NEW A,D,DD,DO,F,L,P,S,T,V,Z D FILE^DICN KILL DIC Q "RTN","ZIBPKGP",96,0) DIE NEW A,D,F,L,P,S,T,V,Z D ^DIE KILL DA,DR,DIE Q "RTN","ZIBPKGP",97,0) XMB NEW A,D,F,L,P,S,T,V,Z D ^XMB Q "RTN","ZIBPKGP",98,0) ZIS NEW A,D,F,L,P,S,T,V,Z D ^%ZIS Q "RTN","ZIBPKGP",99,0) ZISC NEW A,D,F,L,P,S,T,V,Z D ^%ZISC Q "RTN","ZIBRD") 0^209^B1190614 "RTN","ZIBRD",1,0) %ZIBRD ; IHS/ADC/GTH - DISPLAY MSM DIRECTORY OF SELECTED RTNS ; [ 10/29/2002 7:42 AM ] "RTN","ZIBRD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRD",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBRD",4,0) ; "RTN","ZIBRD",5,0) ; Generate routine directory of selected routines "RTN","ZIBRD",6,0) ; "RTN","ZIBRD",7,0) ; Save, or %RCOPY, this routine to the MGR uci, named as "RTN","ZIBRD",8,0) ; %ZIBRD. It may also be name %AZRD. "RTN","ZIBRD",9,0) ; "RTN","ZIBRD",10,0) START ; "RTN","ZIBRD",11,0) I $$VERSION^%ZOSV(1)["Cache" D ^%RD KILL MSYS,R,nrou Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRD",12,0) X ^%ZOSF("RSEL") "RTN","ZIBRD",13,0) G:$O(^UTILITY($J,""))="" EXIT "RTN","ZIBRD",14,0) NEW I,NAM,Y "RTN","ZIBRD",15,0) W !?21,"Routine Directory",?40 "RTN","ZIBRD",16,0) D ^%D "RTN","ZIBRD",17,0) X ^%ZOSF("UCI") "RTN","ZIBRD",18,0) W !?25,"of ",Y,?40 "RTN","ZIBRD",19,0) D ^%T "RTN","ZIBRD",20,0) W ! "RTN","ZIBRD",21,0) %ST1 ; "RTN","ZIBRD",22,0) ;S NAM="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRD",23,0) S NAM=0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRD",24,0) F I=0:1 S NAM=$O(^UTILITY($J,NAM)) Q:NAM="" W:'(I#8) ! W NAM,$J("",9-$L(NAM)) "RTN","ZIBRD",25,0) W !?5,I," Routines",! "RTN","ZIBRD",26,0) G START ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRD",27,0) EXIT ; "RTN","ZIBRD",28,0) KILL %UCI,%UCN "RTN","ZIBRD",29,0) KILL I,^UTILITY($J) "RTN","ZIBRD",30,0) Q "RTN","ZIBRD",31,0) ; "RTN","ZIBRNSPC") 0^210^B51555795 "RTN","ZIBRNSPC",1,0) ZIBRNSPC ; IHS/ADC/GTH - NAMESPACE PREVIOUSLY WRITTEN ROUTINES ; [ 10/29/2002 7:42 AM ] "RTN","ZIBRNSPC",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRNSPC",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBRNSPC",4,0) ; "RTN","ZIBRNSPC",5,0) INIT ; "RTN","ZIBRNSPC",6,0) KILL (%) "RTN","ZIBRNSPC",7,0) D ^XBKVAR "RTN","ZIBRNSPC",8,0) S DTIME=300 "RTN","ZIBRNSPC",9,0) KILL %,DISYS,%H,X,^UTILITY($J),^TMP("ZIBRNSPC",$J) "RTN","ZIBRNSPC",10,0) S IOP=$I "RTN","ZIBRNSPC",11,0) D ^%ZIS "RTN","ZIBRNSPC",12,0) START ; "RTN","ZIBRNSPC",13,0) W "Routine Namespace Converter",! "RTN","ZIBRNSPC",14,0) S ZIBRQUIT=0 "RTN","ZIBRNSPC",15,0) D SETUP "RTN","ZIBRNSPC",16,0) G:ZIBRQUIT EXIT "RTN","ZIBRNSPC",17,0) ;S ZIBRRTN="";IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRNSPC",18,0) S ZIBRRTN=0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRNSPC",19,0) F ZIBRQ=0:0 S ZIBRRTN=$O(^UTILITY($J,ZIBRRTN)) Q:ZIBRRTN="" W !!,"-- ",ZIBRRTN," --",!! D RLOAD,RFIX,RSAVE,RNDX "RTN","ZIBRNSPC",20,0) EXIT ; "RTN","ZIBRNSPC",21,0) W !!,"Done.",! "RTN","ZIBRNSPC",22,0) KILL ^UTILITY($J),^TMP("ZIBRNSPC",$J),DUOUT,DTOUT,IOP "RTN","ZIBRNSPC",23,0) KILL ZIBRANS,ZIBRCAND,ZIBRCH,ZIBRCMDT,ZIBRCPOS,ZIBRDEV,ZIBRFLI,ZIBRI,ZIBRJ,ZIBRL,ZIBRLINE,ZIBROBJ,ZIBROUTP,ZIBRPART,ZIBRPLEV,ZIBRPN,ZIBRPRFX,ZIBRQ,ZIBRQUIT,ZIBRRTN,ZIBRT,ZIBRV,ZIBRW,ZIBRXC "RTN","ZIBRNSPC",24,0) Q "RTN","ZIBRNSPC",25,0) ; "RTN","ZIBRNSPC",26,0) SETUP ; INITIALIZE UTILITY "RTN","ZIBRNSPC",27,0) F ZIBRT="EXC","PEXC" F ZIBRI=0:1 S ZIBRL=$T(@ZIBRT+ZIBRI),ZIBRL=$P(ZIBRL,";;",2,255) Q:ZIBRL="" F ZIBRJ=1:1 S ZIBRW=$P(ZIBRL,"^",ZIBRJ) Q:ZIBRW="" S ^TMP("ZIBRNSPC",$J,ZIBRT,ZIBRW)="" "RTN","ZIBRNSPC",28,0) PLOOP ; "RTN","ZIBRNSPC",29,0) R "Package prefix (1-5 characters): ",ZIBRPRFX:DTIME "RTN","ZIBRNSPC",30,0) S:'$T ZIBRPRFX="^" "RTN","ZIBRNSPC",31,0) I "^"'[ZIBRPRFX I $L(ZIBRPRFX)>5!(ZIBRPRFX'?1.5U) W *7," -- Invalid prefix",! G PLOOP "RTN","ZIBRNSPC",32,0) W ! "RTN","ZIBRNSPC",33,0) I "^"[ZIBRPRFX S ZIBRQUIT=1 Q "RTN","ZIBRNSPC",34,0) W !,"Enter any variables to be treated as external references --",!,"not to be namespaced -- in the form NAME1,NAME2,...",! "RTN","ZIBRNSPC",35,0) F ZIBRQ=0:0 R " Externals: ",ZIBRL:DTIME,! S:'$T ZIBRL="^" Q:"^"[ZIBRL D:ZIBRL["?" SHEXT I ZIBRL]"" F ZIBRI=1:1 S ZIBRW=$P(ZIBRL,",",ZIBRI) Q:ZIBRW="" S ^TMP("ZIBRNSPC",$J,"EXC",ZIBRW)="" W " ",ZIBRW,! "RTN","ZIBRNSPC",36,0) I ZIBRL["^" S ZIBRQUIT=1 Q "RTN","ZIBRNSPC",37,0) X ^%ZOSF("RSEL") "RTN","ZIBRNSPC",38,0) I $O(^UTILITY($J,""))="" S ZIBRQUIT=1 "RTN","ZIBRNSPC",39,0) Q "RTN","ZIBRNSPC",40,0) ; "RTN","ZIBRNSPC",41,0) SHEXT ; "RTN","ZIBRNSPC",42,0) W !?2,"Currently defined externals:",! "RTN","ZIBRNSPC",43,0) S ZIBRW="" "RTN","ZIBRNSPC",44,0) F ZIBRQ=0:0 S W=$O(^TMP("ZIBRNSPC",$J,"EXC",ZIBRW)) Q:ZIBRW="" W ?3,ZIBRW,! "RTN","ZIBRNSPC",45,0) W ! "RTN","ZIBRNSPC",46,0) S ZIBRL="" "RTN","ZIBRNSPC",47,0) Q "RTN","ZIBRNSPC",48,0) ; "RTN","ZIBRNSPC",49,0) EXC ;;X^Y^DIE^DIC^DT^U^DUZ^DTIME^ZTSK^ZTDESC^ZTSAVE^ZTLOAD^ZTRTN^ZTIO^ZTDTH "RTN","ZIBRNSPC",50,0) ;; "RTN","ZIBRNSPC",51,0) PEXC ;;IO^D^XB^Z "RTN","ZIBRNSPC",52,0) ;; "RTN","ZIBRNSPC",53,0) ; "RTN","ZIBRNSPC",54,0) RLOAD ; LOAD ROUTINE INTO GLOBAL "RTN","ZIBRNSPC",55,0) W "Beginning routine load ... " "RTN","ZIBRNSPC",56,0) KILL ^TMP("ZIBRNSPC",$J,"T"),^("K") "RTN","ZIBRNSPC",57,0) S ZIBRXC=$E($T(RLOADX),10,255) "RTN","ZIBRNSPC",58,0) X ZIBRXC "RTN","ZIBRNSPC",59,0) W " completed.",! "RTN","ZIBRNSPC",60,0) Q "RTN","ZIBRNSPC",61,0) ; "RTN","ZIBRNSPC",62,0) RLOADX ;;S ^TMP("ZIBRNSPC",$J,"T",0)=ZIBRRTN ZL @ZIBRRTN F ZIBRI=1:1 S ZIBRL=$T(+ZIBRI) Q:ZIBRL="" S ^(ZIBRI)=ZIBRL "RTN","ZIBRNSPC",63,0) ; "RTN","ZIBRNSPC",64,0) RSAVE ; SAVE GLOBAL TEXT AS ROUTINE "RTN","ZIBRNSPC",65,0) W "Beginning routine save ... " "RTN","ZIBRNSPC",66,0) S ZIBRXC=$P($T(RSAVEX),"RSAVEX ",2) "RTN","ZIBRNSPC",67,0) X ZIBRXC "RTN","ZIBRNSPC",68,0) W " completed.",! "RTN","ZIBRNSPC",69,0) Q "RTN","ZIBRNSPC",70,0) ; "RTN","ZIBRNSPC",71,0) ; S ZIBRRTN=^TMP("ZIBRNSPC",$J,"T",0) X "ZR X ""F ZIBRI=1:1 Q:'$D(^(ZIBRI)) ZI ^(ZIBRI)"" ZS @ZIBRRTN" ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRNSPC",72,0) RSAVEX S ZIBRRTN=^TMP("ZIBRNSPC",$J,"T",0) ZR X "F ZIBRI=1:1 Q:'$D(^(ZIBRI)) ZI ^(ZIBRI)" ZS @ZIBRRTN "RTN","ZIBRNSPC",73,0) ; "RTN","ZIBRNSPC",74,0) RNDX ; PRINT INDEX OF ROUTINE CONVERSION "RTN","ZIBRNSPC",75,0) KILL %ZIS,IOP "RTN","ZIBRNSPC",76,0) S %ZIS("A")="Enter device for auxiliary listing of variable changes",%ZIS("B")="" "RTN","ZIBRNSPC",77,0) D ^%ZIS "RTN","ZIBRNSPC",78,0) S ZIBRDEV=$S($D(DTOUT)!$D(DUOUT):"^",IO=IO(0):0,1:IO) "RTN","ZIBRNSPC",79,0) Q:ZIBRDEV["^" "RTN","ZIBRNSPC",80,0) D RNDXP "RTN","ZIBRNSPC",81,0) I ZIBRDEV U ZIBRDEV D RNDXP D ^%ZISC "RTN","ZIBRNSPC",82,0) Q "RTN","ZIBRNSPC",83,0) ; "RTN","ZIBRNSPC",84,0) RNDXP ; "RTN","ZIBRNSPC",85,0) S ZIBRV=" " "RTN","ZIBRNSPC",86,0) F ZIBRI=0:1 S:ZIBRI=4 ZIBRI=0 W:ZIBRI=0 ! S ZIBRV=$O(^TMP("ZIBRNSPC",$J,"V",ZIBRV)) Q:ZIBRV="" W ?(19*ZIBRI),$J(ZIBRV,8),">",^(ZIBRV) "RTN","ZIBRNSPC",87,0) W ! "RTN","ZIBRNSPC",88,0) Q "RTN","ZIBRNSPC",89,0) ; "RTN","ZIBRNSPC",90,0) RFIX ; FIX ROUTINE LINES STORED IN GLOBAL "RTN","ZIBRNSPC",91,0) F ZIBRFLI=1:1 Q:'$D(^TMP("ZIBRNSPC",$J,"T",ZIBRFLI)) S ZIBRLINE=^(ZIBRFLI) D LSCAN S ^TMP("ZIBRNSPC",$J,"T",ZIBRFLI)=ZIBROUTP "RTN","ZIBRNSPC",92,0) W "Line modification completed.",! "RTN","ZIBRNSPC",93,0) Q "RTN","ZIBRNSPC",94,0) ; "RTN","ZIBRNSPC",95,0) LSCAN ; SCAN LINE AND REPLACE VARIABLES "RTN","ZIBRNSPC",96,0) S ZIBRCPOS=$F(ZIBRLINE," ")-1,ZIBRCH=" ",ZIBROUTP=$E(ZIBRLINE,1,ZIBRCPOS-1) "RTN","ZIBRNSPC",97,0) F ZIBRQ=0:0 Q:ZIBRCH="" D COPY1,CMD "RTN","ZIBRNSPC",98,0) Q "RTN","ZIBRNSPC",99,0) ; "RTN","ZIBRNSPC",100,0) CMD ; "RTN","ZIBRNSPC",101,0) I ZIBRCH=";" S ZIBROUTP=ZIBROUTP_$E(ZIBRLINE,ZIBRCPOS,255),ZIBRCPOS=$L(ZIBRLINE)+1,ZIBRCH="" Q "RTN","ZIBRNSPC",102,0) S ZIBRCMDT=ZIBRCH "RTN","ZIBRNSPC",103,0) F ZIBRQ=0:0 Q:": "[ZIBRCH D COPY1 "RTN","ZIBRNSPC",104,0) D:ZIBRCH=":" EXPR "RTN","ZIBRNSPC",105,0) Q:ZIBRCH="" "RTN","ZIBRNSPC",106,0) D COPY1 "RTN","ZIBRNSPC",107,0) I ZIBRCH'=" " D ARGS "RTN","ZIBRNSPC",108,0) Q "RTN","ZIBRNSPC",109,0) ; "RTN","ZIBRNSPC",110,0) COPY1 ; "RTN","ZIBRNSPC",111,0) S ZIBROUTP=ZIBROUTP_ZIBRCH "RTN","ZIBRNSPC",112,0) D ADVPOS "RTN","ZIBRNSPC",113,0) Q "RTN","ZIBRNSPC",114,0) ; "RTN","ZIBRNSPC",115,0) ADDOBJ ; "RTN","ZIBRNSPC",116,0) S ZIBROBJ=ZIBROBJ_ZIBRCH "RTN","ZIBRNSPC",117,0) D ADVPOS "RTN","ZIBRNSPC",118,0) Q "RTN","ZIBRNSPC",119,0) ; "RTN","ZIBRNSPC",120,0) ADVPOS ; "RTN","ZIBRNSPC",121,0) S ZIBRCPOS=ZIBRCPOS+1,ZIBRCH=$E(ZIBRLINE,ZIBRCPOS) "RTN","ZIBRNSPC",122,0) Q "RTN","ZIBRNSPC",123,0) ; "RTN","ZIBRNSPC",124,0) EXPR ; "RTN","ZIBRNSPC",125,0) F ZIBRQ=0:0 Q:" "[ZIBRCH D COPYOBJ "RTN","ZIBRNSPC",126,0) Q "RTN","ZIBRNSPC",127,0) ; "RTN","ZIBRNSPC",128,0) COPYOBJ ; COPY AN OBJECT, CHECKING FOR VARIABLES "RTN","ZIBRNSPC",129,0) I ZIBRCH="""" D QSTR Q "RTN","ZIBRNSPC",130,0) I ZIBRCH'?1AN,"%^$"'[ZIBRCH D COPY1 Q "RTN","ZIBRNSPC",131,0) S ZIBROBJ="" "RTN","ZIBRNSPC",132,0) F ZIBRQ=0:0 D ADDOBJ Q:ZIBRCH'?1AN "RTN","ZIBRNSPC",133,0) D:$E(ZIBROBJ)?1A TSTOBJ "RTN","ZIBRNSPC",134,0) S ZIBROUTP=ZIBROUTP_ZIBROBJ "RTN","ZIBRNSPC",135,0) Q "RTN","ZIBRNSPC",136,0) ; "RTN","ZIBRNSPC",137,0) QSTR ; COPY QUOTED STRING (INCLUDED DOUBLED QUOTES) "RTN","ZIBRNSPC",138,0) F ZIBRQ=0:0 D COPY1 Q:""""[ZIBRCH "RTN","ZIBRNSPC",139,0) D COPY1 "RTN","ZIBRNSPC",140,0) G:ZIBRCH="""" QSTR "RTN","ZIBRNSPC",141,0) Q "RTN","ZIBRNSPC",142,0) ; "RTN","ZIBRNSPC",143,0) ARGS ; COPY ARGUMENTS -- 'DO' AND 'GO' SPECIAL CASES "RTN","ZIBRNSPC",144,0) I "GD"'[ZIBRCMDT D EXPR Q "RTN","ZIBRNSPC",145,0) F ZIBRQ=0:0 Q:" "[ZIBRCH D DGARG D:ZIBRCH=":" CPYTCOM "RTN","ZIBRNSPC",146,0) Q "RTN","ZIBRNSPC",147,0) ; "RTN","ZIBRNSPC",148,0) DGARG ; PROCESS DO/GO ARGUMENTS "RTN","ZIBRNSPC",149,0) I ZIBRCH="@" D CPYTCOM Q "RTN","ZIBRNSPC",150,0) F ZIBRQ=0:0 Q:",: "[ZIBRCH D COPY1 "RTN","ZIBRNSPC",151,0) D:ZIBRCH="," COPY1 "RTN","ZIBRNSPC",152,0) Q "RTN","ZIBRNSPC",153,0) ; "RTN","ZIBRNSPC",154,0) CPYTCOM ; COPIES OBJECTS THRU ZERO-LEVEL COMMA "RTN","ZIBRNSPC",155,0) S ZIBRPLEV=0 "RTN","ZIBRNSPC",156,0) F ZIBRQ=0:0 D CPYTKN Q:" "[ZIBRCH Q:ZIBRCH=","&(ZIBRPLEV=0) "RTN","ZIBRNSPC",157,0) D:ZIBRCH="," COPY1 "RTN","ZIBRNSPC",158,0) Q "RTN","ZIBRNSPC",159,0) ; "RTN","ZIBRNSPC",160,0) CPYTKN ; COPIES A TOKEN, MODIFYING PARENTHESIS LEVEL "RTN","ZIBRNSPC",161,0) I ZIBRCH="(" S ZIBRPLEV=ZIBRPLEV+1 D COPY1 Q "RTN","ZIBRNSPC",162,0) I ZIBRCH=")" S ZIBRPLEV=ZIBRPLEV-1 D COPY1 Q "RTN","ZIBRNSPC",163,0) D COPYOBJ "RTN","ZIBRNSPC",164,0) Q "RTN","ZIBRNSPC",165,0) ; "RTN","ZIBRNSPC",166,0) TSTOBJ ; CONDITIONALLY REPLACES A VARIABLE NAME "RTN","ZIBRNSPC",167,0) Q:$E(ZIBROBJ,1,$L(ZIBRPRFX))=ZIBRPRFX "RTN","ZIBRNSPC",168,0) Q:$D(^TMP("ZIBRNSPC",$J,"EXC",ZIBROBJ)) "RTN","ZIBRNSPC",169,0) I $D(^TMP("ZIBRNSPC",$J,"V",ZIBROBJ)) S ZIBROBJ=^(ZIBROBJ) Q "RTN","ZIBRNSPC",170,0) D CHKPART "RTN","ZIBRNSPC",171,0) I ZIBRPART D VERPART Q:'ZIBRPART "RTN","ZIBRNSPC",172,0) S ZIBRCAND=ZIBRPRFX_ZIBROBJ "RTN","ZIBRNSPC",173,0) D VERCAND "RTN","ZIBRNSPC",174,0) S:ZIBRCAND="^" ZIBRCAND=ZIBROBJ "RTN","ZIBRNSPC",175,0) S ^TMP("ZIBRNSPC",$J,"V",ZIBROBJ)=ZIBRCAND "RTN","ZIBRNSPC",176,0) S ^TMP("ZIBRNSPC",$J,"NV",ZIBRCAND)=ZIBROBJ "RTN","ZIBRNSPC",177,0) S ZIBROBJ=ZIBRCAND "RTN","ZIBRNSPC",178,0) Q "RTN","ZIBRNSPC",179,0) ; "RTN","ZIBRNSPC",180,0) CHKPART ; VERIFY MATCH WITH EXCLUSION PARTIAL NAME LIST "RTN","ZIBRNSPC",181,0) S ZIBRPART=0,ZIBRPN="" "RTN","ZIBRNSPC",182,0) F ZIBRQ=0:0 S ZIBRPN=$O(^TMP("ZIBRNSPC",$J,"PEXC",ZIBRPN)) Q:ZIBRPN="" I $E(ZIBROBJ,1,$L(ZIBRPN))=ZIBRPN S ZIBRPART=1 Q "RTN","ZIBRNSPC",183,0) Q "RTN","ZIBRNSPC",184,0) ; "RTN","ZIBRNSPC",185,0) VERPART ; MANAGE PARTIAL MATCH "RTN","ZIBRNSPC",186,0) W "'",ZIBROBJ,"' begins with '",ZIBRPN,"'",! "RTN","ZIBRNSPC",187,0) R "Do you wish to treat it as an external reference? YES// ",ZIBRANS:DTIME,! "RTN","ZIBRNSPC",188,0) S:'$T ZIBRANS="Y" "RTN","ZIBRNSPC",189,0) S ZIBRANS=$E(ZIBRANS_"Y") "RTN","ZIBRNSPC",190,0) I ZIBRANS="?" W " Usage: ",ZIBRLINE,! G VERPART "RTN","ZIBRNSPC",191,0) S:ZIBRANS?1L ZIBRANS=$C($A(ZIBRANS)-32) "RTN","ZIBRNSPC",192,0) S:ZIBRANS="Y" ZIBRPART=0,^TMP("ZIBRNSPC",$J,"EXC",ZIBROBJ)="" "RTN","ZIBRNSPC",193,0) Q "RTN","ZIBRNSPC",194,0) ; "RTN","ZIBRNSPC",195,0) VERCAND ; MANAGE AUTO CANDIDATE SELECTION "RTN","ZIBRNSPC",196,0) I $L(ZIBRCAND)>8 W "'",ZIBRCAND,"' cannot be used for '",ZIBROBJ,"' due to its length.",! D GETALT G VERCAND "RTN","ZIBRNSPC",197,0) I $D(^TMP("ZIBRNSPC",$J,"NV",ZIBRCAND)),^(ZIBRCAND)'=ZIBROBJ W "'",ZIBRCAND,"' cannot be used for '",ZIBROBJ,"'; used for '",^(ZIBRCAND),"'",! D GETALT G VERCAND "RTN","ZIBRNSPC",198,0) Q "RTN","ZIBRNSPC",199,0) ; "RTN","ZIBRNSPC",200,0) GETALT ; GET ALTERNATE FOR PROPOSED CANDIDATE REPLACEMENT NAME "RTN","ZIBRNSPC",201,0) R "Please supply an alternative: ",ZIBRCAND:DTIME "RTN","ZIBRNSPC",202,0) S:'$T ZIBRCAND="^" "RTN","ZIBRNSPC",203,0) Q:ZIBRCAND="^" "RTN","ZIBRNSPC",204,0) I ZIBRCAND="?" W " Usage: ",ZIBRLINE,! G GETALT "RTN","ZIBRNSPC",205,0) I $E(ZIBRCAND,1,$L(ZIBRPRFX))=ZIBRPRFX W ! Q "RTN","ZIBRNSPC",206,0) W *7," -- does not begin with '",ZIBRPRFX,"'",! "RTN","ZIBRNSPC",207,0) R "Are you sure you want a non-namespaced variable? N// ",ZIBRANS:DTIME,! "RTN","ZIBRNSPC",208,0) S:'$T ZIBRANS="N" "RTN","ZIBRNSPC",209,0) S ZIBRANS=$E(ZIBRANS_"N") "RTN","ZIBRNSPC",210,0) I ZIBRANS?1L S ZIBRANS=$C($A(ZIBRANS)-32) "RTN","ZIBRNSPC",211,0) I ZIBRANS="Y" W ! Q "RTN","ZIBRNSPC",212,0) G GETALT "RTN","ZIBRNSPC",213,0) ; "RTN","ZIBRPI") 0^211^B33067506 "RTN","ZIBRPI",1,0) ZIBRPI ; IHS/ADC/GTH - REMOTE PATCH INSTALLATION ; [ 11/04/97 10:26 AM ] "RTN","ZIBRPI",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRPI",3,0) ; XB*3*1 IHS/ADC/GTH 03-07-97 Correct spelling of uucppublic. "RTN","ZIBRPI",4,0) ; XB*3*2 IHS/ADC/GTH 04-21-97 Correct patch file pattern match. "RTN","ZIBRPI",5,0) ; XB*3*3 IHS/ADC/GTH 04-25-97 Correct patch file name handling. "RTN","ZIBRPI",6,0) ; "RTN","ZIBRPI",7,0) ; For a description of this utility, see the text in routine "RTN","ZIBRPI",8,0) ; ZIBRPI2. "RTN","ZIBRPI",9,0) ; "RTN","ZIBRPI",10,0) ; D = Directory containing patch files "RTN","ZIBRPI",11,0) ; D("OUT") = Directory with results files "RTN","ZIBRPI",12,0) ; E = "Action" routine, named (A/B)9 "RTN","ZIBRPI",13,0) ; F = Name of a file containing a patch "RTN","ZIBRPI",14,0) ; J = Today's Julian date "RTN","ZIBRPI",15,0) ; L = Facility's Pseudo Prefix "RTN","ZIBRPI",16,0) ; N = Namespace derived from the name of the file "RTN","ZIBRPI",17,0) ; O = Operating System, and OS-specific commands "RTN","ZIBRPI",18,0) ; P = PACKAGE file IEN "RTN","ZIBRPI",19,0) ; V = Version derived from the name of the file "RTN","ZIBRPI",20,0) ; W = Work file "RTN","ZIBRPI",21,0) ; "RTN","ZIBRPI",22,0) W !!,"EXECUTION UNAUTHORIZED.",! "RTN","ZIBRPI",23,0) Q "RTN","ZIBRPI",24,0) ; "RTN","ZIBRPI",25,0) OPT ;EP - Set option in OPTION file. Called by a programmer. "RTN","ZIBRPI",26,0) D OPT^ZIBRPI1 "RTN","ZIBRPI",27,0) Q "RTN","ZIBRPI",28,0) ; "RTN","ZIBRPI",29,0) START ;EP - From TaskMan. "RTN","ZIBRPI",30,0) NEW %ZIS,D,DA,DIC,E,F,I,J,L,N,O,P,POP,V,W,XMSUB,XMTEXT,XMY "RTN","ZIBRPI",31,0) D HFS "RTN","ZIBRPI",32,0) Q:POP "RTN","ZIBRPI",33,0) D OS "RTN","ZIBRPI",34,0) KILL ^TMP($J) "RTN","ZIBRPI",35,0) ; rm xmit files over 2 weeks old. "RTN","ZIBRPI",36,0) S L=$P(^AUTTLOC($P(^AUTTSITE(1,0),U),1),U,2) I '($L(L)=3) S L="RPI" "RTN","ZIBRPI",37,0) D HC(O("LS")_D("OUT")_O("NS")_L_".* > "_W) "RTN","ZIBRPI",38,0) S IOP=I,%ZIS("IOPAR")="("""_W_""":""R"")" "RTN","ZIBRPI",39,0) D ZIS,JDT "RTN","ZIBRPI",40,0) U IO "RTN","ZIBRPI",41,0) ; Comment next line to keep xmit ("rpi") files over 2 wks old. "RTN","ZIBRPI",42,0) F R %:300 Q:%="" S %=$P(%,"/",$L(%,"/")),X=+$P(%,".",2) I $P(%,".")=O("NS")_L,((+X>+J)!(+X<(+J-14))) D HC(O("RM")_D("OUT")_%) "RTN","ZIBRPI",43,0) D HC(O("RM")_W) "RTN","ZIBRPI",44,0) ; Initialize namespace, systems, and frequency. "RTN","ZIBRPI",45,0) S %=+$P(^DIC(19,$O(^DIC(19,"B","ZIB REMOTE PATCH INSTALLATION",0)),20)," ",2),D=$P($P(^(20),"""",2),U) "RTN","ZIBRPI",46,0) S:'("/\"[$E(D,$L(D))) D=D_$S(O["UNIX":"/",1:"\") "RTN","ZIBRPI",47,0) D HC(O("LS")_D_"*.*"_" > "_W) "RTN","ZIBRPI",48,0) S IOP=I,%ZIS("IOPAR")="("""_W_""":""R"")" "RTN","ZIBRPI",49,0) D ZIS "RTN","ZIBRPI",50,0) U IO "RTN","ZIBRPI",51,0) ; The Q:%="" in the following line is non-standard MUMPS. "RTN","ZIBRPI",52,0) F R %:300 Q:%="" S %=$P(%,"/",$L(%,"/")) I %?@O("PF") S ^TMP($J,"ZIBRPI",%)="" "RTN","ZIBRPI",53,0) S F="" "RTN","ZIBRPI",54,0) I '$L($O(^TMP($J,"ZIBRPI",""))) D ZISC D HC(O("RM")_W) KILL ^TMP($J) S:$D(ZTQUEUED) ZTREQ="@" Q "RTN","ZIBRPI",55,0) MAIN ; "RTN","ZIBRPI",56,0) F S F=$O(^TMP($J,"ZIBRPI",F)) Q:F="" D S ^TMP($J,"ZIBRPI",F)=% D:%="INSTALLED" HC(O("RM")_D_F) "RTN","ZIBRPI",57,0) . S X=$E(F,1,4),X=$P(X,"_"),N=$$UP^XLFSTR(X) "RTN","ZIBRPI",58,0) . I '$D(^DIC(9.4,"C",N)) S %="FAILED - Not an Installed Package" Q "RTN","ZIBRPI",59,0) . S P=$O(^DIC(9.4,"C",N,0)) "RTN","ZIBRPI",60,0) . I 'P S %="FAILED - Bad ""C"" x-ref for "_N Q "RTN","ZIBRPI",61,0) . I '$D(^DIC(9.4,P,"VERSION")) S %="FAILED - 'VERSION' Node Missing" Q "RTN","ZIBRPI",62,0) . S V=+($E(F,5,6)_"."_$E(F,7,8)) "RTN","ZIBRPI",63,0) . I (+V)'=(+^DIC(9.4,P,"VERSION")) S %="FAILED - V "_^("VERSION")_" of "_N_" is Installed" Q "RTN","ZIBRPI",64,0) . ; S E=$S("AB"[$E(N):$E(N),1:"B")_"9"_N_$P($P(F,".",2),"p",2) ; XB*3*3 IHS/ADC/GTH 04-25-97 Correct patch file name handling. "RTN","ZIBRPI",65,0) . S E=$S("AB"[$E(N):$E(N),1:"B")_"9"_N_(+$P($P(F,".",2),"p",1)) ; XB*3*3 IHS/ADC/GTH 04-25-97 Correct patch file name handling. "RTN","ZIBRPI",66,0) . U IO:(D_F) "RTN","ZIBRPI",67,0) . R %:300 "RTN","ZIBRPI",68,0) . R %:300 "RTN","ZIBRPI",69,0) . ; The ZL and ZS in the following line are non-standard M commands. "RTN","ZIBRPI",70,0) . F R %:300 Q:%="" S:%=E ^TMP($J,"B9",%)="" X "ZL ZS @%" "RTN","ZIBRPI",71,0) . S DA(1)=^DIC(9.4,P,"VERSION"),DA(1)=$O(^DIC(9.4,P,22,"B",DA(1)_$S(DA(1)[".":"",1:".0"),0)) "RTN","ZIBRPI",72,0) . I 'DA(1) S DA(1)=$P(^DIC(9.4,P,22,0),U,3) "RTN","ZIBRPI",73,0) . S:'$D(^DIC(9.4,P,22,DA(1),"PAH",0)) ^(0)="^9.4901^^" "RTN","ZIBRPI",74,0) . ; S X=N_"*"_V_"*"_$P($P(F,".",2),"p",2),DIC="^DIC(9.4,"_P_",22,"_DA(1)_",""PAH"",",DIC(0)="",DIC("DR")=".02///"_DT_";.03///.5",DA(2)=P ; XB*3*3 IHS/ADC/GTH 04-25-97 Correct patch file name handling. "RTN","ZIBRPI",75,0) . S X=N_"*"_V_"*"_(+$P($P(F,".",2),"p",1)),DIC="^DIC(9.4,"_P_",22,"_DA(1)_",""PAH"",",DIC(0)="",DIC("DR")=".02///"_DT_";.03///.5",DA(2)=P ; XB*3*3 IHS/ADC/GTH 04-25-97 Correct patch file name handling. "RTN","ZIBRPI",76,0) . D FILE "RTN","ZIBRPI",77,0) . S %="INSTALLED" "RTN","ZIBRPI",78,0) . Q "RTN","ZIBRPI",79,0) ENDMAIN ; "RTN","ZIBRPI",80,0) D OS "RTN","ZIBRPI",81,0) S %=0,F="",D=D("OUT")_O("NS")_L_"."_J "RTN","ZIBRPI",82,0) U IO:(D:"W") "RTN","ZIBRPI",83,0) F S F=$O(^TMP($J,"ZIBRPI",F)) Q:F="" W L,U,F,U,^(F),U,DT,! S %=%+1,XMTEXT(%)="Restore from file "_$E(F_$J("",14),1,14)_": "_^(F) "RTN","ZIBRPI",84,0) U IO:(W) "RTN","ZIBRPI",85,0) D ZISC,HC(O("RM")_W) "RTN","ZIBRPI",86,0) ; uucp according to parameter: ENTRY ACTION of option. "RTN","ZIBRPI",87,0) S %=+$P(^DIC(19,$O(^DIC(19,"B","ZIB REMOTE PATCH INSTALLATION",0)),20)," ",2),E=$P($P(^(20),"""",2),U,2) "RTN","ZIBRPI",88,0) I O["UNIX" D "RTN","ZIBRPI",89,0) . I '(%=2) D HC("uucp -r "_D_" "_$P($T(SYTM),";",3)_"!~") "RTN","ZIBRPI",90,0) . I %>1 D HC("uucp -r -nroot "_D_" "_$P(^AUTTSITE(1,0),U,14)_"!~") "RTN","ZIBRPI",91,0) . Q "RTN","ZIBRPI",92,0) S XMTEXT="XMTEXT(",XMSUB=$P($P($T(ZIBRPI),";",2),"-",2),XMY(1)="" "RTN","ZIBRPI",93,0) D XMD "RTN","ZIBRPI",94,0) I E S %="" F S %=$O(^TMP($J,"B9",%)) Q:%="" D RTN(U_%) "RTN","ZIBRPI",95,0) KILL ^TMP($J) "RTN","ZIBRPI",96,0) S ZTREQ="@" "RTN","ZIBRPI",97,0) Q ; "RTN","ZIBRPI",98,0) Q "RTN","ZIBRPI",99,0) ; "RTN","ZIBRPI",100,0) DIE NEW D,E,F,I,J,L,N,O,P,V,W D ^DIE Q "RTN","ZIBRPI",101,0) DIR NEW D,E,F,I,J,L,N,O,P,V,W D ^DIR Q "RTN","ZIBRPI",102,0) DTC NEW D,E,F,I,J,L,N,O,P,V,W D ^%DTC Q "RTN","ZIBRPI",103,0) FILE NEW D,E,F,I,J,L,N,O,P,V,W KILL DD,DO D FILE^DICN Q "RTN","ZIBRPI",104,0) HC(%) NEW D,E,F,I,J,L,N,O,P,V,W S %=$$JOBWAIT^%HOSTCMD(%) Q "RTN","ZIBRPI",105,0) RTN(%) NEW D,E,F,I,J,L,N,O,P,V,W D @(%) Q "RTN","ZIBRPI",106,0) XMD NEW D,E,F,I,J,L,N,O,P,V,W D ^XMD Q "RTN","ZIBRPI",107,0) ZIS NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZIS Q "RTN","ZIBRPI",108,0) ZISC NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZISC Q "RTN","ZIBRPI",109,0) ; "RTN","ZIBRPI",110,0) HFS ; "RTN","ZIBRPI",111,0) ; F I=0:0 S I=$O(^%ZIS(1,I)) Q:'I I ^(I,"TYPE")="HFS" S IOP=$P(^%ZIS(1,I,0),U),%ZIS("IOPAR")="(""/usr/spool/uucpublic/work.zib"":""W"")" D ZIS Q:'POP ; XB*3*1 IHS/ADC/GTH 03-07-97 Correct spelling of uucppublic. "RTN","ZIBRPI",112,0) F I=0:0 S I=$O(^%ZIS(1,I)) Q:'I I ^(I,"TYPE")="HFS" S IOP=$P(^%ZIS(1,I,0),U),%ZIS("IOPAR")="(""/usr/spool/uucppublic/work.zib"":""W"")" D ZIS Q:'POP ; XB*3*1 IHS/ADC/GTH 03-07-97 Correct spelling of uucppublic. "RTN","ZIBRPI",113,0) I 'I,'$D(POP) S POP=1 "RTN","ZIBRPI",114,0) Q:POP "RTN","ZIBRPI",115,0) S I=$P(^%ZIS(1,I,0),U) "RTN","ZIBRPI",116,0) Q "RTN","ZIBRPI",117,0) ; "RTN","ZIBRPI",118,0) JDT ; "RTN","ZIBRPI",119,0) NEW X1,X2 "RTN","ZIBRPI",120,0) S X2=$E(DT,1,3)_"0101",X1=DT "RTN","ZIBRPI",121,0) D DTC "RTN","ZIBRPI",122,0) S X=X+1,X="00"_X,J=$E(X,$L(X)-2,$L(X)) "RTN","ZIBRPI",123,0) Q "RTN","ZIBRPI",124,0) ; "RTN","ZIBRPI",125,0) OS ; The "IN" directory is retrieved from the OPTION entry. "RTN","ZIBRPI",126,0) S O=$P($P(^%ZOSF("OS"),","),"-",2),O("PF")=$P($T(PATTERN),";",3) "RTN","ZIBRPI",127,0) S W=$P($T(WORK),";",3),O("NS")=$P($T(NS),";",3) "RTN","ZIBRPI",128,0) I O["UNIX" S (D("IN"),D("OUT"))=$P($T(PUB),";",3),O("RM")="rm ",O("LS")="ls -l ",W=D("OUT")_W Q "RTN","ZIBRPI",129,0) S %=$G(^AUTTSITE(1,1)),D("IN")=$P(%,U),D("OUT")=$P(%,U,2),O("RM")="DEL ",O("LS")="DIR /B " "RTN","ZIBRPI",130,0) Q "RTN","ZIBRPI",131,0) ; "RTN","ZIBRPI",132,0) ; XB*3*2 IHS/ADC/GTH 04-21-97 Correct patch file pattern match. "RTN","ZIBRPI",133,0) ; Old PATTERN: "RTN","ZIBRPI",134,0) ;;2.4L.2"_"4N1"."1"p"1.2N "RTN","ZIBRPI",135,0) SYTM ;;dpssyg "RTN","ZIBRPI",136,0) PATTERN ;;2.4L.2"_"4N1"."1.2N1"p"; XB*3*2 IHS/ADC/GTH 04-21-97 Correct patch file pattern match. "RTN","ZIBRPI",137,0) WORK ;;ZIBRPI.WRK "RTN","ZIBRPI",138,0) PUB ;;/usr/spool/uucppublic/ "RTN","ZIBRPI",139,0) NS ;;ZIB_P "RTN","ZIBRPI1") 0^212^B19770628 "RTN","ZIBRPI1",1,0) ZIBRPI1 ; IHS/ADC/GTH - REMOTE PATCH INSTALLATION (1) ; [ 02/07/97 3:02 PM ] "RTN","ZIBRPI1",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRPI1",3,0) ; "RTN","ZIBRPI1",4,0) W !!,"EXECUTION UNAUTHORIZED.",! "RTN","ZIBRPI1",5,0) Q "RTN","ZIBRPI1",6,0) ; "RTN","ZIBRPI1",7,0) OPT ;EP - Set option in OPTION file. "RTN","ZIBRPI1",8,0) I $P(^%ZOSF("OS"),"^")'["MSM" W !!,"SORRY. MSM only.",! Q "RTN","ZIBRPI1",9,0) I $S('$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !,"PROGRAMMER ACCESS REQUIRED",! Q "RTN","ZIBRPI1",10,0) D HOME^%ZIS,DT^DICRW,00:'$L($P(^AUTTSITE(1,0),U,14)) "RTN","ZIBRPI1",11,0) NEW ZIB,ZIBAREA,D,DA,DIC,DIE,DR,I,O,POP,W "RTN","ZIBRPI1",12,0) D HFS "RTN","ZIBRPI1",13,0) I POP W !,"HFS not available." Q "RTN","ZIBRPI1",14,0) D OS,HELP^ZIBRPI2("GEN") "RTN","ZIBRPI1",15,0) S Y=1,%="Enter a number to choose the systems to which you want this report sent" "RTN","ZIBRPI1",16,0) I $L($P(^AUTTSITE(1,0),U,14)) S DIR(0)="N^1:3:0",DIR("A")="Send reports to (1) "_$P($T(SYTM),";;",2)_" (2) "_$P(^(0),U,14)_" or (3) both",DIR("B")=2,DIR("?")=%,DIR("??")="^D HELP^ZIBRPI2(""SYSID"")" D DIR I $D(DIRUT) D ZISC Q "RTN","ZIBRPI1",17,0) KILL DIR "RTN","ZIBRPI1",18,0) S ZIBAREA="20///I "_Y "RTN","ZIBRPI1",19,0) S DIR(0)="F^1:245",DIR("A")="From what "_$P(O,U)_" directory do you want to restore patches",DIR("?")="Enter the full path name of a directory",DIR("??")="^D HELP^ZIBRPI2(""DIRECT"")" "RTN","ZIBRPI1",20,0) S:D("IN")]"" DIR("B")=D("IN") "RTN","ZIBRPI1",21,0) ; The following line is non-standard M because of the Q:$L(X) "RTN","ZIBRPI1",22,0) F D DIR Q:$D(DIRUT) D HC(O("LS")_Y_"* > "_W) S IOP=I,%ZIS("IOPAR")="("""_W_""":""R"")" D ZIS U IO R X:300 U IO(0) Q:$L(X) W " Directory does not exist (or empty).",*7 "RTN","ZIBRPI1",23,0) S D=Y "RTN","ZIBRPI1",24,0) D ZISC "RTN","ZIBRPI1",25,0) Q:$D(DIRUT) "RTN","ZIBRPI1",26,0) S ZIBAREA=ZIBAREA_" S:0 %="""_D "RTN","ZIBRPI1",27,0) S (DIR(0),DIR("B"))="Y",DIR("A")="If action routine '(A/B)9' exists, do you want it ran",DIR("??")="^D HELP^ZIBRPI2(""ACTION"")" "RTN","ZIBRPI1",28,0) D DIR "RTN","ZIBRPI1",29,0) Q:$D(DIRUT) "RTN","ZIBRPI1",30,0) S ZIBAREA=ZIBAREA_U_Y_"""" "RTN","ZIBRPI1",31,0) S DIC="^DIC(19,",DIC(0)="",X="ZIB REMOTE PATCH INSTALLATION",DIC("DR")="1///Remote Patch Installation;4///R;"_ZIBAREA_";25///START^ZIBRPI;200///T@2315;202///1D" "RTN","ZIBRPI1",32,0) F ZIB="ZIB REMOTE PATCH INSTALLATION","AZHL REMOTE PATCH INSTALLATION" I $D(^DIC(19,"B",ZIB)) S DIE=DIC,DA=$O(^DIC(19,"B",ZIB,0)),DR=".01///"_X_";"_ZIBAREA_";25///START^ZIBRPI" D DIE I 1 Q "RTN","ZIBRPI1",33,0) E D FILE "RTN","ZIBRPI1",34,0) W !!,"Done." "RTN","ZIBRPI1",35,0) Q "RTN","ZIBRPI1",36,0) ; "RTN","ZIBRPI1",37,0) DIE NEW D,E,F,I,J,L,N,O,P,V,W D ^DIE Q "RTN","ZIBRPI1",38,0) DIR NEW D,E,F,I,J,L,N,O,P,V,W D ^DIR Q "RTN","ZIBRPI1",39,0) FILE NEW D,E,F,I,J,L,N,O,P,V,W KILL DD,DO D FILE^DICN Q "RTN","ZIBRPI1",40,0) HC(%) NEW D,E,F,I,J,L,N,O,P,V,W S %=$$JOBWAIT^%HOSTCMD(%) Q "RTN","ZIBRPI1",41,0) XMD NEW D,E,F,I,J,L,N,O,P,V,W D ^XMD Q "RTN","ZIBRPI1",42,0) ZIS NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZIS Q "RTN","ZIBRPI1",43,0) ZISC NEW D,E,F,I,J,L,N,O,P,V,W D ^%ZISC Q "RTN","ZIBRPI1",44,0) ; "RTN","ZIBRPI1",45,0) HFS ; "RTN","ZIBRPI1",46,0) F I=0:0 S I=$O(^%ZIS(1,I)) Q:'I I ^(I,"TYPE")="HFS" S IOP=$P(^%ZIS(1,I,0),U),%ZIS("IOPAR")="(""/usr/spool/uucppublic/work.zib"":""W"")" D ZIS Q:'POP "RTN","ZIBRPI1",47,0) I 'I,'$D(POP) S POP=1 "RTN","ZIBRPI1",48,0) Q:POP "RTN","ZIBRPI1",49,0) S I=$P(^%ZIS(1,I,0),U) "RTN","ZIBRPI1",50,0) Q "RTN","ZIBRPI1",51,0) ; "RTN","ZIBRPI1",52,0) OS ; "RTN","ZIBRPI1",53,0) S O=$P($P(^%ZOSF("OS"),","),"-",2) "RTN","ZIBRPI1",54,0) S O("PF")=$P($T(PATTERN^ZIBRPI),";",3) "RTN","ZIBRPI1",55,0) S W=$P($T(WORK^ZIBRPI),";",3) "RTN","ZIBRPI1",56,0) I O["UNIX" S (D("IN"),D("OUT"))=$P($T(PUB^ZIBRPI),";",3),O("RM")="rm ",O("LS")="ls -l ",W=D("OUT")_W Q "RTN","ZIBRPI1",57,0) S %=$G(^AUTTSITE(1,1)),D("IN")=$P(%,U),D("OUT")=$P(%,U,2),O("RM")="DEL ",O("LS")="DIR /B " "RTN","ZIBRPI1",58,0) Q "RTN","ZIBRPI1",59,0) ; "RTN","ZIBRPI1",60,0) SYTM ;;dpssyg "RTN","ZIBRPI1",61,0) 10 ;;abr-ab "RTN","ZIBRPI1",62,0) 11 ;;bji-ao "RTN","ZIBRPI1",63,0) 20 ;;albisc "RTN","ZIBRPI1",64,0) 30 ;;akarea "RTN","ZIBRPI1",65,0) 40 ;;bilcsy "RTN","ZIBRPI1",66,0) 50 ;;okc-ao "RTN","ZIBRPI1",67,0) 51 ;;nsa-oa "RTN","ZIBRPI1",68,0) 61 ;;cao-as "RTN","ZIBRPI1",69,0) 60 ;;phx-ao "RTN","ZIBRPI1",70,0) 70 ;;pordps "RTN","ZIBRPI1",71,0) 80 ;;nav-aa "RTN","ZIBRPI1",72,0) 00 ;;tucdev "RTN","ZIBRPI1",73,0) NEW DIE,DR,DA "RTN","ZIBRPI1",74,0) S DA=$P($T(@($P(^AUTTAREA($P(^AUTTLOC($P(^AUTTSITE(1,0),U),0),U,4),0),U,2))),";;",2),DR="W $J("""",IOM-$L(X)\2)_X,!!" "RTN","ZIBRPI1",75,0) W !! "RTN","ZIBRPI1",76,0) F X="A system id for your area computer does not exist in the RPMS SITE file.","Based on your area code, it should probably be '"_DA_"'.","Please enter an area system id into the RPMS SITE file, now.","(Calling DIE for you)." X DR "RTN","ZIBRPI1",77,0) S DIE="^AUTTSITE(",DR=".14//"_DA,DA=1 "RTN","ZIBRPI1",78,0) D DIE "RTN","ZIBRPI1",79,0) Q "RTN","ZIBRPI2") 0^213^B13708846 "RTN","ZIBRPI2",1,0) ZIBRPI2 ; IHS/ADC/GTH - REMOTE PATCH INSTALLATION (2) ; [ 02/07/97 3:02 PM ] "RTN","ZIBRPI2",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRPI2",3,0) ; "RTN","ZIBRPI2",4,0) W !!,"EXECUTION UNAUTHORIZED.",! "RTN","ZIBRPI2",5,0) Q "RTN","ZIBRPI2",6,0) ; "RTN","ZIBRPI2",7,0) GEN ; General description "RTN","ZIBRPI2",8,0) ;;This utility creates an entry in the OPTION file which is scheduled "RTN","ZIBRPI2",9,0) ;;to run daily thru TaskMan. Files matching the naming conventions "RTN","ZIBRPI2",10,0) ;;for patch files (specified in the 1 Sep 94 SAC, Appendix E), are "RTN","ZIBRPI2",11,0) ;;looked for in the directory you indicate. If the package and "RTN","ZIBRPI2",12,0) ;;version the patches are intended for are installed on this machine, "RTN","ZIBRPI2",13,0) ;;the routines are restored from the file, an entry is made in the "RTN","ZIBRPI2",14,0) ;;VERSION multiple of the PACKAGE file entry, and a report file is "RTN","ZIBRPI2",15,0) ;;sent to the systems you indicate. If an action routine (A9 or B9) "RTN","ZIBRPI2",16,0) ;;is detected during the ZLOAD, and you have indicated permission to "RTN","ZIBRPI2",17,0) ;;run action routines, the action routine is called after all routines "RTN","ZIBRPI2",18,0) ;;have been restored. "RTN","ZIBRPI2",19,0) ;;NOTE: Use the same entry point, OPT^ZIBRPI, to edit any changes you "RTN","ZIBRPI2",20,0) ;; want to make to the parameters. If you un-schedule the "RTN","ZIBRPI2",21,0) ;; option, you must use the TaskMan options to re-schedule it. "RTN","ZIBRPI2",22,0) ;;### "RTN","ZIBRPI2",23,0) ; "RTN","ZIBRPI2",24,0) SYSID ; Select system id's to receive result files. "RTN","ZIBRPI2",25,0) ;;Please indicate what system id's you want reports of results sent to. "RTN","ZIBRPI2",26,0) ;;Selecting 1 will send the report just to that system. "RTN","ZIBRPI2",27,0) ;;Selecting 2 will send the report to (what is intended to be) the "RTN","ZIBRPI2",28,0) ;;Area machine. "RTN","ZIBRPI2",29,0) ;;Selecting 3 will send the report to both systems. "RTN","ZIBRPI2",30,0) ;;It is recommended you just configure the utility to send report files "RTN","ZIBRPI2",31,0) ;;to your area machine (option 2). "RTN","ZIBRPI2",32,0) ;;NOTE: root will be notified upon arrival of a uucp'd result file. "RTN","ZIBRPI2",33,0) ;; You must read the file manually. "RTN","ZIBRPI2",34,0) ;;### "RTN","ZIBRPI2",35,0) ; "RTN","ZIBRPI2",36,0) DIRECT ; "RTN","ZIBRPI2",37,0) ;;Enter the name of the directory into which files containing patches "RTN","ZIBRPI2",38,0) ;;are uucp'd or BLAST'd, or otherwise placed. This is usually the "RTN","ZIBRPI2",39,0) ;;/usr/spool/uucppublic directory on unix machines. You can designate "RTN","ZIBRPI2",40,0) ;;any directory that you want, for security purposes, but you should "RTN","ZIBRPI2",41,0) ;;ensure that permissions are correctly set to receive the files, and "RTN","ZIBRPI2",42,0) ;;to read the files from the MUMPS level. "RTN","ZIBRPI2",43,0) ;;THIS DIRECTORY MUST EXIST PRIOR TO COMPLETING THIS SET-UP. "RTN","ZIBRPI2",44,0) ;;### "RTN","ZIBRPI2",45,0) ; "RTN","ZIBRPI2",46,0) ACTION ; "RTN","ZIBRPI2",47,0) ;;If an action routine is include in the patch file, do you want it "RTN","ZIBRPI2",48,0) ;;called after all the routines are restored? The action routine will "RTN","ZIBRPI2",49,0) ;;be named (A/B)9. E.g., A9AUM12 will be the "RTN","ZIBRPI2",50,0) ;;action routine for patch 12 to the table updates. "RTN","ZIBRPI2",51,0) ;;NOTE: This feature allows you to do any type of unattended activity "RTN","ZIBRPI2",52,0) ;; on any/all of your systems. There is no checking for verified "RTN","ZIBRPI2",53,0) ;; RPMS applications. There must simply be an entry in PACKAGE, "RTN","ZIBRPI2",54,0) ;; and the versions must match. "RTN","ZIBRPI2",55,0) ;;### "RTN","ZIBRPI2",56,0) ; "RTN","ZIBRPI2",57,0) HELP(L) ;EP - From DIR "RTN","ZIBRPI2",58,0) W ! "RTN","ZIBRPI2",59,0) F %=1:1 W !?4,$P($T(@L+%),";",3) Q:$P($T(@L+%+1),";",3)="###" "RTN","ZIBRPI2",60,0) Q "RTN","ZIBRPI2",61,0) ; "RTN","ZIBRPI2",62,0) ; dpssyg Any ACU2400 FTS-505-262-6250 n:--n:--n: uucpdps word: uucpdps "RTN","ZIBRPI2",63,0) ; dpssyg Any x25pad 9600 dpssyg "" \r n:--n:-@-n: uucpdps word: uucpdps "RTN","ZIBRPI2",64,0) ; "RTN","ZIBRPRTD") 0^214^B17090085 "RTN","ZIBRPRTD",1,0) ZIBRPRTD ; IHS/ADC/GTH - ROUTINE PRINT ; [ 10/29/2002 7:42 AM ] "RTN","ZIBRPRTD",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRPRTD",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBRPRTD",4,0) ; This routine lists routines edited after given date. "RTN","ZIBRPRTD",5,0) ; "RTN","ZIBRPRTD",6,0) BEGIN ; "RTN","ZIBRPRTD",7,0) ;Begin adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",8,0) ;I ^%ZOSF("OS")'["MSM" D OSNO^XB Q "RTN","ZIBRPRTD",9,0) ;S X="ERR^ZIBRPRTD",@^%ZOSF("TRAP") "RTN","ZIBRPRTD",10,0) ;W !?10,$P($P($ZV,","),"-")," - Routine Print Utility" "RTN","ZIBRPRTD",11,0) NEW ZIBOS "RTN","ZIBRPRTD",12,0) S ZIBOS=$$VERSION^%ZOSV(1) "RTN","ZIBRPRTD",13,0) I '(ZIBOS["Cache"),'(ZIBOS["MSM") D OSNO^XB Q "RTN","ZIBRPRTD",14,0) I ZIBOS["MSM" S X="ERR^ZIBRPRTD",@^%ZOSF("TRAP") "RTN","ZIBRPRTD",15,0) I ZIBOS["Cache" S X="BACK^%ETN",@^%ZOSF("TRAP") "RTN","ZIBRPRTD",16,0) W !?10,ZIBOS," - Routine Print Utility" "RTN","ZIBRPRTD",17,0) ;End adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",18,0) RSEL ; "RTN","ZIBRPRTD",19,0) S %DEV=$I "RTN","ZIBRPRTD",20,0) U 0 "RTN","ZIBRPRTD",21,0) KILL QUIT "RTN","ZIBRPRTD",22,0) ;X ^%ZOSF("RSEL") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",23,0) S %R=1 X ^%ZOSF("RSEL") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",24,0) ;I $D(QUIT) W !,"No routines selected" G EXIT ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",25,0) I $D(QUIT)!(%R=0) W !,"No routines selected" G EXIT ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",26,0) S XBTYPE="PRINT" "RTN","ZIBRPRTD",27,0) D ^XBDATE ;ADDED TO SPECIFY A DATE AND SCREEN OUT ROUTINES EDITED SINCE SPECIFIED DATE "RTN","ZIBRPRTD",28,0) I $D(QUIT) W !,"No routines will be printed." H 2 G EXIT "RTN","ZIBRPRTD",29,0) SDEV ; "RTN","ZIBRPRTD",30,0) ;I %DEV=$I D PR^%SDEV G:$D(QUIT) EXIT ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",31,0) D ^%ZIS G:POP EXIT S %DEV=IO ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",32,0) F1 ; "RTN","ZIBRPRTD",33,0) S %LPP=60,%W=132 "RTN","ZIBRPRTD",34,0) W !!,"Lines per page <",%LPP,">: " "RTN","ZIBRPRTD",35,0) R %I:$G(DTIME,999) "RTN","ZIBRPRTD",36,0) I %I="" S %I=%LPP W %I "RTN","ZIBRPRTD",37,0) I %I'?1N.N G:%I="^" SDEV:$I'=%DEV,RSEL G:%I="^Q" EXIT W !,*7,"Response must be positive numeric" G F1 "RTN","ZIBRPRTD",38,0) S %LPP=+%I "RTN","ZIBRPRTD",39,0) F2 ; "RTN","ZIBRPRTD",40,0) W !,"Characters per line <",%W,">: " "RTN","ZIBRPRTD",41,0) R %I:$G(DTIME,999) "RTN","ZIBRPRTD",42,0) I %I="" S %I=%W W %I "RTN","ZIBRPRTD",43,0) I %I'?1N.N G EXIT:%I="^Q",F1:%I="^" W !,*7,"Response must be positive numeric" G F2 "RTN","ZIBRPRTD",44,0) S %W=+%I,%L=%W-18-63,%CMT="" "RTN","ZIBRPRTD",45,0) G:%L'>0 START "RTN","ZIBRPRTD",46,0) CMT ; "RTN","ZIBRPRTD",47,0) R !,"Enter comment for page header : ",%CMT:$G(DTIME,999) "RTN","ZIBRPRTD",48,0) G F2:%CMT="^",CMT1:%CMT'="?" "RTN","ZIBRPRTD",49,0) W !,"The comment will be displayed with the UCI, date, and time on each page header." "RTN","ZIBRPRTD",50,0) G CMT "RTN","ZIBRPRTD",51,0) ; "RTN","ZIBRPRTD",52,0) CMT1 ; "RTN","ZIBRPRTD",53,0) I $L(%CMT)>%L W !,*7,"Too long. Maximum comment length is ",%L G CMT "RTN","ZIBRPRTD",54,0) START ; "RTN","ZIBRPRTD",55,0) D INT^%T,INT^%D "RTN","ZIBRPRTD",56,0) D FORMAT "RTN","ZIBRPRTD",57,0) U %DEV "RTN","ZIBRPRTD",58,0) ;Begin adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",59,0) ;W !! "RTN","ZIBRPRTD",60,0) ;I %DEV<20!(%DEV>63) U %DEV:%W "RTN","ZIBRPRTD",61,0) ;U 0 "RTN","ZIBRPRTD",62,0) I ZIBOS["Cache" W @IOF "RTN","ZIBRPRTD",63,0) I %DEV<20!(%DEV>63),ZIBOS["MSM" U %DEV:%W "RTN","ZIBRPRTD",64,0) U $P "RTN","ZIBRPRTD",65,0) ;End adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",66,0) W !!,"Done. " "RTN","ZIBRPRTD",67,0) EXIT ; "RTN","ZIBRPRTD",68,0) ;U 0 ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",69,0) ;I '$D(QUIT),%DEV'=$I,+%DEV S IO=%DEV D ^%ZISC ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",70,0) I '$D(QUIT),%DEV'=$I S IO=%DEV D ^%ZISC ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",71,0) KILL %DEV,%LPP,%W,%I,%J,%CMT,%TIM,%TIM1,%DAT,%DAT1,%PG,%PGG,%RN,%L,%R,%X,%,%BLK,QUIT "RTN","ZIBRPRTD",72,0) Q "RTN","ZIBRPRTD",73,0) ; "RTN","ZIBRPRTD",74,0) ERR ;EP - If error, from error trap. "RTN","ZIBRPRTD",75,0) I $F($$Z^ZIBNSSV("ERROR"),"") U 0 W !!,"...Aborted." D EXIT V 0:$J:$ZB($V(0,$J,2),#0400,7):2 "RTN","ZIBRPRTD",76,0) ZQ "RTN","ZIBRPRTD",77,0) ; "RTN","ZIBRPRTD",78,0) FORMAT ; "RTN","ZIBRPRTD",79,0) S %PG=1,%PGG=1 "RTN","ZIBRPRTD",80,0) W !!,"Printing ...",! "RTN","ZIBRPRTD",81,0) F3 ; "RTN","ZIBRPRTD",82,0) ;Begin adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",83,0) ;S %X="W:$Y # W !,""Routine: "",%RN,?20,""UCI: "",$ZU(0),"" Date/Time: "",%DAT1,"", "",%TIM1,?$X+3,%CMT,?%W-18,""Page: "",%PG,""-"",%PGG,! S %PGG=%PGG+1" "RTN","ZIBRPRTD",84,0) ;U %DEV "RTN","ZIBRPRTD",85,0) ;I %DEV<20!(%DEV>63) U %DEV:%W "RTN","ZIBRPRTD",86,0) ;S %RN="" "RTN","ZIBRPRTD",87,0) ;F %I=1:1 S %RN=$O(^UTILITY($J,%RN)) Q:%RN="" X:$V(8,$J,2)'=$I "U 0 W ?$S($X=0:0,1:$X+10\10*10-1),%RN W:$X>70 ! U %DEV" D F4 S %PG=%PG+1,%PGG=1 "RTN","ZIBRPRTD",88,0) S:ZIBOS["MSM" %X="W:$Y # W !,""Routine: "",%RN,?20,""UCI: "",$ZU(0),"" Date/Time: "",%DAT1,"", "",%TIM1,?$X+3,%CMT,?%W-18,""Page: "",%PG,""-"",%PGG,! S %PGG=%PGG+1" "RTN","ZIBRPRTD",89,0) S:ZIBOS["Cache" %X="W:$Y # W !,""Routine: "",%RN,?20,""Namespace: "",$ZU(5),"" Date/Time: "",%DAT,"", "",%TIM,?$X+3,%CMT,?%W-18,""Page: "",%PG,""-"",%PGG,! S %PGG=%PGG+1" "RTN","ZIBRPRTD",90,0) U %DEV "RTN","ZIBRPRTD",91,0) I ZIBOS["MSM" D "RTN","ZIBRPRTD",92,0) . I %DEV<20!(%DEV>63) U %DEV:%W "RTN","ZIBRPRTD",93,0) . S %RN="" "RTN","ZIBRPRTD",94,0) . F %I=1:1 S %RN=$O(^UTILITY($J,%RN)) Q:%RN="" X:$V(8,$J,2)'=$I "U 0 W ?$S($X=0:0,1:$X+10\10*10-1),%RN W:$X>70 ! U %DEV" D F4 S %PG=%PG+1,%PGG=1 "RTN","ZIBRPRTD",95,0) I ZIBOS["Cache" D "RTN","ZIBRPRTD",96,0) . S %RN=0 "RTN","ZIBRPRTD",97,0) . F %I=1:1 S %RN=$O(^UTILITY($J,%RN)) Q:%RN="" X "U $P W ?$S($X=0:0,1:$X+10\10*10-1),%RN W:$X>70 ! U %DEV" D F4 S %PG=%PG+1,%PGG=1 "RTN","ZIBRPRTD",98,0) ;End adds/edits;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRPRTD",99,0) Q "RTN","ZIBRPRTD",100,0) ; "RTN","ZIBRPRTD",101,0) F4 ; "RTN","ZIBRPRTD",102,0) X %X "RTN","ZIBRPRTD",103,0) X "ZL @%RN F %I=1:1 S %J=$T(+%I) Q:%J="""" S %L=$P(%J,"" ""),%R=$P(%J,"" "",2,255) X:$Y>%LPP %X W !,%L,?10 F %J=1:%W-10:255 S %L=$E(%R,1,%W-10),%R=$E(%R,%W-10+1,255) W %L Q:%R="""" X:$Y>%LPP %X W !,""..........""" "RTN","ZIBRPRTD",104,0) Q "RTN","ZIBRPRTD",105,0) ; "RTN","ZIBRSEL") 0^215^B4290207 "RTN","ZIBRSEL",1,0) ZIBRSEL ; IHS/ADC/GTH - NONINTERACTIVE ROUTINE SELECT ; [ 10/29/2002 7:42 AM ] "RTN","ZIBRSEL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRSEL",3,0) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBRSEL",4,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBRSEL",5,0) ; "RTN","ZIBRSEL",6,0) ; Return the number of selected routines set into the "RTN","ZIBRSEL",7,0) ; indicated variable. "RTN","ZIBRSEL",8,0) ; "RTN","ZIBRSEL",9,0) ; E.g.: "RTN","ZIBRSEL",10,0) ; I '$$RSEL^ZIBRSEL("B-BZZZZZZZ","ARRAY(") W "NONE SELECTED" Q "RTN","ZIBRSEL",11,0) ; "RTN","ZIBRSEL",12,0) ; If routines exists in the list or range, their name will "RTN","ZIBRSEL",13,0) ; be returned as the last subscript of indicated variable in "RTN","ZIBRSEL",14,0) ; the 2nd parameter. The default is ^TMP("ZIBRSEL",$J, "RTN","ZIBRSEL",15,0) ; "RTN","ZIBRSEL",16,0) ; If routine B exists, then node ^TMP("ZIBRSEL",$J,"B") will "RTN","ZIBRSEL",17,0) ; be null. "RTN","ZIBRSEL",18,0) ; "RTN","ZIBRSEL",19,0) ; It is the programmer's responsibility to ensure the name "RTN","ZIBRSEL",20,0) ; of the array is correctly formed. "RTN","ZIBRSEL",21,0) ; "RTN","ZIBRSEL",22,0) ; Variables used: "RTN","ZIBRSEL",23,0) ; X = String indicating list or range of routines. "RTN","ZIBRSEL",24,0) ; Y = String indicating variable into which to set the "RTN","ZIBRSEL",25,0) ; selected routines. Default = ^TMP("ZIBRSEL",$J, "RTN","ZIBRSEL",26,0) ; F = First routine, if range. "RTN","ZIBRSEL",27,0) ; L = Last routine, if range. "RTN","ZIBRSEL",28,0) ; N = Number of routines returned. "RTN","ZIBRSEL",29,0) ; Q = Quote character. "RTN","ZIBRSEL",30,0) ; "RTN","ZIBRSEL",31,0) Q "RTN","ZIBRSEL",32,0) ; "RTN","ZIBRSEL",33,0) RSEL(X,Y) ;PEP - Select a list or range of routines, return in Y, # sel in N. "RTN","ZIBRSEL",34,0) I '$L($G(X)) Q "NO ROUTINES SPECIFIED IN PARAMETER" "RTN","ZIBRSEL",35,0) NEW F,L,N,O,Q "RTN","ZIBRSEL",36,0) ; S O=$P(^%ZOSF("OS"),"-",1) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBRSEL",37,0) ;S O=$P(^%ZOSF("OS"),"^",1) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",38,0) ;I O["MSM" S O="MSM" ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",39,0) ;E S O="unknown" ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",40,0) ;I '$L($T(@O)) Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",41,0) S O=$$VERSION^%ZOSV(1),O=$P(O," ") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",42,0) I '(O["Cache"),'(O["MSM") Q "OPERATING SYSTEM '"_O_"' NOT SUPPORTED." ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",43,0) I '$L($G(Y)) KILL ^TMP("ZIBRSEL",$J) S Y="^TMP(""ZIBRSEL"","_$J_"," "RTN","ZIBRSEL",44,0) S F=$P(X,"-"),L=$P(X,"-",2),N=0,Q="""" "RTN","ZIBRSEL",45,0) I '(F]"") Q 0 "RTN","ZIBRSEL",46,0) I F["*" S F=$P(F,"*"),L="*",X=$P(X,"*") "RTN","ZIBRSEL",47,0) ;D @O ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",48,0) D DIR ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",49,0) Q N "RTN","ZIBRSEL",50,0) ; "RTN","ZIBRSEL",51,0) DIR ; Check the directory ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",52,0) MSM ; Micronetics Standard MUMPS. "RTN","ZIBRSEL",53,0) ;I F]"",$D(^ (F)) S N=N+1,@(Y_Q_F_Q_")")="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",54,0) I F]"",$D(^$R(F)) S N=N+1,@(Y_Q_F_Q_")")="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",55,0) I L="*" D Q "RTN","ZIBRSEL",56,0) . ; F S F=$O(^ (F)) Q:F=""!('(X=$E(F,1,$L(X)))) S N=N+1,@(Y_Q_F_Q_")")="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",57,0) . F S F=$O(^$R(F)) Q:F=""!('(X=$E(F,1,$L(X)))) S N=N+1,@(Y_Q_F_Q_")")="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",58,0) .Q "RTN","ZIBRSEL",59,0) ; F S F=$O(^ (F)) Q:F=""!(F]L) S N=N+1,@(Y_Q_F_Q_")")="" Q:L="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",60,0) F S F=$O(^$R(F)) Q:F=""!(F]L) S N=N+1,@(Y_Q_F_Q_")")="" Q:L="" ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBRSEL",61,0) Q "RTN","ZIBRSEL",62,0) ; "RTN","ZIBRUN") 0^216^B8214247 "RTN","ZIBRUN",1,0) %ZIBRUN ; IHS/ADC/GTH - CHECK FOR ACTIVE ROUTINE IN A SPECIFIC UCI ; [ 02/07/97 3:02 PM ] "RTN","ZIBRUN",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBRUN",3,0) ; "RTN","ZIBRUN",4,0) EN ; "RTN","ZIBRUN",5,0) Q:'($ZV?1"MSM".E!($ZV?1"DSM".E)) ; Only works for MSM or DSM. "RTN","ZIBRUN",6,0) ; Name of routine to be checked is passed in X. "RTN","ZIBRUN",7,0) S %ZIB("PARM")=X "RTN","ZIBRUN",8,0) S:$P(%ZIB("PARM"),"^",2)="" $P(%ZIB("PARM"),"^",2)=$ZU(0) ; If no UCI set to current UCI. "RTN","ZIBRUN",9,0) S %ZIB("OP SYS")=$ZV ; Set operating system. "RTN","ZIBRUN",10,0) D @$S(%ZIB("OP SYS")?1"DSM".E:"DSM",1:"MSM") ; Active JOB lookup per operating system. "RTN","ZIBRUN",11,0) D CK "RTN","ZIBRUN",12,0) D OUT ; KILL off variables and exit gracefully. "RTN","ZIBRUN",13,0) Q "RTN","ZIBRUN",14,0) ; "RTN","ZIBRUN",15,0) MSM ; MSM specific look up active JOBs. "RTN","ZIBRUN",16,0) S $ZT="MER" "RTN","ZIBRUN",17,0) V 44:$J:$ZB($V(44,$J,2),1,7):2 "RTN","ZIBRUN",18,0) S %ZIB("SYS TBL")=$V(44),%ZIB("JOB TBL")=$V(%ZIB("SYS TBL")+8,-3,2)+%ZIB("SYS TBL"),%ZIB("MAX JOBS")=$V($V(%ZIB("SYS TBL")+284),-3,4),%ZIB("PARTITION")=$V(3*4+%ZIB("JOB TBL")) "RTN","ZIBRUN",19,0) ; Build active JOB table (%ZIB("ACT JOB") "RTN","ZIBRUN",20,0) F %ZIB("ACT JOB")=1:1:%ZIB("MAX JOBS") S:$V(%ZIB("ACT JOB")*4+%ZIB("PARTITION")) $P(%ZIB("JOB TABLE",%ZIB("ACT JOB")),"^",2)=$ZU(($V(2,%ZIB("ACT JOB"),2)#32),($V(2,%ZIB("ACT JOB"),2)\32)) "RTN","ZIBRUN",21,0) Q "RTN","ZIBRUN",22,0) ; "RTN","ZIBRUN",23,0) MER ; MSM error trap. "RTN","ZIBRUN",24,0) V 44:$J:$ZB($V(44,$J,2),#FFFE,1):2 "RTN","ZIBRUN",25,0) ZQ "RTN","ZIBRUN",26,0) ; "RTN","ZIBRUN",27,0) DSM ; DSM specific look up active JOBs. "RTN","ZIBRUN",28,0) S %ZIB("SYS TBL")=$V(44),%ZIB("JOB TBL")=$V(%ZIB("SYS TBL")+4) "RTN","ZIBRUN",29,0) ; Build active JOB table (%ZIB("JOB TABLE")) "RTN","ZIBRUN",30,0) F %ZIB("JOB OFFSET")=%ZIB("JOB TBL")+2:2:%ZIB("JOB TBL")+126 I $V(%ZIB("JOB OFFSET")+1),$V(%ZIB("JOB OFFSET")+1)'=244 D "RTN","ZIBRUN",31,0) . S %ZIB("ACT JOB")=%ZIB("JOB OFFSET")-%ZIB("JOB TBL")\2 "RTN","ZIBRUN",32,0) . I %ZIB("ACT JOB")]"" D "RTN","ZIBRUN",33,0) .. S %ZIB("UCI NBR")=$V(149,%ZIB("ACT JOB")) "RTN","ZIBRUN",34,0) .. I %ZIB("UCI NBR")]"" D "RTN","ZIBRUN",35,0) ... S $P(%ZIB("JOB TABLE",%ZIB("ACT JOB")),"^",2)=$ZU(%ZIB("UCI NBR")) "RTN","ZIBRUN",36,0) ... S %ZIB("ACT RTN")="" "RTN","ZIBRUN",37,0) ... F %ZIB("LOC")=502:1:509 Q:$V(%ZIB("LOC"),%ZIB("ACT JOB"))#256>127!'$V(%ZIB("LOC"),%ZIB("ACT JOB")) S %ZIB("ACT RTN")=%ZIB("ACT RTN")_$C($V(%ZIB("LOC"),%ZIB("ACT JOB"))#128) "RTN","ZIBRUN",38,0) ... S $P(%ZIB("JOB TABLE",%ZIB("ACT JOB")),"^",1)=%ZIB("ACT RTN") "RTN","ZIBRUN",39,0) Q "RTN","ZIBRUN",40,0) ; "RTN","ZIBRUN",41,0) CK ; Check %ZIB("JOB TABLE) for match of ROUTINE^UCI. "RTN","ZIBRUN",42,0) S %ZIB("$T")=0,%ZIB("JOB NBR")="" "RTN","ZIBRUN",43,0) F S %ZIB("JOB NBR")=$O(%ZIB("JOB TABLE",%ZIB("JOB NBR"))) Q:%ZIB("JOB NBR")="" I %ZIB("JOB TABLE",%ZIB("JOB NBR"))=%ZIB("PARM") S %ZIB("$T")=1 Q "RTN","ZIBRUN",44,0) Q "RTN","ZIBRUN",45,0) ; "RTN","ZIBRUN",46,0) OUT ; "RTN","ZIBRUN",47,0) I $ZV?1"MSM".E V 44:$J:$ZB($V(44,$J,2),#FFFE,1):2 "RTN","ZIBRUN",48,0) I %ZIB("$T") "RTN","ZIBRUN",49,0) Q "RTN","ZIBRUN",50,0) ; "RTN","ZIBTCP") 0^217^B2219671 "RTN","ZIBTCP",1,0) ZIBTCP ; IHS/ADC/GTH - TCP PRINT TEST ; [ 02/07/97 3:02 PM ] "RTN","ZIBTCP",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBTCP",3,0) ; "RTN","ZIBTCP",4,0) ; "RTN","ZIBTCP",5,0) ; This routine must be DONE from the CLOSE EXECUTE when "RTN","ZIBTCP",6,0) ; printing to a TCP printer. See below for further "RTN","ZIBTCP",7,0) ; documentation. "RTN","ZIBTCP",8,0) ; "RTN","ZIBTCP",9,0) ; H = Host IP address "RTN","ZIBTCP",10,0) ; P = Port number "RTN","ZIBTCP",11,0) ; I = Counter "RTN","ZIBTCP",12,0) ; "RTN","ZIBTCP",13,0) EN ; "RTN","ZIBTCP",14,0) D EN1 "RTN","ZIBTCP",15,0) EXIT ; "RTN","ZIBTCP",16,0) S ZIBX="rm XM"_ZIBH_".DAT",ZIBX=$$JOBWAIT^%HOSTCMD(ZIBX) "RTN","ZIBTCP",17,0) KILL ^TMP($J,"XM"_ZIBH),ZIBH,ZIBIO,ZIBI,ZIBX "RTN","ZIBTCP",18,0) Q "RTN","ZIBTCP",19,0) ; "RTN","ZIBTCP",20,0) EN1 ; "RTN","ZIBTCP",21,0) NEW H,P,I "RTN","ZIBTCP",22,0) S ZIBIO=ION,ZIBIO=$O(^%ZIS(1,"B",ZIBIO,0)),ZIBH=DUZ_$G(ZIBH) "RTN","ZIBTCP",23,0) Q:'ZIBIO "RTN","ZIBTCP",24,0) Q:'$D(^%ZIS(1,ZIBIO,90)) "RTN","ZIBTCP",25,0) S H=$P(^%ZIS(1,ZIBIO,90),U,2),P=$P(^(90),U,3) "RTN","ZIBTCP",26,0) D OPEN "RTN","ZIBTCP",27,0) Q:'$D(IO) "RTN","ZIBTCP",28,0) U IO:(::0) "RTN","ZIBTCP",29,0) F I=1:1 R X:300 S %X=$ZC Q:%X<0 S ^TMP($J,"XM"_ZIBH,I)=X "RTN","ZIBTCP",30,0) D ^%ZISC "RTN","ZIBTCP",31,0) O 56::99 "RTN","ZIBTCP",32,0) U 56::"TCP" "RTN","ZIBTCP",33,0) W /SOCKET(H,P) "RTN","ZIBTCP",34,0) S X=0 "RTN","ZIBTCP",35,0) F S X=$O(^TMP($J,"XM"_ZIBH,X)) Q:X="" W ^TMP($J,"XM"_ZIBH,X)_$C(10)_$C(13) "RTN","ZIBTCP",36,0) W !,#,! "RTN","ZIBTCP",37,0) C 56 "RTN","ZIBTCP",38,0) Q "RTN","ZIBTCP",39,0) ; "RTN","ZIBTCP",40,0) OPEN ;OPEN HOST FILE "RTN","ZIBTCP",41,0) F ZIBI=1:1:4 S (IOP,ION)="HOST FILE SERVER #"_ZIBI,%ZIS("IOPAR")="(""XM"_ZIBH_".DAT"":""R"")" D ^%ZIS Q:'POP "RTN","ZIBTCP",42,0) I POP H 2 G OPEN "RTN","ZIBTCP",43,0) KILL IOP "RTN","ZIBTCP",44,0) Q "RTN","ZIBTCP",45,0) ; "RTN","ZIBTCP",46,0) ; Technical Notes: "RTN","ZIBTCP",47,0) ; MSM TCP uses the "!" to clear the TCP buffer. FileMan (RPMS) "RTN","ZIBTCP",48,0) ; uses "!" for a carriage return, line feed. Further, TCP does not "RTN","ZIBTCP",49,0) ; recognize "?30" as 30 spaces from left margin. To circumvent these "RTN","ZIBTCP",50,0) ; problems, I write to a temporary host file, which formats the "RTN","ZIBTCP",51,0) ; document, and then I read it back into the TMP global. Once it's "RTN","ZIBTCP",52,0) ; in the TMP global, I $O through the global and write each line "RTN","ZIBTCP",53,0) ; with a $C(10) and $C(13) concatenated to the string. This process "RTN","ZIBTCP",54,0) ; handles the CR/LF problem at the remote end. "RTN","ZIBTCP",55,0) ; "RTN","ZIBTCP",56,0) ; Port 2501 is the assigned port from the vendor for the Net Que. "RTN","ZIBTCP",57,0) ; "RTN","ZIBTCP",58,0) ; As of 3Jan95, this has only been tested on the Unix platform using "RTN","ZIBTCP",59,0) ; MSM. It should work in a DOS environment using FTP Software's TCP, "RTN","ZIBTCP",60,0) ; but needs to be tested. "RTN","ZIBTCP",61,0) ; "RTN","ZIBTCP",62,0) ; Below is an inquiry of the Device file and Terminal Type file. "RTN","ZIBTCP",63,0) ; "RTN","ZIBTCP",64,0) ; OUTPUT FROM WHAT FILE: DEVICE// "RTN","ZIBTCP",65,0) ; NAME: P-TCP TEST PRINTER $I: 51 "RTN","ZIBTCP",66,0) ; ASK DEVICE: YES ASK PARAMETERS: NO "RTN","ZIBTCP",67,0) ; VOLUME SET(CPU): TUC SIGN-ON/SYSTEM DEVICE: NO "RTN","ZIBTCP",68,0) ; FORCED QUEUING: N0 "RTN","ZIBTCP",69,0) ; LOCATION OF TERMINAL: MAT PARKENSON PRINTER "RTN","ZIBTCP",70,0) ; ASK HOST FILE: NO MARGIN WIDTH: 255 "RTN","ZIBTCP",71,0) ; FORM FEED: # PAGE LENGTH: 256 "RTN","ZIBTCP",72,0) ; BACK SPACE: $C(8) OPEN PARAMETERS: ("XM"_DUZ_$G(ZIBH)_".DAT":"M") "RTN","ZIBTCP",73,0) ; SUBTYPE: P-TCP PRINTER TYPE: HOST FILE SERVER "RTN","ZIBTCP",74,0) ; "RTN","ZIBTCP",75,0) ; Select TERMINAL TYPE NAME: P-TCP PRINTER "RTN","ZIBTCP",76,0) ; NAME: P-TCP PRINTER SELECTABLE AT SIGN-ON: NO "RTN","ZIBTCP",77,0) ; RIGHT MARGIN: 255 FORM FEED: # "RTN","ZIBTCP",78,0) ; PAGE LENGTH: 256 BACK SPACE: $C(8) "RTN","ZIBTCP",79,0) ; OPEN EXECUTE: S XMREC="R X#255:1" CLOSE EXECUTE: D ^ZIBTCP Q "RTN","ZIBTCP",80,0) ; DESCRIPTION: Special Terminal Type used only for P-TCP Printer "RTN","ZIBTCP",81,0) ; Device.. "RTN","ZIBVCHV") 0^218^B4345218 "RTN","ZIBVCHV",1,0) ZIBVCHV ; IHS/ADC/GTH - READ VARS AND RTNS FROM A %INDEX ; [ 10/29/2002 7:42 AM ] "RTN","ZIBVCHV",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVCHV",3,0) ;; "RTN","ZIBVCHV",4,0) ; "RTN","ZIBVCHV",5,0) ; Thanks to Paul Wesley, DSD, for the original routine. "RTN","ZIBVCHV",6,0) ; "RTN","ZIBVCHV",7,0) I '(^%ZOSF("OS")["MSM") D OSNO^XB Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVCHV",8,0) OPEN ; "RTN","ZIBVCHV",9,0) D DT^DICRW,^XBCLS "RTN","ZIBVCHV",10,0) W !!,"Select a %INDEX Summary that was put to disk",! "RTN","ZIBVCHV",11,0) KILL DIR "RTN","ZIBVCHV",12,0) S DIR(0)="F^1:30",DIR("A")="Directory ",DIR("B")="/usr/mumps/" "RTN","ZIBVCHV",13,0) D ^DIR "RTN","ZIBVCHV",14,0) Q:Y["^" "RTN","ZIBVCHV",15,0) S XBDIR=Y "RTN","ZIBVCHV",16,0) FNAME ; "RTN","ZIBVCHV",17,0) KILL DIR "RTN","ZIBVCHV",18,0) FNAME1 ; "RTN","ZIBVCHV",19,0) S DIR(0)="F^1:15",DIR("A")="File Name " "RTN","ZIBVCHV",20,0) D ^DIR "RTN","ZIBVCHV",21,0) G:Y["^" OPEN "RTN","ZIBVCHV",22,0) I Y?.N,$D(XBFL(Y)) S DIR("B")=XBFL(Y) G FNAME1 "RTN","ZIBVCHV",23,0) I Y["*" KILL XBFL S X=$$LIST^%ZISH(XBDIR,Y,.XBFL) D G FNAME "RTN","ZIBVCHV",24,0) .F XBI=1:1 Q:'$D(XBFL(XBI)) W !?5,XBI,?10,XBFL(XBI) "RTN","ZIBVCHV",25,0) .Q "RTN","ZIBVCHV",26,0) S XBFN=Y,X=$$OPEN^%ZISH(XBDIR,XBFN,"R") "RTN","ZIBVCHV",27,0) ES ; "RTN","ZIBVCHV",28,0) I X W !,"error on open of file ",XBDIR,XBFN,! KILL DIR S DIR(0)="E" D ^DIRQ:Y=1 G FNAME "RTN","ZIBVCHV",29,0) S XBJ=$J,XBVRLC=0 "RTN","ZIBVCHV",30,0) KILL ^XBVROU(XBJ,"V") "RTN","ZIBVCHV",31,0) W !,"Looking for 'Indexed Routines:' ",! "RTN","ZIBVCHV",32,0) READ ; "RTN","ZIBVCHV",33,0) F XBI=1:1:20 U IO R X:DTIME U IO(0) W "." I X["Indexed Routines:" S XBOK=1 W !,"Found ! ... continuing" Q "RTN","ZIBVCHV",34,0) I '$G(XBOK) KILL DIR "RTN","ZIBVCHV",35,0) F XBI=1:1 U IO R X:DTIME Q:X["Local V" "RTN","ZIBVCHV",36,0) F XBI=1:1 U IO R X:DTIME Q:X["Global " D "RTN","ZIBVCHV",37,0) .Q:$L(X)<17 "RTN","ZIBVCHV",38,0) .Q:$E(X,17)=" " "RTN","ZIBVCHV",39,0) .I X[$C(13) S X=$P(X,$C(13)) "RTN","ZIBVCHV",40,0) .S XBVARL=$G(XBVAR) "RTN","ZIBVCHV",41,0) .I $E(X,4)'=" " S XBVAR="" F XBI=4:1 S XBX=$E(X,XBI) Q:" ("[XBX S XBVAR=XBVAR_XBX "RTN","ZIBVCHV",42,0) .I XBVAR'=XBVARL S XBVRLC=0 "RTN","ZIBVCHV",43,0) .S XBR=$E(X,17,999),XBR=$TR(XBR,"*!","") "RTN","ZIBVCHV",44,0) .S XBVRLC=XBVRLC+1,^XBVROU(XBJ,"V",XBVAR,XBVRLC)=XBR "RTN","ZIBVCHV",45,0) .Q "RTN","ZIBVCHV",46,0) D ^%ZISC "RTN","ZIBVCHV",47,0) S XBFILE=1 "RTN","ZIBVCHV",48,0) Q "RTN","ZIBVCHV",49,0) ; "RTN","ZIBVKCA") 0^219^B955366 "RTN","ZIBVKCA",1,0) ZIBVKCA ; IHS/ADC/GTH - KILL VARIABLES ; [ 10/29/2002 7:42 AM ] "RTN","ZIBVKCA",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVKCA",3,0) ; XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVKCA",4,0) ; "RTN","ZIBVKCA",5,0) ; This routine kills variables in the namespace of the "RTN","ZIBVKCA",6,0) ; variable passed in the parameter. "RTN","ZIBVKCA",7,0) ; This routine is accessed thru the front end routine XBVK. "RTN","ZIBVKCA",8,0) ; "RTN","ZIBVKCA",9,0) ; Original routine provided by Dr. Mark Delaney, TASSC, 12 Dec 2001. "RTN","ZIBVKCA",10,0) ; "RTN","ZIBVKCA",11,0) Q ; No entry from top "RTN","ZIBVKCA",12,0) ; "RTN","ZIBVKCA",13,0) EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace. "RTN","ZIBVKCA",14,0) ; "RTN","ZIBVKCA",15,0) Q:$G(ZIBVKNS)="" "RTN","ZIBVKCA",16,0) NEW ZIBVKX "RTN","ZIBVKCA",17,0) S ZIBVKX=ZIBVKNS K @ZIBVKNS "RTN","ZIBVKCA",18,0) F S ZIBVKX=$O(@ZIBVKX) Q:ZIBVKX="" Q:$E(ZIBVKX,1,$L(ZIBVKNS))]ZIBVKNS I $E(ZIBVKX,1,$L(ZIBVKNS))=ZIBVKNS,ZIBVKX'["ZIBVK" K @ZIBVKX "RTN","ZIBVKCA",19,0) Q "RTN","ZIBVKCA",20,0) ; "RTN","ZIBVKIL") 0^220^B9850962 "RTN","ZIBVKIL",1,0) ZIBVKIL ; IHS/ADC/GTH - BUILD A KILL VARIABLE ROUTINE ; [ 11/04/97 10:26 AM ] "RTN","ZIBVKIL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVKIL",3,0) ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBVKIL",4,0) ; "RTN","ZIBVKIL",5,0) ; Build a name space variable killer routine in ^.ns.KVAR. "RTN","ZIBVKIL",6,0) ; "RTN","ZIBVKIL",7,0) ; Select a %INDEX host file summary from which to build the "RTN","ZIBVKIL",8,0) ; routine. Select a name space for the variables and the "RTN","ZIBVKIL",9,0) ; routine to be built. Enter any package wide variables. "RTN","ZIBVKIL",10,0) ; "RTN","ZIBVKIL",11,0) ; Add D ^.ns.VKL0 to all menu exit actions where package "RTN","ZIBVKIL",12,0) ; variables are to remain. "RTN","ZIBVKIL",13,0) ; "RTN","ZIBVKIL",14,0) ; Add D KILL^XUSCLEAN to the exit of all other menus. "RTN","ZIBVKIL",15,0) ; "RTN","ZIBVKIL",16,0) ; I $P(^%ZOSF("OS"),"-",1)'="MSM" W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"-",1),"' NOT SUPPORTED." Q ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBVKIL",17,0) I $P(^%ZOSF("OS"),"^",1)'["MSM" W !,*7,"OPERATING SYSTEM '",$P(^%ZOSF("OS"),"^",1),"' NOT SUPPORTED." Q ; XB*3*4 IHS/ADC/GTH 05-22-97 Prevent err. "RTN","ZIBVKIL",18,0) ; "RTN","ZIBVKIL",19,0) D HOME^%ZIS "RTN","ZIBVKIL",20,0) NEW XBNS "RTN","ZIBVKIL",21,0) NS ; "RTN","ZIBVKIL",22,0) KILL DIR "RTN","ZIBVKIL",23,0) S DIR(0)="F^2:4",DIR("A")="Name Space - or ' ^ 'to exit" "RTN","ZIBVKIL",24,0) D ^DIR "RTN","ZIBVKIL",25,0) I X="^" G EXIT "RTN","ZIBVKIL",26,0) I Y="" G NS "RTN","ZIBVKIL",27,0) I '$D(^DIC(9.4,"C",Y)) W !,"NO PACKAGE ??",! G NS "RTN","ZIBVKIL",28,0) S XBNS=Y "RTN","ZIBVKIL",29,0) PKGVAR ; "RTN","ZIBVKIL",30,0) KILL DIR "RTN","ZIBVKIL",31,0) S DIR(0)="F^0:235",DIR("A")="List of Package Wide Variables or '^' to bypass",DIR("?")="LIST var1,var2, ... " "RTN","ZIBVKIL",32,0) D ^DIR "RTN","ZIBVKIL",33,0) I Y'="^" F XBI=1:1 S X=$P(Y,",",XBI) Q:X="" S XBVPKG(X)="" "RTN","ZIBVKIL",34,0) KROU ; "RTN","ZIBVKIL",35,0) KILL DIR "RTN","ZIBVKIL",36,0) S DIR(0)="F^0:235",DIR("A")="List of other Kill routines to chain",DIR("?")=" ^ROU1,^ROU2, ... with '^'s" "RTN","ZIBVKIL",37,0) D ^DIR "RTN","ZIBVKIL",38,0) I Y]"",Y'="^" F XBI=1:1 S XBROU=$P(Y,",",XBI) Q:XBROU="" S X=$P(XBROU,"^",2) D "RTN","ZIBVKIL",39,0) . I X="" W !,XBROU," error in list >> ",Y G KROU "RTN","ZIBVKIL",40,0) . X ^%ZOSF("TEST") "RTN","ZIBVKIL",41,0) . I '$T W !,X," error in list >> ",Y G KROU "RTN","ZIBVKIL",42,0) .Q "RTN","ZIBVKIL",43,0) I Y]"" S XBKROU=" D "_Y "RTN","ZIBVKIL",44,0) D ^XBVCHV "RTN","ZIBVKIL",45,0) I '$D(^XBVROU($J)) W !,"NO FILE ??",! G NS "RTN","ZIBVKIL",46,0) S ; "RTN","ZIBVKIL",47,0) F I=1:1 Q:'$T(@I) S XBLD(I)=$P($T(@I),";;",2,99) "RTN","ZIBVKIL",48,0) X XBLD(1) "RTN","ZIBVKIL",49,0) EXIT ; "RTN","ZIBVKIL",50,0) D KILL^XUSCLEAN "RTN","ZIBVKIL",51,0) KILL ^XBVROU($J),XBKROU,XBLD "RTN","ZIBVKIL",52,0) W !,"REMEMBER TO EDIT THE TOP LINES OF THE ROUTINES CREATED !",!! "RTN","ZIBVKIL",53,0) Q "RTN","ZIBVKIL",54,0) ; "RTN","ZIBVKIL",55,0) 1 ;;S XBNUM=0 X XBLD(2),XBLD(3),XBLD(4),XBLD(6) ZS @XBROU W !,XBROU," Saved ",!! "RTN","ZIBVKIL",56,0) 2 ;;ZR S XBROU=XBNS_"VKL"_XBNUM,X=XBROU_" ; - kill variables",XBLNS=$L(XBNS) ZI X S X=" ;;" ZI X "RTN","ZIBVKIL",57,0) 3 ;;S XBVAR=XBNS,XBHD=" K ",X=" K " F S XBVAR=$O(^XBVROU($J,"V",XBVAR)) Q:$E(XBVAR,1,XBLNS)'=XBNS I '$D(XBVPKG(XBVAR)) S X=X_XBVAR_"," S XBLX=$L(X) I XBLX>235 S X=$E(X,1,XBLX-1) ZI X S X=" K " X ^%ZOSF("SIZE") I Y>3000 X XBLD(5),XBLD(2) "RTN","ZIBVKIL",58,0) 4 ;;S XBLX=$L(X) I XBLX>3 S X=$E(X,1,XBLX-1) ZI X "RTN","ZIBVKIL",59,0) 5 ;;S XBNUM=XBNUM+1 S X=" D ^"_XBNS_"VKL"_XBNUM ZI X ZS @XBROU W !,XBROU," Saved",!! "RTN","ZIBVKIL",60,0) 6 ;;I $D(XBKROU) S X=XBKROU ZI X W !,"ADDING ",X,! "RTN","ZIBVKMSM") 0^221^B1032009 "RTN","ZIBVKMSM",1,0) ZIBVKMSM ; IHS/ADC/GTH - KILL VARIABLES ; [ 02/07/97 3:02 PM ] "RTN","ZIBVKMSM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVKMSM",3,0) ; "RTN","ZIBVKMSM",4,0) ; This routine kills variables in the namespace of the "RTN","ZIBVKMSM",5,0) ; variable passed in the parameter. "RTN","ZIBVKMSM",6,0) ; This routine is accessed thru the front end routine XBVK. "RTN","ZIBVKMSM",7,0) ; "RTN","ZIBVKMSM",8,0) ; Original routine provided by Don Enos, OHPRD, 2 Oct 1995. "RTN","ZIBVKMSM",9,0) ; "RTN","ZIBVKMSM",10,0) Q ; No entry from top "RTN","ZIBVKMSM",11,0) ; "RTN","ZIBVKMSM",12,0) EN(ZIBVKNS) ;EP - KILL Local variables in the passed namespace. "RTN","ZIBVKMSM",13,0) ; "RTN","ZIBVKMSM",14,0) Q:$G(ZIBVKNS)="" "RTN","ZIBVKMSM",15,0) NEW ZIBVKX "RTN","ZIBVKMSM",16,0) S ZIBVKX=$O(@ZIBVKNS,-1) "RTN","ZIBVKMSM",17,0) S:ZIBVKX="" ZIBVKX="%" "RTN","ZIBVKMSM",18,0) K:ZIBVKNS="%" @ZIBVKNS "RTN","ZIBVKMSM",19,0) F S ZIBVKX=$O(@ZIBVKX) Q:ZIBVKX="" Q:$E(ZIBVKX,1,$L(ZIBVKNS))]ZIBVKNS I $E(ZIBVKX,1,$L(ZIBVKNS))=ZIBVKNS,ZIBVKX'["ZIBVK" K @ZIBVKX "RTN","ZIBVKMSM",20,0) Q "RTN","ZIBVKMSM",21,0) ; "RTN","ZIBVL") 0^222^B13704661 "RTN","ZIBVL",1,0) ZIBVL ;IHS/SET/GTH - LIST LOCAL VARIABLES ; [ 10/29/2002 7:42 AM ] "RTN","ZIBVL",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVL",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Both MSM and Cache'. "RTN","ZIBVL",4,0) ; "RTN","ZIBVL",5,0) ; This routine lists variables that begin with the string "RTN","ZIBVL",6,0) ; entered by the user. Selection of variables is case "RTN","ZIBVL",7,0) ; sensitive. "RTN","ZIBVL",8,0) ; "RTN","ZIBVL",9,0) ; This routine is specific to MSM and Cache. It will work "RTN","ZIBVL",10,0) ; with any M implementation that has all Type A extensions "RTN","ZIBVL",11,0) ; to the 1990 M ANSI standard implemented. The front end "RTN","ZIBVL",12,0) ; routine, XBVL, stops if any other than an MSM or Cache "RTN","ZIBVL",13,0) ; implementation is encountered. "RTN","ZIBVL",14,0) ; "RTN","ZIBVL",15,0) ; TASSC/MFD formally ZIBVLMSM, patched this along with XBVL for Cache "RTN","ZIBVL",16,0) ; "RTN","ZIBVL",17,0) START ; "RTN","ZIBVL",18,0) NEW ZIBVLC,ZIBVLDQT,ZIBVLI,ZIBVLLC,ZIBVLNS,ZIBVLQ,ZIBVLX,ZIBVLX2,ZIBVLY,ZIBVLZ "RTN","ZIBVL",19,0) S $P(ZIBVLZ,"=",40)="" "RTN","ZIBVL",20,0) F D LOOP Q:ZIBVLQ "RTN","ZIBVL",21,0) Q "RTN","ZIBVL",22,0) ; "RTN","ZIBVL",23,0) LOOP ; WRITE NAME SPACED VARIABLES UNTIL USER IS THROUGH "RTN","ZIBVL",24,0) D READ ; get name space "RTN","ZIBVL",25,0) Q:ZIBVLQ "RTN","ZIBVL",26,0) Q:ZIBVLNS="" "RTN","ZIBVL",27,0) I $D(IOF) W @IOF I 1 "RTN","ZIBVL",28,0) E W !! "RTN","ZIBVL",29,0) W ZIBVLZ,! ; write leading === line "RTN","ZIBVL",30,0) I ZIBVLNS="*" D ALL I 1 ; list variables "RTN","ZIBVL",31,0) E D NMSPACE "RTN","ZIBVL",32,0) D:ZIBVLLC>20 PAUSE ; pause if bottom of screen "RTN","ZIBVL",33,0) I 'ZIBVLQ W ZIBVLZ,! I 1 ; write trailing === line "RTN","ZIBVL",34,0) E W ! "RTN","ZIBVL",35,0) S ZIBVLQ=0 "RTN","ZIBVL",36,0) Q "RTN","ZIBVL",37,0) ; "RTN","ZIBVL",38,0) NMSPACE ; LIST VARIABLES IN NAME SPACE "RTN","ZIBVL",39,0) S ZIBVLX="" "RTN","ZIBVL",40,0) I $$VERSION^%ZOSV(1)["MSM" S ZIBVLX=$O(@ZIBVLNS,-1) ; backup to variable before name space "RTN","ZIBVL",41,0) S:ZIBVLX="" ZIBVLX="%" ; if none start with % "RTN","ZIBVL",42,0) I ZIBVLNS="%",$D(%) D WRITE,QUERY ;if % name space list % variable "RTN","ZIBVL",43,0) ; now list variables in name space and subnodes if arrays "RTN","ZIBVL",44,0) ; skip ZIBVL* variables "RTN","ZIBVL",45,0) F S ZIBVLX=$O(@ZIBVLX) Q:ZIBVLX="" Q:$E(ZIBVLX,1,$L(ZIBVLNS))]ZIBVLNS I $E(ZIBVLX,1,$L(ZIBVLNS))=ZIBVLNS,$E(ZIBVLX,1,5)'="ZIBVL" D WRITE Q:ZIBVLQ D QUERY Q:ZIBVLQ "RTN","ZIBVL",46,0) Q "RTN","ZIBVL",47,0) ; "RTN","ZIBVL",48,0) ALL ; LIST ALL VARIABLES "RTN","ZIBVL",49,0) S ZIBVLX="%" "RTN","ZIBVL",50,0) I $D(%) D WRITE,QUERY ; if % exists list it "RTN","ZIBVL",51,0) ; now list all variables and subnodes if arrays "RTN","ZIBVL",52,0) ; skip ZIBVL* variables "RTN","ZIBVL",53,0) F S ZIBVLX=$O(@ZIBVLX) Q:ZIBVLX="" I $E(ZIBVLX,1,5)'="ZIBVL" D WRITE Q:ZIBVLQ D QUERY Q:ZIBVLQ "RTN","ZIBVL",54,0) Q "RTN","ZIBVL",55,0) ; "RTN","ZIBVL",56,0) QUERY ; $Q THROUGH ARRAYS "RTN","ZIBVL",57,0) S ZIBVLX2=ZIBVLX "RTN","ZIBVL",58,0) NEW ZIBVLX "RTN","ZIBVL",59,0) S ZIBVLX=ZIBVLX2 "RTN","ZIBVL",60,0) F S ZIBVLX=$Q(@ZIBVLX) Q:ZIBVLX="" D WRITE Q:ZIBVLQ "RTN","ZIBVL",61,0) Q "RTN","ZIBVL",62,0) ; "RTN","ZIBVL",63,0) WRITE ; WRITE ONE VARIABLE NAME AND VALUE "RTN","ZIBVL",64,0) Q:'($D(@ZIBVLX)#2) "RTN","ZIBVL",65,0) ; quote non-numeric values (numeric = canonic < 16 digits) "RTN","ZIBVL",66,0) S ZIBVLDQT="""" "RTN","ZIBVL",67,0) I $L(@ZIBVLX)<16,@ZIBVLX=+@ZIBVLX S ZIBVLDQT="" "RTN","ZIBVL",68,0) ; figure out # of lines that will be used "RTN","ZIBVL",69,0) S ZIBVLC=$L(ZIBVLX)+1+($L(ZIBVLDQT)*2)+$L(@ZIBVLX) F ZIBVLI=1:1 S ZIBVLC=ZIBVLC-80 Q:ZIBVLC<1 "RTN","ZIBVL",70,0) S ZIBVLLC=ZIBVLLC+ZIBVLI "RTN","ZIBVL",71,0) I ZIBVLLC>22 S ZIBVLLC=0 D PAUSE ; pause if not enough room "RTN","ZIBVL",72,0) Q:ZIBVLQ "RTN","ZIBVL",73,0) W ZIBVLX,"=",ZIBVLDQT,@ZIBVLX,ZIBVLDQT,! ; write name=value "RTN","ZIBVL",74,0) Q "RTN","ZIBVL",75,0) ; "RTN","ZIBVL",76,0) READ ; READ USER INPUT "RTN","ZIBVL",77,0) S ZIBVLQ=1,ZIBVLLC=0 "RTN","ZIBVL",78,0) R !,"Enter Name Space: ",ZIBVLNS:300 "RTN","ZIBVL",79,0) S:'$T ZIBVLNS="^" "RTN","ZIBVL",80,0) Q:ZIBVLNS="" "RTN","ZIBVL",81,0) Q:ZIBVLNS["^" "RTN","ZIBVL",82,0) S ZIBVLQ=0 "RTN","ZIBVL",83,0) I ZIBVLNS["?" D HELP Q "RTN","ZIBVL",84,0) I $E(ZIBVLNS,1,5)="ZIBVL" W !!,"ZIBVL is not allowed!",*7 D HELP Q "RTN","ZIBVL",85,0) I ZIBVLNS=" " W !!,"BLANK is not allowed!",*7 D HELP Q "RTN","ZIBVL",86,0) I $L(ZIBVLNS)>1,$E(ZIBVLNS,$L(ZIBVLNS))="*" S ZIBVLNS=$E(ZIBVLNS,1,($L(ZIBVLNS)-1)) "RTN","ZIBVL",87,0) D I ZIBVLQ S ZIBVLQ=0 D HELP W *7 Q "RTN","ZIBVL",88,0) . Q:ZIBVLNS?1"%".AN "RTN","ZIBVL",89,0) . Q:ZIBVLNS?1A.AN "RTN","ZIBVL",90,0) . Q:ZIBVLNS="*" "RTN","ZIBVL",91,0) . S ZIBVLQ=1 "RTN","ZIBVL",92,0) . Q "RTN","ZIBVL",93,0) Q "RTN","ZIBVL",94,0) ; "RTN","ZIBVL",95,0) HELP ; DISPLAY HELP MESSAGE "RTN","ZIBVL",96,0) W !!,"Enter valid variable name string (e.g IO), or * for all, or RETURN or ^ to exit.",! "RTN","ZIBVL",97,0) S ZIBVLNS="" "RTN","ZIBVL",98,0) Q "RTN","ZIBVL",99,0) ; "RTN","ZIBVL",100,0) PAUSE ; PAUSE FOR USER "RTN","ZIBVL",101,0) R "Press any key to continue",ZIBVLY:300 S:'$T ZIBVLY="^" "RTN","ZIBVL",102,0) W ! "RTN","ZIBVL",103,0) I ZIBVLY["^" S ZIBVLQ=1 Q "RTN","ZIBVL",104,0) W:$D(IOF) @IOF "RTN","ZIBVL",105,0) Q "RTN","ZIBVL",106,0) ; "RTN","ZIBVLMSM") 0^223^B13173024 "RTN","ZIBVLMSM",1,0) ZIBVLMSM ; IHS/ADC/GTH - LIST MSM VARIABLES ; [ 02/07/97 3:02 PM ] "RTN","ZIBVLMSM",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVLMSM",3,0) ; "RTN","ZIBVLMSM",4,0) ; This routine lists variables that begin with the string "RTN","ZIBVLMSM",5,0) ; entered by the user. Selection of variables is case "RTN","ZIBVLMSM",6,0) ; sensitive. "RTN","ZIBVLMSM",7,0) ; "RTN","ZIBVLMSM",8,0) ; This routine is specific to Micronetics. It will work "RTN","ZIBVLMSM",9,0) ; with any M implementation that has all Type A extensions "RTN","ZIBVLMSM",10,0) ; to the 1990 M ANSI standard implemented. The front end "RTN","ZIBVLMSM",11,0) ; routine, XBVL, stops if any other than an MSM "RTN","ZIBVLMSM",12,0) ; implementation is encountered. "RTN","ZIBVLMSM",13,0) ; "RTN","ZIBVLMSM",14,0) ; Routine provided by Don Enos, OHPRD, 5 Feb 96. "RTN","ZIBVLMSM",15,0) ; "RTN","ZIBVLMSM",16,0) START ; "RTN","ZIBVLMSM",17,0) NEW ZIBVLC,ZIBVLDQT,ZIBVLI,ZIBVLLC,ZIBVLNS,ZIBVLQ,ZIBVLX,ZIBVLX2,ZIBVLY,ZIBVLZ "RTN","ZIBVLMSM",18,0) S $P(ZIBVLZ,"=",40)="" "RTN","ZIBVLMSM",19,0) F D LOOP Q:ZIBVLQ "RTN","ZIBVLMSM",20,0) Q "RTN","ZIBVLMSM",21,0) ; "RTN","ZIBVLMSM",22,0) LOOP ; WRITE NAME SPACED VARIABLES UNTIL USER IS THROUGH "RTN","ZIBVLMSM",23,0) D READ ; get name space "RTN","ZIBVLMSM",24,0) Q:ZIBVLQ "RTN","ZIBVLMSM",25,0) Q:ZIBVLNS="" "RTN","ZIBVLMSM",26,0) I $D(IOF) W @IOF I 1 "RTN","ZIBVLMSM",27,0) E W !! "RTN","ZIBVLMSM",28,0) W ZIBVLZ,! ; write leading === line "RTN","ZIBVLMSM",29,0) I ZIBVLNS="*" D ALL I 1 ; list variables "RTN","ZIBVLMSM",30,0) E D NMSPACE "RTN","ZIBVLMSM",31,0) D:ZIBVLLC>20 PAUSE ; pause if bottom of screen "RTN","ZIBVLMSM",32,0) I 'ZIBVLQ W ZIBVLZ,! I 1 ; write trailing === line "RTN","ZIBVLMSM",33,0) E W ! "RTN","ZIBVLMSM",34,0) S ZIBVLQ=0 "RTN","ZIBVLMSM",35,0) Q "RTN","ZIBVLMSM",36,0) ; "RTN","ZIBVLMSM",37,0) NMSPACE ; LIST VARIABLES IN NAME SPACE "RTN","ZIBVLMSM",38,0) S ZIBVLX=$O(@ZIBVLNS,-1) ; backup to variable before name space "RTN","ZIBVLMSM",39,0) S:ZIBVLX="" ZIBVLX="%" ; if none start with % "RTN","ZIBVLMSM",40,0) I ZIBVLNS="%",$D(%) D WRITE,QUERY ;if % name space list % variable "RTN","ZIBVLMSM",41,0) ; now list variables in name space and subnodes if arrays "RTN","ZIBVLMSM",42,0) ; skip ZIBVL* variables "RTN","ZIBVLMSM",43,0) F S ZIBVLX=$O(@ZIBVLX) Q:ZIBVLX="" Q:$E(ZIBVLX,1,$L(ZIBVLNS))]ZIBVLNS I $E(ZIBVLX,1,$L(ZIBVLNS))=ZIBVLNS,$E(ZIBVLX,1,5)'="ZIBVL" D WRITE Q:ZIBVLQ D QUERY Q:ZIBVLQ "RTN","ZIBVLMSM",44,0) Q "RTN","ZIBVLMSM",45,0) ; "RTN","ZIBVLMSM",46,0) ALL ; LIST ALL VARIABLES "RTN","ZIBVLMSM",47,0) S ZIBVLX="%" "RTN","ZIBVLMSM",48,0) I $D(%) D WRITE,QUERY ; if % exists list it "RTN","ZIBVLMSM",49,0) ; now list all variables and subnodes if arrays "RTN","ZIBVLMSM",50,0) ; skip ZIBVL* variables "RTN","ZIBVLMSM",51,0) F S ZIBVLX=$O(@ZIBVLX) Q:ZIBVLX="" I $E(ZIBVLX,1,5)'="ZIBVL" D WRITE Q:ZIBVLQ D QUERY Q:ZIBVLQ "RTN","ZIBVLMSM",52,0) Q "RTN","ZIBVLMSM",53,0) ; "RTN","ZIBVLMSM",54,0) QUERY ; $Q THROUGH ARRAYS "RTN","ZIBVLMSM",55,0) S ZIBVLX2=ZIBVLX "RTN","ZIBVLMSM",56,0) NEW ZIBVLX "RTN","ZIBVLMSM",57,0) S ZIBVLX=ZIBVLX2 "RTN","ZIBVLMSM",58,0) F S ZIBVLX=$Q(@ZIBVLX) Q:ZIBVLX="" D WRITE Q:ZIBVLQ "RTN","ZIBVLMSM",59,0) Q "RTN","ZIBVLMSM",60,0) ; "RTN","ZIBVLMSM",61,0) WRITE ; WRITE ONE VARIABLE NAME AND VALUE "RTN","ZIBVLMSM",62,0) Q:'($D(@ZIBVLX)#2) "RTN","ZIBVLMSM",63,0) ; quote non-numeric values (numeric = canonic < 16 digits) "RTN","ZIBVLMSM",64,0) S ZIBVLDQT="""" "RTN","ZIBVLMSM",65,0) I $L(@ZIBVLX)<16,@ZIBVLX=+@ZIBVLX S ZIBVLDQT="" "RTN","ZIBVLMSM",66,0) ; figure out # of lines that will be used "RTN","ZIBVLMSM",67,0) S ZIBVLC=$L(ZIBVLX)+1+($L(ZIBVLDQT)*2)+$L(@ZIBVLX) F ZIBVLI=1:1 S ZIBVLC=ZIBVLC-80 Q:ZIBVLC<1 "RTN","ZIBVLMSM",68,0) S ZIBVLLC=ZIBVLLC+ZIBVLI "RTN","ZIBVLMSM",69,0) I ZIBVLLC>22 S ZIBVLLC=0 D PAUSE ; pause if not enough room "RTN","ZIBVLMSM",70,0) Q:ZIBVLQ "RTN","ZIBVLMSM",71,0) W ZIBVLX,"=",ZIBVLDQT,@ZIBVLX,ZIBVLDQT,! ; write name=value "RTN","ZIBVLMSM",72,0) Q "RTN","ZIBVLMSM",73,0) ; "RTN","ZIBVLMSM",74,0) READ ; READ USER INPUT "RTN","ZIBVLMSM",75,0) S ZIBVLQ=1,ZIBVLLC=0 "RTN","ZIBVLMSM",76,0) R !,"Enter Name Space: ",ZIBVLNS:300 "RTN","ZIBVLMSM",77,0) S:'$T ZIBVLNS="^" "RTN","ZIBVLMSM",78,0) Q:ZIBVLNS="" "RTN","ZIBVLMSM",79,0) Q:ZIBVLNS["^" "RTN","ZIBVLMSM",80,0) S ZIBVLQ=0 "RTN","ZIBVLMSM",81,0) I ZIBVLNS["?" D HELP Q "RTN","ZIBVLMSM",82,0) I $E(ZIBVLNS,1,5)="ZIBVL" W !!,"ZIBVL is not allowed!",*7 D HELP Q "RTN","ZIBVLMSM",83,0) I ZIBVLNS=" " W !!,"BLANK is not allowed!",*7 D HELP Q "RTN","ZIBVLMSM",84,0) I $L(ZIBVLNS)>1,$E(ZIBVLNS,$L(ZIBVLNS))="*" S ZIBVLNS=$E(ZIBVLNS,1,($L(ZIBVLNS)-1)) "RTN","ZIBVLMSM",85,0) D I ZIBVLQ S ZIBVLQ=0 D HELP W *7 Q "RTN","ZIBVLMSM",86,0) . Q:ZIBVLNS?1"%".AN "RTN","ZIBVLMSM",87,0) . Q:ZIBVLNS?1A.AN "RTN","ZIBVLMSM",88,0) . Q:ZIBVLNS="*" "RTN","ZIBVLMSM",89,0) . S ZIBVLQ=1 "RTN","ZIBVLMSM",90,0) . Q "RTN","ZIBVLMSM",91,0) Q "RTN","ZIBVLMSM",92,0) ; "RTN","ZIBVLMSM",93,0) HELP ; DISPLAY HELP MESSAGE "RTN","ZIBVLMSM",94,0) W !!,"Enter valid variable name string (e.g IO), or * for all, or RETURN or ^ to exit.",! "RTN","ZIBVLMSM",95,0) S ZIBVLNS="" "RTN","ZIBVLMSM",96,0) Q "RTN","ZIBVLMSM",97,0) ; "RTN","ZIBVLMSM",98,0) PAUSE ; PAUSE FOR USER "RTN","ZIBVLMSM",99,0) R "Press any key to continue",ZIBVLY:300 S:'$T ZIBVLY="^" "RTN","ZIBVLMSM",100,0) W ! "RTN","ZIBVLMSM",101,0) I ZIBVLY["^" S ZIBVLQ=1 Q "RTN","ZIBVLMSM",102,0) W:$D(IOF) @IOF "RTN","ZIBVLMSM",103,0) Q "RTN","ZIBVSS") 0^224^B15663355 "RTN","ZIBVSS",1,0) ZIBVSS ; IHS/ADC/GTH - VENDOR SPECIFIC SUBROUTINES ; [ 10/29/2002 7:42 AM ] "RTN","ZIBVSS",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBVSS",3,0) ;XB*3*9 IHS/SET/GTH XB*3*9 10/29/2002 Cache' mods. "RTN","ZIBVSS",4,0) ;XB*3*9 fixed LG,CG,GCH,GSZE,GR,GS,RCMP,RR,RS,RDEL,RSE,RSAND,NEWED,RCHANGE,RCOPY,RPRT,ER to work with Cache' "RTN","ZIBVSS",5,0) ;XB*3*9 GSE,GE,GCHR,GDEL,REDIT don't currently work with Cache' "RTN","ZIBVSS",6,0) ; "RTN","ZIBVSS",7,0) LG ;EP - List global "RTN","ZIBVSS",8,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%GL",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",9,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GL",$G(^%ZOSF("OS"))["OpenM":"^%G",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",10,0) Q "RTN","ZIBVSS",11,0) ; "RTN","ZIBVSS",12,0) CG ;EP - Copy global to another UCI "RTN","ZIBVSS",13,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%GCOPY",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",14,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%GCOPY",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",15,0) Q "RTN","ZIBVSS",16,0) ; "RTN","ZIBVSS",17,0) GSE ;EP - Search global for value "RTN","ZIBVSS",18,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GSE",1:"OSNO^XB") "RTN","ZIBVSS",19,0) Q "RTN","ZIBVSS",20,0) ; "RTN","ZIBVSS",21,0) GE ;EP - Global edit "RTN","ZIBVSS",22,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GEDIT",1:"OSNO^XB") "RTN","ZIBVSS",23,0) Q "RTN","ZIBVSS",24,0) ; "RTN","ZIBVSS",25,0) GCH ;EP - Change global value "RTN","ZIBVSS",26,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%GCHANGE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",27,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%GCHANGE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",28,0) Q "RTN","ZIBVSS",29,0) ; "RTN","ZIBVSS",30,0) GSZE ;EP - Global size/efficiency "RTN","ZIBVSS",31,0) ;D @$S(^%ZOSF("OS")["MSM":"^%GE",1:"^%ZTBKC") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",32,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%GSIZE",1:"^%ZTBKC") "RTN","ZIBVSS",33,0) Q "RTN","ZIBVSS",34,0) ; "RTN","ZIBVSS",35,0) GCHR ;EP - Global characteristics "RTN","ZIBVSS",36,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GCH",1:"OSNO^XB") "RTN","ZIBVSS",37,0) Q "RTN","ZIBVSS",38,0) ; "RTN","ZIBVSS",39,0) GDEL ;EP - Global delete "RTN","ZIBVSS",40,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GDEL",1:"OSNO^XB") "RTN","ZIBVSS",41,0) Q "RTN","ZIBVSS",42,0) ; "RTN","ZIBVSS",43,0) GR ;EP - Global restore "RTN","ZIBVSS",44,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%GR",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",45,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GR",$G(^%ZOSF("OS"))["OpenM":"^%GI",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",46,0) Q "RTN","ZIBVSS",47,0) ; "RTN","ZIBVSS",48,0) GS ;EP - Global save "RTN","ZIBVSS",49,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%GS",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",50,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%GS",$G(^%ZOSF("OS"))["OpenM":"^%GO",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",51,0) Q "RTN","ZIBVSS",52,0) ; "RTN","ZIBVSS",53,0) RCMP ;EP - Compare routines in two UCIs "RTN","ZIBVSS",54,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RCMP",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",55,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%RCMP",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",56,0) Q "RTN","ZIBVSS",57,0) ; "RTN","ZIBVSS",58,0) RR ;EP - Restore routines "RTN","ZIBVSS",59,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RR",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",60,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RR",$G(^%ZOSF("OS"))["OpenM":"^%RI",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",61,0) Q "RTN","ZIBVSS",62,0) ; "RTN","ZIBVSS",63,0) RS ;EP - Save routines "RTN","ZIBVSS",64,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RS",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",65,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RS",$G(^%ZOSF("OS"))["OpenM":"^%RO",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",66,0) Q "RTN","ZIBVSS",67,0) ; "RTN","ZIBVSS",68,0) RDEL ;EP - Delete routines "RTN","ZIBVSS",69,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RDEL",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",70,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RDEL",$G(^%ZOSF("OS"))["OpenM":"^%RDELETE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",71,0) Q "RTN","ZIBVSS",72,0) ; "RTN","ZIBVSS",73,0) RSE ;EP - Search routines for values (OR) "RTN","ZIBVSS",74,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RSE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",75,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RSE",$G(^%ZOSF("OS"))["OpenM":"^%RFIND",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",76,0) Q "RTN","ZIBVSS",77,0) ; "RTN","ZIBVSS",78,0) RSAND ;EP - Search routines for values (AND) "RTN","ZIBVSS",79,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RSAND",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",80,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RSAND",$G(^%ZOSF("OS"))["OpenM":"^%RFIND",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",81,0) Q "RTN","ZIBVSS",82,0) ; "RTN","ZIBVSS",83,0) NEWED ;EP - Find routines by edit date "RTN","ZIBVSS",84,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%NEWED",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",85,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%NEWED",$G(^%ZOSF("OS"))["OpenM":"^%RD",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",86,0) Q "RTN","ZIBVSS",87,0) ; "RTN","ZIBVSS",88,0) REDIT ;EP - Full screen editor "RTN","ZIBVSS",89,0) ;Q:'($G(^%ZOSF("OS"))["MSM") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",90,0) I '($G(^%ZOSF("OS"))["MSM") D OSNO^XB Q ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",91,0) X "ZR NEW (XB) X ^%E" "RTN","ZIBVSS",92,0) Q "RTN","ZIBVSS",93,0) ; "RTN","ZIBVSS",94,0) RCHANGE ;EP - Routine change "RTN","ZIBVSS",95,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RCHANGE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",96,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%RCHANGE",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",97,0) Q "RTN","ZIBVSS",98,0) ; "RTN","ZIBVSS",99,0) RCOPY ;EP - Routine copy "RTN","ZIBVSS",100,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RCOPY",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",101,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%RCOPY",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",102,0) Q "RTN","ZIBVSS",103,0) ; "RTN","ZIBVSS",104,0) RPRT ;EP - List routines "RTN","ZIBVSS",105,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%RPRT",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",106,0) D @$S($G(^%ZOSF("OS"))["MSM":"^%RPRT",$G(^%ZOSF("OS"))["OpenM":"^ZIBRPRTD",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",107,0) Q "RTN","ZIBVSS",108,0) ; "RTN","ZIBVSS",109,0) ER ;EP - Error report "RTN","ZIBVSS",110,0) ;D @$S($G(^%ZOSF("OS"))["MSM":"^%ER",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",111,0) D @$S($G(^%ZOSF("OS"))["MSM"!($G(^%ZOSF("OS"))["OpenM"):"^%ER",1:"OSNO^XB") ;IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBVSS",112,0) Q "RTN","ZIBVSS",113,0) ; "RTN","ZIBZUCI") 0^225^B40206285 "RTN","ZIBZUCI",1,0) %ZUCI ; IHS/ADC/GTH - SWAP UCI BETWEEN VOLUME SETS FOR MSM-UNIX ; [ 10/29/2002 7:42 AM ] "RTN","ZIBZUCI",2,0) ;;4.0;XB;;Jul 20, 2009;Build 3 "RTN","ZIBZUCI",3,0) ; "RTN","ZIBZUCI",4,0) ; SAVE THIS ROUTINE AS %ZUCI IN THE MGR UCI "RTN","ZIBZUCI",5,0) ; "RTN","ZIBZUCI",6,0) ; This utility permits switching between UCIs and Volume "RTN","ZIBZUCI",7,0) ; Groups when run in programmer mode. D ^%ZUCI "RTN","ZIBZUCI",8,0) ; "RTN","ZIBZUCI",9,0) ; If switching to a UCI in a Volume Group other than the "RTN","ZIBZUCI",10,0) ; System Volume Group (0), you must enter either the Volume "RTN","ZIBZUCI",11,0) ; Group Number or Volume Group Name along with the UCI Number "RTN","ZIBZUCI",12,0) ; or Name. A 'help' display identifies all UCIs and Volume "RTN","ZIBZUCI",13,0) ; Groups that are currently mounted. Use a '?' for 'help'. "RTN","ZIBZUCI",14,0) ; "RTN","ZIBZUCI",15,0) ; A routine may be tied to the UCI,VOL switch. This routine "RTN","ZIBZUCI",16,0) ; will be called immediately after the UCI,VOL switch occurs. "RTN","ZIBZUCI",17,0) I $$VERSION^%ZOSV(1)["Cache" D ^%CD Q ; IHS/SET/GTH XB*3*9 10/29/2002 "RTN","ZIBZUCI",18,0) ; "RTN","ZIBZUCI",19,0) EN ; ENTRY - Ask for [UCI,VOL] "RTN","ZIBZUCI",20,0) W !,"SWITCH TO NEW UCI",! "RTN","ZIBZUCI",21,0) S $P(%ZIB("DASHES"),"-",81)="" "RTN","ZIBZUCI",22,0) ASK ; Get new UCI name or number. "RTN","ZIBZUCI",23,0) F %ZIB("ASK")=0:0:0 D "RTN","ZIBZUCI",24,0) . S %ZIB("ZT")=0 ; Set DSM error flag for or "RTN","ZIBZUCI",25,0) . S %ZIB("VERIFY UCI")=0 ; Verify UCI flag set to NO. "RTN","ZIBZUCI",26,0) . W !,"You are now in ",$ZU(0) "RTN","ZIBZUCI",27,0) . W !!,"Enter new UCI: " "RTN","ZIBZUCI",28,0) . ; If read timesout or a "^" or is entered then set the "RTN","ZIBZUCI",29,0) . ; loop at ASK+1 to quit "RTN","ZIBZUCI",30,0) . R %ZIB("%"):45 E W *7,"**Timeout**",!!,"You are still in ",$ZU(0) S %ZIB("ASK")=1 Q "RTN","ZIBZUCI",31,0) . I "^"[%ZIB("%") W *7," No action taken!",!!,"You are still in ",$ZU(0) S %ZIB("ASK")=1 Q "RTN","ZIBZUCI",32,0) . S %ZIB("VERIFY UCI")=1 ; Verify UCI flag set to YES. "RTN","ZIBZUCI",33,0) ED . ; Edit input from user. "RTN","ZIBZUCI",34,0) . D ; Edit input. "RTN","ZIBZUCI",35,0) .. S %ZIB("ASK")=1 ; Set loop at ASK+1 to QUIT. "RTN","ZIBZUCI",36,0) .. Q:%ZIB("%")?3A "RTN","ZIBZUCI",37,0) .. Q:%ZIB("%")?3A1":"1.17E "RTN","ZIBZUCI",38,0) .. Q:%ZIB("%")?3A1","3A "RTN","ZIBZUCI",39,0) .. Q:%ZIB("%")?3A1","3A1":"1.17E "RTN","ZIBZUCI",40,0) .. Q:%ZIB("%")?2N "RTN","ZIBZUCI",41,0) .. Q:%ZIB("%")?2N1":"1.17E "RTN","ZIBZUCI",42,0) .. Q:%ZIB("%")?2N1","1N "RTN","ZIBZUCI",43,0) .. Q:%ZIB("%")?2N1","1N1":"1.17E "RTN","ZIBZUCI",44,0) .. Q:%ZIB("%")?1N "RTN","ZIBZUCI",45,0) .. Q:%ZIB("%")?1N1":"1.17E "RTN","ZIBZUCI",46,0) .. Q:%ZIB("%")?1N1","1N "RTN","ZIBZUCI",47,0) .. Q:%ZIB("%")?1N1","1N1":"1.17E "RTN","ZIBZUCI",48,0) .. I %ZIB("%")'["?" D "RTN","ZIBZUCI",49,0) ... W " ?? **Incorrect input**",*7 "RTN","ZIBZUCI",50,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",51,0) ... W !,"Enter ""?"" to get help or" "RTN","ZIBZUCI",52,0) ... W !,"Enter {UCI} {UCI:ROUTINE} {UCI,VOL} {UCI,VOL:ROUTINE}" "RTN","ZIBZUCI",53,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",54,0) .. S %ZIB("ASK")=0 ; Continue the loop at ASK+1. "RTN","ZIBZUCI",55,0) .. S %ZIB("VERIFY UCI")=0 ; Set verify UCI flag to NO. "RTN","ZIBZUCI",56,0) HLP .. ; Display UCI list. "RTN","ZIBZUCI",57,0) .. I %ZIB("%")?1"?" D "RTN","ZIBZUCI",58,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",59,0) ... W !,"UCIs and VOLume groups are identified by either a name or number." "RTN","ZIBZUCI",60,0) ... W !,"Use the name or number identification when selecting a UCI." "RTN","ZIBZUCI",61,0) ... W !!,"Enter ""??"" to get a list of UCIs and VOLume sets." "RTN","ZIBZUCI",62,0) ... W !," ""???"" to get examples." "RTN","ZIBZUCI",63,0) ... W !!,"Enter {UCI} {UCI,VOL} {UCI:ROUTINE} {UCI,VOL:ROUTINE}." "RTN","ZIBZUCI",64,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",65,0) .. I %ZIB("%")?1"??" D "RTN","ZIBZUCI",66,0) ... W !!,"Select from any UCI,VOL from this list:" "RTN","ZIBZUCI",67,0) ... S %ZIB("NO SYS")=0 ; Set no more VOLUME SETs for MSM. "RTN","ZIBZUCI",68,0) ... F %ZIB("VOL NBR")=0:1 D Q:%ZIB("NO SYS") "RTN","ZIBZUCI",69,0) .... S $ZT="ZT^%ZIBZUCI" ; Set DSM error trap for . "RTN","ZIBZUCI",70,0) .... I $ZU(1,%ZIB("VOL NBR"))="" S %ZIB("NO SYS")=1 Q ; DSM gets a error if end of VOLUME SETs. "RTN","ZIBZUCI",71,0) .... W !,%ZIB("DASHES") "RTN","ZIBZUCI",72,0) .... W !,"UCIs in Volume Group Number ",%ZIB("VOL NBR")," . . . Volume Group Name is ",$P($ZU(1,%ZIB("VOL NBR")),",",2),! "RTN","ZIBZUCI",73,0) .... S %ZIB("NO UCI")=0 ; Set no more UCI flag for MSM. "RTN","ZIBZUCI",74,0) .... F %ZIB("UCI NBR")=1:1 D Q:%ZIB("NO UCI") "RTN","ZIBZUCI",75,0) ..... S $ZT="ZT^%ZIBZUCI" ; Set DSM error trap for error. "RTN","ZIBZUCI",76,0) ..... I $ZU(%ZIB("UCI NBR"),(%ZIB("VOL NBR")))="" S %ZIB("NO UCI")=1 Q ; End of UCIs for this VOLUME SET. "RTN","ZIBZUCI",77,0) ..... S %ZIB("UCI,VOL","NAME")=$ZU(%ZIB("UCI NBR"),%ZIB("VOL NBR")) "RTN","ZIBZUCI",78,0) ..... S %ZIB("UCI,VOL","NBR")=%ZIB("UCI NBR")_","_%ZIB("VOL NBR") "RTN","ZIBZUCI",79,0) ..... W:'((%ZIB("UCI NBR")-1)#3) ! "RTN","ZIBZUCI",80,0) ..... W "UCI ",%ZIB("UCI,VOL","NBR")," is ",%ZIB("UCI,VOL","NAME") "RTN","ZIBZUCI",81,0) ..... W $J("",25-($L(%ZIB("UCI,VOL","NBR"))+$L(%ZIB("UCI,VOL","NAME"))+8)) "RTN","ZIBZUCI",82,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",83,0) EXAMP .. ; "RTN","ZIBZUCI",84,0) .. I %ZIB("%")?1"???" D "RTN","ZIBZUCI",85,0) ... W !!,"Examples for switching UCIs",?53,"NAME SYNTAX",?67,"NUMBER SYNTAX" "RTN","ZIBZUCI",86,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",87,0) ... W !," Switch to DEV on default volume group (0)",?55,"DEV",?72,"3" "RTN","ZIBZUCI",88,0) ... W !," Switch to DEV on the volume group AAA (1)",?55,"DEV,AAA",?72,"3,1" "RTN","ZIBZUCI",89,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",90,0) ... W !,"Examples of switching UCIs and running a routine" "RTN","ZIBZUCI",91,0) ... W ?55,"DEV:%SY",?72,"3:%SY" "RTN","ZIBZUCI",92,0) ... W !?55,"DEV,AAA:%SY",?72,"3,1:%SY" "RTN","ZIBZUCI",93,0) ... W !?55,"DEV:P^DI",?72,"3:P^DI" "RTN","ZIBZUCI",94,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",95,0) ... W !,"NOTE: Name,Number combinations for UCI,VOL syntax are mutually exclusive." "RTN","ZIBZUCI",96,0) ... W !,"If you select a UCI in a Volume Group greater than 0 -" "RTN","ZIBZUCI",97,0) ... W !,"Then you must enter the Volume Group Name or Number!" "RTN","ZIBZUCI",98,0) ... W !,%ZIB("DASHES") "RTN","ZIBZUCI",99,0) VER .. ; Verify if UCI,VOL exists. "RTN","ZIBZUCI",100,0) . Q:'%ZIB("VERIFY UCI") ; Stop if verify UCI flag set to NO. "RTN","ZIBZUCI",101,0) . S %ZIB("NEW UCI")=$P($P(%ZIB("%"),","),":") "RTN","ZIBZUCI",102,0) . S %ZIB("NEW VOL")=$P($P(%ZIB("%"),",",2),":") "RTN","ZIBZUCI",103,0) . I %ZIB("NEW VOL")="" D "RTN","ZIBZUCI",104,0) .. I %ZIB("NEW UCI")?1N.E F %=0:1:20 I $P($ZU(0),",",2)=$P($ZU(1,%),",",2) S %ZIB("NEW VOL")=% I 1 Q "RTN","ZIBZUCI",105,0) .. E S %ZIB("NEW VOL")=$P($ZU(0),",",2) "RTN","ZIBZUCI",106,0) . S $ZT="ZT^%ZIBZUCI" ; Set DSM error trap for or "RTN","ZIBZUCI",107,0) . I $ZU(%ZIB("NEW UCI"),%ZIB("NEW VOL"))="" S %ZIB("ZT")=1 Q "RTN","ZIBZUCI",108,0) SW . ; SWITCH TO NEW UCI "RTN","ZIBZUCI",109,0) . I %ZIB("NEW UCI")?3A S %ZIB("UCI,VOL")=$ZU(%ZIB("NEW UCI"),%ZIB("NEW VOL")) "RTN","ZIBZUCI",110,0) . E S %ZIB("UCI,VOL")=%ZIB("NEW UCI")_","_%ZIB("NEW VOL") "RTN","ZIBZUCI",111,0) . I $ZV["DSM" V 148:$J:$V(148,$J)#256+($P(%ZIB("UCI,VOL"),",",2)*32+$P(%ZIB("UCI,VOL"),",")*256) "RTN","ZIBZUCI",112,0) . E V 2:$J:$P(%ZIB("UCI,VOL"),",",2)*32+$P(%ZIB("UCI,VOL"),","):2 "RTN","ZIBZUCI",113,0) . W !!,*7,"You have switched to ",$ZU(0)," {",%ZIB("UCI,VOL"),"}" "RTN","ZIBZUCI",114,0) . S %ZIB("ASK")=1 ; Set loop at ASK+1 to QUIT. "RTN","ZIBZUCI",115,0) I %ZIB("ZT") W !!,*7,"Sorry - ",%ZIB("NEW UCI"),",",%ZIB("NEW VOL")," does not exist!",!,"** NO ACTION TAKEN**!",! G ASK "RTN","ZIBZUCI",116,0) EX ; EXIT "RTN","ZIBZUCI",117,0) KILL % ; Remove the call routine variable. "RTN","ZIBZUCI",118,0) I ""'[$P(%ZIB("%"),":",2) D "RTN","ZIBZUCI",119,0) . S %=$P(%ZIB("%"),":",2) "RTN","ZIBZUCI",120,0) . I $E(%)="^" S %=$E(%,1,9) "RTN","ZIBZUCI",121,0) . E I %["^" "RTN","ZIBZUCI",122,0) . E S %="^"_$E(%,1,8) "RTN","ZIBZUCI",123,0) KILL %ZIB ; Remove symbol table entries. "RTN","ZIBZUCI",124,0) S $ZT="ZT^%ZIBZUCI" ; Set error trap for or "RTN","ZIBZUCI",125,0) G:$D(%) @% ; GO TO routine if requested. "RTN","ZIBZUCI",126,0) Q ; UCI switch completed "RTN","ZIBZUCI",127,0) ; "RTN","ZIBZUCI",128,0) ZT ; Error trap for DSM. "RTN","ZIBZUCI",129,0) I $ZE?1"